mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
stasis / manager / ari: Better filter messages.
Previously both AMI and ARI used a default route on their stasis message router to handle some of the messages for publishing out their respective connection. This caused messages to be given to their subscription that could not be formatted into AMI or JSON. This change adds an API call to the stasis message router which allows a default route to be set as well as formatters that the default route is expecting. This allows both AMI and ARI to specify that their default route only wants messages of their given formatter. By doing so stasis can more intelligently filter at publishing time so that they do not receive messages which will not be turned into AMI or JSON. ASTERISK-28244 Change-Id: I65272819a53ce99f869181d1d370da559a7d1703
This commit is contained in:
@@ -1240,6 +1240,10 @@ int manager_channels_init(void)
|
||||
|
||||
ast_register_cleanup(manager_channels_shutdown);
|
||||
|
||||
/* The snapshot type has a special handler as it can result in multiple
|
||||
* manager events being queued due to aspects of the snapshot itself
|
||||
* changing.
|
||||
*/
|
||||
ret |= stasis_message_router_add_cache_update(message_router,
|
||||
ast_channel_snapshot_type(), channel_snapshot_update, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user