I have a simple HA architecture configured for VoIP. On server #1, Asterisk + FreePBX are running. On the second server, Asterisk + FreePBX are also installed, but these services are only started when server #1 is inactive. Both servers use a database cluster and share the same database. Configuration between the servers is fully synchronized. I’ve tested it, and the solution works well.
Both Asterisk servers use a VIP address. Phones connect to the Asterisk instance on the first server correctly and everything works fine. However, after switching to the failover server, I see that the phones connect and register (they also appear as registered on the Asterisk side). However, when I try to make a call, the phone displays the message “Service not available.”
I’m using Ubuntu 24.04 LTS, Asterisk 20.6 (from Ubuntu packages), and FreePBX 17.
My question is: why is this happening? Besides configuration, is there anything else that needs to be synchronized?
On Monday 13 October 2025 at 22:41:44, autominus via Asterisk Community wrote:
I have a simple HA architecture configured for VoIP.
after switching to the failover server, I see that the phones connect and
register (they also appear as registered on the Asterisk side). However,
when I try to make a call, the phone displays the message “Service not
available.”
Show us a SIP packet capture from the failover server of such a call, and also
the output of “pjsip show endpoints” from the same server at that time.
Antony.
–
“It wouldn’t be a good idea to talk about him behind his back in front of
him.”
When an IP floats from one box to the other, make sure ARP tables are updated appropriately. Without this, IP phones may keep sending traffic to the previous box.
While troubleshooting and enabling pjsip set logger on, I found the source of the problem:
– Executing [s@macro-dial-one:27] GosubIf(“PJSIP/9910-00000004”, “1?dstring,1():dlocal,1()”) in new stack
– Executing [dstring@macro-dial-one:1] Set(“PJSIP/9910-00000004”, “DSTRING=”) in new stack
– Executing [s@macro-dial-one:63] NoOp(“PJSIP/9910-00000004”, “Returned from dial-one with nothing to call and DIALSTATUS: NOANSWER”).
Digging deeper, after running the command database show AMPUSER/9910/device, I see:
0 results found
On the failover server, there’s an inconsistency between the astdb.sqlite3 files — the one on the primary server is larger in size. It’s clear that the database is missing the necessary entries.
When I copied the astdb.sqlite3 file from the primary server to the failover server, the calls started working. However, I think that copying or synchronizing this file is not the best idea. I have the impression that this file should be rebuilt during the startup of Asterisk and FreePBX.