0

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?

v3gard
  • 176
  • 2
  • 12

3 Answers3

0

You should be able to change the SIP_PROFILE ip address under Advanced>Variables, depending on how it was initially setup.

byoungdale
  • 161
  • 2
  • 13
  • Do you mean the IP address category, which contains the variables "external_rtp_ip" and "external_sip_ip"? These are by default derived from $${local_ip_v4}, which as you can see from my post above, are already resolving to the new IP address. Sofia is still attempting to bind to the old address.. – v3gard Feb 04 '19 at 07:50
  • Did you rescan or restart your SIP_PROFILE from Freeswitch? `sofia profile [|] reloadxml`, that should attempt to bind to the new IP address. I am not super familiar with FusianPBX, so I do not know if you can reload a SIP profile from its GUI. – byoungdale Feb 11 '19 at 15:33
  • I cannot remember for certain that I ran that command from fs_cli, but I know I did it from the FusionPBX dashboard. A side note is that the old IP address was still persistent after a reboot of the server. – v3gard Feb 13 '19 at 07:05
0

freeswitch/vars.xml holds all variables like $${external_rtp_ip} , $${external_sip_ip} ,$${local_ip_v4} . If you have multiple interfaces freeswitch does not know to which it should bind . In your case you are saying it is listening to old IP . Manually enter your local ip address variable in vars.xml and restart freeswitch.

<X-PRE-PROCESS cmd="set" data="local_ip_v4=<your ip address>"/>  

If you are using $${local_ip_v4} variable in sipprofile , It should start listening on your local ip address .

0

If you use fusionpbx, under advanced, sip-profiles you can change the sip-ip and rtp-ip in internal and external profiles, under advanced there is vars and you add a new variable

Sherif O.
  • 506
  • 4
  • 15