Change the regex to only pull out the first part into $1. Something like this:
<condition field="destination_number" expression="^(\d+)\-(\d+\.\d+\.\d+\.\d+)$">
$1 will be 0114712500
$2 will be 10.3.12.153
-Steve
Hi All,
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:
INVITE sip:0114712500-10.3.12.153@x.x.x.x SIP/2.0.
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.
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.
<document type="freeswitch/xml">
<section name="dialplan" description="RE FS DP">
<context name="lcr_trunks">
<extension name="Catch all send to carriers">
<condition field="destination_number" expression="^(.*)$">
<action application="set" data="nibble_account=10.3.12.153"/>
<action application="lcr" data="$1 peak"/>
<action application="bridge" data="${lcr_auto_route}"/>
</condition>
</extension>
</context>
</section>
</document>
Chris G
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org