<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.13" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial>Bom dia lista.</FONT></DIV>
<DIV><FONT face=Arial>Sera que alguém poderia me ajudar com o extensions
abaixo.</FONT></DIV>
<DIV><FONT face=Arial>Preciso que o *, antes de direcionar a ligação para o
ramal, verifique se o mesmo esta disponivel e se é SIP ou IAX.</FONT></DIV>
<DIV><FONT face=Arial>Consegui que ele verifique se é SIP ou IAX mas tem hora
que não funciona.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>[macro-dial]<BR>exten =>
s,1,MixMonitor(${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CONTEXTO}-${CALLERID(num)}-${NUM}.wav49)</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>exten =>
s,2,ChanIsAvail(IAX2/${NUM}&SIP/${NUM},s)<BR>exten => s,3,NoOp(AVAIL
-> ${AVAILCHAN})<BR>exten => s,4,GotoIf($[${AVAILCHAN} =
0]?5:7)</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>exten => s,5,Dial(SIP/${NUM},15,tTw)<BR>exten =>
s,6,Goto(s-${DIALSTATUS},1)</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>exten => s,7,Dial(IAX2/${NUM},15,tTw)<BR>exten =>
s,8,Goto(s-${DIALSTATUS},1)</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>exten => s-CHANUNAVAIL,1,Macro(${GRUPO},s)<BR>exten
=> s-CONGESTION,1,Macro(${GRUPO},s)<BR>exten =>
s-BUSY,1,Macro(${GRUPO},s)<BR>exten =>
s-NOANSWER,1,Macro(${GRUPO},s)<BR>exten =>
s-CANCEL,1,Macro(${GRUPO},s)<BR>exten =>
s-HANGUP,1,Macro(${GRUPO},s)<BR>exten => s,20,Hangup<BR></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>ERRO NR.01</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial> -- Executing [701@ti:1]
Goto("SIP/708-adb25bf0", "union|701|1") in new stack<BR> --
Goto (union,701,1)<BR> -- Executing [701@union:1]
Set("SIP/708-adb25bf0", "NAME=708") in new stack<BR> --
Executing [701@union:2] Set("SIP/708-adb25bf0", "NUM=701") in new
stack<BR> -- Executing [701@union:3] Set("SIP/708-adb25bf0",
"CONTEXTO=union") in new stack<BR> -- Executing [701@union:4]
GotoIf("SIP/708-adb25bf0", "0?5:7") in new stack<BR> -- Goto
(union,701,7)<BR> -- Executing [701@union:7]
GotoIf("SIP/708-adb25bf0", "0?8:10") in new stack<BR> -- Goto
(union,701,10)<BR> -- Executing [701@union:10]
GotoIf("SIP/708-adb25bf0", "1?11:13") in new stack<BR> -- Goto
(union,701,11)<BR> -- Executing [701@union:11]
Set("SIP/708-adb25bf0", "GRUPO=grupoti") in new stack<BR> --
Executing [701@union:12] Goto("SIP/708-adb25bf0", "s(iax)|1") in new
stack<BR> -- Goto (union,s(iax),1)<BR> --
Executing [s(iax)@union:1] Macro("SIP/708-adb25bf0", "sigame|s") in new
stack<BR> -- Executing [s@macro-sigame:1]
Set("SIP/708-adb25bf0", "TEMP=") in new stack<BR> -- Executing
[s@macro-sigame:2] Set("SIP/708-adb25bf0", "NUM1=701") in new
stack<BR> -- Executing [s@macro-sigame:3]
Set("SIP/708-adb25bf0", "TAM=0") in new stack<BR> -- Executing
[s@macro-sigame:4] GotoIf("SIP/708-adb25bf0", "1?nsigame:proximo") in new
stack<BR> -- Goto (macro-sigame,s,12)<BR> --
Executing [s@macro-sigame:12] Macro("SIP/708-adb25bf0", "dialiax|701") in new
stack<BR> -- Executing [s@macro-dialiax:1]
MixMonitor("SIP/708-adb25bf0", "20080529-101859-union-708-701.wav49") in new
stack<BR> -- Executing [s@macro-dialiax:2]
ChanIsAvail("SIP/708-adb25bf0", "IAX2/701&SIP/701|s") in new
stack<BR> <FONT color=#0000ff> -- Executing [s@macro-dialiax:3]
NoOp("SIP/708-adb25bf0", "AVAIL -> ") in new stack<BR></FONT><STRONG>[May 29
10:18:59] WARNING[22761]: ast_expr2.fl:398 ast_yyerror: ast_yyerror():
syntax error: syntax error, unexpected '=', expecting $end; Input:<BR> =
0<BR> ^<BR>[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.<BR></STRONG> -- Executing [s@macro-dialiax:4]
GotoIf("SIP/708-adb25bf0", "?5:7") in new stack<BR> -- Goto
(macro-dialiax,s,7)<BR> -- Executing [s@macro-dialiax:7]
Dial("SIP/708-adb25bf0", "IAX2/701|15|tTw") in new stack<BR>[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)<BR> == Everyone is
busy/congested at this time (1:0/0/1)<BR> -- Executing
[s@macro-dialiax:8] Goto("SIP/708-adb25bf0", "s-CHANUNAVAIL|1") in new
stack<BR> -- Goto
(macro-dialiax,s-CHANUNAVAIL,1)<BR> -- Executing
[s-CHANUNAVAIL@macro-dialiax:1] Macro("SIP/708-adb25bf0", "grupoti|s") in new
stack<BR> -- Executing [s@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</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>No log apresentado, o ramal 701 estava on, e mesmo assim o
erro aconteceu.Isso ocorre ao acaso.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>ERRO NR.02</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial> -- Executing [701@ti:1] Goto("SIP/708-007ce5b0",
"union|701|1") in new stack<BR> -- Goto
(union,701,1)<BR> -- Executing [701@union:1]
Set("SIP/708-007ce5b0", "NAME=708") in new stack<BR> --
Executing [701@union:2] Set("SIP/708-007ce5b0", "NUM=701") in new
stack<BR> -- Executing [701@union:3] Set("SIP/708-007ce5b0",
"CONTEXTO=union") in new stack<BR> -- Executing [701@union:4]
GotoIf("SIP/708-007ce5b0", "0?5:7") in new stack<BR> -- Goto
(union,701,7)<BR> -- Executing [701@union:7]
GotoIf("SIP/708-007ce5b0", "0?8:10") in new stack<BR> -- Goto
(union,701,10)<BR> -- Executing [701@union:10]
GotoIf("SIP/708-007ce5b0", "1?11:13") in new stack<BR> -- Goto
(union,701,11)<BR> -- Executing [701@union:11]
Set("SIP/708-007ce5b0", "GRUPO=grupoti") in new stack<BR> --
Executing [701@union:12] Goto("SIP/708-007ce5b0", "s(iax)|1") in new
stack<BR> -- Goto (union,s(iax),1)<BR> --
Executing [s(iax)@union:1] Macro("SIP/708-007ce5b0", "sigame|s") in new
stack<BR> -- Executing [s@macro-sigame:1]
Set("SIP/708-007ce5b0", "TEMP=") in new stack<BR> -- Executing
[s@macro-sigame:2] Set("SIP/708-007ce5b0", "NUM1=701") in new
stack<BR> -- Executing [s@macro-sigame:3]
Set("SIP/708-007ce5b0", "TAM=0") in new stack<BR> -- Executing
[s@macro-sigame:4] GotoIf("SIP/708-007ce5b0", "1?nsigame:proximo") in new
stack<BR> -- Goto (macro-sigame,s,12)<BR> --
Executing [s@macro-sigame:12] Macro("SIP/708-007ce5b0", "dialiax|701") in new
stack<BR> -- Executing [s@macro-dialiax:1]
MixMonitor("SIP/708-007ce5b0", "20080529-102319-union-708-701.wav49") in new
stack<BR> -- Executing [s@macro-dialiax:2]
ChanIsAvail("SIP/708-007ce5b0", "IAX2/701&SIP/701|s") in new stack<BR>
== Begin MixMonitor Recording SIP/708-007ce5b0<BR> --
Executing [s@macro-dialiax:3] NoOp("SIP/708-007ce5b0", "AVAIL ->
SIP/701-00794300") in new stack<BR>[May 29 10:23:19] WARNING[23147]:
ast_expr2.y:893 op_div: non-numeric argument<BR> <STRONG> --
Executing [s@macro-dialiax:4] GotoIf("SIP/708-007ce5b0", "0?5:7") in new
stack</STRONG><BR> -- Goto
(macro-dialiax,s,7)<BR> -- Executing [s@macro-dialiax:7]
Dial("SIP/708-007ce5b0", "<FONT color=#0000ff>IAX2/701|15|tTw</FONT>") in new
stack<BR>[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)<BR> == Everyone is busy/congested at this time
(1:0/0/1)<BR> -- Executing [s@macro-dialiax:8]
Goto("SIP/708-007ce5b0", "s-CHANUNAVAIL|1") in new stack<BR>
-- Goto (macro-dialiax,s-CHANUNAVAIL,1)<BR> -- Executing
[s-CHANUNAVAIL@macro-dialiax:1] Macro("SIP/708-007ce5b0", "grupoti|s") in new
stack<BR> -- Executing [s@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<BR></FONT></DIV>
<DIV><FONT face=Arial> Aqui o erro acontece porque o * interpreta o canal
como IAX sendo que é SIP.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Quando tudo sai bem (eu acho)</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial> -- Executing [701@ti:1]
Goto("SIP/708-00851ed0", "union|701|1") in new stack<BR> --
Goto (union,701,1)<BR> -- Executing [701@union:1]
Set("SIP/708-00851ed0", "NAME=708") in new stack<BR> --
Executing [701@union:2] Set("SIP/708-00851ed0", "NUM=701") in new
stack<BR> -- Executing [701@union:3] Set("SIP/708-00851ed0",
"CONTEXTO=union") in new stack<BR> -- Executing [701@union:4]
GotoIf("SIP/708-00851ed0", "0?5:7") in new stack<BR> -- Goto
(union,701,7)<BR> -- Executing [701@union:7]
GotoIf("SIP/708-00851ed0", "0?8:10") in new stack<BR> -- Goto
(union,701,10)<BR> -- Executing [701@union:10]
GotoIf("SIP/708-00851ed0", "1?11:13") in new stack<BR> -- Goto
(union,701,11)<BR> -- Executing [701@union:11]
Set("SIP/708-00851ed0", "GRUPO=grupoti") in new stack<BR> --
Executing [701@union:12] Goto("SIP/708-00851ed0", "s(iax)|1") in new
stack<BR> -- Goto (union,s(iax),1)<BR> --
Executing [s(iax)@union:1] Macro("SIP/708-00851ed0", "sigame|s") in new
stack<BR> -- Executing [s@macro-sigame:1]
Set("SIP/708-00851ed0", "TEMP=") in new stack<BR> -- Executing
[s@macro-sigame:2] Set("SIP/708-00851ed0", "NUM1=701") in new
stack<BR> -- Executing [s@macro-sigame:3]
Set("SIP/708-00851ed0", "TAM=0") in new stack<BR> -- Executing
[s@macro-sigame:4] GotoIf("SIP/708-00851ed0", "1?nsigame:proximo") in new
stack<BR> -- Goto (macro-sigame,s,12)<BR> --
Executing [s@macro-sigame:12] Macro("SIP/708-00851ed0", "dialiax|701") in new
stack<BR> -- Executing [s@macro-dialiax:1]
MixMonitor("SIP/708-00851ed0", "20080529-102537-union-708-701.wav49") in new
stack<BR> -- Executing [s@macro-dialiax:2]
ChanIsAvail("SIP/708-00851ed0", "IAX2/701&SIP/701|s") in new stack<BR>
== Begin MixMonitor Recording SIP/708-00851ed0<BR> --
Executing [s@macro-dialiax:3] NoOp("SIP/708-00851ed0", "AVAIL ->
SIP/701-007000b0") in new stack<BR><STRONG>[May 29 10:25:37] WARNING[23360]:
ast_expr2.y:893 op_div: non-numeric argument<BR>[May 29 10:25:37]
WARNING[23360]: ast_expr2.y:755 op_minus: non-numeric
argument<BR></STRONG> -- Executing [s@macro-dialiax:4]
GotoIf("SIP/708-00851ed0", "1?5:7") in new stack<BR> -- Goto
(macro-dialiax,s,5)<BR> -- Executing [s@macro-dialiax:5]
Dial("SIP/708-00851ed0", "SIP/701|15|tTw") in new stack<BR> --
Called 701<BR></FONT></DIV>
<DIV><FONT face=Arial>Aqui é quando a operação é um sucesso, porém tem dois
WARNING que não sei como resolve-lo.</DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=Arial size=-3>
<TABLE>
<TBODY>
<TR>
<TD><IMG src="cid:001401c8c191$02ad0010$0502a8c0@UCFTI05" align=middle>
</TD>
<TD><FONT face=Arial size=-1><BIG><B>Pereira,
Sidnei</B></BIG><BR></FORM>Tecnologia da Informação / Telecom<BR><B>UNION
Crédito Fácil e Serviços Ltda</B> - <FONT face=Wingdings size=3>C</FONT>
Certeza de Sucesso <BR><FONT face=Webdings size=3>O</FONT>(17) 8124 3954 -
<FONT face=Wingdings size=3>(</FONT>(17) 4009 6767 - <FONT face=Wingdings
size=3>*</FONT> <A
href="mailto:telecom@union.com.br">telecom@union.com.br</A>
</FONT></TD></TR></FONT>
<HR align=Bottom width="100%" SIZE=2>
</TBODY></DIV></BODY></HTML>