Dial Plan Samples

From Vodia PBX Wiki
Jump to: navigation, search

Contents

Typical Dial Plan

A typical dial plan would include the string ([0-9]*)@.* as pattern and sip:\1@\r;user=phone as the replacement. The pattern string has one group [0-9]* (which is referred in the replacement string as \1). That means that if the pattern is matched against the value 2121234567@test.com, it will store 2121234567 in the first group and the result will be sip:2121234567@test.com;user=phone (the user=phone indicates to the recipient that the number is a telephone number).

A Simplified Dial Plan

In many cases, you may just want to route all numbers to an outside trunk. This can be done easily by using the pattern *. You don’t need to fill anything into the replacement field (the system will do this automatically).

Dial-plan-sample-1.png

Dial Plan with Prefix in Front of the Number

If you use a pattern like 1* in the replacement field, the system will automatically put a 1 in front of the match that it found in the pattern field. In the case when you use the pattern 9* and dial the number 92121234567, the system will automatically convert that into a 12121234567.

Dial-plan-sample-2.png

A North American Dial Plan

If you use the snom ONE telephone system in the fixed-length dial plan of North America, you may use a dial plan similar to the one that follows:

Dial-plan-sample-3.png
  • 9[911|411]—The first pattern matches the emergency number and the service number explicitly and sends it to the local gateway. It is a good idea to have an entry for these important numbers so that they don’t accidentally get routed to the wrong gateway.
  • 011*— The second pattern matches all international numbers and sends them to a special trunk, which is intended to save costs for international calls.
  • 1*— The third pattern deals with all domestic calls. The fixed-length pattern was used so that the system can actually tell when this number is complete. You could add another pattern like 91978xxxxxxx and send those calls to another trunk if you have negotiated a flat rate with your local PSTN service provider.

Using Wild Cards with the Auto Attendant

Do advanced Auto Attendant routing using the "x" wild card.

Sending Any 10 Digits or 11 Digits Out on the Trunk

Dp.png

Sending Star Codes on a Trunk

Extended regular expressions can also be used when sending star codes on a trunk.

Dial-plan-sample-4.png

When passing a star (*) to the carrier, a backslash is required before the star (e.g., \*67); otherwise, the system will treat the star and the numbers that follow as a star code. In the sample shown above, a backslash has been placed before the Block Caller-ID (*67) star code, so when the trunk is used, the system will replace the \*67 with a *67, causing the caller-ID to be blocked. (The d in the latter part of the string tells the system to replace it with the domain. If an r had been used, the system would replace it with the registrar.) Important: When using star code patterns in dial plans, you must remove the code from the standard star codes and/or any customized codes. If you’d rather not use star codes in the pattern field but still want to have the dial plan activate a star code, you can use a workaround. You can create a “stand-in” star code that will be used to correlate with the desired star code. In the example shown below, users will need to enter 99 before entering the actual phone number. The system will replace it with the *67 star code. This method allows you to retain the *67 star code as part of the default list of star codes; however, users will need to be informed ahead of time so they that will know to enter 99 before entering the phone number.

Dial-plan-sample-5.png

Forced Matching

The following dial plan illustrates the use of the caret. It’s being used to force the system to begin matching from the start of user input.

Dial-plan-sample-6.png