Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
david.villasmil.work a...
Guest





PostPosted: Fri Dec 11, 2020 11:23 am    Post subject: [Freeswitch-users] Can't test for empty variable Reply with quote

Hello all,

I'm trying to test the play_and_get_digits variable from here:


<action application="play_and_get_digits" data="1 1 1 3000 # '' silence_stream://250 dtmf_get \d 3000"/>



Like this:


 <condition field="${dtmf_get}" expression="^$">



But it's always false...


How can I test for an empty (null?) variable?


Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337
Back to top
kaduww at gmail.com
Guest





PostPosted: Fri Dec 11, 2020 3:42 pm    Post subject: [Freeswitch-users] Can't test for empty variable Reply with quote

Hey David,

Test with with this


expression="^.?$"


Regards...






Em sex., 11 de dez. de 2020 às 12:44, David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)> escreveu:

Quote:
Hello all,

I'm trying to test the play_and_get_digits variable from here:


<action application="play_and_get_digits" data="1 1 1 3000 # '' silence_stream://250 dtmf_get \d 3000"/>



Like this:


 <condition field="${dtmf_get}" expression="^$">



But it's always false...


How can I test for an empty (null?) variable?


Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337





_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com



--
Carlos E. Wagner
Tecnólogo em Telecomunicações, Opensips Certified Professional

[b]Fone: +55 48 99981-0894
[/b]
E-mail: kaduww@gmail.com (kaduww@gmail.com)

LinkedIn: https://www.linkedin.com/in/carlos-eduardo-wagner-96bbb433/

Back to top
borik.internet at gmai...
Guest





PostPosted: Fri Dec 11, 2020 4:18 pm    Post subject: [Freeswitch-users] Can't test for empty variable Reply with quote

As I remember, the empty value of a variable is equivalent of unset variable. So, I think you can't test variable if it is empty at all

пт, 11 дек. 2020 г. в 23:46, Carlos Eduardo <kaduww@gmail.com (kaduww@gmail.com)>:

Quote:
Hey David,

Test with with this


expression="^.?$"


Regards...






Em sex., 11 de dez. de 2020 às 12:44, David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)> escreveu:

Quote:
Hello all,

I'm trying to test the play_and_get_digits variable from here:


<action application="play_and_get_digits" data="1 1 1 3000 # '' silence_stream://250 dtmf_get \d 3000"/>



Like this:


 <condition field="${dtmf_get}" expression="^$">



But it's always false...


How can I test for an empty (null?) variable?


Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337





_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com



--
Carlos E. Wagner
Tecnólogo em Telecomunicações, Opensips Certified Professional

[b]Fone: +55 48 99981-0894
[/b]
E-mail: kaduww@gmail.com (kaduww@gmail.com)

LinkedIn: https://www.linkedin.com/in/carlos-eduardo-wagner-96bbb433/











_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com



--
With best regards
   Dmitry Borisov
Back to top
per at wgtwo.com
Guest





PostPosted: Wed Dec 16, 2020 5:49 am    Post subject: [Freeswitch-users] Can't test for empty variable Reply with quote

On 2020-12-11 15:43 (Fri), David Villasmil wrote:
Quote:
<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.

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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

VoiceMeUp - Corporate & Wholesale VoIP Services