Errores #121

Use "Expires: 0" when switching off YASS

Added by Iñaki Baz Castillo over 2 years ago. Updated over 2 years ago.

Status:Comentarios Start:08/31/2009
Priority:Urgente Due date:
Assigned to:Saúl Ibarra Corretgé % Done:

0%

Category:YASS - core
Target version:Known Issues

Description

When YASS is switched off it sends a PUBLISH like:

PUBLISH sip:ibc@sipdoc.net SIP/2.0
Via: SIP/2.0/UDP 10.134.16.124:5080;rport;branch=z9hG4bKPjQORRPIigJTHk8su8WQsJEQYEGtVw9XWx
Max-Forwards: 70
From: <sip:ibc@sipdoc.net>;tag=1ClcciOSsSt4S3shFGJbNSLM4pPEmaBo
To: <sip:ibc@sipdoc.net>
Call-ID: 3CUz.ZiJaEDe8Azw6H3Rr0AWJfkPbc34
CSeq: 32880 PUBLISH
Event: presence
SIP-If-Match: a.1251730414.6490.14.0
Expires: 300
User-Agent: YASS - 0.5.3trunk
Content-Type: application/pidf+xml
Content-Length:   231

<presence entity="sip:ibc@sipdoc.net" xmlns="urn:ietf:params:xml:ns:pidf">
 <tuple id="K7W864k9vFQxSfyHHA3t5kpN0JahKe2r">
  <status>
   <basic>closed</basic>
  </status>
 </tuple>
</presence>

This is problematic since a presence entry "closed" will remain in the presence server for 300 seconds. If YASS is started again it will send a new PUBLISH "open". At this time there are two publishes in the presence server, so the NOTIFY's sent to the watchers would contain both tuples, one "open" and the other "closed".

Depending on how each watcher interprents that NOTIFY it will display the buddy as "online" or "offline" (depending on if it gives priority to the first or last tuple found in the NOTIFY). It's really problematic.

The solution is simple: When switching off sends a PUBLISH like Twinkle does:

PUBLISH sip:ibc@sipdoc.net SIP/2.0
Via: SIP/2.0/TCP 10.134.16.124:6060;rport;branch=z9hG4bKarfsjhqi
Max-Forwards: 70
To: "Inaki Baz Castillo" <sip:ibc@sipdoc.net>
From: "Inaki Baz Castillo" <sip:ibc@sipdoc.net>;tag=zrjte
Call-ID: uoszokoakzphufz@ibc-laptop
CSeq: 55 PUBLISH
Event: presence
Expires: 0
SIP-If-Match: a.1251730414.6489.16.0
User-Agent: Twinkle/1.4.2
Content-Length: 0

This is, no body, "Expires" 0 and same "SIP-If-Match" value as the Etag received in the 200 OK for the previous PUBLISH (this last point if already correctly handled by YASS), so the previous entry in the presence server would be automatically terminated and there would be no confussion when YASS is again started.

History

Updated by Saúl Ibarra Corretgé over 2 years ago

  • Status changed from Nueva to Resuelta
  • Target version changed from voip2day to 0.5.3

Fixed in r229. We don't set presence status to 'closed' when shutting down YASS anymore.

Updated by Iñaki Baz Castillo over 2 years ago

Sorry, but now YASS doesn't send the PUBLISH with "Expires: 0" when switching off. It sends no PUBLISH.

Updated by Iñaki Baz Castillo over 2 years ago

  • Status changed from Resuelta to Comentarios

Updated by Saúl Ibarra Corretgé over 2 years ago

  • Target version changed from 0.5.3 to Known Issues

Updated by Saúl Ibarra Corretgé over 2 years ago

It's a PJSIP known bug. It's expected to be fixed for release 1.5.

http://trac.pjsip.org/repos/ticket/364

Also available in: Atom PDF