[asterisk-users] regcontext, NoOp extension vanishes when extension reload and doesn't come back

Watkins, Bradley Bradley.Watkins at compuware.com
Tue Dec 5 13:59:58 MST 2006


 

> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com 
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of 
> Michiel van Baak
> Sent: Tuesday, December 05, 2006 2:09 PM
> To: asterisk-users at lists.digium.com
> Subject: Re: [asterisk-users] regcontext,NoOp extension 
> vanishes when extension reload and doesn't come back
> 
> On 13:59, Tue 05 Dec 06, Watkins, Bradley wrote:
> > Let me guess:  The context in which you have the 2 thru n 
> priorities 
> > is the same one as you're using for regcontext right?
> > 
> > Don't do that, bad things will happen (as you've noticed).
> > 
> > I'd have to review the code again, but I think what you're 
> seeing is 
> > as a result of this.
> 
> Then how should it be done ?
> I'm playing with this as well and now I'm back to 0. I just 
> had it all working on paper...
> 

You should put all of the 2 thru n priorities in a separate context and
then include the regcontext into that.

For example:

Let's say regcontext = registrations

And you have a SIP peer:

[1234]
type=peer
...
regexten=1234

You actual dialplan context should look something like:

[extensions]

exten => _1XXX,2,Dial(SIP/${EXTEN})
exten => _1XXX,3,Hangup

Include => registrations



Now, when peer 1234 registers, the registrations context will look like:

[ Context 'registrations' created by 'SIP' ]
  '1234' =>         1. NoOp()                                   [SIP]



And, since the 'extensions' context includes 'registrations', any calls
that originate in 'extensions' will succeeed where they will not if 1234
is not registered.



Regards,
- Brad
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. 


More information about the asterisk-users mailing list