Extensions will call what ever number they like, and the call is routed via our main trunk.
if a number is prefixed with 99 it should use a specific trunk
And why should I do that?
Because, mobile numbers (mobile numbers using our RI/CI must be routed via the correct SIP trunk, to our MVNO core, to be terminated in the mobile network.
I noticed you wrote “Priority is like this: the more exact it matches it will use that outbound route.”
That is a bit concerning, if that is the case, as
A catchall routing will catch all, no matter if you have other routes with prefix
So in my case, no matter what I do, since we have a route where you can “dial as you please” and a route that needs prefix 99 - and, as I understand, there is no option to prioritize, it will never work, without also giving the “catchall route” a prefix, which is not an option (e.g. press 0 for outbound linie) -
So if you have 4 different trunks (e.g. 4 different providers)
e.g.
Prefix 77, 88 and 99 and a trunk were no prefix is needed.- it will never work, if you have trunk were no prefix is needed, as you can not prioritize the routes,
Please do what I ask for or i can not help you.
The problem will be easy but it seems hard to find without a siptrace.
And what version of vitalpbx are you on? You applied changes I guess and tried a reboot of VitalPBX as well?
Did you check both trunks are 100% working? You called out on both of them already via VitalPBX?
@Mads_Mortensen
Seems to be a Bug once you change the prefixes/patterns! I just checked again for you. @miguel
Delete both Outbound Routes and create again! Should work then. Do not change. Create new.
Problem/to replicate:
Create 2 Outbound Routes
One for Trunk A other for Trunk B
Trunk A Prefix 99 Pattern X.
Trunk B no Prefix Pattern X.
Save and test. Works
If you then change Prefix 99 to 88 and save it will stop working. Will go the wrong Trunk.
So editing Outbound Routes causes issues.
Unless you specify in your class of service the second outbound to be used first, your Trunk A pattern basically catches all numbers dialed with the pattern you have
X = 0-9
. = One or more characters
MATCHES TRUNK A when trying to dial via Trunk B
99 123456
99 234
99 1923457668
99 992344555
If you specify a number length in your patterns, lets say the default US 10 digit length on both outbound routes, the system will be able to match with your trunk B as it will contain 12 digits, with two extra digits being your prefix
So either specify the secound outbound route to be checked first in a class of service or change your pattern matching.
@PitzKey got me thinking:
Route Selection inside Class Of Serice should help with this issue:
Use Outbound Route with 99 X. first
X. second
on Route Selection.
And sure: X. is not very specific. Better use more precise patterns.