We recently decided to use a SIP trunk over dedicated VPN. so for this we added to our system a second NIC.
First NIC eth0 connects to the SIP provider (trunk over dedicated VPN) with no internet connection.
Second NIC eth1 connects to the local network where phones and softphones are and internet connection.
We configured the two network interfaces inside FreePBX GUI no other under the hood config. Phone system works we are able to make and receive calls with no issue.
But we do have the following problems which are probably due to network bad config but i’m not sure where to look.And a third one would be
One problem is that after a system restart I always have to disable eth0 and enable it back so that calls can work.
Second is again after restart FreePBX GUI and UCP wor for exactly 1 hour. After 1 hour GUI and UCP don’t load anymore. Phone system works. SSH works.
Third problem would be that the system has no internet connection due to the fact that the internet connection resides on the NIC for the local LAN.
System details:
Current PBX Version:14.0.11
Current System Version:12.7.5-1807-1.sng7
Current Asterisk Version: 13.22.0
SIP trunk on eth0: 192.168.10.10
gw: 192.168.10.1
LAN on eth1: 172.17.1.10
gw: 172.17.1.1
Check your /etc/sysconfig/network-scripts/ifcfg-eth0or1 file to ensure you have configured both interfaces to start automatically on boot:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=‘yes’
As for your GUI/UCP working for exactly one hour… I’ve been caught by a bug in Chrome. Try a different browser and see if the GUI has in fact crashed.
Thank you for your answer.
Yes both interfaces for me are configured to start automatically on boot.
This is how the configuration for each interface looks :
You only want one default gateway. As configured, 192.168.10.x traffic will use eth0, 172.17.1.x traffic will use eth1 and ALL other traffic will use whichever interface has the default gateway. If you then need to selectively define traffic to use a different interface, you need static routes for each subnet.
Also added :
192.168.1.0/24 via 192.168.10.1 dev eth0
Now FreePBX has internet connection. Dashboard and UCP load corectly.
But I have one way audio on the calls. I hear the people I call but they cannot hear me.
Not sure if I need to add another static route?
So I did a test.
Adding both LANs to SIP settings leaves me with no audio both ways.
After coming back to initial settings - only internal LAN added to SIP settings - and rebooting the server it seems that everything is fine. I have incoming and outgoing audio
Now another issue appeared. Incoming call disconect after 6-8 seconds
Yes. I just did another test with both lans added to SIP settings and Asterisk restart.
This setup kills audio both ways for both outbound and inbound calls