Outbound route trunk sequence

Hi,
we have two SIP accounts from two different providers, one with a single FLAT rate channel, the other one billed according to consumption. I configured trunks for both, and they work perfectly with separate outbound routes (distinguished by prefixes). I want to avoid dialing a prefix if the first trunk is busy, so I tried to put both in the same outbound route, with the FLAT account on top. However, if the FLAT trunk is busy, the call is rejected without trying the second trunk.
What I tried:

  • Set “Max Channels” to 1 in the first trunk.
  • Set “Continue if Busy” to YES

In order to exclude the call being passed to the provider even if Max Channels is set to 1 while the trunk is busy, I set Max Channels to 0. Doing this, the call is always rejected even if the trunk is not busy, and the second trunk in the sequence is never used.

Hi @stokdam
Are you facing this issue on FreePBX V17? If so, we have fixed this issue in the latest core module version (17.0.9.74). Upgrade the core module to the latest version and give it a try.

fwconsole ma downloadinstall core --tag 17.0.9.74
1 Like

Yes! I’m on v17. I updated and now it seems to work better. In the sense that if the call is rejected by the provider (because of two many concurrent calls), the route passes correctely the call to the next trunk. However, if it is rejected by Freepbx due to Max Channels reached, the call terminates immediately. For now I can workaround by setting the field Max Channels to a higher value.