[Devel] Event id in presence

Benny Prijono bennylp at pjsip.org
Mon Feb 26 13:06:39 CET 2007


All,

I was just playing around with the presence module, which works 
great btw, except for couple of minor things below.

I found that when ";id" parameter is present in the Event header of 
the SUBSCRIBE request, OpenSER didn't include the event ID in the 
outgoing NOTIFYs. Attached is the patch to fix that (taken against 
the CVS last Saturday).

And one more minor thing, I think there is a mistake in the sample 
presence configuration in:
http://www.openser.org/dokuwiki/doku.php/presence:configuration-file

In route[2] when handling SUBSCRIBE, the script doesn't need to send 
200/OK reply with sl_send_reply("200","ok "), since the presence 
module will already send 202.

Apart from that, PUBLISH/SUBSCRIBE/NOTIFY are working fine for me.

cheers,
  -benny

-------------- next part --------------
Index: modules/presence/notify.c
===================================================================
RCS file: /cvsroot/openser/sip-server/modules/presence/notify.c,v
retrieving revision 1.20
diff -r1.20 notify.c
68c68
< str* build_str_hdr(str event, str status, int expires_t, str reason)
---
> str* build_str_hdr(str event, str event_id, str status, int expires_t, str reason)
88a89,94
> 	if (event_id.len) {
> 		strncpy(str_hdr->s+str_hdr->len, ";id=", 4);
> 		str_hdr->len += 4;
> 		strncpy(str_hdr->s+str_hdr->len, event_id.s, event_id.len);
> 		str_hdr->len += event_id.len;
> 	}
1508c1514
< 	str_hdr = build_str_hdr( subs->event,subs->status, subs->expires,
---
> 	str_hdr = build_str_hdr( subs->event, subs->event_id, subs->status, subs->expires,


More information about the Devel mailing list