Hi All,<br><br>Thanks for the prompt response. I ended up with:<br><br><condition field="destination_number" expression="^.*-(\d+)$"><br><br>By changing the invite from:<br><br>INVITE sip:0114712500-10.3.12.153@x.x.x.x SIP/2.0.<br>
<br>to: <br><br>INVITE sip:10.3.12.153-0114712500@x.x.x.x SIP/2.0.<br><br>Really loving the regex's now am using them in the correct manner!<br><br>Thanks,<br>Chris G<br><br><br><div class="gmail_quote">On Fri, Sep 16, 2011 at 1:13 AM, mazilo <span dir="ltr"><<a href="mailto:Nabble_01394@slickdeals.endjunk.com">Nabble_01394@slickdeals.endjunk.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">So do the dots. BTW, using *^(\d+)-* as ReGex will suffice too to pass digits<br>
before the -.<br>
<br>
mercutioviz wrote:<br>
><br>
> On Thu, Sep 15, 2011 at 3:19 AM, Steven Ayre &<a href="mailto:lt%3Bsteveayre@gmail.com">lt;steveayre@gmail.com</a>&gt;<br>
<div class="im">> wrote:<br>
><br>
>> Change the regex to only pull out the first part into $1. Something like<br>
>> this:<br>
>><br>
>> <condition field="destination_number"<br>
>> expression="^(\d+)\-(\d+\.\d+\.\d+\.\d+)$"><br>
>><br>
> FYI, a bare - in a regex does not need to be escaped.<br>
> -MC<br>
><br>
><br>
>><br>
>> $1 will be 0114712500<br>
>> $2 will be 10.3.12.153<br>
>><br>
>> -Steve<br>
>><br>
>><br>
</div>>> On 15 September 2011 10:14, Chris Graham &<a href="mailto:lt%3Bchrisg.lists@gmail.com">lt;chrisg.lists@gmail.com</a>&gt;<br>
<div><div></div><div class="h5">>> wrote:<br>
>><br>
>>> Hi All,<br>
>>><br>
>>> I have a simple issue I seem to not be making progress on. Due to<br>
>>> topology<br>
>>> 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 "-"<br>
>>> used<br>
>>> as a delimiter to bill against the hidden IP. FS duly passed this<br>
>>> dialstring<br>
>>> on. The carrier then rejects the call.<br>
>>><br>
>>> I want to modify the dialstring in the context below not to dial<br>
>>> 0114712500-10.3.12.153 but rather just 0114712500. I hope I am clear,<br>
>>> and<br>
>>> thanks in advance.<br>
>>><br>
>>> <document type="freeswitch/xml"><br>
>>> <section name="dialplan" description="RE FS DP"><br>
>>> <context name="lcr_trunks"><br>
>>> <extension name="Catch all send to carriers"><br>
>>> <condition field="destination_number" expression="^(.*)$"><br>
>>> <action application="set" data="nibble_account=10.3.12.153"/><br>
>>> <action application="lcr" data="$1 peak"/><br>
>>> <action application="bridge" data="${lcr_auto_route}"/><br>
>>> </condition><br>
>>> </extension><br>
>>> </context><br>
>>> </section><br>
>>> </document><br>
>>><br>
>>> Chris G<br>
>>><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>
>>><br>
>><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>
>><br>
><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>
<br>
<br>
-----<br>
</div></div>FreeSWITCH hosted on a Seagate DockStar with OpenWRT and ONLY consumes 3 Watts of electricity.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/Dialplan-delimiter-transform-tp6796094p6798950.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/Dialplan-delimiter-transform-tp6796094p6798950.html</a><br>
Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
</font><div><div></div><div class="h5"><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>
</div></div></blockquote></div><br>