03-30-2015 03:42 AM
Hi,
New to Jabber but can't find the answer to this in the docs.
I am trying to use the REST API to set a user's overall presence, and the rich custom status ("note") to a specific value.
When setting an 'available' status there are no problems, but I have issues when trying to set a 'busy', 'away' or 'dnd' status, where the basic presence usually reverts to Available and ignores the note/custom status;
For example, using a pidf containing this:
<activities> | |
<away /> | |
</activities> | |
<class>manual</class> | |
<note>set programmaticallly</note> |
returns http 200 OK but only changes the presence to Available with no note.
Strangely if I manually select "Available" in the Jabber Windows client before making this request then it works fine once, (subsequent attempts then fail until "available" is selected in Windows Jabber clientagain)
Setting the presence-override header to true/false, changing tuple id of "cisco-pws" to "pws-override", or changing the contact priority dont fix the problem.
Grateful for any help, thanks
03-30-2015 11:19 AM
Can you post exactly what you're using for headers and for the whole body? You can sanitize any personal addresses into test@example.com, or whatever.
04-08-2015 03:03 AM
Thanks for the reply. My request is as follows (sanitized), any thoughts?...
PUT /presence-service/users/myusername/presence/rich HTTP/1.1
Host: <cup-ip>:8083
Presence-Session-Key: 54f5ac5f-20d-4b27200a-6334-2
Presence-Expiry: 3600
Presence-Override: false
<?xml version="1.0" encoding="UTF-8" ?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:rp="urn:ietf:params:xml:ns:pidf:rpid" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:ce="urn:cisco:params:xml:ns:pidf:rpid" xmlns:cisco="urn:cisco:params:xml:ns:pidf:source" xmlns:so="urn:cisco:params:xml:ns:pidf:source" xmlns:sc="urn:ietf:params:xml:ns:pidf:servcaps" entity="sip:myusername@mydomain.local">
<ce:person id="myusername">
<activities>
<away/>
</activities>
<class>manual</class>
<note>set programmatically</note>
</ce:person>
<tuple id="cisco-pws">
<contact priority="0.5">sip:myusername@mydomain.local</contact>
<so:source>Presence Web Service</so:source>
<sc:servcaps>
<sc:audio>false</sc:audio>
<sc:video>false</sc:video>
<sc:text>false</sc:text>
</sc:servcaps>
<status><basic>open</basic></status>
</tuple>
</presence>
04-09-2015 03:12 PM
If I remember correctly I believe you need to also set the priority for your presence as well to be able to override what Cisco Windows Jabber is setting it as well.
see this document https://developer.cisco.com/fileMedia/download/f4a5c1d3-e8c9-4a5c-ac6c-c68dedaa8f9f
Try starting on page 11 ad let us know if you have any questions.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide