Question :
My company has been developing an application that can inject a status into the IM&presence API.
The scenario is like this;
User, set's a custom status to his state when he is available; e.g. "Available - working with a customer"
User, walks away from his computer and goes into away state after 5 minutes; Away
Our application detects the change and sends an update so the custom message will be displayed in the "Away - working with a customer"
The problem here is we alway need to have the manual class in the API message to the IM&Presence server, which means when the user returns to his desk his state is still "Away - working with a customer" instead of "Available - working with a customer"
Just as a comparision of how the Jabber client works normally without any interference.
User sets a custom mesasge, "Available - working with a customer"
User, walks away from his compture and goes into the away state after 5 min; Away
User, returns to his desk and state is changed to "Available - working with a customer"
Are there any workarounds for this scenario ?
============
What kind of application is this that you're building for this goal? Javascript/Jabber SDK? REST, Soap? What language? What platform/library?
=========
We have had some progress on this issue, and this now seems to be working intermittently.
The application is a windows .NET service, written in C#, that communicates with a unified presence server via SOAP.
A sample rich presence document being sent to the server, that did not manage to overwrite the automatic away message:
<?xml version="1.0"?>
<presence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" entity="sip:forrest@nam.local" xmlns="urn:ietf:params:xml:ns:pidf">
<person id="forrest@nam.local" xmlns="urn:ietf:params:xml:ns:pidf:data-model">
<activities>
<away />
</activities>
<note>working?</note>
</person>
<tuple id="cisco-upc">
<source xmlns="urn:cisco:params:xml:ns:pidf:source">Presence Web Service</source>
<contact priority="0.7">sip:forrest@nam.local</contact>
<servcaps xmlns="urn:ietf:params:xml:ns:pidf:servcaps">
<audio>false</audio>
<video>false</video>
<text>true</text>
</servcaps>
<status>
<basic>open</basic>
</status>
</tuple>
</presence>
Any suggestions?
==========
Are you using PWS to send the PIDF? Can you post the setPresence SOAP XML you're using?
==========
Here it is;
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:session-key xmlns:h="urn:cisco:cup:presence:soap" xmlns="urn:cisco:cup:presence:soap">551577ca-290-6945ad10-6735-2</h:session-key>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<setPresence xmlns="urn:cisco:cup:presence:soap">
<presenceType>RICH_PRESENCE</presenceType>
<presenceInfo>
<richPresence xsi:type="PIDF">
<presence entity="sip:forrest@nam.local" xmlns="urn:ietf:params:xml:ns:pidf" xmlns:sc="urn:ietf:params:xml:ns:pidf:servcaps" xmlns:ce="urn:cisco:params:xml:ns:pidf:rpid" xmlns:es="urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status" xmlns:et="urn:ietf:params:xml:ns:pidf:rpid:rpid-tuple" xmlns:ci="urn:ietf:params:xml:ns:pidf:cipid" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:pp="urn:ietf:params:xml:ns:pidf:person" xmlns:so="urn:cisco:params:xml:ns:pidf:source" xmlns:rp="urn:ietf:params:xml:ns:pidf:rpid" xmlns:ep="urn:ietf:params:xml:ns:pidf:rpid:rpid-person">
<dm:person id="forrest@nam.local">
<dm:activities>
<dm:away/>
</dm:activities>
<dm:note>working</dm:note>
</dm:person>
<tuple id="cisco-upc">
<so:source>Presence Web Service</so:source>
<contact priority="0.7">sip:forrest@nam.local</contact>
<sc:servcaps>
<sc:audio>true</sc:audio>
<sc:video>true</sc:video>
<sc:text>true</sc:text>
</sc:servcaps>
<status>
<basic>open</basic>
</status>
</tuple>
</presence>
</richPresence>
<override>false</override>
</presenceInfo>
<expiration>3600</expiration>
</setPresence>
</s:Body>
</s:Envelope>
========
Possible answer:
I'm trying to match up your rich presence request with what I understand from your original post, and I'm having trouble piecing them together. Let me start from scratch then, and make sure I understand the problem.
1. User is "Available - working with customer".
2. User walks away, and after a timeout period, status normally automatically changes to "Away", but your application intercepts this and changes it to "Away - working with customer".
3. User wakes up his PC, and status automatically changes to "Available".
You want step #3 to automatically change it back to "Available - working with customer", correct? (Or, rather, find a way for your application to do that?)
That should certainly be possible. I can think of ways to do it with CAXL (Jabber SDK in Javascript). I'd have to try out a few strategies with SOAP to be sure, though. The SOAP example you provided doesn't make sense in that context, so perhaps I misunderstand the goal.
Comments
0 comments
Please sign in to leave a comment.