[asterisk-users] extensions.conf strangeness
Hello, I have an anomoly that I am unable to explain. My entire extensions.conf is attached. You can see that the [from-sip] and [internal] dial plans are identical, each including 4 other contexts in the same order: [internal] include => extensions include => outbound include => invalid include => test [from-sip] include => extensions include => outbound include => invalid include => test I can place calls between extensions as expected. Now here's the problem. If I dial '611' on a zaptel line (context "internal"), I get the "Hello World" message from the "test" context as expected. However if I dial '611' on a SIP phone (context "from-sip"), I get "I am sorry, that is not a valid extension" If I modify extensions.conf as follows: [from-sip] include => extensions include => outbound ;include => invalid <<< comment out this line include => test then it works: dialling 611 from a SIP phone gives "Hello World". Could someone please explain to me why the dialplan seems to behave differently for calls originating from SIP and zaptel lines in this instance? I am running Asterisk from SVN trunk, compiled two weeks ago (September 13th) Thanks, Brian Candler. [general] autofallthrough=no [incoming] ; incoming calls from the FXO port are directed to this context from zapata.conf include => extensions exten => s,1,Answer() exten => s,2,Wait(1) exten => s,3,Background(enter-ext-of-person) exten => i,1,Background(pbx-invalid) exten => t,1,Playback(vm-goodbye) exten => t,2,Hangup() [macro-ext] exten => s,1,Dial(${ARG1},10) exten => s,2,Playback(vm-nobodyavail) exten => s,3,Hangup() exten => s,102,Playback(tt-allbusy) exten => s,103,Hangup() [extensions] exten => 101,1,Macro(ext,Zap/1) exten => 102,1,Macro(ext,Zap/2) exten => 301,1,Macro(ext,SIP/test301) [outbound] exten => _9.,1,Dial(Zap/4/${EXTEN:1}) exten => _9.,2,Congestion() exten => _9.,102,Congestion() [invalid] exten => _X!,1,Answer() exten => _X!,2,Background(pbx-invalid) [test] exten => 611,1,Answer() exten => 611,2,Playback(hello-world) exten => 611,3,Hangup() [internal] include => extensions include => outbound include => invalid include => test [from-sip] include => extensions include => outbound include => invalid include => test ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] extensions.conf strangeness
Brian Candler wrote: Hello, I have an anomoly that I am unable to explain. My entire extensions.conf is attached. You can see that the [from-sip] and [internal] dial plans are identical, each including 4 other contexts in the same order: [internal] include => extensions include => outbound include => invalid include => test [from-sip] include => extensions include => outbound include => invalid include => test I can place calls between extensions as expected. You need the [general] and [global] sections ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] extensions.conf strangeness
On Thu, Sep 28, 2006 at 09:44:07AM -0500, Eric ManxPower Wieling wrote: > You need the [general] and [global] sections Well, if you read the attachment, you would see that I had a [general] section: [general] autofallthrough=no In what way would adding an empty [global] section alter the anomoly I am seeing? Thanks, Brian. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] extensions.conf strangeness
Not having a [globals] section (even if it is empty) has caused Asterisk to screw things up in the past. I think it causes contexts to not be found. Brian Candler wrote: On Thu, Sep 28, 2006 at 09:44:07AM -0500, Eric ManxPower Wieling wrote: You need the [general] and [global] sections Well, if you read the attachment, you would see that I had a [general] section: [general] autofallthrough=no In what way would adding an empty [global] section alter the anomoly I am seeing? Thanks, Brian. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] extensions.conf strangeness
On Thu, 2006-09-28 at 15:05 +0100, Brian Candler wrote: > I have an anomoly that I am unable to explain. > ... > > [invalid] > exten => _X!,1,Answer() > exten => _X!,2,Background(pbx-invalid) > > [test] > exten => 611,1,Answer() > exten => 611,2,Playback(hello-world) > exten => 611,3,Hangup() > > [internal] > include => extensions > include => outbound > include => invalid > include => test > > [from-sip] > include => extensions > include => outbound > include => invalid > include => test > > ... > [summary of cut text: 611 from SIP -> invalid; 611 from zaptel line -> test] > >I am running Asterisk from SVN trunk, compiled two weeks ago (September >13th) The order of include statements is important in 1.2, I don't know if this still holds for trunk/1.4. Could you please try to include the 'invalid' context as the last one (i.e., AFTER "include => test", not before) in both internal and from-sip and then test again? -- Dr. Michael Neuhauser mailto:[EMAIL PROTECTED] Firmix Software GmbH sip:[EMAIL PROTECTED] Vienna/Austria/Europe tel:+43-1-7890849-30 Linux Development and Services http://www.firmix.at/ ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] extensions.conf strangeness
On Fri, Sep 29, 2006 at 07:49:00PM +0200, Michael Neuhauser wrote: > The order of include statements is important in 1.2, I don't know if > this still holds for trunk/1.4. Could you please try to include the > 'invalid' context as the last one (i.e., AFTER "include => test", not > before) in both internal and from-sip and then test again? Yes, this works - both contexts now behave the same. But what I don't understand is, why it worked in one context but not in the other, when both just included the same four other contexts in the same order. Is the context merging non-deterministic? Or is it somehow sensitive to whether the incoming call came from zaptel or SIP? Regards, Brian. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] extensions.conf strangeness
[invalid]> exten => _X!,1,Answer()> exten => _X!,2,Background(pbx-invalid)Are you sure that your invalid context is correctly written?I've never heard about this pattern match _X!As far as i know the wild card is the "." So your invalid context should be: [invalid]exten => _X.,1,Answer() exten => _X.,2,Background(pbx-invalid)This may be the causeHope it helps.On 9/29/06, Brian Candler < [EMAIL PROTECTED]> wrote:On Fri, Sep 29, 2006 at 07:49:00PM +0200, Michael Neuhauser wrote: > The order of include statements is important in 1.2, I don't know if> this still holds for trunk/1.4. Could you please try to include the> 'invalid' context as the last one (i.e., AFTER "include => test", not > before) in both internal and from-sip and then test again?Yes, this works - both contexts now behave the same.But what I don't understand is, why it worked in one context but not in theother, when both just included the same four other contexts in the same order. Is the context merging non-deterministic? Or is it somehow sensitiveto whether the incoming call came from zaptel or SIP?Regards,Brian.___ --Bandwidth and Colocation provided by Easynews.com --asterisk-users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users-- Com os melhores cumprimentos,Marco Mouta ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] extensions.conf strangeness
On Sun, Oct 01, 2006 at 03:55:45PM +0100, Marco Mouta wrote: > >[invalid] >> exten => _X!,1,Answer() >> exten => _X!,2,Background(pbx-invalid) >Are you sure that your invalid context is correctly written? >I've never heard about this pattern match _X! >As far as i know the wild card is the "." >So your invalid context should be: >[invalid] >exten => _X.,1,Answer() >exten => _X.,2,Background(pbx-invalid) >This may be the cause _X! means "match the pattern as soon as it possibly could". If you use _X. then a timeout has to take place to see whether some other pattern might match. But your explanation still doesn't go into why it works differently in one context than another. I guess I'm going to have to assume that Asterisk dialplans are non-deterministic :-( Are there any debug tools which can show the "thought process" as a dial-plan is processed - for example, what patterns are tried and in what order? Thanks, Brian. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users