[OpenSIPS-Users] Opensips 1.9 as registrar and rtp_proxy / firewall
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Apr 10 18:43:30 CEST 2013
Hello Andrei,
For such a call (to a public end point), you do not actually need a
media relay as Asterisk could do Comedia (or symmetric RTP).
The idea is to detect on OpenSIPS the presence of NAT , take care of
fixing the contact of UAC and on SDP part use fix_nated_sdp("1") (see
http://www.opensips.org/html/docs/modules/1.9.x/nathelper.html#id250434)
for force Comedia on Asterisk. No need for a media relay.
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 04/10/2013 06:42 PM, Andrei Grav wrote:
> 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
> <http://sip:+0080080000@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
> <mailto:sip%3A50105 at myopensips.com>>;tag=szMaKKCRwqx5OGjUCwNS7F4X1ZDQpr8F.
> To: <sip:+0080080000 at myopensips.com
> <mailto:sip%3A%2B0080080000 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
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130410/2a700a94/attachment.htm>
More information about the Users
mailing list