Re: [asterisk-users] Turn on SIP debugging from DialPlan

2017-02-27 Thread Derek Andrew
Perfect, exactly what I needed. Thanks.

On Mon, Feb 27, 2017 at 6:32 AM, Igor Zamocky <i...@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 <rafaels...@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 1-2 &);
> 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.and...@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.
-- 
_
-- 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

Re: [asterisk-users] Turn on SIP debugging from DialPlan

2017-02-17 Thread Derek Andrew
Yes, I agree. Tcpdump is one of my favourite programs. I need to enable it
and disable it from the dialplan though.



On Fri, Feb 17, 2017 at 5:18 PM, Tim Pozar <po...@lns.com> wrote:

> You can tell it to just capture SIP traffic and not the RTP traffic.
> Nice write up of using TCPdump and wireshark can be found here:
>
> https://blog.flowroute.com/2014/04/10/how-to-capture-sip-packets/
>
> BTW, I have found this works really well in trying to debug RTP traffic
> as well.  Wireshark just does the right thing in putting audio back
> together.  Very helpful in tracking down in and out of band DTMF
> problems that we were having with various carriers.
>
> Tim
>
> On 2/17/17 3:07 PM, Derek Andrew wrote:
> > The SIP trace will be adequate but this is on a remote system with
> > limited disk space.
> >
> > I would love to turn on debugging while making the troublesome calls,
> > then turn it off afterward.
> >
> > Tcpdump is great, but starting it and stopping it and keeping all that
> > data would still be an issue.
> >
> > d
> >
> > On Fri, Feb 17, 2017 at 4:56 PM, Tim Pozar <po...@lns.com
> > <mailto:po...@lns.com>> wrote:
> >
> > Why not capture the packets with something like tcpdump and run it
> > through Wireshark?
> >
> > Tim
> >
> > On 2/17/17 2:43 PM, Derek Andrew wrote:
> > > 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/ <https://community.asterisk.org/>
> >
> > New to Asterisk? Start here:
> >   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> > <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
> > <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.
> >
> >
> >
> >
> >
>
> --
> _
> -- 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.
-- 
_
-- 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

Re: [asterisk-users] Turn on SIP debugging from DialPlan

2017-02-17 Thread Derek Andrew
But how do you turn on the debugging from the dialplan? What would be cool
is:

same => n,TURN ON DEBUGGING



On Fri, Feb 17, 2017 at 5:09 PM, Victor Villarreal <mefhigos...@gmail.com>
wrote:

> Hi Derek,
>
> SIP debug can be enabled via Asterisk CLI (console) with the command:
>
> asterisk> sip set debug on
>
> If you know via what trunk your call goes, you can use the following
> command instead:
>
> asterisk> sip set debug ip xxx.xxx.xxx.xxx
>
> Where the xxx is the IP of your trunk (voip to pstn provider).
>
> Affter you make all your test, simply issue:
>
> asterisk> sip set debug off
>
> And all the SIP conversation are saved in your full log file.
>
> More info here:
>
> https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information
>
> If what you want is test your dialplan, simply use the command:
>
> asterisk> dialplan show xxx@your_context
>
> Where xxx is the number you want to dial, from the context asigned to your
> extension.
>
> Cheers
>
>
> El 17/2/2017 19:44, "Derek Andrew" <derek.and...@usask.ca> escribió:
>
>> 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
>>
>


-- 
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.
-- 
_
-- 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

Re: [asterisk-users] Turn on SIP debugging from DialPlan

2017-02-17 Thread Derek Andrew
The SIP trace will be adequate but this is on a remote system with limited
disk space.

I would love to turn on debugging while making the troublesome calls, then
turn it off afterward.

Tcpdump is great, but starting it and stopping it and keeping all that data
would still be an issue.

d

On Fri, Feb 17, 2017 at 4:56 PM, Tim Pozar <po...@lns.com> wrote:

> Why not capture the packets with something like tcpdump and run it
> through Wireshark?
>
> Tim
>
> On 2/17/17 2:43 PM, Derek Andrew wrote:
> > 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
>



-- 
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.
-- 
_
-- 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

[asterisk-users] Turn on SIP debugging from DialPlan

2017-02-17 Thread Derek Andrew
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

Re: [asterisk-users] Script to Program Snom Phones

2015-04-09 Thread Derek Andrew
SNOM phones can be configured using files on a TFTP server.

On Thu, Apr 9, 2015 at 11:14 AM, jg webaccounts...@jgoettgens.de wrote:


   Does anyone know how to program Snom phones using a Mac addresses like
 what is done with the Ciscos. I have about 50 extensions to be programmed
 and I am hoping there is a way on Asterisk to program extensions on the
 snom phones. Please assist.


  What do you mean with 50 extensions? Snom phones allow to define a
 directory, where you can export and import a simple text file. There might
 also be a way to automate this using one of the provisioning methods.

 jg




-- 
Copyright 2015 Derek Andrew (excluding quotations)

+1 306 966 4808
University of Saskatchewan
Peterson 120; 54 Innovation Boulevard
Saskatoon,Saskatchewan,Canada. S7N 2V3
Timezone GMT-6

Typed but not read.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] PRI answer too fast

2014-09-22 Thread Derek Andrew
Answer([delay])

If the channel is ringing, answer it, otherwise do nothing. If a delay is
specified, Asterisk will wait this number of milliseconds AFTER answering
the call. If you want to add a delay prior answering, use Wait.

On Mon, Sep 22, 2014 at 9:06 AM, Doug Lytle supp...@drdos.info wrote:

  is there a way to set answer on ring or something so the
  other end at least gets 1 ring.

 First entry in your incoming context should be:

 exten = s,1,Answer(500)

 Doug

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Copyright 2014 Derek Andrew (excluding quotations)

+1 306 966 4808
Information and Communications Technology
University of Saskatchewan
Peterson 120; 54 Innovation Boulevard
Saskatoon,Saskatchewan,Canada. S7N 2V3
Timezone GMT-6

Typed but not read.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] is pattern matching inside macro valid?

2014-09-08 Thread Derek Andrew
There are some issues if you use WaitExten inside a macro.

On Mon, Sep 8, 2014 at 2:48 PM, Anurag Rana anuragrana31...@gmail.com
wrote:

   Can't we use pattern matching inside a macro?
  Because when I am trying to do so call is terminating even for a very
 simple dummy dialplan.

 [demo3]
 exten=98,1,NoOp()
 exten=98,2,Macro(testme)
 exten=h,1,NoOp(terminating call);

 [macro-testme]
 exten=s,1,Playback(Digits/2)
 exten=s,2,WaitExten(15)
 exten=s,3,NoOp()

 exten=_X,1,NoOp(${EXTEN})
 exten=_X,2,Goto(s,3)


  Even for this code when execution reaches the line 2 in macro 'testme'
 it terminates as soon as I input some number.

  Error :

 WARNING[9984][C-000d]: pbx.c:6696 __ast_pbx_run: Invalid extension
 '5', but no rule 'i' or 'e' in context 'demo3'
 -- Executing [h@demo3:1] NoOp(SIP/101-000d, terminating call)
 in new stack
 [Sep  9 02:11:14] NOTICE[9984]: pbx_spool.c:402 attempt_thread: Call
 completed to SIP/101/009871888729

  Anurag Rana
 http://newbie42.blogspot.in/






-- 
Copyright 2014 Derek Andrew (excluding quotations)

+1 306 966 4808
Information and Communications Technology
University of Saskatchewan
Peterson 120; 54 Innovation Boulevard
Saskatoon,Saskatchewan,Canada. S7N 2V3
Timezone GMT-6

Typed but not read.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] asterisk multiple ip

2014-08-29 Thread Derek Andrew
You can achieve your goal with policy based routing (
http://en.wikipedia.org/wiki/Policy-based_routing). You would need to
install the iproute2 package and set up ip rules for routing.

This would allow you to answer endpoints registering on 192.168.10.30 with
the address 192.168.10.30.


On Fri, Aug 29, 2014 at 3:26 AM, Marek Cervenka cerv...@fpf.slu.cz wrote:

 hi,

 i need migrate customers from severeal to one asterisk server with
 multiple ip aliases
 like
 eth0 192.168.10.1
 eth0:1 192.168.10.20
 eth0:2 192.168.10.30

 i must preserve endpoint configuration to these ip adressess

 the problem is if i register to 192.168.10.30, the answer is from
 192.168.10.1

 are there some ways for this scenario?
 1) chan_pjsip?
 2) kamailio in front of asterisk on the same server?
 3) iptables magic?
 4) ...

 thanks

 --
 ---
 Marek Cervenka
 ===


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Copyright 2014 Derek Andrew (excluding quotations)
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Reload problems with 1.8.27 and 11.9.0 - Someone else ?

2014-04-30 Thread Derek Andrew
Does a reload (not a sip reload) reload everything or does it also require
the sip.conf file to be modified?


On Wed, Apr 30, 2014 at 5:00 AM, Administrator TOOTAI ad...@tootai.netwrote:

 Le 30/04/2014 12:39, Administrator TOOTAI a écrit :

 Le 30/04/2014 12:15, Administrator TOOTAI a écrit :

 Hi,

 after upgrade from 11.8.1 to 11.9.0 on our test server, and from
 1.8.26.1 to 1.8.27 on production one, some CLI commands like sip reload
 or iax2 reload does nothing.

 We opened bug 23683 but it was immediately closed by Matt Jordan,
 telling that he can't reproduce it. But we can.

 Example:

 - switching back to 11.8.1 respectively 1.8.26.1 does the job working
 again (We just run a make install from within this directory)
 - cleaning 11.8.0 source directory -make clean  ./configure  make 
 make install- all is good
 - cleaning 11.9.0 source directory -make clean  ./configure  make 
 make install- problem appears again
 - switching back to 11.8.0 does the job working again (We just run a
 make install from within this directory)

 The first installation of latest version was done by patching the
 previous version, we downloaded the source tar.gz and compile = problem
 stays

 Does anybody else face this problem with latest version? If it was a
 server problem, earlier version should have same behaviour after compiling
 but they don't.

 Server OS is Debian Wheezy 3.2.0-4 amd64 in KVM virtual machine

 Thanks for any hint

 Regards


 We checked on a customer installation made one week ago: they have the
 same problem! It's a Debian Squeeze 2.6.32-5-amd64 on a real server.


 And finally the explanation: if you modify sip.conf file, the reload is
 taken in account, all is good. But if the sip.conf contains includes and
 you modify one of those includes *without modifying* sip.conf, no reload.

 --
 Daniel

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
I took the degree of Doctor of Philosophy in 1903. The meaning of this
degree is that the recipient of instruction is examined for the last time
in his life, and is pronounced completely full. After this, no new ideas
can be imparted to him. - Stephen Leacock
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users