Re: [asterisk-users] Asterisk crashing on AAAA lookup

2018-06-26 Thread Richard Mudgett
On Tue, Jun 26, 2018 at 6:15 PM, Dovid Bender  wrote:

> I have Asterisk running on a Ubuntu 18.0.4 on Digital Ocean. Every so
> often asterisk crashes and then restarts. I am not seeing any core dumps on
> the box. The only I thing I see every time is a second before Asterisk
> crashes there is a  lookup for the boxes hostname. As soon as it gets
> the response I see that asterisk is restarting. Any idea what would cause
> this and how would get a dump or further debug? I did build Asterisk with
> DONT_OPTIMIZE and BETTER_BACKTRACES but not seeing any traces anywhere. I
> am using Asterisk 15.4.1.
>

You have to start asterisk with the -g option to make asterisk create core
files.
https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

Richard
-- 
_
-- 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] Asterisk not matching longest prefix with include

2018-06-26 Thread Dovid Bender
On Tue, Jun 26, 2018 at 7:40 PM, Joshua Colp  wrote:

> On Tue, Jun 26, 2018, at 8:31 PM, Dovid Bender wrote:
> > On Tue, Jun 26, 2018 at 7:28 PM, Doug Lytle  wrote:
> >
> > > On 06/26/2018 07:20 PM, Dovid Bender wrote:
> > >
> > > Doug,
> > >
> > > I tried that as well. Even with my dialplan looking like this:
> > >
> > >
> > >
> > > Ordering by includes works for me under Asterisk 11 and 13
>
> The context always takes priority over includes. Includes are only
> examined if there are no matches in the current context. It's always worked
> this way. Ordering includes as such is one way to control that. As it is
> the matching is working as expected.
>
> --
>

Thanks Josh.
-- 
_
-- 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] Asterisk not matching longest prefix with include

2018-06-26 Thread Joshua Colp
On Tue, Jun 26, 2018, at 8:31 PM, Dovid Bender wrote:
> On Tue, Jun 26, 2018 at 7:28 PM, Doug Lytle  wrote:
> 
> > On 06/26/2018 07:20 PM, Dovid Bender wrote:
> >
> > Doug,
> >
> > I tried that as well. Even with my dialplan looking like this:
> >
> >
> >
> > Ordering by includes works for me under Asterisk 11 and 13

The context always takes priority over includes. Includes are only examined if 
there are no matches in the current context. It's always worked this way. 
Ordering includes as such is one way to control that. As it is the matching is 
working as expected.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- 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] Asterisk not matching longest prefix with include

2018-06-26 Thread Dovid Bender
On Tue, Jun 26, 2018 at 7:28 PM, Doug Lytle  wrote:

> On 06/26/2018 07:20 PM, Dovid Bender wrote:
>
> Doug,
>
> I tried that as well. Even with my dialplan looking like this:
>
>
>
> Ordering by includes works for me under Asterisk 11 and 13
>
> What does the output of the below show?
>
> dialplan show from-external
>
> Doug
>
>
It shows:
fingerprint1*CLI> dialplan show from-external
[ Context 'from-external' created by 'pbx_config' ]
  '1234' => 1. Noop()
 [extensions.conf:2]
  '_X.' =>  1. Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
[extensions.conf:7]
2. Noop(IP: ${CHANNEL(recvip)})
 [extensions.conf:8]
3. Noop(CALLED NUMBER: ${EXTEN})
[extensions.conf:9]
4. Ringing()
[extensions.conf:10]
5. WaitExten(15)
[extensions.conf:11]
6. Congestion()
 [extensions.conf:12]
7. Hangup()
 [extensions.conf:13]
  Include =>'test'
[pbx_config]

-= 2 extensions (8 priorities) in 1 context. =-

I am going to build Asterisk 14, 13 etc. to see if I can re-produce on
those versions.
-- 
_
-- 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] Asterisk not matching longest prefix with include

2018-06-26 Thread Doug Lytle

On 06/26/2018 07:20 PM, Dovid Bender wrote:

Doug,

I tried that as well. Even with my dialplan looking like this:




Ordering by includes works for me under Asterisk 11 and 13

What does the output of the below show?

dialplan show from-external

Doug

-- 
_
-- 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] Asterisk not matching longest prefix with include

2018-06-26 Thread Dovid Bender
On Tue, Jun 26, 2018 at 7:06 PM, Doug Lytle  wrote:

> On 06/26/2018 06:57 PM, Dovid Bender wrote:
>
>> Hi,
>>
>> My dialplan looks like this:
>> [from-external]
>>
>> Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
>> Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
>> Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
>> Exten => _X.,n,Ringing
>> Exten => _X.,n,WaitExten(15)
>> Exten => _X.,n,Congestion()
>> Exten => _X.,n,Hangup()
>>
>>
>> include => test
>>
>> [test]
>>
>> Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )
>>
>>
>
> Dovid,
>
> This has to do with sort order, try this:
>
>
> [from-external]
>
> ; Order DOES count
>
> include => test
> include => match_all
>
>
> [match_all]
>
> Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
> Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
> Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
> Exten => _X.,n,Ringing
> Exten => _X.,n,WaitExten(15)
> Exten => _X.,n,Congestion()
> Exten => _X.,n,Hangup()
>
> [test]
>
> Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )
>
> --
>
>
Doug,

I tried that as well. Even with my dialplan looking like this:

[from-external]
Exten => 1234,1,Noop()

include => test

Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()

[test]

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )


It still didnt work. Now if I did:

[from-external]
Exten => 1234,1,Noop()

include => test


Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )




OR if I did:
[from-external]
Exten => 1234,1,Noop()

include => test


Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )



Either way it worked. It seems that when there is an include so long as
there is something else that matches in the context you are in, even if
it's shorter that takes preference to a longer match which seems like a bug.
-- 
_
-- 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] Asterisk crashing on AAAA lookup

2018-06-26 Thread Dovid Bender
I have Asterisk running on a Ubuntu 18.0.4 on Digital Ocean. Every so often
asterisk crashes and then restarts. I am not seeing any core dumps on the
box. The only I thing I see every time is a second before Asterisk crashes
there is a  lookup for the boxes hostname. As soon as it gets the
response I see that asterisk is restarting. Any idea what would cause this
and how would get a dump or further debug? I did build Asterisk with
DONT_OPTIMIZE and BETTER_BACKTRACES but not seeing any traces anywhere. I
am using Asterisk 15.4.1.
-- 
_
-- 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] Asterisk not matching longest prefix with include

2018-06-26 Thread Doug Lytle

On 06/26/2018 06:57 PM, Dovid Bender wrote:

Hi,

My dialplan looks like this:
[from-external]

Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()


include => test

[test]

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )




Dovid,

This has to do with sort order, try this:


[from-external]

; Order DOES count

include => test
include => match_all


[match_all]

Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()

[test]

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )

--
_
-- 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] Asterisk not matching longest prefix with include

2018-06-26 Thread Dovid Bender
Hi,

My dialplan looks like this:
[from-external]

Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
Exten => _X.,n,Ringing
Exten => _X.,n,WaitExten(15)
Exten => _X.,n,Congestion()
Exten => _X.,n,Hangup()


include => test

[test]

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )




If I dial 8282 I would thing that I would see in the CLI " --- WE GOT TO
CONTEXT TEST!-" however when I make a test call I see:

  == Using SIP RTP CoS mark 5
-- Executing [8282@from-external:1] NoOp("SIP/192.168.200.32-",
"CALL IS COMING INTO FROM EXTERNAL CONTEXT") in new stack
-- Executing [8282@from-external:2] NoOp("SIP/192.168.200.32-",
"IP: 192.168.200.10") in new stack
-- Executing [8282@from-external:3] NoOp("SIP/192.168.200.32-",
"CALLED NUMBER: 8282") in new stack
-- Executing [8282@from-external:4]
Ringing("SIP/192.168.200.32-", "") in new stack
-- Executing [8282@from-external:5]
WaitExten("SIP/192.168.200.32-", "15") in new stack
  == Spawn extension (from-external, 8282, 5) exited non-zero on
'SIP/192.168.200.32-'



It seems that the 8282 in test is being ignored now if I comment out all
lines starting with  " Exten => _X.,1" so my dialplan looks like this:

[from-external]
Exten => 1234,1,Noop()


;Exten => _X.,1,Noop(CALL IS COMING INTO FROM EXTERNAL CONTEXT)
;Exten => _X.,n,Noop(IP: ${CHANNEL(recvip)})
;Exten => _X.,n,Noop(CALLED NUMBER: ${EXTEN})
;Exten => _X.,n,Ringing
;Exten => _X.,n,WaitExten(15)
;Exten => _X.,n,Congestion()
;Exten => _X.,n,Hangup()


include => test

[test]

Exten => 8282,1,Noop(--- WE GOT TO CONTEXT TEST!- )



Then there is no issue and I see in the console:
  == Using SIP RTP CoS mark 5
-- Executing [8282@from-external:1] NoOp("SIP/204.145.219.32-0001",
"--- WE GOT TO CONTEXT TEST!- ") in new stack

Is this a bug or is this operating as designed (which I don't think is the
case).


TIA.

Dovid
-- 
_
-- 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] Best way to update ever changing dialplans

2018-06-26 Thread Bruce Ferrell

On 06/25/2018 09:54 AM, Dovid Bender wrote:
I am working on a system where I connect to an external API and based on what it gives me I generate the Asterisk dial plan accordingly. I am thinking about my different options 
and wanted feedback from others on how to best do it.
1) Generate conf files for Asterisk - This seems the easiest but then I will be doing a dial plan reload on all of my dial plan for handful of lines of code. The plus side is once 
reload is don the dial plan is in memory.

2) Using real time + mysql - Seems like an overkill to have mysql running 
taking resources for a few lines.
3) Using real time + sqlite3 - This seems like the best option but then we go 
to disk every time there is a call.

Any other options that I am not thinking of?



I don't think you missed any options.

Call me silly, number 2 has always been my preference.  Flat file configuration 
bugs me except for the simplest
of things.

Since you mention the external API, you already have a fairly complex 
environment... And pretty likely to have, at
some point, multiple asterisk instances.  Surprise! The realtime mysql dialplan 
can be shared among them.

But I'm crazy that way.


--
_
-- 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] Best way to update ever changing dialplans

2018-06-26 Thread Bertrand LUPART - Linkeo.com

> Maybe another option would be to use the CLI 'dialplan add' and 'dialplan 
> remove' commands.


… followed by 'dialplan save'

-- 
Bertrand LUPART-- 
_
-- 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