[Home]

Summary:ASTERISK-14400: Gosub-Local Variables in AEL2 Cannot be set in a Queue with Local Channels
Reporter:Leo Brown (netfuse)Labels:
Date Opened:2009-06-30 04:06:29Date Closed:
Priority:MinorRegression?No
Status:Open/NewComponents:PBX/pbx_ael
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When using AEL2, using the Macro construct creates priorities that set the macro variables in the macro. When this macro is called as part of a Local channel in a queue, this causes the error "Tried to set LOCAL(extn), but we aren't within a Gosub routine".

The config below will re-create the issue when you dial extension 100, and sample output is shown in additional info below.

=========queues.conf=========
[testqueue]
retry=1
timeout=30
member=>Local/s@testmacro

=======extensions.ael========
macro testmacro(arg){
Noop(${arg});
};

100 => {
Queue(testqueue);
};

****** ADDITIONAL INFORMATION ******

 == Entering queue queue_169 for 25 seconds
   -- Executing [100@testmacro:1] Queue("IAX2/acumen-6385", "testqueue") in new stack
   -- Executing [s@testmacro:1] Set("Local/s@route_76-56ad;2", "LOCAL(arg)=") in new stack
[2009-06-30 09:54:42] ERROR[13474]: app_stack.c:379 local_write: Tried to set LOCAL(arg), but we aren't within a Gosub routine
Comments:By: Leo Brown (netfuse) 2009-07-31 02:57:36

I am sure I can provide access to a system where this can be tested.

By: Leo Brown (netfuse) 2009-08-12 11:20:50

Do you need any more info on this one?

By: Leif Madsen (lmadsen) 2009-09-14 12:20:07

No additional information is required at this time. It is just waiting for someone to take possession of this issue, or someone from the community to provide a working patch. Thanks!

By: Leo Brown (netfuse) 2009-09-14 12:24:53

OK, for the record, I made a workaround like this:

context route_inbound{
       _. => {
               &route_${EXTEN}();
       }
}

This means I can use Local technology to call a macro in the most basic of ways. Obviously passing arguments is not so easy.