Problem setting up multiple dial plans

Hello

I have FreePbx 12.0.65 with all the latest patches and have a simple business need which I am having difficulties setting up.

We have three SIP trunks, each with a different number (and area code), say London (020), Brighton (01273) & Birmingham (0121). I have setup 3 outbound routes (one for each). What I need to do is as follows:

1 - if the dialled number begins with 0121 then use the Birmingham trunk
2 - if the dialled number begins with 01273 then use the Brighton trunk
3 - all other numbers use the london trunk

I cannot get my dial plan to do this. I have tried too many combinations to mention here. Any advise on this would be much appreciated.

Best wishes

Nima

In Connectivity, Outbound Routes:

  • add a route for each SIP Trunk
  • set a Route CID for each trunk
  • in dial patterns, leave prepend and prefix be (empty) but fill in match pattern:
    for Birmingham trunk, use 0121. (dot is important, see tooltip above the dial patterns)
    for Brighton trunk, use 01273.
    Now I’m not sure how to /not/ match the above patterns for London… but hopefully this helps.
    EDIT: I suppose if you set Route Position for the London trunk as last (route position appears if you have more than 1 route), this may be the solution…

Thank you very much el_es. I will test and let you know.