confbridge: Add support for disabling text messaging.

When in a conference bridge it may be necessary to have
text messages disabled for specific participants or for
all. This change adds a configuration option, "text_messaging",
which can be used to enable or disable this on the
user profile. By default existing behavior is preserved
as it defaults to "yes".

ASTERISK-28841

Change-Id: I30b5d9ae6f4803881d1ed9300590d405e392bc13
This commit is contained in:
Joshua C. Colp
2020-04-16 10:15:42 -03:00
committed by Joshua Colp
parent 191f136260
commit 6cfc6ff53c
8 changed files with 41 additions and 1 deletions

View File

@@ -1056,6 +1056,14 @@ int ast_bridge_channel_queue_frame(struct ast_bridge_channel *bridge_channel, st
return 0;
}
if ((fr->frametype == AST_FRAME_TEXT || fr->frametype == AST_FRAME_TEXT_DATA) &&
!bridge_channel->features->text_messaging) {
/* This channel is not accepting text messages. */
ast_bridge_channel_unlock(bridge_channel);
bridge_frame_free(dup);
return 0;
}
if (DEBUG_ATLEAST(1)) {
if (fr->frametype == AST_FRAME_TEXT) {
ast_log(LOG_DEBUG, "Queuing TEXT frame to '%s': %*.s\n", ast_channel_name(bridge_channel->chan),