[asterisk-users] Originate with label?

Mark Murawski markm-lists at intellasoft.net
Tue Aug 30 11:17:08 CDT 2022


On 8/30/22 11:16, Antony Stone wrote:
> If I write in my AEL dialplan:
>
> 	Set(Tracker=${CDR(uniqueid)});
>
> this results in executing:
>
> 	Set(Tracker=eagle.domain.com-1661872057.2349)
>
> Just what I want.
>
> However writing:
>
> 	Tracker=${CDR(uniqueid)};
>
> results in:
>
> 	MSet(Tracker=-1661872057.2349)
>
> systemname is missing.

Hi Antony,

This is not a problem with MSet.

Keep in mind that AEL is a transpiler, the AEL itself is not evaluated 
at the time of execution... extensions.conf-style dialplan is what's 
being executed.



Also... keep in mind that var=val assignments always use surround the 
value with $[]  which will either evaluate math or boolean expressions.

Since 'eagle.domain.com' is not numeric, and not boolean, it's expected 
it would not be included in the final value.

If you do a 'dialplan show' on the context after AEL has processed it, 
you'll clearly see the MSet and ${CDR(uniqueid)} being inside $[]

If you run the same code through extensions.conf you'll get exactly the 
same result... so I would call this expected behavior.

The fix/workaround is to explicitly use Set() when you need to work with 
anything non-numeric and non-boolean




More information about the asterisk-users mailing list