[Freeswitch-users] condition matching on variables which have been set in the dialplan

Brian West brian at freeswitch.org
Fri Mar 27 09:55:08 PDT 2009


Remember the dialplan is NOT executed when its parsed so you can't set  
a var then condition on that exact var on the next line.. that var  
doesn't exist.

/b


On Mar 27, 2009, at 11:25 AM, Peter P GMX wrote:

>    <extension name="Any"> <!-- Set the variables -->
>      <condition field="destination_number"  
> expression="^[0-9]\d[0,16}$"
> continue="true">.
>        <action application="set"  
> data="destination_number=0049xxxxxxxxx"/>.
>        <action application="export"
> data="destination_number=0049xxxxxxxxx"/>.
>        <action application="info"/>
>      </condition>
>      <condition field="${variable_destination_number}"

Its ${destination_number}

> expression="^(00[1-9]\d{4,13})$"> <!-- Now parse the new variables -->
>       <action application="set"
> data="effective_caller_id_number=unknown"/>.
>       <action application="set"  
> data="effective_caller_id_name=unknown"/>.
>       <action application="bridge"
> data="sofia/gateway/QSC_DE/$1 at sip.qsc.de"/>.
>      </condition>
>      <condition ............>
>       .
>       .
>    </extension>

Brian West
brian at freeswitch.org

-- Meet us a ClueCon!  http://www.cluecon.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090327/6ca27cc8/attachment-0002.html 


More information about the FreeSWITCH-users mailing list