Table of Contents

Dial Plan Syntax
Simple dial plans
SPA-2/3000 Specific Dial Plans
SPA-3000 Specific Dial Plans
Putting it all together
SPA-2000
SPA-3000
SPA-3000 with SIP Broker
Other ATAs and VSPs
Dial Plan Conflicts
Back to main page

Dial Plan Syntax

( ) The entire dial plan must be surrounded by an open and close bracket.
| Each dial plan is separated from the next by the pipe |, but the first and last part of the dial plan only have an opening and closing bracket respectively.
0-9 Treated as normal digits
x Treated as any normal digit 0-9 on phone
* Treated as normal * character on phone
# Treated as normal # character on phone
. Repetition eg x. means any numeric digit (x) repeated 0 or more times.
< : > Substituation, eg <02:612> means replace 02 with 612
S0 Dial Immediately (capital S zero) For example: 000S0
! Barring a number, place this at the end of the number to prevent it being dialled.
, Provides a dial tone (ie outside line) eg 9,03xxxxxxxx means dial 9 then you will get an outside dial tone so you can dial the number 03xxxxxxxx.
[ ] Limiting choices, eg [24] means either 2 or 4, [2-5] means 2,3,4 and 5, [24-68] means 2,4,5,6,8

For the Sipura SPA-3000 Only
<:@gw0> - Gateway 0 is the PSTN line
<:@gw1> - Gateway 1 (Advanced Feature)
<:@gw2> - Gateway 2 (Advanced Feature)
<:@gw3> - Gateway 3 (Advanced Feature)
<:@gw4> - Gateway 4 (Advanced Feature)

For the Billion Series Only
You will need to set up your VSPs by clicking on the 'VoIP User-defined Profiles' link on the VoIP Wizard page. eg set up
<:@Astratel> - for Astratel
<:@Pennytel> - for Pennytel etc

<:@pstn> - is for the PSTN line

x.T - dial plan strings for the Billion need a T at the end.
[89]xxxxxxx# is used to send the call immediately without waiting

Simple dial plans


(<0:61>xxxxxxxxx)
Description:<0:61>xxxxxxxxx You dial, for example, 02 9678 5555 and the unit will convert this to 612 9678 5555 and dial out over Line 1 (VoIP)

(<:613>xxxxxxxx)
Description: You dial, for example, 9678 5555 and the unit will convert this to 613 9678 5555 and dial out over Line 1 (VoIP). <:613> effectively prepends the characters 613 to the front of any dialled number of the form xxxxxxxx (ie 8 numbers).

(<*1:0123456789>)
Description: This plan demonstrates replacement. If you dial a * followed by a 1 then the number 0123456789 would be dialed.

(<0:61>[2-9]xxxxxxxxS0)
Description: This plan demonstrates replacement and limiting choices. When you dial an 0 followed by a 2,3,4,5,6,7,8 or 9 and then nine of any other digit (0-9) it will prepend 61 and remove the 0. So if you rang 02 123456789 the actual number that would be called would be 61 2 123456789.

(<:07>[2-9]xxxxxxxS0)
Description: This plan demonstrates prepending an area code onto a local number. The reason you use [2-9] as the first digit is to exclude other interstate number ie 0[2345689] and also to exlude 1800, 1300, 13 etc

(1900xxxxxx!)
Description: This plan demonstrates number barring. If you enter a 1900 followed by 6 more digits (0-9) you call will not be placed.

SPA-2/3000 Specific Dial Plans

(*xx.)
Description: This dial plan allows the Sipura configuration menu to operate from your handset. It allows any number that is dialed starting with * (including xxxx.gif).

SPA-3000 Specific Dial Plans

(000S0<:@gw0>)
Description: The above dial plan is extremely simple, yet extremely important. When you dial 000 (Emergency number) your call will go out through Gateway 0 (<:@gw0) which is your normal PSTN line immediately (S0) after you have dialed the 3rd 0.

