Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Dialing Plan Goto page 1, 2, 3  Next
Author Message
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Thu Aug 12, 2010 7:35 am    Post subject: Dialing Plan Reply with quote

1. Brekeke Product Name and version:

2. Java version:

3. OS type and the version:

4. UA (phone), gateway or other hardware/software involved:

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html :

6. Your problem:
We currently have an advance edition Brekeke in production. We have added a second server with also a Brekeke SIP server as we would like to use this new SIP Server to receive our Customers wholesale traffic and then send it to our current SIP server in production.

I have put together the below dialing plan for the new SIP server, can you please verify that it will work?

MATCHING
$request=^INVITE
$addr=^8\.20\.232\.[1-10]$ (this is the Customer IP address)

DEPLOY
$auth=false
To=sip:64.192.197.76 (this is the Brekeke in production address)
$continue=false

Please confirm if dialplan will work and if we will need to do any other adjustment to the SIP Servers.

Thanks once again.
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Thu Aug 12, 2010 12:01 pm    Post subject: Reply with quote

At new sip server the dial plan is like
MATCHING
$request=^INVITE
$addr=^8\.20\.232\.[1-10]$ (this is the Customer IP address)

DEPLOY
$auth=false
$target=64.192.197.76 (this is the Brekeke in production address)


At production server, create dial plan to accept/route the call from new sip sever
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Fri Aug 13, 2010 11:11 am    Post subject: Reply with quote

We have decided to add a 4 digit prefix to each call based on the route code (area code). The below rule is for code 52432 and we would like to add prefix 0200 before sending call to production brekeke. Please review below rule and please make appropriate changes.


MATCHING
$request=^INVITE
$addr=^8\.20\.232\.[1-10]$
$request=sip(52432.+)@

DEPLOY
$auth=false
To=sip:0200@64.192.197.76

Thanking you in advance.
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Fri Aug 13, 2010 12:15 pm    Post subject: Reply with quote

MATCHING
$request=^INVITE
$addr=^8\.20\.232\.[1-10]$
To=sip:(52432.+)@

DEPLOY
$auth=false
To=sip:0200%1@64.192.197.76

if there are many different prefix need to add for different area codes,
you can use alias function for advanced sip server
http://wiki.brekeke.com/wiki/How-to-use-Alias-function
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Fri Aug 13, 2010 12:45 pm    Post subject: Reply with quote

Thank you.

What does the%1represent?

To=sip:0300%1@64.192.197.76
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Fri Aug 13, 2010 2:05 pm    Post subject: Reply with quote

%1 refers to 52432.+ in matching patterns
http://wiki.brekeke.com/wiki/buffer-in-the-dial-plan
and there are dial plan explanation at admin guide and dial plan tutorial at
http://www.brekeke.com/download/download_sip_doc_en.php
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Mon Aug 16, 2010 1:57 pm    Post subject: Reply with quote

Calls are completing.

Howerver, we need for the Customer prefix to be also sent to the Production Brekeke. With the below rules will the Customer prefix be passed on to the Production Brekeke?

MATCHING
$request=^INVITE
$addr=^123\.456\.789\.[1-10]$ (Customer IP adress)

DEPLOY
$request=sip:1234(52235.+)@ $auth=false (Production Brekeke Address)
To=sip:1800%1@987.654.321.00
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Mon Aug 16, 2010 3:20 pm    Post subject: Reply with quote

MATCHING
$request=^INVITE
$addr=^123\.456\.789\.[1-10]$
To=sip:1234(52235.+)@

DEPLOY
$auth=false
To=sip:1800%1@<Production_IP>

with above dial plan, if get an incoming call from source ip 123.456.789.1 with dialing number like 1234522351111, the number will be changed to 1800522351111

is it what you need?
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Mon Aug 16, 2010 4:13 pm    Post subject: Reply with quote

Thank you for the correction in the dialing plan.

Is there a way for both Customer prefix (1234) as well as Route prefix (1800) to be passed to the Production BREKEKE? Production BREKEKE account plug-in needs Customer prefix for billing.
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Mon Aug 16, 2010 5:16 pm    Post subject: Reply with quote

change matching patterns like
MATCHING
$request=^INVITE
$addr=^123\.456\.789\.[1-10]$
To=sip:(123452235.+)@

at To=, move left bracket to include 1234

Then if call to 1234522351111 then production brekeke get it like 18001234500351111
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Tue Aug 17, 2010 12:01 pm    Post subject: Reply with quote

Thanks for your reply, but it did no work, after further investigation it looks what we need is to have different prefixes in the REQUEST and TO fields of the same SIP messages, I did a trace on the call of our softswitch (the one we want to replace with BREKEKE) and this is what it shows on these fields, We need this feature for billing purposes.

Request-Line:
INVITE sip:0700523191234567@198.192.197.76 SIP/2.0
Message Header:
To: <sip:2315523191234567@198.192.197.77>

Note the switch is replacing the incoming prefix 2315 from the originating IP 198.192.197.77 and sending the call to IP 198.192.197.76 with prefix 0700
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Wed Aug 18, 2010 10:42 am    Post subject: Reply with quote

at the dial plan used for the call, change/add the following part to change the request header, and the old %n in deploy patterns also needs to change

MATCHING
$request=(INVITE )sip:0700(523191234567)(@.+)
To=sip:(2315523191234567)@

DEPLOY
$auth=false
$request=%1sip:18002315%2%3
To=sip:1800%4@<Production_IP>

