[Freeswitch-users] Matching destination number

mbo mbodbg at gmx.net
Tue Mar 11 21:49:46 MSK 2014


Hello,

I have the following dial plan:

<extension name="international destination_number" continue="true">
      <condition field="destination_number" expression="^00(\d+)$">
        <action application="log" data="CONSOLE *** international number ${destination_number} ***"/>
        <action application="set_profile_var" data="destination_number=$1"/>
      </condition>
    </extension>

    <extension name="national destination_number" continue="true">
      <condition field="destination_number" expression="^0(\d+)$">
        <action application="log" data="CONSOLE *** international number ${destination_number}"/>
        <action application="set_profile_var" data="destination_number=49$1"/>
      </condition>
    </extension>


If I dial number 001234567, I get the following output in the console:

2014-03-11 19:43:42.945392 [CONSOLE] mod_dptools.c:1569 *** international number 001234567 ***
2014-03-11 19:43:42.945392 [CONSOLE] mod_dptools.c:1569 *** international number 1234567

The second extension is matching, however in the first extension the destination_number has been overridden and does not have any leading zeros. Why is it matching anyway?

Thanks

Markus


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140311/62287a55/attachment-0001.html 


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