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,