[Home]

Summary:ASTERISK-28880: res_xmpp: Does not support urn:xmpp:ping causing session termination
Reporter:Dmitry Melekhov (slesru)Labels:
Date Opened:2020-05-10 01:30:50Date Closed:
Priority:TrivialRegression?
Status:Open/NewComponents:Resources/res_xmpp
Versions:13.33.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Centos 6Attachments:
Description:We use ejabberd as server and I decided to try configure mod_ping as
mod_ping:
   send_pings: true
    ping_interval: 10
    ping_ack_timeout: 15
    timeout_action: kill

And got these in logs:

2020-05-09 14:37:44.049 [info] <0.642.0>@ejabberd_c2s:process_terminated:294 (tls|<0.642.0>) Closing c2s session for asterisk@jabber/asterisk-xmpp: Connection failed: ping_timeout

I also see that asterisk connection is lost, then it reconnects again and again.


I guess that res_xmpp does not support ping, which , I think , have to fixed.
Other clients, for instance, psi, supports this.

Thank you!
Comments:By: Asterisk Team (asteriskteam) 2020-05-10 01:30:51.162-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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Joshua C. Colp (jcolp) 2020-05-10 05:21:08.608-0500

Please provide an XMPP trace using "xmpp set debug on" to show the traffic that is actually flowing.

By: Dmitry Melekhov (slesru) 2020-05-10 05:48:41.477-0500

Hello!

Here it is:

<--- XMPP received from 'jabber' --->
<iq to='asterisk@jabber/asterisk-xmpp' from='asterisk@jabber' type='get' id='rr-1589107363992-1445152047091157490-AMuS5sApk0vNaatZlV51XCssOjo=-42937410'><p
ing xmlns='urn:xmpp:ping'/></iq>
<------------->

Then :

[May 10 14:42:33] WARNING[9239] res_xmpp.c: [jabber] Socket read error

Because I have  timeout_action: kill  and there is no reply from res_xmpp...

Thank you!



By: Dmitry Melekhov (slesru) 2020-05-11 23:24:12.836-0500

Well, I think changing subject in this way "causing session termination" is wrong, this is not default ejabberd behavior.

Anyway, problem exists https://xmpp.org/extensions/xep-0199.html
If the pinged entity does not support the ping namespace, it MUST return a <service-unavailable/> error

Thank you!