Two SIP trunks on two methods (Behind NAT and Routed) problem. Help me please

Hi everyone.

We have an Asterisk on a PC with two NIC. NIC1 has GW and internet (Behind NAT), and NIC2 has an IP address just for SIP trunk2 (Routed address). I added the static routes to SIP provider 2 via NIC2 and my SIP trunks is registered successfully. My SIP trunk 1 is working fine also. But when I call my SIP trunk 2 number by my phone, I can not hear the IVR voice and call drops after 6 seconds. I took a look at asterisk -r debug and I found that there is an error about SIP Retransmissions timeout. When I change my Asterisk SIP advanced settings from Static IP to Public IP, SIP trunk 2 works fine, but SIP trunk 1 has no inbound calls from out.

These are my SIP trunks settings:
SIP 1 (Behind NAT on NIC1):
type=peer
host=X.X.X.X
nat=yes
fromuser=ZZZZZZZZZZ
username=ZZZZZZZZZZ
secret=YYYYYYYYYY
context=from-trunk
qualify=yes
insecure=port,invite
canreinvite=no
disallow=all
allow=ulaw&alaw
registerattempts=0
registertimeout=20
t38pt_udptl=yes,redundancy,maxdatagram=400
faxdetect=yes

SIP trunk 2 (Routed via NIC2):
host=U.U.U.U
type=peer
qualify=yes
canreinvite=no
context=from-trunk

You are using a deprecated driver, which has little or no support, and doesn’t handle multiple interfaces as well as the current driver. It has been removed from the development source code.

Almost certainly it won’t be worth trying to debug your, difficult, configuration until you have moved to chan_pjsip.

If you are behind NAT, you need to provide public addresses and list of networks that not affected by NAT (are local to you). nat=yes does not do that. Actually it is not clear what is inside and what is outside NAT.

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