[solved] One way audio - * requests rtp back to private IP

A particular managed network, the A10LSN + bandwidth internal natting an external IP to the pbx.

WORKING

sip.conf
[general]
bindaddr=internal_server_ip (the shared if using HA)
externip=external_natted_server_ip
localnet=internal_server_ip/255.255.255.0 (the local if using HA)

[peer_name]
qualify=yes
port=5060
nat=yes
allow=ulaw
call-limit=10
directmedia=nonat
directrtpsetup=no

[sip_trunk]
host=bandwidth.com_ip
port=5060
type=peer
allow=ulaw
dtmfmode=rfc2833
reinvite=yes
canreinvite=no
context=from-pstn
nat=yes
insecure=invite,port


We have been attempting to solve one way audio for a while.

Bandwidth.com says that: “The PBX is requesting the rtp back to a private Ip in the 200ok message. This will give a one way audio issue.”

How to solve it?

U 2012/11/07 18:51:24.321477 100.43.28.204:5060 -> 216.82.224.202:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 216.82.224.202;branch=z9hG4bK6321.6c7063b3.0;received=216.82.224.202.
Via: SIP/2.0/UDP 67.231.8.93;branch=z9hG4bK6321.ef16cab5.1.
Via: SIP/2.0/UDP 192.168.37.72:5060;branch=z9hG4bK0cBb7163af00a06957f.
Record-Route: .
Record-Route: .
From: “Anonymous” ;tag=gK0c642908.
To: ;tag=as7e568e6b.
Call-ID: 101453609_58558715@192.168.37.72.
CSeq: 28331 INVITE.
Server: Asterisk PBX 1.8.15.0.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: .
Content-Type: application/sdp.
Content-Length: 233.
.
v=0.
o=root 773846495 773846495 IN IP4 10.1.50.253.
s=Asterisk PBX 1.8.15.0.
c=IN IP4 10.1.50.253.
t=0 0.
m=audio 14780 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.

U 2012/11/07 18:51:24.321758 216.82.224.202:5060 -> 67.231.8.93:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 67.231.8.93;branch=z9hG4bK6321.ef16cab5.1.
Via: SIP/2.0/UDP 192.168.37.72:5060;branch=z9hG4bK0cBb7163af00a06957f.
Record-Route: .
Record-Route: .
From: “Anonymous” ;tag=gK0c642908.
To: ;tag=as7e568e6b.
Call-ID: 101453609_58558715@192.168.37.72.
CSeq: 28331 INVITE.
Server: Asterisk PBX 1.8.15.0.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: .
Content-Type: application/sdp.
Content-Length: 233.
.
v=0.
o=root 773846495 773846495 IN IP4 10.1.50.253. <------- wrong IP!!!
s=Asterisk PBX 1.8.15.0.
c=IN IP4 10.1.50.253.
t=0 0.
m=audio 14780 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.

U 2012/11/07 18:51:24.325860 67.231.8.93:5060 -> 216.82.224.202:5060
ACK sip:+14047935628@10.1.50.253:5060 SIP/2.0.
Record-Route: .
Via: SIP/2.0/UDP 67.231.8.93;branch=z9hG4bK6321.ef16cab5.3.
Via: SIP/2.0/UDP 192.168.37.72:5060;branch=z9hG4bK0cBb7ce75600a06957f.
From: “Anonymous” ;tag=gK0c642908.
To: ;tag=as7e568e6b.
Call-ID: 101453609_58558715@192.168.37.72.
CSeq: 28331 ACK.
Max-Forwards: 69.
Route: .
Content-Length: 0.
.

Configure Asterisk for the enviroment you have (Asterisk behind NAT, provider on public IP). You will have to configure externip= and localnet= parameters in sip.conf.
There is tons of post on this topic, so use the search function.