[asterisk-users] RE: regcontext,
NoOp extension vanishes when extension reload
JR Richardson
jmr.richardson at gmail.com
Tue Dec 5 13:49:27 MST 2006
>
> 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.
>
> Regards,
> - Brad
>
No, not exactly, I have a catchall match in the regext priority 2 that
sends the call out to another context that further processes it.
regcontext is sipregistration
astreg1*CLI> show dialplan sipregistration
[ Context 'sipregistration' created by 'pbx_config' ]
'53060' => 1. Noop(53060) [SIP]
'53061' => 1. Noop(53061) [SIP]
'53062' => 1. Noop(53062) [SIP]
'53063' => 1. Noop(53063) [SIP]
'53090' => 1. Noop(53090) [SIP]
'53091' => 1. Noop(53091) [SIP]
'53092' => 1. Noop(53092) [SIP]
'i' => 1. Goto(lookupdundi|${INVALID_EXTEN}|1) [pbx_config]
'_NXXXX' => 2. Goto(localcontact|${EXTEN}|1) [pbx_config]
astreg1*CLI>
-= 9 extensions (9 priorities) in 1 context. =-
If I take the _NXXXX and the i exten out, and don't put
[sipregistration] in the extension.conf file, then i can reload
extensions and the NoOp extensions remain in the dial plan. Thanks
for pointing that out, I can find another solution now.
It makes sense that if [sipregistration] exist in the extension.conf
file and a reload extensions is performed, all the dynamic extensions
in that context will be removed, because they are not really there in
the first place, statically that is.
I was using the chanisavail cmd to do the local server lookups, but
was getting really sporatic results, works good in the lab but not
solid in an uncontrolled environment, live traffic. I'm wondering if
I can use a GotoIf statement to check [sipregistration] for an active
extension............
Good stuff, thanks for the insight Brad.
JR
More information about the asterisk-users
mailing list