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:
George Joseph
2018-11-29 08:53:51 -07:00
parent 1657508ddd
commit 79899db740
6 changed files with 548 additions and 10 deletions

View File

@@ -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;
}