<br><br><div class="gmail_quote">On Thu, Sep 15, 2011 at 3:19 AM, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Change the regex to only pull out the first part into $1. Something like this:<br><br>&lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d+)\-(\d+\.\d+\.\d+\.\d+)$&quot;&gt;<br></blockquote><div>FYI, a bare - in a regex does not need to be escaped.</div>
<div>-MC</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>$1 will be 0114712500<br>

$2 will be 10.3.12.153<br><br>-Steve<br><br><br><div class="gmail_quote"><div><div></div><div class="h5">On 15 September 2011 10:14, Chris Graham <span dir="ltr">&lt;<a href="mailto:chrisg.lists@gmail.com" target="_blank">chrisg.lists@gmail.com</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">Hi All,<br><br>I have a simple issue I seem to not be making progress on. Due to topology hiding in one of the headquaters I send a invite as such:<br>


<br>INVITE sip:0114712500-10.3.12.153@x.x.x.x SIP/2.0.<br><br>You can see the first part of the invite is the dialstring then a &quot;-&quot; used as a delimiter to bill against the hidden IP. FS duly passed this dialstring on. The carrier then rejects the call.<br>



<br>I want to modify the dialstring in the context below not to dial 0114712500-10.3.12.153 but rather just 0114712500. I hope I am clear, and thanks in advance.<br><br>&lt;document type=&quot;freeswitch/xml&quot;&gt;<br>



  &lt;section name=&quot;dialplan&quot; description=&quot;RE FS DP&quot;&gt;<br>    &lt;context name=&quot;lcr_trunks&quot;&gt;<br>      &lt;extension name=&quot;Catch all send to carriers&quot;&gt;<br>        &lt;condition field=&quot;destination_number&quot; expression=&quot;^(.*)$&quot;&gt;<br>



          &lt;action application=&quot;set&quot; data=&quot;nibble_account=10.3.12.153&quot;/&gt;<br>          &lt;action application=&quot;lcr&quot; data=&quot;$1 peak&quot;/&gt;<br>          &lt;action application=&quot;bridge&quot; data=&quot;${lcr_auto_route}&quot;/&gt;<br>



        &lt;/condition&gt;<br>      &lt;/extension&gt;<br>    &lt;/context&gt;<br>  &lt;/section&gt;<br>&lt;/document&gt;<br><br>Chris G<br>
<br><br></div></div>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
<br></blockquote></div><br><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">

</div>
<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>
<br></blockquote></div><br>