Dial patterns in trunk or outbound route

Hi All

Here is the situation for which I need advise and a solution

OpenVox A400P with 2 FXO DAHDI/g0
OpenVox G400P with 2 GSM chan extra EXTRA/5 and EXTRA/7

Here are my conditions

If the number pattern is any of those below
dial out through the A400P

if the DAHDI/g0 is busy or for any other local number pattern
dial out through through the G400P

if the G400P trunks are busy then use the A400P to dial any local extension
even those restricted by the first pattern set

if the number is a long distance number, or any number pattern
then a PIN or password is required and use the G400P first and if busy, use the A400P

Do I create a route for each trunk?
Do I create only one route and setup a trunk sequence?
Where do I place the dial patterns, in the route(s) or in the trunk?
Am I allowed to duplicate Trunks?

I will be testing all possible options I can think of, however, if I can get some direction before I start then that would help.


the patterns on the routes dictate if the call will take that route or not, and if so, then any manipulation is done wrt to prepends or prefix removals.

Once a route is taken, no subsequent route will ever be taken.

Once in a route, it will try the first trunk and only skip to subsequent trunks when getting the equivalent of ‘congestion’ (or chanunavali). The patterns on the trunks are purely for number manipulation. As soon as the first pattern matches, no other patterns will be pursued. It will try the trunk regardless of whether a manipulation rule was found.

That information should help you layout your desired routing. You can use the same trunk in multiple routes.