How to create dial patterns for India

This post is related to Asterisk and Elastix, An open source telephony software developed by Mark Spencer.

What is a Dial Pattern?

The pattern and numbers used by a phone user to dial out and reach a number is called Dial patterns. This is used by PBX to re-route towards any route is known as Dial Pattern. Alphanumeric and special characters are used as matching patterns in dial patterns. Writing Dial pattern is an essential thing for any PBX design. One must plan carefully afore to avoid drastic changes that may case a lot of confusions.

The following are the patterns that can be used in Asterisk based Open Source PBX.

  • X — Any digit between 0 and 9
  • N — Any digit between 2 and 9
  • Z — Any Non-Zero digit. (E.g. 1 to 9)
  • [Any] — Any one character or may not be nothing. Any one of the character inside the square bracket will be matched. Eg. [01*#] would match 0 or 1 or * or #. Another option to specify range is hyphen symbol “-“. Eg. [0-3] means either 0 or 1 or 2 or 3, ie. Between 0 and 3, any number.
  • . — Wildcard. Match any number of anything. Must match *something*.
  • | — Dont forward. This will break the sequence. The following digits only forwarded to the route. Typically used for 0 dial-out by not sending 0 on outbound trunk.

Outbound Routes

Outbound routes are the containers of Dial patterns to route the traffic to outbound network. Most probably PSTN. Every time you dial a number, asterisk will do the following in strict order:

  • Check and Verify the dialed number.
  • Compare with first pattern. If matches then route through the trunk defined in destination field. Else check against second rule. Just like if else case.
  • Send the remaining numbers to destination trunk and patch source and destination links.

Example Dial patterns for India

For a MNC ship building company’s Chennai branch I have created the following different patterns.

  • Emergency
  • Local
  • STD
  • International
  • Toll free
  • SIP Trunk/Another PBX

Emergency

This outbound route matches all the emergency numbers available in India. In India usually the emergency numbers starts with 1. Eg. 100, 108, 1098 etc.,

Dial patterns

  • 1XX
  • 1XXX
  • 1XXXX

Trunk Sequence: ZAP/g0

Its better to leave emergency dialling without zero dialing. As these plans are used only on emergency, people are more unlikely to dial 0 and then 108. To better provide emergency services you can change like this.

  • [0]1XX
  • [0]1XXX
  • [0]1XXXX

Yes. This will allow both 108 and 0108. Thus help however user dials out.

Click Submit changes followed by the confirmation bar on top and you are done.

clip_image004

Local Landlines

Speak with customer to findout which dialling is required. Direct dialing or 0-dialing.

In case of direct dialing, you need some specific requiremetn. In India all numbers from 0 to 9 are already used except 5. 5 is not used for Voice services, but only for premium SMS facilities. So if customer wants direct dialing user 5 as extensions eg. 501, 502 etc. and write dial pattern to avoid confusions.

In case of 0-dialing, Outbound calls need to make with preceding zeros. First zero will be stripped out and remaining characters will be sent to PSTN. Local mobile numbers starts with either 9 or 8 or 7. Local landline numbers starts with 2,3,4, or 5. STD codes of Tamilnadu starts with 4 as first digit and second digit from 1 to 6 only. 7-9 belongs to kerala. So don’t use them in local pattern.

Local Chennai numbers starts with the following numbers. 2, 3, 4, 5, 6.
2 for BSNL/MTNL
3 for Reliance
4 for Airtel
5 for future use/Premium SMS numbers
6 for Tata indicom
STD code for Chennai is 044. Even if an intercom user call with 044 server will dial the number out.

  • 0|[2345]XXXXXXX
  • 0|044[2345]XXXXXXX

clip_image006

STD

Telephone numbers of India is exactly 10 digits long. 0 is for trunk dialing implemented by service provider.  If you have another PBX that you need to pass through, then design dial plan according to it. The project I last worked, had requirement of making STD calls through a Ericsson PBX. So two zeros were needed to dial out.

  • 04XXX[2-3]XXXXX
  • 04XX[2-3]XXXXXX
  • 04X[2-3]XXXXXXX
  • 0[987]XXXXXXXXX

clip_image008

ISD

Sadly ISD calls need three numbers to dial out International calls. We don’t know how long the telephone numbers will be. Every country has different long telephone numbers. So a dot (.) will do the work, but not recommended as it will pave way for Toll Frauds.

Note: In ISDN PRI ISD calls are by default not enabled by service providers. You need to request separately.

Use proper ISDN formats.

Toll Free

You will need the following patterns to match Toll free dialing. In your Dial patterns box, you will see something like this

  • 1800NXXXXXX
  • 1866NXXXXXX
  • 1877NXXXXXX
  • 1888NXXXXXX

clip_image010

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s