DID Rewrite

DID Rewrite

DID Rewrites allows you to adjust the dialed number just before it is sent to the SIP provider.

May SIP providers require a number to be in a specific format for it to be accepted. Rewrites allows you to modify any dialed number to conform to the SIP providers requirements.

The DID rewrite matches agains the dialed number (DID) and modifies the Dialed number.

A Rewrite consists of a:

  • Pattern which is used to match numbers dialed
  • Strip prefix length which optionally removes digits from the start of the dialed number
  • Replacement prefx which optionally adds new digits to the start of the dialed number.
  • Area Code Strip prefix length which is used to remove digits of the Handset's associated Area Code
  • Area Code Replacment prefix which optionally adds new digits to the start of the Area Code

Note: Area Code Rewrites are ALWAYS ignored by the dialer as the dialer generally does not know the Handset the call will be delivered to until after the call is connected. This is not an issue as the dialer requires full 10 digit phone numbers.

The Area Code rewrite needs a little explaining.

Each Handset is associated with an Office which can have an Area Code. This is particularly useful if you have staff located in Offices in different States. Each Office will have its appropriate Area Code set. When a user dials a 'local' eight digit number, a DID Rewrite can be created to automatically prepend their Area Code to make a full 10 digit phone number.

Example (1)

Handset: 105 with Area Code 03

User dials a local number: 8320 8100

SIP provider requires the full area code on any number dialed:

Pattern: XXXX XXX

Strip prefix Length: 0

Replacment prefix: 

Area Code Strip Length: 0

Replacement Prefix: 

The pattern matches 8320 8100 and adds an 03 prefix to give 03 8320 8100

Note: with the DID Rewrite the number would be pass through verbatium and hence no Area Code.

Example (2)

Handset: 105 with Area Code 03

User dials a national number: 02 8320 8100

SIP provider requires the full internatinal code on any number dialed:

Pattern:XX XXXX XXX

Strip prefix Length: 1

Replacment prefix: 612

Area Code Strip Length: 2

Replacement Prefix: 

The pattern matches 02 8320 8100, strips the leading '0' to give 2 8320 8100 and then adds an  prefix of 612 to give 612 8320 8100. 

As the no. dialed was a full 10 digits you don't want to prepend the Area Code so you need to strip it away completely with an Area Code Strip Length of '2'.

Patterns

The order of patterns is important. When looking for a pattern that matches a phone number the system starts from the top pattern and evaluates each pattern in order until a match is found. That pattern is applied and any further patterns are ignored.

Fields

Field Description
Name A name for the pattern that will be meaningful to you.
Description A description of what the pattern is used for.
Pattern The Pattern that dialed no.s will be matched against. If the number matches then the rewrite will be applied.
Strip Prefix Length The number of digits to strip off the start of the dialed number.
Replacement prefix The digits to add to the start of the dialed number after the strip prefix has been done.
Test Phone No. This is a convenience field that allows you to enter a phone number that you expect to match the Pattern. Enter a phone number and Area Codeand then click the Test button. The results will be displayed in the Results field.
Area Code Strip Prefix Length The number of digits to strip off the start of the Handsets Area Code
Area Code Replacement Prefix The digits to add to the start of the Area Code after the strip prefix has been done.
Test Area Code This is a convenience field that allows you to enter a sample Handset's Area Code. Enter a phone number and Area Codeand then click the Test button. The results will be displayed in the Results field.
Results Displays the results of the test.