Upgrade 3CX to v18 and get it hosted free!

Dial plan discussion

Author image

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

Numbering plan

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:

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

[public_FR]
; 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)

[e164-routing]

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)

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.