acessa a console do asterisk e post o que está aparecendo na tela.<br>Manager API, infelizmente, não é referencia para debug.<br>abs, Thiago><br><br><div><span class="gmail_quote">Em 01/08/07, <b class="gmail_sendername">
Rodrigo Pimenta Carvalho</b> <<a href="mailto:pimenta@inatel.br">pimenta@inatel.br</a>> escreveu:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="PT-BR">
<div>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Boa tarde lista,</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Eu tenho um asterisk corretamente configurado e executando. Pelo
menos eu acho que está configurado corretamente. Para comprovar isso, decidi
fazer um teste muito simples e detectei que algo está errado ainda. Ou eu não
estou sabendo usar corretamente algumas ações do asterisk. Por exemplo: no meu
arquivo sip.conf há 2 ramais configurados (329 e 200). Numa dada máquina, há
uma instância do X-Lite, em execução, representando o ramal 329. Daí, eu fiz
uma ligação para o ramal 329 e quando ele é atendido, o X-Lite mostra "hungup"
e a ligação cai. Preciso saber porque isso ocorre. Vejam abaixo mais detalhes
de como executo esse teste:</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Da minha máquina, eu acesso a Manager API do asterisk, via
telnet, na porta 5038. Consigo acessar esse gerenciado via telnet e em seguinda
executar a seguinte ação:</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Action: Originate</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Channel: SIP/329</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Context: default</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Exten: 200</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Priority: 1</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Em seguinda, o asterisk
retorna sucesso, como visto abaixo:</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Response: Success</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Message:
Originate successfully queued</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Daí o ramal 329 toca, mas o
meu X-Lite(200) fica mudo. Não dá sinal de chamando.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">E quando o ramal 329 é
atendido, via X-Lite, ocorre um Hangup, como descrito abaixo. O que pode estar
errado no meu caso?</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Eu gostaria que uma conexão
fosse estavelecida entre ramal 200 e 329. O que eu devo então fazer para
consegui isso?</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Eu já conferi minhas
configurações no asterisk e já tentei imitar um exemplo disso visto nessa própria
lista, mas não funcionou no meu caso.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Qualquer dica será de grande
ajuda. Muito obrigado.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Rodrigo Pimenta Carvalho.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Event: Newchannel</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Privilege:
call,all</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Channel:
SIP/329-09a19810</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">State: Down</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CallerID:
<unknown></span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CallerIDName:
<unknown></span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Uniqueid:
1185995754.36</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Event:
Newcallerid</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Privilege:
call,all</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Channel: SIP/329-09a19810</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CallerID:
<Unknown></span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CallerIDName:
<Unknown></span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Uniqueid:
1185995754.36</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CID-CallingPres:
0 (Presentation Allowed, Not Screened)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Event: Newstate</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Privilege:
call,all</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Channel:
SIP/329-09a19810</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">State: Ringing</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CallerID:
<unknown></span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CallerIDName:
<unknown></span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Uniqueid:
1185995754.36</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Event: Newstate</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Privilege:
call,all</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Channel:
SIP/329-09a19810</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">State: Up</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CallerID:
<unknown></span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">CallerIDName:
<unknown></span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Uniqueid:
1185995754.36</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Event: Hangup</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">Privilege:
call,all</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Channel: SIP/329-09a19810</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Uniqueid: 1185995754.36</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">Cause: 16</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt;">Cause-txt: Normal Clearing</span></font></p>
<div style="border-style: none none double; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 2.25pt; padding: 0cm 0cm 1pt;">
<p style="border: medium none ; padding: 0cm;"><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
</div>
<p><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt;">Meu dialplan atual é (caso seja necessário ver):</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; FreePBX</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Copyright (C)
2004 Coalescent Systems Inc (Canada)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Copyright (C)
2006 Why Pay More 4 Less Pty Ltd (Australia)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Released under
the GNU GPL Licence version 2.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="FR">; dialparties.agi
(<a href="http://www.sprackett.com/asterisk/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.sprackett.com/asterisk/</a>)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Asterisk::AGI
(<a href="http://asterisk.gnuinter.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://asterisk.gnuinter.net/</a>)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; gsm
(<a href="http://www.ibiblio.org/pub/Linux/utils/compress/%21INDEX.short.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX.short.html</a>)
</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; loligo sounds
(<a href="http://www.loligo.com/asterisk/sounds/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.loligo.com/asterisk/sounds/</a>)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; mpg123
(<a href="http://voip-info.org/wiki-Asterisk+config+musiconhold.conf" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://voip-info.org/wiki-Asterisk+config+musiconhold.conf</a>)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; include
extension contexts generated from AMP</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">#include
extensions_additional.conf</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Customizations
to this dialplan should be made in extensions_custom.conf</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; See
extensions_custom.conf.sample for an example</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">#include
extensions_custom.conf</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">[from-trunk] ;
just an alias since VoIP shouldn't be called PSTN</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">include =>
from-pstn</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">[from-pstn]</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">include =>
from-pstn-custom ; create this context in
extensions_custom.conf to include customizations</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">include =>
ext-did-direct ; MODIFICATOIN (PL) put before ext-did to take
precedence</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">include => ext-did</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">include =>
from-did-direct ; MODIFICATOIN (PL) for findmefollow if enabled, should
be bofore ext-local</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">exten =>
fax,1,Goto(ext-fax,in_fax,1)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; MODIFICATION
(PL) </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">;</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Required to
assure that direct dids go to personal ring group before local extension.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; This could be
auto-generated however I it is prefered to be put here and hard coded</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; so that it can
be modified if ext-local should take precedence in certain situations.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; will have to
decide what to do later.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">;</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">[from-did-direct]</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">include =>
ext-findmefollow</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">include => ext-local</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">;
############################################################################</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Macros [macro]</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">;
############################################################################</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Rings one or
more extensions. Handles things like call forwarding and DND</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; We don't call
dial directly for anything internal anymore.</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; ARGS: $TIMER,
$OPTIONS, $EXT1, $EXT2, $EXT3, ...</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">; Use a Macro
call such as the following: </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">;
Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,...)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">[default]</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">exten=>s,1,Answer()</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">;exten=>s,2,Background(Mensagem_inicial)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">;exten=>s,N,System(echo
"Chamando Java AGI")</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">;exten=>1400,1,Answer()</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">exten=>1400,1,Agi(agi://localhost/teste.agi)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;">exten=>1400,2,System(echo
" HMMM Passou pelos testes do 1400! </span></font><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">MMMH
")</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">;exten=>1400,3,Hangup()</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">exten=>300,1,Playback(beep)</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US"> </span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">;exten=>329,1,Answer()</span></font></p>
<p style=""><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-US">exten=>123,1,Playback('welcome')</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt;">exten=>123,2,Agi(agi://localhost/rodrigo.agi)</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
</div>
</div>
<br>_______________________________________________<br>Compre uma camiseta da AsteriskBrasil.org!<br> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.voipmania.com.br" target="_blank">
http://www.voipmania.com.br</a><br> == <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://VoIPMania.com.br" target="_blank">VoIPMania.com.br</a> ==<br><br>_______________________________________________
<br>LIsta de discussões AsteriskBrasil.org<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:AsteriskBrasil@listas.asteriskbrasil.org">AsteriskBrasil@listas.asteriskbrasil.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil" target="_blank">
http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil</a><br></blockquote></div><br><br clear="all"><br>-- <br>----------------------------------------------------------------<br>THIAGO MALUF RESENDE<br>Consultor Voip e Programador WEB (Voip Developer and Web Developer)
<br>Tel: +55 21 86042100<br>e-mail: <a href="mailto:malufrj@gmail.com">malufrj@gmail.com</a>