VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
david.villasmil.work a... Guest
|
Posted: Tue Sep 14, 2021 2:49 pm Post subject: [Freeswitch-users] Escape variable content when used as a fi |
|
|
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 Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337 |
|
Back to top |
|
|
krice at freeswitch.org Guest
|
Posted: Tue Sep 14, 2021 8:07 pm Post subject: [Freeswitch-users] Escape variable content when used as a fi |
|
|
put a slash right after the ^ In the expression or you have to feed it a proper regex in that chanvar.
Sent from my iPhone
|
|
Back to top |
|
|
david.villasmil.work a... Guest
|
Posted: Wed Sep 15, 2021 7:23 am Post subject: [Freeswitch-users] Escape variable content when used as a fi |
|
|
Thanks Ken, I tried that but it was just escaping the $ from ${variable}
I ended up using a cond function.
Thanks again
David
On Wed, 15 Sep 2021 at 02:08, Ken Rice <krice@freeswitch.org (krice@freeswitch.org)> wrote:
--
Regards,
David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|