Opened 3 years ago
Closed 3 years ago
#170 closed defect (fixed)
Qutecom should use <rpid:activities><rpid:busy/></rpid:activities> rather than <note>busy</note>
| Reported by: | ibc | Owned by: | vadim |
|---|---|---|---|
| Priority: | major | Milestone: | QuteCom 2.2-RC4 |
| Component: | phapi | Version: | 2.2 |
| Keywords: | Cc: |
Description
Qutecom doesn't interoperate well with other softphones as EyeBeam? since Qutecom doesn't implement the RFC 4480 (RPID: Rich Presence Extensions).
For example, Qutecom sends the following PUBLISH body when setting "busy" status:
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="sip:qutecom@domain.org">
<tuple id="azersdqre">
<status><basic>open</basic></status>
<note>busy</note>
<contact priority="1">sip:qutecom@domain.org</contact>
</tuple>
</presence>
The element "<note>busy</note>" is just a text note to be read by the human, nothing else, it won't be interpreted by the softpone as a specific status (Qutecom does it but it's wrong).
The real specification to indicate the "advanced" presence status is the RFC 4480 (which also requires RFC 4479). Eyebeam, which implements it, sends the following PUBLISH body when setting "busy" status:
<?xml version='1.0' encoding='UTF-8'?>
<presence xmlns='urn:ietf:params:xml:ns:pidf'
xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model'
xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid'
xmlns:c='urn:ietf:params:xml:ns:pidf:cipid'
entity='sip:eyebeam@domain.org'>
<tuple id='t2267e46e'>
<status>
<basic>open</basic>
</status>
</tuple>
<dm:person id='pdc5ba422'>
<rpid:activities>
<rpid:busy/>
</rpid:activities>
<dm:note>working at the office</dm:note>
</dm:person></presence>
As you can see, RFC's 4479 and 4480 statesthat the advances presence status and the user custom text note must be contained into a <dm:person> node (xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model') rather than be contained into the <tuple> node.
RFC 4479 (A Data Model for Presence) explains that <tuple> node must just be used to indicate service status. In Qutecom, as SIP softphone, it means:
- <basic>open</basic>: My voice/IM is open, you can try it.
- <basic>closed</basic>: My voice/IM is closed, don't try it.
RFC 4479 also explains that <person> node must be used to indicate human status and custom note (as explained above).
Change History (8)
comment:1 follow-up: ↓ 2 Changed 3 years ago by laurent
comment:2 in reply to: ↑ 1 ; follow-up: ↓ 3 Changed 3 years ago by ibc
Replying to laurent:
A patch is welcome !
I expect that providing technical information is also welcome, so any developer (I'm not) can code it.
Please, if you consider useless such information tell it to me so I'll stop reporting issues.
comment:3 in reply to: ↑ 2 Changed 3 years ago by laurent
I expect that providing technical information is also welcome, so any developer (I'm not) can code it.
Please, if you consider useless such information tell it to me so I'll stop reporting issues.
Poviding technical information is usefull for the community, continue ibc !
This path will be a good thing for QuteCom
comment:4 Changed 3 years ago by ibc
This feature involves a bit more complex XML handling as the new XML would use different namespaces. So I would like to know:
- Which XML parser does Qutecom use?
- Does Qutecom perform Xpath lookup using namespaces to search into the XML document?
For example, Qutecom cannot expect that the XML into the received NOTIFY contains:
xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid'
...
<rpid:activities>
<rpid:busy/>
</rpid:activities>
...
as instead it could contain:
xmlns:lalala='urn:ietf:params:xml:ns:pidf:rpid'
...
<lalala:activities>
<lalala:busy/>
</lalala:activities>
...
and would have the same meaning.
If Qutecom XML parser is namespaces aware there would be no problem on parsing any of them.
comment:5 follow-up: ↓ 6 Changed 3 years ago by laurent
Status is extracted with hard coded parser ( see http://trac.qutecom.org/browser/wifo/phapi/phevents.c function owplNotificationPresenceGetStatus )
In http://trac.qutecom.org/browser/libs/sipwrapper/src/phapi/PhApiCallbacks.cpp function onNotify, there is TinyXml?, not sure it supports namespaces :-(
For XPath, there is a lib called TinyXPath or we can use Qt framework ...
comment:6 in reply to: ↑ 5 Changed 3 years ago by ibc
Replying to laurent:
Status is extracted with hard coded parser ( see http://trac.qutecom.org/browser/wifo/phapi/phevents.c function owplNotificationPresenceGetStatus )
Inspecting that function I see:
if((basic_start_tag = strstr(notify, "<basic")) == NULL) {
This is very harcoded XML parsing and would not work when using namespaces.
It seems that it's coded to interoperate just with other Qutecom/Wengophone? clients :(
For XPath, there is a lib called TinyXPath or we can use Qt framework ...
Yes, some of them would be required this feature to work properly. XML namespaces support is fully required.
comment:7 Changed 3 years ago by chris-mac
- Version changed from 2.2-RC3 to 2.2
comment:8 Changed 3 years ago by laurent
- field_os set to all
- Resolution set to fixed
- Status changed from new to closed
bug fix :
577:3da5f4484c80
574:6e81709820b4

A patch is welcome !