[Home]

Summary:ASTERISK-04974: Asterisk freezes with multiple "switch=>" and IAX2 on 1.0.9 stable
Reporter:Marco D'Ambrosio (marcodmb)Labels:
Date Opened:2005-09-03 05:11:33Date Closed:2011-06-07 14:03:28
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) iax2_debug.txt
( 1) iax2_debug2.txt
( 2) iax2.txt
Description:I've 5 Asterisk servers connected via IAX2 in 5 cities.
With multiple "switch=> IAX2/zyz" in my dialplans, my Asterisk 1.0.9 stable often freezes, i.e. doesn't crash but calls are dropped and I've to 'restart now' Asterisk server to make more calls.
With a single "switch=>" statement works ok. There isn't no loops in dialplans.
With multiple "switch=>" this problem appears randomly, after few calls...
Too lagged trunks? Multiple switches are not stable?

I send you a file with some indications...

Thanks
MD
Comments:By: Marco D'Ambrosio (marcodmb) 2005-09-03 05:29:14

The strange thing is that even a hangup "h" extension is called through all "switched" Asterisk servers...
See the file (iax2_debug.txt)
In this case Asterisk didn't freeze but the problem maybe here...

Any suggestion?

BTW I'me pleased to study this incredible and powerful software!
Thanks
Marco

By: Marco D'Ambrosio (marcodmb) 2005-09-03 05:53:23

If the problem is really the "h" extension search through other IAXes, I've added an "exten => h,1,Hangup" to default context in the main server.
I'm trying...



By: Michael Jerris (mikej) 2005-09-03 14:36:06

Can you please test this with CVS Head and see if it is an issue there as well.  Thanks.

By: Marco D'Ambrosio (marcodmb) 2005-09-03 18:50:21

Thanks Mike for your attention,
since this morning, after the addition of "h" extension in main context in dialplan, Asterisk doesn't freeze anymore.

I'll explain the problem and the solution (with few light examples)

Asterisk A <---- IAX multiple switches -----> Asterisk B, Asterisk C, Asterisk D, ecc...

[default]
exten => 1234,1,Dial(...)
exten => 1234,2,Hangup
exten => 4556,1,Dial(...)
exten => 4556,2,Hangup
; Adding this line I solved my problem (see iax2_debug.txt, before addition)
exten => h,1,Hangup

[calls_from_phones_in_Asterisk_A]
include => default
switch => IAX2/asteriskB
switch => IAX2/asteriskC
switch => IAX2/asteriskD

[calls_from_other_asterisk_via_IAX]
include => default

Asterisk treats "h" extension as a simple, common call. When I hangup a channel, Asterisk A tries to find the "h" extension in "default" context, than in AsteriskB, than in Asterisk C, and finally to AsteriskD.
This search fails and the channel is no more available, than IAX fails and Asterisk freezes. Probably the best thing to do is to not treat the "h" extension as a simple call, or pay attention to put the "h" extension in the LOCAL (not SWITCHED or not present at all!) dialplan.

The most simple and correct thing to do is last one, because I'd need to manage the "h" extension in other switched Asterisk, i.e...
exten => h,1,ExampleApplication(Put some data in a database)
exten => h,2,Hangup

What do you think?
Bye
Marco

By: Michael Jerris (mikej) 2005-09-04 06:20:41

This is a configuration issue.  If you would like to follow up more, please do so on the mailing lists or IRC.