Setting the INVITE address to the outgoing IP address on dual NIC installation


(Tom Ray) #21

OK, OK. Now I think I see what is going on here. The local network stuff is only usable for when the External Address/Host details are set. It basically says “if request is from local network to a place not in local network then use the external details”. Since you have neither external details setup AND you have the ISP’s network set as a local network, it would never use the external details even if they were set. It would believe things need to stay local.

Here is what I would do. First, get rid of Chan_SIP for the trunk. Second, setup a Chan_PJSIP transport that listens on 10.221.11.10. Third, setup a Chan_PJSIP trunk that uses the transport for the voice IP. Now you will have this trunk listening on the 10.221.11.10 IP and using the 10.221.11.10 IP to source requests from over that trunk.

See right now requests are hitting the other IP which Asterisk is then using for all requests because it just won’t randomly select another IP to use for things. So even when it routes over the correct interface (eth0) to the ISP, it’s going to use the office LAN IP for its SIP message details because that’s where the SIP message sourced from.


#22

It probably won’t affect you but I just wanted to suggest you not use 172.32.x.x internally, if that’s what you are doing. It’s publicly-routable IP space owned by T-Mobile. Use rfc1918 ranges.


(Tom Ray) #23

Good catch. I forgot it stops at 172.31.x.x not 172.32.x.x so that could be an issue.


(Jeremiah Kioko) #24

The local network stuff is only usable for when the External Address/Host details are set. It basically says “if request is from local network to a place not in local network then use the external details”. Since you have neither external details setup AND you have the ISP’s network set as a local network, it would never use the external details even if they were set. It would believe things need to stay local.

I understand this.

Is there a way to achieve this using the Chain_SIP?

It probably won’t affect you but I just wanted to suggest you not use 172.32.x.x internally, if that’s what you are doing. It’s publicly-routable IP space owned by T-Mobile. Use rfc1918 ranges.

That is one of the IPs I changed for the purposes of this thread. Like @BlazeStudios I did not notice my mistake. So this is not a problem on my implementation.

Apologies for the delay. Apparently there is a limit to how many messages a new user can send on his first day.


(Jeremiah Kioko) #25

Where do you create this?


(Tom Ray) #26

Not really. Chan_SIP is pretty much dead. It hasn’t had active support or development for almost 6 years. Anything done with it recently has been by community members. You’re better off with Chan_PJSIP.


(Tom Ray) #27

Settings -> Asterisk SIP Settings -> Chan_PJSIP tab.


(Jeremiah Kioko) #28

Ok. Will try it out.


(Jeremiah Kioko) #29

This is what I see under Chan_PJSIP. So it seems I cannot create them. Or am I missing something?


(Jeremiah Kioko) #30

It works now when I use PJSIP for the trunk. Thank you very much.


(system) closed #31

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