I’ve got an Asterisk 1.4.11 box on my local network and a bunch of softphones that are used in the office which connect to it, all devices have a connection to the internet via a NAT server. I’ve setup the sip.conf so that all calls to PSTN get routed to my sip gateway provider (bbpglobal). This configuration works.
The problem that I’m having is that all of the RTP data (the actual voice data) gets routed through the asterisk box. So when you make a call from the sip phone the data flows like this
softphone -> asterisk box -> SIP gateway provider -> PSTN
What I would like to do is set it up so that the RTP data gets routed directly to the SIP gateway provider. So the RTP data would flow something like this.
softphone -> SIP gateway provider -> PSTN
I have managed to get the data to flow like this. The only problem is that there is no audio heard in either direction. I have sniffed the traffic on the softphone machine so I know that the data is flowing.
The SIP session goes roughly like this:
softphone registers with asterisk server. (using SIP)
softphone places a call for PSTN to asterisk server. (using SIP)
asterisk server replies with SIP gateway provider internet IP address. (using SIP).
softphone starts sending RTP packets to the SIP gateway provider. (using RTP over UDP).
There are no packets coming back from the SIP gateway provider to the softphone.
This leads me to believe that the SIP protocol is not capable of managing this type of transaction through a NAT’d connection.
Can someone please confirm if this is possible or not? If it is possible then give me some pointers on things to look out for etc in the asterisk config.