Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Strip digit "9" and continue
Author Message
sjackson909
Brekeke Newbie


Joined: 03 Mar 2014
Posts: 2
Location: Ohio

PostPosted: Mon Mar 03, 2014 9:37 am    Post subject: Strip digit "9" and continue Reply with quote

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
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Mon Mar 03, 2014 10:38 am    Post subject: Reply with quote


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?
Back to top
View user's profile
sjackson909
Brekeke Newbie


Joined: 03 Mar 2014
Posts: 2
Location: Ohio

PostPosted: Mon Mar 03, 2014 10:53 am    Post subject: Reply with quote

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
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Mon Mar 03, 2014 6:31 pm    Post subject: Reply with quote

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
Back to top
View user's profile
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Tue Mar 04, 2014 10:52 pm    Post subject: Reply with quote

Remove the line "$continue = true" because it allows to hit other DialPlan rules.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1