Multiple outbound route problem

I’m quite used to install asterisk directly on the systems, but I’m a newbie dealing with FreePBX.
I have a problem that is quite small and that I solved without problems on a normal asterisk setup that doesn’t seem to work with FreePBX outbound routes…

The setup is the following
FreePBX 2.4 + mISDN beronet 8 BRI card.
On these BRI there are 5 Urban lines and 1 GSMBOX that should be used to call cell phones; if the lines on the GSMBOX finish I should use the Urban lines.

The misdn.conf file kust groups the ports under 2 names


We use the first in one trunk named
the other is

Using these two trunks we defined 1 outbound route for the urban calls that just extracts the number removing the first zero
the dial rule in the Outbound route is
so that if I compose 0065239372 the number passed to the trunk is
and everything works fine sendint the number to the public trunk
after it I added another outbound route that has the following dial rule
so that if I compose the number 0342888449 the number passed to the trunk is
and sent to the gsmbox trunk
well… this second part, putting the outbound route before the first one or after it the only thing that works is the first one, while the second one is never used…
Help me!!

A route of 0|. is more general then the 0|3. route so it if is first it will match the pattern first. Put the 0|3. pattern first as it’s more specific…

I tried both orders,
the 0|3. before and the 0|. before, but no luck.
With the first setup I noticed that the Cell calls (the 0|3. destination more clearly) failed if I did not put the other trunk (the urban one) in the route.

Btw, what I noticed is the following:
the extensions are registered int he from-internal context, and it has, as dialplan the following config:
cnt-03*CLI> dialplan show from-internal
[ Context ‘from-internal’ created by ‘pbx_config’ ]
‘h’ => 1. Macro(hangupcall|) [pbx_config]
‘s’ => 1. Macro(hangupcall|) [pbx_config]
Include => ‘from-internal-custom’ [pbx_config]
Include => ‘app-miscapps-1’ [pbx_config]
Include => ‘app-miscapps-2’ [pbx_config]
Include => ‘app-miscapps-3’ [pbx_config]
Include => ‘ext-local’ [pbx_config]
Include => ‘outrt-002-0_outside’ [pbx_config]
Include => ‘from-internal_bad-number’ [pbx_config]
Include => ‘bad-number’ [pbx_config]
Include => ‘from-internal-xfer’ [pbx_config]

The 0_outside is the outbound urban route, so no claim for the other one (03_cell)…
The real matter it that I have one more context named outbound-allroutes
that has the following config
cnt-03*CLI> dialplan show outbound-allroutes
[ Context ‘outbound-allroutes’ created by ‘pbx_config’ ]
‘foo’ => 1. Noop(bar) [pbx_config]
Include => ‘outbound-allroutes-custom’ [pbx_config]
Include => ‘outrt-001-03_cell’ [pbx_config]
Include => ‘outrt-002-0_outside’ [pbx_config]

-= 1 extension (1 priority) in 1 context. =-

So it seems that everything should work!
The question is: why in the “from-internal” context it’s not included the “outbound-allroutes” context?
is there a chance to get it configured properly?
Just to know this setup is an upgrade from 2.3.


I noticed that there’s a custom context area in FreePBX that allows me to enable and disable several things and noticed that some things in he outbound routes is misconfigured :(.

The answer is indeed in the last row of my post…
The setup is an upgrade (and the old version was not installed by me, so some things were disabled, or never enabled, by the old sysadmin…)

Thanks and sorry for the time you spent on it :frowning: