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

Peter P GMX Prometheus001 at gmx.net
Fri Mar 27 12:23:22 PDT 2009


OK, understood. I will do it in a different way then.


Brian West schrieb:
> 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
>> <mailto:sofia/gateway/QSC_DE/$1 at sip.qsc.de>"/>.
>>      </condition>
>>      <condition ............>
>>       .
>>       .
>>    </extension>
>
> Brian West
> brian at freeswitch.org <mailto:brian at freeswitch.org>
>
> -- Meet us a ClueCon!  http://www.cluecon.com <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
>   




More information about the FreeSWITCH-users mailing list