[Home]

Summary:ASTERISK-19189: AEL Macro and AELSub functions do not pass EXTEN variable, breaking CDR destination field
Reporter:Chris Cappuccio (chriscappuccio)Labels:
Date Opened:2012-01-11 13:07:04.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:PBX/pbx_ael
Versions:1.8.8.1 10.0.0 13.18.4 Frequency of
Occurrence
Constant
Related
Issues:
Environment:OpenBSD 5.0Attachments:
Description:Ever since AEL's Macro facility was changed to use Gosub, instead of stack-based design, CDR destination column logging has been broken for calls which flow through AEL Macros.

This appears to happen because Macro() no longer passes EXTEN. After Asterisk internally converts the Macro to Gosub, the EXTEN variable is set to ~~s~~ and that is recorded in the CDR destination field!

I was unable to fix this by manually forcing the Macro to Set/MSet EXTEN/~~EXTEN~~ to the destination number. The CDRs would still log ~~s~~ as destination.

My work-around is to change Macros to contexts with the old Macro statements inside the _XXX. => portion of the context. I use Gosub instead of Macro, use {$ARG} variables in the new context and an able to completely replicate the functionality of the original, stack-based Macro call. This produces proper CDR records because EXTEN gets preserved after Gosub.

As a wrapper to the Macro call, AELSub suffers from the same problem.
Comments:By: Matt Jordan (mjordan) 2012-01-17 11:32:54.457-0600

I'm acknowledging this issue. AEL however is a community supported module, so you'll need to either provide a patch, or see if you can get someone from the community to take up the cause. Thanks!