[AsteriskBrasil] Erro....
Telecom - UNION
telecom em union.com.br
Quinta Maio 29 10:36:33 BRT 2008
Bom dia lista.
Sera que alguém poderia me ajudar com o extensions abaixo.
Preciso que o *, antes de direcionar a ligação para o ramal, verifique se o mesmo esta disponivel e se é SIP ou IAX.
Consegui que ele verifique se é SIP ou IAX mas tem hora que não funciona.
[macro-dial]
exten => s,1,MixMonitor(${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CONTEXTO}-${CALLERID(num)}-${NUM}.wav49)
exten => s,2,ChanIsAvail(IAX2/${NUM}&SIP/${NUM},s)
exten => s,3,NoOp(AVAIL -> ${AVAILCHAN})
exten => s,4,GotoIf($[${AVAILCHAN} = 0]?5:7)
exten => s,5,Dial(SIP/${NUM},15,tTw)
exten => s,6,Goto(s-${DIALSTATUS},1)
exten => s,7,Dial(IAX2/${NUM},15,tTw)
exten => s,8,Goto(s-${DIALSTATUS},1)
exten => s-CHANUNAVAIL,1,Macro(${GRUPO},s)
exten => s-CONGESTION,1,Macro(${GRUPO},s)
exten => s-BUSY,1,Macro(${GRUPO},s)
exten => s-NOANSWER,1,Macro(${GRUPO},s)
exten => s-CANCEL,1,Macro(${GRUPO},s)
exten => s-HANGUP,1,Macro(${GRUPO},s)
exten => s,20,Hangup
ERRO NR.01
-- Executing [701 em ti:1] Goto("SIP/708-adb25bf0", "union|701|1") in new stack
-- Goto (union,701,1)
-- Executing [701 em union:1] Set("SIP/708-adb25bf0", "NAME=708") in new stack
-- Executing [701 em union:2] Set("SIP/708-adb25bf0", "NUM=701") in new stack
-- Executing [701 em union:3] Set("SIP/708-adb25bf0", "CONTEXTO=union") in new stack
-- Executing [701 em union:4] GotoIf("SIP/708-adb25bf0", "0?5:7") in new stack
-- Goto (union,701,7)
-- Executing [701 em union:7] GotoIf("SIP/708-adb25bf0", "0?8:10") in new stack
-- Goto (union,701,10)
-- Executing [701 em union:10] GotoIf("SIP/708-adb25bf0", "1?11:13") in new stack
-- Goto (union,701,11)
-- Executing [701 em union:11] Set("SIP/708-adb25bf0", "GRUPO=grupoti") in new stack
-- Executing [701 em union:12] Goto("SIP/708-adb25bf0", "s(iax)|1") in new stack
-- Goto (union,s(iax),1)
-- Executing [s(iax)@union:1] Macro("SIP/708-adb25bf0", "sigame|s") in new stack
-- Executing [s em macro-sigame:1] Set("SIP/708-adb25bf0", "TEMP=") in new stack
-- Executing [s em macro-sigame:2] Set("SIP/708-adb25bf0", "NUM1=701") in new stack
-- Executing [s em macro-sigame:3] Set("SIP/708-adb25bf0", "TAM=0") in new stack
-- Executing [s em macro-sigame:4] GotoIf("SIP/708-adb25bf0", "1?nsigame:proximo") in new stack
-- Goto (macro-sigame,s,12)
-- Executing [s em macro-sigame:12] Macro("SIP/708-adb25bf0", "dialiax|701") in new stack
-- Executing [s em macro-dialiax:1] MixMonitor("SIP/708-adb25bf0", "20080529-101859-union-708-701.wav49") in new stack
-- Executing [s em macro-dialiax:2] ChanIsAvail("SIP/708-adb25bf0", "IAX2/701&SIP/701|s") in new stack
-- Executing [s em macro-dialiax:3] NoOp("SIP/708-adb25bf0", "AVAIL -> ") in new stack
[May 29 10:18:59] WARNING[22761]: ast_expr2.fl:398 ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected '=', expecting $end; Input:
= 0
^
[May 29 10:18:59] WARNING[22761]: ast_expr2.fl:402 ast_yyerror: If you have questions, please refer to doc/channelvariables.txt in the asterisk source.
-- Executing [s em macro-dialiax:4] GotoIf("SIP/708-adb25bf0", "?5:7") in new stack
-- Goto (macro-dialiax,s,7)
-- Executing [s em macro-dialiax:7] Dial("SIP/708-adb25bf0", "IAX2/701|15|tTw") in new stack
[May 29 10:18:59] WARNING[22761]: app_dial.c:1106 dial_exec_full: Unable to create channel of type 'IAX2' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [s em macro-dialiax:8] Goto("SIP/708-adb25bf0", "s-CHANUNAVAIL|1") in new stack
-- Goto (macro-dialiax,s-CHANUNAVAIL,1)
-- Executing [s-CHANUNAVAIL em macro-dialiax:1] Macro("SIP/708-adb25bf0", "grupoti|s") in new stack
-- Executing [s em macro-grupoti:1] Dial("SIP/708-adb25bf0", "SIP/700&SIP/701&SIP/702&SIP/703&SIP/704&SIP/705&SIP/706&SIP/707&SIP/708|10|tTw") in new stack
No log apresentado, o ramal 701 estava on, e mesmo assim o erro aconteceu.Isso ocorre ao acaso.
ERRO NR.02
-- Executing [701 em ti:1] Goto("SIP/708-007ce5b0", "union|701|1") in new stack
-- Goto (union,701,1)
-- Executing [701 em union:1] Set("SIP/708-007ce5b0", "NAME=708") in new stack
-- Executing [701 em union:2] Set("SIP/708-007ce5b0", "NUM=701") in new stack
-- Executing [701 em union:3] Set("SIP/708-007ce5b0", "CONTEXTO=union") in new stack
-- Executing [701 em union:4] GotoIf("SIP/708-007ce5b0", "0?5:7") in new stack
-- Goto (union,701,7)
-- Executing [701 em union:7] GotoIf("SIP/708-007ce5b0", "0?8:10") in new stack
-- Goto (union,701,10)
-- Executing [701 em union:10] GotoIf("SIP/708-007ce5b0", "1?11:13") in new stack
-- Goto (union,701,11)
-- Executing [701 em union:11] Set("SIP/708-007ce5b0", "GRUPO=grupoti") in new stack
-- Executing [701 em union:12] Goto("SIP/708-007ce5b0", "s(iax)|1") in new stack
-- Goto (union,s(iax),1)
-- Executing [s(iax)@union:1] Macro("SIP/708-007ce5b0", "sigame|s") in new stack
-- Executing [s em macro-sigame:1] Set("SIP/708-007ce5b0", "TEMP=") in new stack
-- Executing [s em macro-sigame:2] Set("SIP/708-007ce5b0", "NUM1=701") in new stack
-- Executing [s em macro-sigame:3] Set("SIP/708-007ce5b0", "TAM=0") in new stack
-- Executing [s em macro-sigame:4] GotoIf("SIP/708-007ce5b0", "1?nsigame:proximo") in new stack
-- Goto (macro-sigame,s,12)
-- Executing [s em macro-sigame:12] Macro("SIP/708-007ce5b0", "dialiax|701") in new stack
-- Executing [s em macro-dialiax:1] MixMonitor("SIP/708-007ce5b0", "20080529-102319-union-708-701.wav49") in new stack
-- Executing [s em macro-dialiax:2] ChanIsAvail("SIP/708-007ce5b0", "IAX2/701&SIP/701|s") in new stack
== Begin MixMonitor Recording SIP/708-007ce5b0
-- Executing [s em macro-dialiax:3] NoOp("SIP/708-007ce5b0", "AVAIL -> SIP/701-00794300") in new stack
[May 29 10:23:19] WARNING[23147]: ast_expr2.y:893 op_div: non-numeric argument
-- Executing [s em macro-dialiax:4] GotoIf("SIP/708-007ce5b0", "0?5:7") in new stack
-- Goto (macro-dialiax,s,7)
-- Executing [s em macro-dialiax:7] Dial("SIP/708-007ce5b0", "IAX2/701|15|tTw") in new stack
[May 29 10:23:19] WARNING[23147]: app_dial.c:1106 dial_exec_full: Unable to create channel of type 'IAX2' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [s em macro-dialiax:8] Goto("SIP/708-007ce5b0", "s-CHANUNAVAIL|1") in new stack
-- Goto (macro-dialiax,s-CHANUNAVAIL,1)
-- Executing [s-CHANUNAVAIL em macro-dialiax:1] Macro("SIP/708-007ce5b0", "grupoti|s") in new stack
-- Executing [s em macro-grupoti:1] Dial("SIP/708-007ce5b0", "SIP/700&SIP/701&SIP/702&SIP/703&SIP/704&SIP/705&SIP/706&SIP/707&SIP/708|10|tTw") in new stack
Aqui o erro acontece porque o * interpreta o canal como IAX sendo que é SIP.
Quando tudo sai bem (eu acho)
-- Executing [701 em ti:1] Goto("SIP/708-00851ed0", "union|701|1") in new stack
-- Goto (union,701,1)
-- Executing [701 em union:1] Set("SIP/708-00851ed0", "NAME=708") in new stack
-- Executing [701 em union:2] Set("SIP/708-00851ed0", "NUM=701") in new stack
-- Executing [701 em union:3] Set("SIP/708-00851ed0", "CONTEXTO=union") in new stack
-- Executing [701 em union:4] GotoIf("SIP/708-00851ed0", "0?5:7") in new stack
-- Goto (union,701,7)
-- Executing [701 em union:7] GotoIf("SIP/708-00851ed0", "0?8:10") in new stack
-- Goto (union,701,10)
-- Executing [701 em union:10] GotoIf("SIP/708-00851ed0", "1?11:13") in new stack
-- Goto (union,701,11)
-- Executing [701 em union:11] Set("SIP/708-00851ed0", "GRUPO=grupoti") in new stack
-- Executing [701 em union:12] Goto("SIP/708-00851ed0", "s(iax)|1") in new stack
-- Goto (union,s(iax),1)
-- Executing [s(iax)@union:1] Macro("SIP/708-00851ed0", "sigame|s") in new stack
-- Executing [s em macro-sigame:1] Set("SIP/708-00851ed0", "TEMP=") in new stack
-- Executing [s em macro-sigame:2] Set("SIP/708-00851ed0", "NUM1=701") in new stack
-- Executing [s em macro-sigame:3] Set("SIP/708-00851ed0", "TAM=0") in new stack
-- Executing [s em macro-sigame:4] GotoIf("SIP/708-00851ed0", "1?nsigame:proximo") in new stack
-- Goto (macro-sigame,s,12)
-- Executing [s em macro-sigame:12] Macro("SIP/708-00851ed0", "dialiax|701") in new stack
-- Executing [s em macro-dialiax:1] MixMonitor("SIP/708-00851ed0", "20080529-102537-union-708-701.wav49") in new stack
-- Executing [s em macro-dialiax:2] ChanIsAvail("SIP/708-00851ed0", "IAX2/701&SIP/701|s") in new stack
== Begin MixMonitor Recording SIP/708-00851ed0
-- Executing [s em macro-dialiax:3] NoOp("SIP/708-00851ed0", "AVAIL -> SIP/701-007000b0") in new stack
[May 29 10:25:37] WARNING[23360]: ast_expr2.y:893 op_div: non-numeric argument
[May 29 10:25:37] WARNING[23360]: ast_expr2.y:755 op_minus: non-numeric argument
-- Executing [s em macro-dialiax:4] GotoIf("SIP/708-00851ed0", "1?5:7") in new stack
-- Goto (macro-dialiax,s,5)
-- Executing [s em macro-dialiax:5] Dial("SIP/708-00851ed0", "SIP/701|15|tTw") in new stack
-- Called 701
Aqui é quando a operação é um sucesso, porém tem dois WARNING que não sei como resolve-lo.
Pereira, Sidnei
Tecnologia da Informação / Telecom
UNION Crédito Fácil e Serviços Ltda - C Certeza de Sucesso
O(17) 8124 3954 - ((17) 4009 6767 - * telecom em union.com.br
------------------------------------------------------------------------------
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20080529/026b4d1e/attachment-0001.htm
-------------- Próxima Parte ----------
Um anexo não texto foi limpo...
Nome : não disponível
Tipo : image/jpeg
Tam : 12495 bytes
Descr.: não disponível
Url : http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20080529/026b4d1e/attachment-0001.jpeg
More information about the AsteriskBrasil
mailing list