[Freeswitch-users] condition

Bernhard Wendel bernhard at zeppelindesk.com
Mon Jun 30 00:05:13 MSD 2014


Hi Andrew,

there is a very big possibility that your variable will NEVER be set as 
variables will be handled AFTER the dialplan is traversed. You might 
want to have a look at the "inline"-attribute. For more info, please see 
here: https://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions


Bernhard


On 29.06.2014 20:19, Andrew wrote:
>
> What I am trying to do is wait for the variable to be set.
>
> But it seems that the variable is never set in this code.
>
> Anyone have an idea on how to wait for a variable to be set?
>
> <extension name="public_extensions">
>
> <condition field="destination_number" expression="^.*$">
>
> **<action application="set" data="hangup_after_bridge=true"/>
>
> <condition field="${my_dialstring}" expression="^$">
>
> **<action application="sleep" data="20"/>
>
> **</condition>
>
> <condition field="${my_dialstring}" expression="^$">
>
> **<action application="sleep" data="500"/>
>
> **</condition>
>
> **<action application="bridge" data="${my_dialstring}"/>
>
> **</condition>
>
> **</extension>
>
> *From:*freeswitch-users-bounces at lists.freeswitch.org 
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of 
> *aademattia at comcast.net
> *Sent:* Saturday, June 28, 2014 2:09 PM
> *To:* FreeSWITCH Users Help
> *Subject:* Re: [Freeswitch-users] condition
>
> I am trying to find out if the variable is not set. The problem is 
> this condition fires if the variable is set or not set. If the 
> variable is not set, I want it to sleep.
>
> Sent from my HTC
>
> ----- Reply message -----
> From: "Ken Rice" <krice at freeswitch.org <mailto:krice at freeswitch.org>>
> To: "FreeSWITCH Users Help" <freeswitch-users at lists.freeswitch.org 
> <mailto:freeswitch-users at lists.freeswitch.org>>
> Subject: [Freeswitch-users] condition
> Date: Sat, Jun 28, 2014 1:24 PM
>
> thats tesing for an empty string... test to see if what you expect to 
> be there and if not use anti-action to sleep
>
> Ken
>
> Sent from my iPad
>
>
> On Jun 28, 2014, at 11:15, "Andrew" <aademattia at comcast.net 
> <mailto:aademattia at comcast.net>> wrote:
>
>         Hi,
>
>         I want to see if the variable is set.  If its not I want to
>         sleep for 500 mill sec.
>
>         This does not seem to work.
>
>          <condition field="${my_dialstring}" expression="^$">
>
>         <action application="sleep" data="500"/>
>
>         </condition>
>
>     _________________________________________________________________________
>     Professional FreeSWITCH Consulting Services:
>     consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>     http://www.freeswitchsolutions.com
>
>     
>     
>
>     Official FreeSWITCH Sites
>     http://www.freeswitch.org
>     http://wiki.freeswitch.org
>     http://www.cluecon.com
>
>     FreeSWITCH-users mailing list
>     FreeSWITCH-users at lists.freeswitch.org
>     <mailto:FreeSWITCH-users at lists.freeswitch.org>
>     http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>     <http://lists.freeswitch.org/mailman/options/freeswitch-users>
>     http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140629/94dbc69c/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list