[Kamailio-Users] bug in subscribe when contact uses tcp transport?

Klaus Darilion klaus.mailinglists at pernau.at
Fri Mar 6 14:36:07 CET 2009


http://opensips.svn.sourceforge.net/viewvc/opensips?view=rev&revision=5032



Juha Heinanen schrieb:
> i would just like to add that in this example, i had kamailio sip proxy
> in front of kamailio presence server:
> 
>  > +++ 6-3-2009 11:44:07.897113 INFO SIP ::send_sip_tcp
>  > Send to: tcp:192.98.101.10:5060
>  > SUBSCRIBE sip:test at test.fi SIP/2.0
>  > Via: SIP/2.0/TCP 192.98.101.10:5074;rport;branch=z9hG4bKjyriojar
>  > Max-Forwards: 70
>  > To: <sip:test at test.fi>
>  > From: "Juha Heinanen" <sip:jh at test.fi>;tag=bdxzr
>  > Call-ID: rtiqagnmchyfjbd at taimen
>  > CSeq: 15 SUBSCRIBE
>  > Contact: <sip:jh at 192.98.101.10:5074;transport=tcp>
>  > Accept: application/pidf+xml
>  > Event: presence
>  > Expires: 3600
>  > User-Agent: Twinkle/1.4.1
>  > Content-Length: 0
>  > 
>  > +++ 6-3-2009 11:44:07.913387 INFO SIP ::process_sip_msg
>  > Received from: tcp:192.98.101.10:5060
>  > SIP/2.0 202 OK
>  > Record-Route: <sip:192.98.101.10;r2=on;lr>
>  > Record-Route: <sip:192.98.101.10;transport=tcp;r2=on;lr>
>  > Via: SIP/2.0/TCP 192.98.101.10:5074;received=192.98.101.10;rport=45696;branch=z9hG4bKjyriojar
>  > To: <sip:test at test.fi>;tag=3d2810ff0e005fca9b24aee8694a9a3d-1dda
>  > From: "Juha Heinanen" <sip:jh at test.fi>;tag=bdxzr
>  > Call-ID: rtiqagnmchyfjbd at taimen
>  > CSeq: 15 SUBSCRIBE
>  > Expires: 3600
>  > Contact: <sip:192.98.101.10:5082>
>  > Server: OpenXg Kamailio (1.5.0-tls (i386/linux))
>  > Content-Length: 0
> 
> and that actually works because the front end proxy adds r-r header to
> the subscribe request and that makes the subscriber to use tcp also for
> in-dialog subscribes.
> 
> however, if i have integrated sip proxy/presence server, i get the
> earlier described situation, where in-dialog subscribes would be sent
> via udp:
> 
> +++ 6-3-2009 11:58:48.202576 INFO SIP ::send_sip_tcp
> Send to: tcp:192.98.101.10:5060
> SUBSCRIBE sip:test at test.fi SIP/2.0
> Via: SIP/2.0/TCP 192.98.101.10:5074;rport;branch=z9hG4bKcjentvff
> Max-Forwards: 70
> Proxy-Authorization: Digest username="jh",realm="test.fi",nonce="49b0f3f60000000cfef7715324b37ecd354fa849a881407f",uri="sip:test at test.fi",response="1dafa05560f703932997381d497cdb10",algorithm=MD5,cnonce="4a6bc45fed",qop=auth,nc=00000001
> To: <sip:test at test.fi>
> From: "Juha Heinanen" <sip:jh at test.fi>;tag=wkpvh
> Call-ID: ajddfsugncegcre at taimen
> CSeq: 354 SUBSCRIBE
> Contact: <sip:jh at 192.98.101.10:5074;transport=tcp>
> Accept: application/pidf+xml
> Event: presence
> Expires: 3600
> User-Agent: Twinkle/1.4.1
> Content-Length: 0
> 
> +++ 6-3-2009 11:58:48.212542 INFO SIP ::process_sip_msg
> Received from: tcp:192.98.101.10:5060
> SIP/2.0 202 OK
> Via: SIP/2.0/TCP 192.98.101.10:5074;rport=51275;branch=z9hG4bKcjentvff
> To: <sip:test at test.fi>;tag=8056f5a66bd796abc1d40ab829a9781f-44eb
> From: "Juha Heinanen" <sip:jh at test.fi>;tag=wkpvh
> Call-ID: ajddfsugncegcre at taimen
> CSeq: 354 SUBSCRIBE
> Expires: 3600
> Contact: <sip:192.98.101.10:5060;transport=tcp>
> Server: OpenXg Kamailio (1.5.0-tls (i386/linux))
> Content-Length: 0
> 
> so at least in the case when presence server receives a subscribe
> without r-r headers, it should use in its 200 ok contact the same
> transport as what was in subscribe's contact.
> 
> -- juha
> 
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users




More information about the sr-users mailing list