<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Menlo;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#44546A;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A">I am not sure I can answer, but I can clarify for others who know.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A">Are you expecting the &#8220;set_profile_var&#8221; in the first extension to override the value being parsed as field=&#8220;destination_number&#8221; in the second extension?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A">Oddly enough, it appears the &#8220;FIELD&#8221;- &#8220;destination_number&#8221; did
<b>not </b>change, but variable $destination_number did.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A">Sean<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org]
<b>On Behalf Of </b>Avi Marcus<br>
<b>Sent:</b> Tuesday, March 11, 2014 3:49 PM<br>
<b>To:</b> FreeSWITCH Users Help<br>
<b>Subject:</b> Re: [Freeswitch-users] Matching destination number<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Both are matching.<o:p></o:p></p>
<div>
<p class="MsoNormal">You might want this for your second match, so that there's only 1x leading zero:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">^0([^0]\d&#43;)$<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">-Avi</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Tue, Mar 11, 2014 at 8:49 PM, mbo &lt;<a href="mailto:mbodbg@gmx.net" target="_blank">mbodbg@gmx.net</a>&gt; wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Hello,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I have the following dial plan:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;extension</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"> name=&quot;international destination_number&quot; continue=&quot;true&quot;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&gt;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;condition</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"> field=&quot;destination_number&quot; expression=&quot;^00(\d&#43;)$&quot;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&gt;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp; &nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;action</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"> application=&quot;log&quot; data=&quot;CONSOLE *** international number ${destination_number} ***&quot;/</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&gt;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp; &nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;action</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"> application=&quot;set_profile_var&quot; data=&quot;destination_number=$1&quot;/</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&gt;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;/condition&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;/extension&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;extension</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"> name=&quot;national destination_number&quot; continue=&quot;true&quot;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&gt;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;condition</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"> field=&quot;destination_number&quot; expression=&quot;^0(\d&#43;)$&quot;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&gt;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp; &nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;action</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"> application=&quot;log&quot; data=&quot;CONSOLE *** international number ${destination_number}&quot;/</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&gt;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp; &nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;action</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"> application=&quot;set_profile_var&quot; data=&quot;destination_number=49$1&quot;/</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&gt;</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;/condition&gt;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">&nbsp; &nbsp;
</span><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#34BBC7">&lt;/extension&gt;<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">If I dial number 001234567, I get the following output in the console:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">2014-03-11 19:43:42.945392 [CONSOLE] mod_dptools.c:1569 *** international number 001234567 ***<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:black"><span style="font-size:10.5pt;font-family:&quot;Menlo&quot;,&quot;serif&quot;;color:#008F00">2014-03-11 19:43:42.945392 [CONSOLE] mod_dptools.c:1569 *** international number 1234567<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">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?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Markus<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</body>
</html>