Outbound international numbers to only a select set of numbers

We make use of 2 outgoing trunks (different providers) with 1 provider only allowing local calls and then 1 provider than we use for international calls. I want to however restrict international calls to only a handful of numbers (as we only call 2 or 3 international providers).

I have a single outbound route which first tries the local provider then goes to the international provider. As international calls will always be unsuccessful through the 1 provider it always dials to the 2nd trunk (the international provider) and routes calls through there.

  1. For my outbound trunk my dial pattern is set to a single . (.) under match pattern
  2. For my local trunk, I have a single “match pattern” that is “0XXXXXXXXX” (thus all local numbers will follow this pattern, starting with 0"
  3. For my international provider trunk, I am doing a single test with 1 number having only the 1 company we dial to as the match pattern “3188522???” (blanked out remainder of the number)

If I make a call and have the international provider as the 1st trunk in the outbound route, I am able to make the international phone call as expected. If I however have the local provider as the 1st route, then I am able to make local calls but not international calls. When I dial the company number, it still seems to try to make use of the local provider instead of the international provider, even though the “match” pattern is visibly incorrect.

What am I doing wrong? I would imagine 0XXXXXXXX would only allow calls that start with 0 and followed with 9 other numbers and if the number dialed does not match that (such as 3188522xxxx) would skip that trunk and go to the second trunk.

Thank you :slight_smile:

Your call flow goes to an outbound route and then to a trunk.

You are making life difficult if you try to match everything on the trunks.

You should do as little matching and manipulating on the trunk as possible.

Instead make everything correct in the outbound routes and use many of them.

Route 1 Local:
Match pattern: 0X. (or just 0.)
Trunk: only add the local trunk.

Route 2 International:
Match Pattern: 3188522??? Add more patterns for other numbers.
Trunk: only add the international trunk

Edit: You need to make sure the number format your carrier is expecting for the international calls. Some (few) carriers require the + be pre-pended.

You’re a master! Thank you, works like an absolute charm :slight_smile:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.