Summary: | ASTERISK-22435: [patch] jabber/xmpp MWI distributed pubsub issue where the mailbox and context get swapped at the remote end | ||
Reporter: | abelbeck (abelbeck) | Labels: | |
Date Opened: | 2013-08-31 13:10:38 | Date Closed: | 2013-09-06 14:24:01 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Resources/res_jabber Resources/res_xmpp |
Versions: | SVN 12 1.8.23.1 11.5.1 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | AstLinux 1.1.x | Attachments: | ( 0) asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch ( 1) asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch |
Description: | While testing Distributed Asterisk Events using XMPP PubSub, MWI did not seem to work as expected.
Snippet from "event dump cache MWI" at remote end... -- Event: MWI Mailbox: default Context: 21 OldMessages: 9 NewMessages: 1 EntityID: 00:00:24:xx:xx:xx -- Snippet from "xmpp set debug on" at remote end... -- <items node='message_waiting'> <item id='21@default'><mailbox eid='00:00:24:xx:xx:xx' xmlns='http://asterisk.org'> <NEWMSGS>1</NEWMSGS> <OLDMSGS>9</OLDMSGS> </mailbox> -- Notice the MWI cache has the Mailbox and Context reversed. This issue seems to effect all Asterisk versions supporting Distributed Asterisk Events using XMPP PubSub. Attached are patches for Asterisk 1.8 and 11. 12 and SVN res_xmpp.c is slightly different, but easily extrapolated. | ||
Comments: | By: abelbeck (abelbeck) 2013-08-31 13:11:52.396-0500 Attach: asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch By: abelbeck (abelbeck) 2013-08-31 13:12:30.292-0500 Attach: asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch By: Michael Keuter (mkeuter) 2013-09-01 04:53:29.730-0500 The 2 patches work fine for me, both in Asterisk 1.8 and 11. The MWI cache is now correct, and MWI now works over XMPP by just adding "mailbox=21" in sip.conf (for the above example). By: Matt Jordan (mjordan) 2013-09-03 13:47:52.524-0500 Thanks for finding this and providing a patch! By: Kinsey Moore (kmoore) 2013-09-06 14:33:10.393-0500 FYI, this should already be fixed in 12 and trunk due to the conversion to the Stasis message bus and the rework that it entailed. By: abelbeck (abelbeck) 2013-09-06 14:40:24.136-0500 Kinsey, please take another look at 12 and trunk. -- ast_publish_mwi_state_full(item_id, context, newmsgs, oldmsgs, NULL, &pubsub_eid); -- but 'item_id' is the context and 'context' is the mailbox, which is swapped as well. By: Kinsey Moore (kmoore) 2013-09-06 15:44:15.900-0500 You are correct, my apologies. Fixes in progress. |