diff options
author | Seán C McCord <ulexus@gmail.com> | 2017-10-06 21:48:48 -0400 |
---|---|---|
committer | Seán C McCord <ulexus@gmail.com> | 2017-10-11 08:23:05 -0400 |
commit | e8bde6916ab0003e6737a320074b1c6ae1516db0 (patch) | |
tree | 6e08df9a01a8d0a5bfe3792730a79cf9051d9a78 /res/ari | |
parent | 1505c1bb09987b36c4c55d1ab6d95e57d0fede16 (diff) |
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
Diffstat (limited to 'res/ari')
-rw-r--r-- | res/ari/resource_bridges.c | 6 | ||||
-rw-r--r-- | res/ari/resource_bridges.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/res/ari/resource_bridges.c b/res/ari/resource_bridges.c index f243086c9..aab78ce18 100644 --- a/res/ari/resource_bridges.c +++ b/res/ari/resource_bridges.c @@ -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) { diff --git a/res/ari/resource_bridges.h b/res/ari/resource_bridges.h index e75d8e028..72dba1e0c 100644 --- a/res/ari/resource_bridges.h +++ b/res/ari/resource_bridges.h @@ -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. |