News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Trunk Group to route calls

Started by azrobert, June 07, 2014, 06:47:03 AM

Previous topic - Next topic

azrobert

I recently started to investigate Trunk Groups and I found that in addition for failover they can also be used for normal routing significantly reducing the code of a complex configuration. Also a single Trunk Group can be used for multiple failovers.

This isn't for everybody because it requires re-coding all the DigitMaps and Routes.

Here is my TG1 definition:
List: vg1,sp1,sp2,vg2,li,vg3,pp
DigitMap: (Mph)

VG1 is for 800 numbers.

SP1 is my primary route and the DigitMap rules don't have prefixes.
SP2 and VG2 are backups for SP1 and their DigitMaps contain the same rules as SP1.

Line DigitMap rules have a prefix except for 911.
VG3 is backup for Line and contains similar rules as Line.

Excluding SP1 and VG1 all trunk DigitMaps contain rules with prefixes, so I can route calls directly to them using a prefix. The failover trunks in addition to the failover rules also contain rules with unique prefixes.

Here is my complete Phone Port OutboundCallRoute:
{***:aa2},{(Mtg1):tg1}

The same Trunk Group can be used for bridging inbound calls:

My SP2 X_InboundCallRoute:
{UserID2>0:ph},{>UserID1:ph},{UserID2>(Mtg1):tg1}

My ObiTalk InboundCallRoute:
{200222222>0:ph},{200222222>(Mtg1):tg1}

Here is an example DigitMap configuration:

ITSP A DigitMap:
(1xxxxxxxxxx)

ITSP B DigitMap:
(1xxxxxxxxxx|<**2:>1xxxxxxxxxx)

VG1 DigitMap:
(18(00|88|77|66|55|44)xxxxxxx)

VG2 DigitMap:
(1xxxxxxxxxx|<**4:>1xxxxxxxxxx)

VG3 DigitMap:
(**81xxxxxxxxxx|**61xxxxxxxxxx|911)

Line DigitMap:
(<**8:>1xxxxxxxxxx|911|<#:>)

The Phone Port DigitMap must verify and NOT alter numbers for all trunks:
(1xxxxxxxxxx|**[24689]1xxxxxxxxxx|911|***|#)


Dial 18005551212 and the call will be routed out VG1

Dial 14805551212 and the call will be routed out SP1
If the call fails it will be re-routed to SP2
If SP2 fails it will be re-routed to VG2

Dial **214805551212 and the call will be routed out SP2
Dial **414805551212 and the call will be routed out VG2

Dial **814805551212 and the call will be routed out Line
In my case if the PSTN line is not connected the call will be re-routed to VG3

Dial **614805551212 and the call will be routed out VG3
Calls to VG3 will retain their prefix.

Hope this helps someone. Happy coding,


azrobert

I screwed up my DigitMap example. I was adding a prefix instead of removing it. The example has been corrected.

ianobi

Nice coding! My present setup is a hybrid of what you suggest and a more standard model. A big advantage of your setup is the removal of repeated coding in outbound and inbound call routes where a simple {(Mtg1):tg1} type rule covers all.

Most setups grow a bit at a time as new functions are added, your post has made me realise that it's time for me to take a step back and look at my overall setup from scratch. It's now on my "to do" list, right after moving home   :)