<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">If you are ok with starting debug via external system call, why not to use something like this (I used to use something similar, it worked):<div class=""><br class=""></div><div class="">exten =><b class=""><i class=""> _XXX</i></b>,1,System(/usr/sbin/asterisk -rx ‘sip set debug peer <i class="">PEER</i>’)<br class="">same => n,Set(debug_on=1)<br class="">same => n,Dial(SIP/<i class="">PEER</i>/${EXTEN})<br class=""><br class="">exten => <b class=""><i class="">h</i></b>,1,GotoIf($[${debug_on} == 1]?undebug)<br class="">same => n,Hangup<br class="">same => n(undebug),System(( sleep 3 \; /usr/sbin/asterisk -rx 'sip set debug off' ) &)<br class="">same => n,Set(debug_on=0)<br class="">same => n,Hangup<br class=""><br class="">I don’t know your setup, your dialplan logic, but I’m sure you can adapt it to your needs.</div><div class=""><br class=""></div><div class="">I.<br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 18 Feb 2017, at 00:26, Rafael dos Santos Saraiva <<a href="mailto:rafaelsnsa@gmail.com" class="">rafaelsnsa@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi<div class=""><br class=""></div><div class="">I don't know if works, but you can try this:</div><div class=""><br class=""></div><div class=""><div class=""> System(tcpdump -nq -s 0 -i eth0 -w /tmp/sip.pcap port 5060 or udp portrange 10000-20000 &);</div><div class=""> Wait(1);</div><div class=""> Dial(SIP/${EXTEN});</div><div class=""> System(pkill tcpdump);</div><div class=""> Hangup;</div></div><div class=""><br class=""></div><div class="">Or whitout RTP:</div><div class=""><br class=""></div><div class=""><div class=""> System(tcpdump -nq -s 0 -i eth0 -w /tmp/sip.pcap port 5060 &);</div><div class=""> Wait(1);</div><div class=""> Dial(SIP/${EXTEN});</div><div class=""> System(pkill tcpdump);</div><div class=""> Hangup;</div></div><div class=""><br class=""></div><div class="">Probably the last messages of SIP will be lost, BYE for example.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-02-17 20:43 GMT-02:00 Derek Andrew <span dir="ltr" class=""><<a href="mailto:Derek.Andrew@usask.ca" target="_blank" class="">Derek.Andrew@usask.ca</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="m_8912426978109483897gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">I have some troublesome numbers that I would like to capture the SIP dialogue when I am calling them. When I am about to dial the number, is there any way to turn on SIP debugging in the dial plan before I make the call? (and turn it off after the call is completed?)</div><div class=""><br class=""></div><div class=""><br class=""><br class=""></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>
<br class="">--<br class="">
______________________________<wbr class="">______________________________<wbr class="">_________<br class="">
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" rel="noreferrer" target="_blank" class="">http://www.api-digital.com</a> --<br class="">
<br class="">
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank" class="">https://community.asterisk.<wbr class="">org/</a><br class="">
<br class="">
New to Asterisk? Start here:<br class="">
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank" class="">https://wiki.asterisk.org/<wbr class="">wiki/display/AST/Getting+<wbr class="">Started</a><br class="">
<br class="">
asterisk-users mailing list<br class="">
To UNSUBSCRIBE or update options visit:<br class="">
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank" class="">http://lists.digium.com/<wbr class="">mailman/listinfo/asterisk-<wbr class="">users</a><br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div class="">Att,</div><div class="">Rafael Saraiva</div></div></div></div>
</div>
-- <br class="">_____________________________________________________________________<br class="">-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" class="">http://www.api-digital.com</a> --<br class=""><br class="">Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" class="">https://community.asterisk.org/</a><br class=""><br class="">New to Asterisk? Start here:<br class=""> <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" class="">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br class=""><br class="">asterisk-users mailing list<br class="">To UNSUBSCRIBE or update options visit:<br class=""> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" class="">http://lists.digium.com/mailman/listinfo/asterisk-users</a></div></blockquote></div><br class=""></div></div></div></body></html>