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

@@ -430,6 +430,14 @@ int ast_ari_bridges_add_channel_parse_body(
if (field) {
args->role = ast_json_string_get(field);
}
field = ast_json_object_get(body, "absorbDTMF");
if (field) {
args->absorb_dtmf = ast_json_is_true(field);
}
field = ast_json_object_get(body, "mute");
if (field) {
args->mute = ast_json_is_true(field);
}
return 0;
}
@@ -499,6 +507,12 @@ static void ast_ari_bridges_add_channel_cb(
if (strcmp(i->name, "role") == 0) {
args.role = (i->value);
} else
if (strcmp(i->name, "absorbDTMF") == 0) {
args.absorb_dtmf = ast_true(i->value);
} else
if (strcmp(i->name, "mute") == 0) {
args.mute = ast_true(i->value);
} else
{}
}
for (i = path_vars; i; i = i->next) {