<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Olá Sidnei, <br>
<br>
Altere a extensão 4 da Macro-Dial, conforme abaixo:<br>
<br>
GotoIf($["${AVAILCHAN}" = "0"]?5:7)<br>
<br>
<br>
Telecom - UNION escreveu:
<blockquote cite="mid007a01c8c1ab$00cc8170$0502a8c0@UCFTI05" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.5730.13" name="GENERATOR">
<style></style>
<div><font face="Arial">
<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> </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> </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>
</font></div>
</blockquote>
<blockquote cite="mid007a01c8c1ab$00cc8170$0502a8c0@UCFTI05" type="cite">
<div><font face="Arial">
<div><font face="Arial">exten => s,5,Dial(SIP/${NUM},15,tTw)<br>
exten => s,6,Goto(s-${DIALSTATUS},1)</font></div>
<div> </div>
<div><font face="Arial">exten => s,7,Dial(IAX2/${NUM},15,tTw)<br>
exten => s,8,Goto(s-${DIALSTATUS},1)</font></div>
<div> </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> </div>
<div> </div>
<div><font face="Arial">ERRO NR.01</font></div>
<div> </div>
<div> </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> </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> </div>
<div><font face="Arial">ERRO NR.02</font></div>
<div> </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> </div>
<div><font face="Arial">Quando tudo sai bem (eu acho)</font></div>
<div> </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.</font></div>
</font></div>
<div><font face="Arial" size="-3">
<table>
<tbody>
<tr>
<td><img src="cid:part1.06080203.05020908@gmail.com"
align="middle"> </td>
<td><font face="Arial" size="-1"><big><b>Pereira, Sidnei</b></big><br>
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>
<hr align="Bottom" size="2" width="100%">
</tbody>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Compre uma camiseta da AsteriskBrasil.org!
<a class="moz-txt-link-freetext" href="http://www.voipmania.com.br">http://www.voipmania.com.br</a>
== VoIPMania.com.br ==
_______________________________________________
Lista de discussões AsteriskBrasil.org
<a class="moz-txt-link-abbreviated" href="mailto:AsteriskBrasil@listas.asteriskbrasil.org">AsteriskBrasil@listas.asteriskbrasil.org</a>
<a class="moz-txt-link-freetext" href="http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil">http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil</a></pre>
</table>
</font></div>
</blockquote>
<br>
</body>
</html>