Dial plan

Dial plan discussion

This page discusses the generic concept of dial plan, and compares it with numbering plan and routing plan.

Numbering plan

(See also Numbering plans for some publicly-defined numbering plans.)

In its simplest form, a numbering plan allows for the addressing of elements in a voice network. It is a tool used by a voice network administrator to manage the allocation of numbers to entities on that network.

More precisely, ITU Recommendation I.331 defines: “A numbering plan specifies the format and structure of the numbers used within that plan. It typically consists of decimal digits segmented into groups in order to identify specific elements used for identification, routing and charging capabilities, e.g. within E.164 to identify countries, national destinations, and subscribers. A numbering plan does not include prefixes, suffixes, and additional information required to complete a call.�

Numbering plan vs dial plan vs routing plan

A dialplan would include prefixes, suffixes and additional information required to complete a call. A dialplan is all about end-user experience and gives a local view of the numbering plan in a given context (e.g. the context of the caller).

A routing plan (or routing strategy) provides information on how a given call should be routed from one point in the voice network to another point. In its simplest form a routing plan will provide "next hop" information as to which trunk (analog, digital or IP) to use to attempt to connect a call to a given number in the numbering plan. However, routing plans generally include more information such as time-of-day routes, least-cost routes (LCR), etc.

Dialplan in Asterisk

One of the difficulty in designing good dialplans in Asterisk comes from the fact that the extensions.conf file plays many roles: it defines the dialplan (= how digits dialed by a caller are mapped to a meaning or an entry in the numbering plan), classes of service, and the routing plan. Generally this can be worked out by segregating dialplan and classes of service on one side, and routing plan on the other side. The two can then be connected by using Goto statements to assign a route to a role in the dialplan.

Here is an example of a extensions.conf that has a generic notion of E.164 route, but no notion of class-of-service:

; call from a phone in the US
exten => 1NXXNXXXXXX,1,Goto(e164-routing|${EXTEN}|1)
exten => 011.,1,Goto(e164-routing|${EXTEN:3}|1)

; call from a phone in France
exten => 0[2-6]XXXXXXXX,1,Goto(e164-routing|33${EXTEN:1}|1)
exten => 00.,1,Goto(e164-routing|${EXTEN:2}|1)

least-cost routing
provider1 is cheaper than provider2 for the US
exten => 1NXXNXXXXXX,1,Dial(SIP/provider1)
exten => 1NXXNXXXXXX,2,Dial(SIP/provider2)

least-cost routing
provider2 is cheaper than provider1 for France geographical numbers
exten => 33[2-5]XXXXXXXX,1,Dial(SIP/provider2)
exten => 33[2-5]XXXXXXXX,2,Dial(SIP/provider1)

least-cost routing
provider3 is cheaper than provider2 for France mobile numbers
exten => 336XXXXXXXX,1,Dial(SIP/provider3)
exten => 336XXXXXXXX,2,Dial(SIP/provider2)

Created by: shimaore, Last modification: Mon 20 of Jun, 2005 (16:32 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+