change 0700 in request line to18002315 and add 1800 to dialing number 2315523191234567
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Mon Aug 23, 2010 7:10 am    Post subject: Reply with quote

Thanks again for your quick reply, but it is not working yet, not matter what I set $REQUEST, it always shows the same as the TO set in the DEPLOY pattern, after trying your suggestion I tried this and did not work either.

***MATCHING***
$request=^INVITE
$request=sip:2315(52319.+)@
To=sip:2315(52319.+)@

***DEPLOY***
$auth=false
$request=sip:2315@198.192.197.76:5106
To=sip:0700@198.192.197.76:5106

Remember we are trying to change prefix 2315 with 0700 (keeping 2315 in the TO field) the user dialed number is for example: 523191001234.

Appreciate any help you can give.
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Mon Aug 23, 2010 11:49 am    Post subject: Reply with quote

how about this one

MATCHING
$request=(INVITE sip:231552319.+)(@.+)
To=sip:2315(52319.+)@

DEPLOY
$auth=false
$request=%1%2
To=sip:0700%3@<Production_IP>

click apply rules button after changing dial plan

with above dial plan, if there is a call to number 2315523191001234,
brekeke will send inivte to production server with
request header as "INVITE sip:2315523191001234@<same as original request header>"
and To header is changed to sip:0700523191001234@production_IP
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Tue Aug 24, 2010 8:50 am    Post subject: Reply with quote

With that rule call completes, however TO and REQUEST headers are still the same. I am starting to thing the "$request=%1%2" command in the deploy side has no effect. I also noted in dial plan "View Rules" tab, that "$request" dos not show blue as the other variables. Could this has to do with the SIP SERVER version we have ? We still have the evaluation version on this server.
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Tue Aug 24, 2010 9:39 am    Post subject: Reply with quote

is correct dial plan used for the call?
you can check rule field in call details from "active session" tab.
and you need to click "Apply rules" button after changing dial plan.
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Tue Aug 24, 2010 9:59 am    Post subject: Reply with quote

Yes, I applied dialing plan rules and verified in the "Active Sessions Detail" it is hitting the rule in question.
Thanks
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Tue Aug 24, 2010 10:43 am    Post subject: Reply with quote

noiptel,
which version of SIP server are you using?
can you paste all of your DialPlan rules here??
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Tue Sep 28, 2010 2:13 pm    Post subject: Reply with quote

After upgrading to the last version 2.4.7.0 and using the proposed dialing plan we now have different TO and REQUEST headers, however it is reverse at what we want to accomplish, we would like the TO field to maintain the original caller header (original prefix and IP) while the REQUEST have the called header information (production IP and prefix) I tried just reversing the fields, but the call is not routed to the proper IP. Is there any way to do that? Perhaps routing the call using $target instead of TO. Here is the current dialing plan:

MATCHING
$request=(INVITE sip:231552319.+)(@.+)
To=sip:2315(52319.+)@

DEPLOY
$auth=false
$request=%1%2
To=sip:0700%3@<Production_IP>
$continue=false

Appreciate your responses
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Tue Sep 28, 2010 4:54 pm    Post subject: Reply with quote

MATCHING
$request=^INVITE
$geturi(To)=sip:2315(52319.+)@(.+)

DEPLOY
$auth=false
$request=INVITE sip:0700%1@<Production_IP> SIP/2.0
$target = %2

the call is sent to the ip address in the To header from caller
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Wed Sep 29, 2010 7:20 am    Post subject: Reply with quote

Thanks Hope, but I think the IP address in the TO header from the caller is my own IP, we want to route the call to a second BREKEKE ( <Production_ip> on this example) keeping the TO header as sent by the caller. Keep in mind my second BREKEKE is matching by $REQUEST so the TO header will not affect the call.
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Wed Sep 29, 2010 9:16 am    Post subject: Reply with quote

Quote:
we want to route the call to a second BREKEKE ( <Production_ip> on this example)

then change $target = <production_IP>
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Wed Sep 29, 2010 6:32 pm    Post subject: Reply with quote

Thank you Hope, it is now working as intented.

A few additional questions regarding the dialing:

1. We want to create a rule that will only allow sessions from IP segment 123.12.12.1 - 123.12.12.30. We tried using $addr=^123\.12\.12\.[1-30]$ but sessions from other IP's were not being rejected.

2. How to set up session timeout. We want to be able to set session time out value for each session attempt.

3. How to limit the maximum session duration? We would like to limit all session to not more than 240 minutes.

4. If a session those not complete for any reason we would like to reject session with SIP codec 503.

Thanking you in advance.
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Thu Sep 30, 2010 12:28 pm    Post subject: Reply with quote

1. reject call from other ips
create another dialplan and put it under the dialplan accept call from wanted IPs
dialplan
matching
$request=^INVITE

deploy
$action = 603

2. How to set up session timeout.
the following parameter will set invite timeout as 10 seconds
&net.sip.timeout.inviting = 10000

3. How to limit the maximum session duration?
at configuration / sip/ talking timeout

4.reject session with SIP codec 503.
maybe you can use http://wiki.brekeke.com/wiki/How-to-make-Failover-in-the-Dial-Plan
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Fri Oct 01, 2010 1:33 pm    Post subject: Reply with quote

Thanks Hope, could you please post the rule to reject calls from undesired IP's ? For instance reject IP's NOT 123.456.78.xx and NOT 89.10.112.xx.
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
Goto page 1, 2, 3  Next
Page 1 of 3