Howto:Handle overlapping or partial Extensions

From innovaphone wiki
Jump to navigation Jump to search

Applies To

This information applies to

  • all gateways, Firmware V8 or later

More Information

When customers migrate their PBX numbering plan from shorter to longer extension (say, from 3 to 4-digit extensions), there is a need to map the old shorter extension to the corresponding new longer extensions. As the PBX does not allow to create objects with overlapping Number properties (e.g. two objects with Numbers 200 and 2009, this must be done in the gateway layer of the corresponding trunk access.

In this article we will assume that the PBX uses 4 digit extension, while 3-digit extension should also be dial-able from the PSTN. However any other digit-length combination can be used.

Problem Details

Since you cannot have overlapping numbers in the PBX, you will have to use different numbers (e.g. instead of 200 we use 2009) in the PBX and map the numbers correctly using the Relay (200 -> 2009).

Unfortunately, the obvious idea to have an incoming map matching the 4 digit extensions (....->) and following that one for the 3 digit extensions (...->9), will not work. This is because a 3-digit caller will hang in the first map forever, as the gateway waits for following digits, which will never come.

Also, swapping the order of the routing table entries will not help either, as then the first map will also match if the caller wants to dial 2001, sending the call to the PBX with the wrong CDPN.


We will route calls from the PSTN to the PBX and try to find a matching extension. Short 3 digit extensions, will trigger an 'Incomplete' - Timeout at the Trunk Line object, which we will use to reroute such calls back to the Gateway level. Here we arrange for the call to be disconnected with a so-called rerouting cause (see Reference:Rerouting_Causes). Because of this, the disconnected call will fall back to the PBX and from there back to the Gateway level (that is, to the first route sending the call from your trunk interface to the PBX). In this route, we provide an additional map that adds the extension digit 9 to the CDPN (->9) and routes it to the PBX again.

Here are the individual configuration steps:

  • In your PBX, create a Gateway object without number and register a Relay-GWx (e.g. GW1) interface at it
  • In your PBX, configure the newly created Gateway' object as Incomplete destination of your standard Trunk line object
  • In the Gateway/Routing table, create a route from your GWx (e.g. GW1) to DISC and use a re-routing cause code (e.g. 44) when disconnecting the call
  • In the Gateway/Routing table, add an additional map to the original trunk-to-PBX route that adds the extension digit and routes the call to the PBX again

Alternative without disconnecting the Call

An alternative would be to send back looped back call directly to the PBX (after adding the extension digit). This would work, however it has the disadvantage that the PBX CDRs would show each call twice (the original and the looped call). With the solution suggested, the CDRs would show a disconnected call with the wrong (i.e. old) CDPN followed by a another call to the correct (i.e. new) CDPN.

SIP Trunks

If a provider doesn't use Overlap-Dialling (most SIP-providers don't support it), you can use the simplified solution explained in the Problem Details section. Using our example, you can just have a map matching the 4 digit extensions (....->) and following that one for the 3 digit extensions (...->9).

A 3-digit caller will not hang in the first map forever, because it is signalled to the gateway that the sending of the number is complete. It will therefore skip the 4-digit map, and try to apply the following maps.

Nevertheless the previously described solution for ISDN-trunks will work also for such SIP-trunks, it is just more complicated to configure.

Related Articles