diff options
author | Jonathan Rose <jrose@digium.com> | 2013-12-17 23:25:49 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2013-12-17 23:25:49 +0000 |
commit | b0bb03e916da4b4a37aa65b694e3aa1cecee8648 (patch) | |
tree | 697d4ba1137ca3b28fc79d1c976b2e342274c1fe /main/stasis_bridges.c | |
parent | 91d0f305061a6111d9996750c04d54daa67b67bb (diff) |
bridging: Give bridges a name and a known creator
Bridges have two new optional properties, a creator and a name.
Certain consumers of bridges will automatically provide bridges that
they create with these properties. Examples include app_bridgewait,
res_parking, app_confbridge, and app_agent_pool. In addition, a name
may now be provided as an argument to the POST function for creating
new bridges via ARI.
(closes issue AFS-47)
Review: https://reviewboard.asterisk.org/r/3070/
........
Merged revisions 404042 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/stasis_bridges.c')
-rw-r--r-- | main/stasis_bridges.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/stasis_bridges.c b/main/stasis_bridges.c index b92d048bc..7f6679b00 100644 --- a/main/stasis_bridges.c +++ b/main/stasis_bridges.c @@ -242,6 +242,8 @@ struct ast_bridge_snapshot *ast_bridge_snapshot_create(struct ast_bridge *bridge ast_string_field_set(snapshot, uniqueid, bridge->uniqueid); ast_string_field_set(snapshot, technology, bridge->technology->name); ast_string_field_set(snapshot, subclass, bridge->v_table->name); + ast_string_field_set(snapshot, creator, bridge->creator); + ast_string_field_set(snapshot, name, bridge->name); snapshot->feature_flags = bridge->feature_flags; snapshot->capabilities = bridge->technology->capabilities; @@ -548,11 +550,13 @@ struct ast_json *ast_bridge_snapshot_to_json( return NULL; } - json_bridge = ast_json_pack("{s: s, s: s, s: s, s: s, s: o}", + json_bridge = ast_json_pack("{s: s, s: s, s: s, s: s, s: s, s: s, s: o}", "id", snapshot->uniqueid, "technology", snapshot->technology, "bridge_type", capability2str(snapshot->capabilities), "bridge_class", snapshot->subclass, + "creator", snapshot->creator, + "name", snapshot->name, "channels", json_channels); if (!json_bridge) { return NULL; |