[Home]

Summary:ASTERISK-27927: res_xmpp: <c ver='asterisk-xmpp'> not XEP-115 conformant
Reporter:Paul Ina (xmppaulina)Labels:
Date Opened:2018-06-20 08:22:29Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Resources/res_xmpp
Versions:13.18.3 15.4.1 Frequency of
Occurrence
Related
Issues:
Environment:Ubuntu 18.04, Asterisk 13.18.3Attachments:
Description:The <presence/> stanzas from Asterisk don't conform with XEP-0115 Entity Capabilities. Asterisk always uses 'asterisk-xmpp' as the 'ver' attribute, but XEP-0115 says:

«The 'ver' attribute is a specially-constructed string (called a "verification string") that represents the entity's service discovery identity...»

which would look like this:

<presence from='romeo@montague.lit/orchard'>
 <c xmlns='http://jabber.org/protocol/caps'
    hash='sha-1'
    node='http://code.google.com/p/exodus'
    ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
</presence>

This is what Asterisk's res_xmpp does:

<presence  from='phone@example.org/asterisk'>
 <c xmlns='http://jabber.org/protocol/caps'
   node='http://www.asterisk.org/xmpp/client/caps'
   ver='asterisk-xmpp'/>
</presence>

The problem with other XMPP clients is that they often don't recognize Jingle audio and video capabilities with res_xmpp clients. For example I'm unable to call the Asterisk user from aTalk for Android (aTalk version 1.4 has a temporary work-around, but the next version will go back to the standard conformant behaviour).

This is the line in the sources where the 'ver' attribute is set 'asterisk-xmpp', but should be dynamically calculated:
https://github.com/asterisk/asterisk/blob/15.4/res/res_xmpp.c#L2410

I'm running Asterisk 13.18.3, but it looks like all Asterisk versions up to "master" are affected.
Comments:By: Asterisk Team (asteriskteam) 2018-06-20 08:22:31.671-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Sean Bright (seanbright) 2018-06-21 07:43:16.829-0500

It is XEP-0115 compliant, just not with the latest version of the standard:

{quote}
Note: Before version 1.4 of this specification, the 'ver' attribute was used to specify the released version of the software; while the values of the 'ver' attribute that result from use of the algorithm specified herein are backwards-compatible, applications SHOULD appropriately handle the [Legacy Format|https://xmpp.org/extensions/xep-0115.html#legacy].
{quote}

So this doesn't appear to be a bug, but it would be nice to support the latest version of the standard. Patches are welcome as {{res_xmpp}} doesn't get much attention these days.