OCS 2007 dialplan using non-DID numbers

In a previous blog article OCS 2007 dialplan fundamentals I have excluded the complexity around non-DID (Direct Inward Dialing) numbers for syntactic reasons. In this blog article I will describe how to handle non-DID numbers in an OCS 2007 dialplan.

A non-DID number is a phone number, that cannot be reached directly from the PSTN. Such a phone number can be dialed within a corporate PBX/IP PBX network by dialing an extension number, but this extension number is not publicly reachable from the PSTN. However, it is technically possible, if the extension has not been restricted, to dial a PSTN phone number from a non-DID extension. In General, the corporate main phone number will be signaled as calling party number to the external callee so that the external callee can initiate a call back to the user by using this main number. The call back will result in a call to the receptionist or an auto attendant that offers the possibility to the PSTN caller to enter e.g. by DTMF tones to postdial the user’s non-DID extension after the connection had already been established.

To proceed with the example introduced in the blog OCS 2007 dialplan fundamentals:

Within the Frankfurt site there is a number block on the PBX (extension range 50000-50999) that is a non-DID phone number range. The sample company had usually a 4-digit extension range from 1000 to 9999 but with the exception of the 5000-5100 range where this range has been expanded to 5 digits. This is from the German PSTN numbering plan possible as there is no fixed number length as for example in the USA, Denmark or France. If we take a look at the local dialplan for the sample company on the Frankfurt site, it would look like this:

49 country code
69 Frankfurt area code
000 Company’s subscriber number
-0 receptionist/auto attendant/corporate main phone number
-1000-4999 DID phone number range
-50000-50999 Non-DID phone number range
-5100-7999 DID phone number range
-80-89 Cross-site prefixes
-9000-9999 DID phone number range

In the previous blog article OCS 2007 dialplan fundamentals the way to make the DID-phone numbers unique was to expand the user’s phone number to +<E.164> format so that corporate numbering plan matches the PSTN numbering plan. But what about non-DID phone numbers? What’s the correct way to fill in the msRTCSIPLine tel URI field? How to make these numbers worldwide unique as there might not just be an extension 50232 in Frankfurt but also on the other site in Hamburg?

There are – as always – multiple ways to solve this:

Using +<E.164 main phone number>;ext=<non-DID extension> format:

The recommended way for OCS 2007 which has already been mentioned on my friends Jens Trier Rasmussen’s blog would be to expand the phone number to a format that contains the corporate main phone number for the particular site in +<E.164> format followed by a prefix “;ext=” and the non-DID extension. In other words:

+<E.164 main phone number>;ext=<non-DID extension>

For our example the correct format for a Frankfurt non-DID user with the extension 50232 would like:

+49690000;ext=50232

And in the msRTCSIPLine attribute field (Line URI field in AD) you would need to enter:

+49690000;ext=50232

+4969000-0 is the corporate main phone number of the Frankfurt site and 50232 is the non-DID extension of the user. By associating the non-DID extension to a particular site using the site’s main phone number, the non-DID extension became worldwide unique within the corporate telephone network.

Before using this format you have to make sure that in case you have connected a SIP Gateway between OCS Mediation Server and a PBX and you have remaining non-DID users on the PBX, that the Gateway is capable to eliminate the entire prefix “+49690000;ext=” before sending the called party number to the PBX.

For the Location Profile you have to make an additional regular expression rule that expands non-DID extensions to the format as presented above:

Pattern: ^(50\d{3})$
Translation: +49690000;ext=$1

For your convenience I have created an additional Enterprise Voice Route Helper file with an added rule to handle the non-DID phone number range 50xxx following this approach:

 

 

Using an arbitrary prefix to identify non-DID phone numbers:

Another option to make non-DID numbers unique within the worldwide OCS 2007 environment is to choose an arbitrary prefix for each site. An example would be +0001 for the first site, +0002 for the second… This procedure is only recommended if the Gateway or IP PBX that is connected to OCS Mediation Server is not able to handle the recommended syntax as presented above. You need to have rules configured on the Gateway or IP PBX that manipulate the called party number on outbound OCS calls by removing the arbitrary prefix and eventually replacing it with a DID main phone number.

Here is an example: A Gateway is connected between OCS Mediation Server and a PBX. An OCS user in Frankfurt dials 50232 in order to reach a non-DID PBX user on the same site. As the user has not been migrated to OCS yet, the call will be sent to OCS Mediation Server/Gateway. A normalization rule has been added to the Frankfurt Location Profile expanding non-DID phone numbers with a prefix +0001 (e.g. +000150232) that represents the Frankfurt site. On the other hand a rule has been configured on the Gateway that eliminates the prefix before sending it to the PBX so that on the PBX just the extension 50232 arrives. Downside of this procedure is that for every site you should have a dedicated prefix and you have to keep a manual translation table matching prefixes to sites.

The regular expression that needs to be added to the Location Profile when following this approach looks like:

Pattern: ^(50\d{3})$
Translation: +0001$1

For your convenience I have created an additional Enterprise Voice Route Helper file with an added rule to handle the non-DID phone number range 50xxx following this approach:

 

 

Using the subscriber number as arbitrary prefix to identify non-DID phone numbers:

The last option is to use the local corporate subscriber number (+4969000 in our example) in order to create a fake +<E.164> format number to handle non-DID extensions. This procedure is also just recommended in those situations if the Gateway or IP PBX that is connected to OCS Mediation Server is unable to work with the “main number ;ext=” prefix. The advantage of this procedure compared to the procedure above using an arbitrary prefix is that you only need one rule on the Gateway to remove +4969000 as a prefix before just sending the 4- or 5-digit extension number to the PBX/IP PBX.

The regular expression that needs to be added to the Location Profile when following this approach looks like:

Pattern: ^(50\d{3})$
Translation: +4969000$1

For your convenience I have created an additional Enterprise Voice Route Helper file with an added rule to handle the non-DID phone number range 50xxx following this approach:

 

Comments

  • Anonymous
    January 01, 2003
    Looks like Dial-in Conferencing Agent cannot understand +<E.164 main phone number>;ext=<non-DID extension> format. It worked fine with DIDs, I switched it to non-DID numbers and now when I am trying to register an external participant using its ext. number and PIN authentication fails. A full number would possibly work, but I do not know how to enter a bus number+extension (I tried put all digits together - no luck). -Alex