[Freeswitch-users] Escape variable content when used as a field in a condition
David Villasmil
david.villasmil.work at gmail.com
Tue Sep 14 19:32:36 UTC 2021
Hello all,
I'm trying to compare 2 variables in a condition, something like
<condition field="${sip_from_user}"
expression="^${some_other_phone_number}$" inline="true">
But it looks like FS expands the variable, and does the comparison. The
problem with this is, those 2 phone numbers are in e.164, i.e.:
sip_from_user = +18885551212
some_other_phone_number = +18005551212
and so the condition ends up being:
<condition field="+18885551212" expression="^+18005551212$" inline="true">
which of course won't work....
Is there any way of escaping the variables automatically when comparing?
I haven't found a way.
Thanks!
David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20210914/4e60f9b6/attachment.html>
More information about the FreeSWITCH-users
mailing list