<!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></FONT>&nbsp;</DIV>
<DIV style="FONT: 10pt arial">
<DIV><BR>&nbsp;</DIV></DIV>
<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,&nbsp;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>&nbsp;</DIV>
<DIV><FONT face=Arial>[macro-dial]<BR>exten =&gt; 
s,1,MixMonitor(${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CONTEXTO}-${CALLERID(num)}-${NUM}.wav49)</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>exten =&gt; 
s,2,ChanIsAvail(IAX2/${NUM}&amp;SIP/${NUM},s)<BR>exten =&gt; s,3,NoOp(AVAIL 
-&gt; ${AVAILCHAN})<BR>exten =&gt; s,4,GotoIf($[${AVAILCHAN} = 
0]?5:7)</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>exten =&gt; s,5,Dial(SIP/${NUM},15,tTw)<BR>exten =&gt; 
s,6,Goto(s-${DIALSTATUS},1)</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>exten =&gt; s,7,Dial(IAX2/${NUM},15,tTw)<BR>exten =&gt; 
s,8,Goto(s-${DIALSTATUS},1)</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>exten =&gt; s-CHANUNAVAIL,1,Macro(${GRUPO},s)<BR>exten 
=&gt; s-CONGESTION,1,Macro(${GRUPO},s)<BR>exten =&gt; 
s-BUSY,1,Macro(${GRUPO},s)<BR>exten =&gt; 
s-NOANSWER,1,Macro(${GRUPO},s)<BR>exten =&gt; 
s-CANCEL,1,Macro(${GRUPO},s)<BR>exten =&gt; 
s-HANGUP,1,Macro(${GRUPO},s)<BR>exten =&gt; s,20,Hangup<BR></FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>ERRO NR.01</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>&nbsp; &nbsp; -- Executing [701@ti:1] 
Goto("SIP/708-adb25bf0", "union|701|1") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
Goto (union,701,1)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:1] 
Set("SIP/708-adb25bf0", "NAME=708") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [701@union:2] Set("SIP/708-adb25bf0", "NUM=701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:3] Set("SIP/708-adb25bf0", 
"CONTEXTO=union") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:4] 
GotoIf("SIP/708-adb25bf0", "0?5:7") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,7)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:7] 
GotoIf("SIP/708-adb25bf0", "0?8:10") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,10)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:10] 
GotoIf("SIP/708-adb25bf0", "1?11:13") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,11)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:11] 
Set("SIP/708-adb25bf0", "GRUPO=grupoti") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [701@union:12] Goto("SIP/708-adb25bf0", "s(iax)|1") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Goto (union,s(iax),1)<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [s(iax)@union:1] Macro("SIP/708-adb25bf0", "sigame|s") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-sigame:1] 
Set("SIP/708-adb25bf0", "TEMP=") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s@macro-sigame:2] Set("SIP/708-adb25bf0", "NUM1=701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-sigame:3] 
Set("SIP/708-adb25bf0", "TAM=0") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s@macro-sigame:4] GotoIf("SIP/708-adb25bf0", "1?nsigame:proximo") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Goto (macro-sigame,s,12)<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [s@macro-sigame:12] Macro("SIP/708-adb25bf0", "dialiax|701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:1] 
MixMonitor("SIP/708-adb25bf0", "20080529-101859-union-708-701.wav49") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:2] 
ChanIsAvail("SIP/708-adb25bf0", "IAX2/701&amp;SIP/701|s") in new 
stack<BR>&nbsp;&nbsp;<FONT color=#0000ff>&nbsp; -- Executing [s@macro-dialiax:3] 
NoOp("SIP/708-adb25bf0", "AVAIL -&gt; ") in new stack<BR></FONT><STRONG>[May 29 
10:18:59] WARNING[22761]: ast_expr2.fl:398 ast_yyerror: ast_yyerror():&nbsp; 
syntax error: syntax error, unexpected '=', expecting $end; Input:<BR>&nbsp;= 
0<BR>&nbsp;^<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>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:4] 
GotoIf("SIP/708-adb25bf0", "?5:7") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(macro-dialiax,s,7)<BR>&nbsp;&nbsp;&nbsp; -- 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>&nbsp; == Everyone is 
busy/congested at this time (1:0/0/1)<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s@macro-dialiax:8] Goto("SIP/708-adb25bf0", "s-CHANUNAVAIL|1") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(macro-dialiax,s-CHANUNAVAIL,1)<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s-CHANUNAVAIL@macro-dialiax:1] Macro("SIP/708-adb25bf0", "grupoti|s") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-grupoti:1] 
Dial("SIP/708-adb25bf0", 
"SIP/700&amp;SIP/701&amp;SIP/702&amp;SIP/703&amp;SIP/704&amp;SIP/705&amp;SIP/706&amp;SIP/707&amp;SIP/708|10|tTw") 
in new stack</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial>ERRO NR.02</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>&nbsp;-- Executing [701@ti:1] Goto("SIP/708-007ce5b0", 
"union|701|1") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,1)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:1] 
Set("SIP/708-007ce5b0", "NAME=708") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [701@union:2] Set("SIP/708-007ce5b0", "NUM=701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:3] Set("SIP/708-007ce5b0", 
"CONTEXTO=union") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:4] 
GotoIf("SIP/708-007ce5b0", "0?5:7") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,7)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:7] 
GotoIf("SIP/708-007ce5b0", "0?8:10") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,10)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:10] 
GotoIf("SIP/708-007ce5b0", "1?11:13") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,11)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:11] 
Set("SIP/708-007ce5b0", "GRUPO=grupoti") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [701@union:12] Goto("SIP/708-007ce5b0", "s(iax)|1") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Goto (union,s(iax),1)<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [s(iax)@union:1] Macro("SIP/708-007ce5b0", "sigame|s") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-sigame:1] 
Set("SIP/708-007ce5b0", "TEMP=") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s@macro-sigame:2] Set("SIP/708-007ce5b0", "NUM1=701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-sigame:3] 
Set("SIP/708-007ce5b0", "TAM=0") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s@macro-sigame:4] GotoIf("SIP/708-007ce5b0", "1?nsigame:proximo") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Goto (macro-sigame,s,12)<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [s@macro-sigame:12] Macro("SIP/708-007ce5b0", "dialiax|701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:1] 
MixMonitor("SIP/708-007ce5b0", "20080529-102319-union-708-701.wav49") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:2] 
ChanIsAvail("SIP/708-007ce5b0", "IAX2/701&amp;SIP/701|s") in new stack<BR>&nbsp; 
== Begin MixMonitor Recording SIP/708-007ce5b0<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [s@macro-dialiax:3] NoOp("SIP/708-007ce5b0", "AVAIL -&gt; 
SIP/701-00794300") in new stack<BR>[May 29 10:23:19] WARNING[23147]: 
ast_expr2.y:893 op_div: non-numeric argument<BR>&nbsp;&nbsp;&nbsp;<STRONG> -- 
Executing [s@macro-dialiax:4] GotoIf("SIP/708-007ce5b0", "0?5:7") in new 
stack</STRONG><BR>&nbsp;&nbsp;&nbsp; -- Goto 
(macro-dialiax,s,7)<BR>&nbsp;&nbsp;&nbsp; -- 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>&nbsp; == Everyone is busy/congested at this time 
(1:0/0/1)<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:8] 
Goto("SIP/708-007ce5b0", "s-CHANUNAVAIL|1") in new stack<BR>&nbsp;&nbsp;&nbsp; 
-- Goto (macro-dialiax,s-CHANUNAVAIL,1)<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s-CHANUNAVAIL@macro-dialiax:1] Macro("SIP/708-007ce5b0", "grupoti|s") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-grupoti:1] 
Dial("SIP/708-007ce5b0", 
"SIP/700&amp;SIP/701&amp;SIP/702&amp;SIP/703&amp;SIP/704&amp;SIP/705&amp;SIP/706&amp;SIP/707&amp;SIP/708|10|tTw") 
in new stack<BR></FONT></DIV>
<DIV><FONT face=Arial>&nbsp;Aqui o erro acontece porque o * interpreta o canal 
como IAX sendo que é SIP.</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>Quando tudo sai bem (eu acho)</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>&nbsp;&nbsp;&nbsp; -- Executing [701@ti:1] 
Goto("SIP/708-00851ed0", "union|701|1") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
Goto (union,701,1)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:1] 
Set("SIP/708-00851ed0", "NAME=708") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [701@union:2] Set("SIP/708-00851ed0", "NUM=701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:3] Set("SIP/708-00851ed0", 
"CONTEXTO=union") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:4] 
GotoIf("SIP/708-00851ed0", "0?5:7") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,7)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:7] 
GotoIf("SIP/708-00851ed0", "0?8:10") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,10)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:10] 
GotoIf("SIP/708-00851ed0", "1?11:13") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(union,701,11)<BR>&nbsp;&nbsp;&nbsp; -- Executing [701@union:11] 
Set("SIP/708-00851ed0", "GRUPO=grupoti") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [701@union:12] Goto("SIP/708-00851ed0", "s(iax)|1") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Goto (union,s(iax),1)<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [s(iax)@union:1] Macro("SIP/708-00851ed0", "sigame|s") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-sigame:1] 
Set("SIP/708-00851ed0", "TEMP=") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s@macro-sigame:2] Set("SIP/708-00851ed0", "NUM1=701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-sigame:3] 
Set("SIP/708-00851ed0", "TAM=0") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing 
[s@macro-sigame:4] GotoIf("SIP/708-00851ed0", "1?nsigame:proximo") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Goto (macro-sigame,s,12)<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [s@macro-sigame:12] Macro("SIP/708-00851ed0", "dialiax|701") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:1] 
MixMonitor("SIP/708-00851ed0", "20080529-102537-union-708-701.wav49") in new 
stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:2] 
ChanIsAvail("SIP/708-00851ed0", "IAX2/701&amp;SIP/701|s") in new stack<BR>&nbsp; 
== Begin MixMonitor Recording SIP/708-00851ed0<BR>&nbsp;&nbsp;&nbsp; -- 
Executing [s@macro-dialiax:3] NoOp("SIP/708-00851ed0", "AVAIL -&gt; 
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>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:4] 
GotoIf("SIP/708-00851ed0", "1?5:7") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Goto 
(macro-dialiax,s,5)<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-dialiax:5] 
Dial("SIP/708-00851ed0", "SIP/701|15|tTw") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
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:003601c8c19c$d9010200$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></DIV></DIV></BODY></HTML>