[OpenSIPS-Devel] 'presence' module replies 200 OK wihtout "transport=TCP"

Iñaki Baz Castillo ibc at aliax.net
Sun Nov 23 01:51:39 CET 2008


Hi, alice sends a SUBSCRIBE (Event: presence) to Opensips which handles the 
subscription by itself with the 'presence' module.
This SUBSCRIBE has been sent using TCP, but the 200 OK from the presence 
server has a Contact with no "transport=tcp":

-------------
# alice -> OpenSIPS (with presence server)
SUBSCRIBE sip:bob at domain.org SIP/2.0
Via: SIP/2.0/TCP 192.168.0.129:6060;branch=z9hG4bKfglujzrw
Contact: <sip:alice at 192.168.0.129:6060;transport=tcp>
Event: presence

# OpenSIPS -> alice
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.0.129:6060;branch=z9hG4bKfglujzrw
Contact: <sip:presence at XX.XX.XX.XX:5060>
--------------

As you see, Contact in 200 OK doens't have ";transport=tcp". This means that 
future refresh SUBSCRIBE's from alice (in-dialog request) MUST be sent using 
UDP instead of TCP, while the NOTIFY from OpenSIPS to alice MUST be always 
using TCP (since the Contact in the initial SUBSCRIBE from alice 
has "transport=tcp").

While this is not a bug (SIP protocol allows it and also more exotic things) I 
think it doesn't make sense:
Imagine that alice needs to use TCP because the SUBSCRIBE is very long (for 
any reason) o just because there are network issues using UDP in his network 
(UDP fragmentation?). In this scenairo refresh subscriptions would be lost.

IMHO if the initial SUBSCRIBE uses TCP, the presence server (UAS) should allow 
using TCP for refresh subscriptions, and for that it must add "transport=tcp" 
in the Contact of the first 200 OK.

Opinions?

Thanks a lot.



-- 
Iñaki Baz Castillo



More information about the Devel mailing list