MavEtJu's Distorted View of the World

Distributed telephony done properly

Posted on 2009-10-12 19:00:00
Tags: Asterisk, Voice over IP

Recently I have been involved in the design and installation of a global VoIP telephone system and learned a few valuable lessons.

The call-flow design and requirements were as follows:

So far nothing spectacular, but the issues came when mapping calls on the network.

Normally people differentiate between internal and external calls by dialing the 0 (or 9 if you are stuck with an American based PABX, or 91 if you want to make a long distance call in the USA) before dialing the local number. After the 0, you more or less have captured a channel on the PRI and are able to call anything via that, local or national or international as long as you play via the rules of that PSTN. For example in Sydney, Australia: You can dial an eight digit local number, a ten digit local number or a ten digit national number. And if you prefix your call with a 0011, you end up on an international call.

On a distributed telephone system connected to various PSTNs, this will be a nightmare for the people to remember (0, 0011, 86 plus a string of numbers for China) which has to be translated by the PABX to +86 plus a string of numbers which has to be send to the PABX in China so it knows how to translate it back to the a China local number etc etc etc. Both a nightmare for the users and for the PABX maintainers, plus a nightmare for the travelling salesman.

So, instead of having a single prefix for an external line for a local or national call and an international call, let's split it: Prefix local or national calls with a 0 and make the international access an *. Yes, that's a * because it looks most like the international prefix +. So the PABX maintainers now know when to handle local calls and national calls.

The only tricky part is left over with the international calls, but it is less tricky than what it was. Instead of having to write a different parser for for each country to figure out when an international call is placed, they just check for the * prefix: No check of 0,0011 in Australia, an 9,011 in the USA, 0,00 in Europe, just check for the *. Next is to map of the next one, two or three numbers on the remote destination telephone system, which we just send their national call telephone number and wait for it to be connected.

So, if you have enough local offices, you will be able to call a lot of international telephone numbers for the cost of a national telephone call!

So no more 9,0011 1 415 123 4567 to call, just *1 415 123 4567! It will save money (It will be a cheap local call for the telephone system. Or a free call if the destination is a free number), it will reduce the number of buttons to press (9,0011 -> *) and it will prevent from making silly counting mistakes (missing 1 in the string of numbers to be pressed).

The whole system was implemented on the open source PABX Asterisk and a central monitoring / configuration server which kept track of which international prefixes needed to be forwarded to which telephone system. The implementation showed that its fail-safe design worked as expected when the office in Germany lost its internet connectivity for a three days and nobody complained that their calls to Germany didn't work anymore.

The overal telephone bill got reduced to 20% of the original cost, having the whole system paying for itself it as little as eleven months! (Although we still have three months to go :-)

So: Stop thinking about local calls and national calls and international calls, only think about local / national calls and international calls. Don't think about local international call prefixes, handle that on the PABX. International calls should be routed to remote PABXs which handle it locally. And only if a remote call can't be completed due to no free PRI channels or the remote PABX not being reachable, then handle it locally.

| Share on Facebook | Share on Twitter
Comments: No comments yet
Leave a comment
Back to the main page