Two geteways FreePBX

I need to connect two gateways to the FreePBX virtual server that are on the same network (I can link one server, but I can’t do it with the second one, since the connection is via white IP or DDNS and they are already bound to the same gateway or I need to install freepbx on a physical server so that they are on the same network, then I can link the gateway via local IP
Please tell me how to do this

Use different port numbers.

Note we cannot answer regarding FreePBX here; they have their own forum.

Do you mean to connect exactly according to the settings and register the port? at the moment my connection is not via port, but simply host=DDNS (WHITE IP)

Don’t use register; make the port static and preserved by the NAT, and configure the full public address and port in the cloud Asterisk.

Can I send you examples of settings? I don’t quite understand

You need to provide settings on the public forum, or use the Jobs category, to hire paid support. I don’t provide private support.

The management told me to figure it out, and it’s not too much to hire someone to set it up yet Therefore, I’m looking for an option on how to do this, I was able to connect one and it works completely, but there are problems with the second, so I’m looking for and trying different options

You are using chan_sip, which is no longer supported, and is not included in the source code of Asterisk 21 or 22. (It is not included in the object code, by default, in any supported version of Asterisk.)

The very option on insecure is not present in the code of any supported, or even recently end of life, version of Asterisk, and “&” is either not a valid delimiter, or not documented as one. Most people make port insecure without valid reason.

(Please re-read the documentation for defaultuser; it is unlikely to do what you think it does, and is almost never needed.)

You need to include the port number in the host, and to have a different section for each gateway.

Actually, rather more than not needing port to be made insecure, making it insecure will break your best way of discriminating between the gateways! It will cause the port number to be ignored in matching the correct peer.