Two trunks, outbound rules and fallback

Hi!

As you probably can guess reading my question, I am pretty new to asterisk/freepbx.
I have a small home network with the following setup:

Freebpx with 2 trunks:

  • local phone provider using a FritzBox
  • SIP provider (over the internet)
    Internal extensions within 10 and 99 (two digits).

What I would like to achieve:
If an extension dials a number with 2 digits it should be connected to the extension.
If not, this should be an outgoing call.

Per default the trunk to the SIP provider should be used (it is cheaper). If this is not available due to any reason (no internet connection and so on), the local phone provider should be used automatically.

In addition to that it would be beautiful if the user could dial a prefix (0 or 1 for example) to choose one of the trunks and override the default trunk.
Sorry for this maybe stupid question, but I would be very happy if someone would give me some hints or even explain how to achieve this.

Best regards and thanks in advance,
Otto

The best advice I can give you is “try it”. You should find that everything already works the way you want through simple choices from the GUI and through searching the forum for examples of the other couple of things.

https://wiki.freepbx.org/display/F2/Outbound+Routes+Module+User+Guide

https://wiki.freepbx.org/display/F2/IVR+Module

1 Like

Hi!

Thank you!
I think I got most of that working.
There is one thing I do not understand tough. Maybe you could explain this to me?
How can I achieve to have an outbound rule to be accessed with a prefix (eg 0) AND without? I think I do not understand the concept here and I could not read this out of the manuals…
Thanks in advance,
Otto

Outbound Routes use the Outbound Rules to decide (as a filter) whether or not a specific route will be used. If the Outbound Route’s rules match your call criteria, the outbound route will be chosen, so if you include a “prefix” in the rules and the number presented to the Outbound Route does not have that prefix, that outbound route will not be chosen.

At some point, you probably need a catch-all outbound route that “anything else” would drop into.

Now, each Trunk is selected to “go with” an Outbound Route. This allows you to fine tune the Trunks. The number presented to the Trunk meets a similar set of match criteria, so you can specify a laundry list of trunks and match them up using Prefixes (etc) the same way you did the Outbound Routes.

It is possible to tighten these rules up to the point that a single caller from a single extension goes out through a dedicated Outbound Route and then on to a specific Trunk, if you really want to make it that complicated. In practice, matching up the outbound route rules to a specific trunk (which you can reuse in other Outbound Routes) is sufficient and easy to tune moving forward.

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