cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
960
Views
0
Helpful
3
Replies

Presence Web Service (REST) issues vs Jabber Windows Client

it256256256
Level 1
Level 1

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

3 Replies 3

npetrele
Cisco Employee
Cisco Employee

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. 

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>

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: