Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Dial Plan for DID
Author Message
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Wed Apr 08, 2009 7:53 am    Post subject: Dial Plan for DID Reply with quote

1. Brekeke Product Name and version:2.2.6.2/276

2. Java version:1.6

3. OS type and the version: Linux Centos

4. UA (phone), gateway or other hardware/software involved: HT486, X-Lite, Quintum

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

6. Your problem:
I need a bit of assistance with a dial plan please.

We have bought some numbers from DIDX and another another provider. each number has been assigned a SIP address (i.e 100@sip2.com). The did's are already registered on the bSS.

I wrote the below dial plan but it is not working am i missing something ? please assist;

Matching Patterns
$request = ^INVITE
$geturi(To) = sip:1000@sip2.com


Deploy Patterns
To = sip:1000@192.168.2.8


Many thanks for your assistance in advance.

Cheers mate's
Back to top
View user's profile AIM Address
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 286
Location: Japan

PostPosted: Thu Apr 09, 2009 12:15 am    Post subject: Reply with quote

Do you want to forward a call to "sip:1000@192.168.2.8" if your customer dials "sip:1000@sip2.com"?
Back to top
View user's profile
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Thu Apr 09, 2009 3:22 am    Post subject: Reply with quote

Harold wrote:
Do you want to forward a call to "sip:1000@192.168.2.8" if your customer dials "sip:1000@sip2.com"?


Yes mate

Cheers, Mak
Back to top
View user's profile AIM Address
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Thu Apr 09, 2009 1:22 pm    Post subject: Reply with quote

Put this rule in the top of the DialPlan rule list.

Matching Patterns
$request = ^INVITE
To = sip:1000@
Deploy Patterns
To = sip:1000@192.168.2.8
Back to top
View user's profile
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Thu Apr 09, 2009 3:46 pm    Post subject: Reply with quote

Cheers mate but it did not work. I tried with DID's from 2 different providers.

I am going to try to trace the call from the DID provider, all they do is send the call to 1000@sip2.com which in turn is the BSS IP address.

FYI; the bss works very well for onnet calls and registered clients.

not sure if I had missed something Crying or Very sad
Back to top
View user's profile AIM Address
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Mon Apr 13, 2009 10:10 am    Post subject: Reply with quote

you need to put the above DialPlan rule in the top of the DialPlan rule list. (it means highest priority.)

Also, I want to know.. are you using Brekeke PBX in this scenario??
Back to top
View user's profile
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Tue Apr 14, 2009 4:02 am    Post subject: Reply with quote

Also, I want to know.. are you using Brekeke PBX in this scenario??[/quote]

No mate I am using BSS.
Back to top
View user's profile AIM Address
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Tue Apr 14, 2009 4:07 am    Post subject: Reply with quote

$addr=^67\.15\.180\.14$
$request=^INVITE

To=(.*) $target=localhost:8005
$auth=off
To=%1

I also used the above dial plan, I could now see the the call coming in but it is just inviting and not going further; Please see below what I see and advise if possible;


EX-SID 719
From-uri sip:447903867888@67.15.180.14
From-ip 67.15.180.14:5060 (UDP)
From-if BSS IP:5060
To-uri <sip:02030264960@BSS IP>
To-ip 127.0.0.1:15060 (UDP)
To-if 127.0.0.1:5060
Call-ID 54521b5b2bdacc823b54d8fd58ff3515@67.15.180.14
rule address
plug-in InviteSession
sip-packet-total 1
listen-port 5060
session-status Inviting
time-inviting Tue Apr 14 11:03:51 GMT 2009
rtp-relay on
rtp-srcdst
rtp-dstsrc
media audio
transport RTP/AVP
payload -
status active
listen-port 10002
send-port
target 67.15.180.14:11034
packet-count 0
packet/sec 0
current size 0
buffer size 260
Back to top
View user's profile AIM Address
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Tue Apr 14, 2009 4:09 am    Post subject: Reply with quote

sorry mate the local port is 15060;

$addr=^67\.15\.180\.14$
$request=^INVITE

To=(.*) $target=localhost:15060
$auth=off
To=%1
Back to top
View user's profile AIM Address
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Tue Apr 14, 2009 1:38 pm    Post subject: Reply with quote

Just to add the error code is 487.

I know this might be a bit basic for some of you and I would greatly appreciate any help and advise from the forum.

Cheers, Mark
Back to top
View user's profile AIM Address
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Thu Apr 16, 2009 11:32 am    Post subject: Reply with quote

are you using pbx?
Why you send call to localhost:15060?
is there any pbx user with ID 02030264960? or you want to use ARS to send call to other destination?
Back to top
View user's profile
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Thu Apr 16, 2009 3:08 pm    Post subject: Reply with quote

Cheers mate for the responce.

I am using BSS.

I thought I had to in order to send the call to the Localhost after reading the manual and forum.

+++DIDX Numbers+++

Anyway I just created a very simple dial plan and it worked for DIDX numbers as per below .... but not for other suppliers.

Matching Patterns
$addr = ^67\.15\.180\.14
$request = ^INVITE
$geturi(To) = sip:02030264960@

Deploy Patterns
To = sip:02030264960@

But It only works if the Authorisation Invite and register are off(NO).

+++ TTNC Numbers+++
The same dial plan as per above: I could hear the caller very well but they could not hear me via XLite..

Matching Patterns
$addr = ^213\.166\.5\.128
$addr = ^87\.238\.72\.128
$addr = ^84\.45\.107\.0
$request = ^INVITE
$geturi(To) = sip:02031510280@

Deploy Patterns
To = sip:02031510280@

I would need to change the Authorisation back to ON for Register and Invite please help in amending the dialplan...

