[Freeswitch-users] dialplan - expression matching and variable - 2nd try

Steven Ayre steveayre at gmail.com
Fri Jan 21 14:47:46 MSK 2011


$1 is the first brackets
$2 is the second brackets

If you dial 5xx I would expect $1 to be 5xx and $2 empty
If you dial 6xx I would expect $1 empty and $2 to be 6xx

Try:
<condition field="destination_number" expression="^(500|600)$">

-Steve


On 21 January 2011 10:13, Weigel, Stefan <Stefan.Weigel at allianz-warranty.com
> wrote:

>  Hi all,
>
>
>
> sorry for the first message, I hit the wrong keys an Outlook sent the
> message…once again:
>
>
>
>
>
> why is the following not working:
>
>
>
>   <condition field="destination_number" expression="^(500)$|^(600)$">
>
>     <action application="set" data="dialed_number=$1"/> <-- $1 is empty
>
>
>
> when using the above expression, $1 is empty.
>
>
>
> If I do it like this
>
>
>
>   <condition field="destination_number" expression="^(5\d\d)$|^(6\d\d)$">
>
>     <action application="set" data="dialed_number=$1"/> <-- $1 is empty
>
>
>
> It’s working. I don’t understand why.
>
>
>
>
>
> Thanks in advance and best regards,
>
>
>
> Stefan
>
> _______________________________________________
> 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/20110121/062ebd0c/attachment.html 


More information about the FreeSWITCH-users mailing list