[asterisk-users] Turn on SIP debugging from DialPlan

Derek Andrew Derek.Andrew at usask.ca
Mon Feb 27 11:23:11 CST 2017


Perfect, exactly what I needed. Thanks.

On Mon, Feb 27, 2017 at 6:32 AM, Igor Zamocky <igor at zamocky.sk> wrote:

> Hi,
>
> 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):
>
> exten =>* _XXX*,1,System(/usr/sbin/asterisk -rx ‘sip set debug peer *PEER*
> ’)
> same => n,Set(debug_on=1)
> same => n,Dial(SIP/*PEER*/${EXTEN})
>
> exten => *h*,1,GotoIf($[${debug_on} == 1]?undebug)
> same => n,Hangup
> same => n(undebug),System(( sleep 3 \; /usr/sbin/asterisk -rx 'sip set
> debug off' ) &)
> same => n,Set(debug_on=0)
> same => n,Hangup
>
> I don’t know your setup, your dialplan logic, but I’m sure you can adapt
> it to your needs.
>
> I.
>
> On 18 Feb 2017, at 00:26, Rafael dos Santos Saraiva <rafaelsnsa at gmail.com>
> wrote:
>
> Hi
>
> I don't know if works, but you can try this:
>
>                 System(tcpdump -nq -s 0 -i eth0 -w /tmp/sip.pcap port 5060
> or udp portrange 10000-20000 &);
>                 Wait(1);
>                 Dial(SIP/${EXTEN});
>                 System(pkill tcpdump);
>                 Hangup;
>
> Or whitout RTP:
>
>                 System(tcpdump -nq -s 0 -i eth0 -w /tmp/sip.pcap port 5060
> &);
>                 Wait(1);
>                 Dial(SIP/${EXTEN});
>                 System(pkill tcpdump);
>                 Hangup;
>
> Probably the last messages of SIP will be lost, BYE for example.
>
>
>
>
>
> 2017-02-17 20:43 GMT-02:00 Derek Andrew <Derek.Andrew at usask.ca>:
>
>> 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?)
>>
>>
>>
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
>
> --
> Att,
> Rafael Saraiva
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>      https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>


-- 
Copyright 2017 Derek Andrew (excluding quotations)

+1 306 966 4808
Communication and Network Services
Information and Communications Technology
Infrastructure Services

*University of Saskatchewan*Peterson 120; 54 Innovation Boulevard
Saskatoon,Saskatchewan,Canada. S7N 2V3
Timezone GMT-6

Typed but not read.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170227/21b1af65/attachment.html>


More information about the asterisk-users mailing list