Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Iñaki Baz (ibc_sf)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Presence server forces refresh SUBSCRIBE's being always UDP
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":
# OpenSIPS -> alice
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.0.129:6060;branch=z9hG4bKfglujzrw
Contact: <sip:[hidden email]:5060>
As you see, Contact in 200 OK doesn'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 her 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.