Strip digit "9" and continue

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
sjackson909
Posts: 2
Joined: Mon Mar 03, 2014 9:32 am
Location: Ohio

Strip digit "9" and continue

Post by sjackson909 »

1. Brekeke Product Name and Version:
Brekeke SIP Server
3.2.4.3/367
2. Java version:
1.7.0_51
3. OS type and the version:
Windows 7 6.1
4. UA (phone), gateway or other hardware/software involved:

5. Your problem:
I need to be able to strip a digit "9" or "1" from the To field and continue. Here is an example of one Rule I have tried.

Matching Patterns
$request = ^INVITE
To = sip:9(..........)@
$regaddr( "user-sip" ) = (.+)

Deploy Patterns
$auth = false
To = sip:%1@%2
$replaceuri.to = true
$continue = true

Thanks
-Seth
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

Matching Patterns
$request = ^INVITE
To = sip:(9|1)(..........)@
$regaddr( "user-sip" ) = (.+)

Deploy Patterns
$auth = false
To = sip:%2@%3
$replaceuri.to = true
$continue = true

Do you need $continue=true to apply other rules for this call?
sjackson909
Posts: 2
Joined: Mon Mar 03, 2014 9:32 am
Location: Ohio

Post by sjackson909 »

Hope, thanks for your reply. I need the continue for my less cost routing. I have this strip rule on line 1. I can get it to work with out the continue by sending it out to one of my gateways but not with it. I tried the way you posted and it will continue but it never strips the 9 out. I see it hit my Default route with the 9 still in place. Any ideas?

Thanks
-Seth
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

set the log parameters as that in wiki page below
http://wiki.brekeke.com/wiki/log-SIP-packets

the parameter "dialplan.debug.log = true " will show the rules applied to the call
It will help check if the prefix 9 is removed or not
janP
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by janP »

Remove the line "$continue = true" because it allows to hit other DialPlan rules.
Post Reply