[Asterisk-Dev] bug or feature ? extension not found...

Luigi Rizzo rizzo at icir.org
Wed Dec 14 12:46:16 MST 2005


bug identified (will post on mantis later).
The thing is, regexten/regcontext create a context in the
global list. pbx_config instead creates contexts in a
temporary list, local_contexts, and then calls
ast_merge_contexts_and_delete() at line 1776 to "merge"
the lists.

Unfortunately the function does not actually merges contexts
with the same name, nor it checks for the event.

I don't know what a proper fix could be - as a minimum,
ast_merge_contexts_and_delete()
should issue a serious warning if ast_merge_contexts_and_delete()
finds two contexts with the same name, because the event
causes a rather unpredictable behaviour of the dialplan.

cheers
luigi

On Wed, Dec 14, 2005 at 08:11:35AM -0800, Luigi Rizzo wrote:
> On Wed, Dec 14, 2005 at 09:45:28AM -0600, Kevin P. Fleming wrote:
> > Luigi Rizzo wrote:
> > 
> > > However the fact that we have currently no way to prevent the
> > > existence of multiple contexts with the same name is confusing.
> > > Especially because if they come from different registration
> > > sources, it may be non predictable which one gets found.
> > 
> > Correct.
> > 
> > > Do we really need to differentiate contexts based on the
> > > creator, or we could just put all entries into the same context ?
> > > In other words, are there user-level mechanism to tell asterisk
> > > 'take the context created by SIP rather than by IAX' ?
> > 
> > No, there is not.
> 
> so in principle we could merge all registrations in the same
> contexts and just use the creator as an attribute ?
> (will summarize the discussion in mantis)
> 
> cheers
> luigi
> 
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> > 
> > Asterisk-Dev mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-dev
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list