I am currently running FusionPBX 4.4 on CentOS 7 with PostgreSQL.
I installed the system with one IP address, e.g. 192.168.201.201, and now want to move the system to a new IP address, e.g. 10.65.208.2. This has been done by modifying the settings in /etc/sysconfig/network-scripts/ifcfg-enoX, and I have ensured that the new IP address is accessible.
After that, the domain specific configuration was taken care of by changing domain from the old value to the new value under Advanced>Domains. I am able to log into the system (with the new IP address) without having to specify admin@192.168.201.201.
However, my current problem is that I am not able to get the SIP application to bind to the new IP address. If I run netstat to check the binding, only the IPv6 address is found.
[root@pbx ~]# netstat -an | grep 5060
tcp6 0 0 ::1:5060 :::* LISTEN
udp6 0 0 ::1:5060 :::***
If I open fs_cli and try to evaluate the variables that exist, it seems that Freeswitch has also registered that the new IP address should be used.
freeswitch@pbx.local> eval $${local_ip_v4}
10.65.208.2
freeswitch@pbx.local> eval $${external_sip_ip}
10.65.208.2
freeswitch@pbx.local> eval $${external_rtp_ip}
10.65.208.2
freeswitch@pbx.local>
Still, /var/log/freeswitch/freeswitch.log, tells me the following (note that it tries to bind to the old IP address, which results in an error):
2019-01-29 07:06:47.075924 [NOTICE] sofia.c:5949 Started Profile external [sofia_reg_external]
2019-01-29 07:06:47.075924 [DEBUG] sofia.c:3046 Creating agent for external
2019-01-29 07:06:47.075924 [ERR] sofia.c:3146 Error Creating SIP UA for profile: external (sip:mod_sofia@192.168.201.201:5080;maddr=192.168.201.201;transport=udp,tcp) ATTEMPT 1 (RETRY IN 5 SEC)
2019-01-29 07:06:47.075924 [INFO] switch_time.c:1423 Timezone reloaded 530 definitions
2019-01-29 07:06:52.075998 [ERR] sofia.c:3146 Error Creating SIP UA for profile: external (sip:mod_sofia@192.168.201.201:5080;maddr=192.168.201.201;transport=udp,tcp) ATTEMPT 2 (RETRY IN 5 SEC)
2019-01-29 07:06:57.076030 [ERR] sofia.c:3146 Error Creating SIP UA for profile: external (sip:mod_sofia@192.168.201.201:5080;maddr=192.168.201.201;transport=udp,tcp) ATTEMPT 3 (RETRY IN 5 SEC)
2019-01-29 07:06:57.076030 [ERR] sofia.c:3156 Error Creating SIP UA for profile: external (sip:mod_sofia@192.168.201.201:5080;maddr=192.168.201.201;transport=udp,tcp)
The likely causes for this are:
1) Another application is already listening on the specified address.
2) The IP the profile is attempting to bind to is not local to this system.
I only have one network interface defined (eno2). The other interface, which was used during installtion, is disabled.
[root@pbx freeswitch]# ifconfig
eno2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.65.208.2 netmask 255.255.254.0 broadcast 10.65.209.255
inet6 fe80::21a:c7d6:cd98:5e88 prefixlen 64 scopeid 0x20<link>
ether ac:1f:6b:73:7e:b5 txqueuelen 1000 (Ethernet)
RX packets 23943 bytes 3534910 (3.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71471 bytes 95115547 (90.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xf7c00000-f7c7ffff
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 166592 bytes 48338476 (46.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 166592 bytes 48338476 (46.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
If I start the eno1 interface, and set the IP address to the old one (192.168.201.201), Freeswitch gives me no errors, and I am able to bind to the old address.
freeswitch@pbx.local> sofia status
Name Type Data State
=================================================================================================
external-ipv6 profile sip:mod_sofia@[::1]:5080 RUNNING (0)
external profile sip:mod_sofia@192.168.201.201:5080 RUNNING (0)
internal-ipv6 profile sip:mod_sofia@[::1]:5060 RUNNING (0)
internal profile sip:mod_sofia@192.168.201.201:5060 RUNNING (0)
=================================================================================================
4 profiles 0 aliases
From netstat, we can also see that freeswitch has started listening on TCP/5060 on the old IP address.
[root@pbx ~]# netstat -an | grep 5060
tcp 0 0 192.168.201.201:5060 0.0.0.0:* LISTEN
tcp6 0 0 ::1:5060 :::* LISTEN
udp 0 0 192.168.201.201:5060 0.0.0.0:*
udp6 0 0 ::1:5060 :::*
This leads me to my question;
Which variable is used for binding (i.e. where is the old 192.168.201.201 address stored), and how do I modify it so that FusionPBX/Freeswitch understands which IP address to use?