Hi All, Thanks for the prompt response. I ended up with: <condition field="destination_number" expression="^.*-(\d+)$"> By changing the invite from: INVITE sip:0114712500-10.3.12.153@x.x.x.x SIP/2.0. to: INVITE sip:10.3.12.153-0114712500@x.x.x.x SIP/2.0. Really loving the regex's now am using them in the correct manner! Thanks, Chris G On Fri, Sep 16, 2011 at 1:13 AM, mazilo <Nabble_01394@slickdeals.endjunk.com
wrote:
So do the dots. BTW, using *^(\d+)-* as ReGex will suffice too to pass digits before the -.
mercutioviz wrote:
On Thu, Sep 15, 2011 at 3:19 AM, Steven Ayre <steveayre@gmail.com> wrote:
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+)$">
FYI, a bare - in a regex does not need to be escaped. -MC
$1 will be 0114712500 $2 will be 10.3.12.153
-Steve
On 15 September 2011 10:14, Chris Graham <chrisg.lists@gmail.com> wrote:
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
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
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
----- FreeSWITCH hosted on a Seagate DockStar with OpenWRT and ONLY consumes 3 Watts of electricity. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Dialplan-delimiter-transform-t... Sent from the freeswitch-users mailing list archive at Nabble.com.
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