[asterisk-users] AEL Macro are evil :-)

Leandro Dardini ldardini at gmail.com
Sun Feb 24 04:50:54 CST 2013


Knowing the exten variable of the original dialplan is not a problem. The
problem is just when the call is transferred via blind transfer. Asterisk
does a little magic with the callerid of the legs and using Macro, just
breaks it.

If Joe at ext 100 call Sally at ext 200 and then Joe transfers the call to
Bob at ext 300, then Bob will see the callerid 200 on his phone. That is
not true if the dial is made inside a Macro. In this way, Bob will see
~~~~s~~~~

The macro can be something as simple as:

macro dialpeer(number) {
   dial(SIP/number);
}

Leandro

2013/2/24 Mitul Limbani <mitul at enterux.in>

> Hi,
>
> You might want to use ${MACRO_EXTEN} variable inside to preserve exten
> variable of the original dialplan exten variable.
>
> Mitul
> On Feb 24, 2013 4:04 PM, "Leandro Dardini" <ldardini at gmail.com> wrote:
>
>> I just discover an "hidden" problem with AEL macro I want to have your
>> feedback. If you use a macro to dial out, like &dialout(${EXTEN}), the leg
>> extension will became ~~~~s~~~~ and if it happens you transfer the call,
>> that will be the callerid appearing on the other phone display.
>> I am just rewriting all the dialplan getting rid of the macro and using
>> gosub, even if asterisk is complaining about  "application call to gosub
>> affects flow of control, and needs to be re-written using AEL if, while,
>> goto, etc. keywords instead!", but I am not seeing any other way...
>>
>> Leandro
>>
>>
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>                http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130224/f1de0dac/attachment.htm>


More information about the asterisk-users mailing list