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

Andrei Grav andreigrav at gmail.com
Thu Apr 11 16:45:26 CEST 2013


Thank you Bogdan,

I solved the problem based on your idea.
I'm not to sure about all because I'm at beginning of use of Opensips.... I
am going to read more about it.

best regards,
Andrei


On Wed, Apr 10, 2013 at 7:43 PM, Bogdan-Andrei Iancu <bogdan at opensips.org>wrote:

> **
> 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 Developerhttp://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 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
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130411/ff621f05/attachment.htm>


More information about the Users mailing list