http://opensips.svn.sourceforge.net/viewvc/opensips?view=rev&revision=50...
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@test.fi SIP/2.0 Via: SIP/2.0/TCP 192.98.101.10:5074;rport;branch=z9hG4bKjyriojar Max-Forwards: 70 To: sip:test@test.fi From: "Juha Heinanen" sip:jh@test.fi;tag=bdxzr Call-ID: rtiqagnmchyfjbd@taimen CSeq: 15 SUBSCRIBE Contact: sip:jh@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@test.fi;tag=3d2810ff0e005fca9b24aee8694a9a3d-1dda From: "Juha Heinanen" sip:jh@test.fi;tag=bdxzr Call-ID: rtiqagnmchyfjbd@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@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@test.fi",response="1dafa05560f703932997381d497cdb10",algorithm=MD5,cnonce="4a6bc45fed",qop=auth,nc=00000001 To: sip:test@test.fi From: "Juha Heinanen" sip:jh@test.fi;tag=wkpvh Call-ID: ajddfsugncegcre@taimen CSeq: 354 SUBSCRIBE Contact: sip:jh@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@test.fi;tag=8056f5a66bd796abc1d40ab829a9781f-44eb From: "Juha Heinanen" sip:jh@test.fi;tag=wkpvh Call-ID: ajddfsugncegcre@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@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users