mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user