[Freeswitch-users] Can't test for empty variable

Per Modin per at wgtwo.com
Wed Dec 16 10:07:40 UTC 2020


On 2020-12-11 15:43 (Fri), David Villasmil wrote:
>  <condition field="${dtmf_get}" expression="^$">
> 
> But it's always false...
> 
> How can I test for an empty (null?) variable?

Hi David,

try checking for any characters (`".+"`), then you create an
`<anti-action>` clause that'll be executed on empty (null?) variable.

https://freeswitch.org/confluence/display/FREESWITCH/XML+Dialplan#XMLDialplan-Anti-Actions

Best,
Per.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20201216/1ce6d7c0/attachment.sig>


More information about the FreeSWITCH-users mailing list