[asterisk-bugs] [Asterisk 0010411]: Variables in AEL2 context names

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Aug 13 16:36:17 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10411 
====================================================================== 
Reported By:                adiemus
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   10411
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.9  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             08-08-2007 18:04 CDT
Last Modified:              08-13-2007 16:36 CDT
====================================================================== 
Summary:                    Variables in AEL2 context names
Description: 
As part of our migration to 1.4.x, we're looking at moving to AEL2.  In so
doing, I've run across what looks like a bug in the native AEL parser.  (Or
I'm just missing something obvious, which I admit is very possible)

The relevant bits from extensions.ael:

globals {
  OFFICE_CODE=503;
}

context from-enum {
  includes {
    internal-extensions;
    pbx-extensions;
  }

  _${OFFICE_CODE}XXXX => {
        Answer();
        goto ${EXTEN:3}|1;
  }
}

With extensions.ael being loaded (and no extensions.conf), if I try to
dial into this context, I get:

[Aug  9 00:45:47] NOTICE[15582]: chan_iax2.c:7406 socket_process: Rejected
connect attempt from XXX.XXX.XXX.XXX, request '5039000 at from-enum' does not
exist

Interestingly, if I have aelparse dump an extensions.conf version of
extensions.ael, I end up with the following relevant code:

[globals]
OFFICE_CODE=503

[from-enum]
include => internal-extensions
include => pbx-extensions
exten => _${OFFICE_CODE}XXXX,1,Answer()
exten => _${OFFICE_CODE}XXXX,2,Goto(${EXTEN:3}|1)

If I have asterisk load this instead of the AEL, the context works as
expected.  (Hence my suspiscion it's the native AEL parser that's at
fault)

In the meantime, I've simply changed the extension to:

_XXXXXXX => {

which will work for now.  But I would like, if possible, to put variables
into extension names.

If there's any further information I can provide, please let me know.

Thanks,

-Chris

(NOTE: Mantis only lets me select 1.4.9, but I'm actually running into
this issue on 1.4.10)
====================================================================== 

---------------------------------------------------------------------- 
 thiagarcia - 08-13-07 16:36  
---------------------------------------------------------------------- 
The patch caused issues for me.
Does not it find the context. 
If I rever the pbx_ael.c to revision 67526 the issue does not occur.

 NOTICE[7120]: chan_iax2.c:7456 socket_process: Rejected connect attempt
from 192.168.248.6, request '9614 at trunk-fns' does not exist

[Aug 13 18:35:59] WARNING[4731]: app_macro.c:214 _macro_exec: Context
'macro-ramais-filiais' for macro 'ramais-filiais' lacks 's' extension,
priority 1 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-13-07 16:36  thiagarcia     Note Added: 0068800                          
======================================================================




More information about the asterisk-bugs mailing list