Problem with two servers

Hi guys, I’m new here and pretty new in the Asterisk and Freepbx stuff, so I’ll try to explain my problem the best that I can, and sorry if I’m making a post about a thing that was like another post.
So my problem is, here we have two servers of Asterisk, one is fixed IP and another has DHCP configuration. And we have to transfer calls between the two servers trunks and extensions. But when the server with dhcp changes the IP, it’s not possible only if we restart the server.
We don’t want this because we have a call center and restart the server every time it’s inappropriate.
How can I fix this without having to restart the server every time this happens? What configuration I’m supposed to change. Thank you, guys.

  1. Make the DHCP server static?
  2. Use an intermediary that both pbx’s register to (Kamailio)?

Configure the PBX with the dynamic IP to register to the other, and config the static IP to accept the registration. Exactly the same as if it’s a phone.


I have two FPBX systems linked together using a PJSIP trunk on one end and a Chan_Sip trunk on the other, both have dynamic IP address and is use to get host names.

The secret on the PJSIP PBX (Thanks to some help on here) was to change the authentication type to Auth Username

On the PJSIP PBX I also use a small script to check the external IP address every five minutes and run “Core Reload” when it changes, so far I haven’t had any issues with connections between the two, a change in either one is fixed without intervention in under five minutes and doesn’t interfere with ongoing calls.

1 Like

I think if you have two PJSIP systems you would need a trunk in and out on both (unless you use identical trunk names) and the “Core Reload” script running on both.

1 Like

This is my script.

and my crontab entry to run it every 5 mins

if that helps at all.


Hi Paul, it seems a good way to resolve the problem, but here our connections are not with the PJSIP trunks. I think it’s just a normal trunk. And the connections in ‘Connectivity > Firewall’ has the name of the server because it’s DHCP.
I don’t now how to fix this. Sorry about my little knowledge in FreePbx. I’m new in this area.

If you are just using Chan_Sip then these are the setting I have used for a few years without any issues.

From an IP update on one of the systems to calls working again is usually under five minutes and this set up has never been unreliable in over five years of use.

Hi Again, sorry for all this time without feedback. I didn’t fix the problem yet. Because when we restart the server, they can connect. But today it happened again and now I have to find a better way to resolve the problem without restarting the server each time that it stops working.
So about the configuration (images) that you send. The settings look like the ones you made, but the difference is

Here its like this

In the ‘NAT Settings’ my ‘External Address’ is with the IP not the DNS. But I don’t know if it changes something.

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