[OpenSIPS-Users] Opensips 1.9 as registrar and rtp_proxy / firewall

Andrei Grav andreigrav at gmail.com
Wed Apr 10 17:42:41 CEST 2013


Hi,

I have installed Opensips 1.9 on debian 6 using the default config for
residential with NAT
My topology is:

UAC ------ ROUTER+FIREWALL --------[ INTERNET ]---- OPENSIPS ----- ASTERISK
UAC is behind NAT 89.xxx.xxx.xxx
Opensips and Asterisk has Public IP's

I'm facing the following issue:
The invite from UAC is announcing his audio port on 4000
Because is not NAT detected the asterisk is sending the rtp media directly
to 89.x.x.x:4000 and no using rtp_proxy
Because the firewall is blocking the RTP port 4000 coming from Asterisk's
IP there is no audio on the UAC side

IF I comment the line #if (nat_uac_test("23")) all the traffic is going to
rtp_proxy and audio is working fine.
Is there any way to solve this ?

route{
force_rport();
if (nat_uac_test("23")) {
if (is_method("REGISTER")) {
fix_nated_register();
setbflag(NAT);
} else {
fix_nated_contact();
setflag(NAT);
}
}
.....



U 89.xxx.xxx.xxx:47054 -> 193.xxx.xxx.xxx:5060
INVITE sip:+0080080000 at myopensips.com:5060 SIP/2.0.
Via: SIP/2.0/UDP
89.xxx.xxx.xxx:47054;rport;branch=z9hG4bKPjhaz3VKGysNj2NSHtuKad0rIMpg3pUdt9.
Max-Forwards: 70.
From: <sip:50105 at myopensips.com>;tag=szMaKKCRwqx5OGjUCwNS7F4X1ZDQpr8F.
To: <sip:+0080080000 at myopensips.com>.
Contact: <sip:50105 at 89.xxx.xxx.xxx:47054;ob>.
Call-ID: sLw5Y3pTNKyBLrk2ZS9brsL87jxN6CPZ.
CSeq: 3657 INVITE.
Route: <sip:myopensips.com:5060;transport=udp;lr>.
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER,
MESSAGE, OPTIONS.
Supported: replaces, 100rel, timer, norefersub.
Session-Expires: 1800.
Min-SE: 90.
User-Agent: CSipSimple_GT-I9100-16/r1916.
Content-Type: application/sdp.
Content-Length: 348.
.
v=0.
o=- 3574590691 3574590691 IN IP4 89.xxx.xxx.xxx.
s=pjmedia.
c=IN IP4 89.xxx.xxx.xxx.
t=0 0.
m=audio 4000 RTP/AVP 99 0 8 101.
c=IN IP4 89.xxx.xxx.xxx.
a=rtcp:4001 IN IP4 89.xxx.xxx.xxx.
a=sendrecv.
a=rtpmap:99 SILK/24000.

Regards,
Andrei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130410/dd6d8df2/attachment.htm>


More information about the Users mailing list