FastAGI server binding to IPv6 localhost address only, causing issues

I recently built a new FreePBX server using FreePBX and Asterisk 20.4.0. Not the official distribution, this is on a Raspberry Pi. Then, I restored a config backup from my previous FreePBX 15 installation. It mostly works except that the FastAGI server is binding to the localhost IPv6 address ::1, but the calls to the server in the Asterisk config files point to the IPv4 localhost address so there is no response from the AGI server. Just one example:

exten => s,n(dial),AGI(agi://

This causes a lot of issues, like incoming calls not working. I suspect it may be because my old server was IPv4 only, and I restored the backup onto the new server which is dual-stack (IPv4 and IPv6).

I managed to get it working by removing the ::1 localhost entry from /etc/hosts, leaving only for localhost. This causes the AGI server to correctly bind to the IPv4 address, and everything works. I could leave it like this, but I’m wondering if there’s a better way.


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