[SR-Users] simple test case: add user/delete user on kamailio 3.3 presence server

Andreas Granig agranig at sipwise.com
Mon Jun 18 14:11:45 CEST 2012


Hi,

On 06/15/2012 05:25 PM, Min Wang wrote:
> |  1 | sip:103 at 192.168.122.32 | 101              | 192.168.122.32 |
> presence |      2 |        |    1339772803 |
> 
>    then I deleted the 103 from the contact list, the watcher table still
> shows the same.

For local storage, I'd expect an unsubscribe (subscribe with Expires=0)
from 101 to 103. The obvious work-flow would be to set it to
"terminated" in watchers table, and in case of a subsequent re-subscribe
it should be changed back to "pending" state, although the state-machine
doesn't indicate a transition from "terminated" back to "pending". Isn't
this the case?

For xcap storage, there are other ways to block/remove a contact on/from
the list. As Iñaki pointed out in
http://lists.opensips.org/pipermail/devel/2009-August/003868.html, the
xcap server needs to notify the sip server about the change, which in
turn will notify the other party (103) that it's no longer allowed to
see 101's state. If the xcap_server module of kamailio is used, there is
the following code snippet in some examples floating around on the internet:


switch($rm) {
  case "PUT":
  xcaps_put("$var(uri)", "$hu", "$rb");
  if($xcapuri(u=>auid)=~"pres-rules") {
    pres_update_watchers("$var(uri)", "presence");
    pres_refresh_watchers("$var(uri)", "presence", 1);
  }

So, shouldn't this update the watchers accordingly? Anyways, also in
this case the watcher state should change to "terminated", and in case
of a re-subscribe it should go back to pending if xcap rules are
allowing this.

Maybe someone with good xcap_server/presence insights could elaborate on
that?

Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120618/501b0ef2/attachment.pgp>


More information about the sr-users mailing list