Part 2. How’d ya like to trade in that old PBX for a shiny new OCS environment?

So after discussing the things we might want to do with OCS and our legacy PBX, it’s time to roll up our sleeves and take a look at how it all works.  This isn’t meant to be a deployment guide by any stretch of the imagination, more of an overview of what will need to be, independent of what PBX or gateway you have.

Assumptions for this post

Extensions are 3 digits

DID’s are (513) 555-1XXX  (where XXX matches the extension)


PST and Gateway Notes

When selecting your gateway you need to know how many PRI\T1 ports you will connect to the PSTN and how many you will connect to your legacy PBX.  If you have 2 incoming PRI/T1’s, you will need a total of 4 PRI/T1 ports on your gateway to allow 100% of your capacity to pass through to your PBX.   You will also need T1 crossover cables to connect from the gateway to your PBX (  If you currently have analog devices such as fax machines or paging system, you will need FXS ports on your gateway to allow those devices to connect without the PBX in the future (verify the device will connect with to FXS with the device vendor)


PBX Notes

The PBX needs to be able support forwarding; most times this can be accomplished just by reprogramming the extensions to forward out.  If all of your extensions have DID’s, the easiest way to accomplish this is to forward the extension to the DID of the user. 

If you don’t have DID’s you can pick a range of numbers not in use in your area and get creative in the manipulation tables on the gateway (more on that later).


Configuration Notes – Gateway

Here are a couple of quick things to note on the gateway configuration: 

  • If you have multiple PRI/T1’s you will want to trunk them together to act as one connection, this will help in routing.
  • You will need to know the signaling/clocking method of your current PRI/T1, this can be found in the current PBX
  • When configuring signaling on your gateway, the PSTN connect trunks should be set to slave from the PSTN (if your PBX was) and the trunk facing the PBX should be set to generate.
  • Your inbound lines will come in from the PSTN with a DNIS, this number is typically 4 to 10 digits.  You will need to work with your phone vendor or check your PBX routing tables to see what DNIS routes to what extension internally. 

Manipulation will need to occur on the gateway to convert the DNIS numbers that will be hosted in OCS to an extension.  For this example we will assume the DID of (513)-555-1205 has a DNIS of 1205 and will go to extension 205 in OCS.  The gateway will need to have Destination Tel to IP manipulation configured to remove the first character of the DNIS and a “+” to the left side of the extension (OCS likes the E.164 formatting).  You will also need to configure Source IP to Tel manipulation to manipulate 205 outbound back to 5135551205 for call ID, for that you can add 5135551 to the left side of the source.


On to routing, the gateway will actually allow us to route calls between OCS and the PBX, not just the 2 systems and the PSTN.  A very important thing to note about this configuration, we have to do all of our routing AFTER manipulation.  The easiest way to accomplish routing is to route all traffic in 3 and 4 digit format without a “+” to the PBX trunk (assuming you have a 4 digit DNIS).  All 3 digit numbers with a “+” will then route to OCS, with all other traffic (typically a *) routing to the PSTN.  Since we configured Destination Tel to IP routing above, someone calling OCS from the PBX will match that rule and get manipulated and routed the same as a call from the PSTN.


What’s it look like?

Here’s a basic diagram of what your design will look like:

Base Co-X with PBX


Check back for part 3 where I will dive into the OCS side of this scenario.

About Kevin Peters

My name is Kevin Peters.
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s