[Home]

Summary:ASTERISK-22372: res_corosync: Compilation errors and functionality broken in Asterisk 12
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2013-08-23 11:49:05Date Closed:2014-05-22 06:54:35
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_corosync
Versions:12 Frequency of
Occurrence
Related
Issues:
duplicatesASTERISK-22912 res_corosync doesn't build in Asterisk 12 beta2
Environment:Attachments:
Description:In previous versions of Asterisk, {{res_corosync}} was tightly built on top of the event subsystem. This included both the act of subscribing, as well as the passing of events. Because the event subsystem passed binary packed messages, it was trivial to pass the raw events down to CoroSync.

With the advent of the Stasis message bus, life got a bit harder for {{res_corosync}}.
# Subscriptions have to be parsed a bit more carefully, as there is not a listing of allowed subscription topics in the same way as the event subsystem. A mapping of subscriptions to Stasis topics will be needed.
# Event passing is pretty much broken. Message types that should be passed between Corosync nodes will need callbacks that translate the message type from the existing message type format to a binary blob that matches historical versions of Asterisk. Likewise, events received from Corosync have to be re-parsed out into JSON/structs.

Because you would ostensibly want Asterisk 12 to talk with prior versions, the MWI and device state events - at the very least - should have binary compatibility with their counterparts.

(On the plus side, what *can* you do with passing channel state between Asterisk instances I wonder?)
Comments:By: Matt Jordan (mjordan) 2014-04-27 00:43:04.282-0500

Not too terribly hard to fix this (yay Stasis). Gave Stasis message types a format handler to convert their payloads into {{ast_event}} objects and the rest mostly fell into place. Review up on review board.