Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Dial Plan To perform One Stage Dialing
Author Message
klgoh
Brekeke Junior Member


Joined: 10 Feb 2012
Posts: 5

PostPosted: Sun Mar 11, 2012 3:21 am    Post subject: Dial Plan To perform One Stage Dialing Reply with quote

1. Brekeke Product Name and version:
Brekeke SIP Server 2.4.8.6 Standard

2. Java version:


3. OS type and the version:
Windows Server 2008

4. UA (phone), gateway or other hardware/software involved:
Grandstream HT-286, Grandstream HT-503

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

6. Your problem:

I am having Grandstream HT-286 & Grandstream HT-503 FXO port login as extension 101 & 100 respectively. HT-503 FXO is connected to the PSTN line. At the moment, ext 101 have to dial 100 and when hear the PSTN dial tone will continue to dial the PSTN number (two stage dialing).

I would like to use the dial plan to do one stage dialing. Example, ext 101 want to dial a PSTN number 45781234, we just dial 10045781234.

I tried the following dial plan:

Matching Patterns
$request = ^INVITE
To = sip:100(.+)@

--------------------------
Deploys Patterns

To=sip:100@
DTMF=%1

-------------------------

I can hear the PSTN dial tone but it do not dial the PSTN number (it do not send the DTMF number)

Please help.
Back to top
View user's profile
klgoh
Brekeke Junior Member


Joined: 10 Feb 2012
Posts: 5

PostPosted: Sun Mar 11, 2012 8:14 am    Post subject: Reply with quote

I made some changes in the Dial Plan as follows and it is working:

Matching Patterns
$request = ^INVITE
To = sip:100(.+)@

--------------------------
Deploys Patterns

To=sip:%1@IP_Address_and_port_no_of_ext_100

-------------------------

But the IP address is keep changing (due to the ext 100 is using dynamic IP). I need a way to refer the IP address of ext 100 from the register database. I tried the following in the Deploys Patterns but it can not work.

To=sip:%1@$regaddr("100")

Anyone know how to get the IP address and port number from the register database and include it in the dial plan?
Back to top
View user's profile
davi
Brekeke Addict


Joined: 26 Jan 2011
Posts: 34

PostPosted: Mon Mar 12, 2012 9:58 am    Post subject: Reply with quote

It seem you did a pretty good job.

Try this.
Matching Patterns
$request = ^INVITE
To = sip:100(.+)@
$regaddr( "100" ) = (.+)


--------------------------
Deploys Patterns

To = sip:%1@%2
-------------------------
Back to top
View user's profile
klgoh
Brekeke Junior Member


Joined: 10 Feb 2012
Posts: 5

PostPosted: Thu Mar 15, 2012 8:32 am    Post subject: Reply with quote

Thanks Davi. It is working now.

Now I want to enhance the dial plan. My extension number is six digits. ie 600012. I am using the first five digits as group ID and the last digit as extension number. I always use suffix "1" as extension with FSO port connect to pstn line. ie 600011 is the extension connect to PSTN. I want all the extension with the same group ID use the same group ID FXO extension. ie: 600012 to 600019 will use 600011 for PSTN connection. When these extension dial 9xxxxxxxx (x are PSTN number) the dial plan will use the group ID + suffix 1 as extension number ie:600011 and connect to the FXO port as 1 stage dialing.

___________________

Matching Patterns
$request = ^INVITE
From = sip:(6[0-9]{4}).+@
To = sip:9(.+)@
$regaddr( "%1"[1] ) = (.+)

-------------------------------
Deploys Patterns

To=sip:%2@%3

--------------------------------

I used the above dial plan but it can not work. I know the problem is at $regaddr( "%1"[1] )=(.+). Anyone know how to joint %1 with a digit 1 as suffix and pass as aggument to the function $regaddr ?
Back to top
View user's profile
davi
Brekeke Addict


Joined: 26 Jan 2011
Posts: 34

PostPosted: Thu Mar 15, 2012 12:26 pm    Post subject: Reply with quote


Matching Patterns
$request = ^INVITE
From = sip:(6[0-9]{4}).+@
To = sip:9(.+)@
$regaddr( "%11" ) = (.+)


--------------------------
Deploys Patterns

To = sip:%2@%3
-------------------------
Back to top
View user's profile
klgoh
Brekeke Junior Member


Joined: 10 Feb 2012
Posts: 5

PostPosted: Thu Mar 15, 2012 9:11 pm    Post subject: Reply with quote

Thanks Davi. It is working as I wanted. Thanks a lot.
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