Hi folks, little help?
I have an interconnect to two SIP providers via MAN and one NIC.
For the 1st provider:
Asterisk eth0 - 192.168.0.10
gate - 192.168.0.1
real IP - 18.104.22.168
The gate is doing full nat. What comes from Asterisk to provider1 is routing throu the MAN of provider1 (22.214.171.124), what comes from provider1 to 126.96.36.199 is DNAT-ing back to Asterisk (all ports and protocols).
For SIP provider2:
Asterisk eth0.100 - 188.8.131.52 (VLAN interface, real public IP that gave me provider2)
gate - 184.108.40.206 (real public gate of provider2)
Here I have a direct routing to provider2.
I want to do ORIGINATE with number from provider1 and number with provider2. The RTP has to stay in Asterisk, these two networks cannot be accessed via Internet. Provider1 do not have access to provider2 and vise verca.
With default sip.conf (no externip or localnet) and “canreinvite = no” for provider2 when making calls throu provider2 everything works (RTP is in Asterisk). Contact header in SDP is the real IP for provider2 (220.127.116.11). With provider1 this do not work. Contact header in SDP is my fake IP - 192.168.0.10. I have to put externip in sip.conf to my external IP for provider1 to work. But in that case provider2 do not work.
In other words how do you make calls when you have 2 SIP providers with 2 different routing to them, with 2 different real IP addresses?