<:03>[23567]xxxxxxx<:@gw2>)
Description: You dial, for example 5678 5678 and the unit will convert this to 03 5678 5678 and dial out through gateway 2 (which you will have set up with another provider). This sequence will only match when you dial a number that starts with either 2,3,5,6 or 7.

(<#9:>xx.<:@gw0>)
Description: This plan demonstrates replacement and repetition. When you enter a #9 followed by any number of digits(a timeout is used to determine the end) it will go out through the PSTN line (Gateway 0).

(000S0<:@gw0>|1800xxxxxxS0<:@gw0>)
Description: The above dial plan contains two individual plans. You will notice that a | separates the 1st dial plan from the 2nd .The 2nd dial plan is used to route 1800 numbers through the your PSTN line. Any number that starts with 1800 followed by 6 other digits (0-9) it will be directed through your PSTN line.

(1800xxxxxxS0<:@gw0>|1300xxxxxxS0<:@gw0>|13[1-9]xxxS0<:@gw0>)
Descrption: The above plan contains 3 plans combinded. It sends all free call numbers through the PSTN line.

(*xx.|xx.)
Description: This plan catches SPA system codes that are initiated by first pressing xxxx.gif. The second part of the plan is the default to accept all numbers dialled.

Putting it all together

You can basically cut and paste any dial plan snippets that you want to use. There is no 1 correct way to set up a dial plan. Below are a few working dial plans that you can use to get you started, and then tweak from there.

SPA-2000

(*xx|13[1-9]xxxS0|1[38]00xxxxxxS0|190xxxxxxx!|000S0|0011xxxxxx.|[2-9]xxxxxxxS0|0[2-9]xxxxxxxxS0)
Description
*xx = special *number dial
13[1-9]xxx = dial pizza numbers etc
1[38]00xxxxxx = 1300 and 1800 numbers
190xxxxxxx! = disable 1900 numbers (remove ! to enable)
000 = Fire/Police/Ambulance
0011 = International
[2-9]xxxxxxx = any local number
0[2-9]xxxxxxxx = any interstate numbers


SPA-3000

(000S0<:@gw0>|*xx|<#9:>xx.<:@gw0>|1[38]00xxxxxxS0<:@gw0>|190xxxxxxx!|13[1-9]xxxS0<:@gw0>|<#1,:>[x*][x*].<:@gw1>|xx.)
Description
000S0<:@gw0> = Fire/Police/Ambulance through the PSTN number
*xx = special *number dial
<#9:>xx.<:@gw0> = Dial #9 followed by any phone number to call via PSTN
1[38]00xxxxxxS0 = 1300 and 1800 numbers via PSTN
190xxxxxxx! = disable 1900 numbers (remove ! to enable)
13[1-9]xxxS0<:@gw0> = 13 numbers via PSTN. the [1-9] filters out 1300 numbers.
<#1,:>[x*][x*].<:@gw1> = Dial #1 followed by any number to dial via Gateway 1. (NB need to configure gateway 1 for another VSP).
xx. = any other number dialled

SPA-3000 with SIP Broker

(000S0<:@gw0><#9:>xx.<:@gw0>|1[38]00xxxxxxS0<:@gw0>|190xxxxxxx!|13[1-9]xxxS0<:@gw0>|04xxxxxxxx|<:612>xxxxxxxx<:@sipbroker.com>|<0:61>xxxxxxxxx<:@sipbroker.com>|[x*][x*].<:@sipbroker.com>)

000S0<:@gw0> Emergency through PSTN
<#9:>xx.<:@gw0> PSTN over ride
1[38]00xxxxxxS0<:@gw0> 1300 and 1800 through PSTN
190xxxxxxx! Bar 1900
13[1-9]xxxS0<:@gw0>13 xxxx through PSTN (but not 130)
04xxxxxxxxS0 mobile go through VoIP
<:612>xxxxxxxx<:@sipbroker.com> local calls ready for ENUM via SIP Broker
<0:61>xxxxxxxxx<:@sipbroker.com> STD ready for ENUM via SIP Broker
[x*][x*].<:@sipbroker.com> All other by SIP broker by default.

For more details on SIP Broker, refer to the SIP Broker page.

Other ATAs and VSPs

Depending on your ATA and VSP, you may need to use substitution to get 'normal' dialling behaviour. This is because some VSPs require you to dial the area code even if you are in the local area, and others required you to dial the full Australian International code. If this is the case you would modify your dial plan as follows (SPA-2000 plan above has been modified).
(13[1-9]xxxS0|1[38]00xxxxxxS0|190xxxxxxx!|000S0|0011xxxxxx.|<:613>[2-9]xxxxxxxS0|<0:61>[24-9]xxxxxxxxS0)
Description
<:613>[2-9]xxxxxxxS0 = This takes any local number and prepends 613 to the front (for a Melbourne resident. Obviously use 612 for Sydney etc.
<0:61>[24-9]xxxxxxxxS0 = This takes any STD number (except Melbourne) and prepends 613 to the front.


Dial Plan Conflicts

Dial plans strings can sometimes clash with other dial plan strings. If this happens, you can get unexpected results or even a total failure to call out. The following explanation to a dial plan problem I was having is an adaption to a solution provided by MrFusion on the SIP Broker Forum.

This dial plan did not work.
(000S0<:@gw0>|<#9:>xx.<:@gw0>|1[38]00xxxxxxS0<:@gw0>|190xxxxxxx!|13[1-9]xxxS0<:@gw0>|<0:61>xxxxxxxxxS0<:@sipbroker.com>|<:612>xxxxxxxxS0<:@sipbroker.com>|[x*][x*].<:@sipbroker.com>)

When I removed <0:61>xxxxxxxxxS0<:@sipbroker.com>|<:612>xxxxxxxxS0<:@sipbroker.com> from the dial plan, it all worked fine. The purpose of the 2 dial plan strings above was to prepend the country code 61 to all STD Calls (first string) and 612 to all local calls. You need to do this to leverage ENUM dialling. (refer e164.org for more info on this.

The "S0" at the end of each string was causing the problems. "S0" tells the SPA to send the dialled numbers the exact moment there is a match against the digit pattern (ie: don't wait for any more digits to be dialled, just send the number). By definition, if you have 2 dial strings that technically can be matched to the one number, the one with less digits (xxx's) will always match first & therefore wins.

So, what'll happen is that the <:612>xxxxxxxxS0 will always match before the <0:61>xxxxxxxxxS0 and produce unexpected results.

An example. Say you want to dial 0419 123 456:

"0" -- matches both <0:61> and <:612>x
"4" -- matches both <0:61>x and <:612>xx
"1" -- matches both <0:61>xx and <:612>xxx
"9" -- matches both <0:61>xxx and <:612>xxxx
"1" -- matches both <0:61>xxxx and <:612>xxxxx
"2" -- matches both <0:61>xxxxx and <:612>xxxxxx
"3" -- matches both <0:61>xxxxxx and <:612>xxxxxxx
"4" -- matches both <0:61>xxxxxxx and <:612>xxxxxxxx

HOWEVER -- <:612>xxxxxxxx is now completely matched & the S0 says 'send now'.

The SPA will therefore try to dial: 61204191234

Another way to resolve this problem would be to change the dial strings so that conflicts cannot occur. <0:61>xxxxxxxxxS0<:@sipbroker.com> is designed to trap numbers starting with '0'. |<:612>xxxxxxxxS0<:@sipbroker.com> is designed to trap numbers not starting with '0'. The trouble is both strings actually do trap numbers starting with '0' as explained aboved.

So this fix will also work <0:61>xxxxxxxxxS0<:@sipbroker.com>|<:612>[1-9]xxxxxxxS0<:@sipbroker.com>

Dial Plan Syntax

( ) The entire dial plan must be surrounded by an open and close bracket.
| Each dial plan is separated from the next by the pipe |, but the first and last part of the dial plan only have an opening and closing bracket respectively.
0-9 Treated as normal digits
x Treated as any normal digit 0-9 on phone
* Treated as normal * character on phone
# Treated as normal # character on phone
. Repetition eg x. means any numeric digit (x) repeated 0 or more times.
< : > Substituation, eg <02:612> means replace 02 with 612
S0 Dial Immediately (capital S zero) For example: 000S0
! Barring a number, place this at the end of the number to prevent it being dialled.
, Provides a dial tone (ie outside line) eg 9,03xxxxxxxx means dial 9 then you will get an outside dial tone so you can dial the number 03xxxxxxxx.
[ ] Limiting choices, eg [24] means either 2 or 4, [2-5] means 2,3,4 and 5, [24-68] means 2,4,5,6,8

For the Sipura SPA-3000 Only
<:@gw0> - Gateway 0 is the PSTN line
<:@gw1> - Gateway 1 (Advanced Feature)
<:@gw2> - Gateway 2 (Advanced Feature)
<:@gw3> - Gateway 3 (Advanced Feature)
<:@gw4> - Gateway 4 (Advanced Feature)

For the Billion Series Only
You will need to set up your VSPs by clicking on the 'VoIP User-defined Profiles' link on the VoIP Wizard page. eg set up
<:@Astratel> - for Astratel
<:@Pennytel> - for Pennytel etc

<:@pstn> - is for the PSTN line

x.T - dial plan strings for the Billion need a T at the end.
[89]xxxxxxx# is used to send the call immediately without waiting

Simple dial plans


(<0:61>xxxxxxxxx)
Description:<0:61>xxxxxxxxx You dial, for example, 02 9678 5555 and the unit will convert this to 612 9678 5555 and dial out over Line 1 (VoIP)

(<:613>xxxxxxxx)
Description: You dial, for example, 9678 5555 and the unit will convert this to 613 9678 5555 and dial out over Line 1 (VoIP). <:613> effectively prepends the characters 613 to the front of any dialled number of the form xxxxxxxx (ie 8 numbers).

(<*1:0123456789>)
Description: This plan demonstrates replacement. If you dial a * followed by a 1 then the number 0123456789 would be dialed.

(<0:61>[2-9]xxxxxxxxS0)
Description: This plan demonstrates replacement and limiting choices. When you dial an 0 followed by a 2,3,4,5,6,7,8 or 9 and then nine of any other digit (0-9) it will prepend 61 and remove the 0. So if you rang 02 123456789 the actual number that would be called would be 61 2 123456789.

(<:07>[2-9]xxxxxxxS0)
Description: This plan demonstrates prepending an area code onto a local number. The reason you use [2-9] as the first digit is to exclude other interstate number ie 0[2345689] and also to exlude 1800, 1300, 13 etc

(1900xxxxxx!)
Description: This plan demonstrates number barring. If you enter a 1900 followed by 6 more digits (0-9) you call will not be placed.
[[#spa]]

SPA-2/3000 Specific Dial Plans

(*xx.)
Description: This dial plan allows the Sipura configuration menu to operate from your handset. It allows any number that is dialed starting with * (including xxxx.gif).

SPA-3000 Specific Dial Plans

(000S0<:@gw0>)
Description: The above dial plan is extremely simple, yet extremely important. When you dial 000 (Emergency number) your call will go out through Gateway 0 (<:@gw0) which is your normal PSTN line immediately (S0) after you have dialed the 3rd 0.

<:03>[23567]xxxxxxx<:@gw2>)
Description: You dial, for example 5678 5678 and the unit will convert this to 03 5678 5678 and dial out through gateway 2 (which you will have set up with another provider). This sequence will only match when you dial a number that starts with either 2,3,5,6 or 7.

(<#9:>xx.<:@gw0>)
Description: This plan demonstrates replacement and repetition. When you enter a #9 followed by any number of digits(a timeout is used to determine the end) it will go out through the PSTN line (Gateway 0).

(000S0<:@gw0>|1800xxxxxxS0<:@gw0>)
Description: The above dial plan contains two individual plans. You will notice that a | separates the 1st dial plan from the 2nd .The 2nd dial plan is used to route 1800 numbers through the your PSTN line. Any number that starts with 1800 followed by 6 other digits (0-9) it will be directed through your PSTN line.

(1800xxxxxxS0<:@gw0>|1300xxxxxxS0<:@gw0>|13[1-9]xxxS0<:@gw0>)
Descrption: The above plan contains 3 plans combinded. It sends all free call numbers through the PSTN line.

(*xx.|xx.)
Description: This plan catches SPA system codes that are initiated by first pressing xxxx.gif. The second part of the plan is the default to accept all numbers dialled.

Putting it all together

You can basically cut and paste any dial plan snippets that you want to use. There is no 1 correct way to set up a dial plan. Below are a few working dial plans that you can use to get you started, and then tweak from there.

SPA-2000

(*xx|13[1-9]xxxS0|1[38]00xxxxxxS0|190xxxxxxx!|000S0|0011xxxxxx.|[2-9]xxxxxxxS0|0[2-9]xxxxxxxxS0)
Description
*xx = special *number dial
13[1-9]xxx = dial pizza numbers etc
1[38]00xxxxxx = 1300 and 1800 numbers
190xxxxxxx! = disable 1900 numbers (remove ! to enable)
000 = Fire/Police/Ambulance
0011 = International
[2-9]xxxxxxx = any local number
0[2-9]xxxxxxxx = any interstate numbers

[[#SPA3000]]

SPA-3000

(000S0<:@gw0>|*xx|<#9:>xx.<:@gw0>|1[38]00xxxxxxS0<:@gw0>|190xxxxxxx!|13[1-9]xxxS0<:@gw0>|<#1,:>[x*][x*].<:@gw1>|xx.)
Description
000S0<:@gw0> = Fire/Police/Ambulance through the PSTN number
*xx = special *number dial
<#9:>xx.<:@gw0> = Dial #9 followed by any phone number to call via PSTN
1[38]00xxxxxxS0 = 1300 and 1800 numbers via PSTN
190xxxxxxx! = disable 1900 numbers (remove ! to enable)
13[1-9]xxxS0<:@gw0> = 13 numbers via PSTN. the [1-9] filters out 1300 numbers.
<#1,:>[x*][x*].<:@gw1> = Dial #1 followed by any number to dial via Gateway 1. (NB need to configure gateway 1 for another VSP).
xx. = any other number dialled

SPA-3000 with SIP Broker

(000S0<:@gw0><#9:>xx.<:@gw0>|1[38]00xxxxxxS0<:@gw0>|190xxxxxxx!|13[1-9]xxxS0<:@gw0>|04xxxxxxxx|<:612>xxxxxxxx<:@sipbroker.com>|<0:61>xxxxxxxxx<:@sipbroker.com>|[x*][x*].<:@sipbroker.com>)

000S0<:@gw0> Emergency through PSTN
<#9:>xx.<:@gw0> PSTN over ride
1[38]00xxxxxxS0<:@gw0> 1300 and 1800 through PSTN
190xxxxxxx! Bar 1900
13[1-9]xxxS0<:@gw0>13 xxxx through PSTN (but not 130)
04xxxxxxxxS0 mobile go through VoIP
<:612>xxxxxxxx<:@sipbroker.com> local calls ready for ENUM via SIP Broker
<0:61>xxxxxxxxx<:@sipbroker.com> STD ready for ENUM via SIP Broker
[x*][x*].<:@sipbroker.com> All other by SIP broker by default.

For more details on SIP Broker, refer to the SIP Broker page.

Other ATAs and VSPs

Depending on your ATA and VSP, you may need to use substitution to get 'normal' dialling behaviour. This is because some VSPs require you to dial the area code even if you are in the local area, and others required you to dial the full Australian International code. If this is the case you would modify your dial plan as follows (SPA-2000 plan above has been modified).
(13[1-9]xxxS0|1[38]00xxxxxxS0|190xxxxxxx!|000S0|0011xxxxxx.|<:613>[2-9]xxxxxxxS0|<0:61>[24-9]xxxxxxxxS0)
Description
<:613>[2-9]xxxxxxxS0 = This takes any local number and prepends 613 to the front (for a Melbourne resident. Obviously use 612 for Sydney etc.
<0:61>[24-9]xxxxxxxxS0 = This takes any STD number (except Melbourne) and prepends 613 to the front.

[[#conflicts]]

Dial Plan Conflicts

Dial plans strings can sometimes clash with other dial plan strings. If this happens, you can get unexpected results or even a total failure to call out. The following explanation to a dial plan problem I was having is an adaption to a solution provided by MrFusion on the SIP Broker Forum.

This dial plan did not work.
(000S0<:@gw0>|<#9:>xx.<:@gw0>|1[38]00xxxxxxS0<:@gw0>|190xxxxxxx!|13[1-9]xxxS0<:@gw0>|<0:61>xxxxxxxxxS0<:@sipbroker.com>|<:612>xxxxxxxxS0<:@sipbroker.com>|[x*][x*].<:@sipbroker.com>)

When I removed <0:61>xxxxxxxxxS0<:@sipbroker.com>|<:612>xxxxxxxxS0<:@sipbroker.com> from the dial plan, it all worked fine. The purpose of the 2 dial plan strings above was to prepend the country code 61 to all STD Calls (first string) and 612 to all local calls. You need to do this to leverage ENUM dialling. (refer e164.org for more info on this.

The "S0" at the end of each string was causing the problems. "S0" tells the SPA to send the dialled numbers the exact moment there is a match against the digit pattern (ie: don't wait for any more digits to be dialled, just send the number). By definition, if you have 2 dial strings that technically can be matched to the one number, the one with less digits (xxx's) will always match first & therefore wins.

So, what'll happen is that the <:612>xxxxxxxxS0 will always match before the <0:61>xxxxxxxxxS0 and produce unexpected results.

An example. Say you want to dial 0419 123 456:

"0" -- matches both <0:61> and <:612>x
"4" -- matches both <0:61>x and <:612>xx
"1" -- matches both <0:61>xx and <:612>xxx
"9" -- matches both <0:61>xxx and <:612>xxxx
"1" -- matches both <0:61>xxxx and <:612>xxxxx
"2" -- matches both <0:61>xxxxx and <:612>xxxxxx
"3" -- matches both <0:61>xxxxxx and <:612>xxxxxxx
"4" -- matches both <0:61>xxxxxxx and <:612>xxxxxxxx

HOWEVER -- <:612>xxxxxxxx is now completely matched & the S0 says 'send now'.

The SPA will therefore try to dial: 61204191234

Another way to resolve this problem would be to change the dial strings so that conflicts cannot occur. <0:61>xxxxxxxxxS0<:@sipbroker.com> is designed to trap numbers starting with '0'. |<:612>xxxxxxxxS0<:@sipbroker.com> is designed to trap numbers not starting with '0'. The trouble is both strings actually do trap numbers starting with '0' as explained aboved.

So this fix will also work <0:61>xxxxxxxxxS0<:@sipbroker.com>|<:612>[1-9]xxxxxxxS0<:@sipbroker.com>

Back to main page


Konta e-mail, WWW, PHP, MySQL, ftp