Change the regex to only pull out the first part into $1. Something like this:<br><br><condition field="destination_number" expression="^(\d+)\-(\d+\.\d+\.\d+\.\d+)$"><br><br>$1 will be 0114712500<br>
$2 will be 10.3.12.153<br><br>-Steve<br><br><br><div class="gmail_quote">On 15 September 2011 10:14, Chris Graham <span dir="ltr"><<a href="mailto:chrisg.lists@gmail.com">chrisg.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">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 "-" 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><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></blockquote></div><br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; 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%;" id="avg_ls_inline_popup">
</div>