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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Check out the new Asterisk community forum at: https://community.asterisk.org/
New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users