I am trying to avoid writing a dial plan for every number so I played around with ($geturi(From)=@(.+)) but it did not work ...

Ideally all calls from DID X and TTNC should be sent to the destination URI as long as they are registered and transport is UDP.

Many thanks mate for your assistance as I have been strugling for a while, much appreciated.
Back to top
View user's profile AIM Address
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Fri Apr 17, 2009 11:16 am    Post subject: Reply with quote

try with auth on

Matching Patterns
$addr = ^213\.166\.5\.128 |^87\.238\.72\.128|^84\.45\.107\.0
$request = ^INVITE
To = sip:(.+)@

deploy
auth = false
To = sip:%1@


for one way call
http://wiki.brekeke.com/wiki/Brekeke_SIP_Server_%28BSS%29_FAQ:Troubleshooting:Trouble_with_Calling:One_way_call
Back to top
View user's profile
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 286
Location: Japan

PostPosted: Sat Apr 25, 2009 12:38 am    Post subject: Reply with quote

"auth" should be "$auth"...

so.. the DialPlan rule will be..

Matching Patterns
$addr = =^67\.15\.180\.14|^213\.166\.5\.128|^87\.238\.72\.128|^84\.45\.107\.0
$request = ^INVITE
To = sip:(.+)@
Deploy Patterns
$auth = false
To = sip:%1@
Back to top
View user's profile
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Wed Apr 29, 2009 5:45 am    Post subject: Reply with quote

Hi Hope and Harold

Many thanks for your assistance I am just sorry that I took too long to reply as I have been on the road covering for my mate away on holiday.... Sad

I have tried the above dial plan, it only works if the auth is turned off and still the audia is one way only..

The ITSP has informed me that their codec is set in the following order of priority - G711a, G723, GSM, G726, G711u
After doing more reading on the wiki I added the following in the dial plan and it didnt make any difference (&net.sip.addrecordroute.lr=off)

Other ITSP numbers are ok and working fine as per above dial plan it is just this one which is the most important for us..

Any other help would be much appreciated.

Mark
Back to top
View user's profile AIM Address
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 286
Location: Japan

PostPosted: Wed May 06, 2009 10:27 am    Post subject: Reply with quote

>> I have tried the above dial plan, it only works if the auth is turned off and still the audia is one way only..

Where did you turn "off" the authentication?
Is it at DialPlan? or is it at configuration page?

Since an incomming call from an ITSP will not send a cresidential, you need turn authentication off.

For one-way-audio problem, let you use "$rtp=true" at the Deploy Patterns.
Back to top
View user's profile
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Thu May 07, 2009 7:59 am    Post subject: Reply with quote

Hi Harold,

I turned off the authentication in the config-->SIP
Authentication
Register = off
Invite = off

Since my last message I had some success; well SIP to SIP is ok and works well and quality is good.

PSTN to SIP - audio is stilll one way with the below dial plan when using X-Lite however I have just tried my new Grandstream BT 201 and when I call the number from my mobile it is working very well and audio is both way and quality very good.

My current dial plan for ITSP 2

$addr=^213\.166\.5\.128 |^87\.238\.72\.128|^84\.45\.107\.0
$request=^INVITE
To=sip:(.+)@

$auth=false
$continue=true
&net.sip.addrecordroute.lr=off
$rtp=true
To=sip:%1@

Harold, as per advise from brekeke I am trying to avoid to turn off authentication at config page due to obvious reasons but that is the only way our DIDnumbers would work, is there anything else I could add on the dial plan which will work in similar manner as having left the authentication ON at the config page ?

Many thanks for your assistance mate, much appreciated.

Rgs
Mark
Back to top
View user's profile AIM Address
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 286
Location: Japan

PostPosted: Fri May 15, 2009 1:41 am    Post subject: Reply with quote

Hi Mak,

I'm glad to know you made some progresses.

I wonder.. Are you providing a VoIP service?
If you are a VoIP service provider, I recommend that you set "ON" for Authentication both INVITE and REGISTER at Config page.

Even so, your DialPlan should work and it can accept a call from the ITSP.
Back to top
View user's profile
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Sun May 17, 2009 2:43 pm    Post subject: Reply with quote

Cheers Harold and Hope, much appreciated as everything is working well. We are new to Voip and are trying to become a Voip provider.

I had to change the RTP setting to ON all the time as when it was left to auto calls didnt pass some of the time.

Also I was expecting the transport to be UDP but it showing as RTP/AVP.

Other issues were firewall and port forwading especially having more than 2 devices that require port 5060.

Fingers x till next time. Smile

Rgs
Mark
Back to top
View user's profile AIM Address
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 286
Location: Japan

PostPosted: Fri May 22, 2009 6:10 pm    Post subject: Reply with quote

which country are you in ? Do you have a website for the service?

>> Also I was expecting the transport to be UDP but it showing as RTP/AVP.

You don't have to worry about it.
"RTP/AVP" is OK. Even so RTP packets are sent over UDP.

>> Other issues were firewall and port forwading especially having more than 2 devices that require port 5060.

Set a different port number at the setting of devices.
Back to top
View user's profile
Mak
Brekeke Member


Joined: 06 Feb 2009
Posts: 17

PostPosted: Wed May 27, 2009 6:13 am    Post subject: Reply with quote

Hi Harold,

Cheers mate and sorry the late response.

[quote="Harold"]which country are you in ? Do you have a website for the service?

We are in London UK and our website is being upgraded to allow customers to order online.

We are hoping to try out a wifi sip phone very soon along with a wireless base station from Korea which has a potential range of a mile (radius) and by adding few repeaters who knows ! Bobs you uncle Smile all in the drawing board for now.....

keep you posted mate.
Back to top
View user's profile AIM Address
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