ari/bridge: Add mute, dtmf suppression controls

Add bridge_features structure to bridge creation.  Specifically, this
implements mute and DTMF suppression, but others should be able to be
easily added to the same structure.

ASTERISK-27322 #close
Reported by: Darren Sessions
Sponsored by: AVOXI

Change-Id: Id4002adfb65c9a8027ee9e1a5f477e0f01cf9d61
This commit is contained in:
Seán C McCord
2017-10-06 21:48:48 -04:00
parent 1505c1bb09
commit e8bde6916a
6 changed files with 112 additions and 1 deletions

View File

@@ -218,6 +218,12 @@ void ast_ari_bridges_add_channel(struct ast_variable *headers,
return;
}
}
/* Apply bridge features to each of the channel controls */
if (!stasis_app_control_bridge_features_init(list->controls[i])) {
stasis_app_control_absorb_dtmf_in_bridge(list->controls[i], args->absorb_dtmf);
stasis_app_control_mute_in_bridge(list->controls[i], args->mute);
}
}
for (i = 0; i < list->count; ++i) {

View File

@@ -150,6 +150,10 @@ struct ast_ari_bridges_add_channel_args {
char *channel_parse;
/*! Channel's role in the bridge */
const char *role;
/*! Absorb DTMF coming from this channel, preventing it to pass through to the bridge */
int absorb_dtmf;
/*! Mute audio from this channel, preventing it to pass through to the bridge */
int mute;
};
/*!
* \brief Body parsing function for /bridges/{bridgeId}/addChannel.