[OpenSIPS-Users] About "nat_traversal" fix_contact()

Flavio Goncalves flavio at voffice.com.br
Mon Jun 3 12:41:11 CEST 2013


Hi Samuel,

Try using add_path_received().

Flavio E. Goncalves




2013/5/28 Samuel <samuelcamara at hotmail.com>

> Hi Iñaki,
>
> I'm struggling with this NAT traversal module.
>
> I have the following setup:
>
> UA-----NAT box---- P1 ----- P2/REGISTRAR---WORLD!
>
> - I just own P1 configuration (P2 is a voip service provider)
>
> - I can successfully register, and use nat_keepalive and forcerport.
> The SIP Contact is sent from P1 to REGISTRAR with private IP 192.168.a.b
> I'm using Path module to send Path header to keep P1 allways in the middle.
>
> - I can establish outgoing calls. Use nat_keepalive and fix_contact().
> Contact properly updated and SDP generated by P2 contains the NAT box IP
> address. Audio Ok.
>
> - BUT incoming calls do not work.
> Since Path is included the INVITE is properly sent from P2 to P1. But then
> I
> can't find a way to retrieve the public IP of NAT box that is received in
> PAth header from P2 to use as destination of packet.
>
> INVITE received from P2:
>
> INVITE sip:9015009 at 192.168.1.103:2907;rinstance=6FF04BD1 SIP/2.0
> Via: SIP/2.0/UDP P2IP:5060;branch=z9hG4bKb6j3tfgmmi4809fsu1tp3a5ob0
> Call-ID: SDeue3301-75834c789dc311e457f77711e400d33c-gurpko2
> CSeq: 1 INVITE
> From: "Anonymous"
> <sip:Restricted at P2IP
> >;tag=SDeue3301-21175933_8cce6d4f_2ca134f9-9aef-40e6-9771-00fa9719af6c
> To:
> <sip:9015009-akfeepv94jd3e at 10.0.5.77:5060
> ;rinstance=6FF04BD1;useradd=P1IP;userport=8891>
> Max-Forwards: 69
> Contact: "Anonymous" <sip:Restricted at P2IP:5060;transport=udp>
> Allow: INVITE
> Accept: application/sdp
> Anonymity: uri
> Min-SE: 90
> X-UUID: 6ebba188b5134ab1854da88011983247
> Supported: timer,replaces
> Content-Disposition: session;handling=required
> Content-Type: application/sdp
> X-DID: 2815204000
> Content-Length: 282
> Route: <sip:P1IP:8891;lr;received=sip:xx.xx.xx.xx:46625>
>
> So how to retrieve this received IP xx.xx.xx.xx from INVITE and use it as
> destination for my INVITE instead of use the IP received in the RURI?
>
> What is the best way to do it?
>
> Thanks for help,
> Samuel
>
>
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/About-nat-traversal-fix-contact-tp1487591p7586596.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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/20130603/5830a822/attachment.htm>


More information about the Users mailing list