[asterisk-bugs] [Asterisk 0011086]: avoid nonexistent context warnings when loading AEL

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Oct 28 19:21:28 CDT 2007


The following issue has been REOPENED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11086 
====================================================================== 
Reported By:                dimas
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   11086
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.13  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             10-25-2007 11:25 CDT
Last Modified:              10-28-2007 19:21 CDT
====================================================================== 
Summary:                    avoid nonexistent context warnings when loading AEL
Description: 
When AEL loads its configuration, it produces alot of warnings like

[Oct 25 19:59:26] WARNING[2457] pbx.c: Context 'FOO' tries includes
nonexistent context 'BAR'

This happens because BAR context is defined later than FOO context. When
you have really many context, they are most likely spread across multiple
files and it is not always possible to organize files in a way that
included context are always loaded before including ones.
====================================================================== 

---------------------------------------------------------------------- 
 dimas - 10-28-07 19:21  
---------------------------------------------------------------------- 
Your patch got rid of most of WARNINGs I had during 'ael reload' but there
are still some. While "inside" AEL everything is fine now, it still has
problem working with context "external" to AEL, that is created by other
modules.

Problem 1: The specific problem I have is with context I use as
registration context for SIP/IAX devices. That is the one specified as
global regcontext in iax.conf/sip.conf. Although the context is created by
chan_iax2, 'ael reload' still warns me that context is nonexistent. I
believe this happens because AEL only check included contexts against list
of contexts defined withing AEL itself.

Problem 2: I tried a workaround and defined 'registrations' context within
extensions.ael. This made things even worse because AEL's
context_find_or_create also looks only within the list of contexts defined
within AEL itself so obviously it did not find the context and created new
so I ended up having two 'registrations' - one created by IAX and another
one created by pbx_ael.

I'm not sure about the best way to solve these problems. For
http://bugs.digium.com/view.php?id=1 probably
easiest way is to check agains "public" contexts already defined by the
moment AEL loads (that is defined by other modules) in addition to
AEL-local contexts. 

Regarding http://bugs.digium.com/view.php?id=2 - probably some kind of real
context merging (when contexts
with the same name but different registrars) are merged into one may help.
However this can lead to lots problems in other areas... 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-28-07 19:21  dimas          Note Added: 0072605                          
======================================================================




More information about the asterisk-bugs mailing list