Setting up a trunk with multiple IP addresses

Hi,

I have a provider that has multiple servers (much more than 5).
Do I need to set up a separate trunk for each IP address ?
Is it not possible to list all IP addresses like that:
host=123.123.123.123&456.456.456.456&…

Thanks!

Why you would need more than one?

That’s up to the provider. I would certainly not do it this way.
But I need to find a way to list all those servers, that’s the way things are.
If you have a solution I will be grateful.
Thanks.

At this point I believe that you’d need to create a seperate trunk for each IP. If that server went down in the middle of takling to you, your server would drop the call anyway as it’s tied to that IP.

It would depend on how you want the calls distributed between the IP addresses. If the goal is redundancy, you could define a separate trunk for each IP, then include all of the trunks in a single outbound route. FreePBX always tries the trunks in sequence, so all calls will go to the first IP address unless it fails.

We do this for our SIP provider. I listed the trunk with the lowest RTT first, but calls will roll to the others in case of failure.

On the other hand, if you need to distribute the calls between all of the IP addresses, that might be more difficult. There is no option in FreePBX to do round-robin or other search orders or trunks in a route. It’s possible with Zap channels, but that’s a function of the zaptel channel driver, and I don’t know of an equivalent for sip or iax trunks.

This is only for incoming (DIDs), so there is nothing sophisticatedly here, but the vendor has about 50 separate IP addresses. FreePBX does not allow so many IP addresses in the host line.
Do you happen to know if setting a range of IP address can do it ?
Setting 50 different trunks is not reasonable.
Thanks.

Setting host=ip2&ip1 will cause asterisk to try to register first to ip1 and failing that to ip2. Unfortunately, asterisk will only go thru the list at registration - not when a call fails.
On the other hand, having two separate trunks in freepbx WILL provide redundancy.

That being said, all this applys to outbound calls ONLY. Wrt did’s its the registration string that counts - in which case you limited to one string (and server) per trunk .
There is also another strategy commonly employed for did’s and that is no registration at all. This is commonly used with a static ip and your provider just throws the call at your server where you hopefuly have an inbound route to catch it (think enum)