Technically that is not a big issue, however I will explain it for the sake of discussion. The ^ and $ are &quot;anchors&quot; for the beginning and end of the string. Consider these patterns:<br><br>\d (match a single digit)<br>
\d+ (match one or more digits)<br>^\d+ (match a string that begins with one or more digits)<br>\d+$ (match a string that ends with one or more digits)<br>^\d+$ (match a string that contains only one or more digits)<br><br>
So, the pattern ^(\d+) literally means:<br>&quot;Match a string that begins with one or more digits and capture those digits into the variable $1.&quot;<br><br>The only issue with not having a $ at the end of the pattern is that there could be other stuff in the string after the digits. For example, these strings would all match the pattern &quot;^(\d+)&quot;:<br>
<br>1x<br>43abc<br>12345abcd<br>998877LA_LA_LA_WHATEVER<br>18005551212!hoohah<br><br>If you added the $ at the end of the pattern then none of the above strings would match.<br><br>Hope that makes sense....<br><br>-MC<br>
<br><div class="gmail_quote">On Tue, Feb 7, 2012 at 11:46 AM, Bote Man <span dir="ltr">&lt;<a href="mailto:bote_radio@botecomm.com">bote_radio@botecomm.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am an absolute newbie to FS, but from reading about dialplan regular<br>
expressions this morning I would guess that this line:<br>
<br>
 &lt;condition field=&quot;caller_id_number&quot; expression=&quot;^(\d+)&quot;&gt;<br>
<br>
is missing the required trailing &quot;$&quot; to end the regular expression.<br>
<br>
It should be:<br>
 &lt;condition field=&quot;caller_id_number&quot; expression=&quot;^(\d+)$&quot;&gt;<br>
<br>
no?<br>
<br>
Bote<br>
<br>
<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
&gt; [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of<br>
&gt; George Sapak<br>
&gt; Sent: Tuesday, 07 February, 2012 11:30<br>
&gt; To: FreeSWITCH Users Help<br>
&gt; Subject: Re: [Freeswitch-users] sip_invite_from_params<br>
&gt;<br>
&gt; i already have it setup, my calls go through to the right extensions<br>
&gt; and I have done some rewitting in public.xml file, but I have having<br>
&gt; some wierdness on the handsets with call ID, when the phone rings the<br>
&gt; ID show correctly but when its picked up it shows it with the<br>
&gt; ;national... sting included.<br>
&gt;<br>
&gt; Here is how I have done the routing and rewritte:<br>
&gt;<br>
&gt;<br>
&gt; &lt;extension name=&quot;105&quot;&gt;<br>
&gt;    &lt;condition expression=&quot;public&quot; field=&quot;context&quot;/&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot;<br>
&gt; expression=&quot;^403XXXXXXX(.+)$&quot;&gt;<br>
&gt;    &lt;action application=&quot;transfer&quot; data=&quot;105 XML default&quot;/&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt; public.xml<br>
&gt; &lt;extension name=&quot;set caller id&quot; continue=&quot;true&quot;&gt;<br>
&gt; &lt;condition field=&quot;caller_id_number&quot; expression=&quot;^(\d+)&quot;&gt;<br>
&gt;  &lt;action application=&quot;set&quot; data=&quot;caller_id_number=$1&quot;/&gt;<br>
&gt;  &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=$1&quot;/&gt;<br>
&gt; &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thank You,<br>
&gt; George<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; From: &quot;Brian West&quot; &lt;<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>&gt;<br>
&gt; To: &quot;FreeSWITCH Users Help&quot; &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
&gt; Sent: Tuesday, February 7, 2012 8:43:54 AM<br>
&gt; Subject: Re: [Freeswitch-users] sip_invite_from_params<br>
&gt;<br>
&gt;<br>
&gt; Why? What is your goal? This should be a simple dialplan rewrite<br>
&gt; really.<br>
&gt;<br>
&gt;<br>
&gt; /b<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Feb 7, 2012, at 9:27 AM, George Sapak wrote:<br>
&gt;<br>
&gt;<br>
&gt; can someone give me an example in use, I have looked at the wiki and<br>
&gt; its pretty unclear, I am trying to remove a string in an invite -&gt;<br>
&gt; ;phone-context=national<br>
&gt;<br>
&gt; INVITE sip:403XXXXXXX;phone-context=<a href="mailto:national@10.185.16.170">national@10.185.16.170</a>;user=phone<br>
&gt; SIP/2.0<br>
&gt; Via: SIP/2.0/UDP<br>
&gt; 10.185.16.169:5060;branch=z9hG4bKght6ecqg4eh7d5sluaj9cl2rr4<br>
&gt; From: &quot;Caller&quot;&lt; sip:403YYYYYYY;phone-<br>
&gt; context=<a href="mailto:national@10.185.16.169">national@10.185.16.169</a>;user=phone;isup-oli=00 &gt;;tag=SDj6q1a01-<br>
&gt; 98964<br>
&gt; To: &lt; sip:403XXXXXXX;phone-context=<a href="mailto:national@10.185.16.170">national@10.185.16.170</a>;user=phone &gt;<br>
&gt; Call-ID: SDj6q1a01-2afa0c6426482b0cfa2885f32878c86c-o0t3g30<br>
&gt; CSeq: 62218 INVITE<br>
&gt; Content-Type: application/sdp<br>
&gt; Contact: &lt; sip:403YYYYYYY;phone-<br>
&gt; context=national@10.185.16.169:5060;transport=udp &gt;<br>
&gt; User-Agent: Nortel SESM 14.0.6.0<br>
&gt; Max-Forwards: 19<br>
&gt; Supported: com.nortelnetworks.firewall,p-3rdpartycontrol,nosec,join,x-<br>
&gt; nortel-sipvc,com.nortelnetworks.im.encryption,r eplaces,100rel,tdialog<br>
&gt; Allow: UPDATE,REFER<br>
&gt; x-nt-corr-id: 871f3514-29e7-1b21-a633-000e0cb7d3a0<br>
&gt; x-nt-location: -1<br>
&gt; Content-Length: 206<br>
&gt; Route: &lt; sip:403XXXXXXX;phone-<br>
&gt; context=national@10.185.16.170:5060;user=phone;lr &gt;<br>
&gt;<br>
&gt;<br>
&gt; Thank You,<br>
&gt; George<br>
&gt;<br>
&gt; --<br>
&gt; Brian West<br>
&gt; FreeSWITCH Solutions, LLC<br>
&gt; Phone: <a href="tel:%2B1%20%28918%29%20420-9266" value="+19184209266">+1 (918) 420-9266</a><br>
&gt; Fax: <a href="tel:%2B1%20%28918%29%20420-9267" value="+19184209267">+1 (918) 420-9267</a><br>
&gt; <a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt; ______________________________________________________________________<br>
&gt; ___<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
&gt; users<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt; ______________________________________________________________________<br>
&gt; ___<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
&gt; users<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<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><br>
</blockquote></div><br>