mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 11:11:05 +00:00
stasis: Allow filtering by formatter
A subscriber can now indicate that it only wants messages that have formatters of a specific type. For instance, manager can indicate that it only wants messages that have a "to_ami" formatter. You can combine this with the existing filter for message type to get only messages with specific formatters or messages of specific types. ASTERISK-28186 Change-Id: Ifdb7a222a73b6b56c6bb9e4ee93dc8a394a5494c
This commit is contained in:
@@ -399,3 +399,13 @@ int stasis_message_router_set_default(struct stasis_message_router *router,
|
||||
/* While this implementation can never fail, it used to be able to */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void stasis_message_router_accept_formatters(struct stasis_message_router *router,
|
||||
enum stasis_subscription_message_formatters formatters)
|
||||
{
|
||||
ast_assert(router != NULL);
|
||||
|
||||
stasis_subscription_accept_formatters(router->subscription, formatters);
|
||||
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user