[OpenSIPS-Users] Fixing the Contact Header for NAT
Juan Backson
juanbackson at gmail.com
Thu Nov 27 16:04:10 CET 2008
Hi Inaki
Here is the sip trace from b2bua to opensips. The contact in 200OK has
public ip:
U 233.32.345.5:5800 -> 192.168.1.101:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.101
;branch=z9hG4bK3ab5.9b17c4a1.0;received=233.32.345.5.
Via: SIP/2.0/UDP 192.168.1.100:26682;received=116.24.163.21
;branch=z9hG4bK-d87543-1a09c008b901bc5c-1--d87543-;rport=2751.
Record-Route: <sip:192.168.1.101;lr=on;ftag=b81a6b5e;nat=yes>.
From: "1000" <sip:1000 at 233.32.345.5:5060>;tag=b81a6b5e.
To: "0" <sip:0 at 233.32.345.5:5060>;tag=Sy7K9eUFg61tB.
Call-ID: ODRiMGUzMGFiZDg2OGU0OGNiYmE0MWY5OWRkMTMxOTA..
CSeq: 2 INVITE.
Contact: <sip:mod_sofia at 233.32.345.5:5800;transport=udp>.
User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-10454M.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,
REFER, UPDATE, REGISTER, INFO.
Supported: timer, precondition, path, replaces.
Allow-Events: talk.
Session-Expires: 120;refresher=uas.
Min-SE: 120.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 269.
.
v=0.
o=FreeSWITCH 5494423604621376967 2638962022927722250 IN IP4 233.32.345.5.
s=FreeSWITCH.
c=IN IP4 233.32.345.5.
t=0 0.
m=audio 10272 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
Here is the sip trace from opensips to xlite. The contact in 200OK has
public ip:
U 192.168.1.101:5060 -> 116.24.163.21:2751
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.100:26682;received=116.24.163.21
;branch=z9hG4bK-d87543-1a09c008b901bc5c-1--d87543-;rport=2751.
Record-Route: <sip:192.168.1.101;lr=on;ftag=b81a6b5e;nat=yes>.
From: "1000" <sip:1000 at 233.32.345.5:5060>;tag=b81a6b5e.
To: "0" <sip:0 at 233.32.345.5:5060>;tag=Sy7K9eUFg61tB.
Call-ID: ODRiMGUzMGFiZDg2OGU0OGNiYmE0MWY5OWRkMTMxOTA..
CSeq: 2 INVITE.
Contact: <sip:mod_sofia at 233.32.345.5:5800;transport=udp>.
User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-10454M.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,
REFER, UPDATE, REGISTER, INFO.
Supported: timer, precondition, path, replaces.
Allow-Events: talk.
Session-Expires: 120;refresher=uas.
Min-SE: 120.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 269.
.
v=0.
o=FreeSWITCH 5494423604621376967 2638962022927722250 IN IP4 233.32.345.5.
s=FreeSWITCH.
c=IN IP4 233.32.345.5.
t=0 0.
m=audio 10272 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
It looks to like it is fine.
JB
On Thu, Nov 27, 2008 at 10:48 PM, Iñaki Baz Castillo <ibc at aliax.net> wrote:
> El Jueves, 27 de Noviembre de 2008, Juan Backson escribió:
> > In my onreply_route, I have:
> >
> > onreply_route[1] {
> > fix_nated_contact();
> > exit;
> >
> > }
> >
> > But that alone does not work.
>
> Can you check it by doing a SIP capture? the Contact in 200 arriving to
> OpenSIPS will contain a private IP, while the Contact in 200 leaving
> OpenSIPS
> will contain a public IP (should contain).
>
> --
> Iñaki Baz Castillo
>
> _______________________________________________
> 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/20081127/58de8b58/attachment-0001.htm
More information about the Users
mailing list