On 6/10/11 12:27 PM, Eugen Dedu wrote:
On 10/06/11 12:18, Daniel-Constantin Mierla wrote:
Hello,
On 6/10/11 12:04 PM, Eugen Dedu wrote:
Thank you very much for your answer.
Do you confirm that for kamailio, when a user has not been online since a long time ago, (1) it answers with an empty body notify (and not with a body with Offline status), and more importantly (2) that this means the user is offline?
I ask this because this seems contradictory to what SIP standard says (see below): it does not say that empty body means offline, but just does not have "meaningful state".
In fact, opal (SIP library among others) developers (in CC) consider that empty body means no information (which is different than offline!), while kamailio uses it for offline!
it is not for online, it is like the others understood -- an empty body does not change anything. Because of that I said that if the UA knew the user is offline, it stays offline. When a UA has a user with online state, if it is a notify with empty body, stays like that, nothing changes.
Ok. But this happens when I start my application, so it does not know anything about the contacts, and it receives empty body. So, even after this notify, it still does not know anything about that contact, is that right?
Any application (or those I used so far), they show the contacts offline at startup, this is the initial state. Kamailio notifies with presence states when there is a PUBLISH by the presentity. The notification with the empty body give the state of the subscription, not the state of contact -- see the subscription-state header in notify.
Also, as the user is offline (not connected since long time ago), why then kamailio sends an empty body for him instead of sending Offline status? This would allow the application to correctly show him as offline, instead of "nothing known". I noticed that even after several minutes no Offline status is sent by kamailio.
The sip presence server sends in notify only the presence documents published by a user agent. If there is no such document, the sip server has nothing to send. I think there are some specs that allow a user to set default state, probably via xcap -- but I am not sure and I haven't searched ietf for it.
Cheers, Daniel
On 09/06/11 13:10, Daniel-Constantin Mierla wrote:
Hello,
the notify is sent to inform about the state of the subscription, which is active in this case. If it would the first subscription to that user and force_active will not be set, then should be subscription state pending, iirc.
The empty body does not change anything to the phone information about the watched presentity, which was known to be offline.
Cheers, Daniel
On 6/8/11 10:06 PM, Eugen Dedu wrote:
No idea?
On 05/06/11 22:31, Eugen Dedu wrote:
Hi,
ekiga.net registrar uses kamailio 1.5.3 (yes, a bit old...) and for users who are not registered an empty NOTIFY body is returned when asked by a SUBSCRIBE. What does this mean from SIP standard point of view, and from kamailio point of view (are they identical?) I see in RFC3265/3.1.6.2: .... If the resource has no meaningful state at the time that the SUBSCRIBE message is processed, this NOTIFY message MAY contain an empty or neutral body but is difficult for me to interpret what it means.
Example: I ask the presence for a user xyz who registered and quit application long time ago:
SUBSCRIBE sip:xyz@ekiga.net SIP/2.0 CSeq: 1 SUBSCRIBE Via: SIP/2.0/UDP 82.238.108.175:5060;branch=z9hG4bKdabe824f-1a8e-e011-9efc-0024d693d8e8;rport
User-Agent: Ekiga/3.3.1 From: sip:eugen.dedu@ekiga.net;tag=4888824f-1a8e-e011-9efc-0024d693d8e8 Call-ID: f602824f-1a8e-e011-9efc-0024d693d8e8@snoopy Supported: eventlist To: sip:xyz@ekiga.net Accept: application/pidf+xml Accept: multipart/related Accept: application/rlmi+xml Contact: sip:eugen.dedu@82.238.108.175:5060 Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING,PRACK
Expires: 300 Event: presence Content-Length: 0 Max-Forwards: 70
I receive the following answer:
NOTIFY sip:eugen.dedu@82.238.108.175:5060 SIP/2.0 CSeq: 1 NOTIFY Via: SIP/2.0/UDP 86.64.162.35;branch=z9hG4bK2a99.b8a72c47.0 User-Agent: Kamailio (1.5.3-notls (i386/linux)) From: sip:xyz@ekiga.net;tag=f85b0bd16aaafa8479586ac9f88b3198-10a0 Call-ID: f602824f-1a8e-e011-9efc-0024d693d8e8@snoopy To: sip:eugen.dedu@ekiga.net;tag=4888824f-1a8e-e011-9efc-0024d693d8e8 Contact: sip:86.64.162.35:5060 Subscription-State: active;expires=370 Event: presence Content-Length: 0 Max-Forwards: 70
To resume: What does SIP standard say about this NOTIFY with empty body? Does this mean that the user xyz is offline?
Or does this mean that user's status has not changed? In fact, the NOTIFY with empty body (as shown above) is the first one sent by kamailio, so there is no "previous" state of that user, hence "unchanged" status has no meaning.
Thank you,
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users