Configure Network for SIP trunk set up
how to Configure network for sip trunk
First: Interface LAN was configured by installer itself, then it add mask /24 that must be removed.
iface LAN inet static
address 192.168.1.247/24
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254
allow-hotplug SIP
iface SIP inet static
address 172.xxx.xxx.xxx
netmask 255.255.255.252
Was modified to:
iface LAN inet static
address 192.168.1.247
netmask 255.255.255.0
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254
allow-hotplug SIP
iface SIP inet static
address 172.xxx.xxx.IP
netmask 255.255.255.252
Then at /etc/rc.local must add two static routes
- This route sends all trafic to LAN through LAN interface
route add 192.168.1.0 gw 192.168.1.254
- This route sends all traffic to my sip server through SIP interface
route add [SIP SERVR IP] gw 172.xxx.xxx.GW
This all done the work.
Note:
172.xxx.xxx.IP is the Ip assigned by telecom provider
172.xxx.xxx.GW is the gateway assigned by telecom provider
[SIP SERVR IP] is the Sip server ip assigned by telecom provider.