diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/asterisk.json index 83fef8b7..9b0ab523 100644 --- a/codegen/src/main/resources/codegen-data/ari_10_0_0/asterisk.json +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/asterisk.json @@ -757,6 +757,17 @@ } } }, + "Variables": { + "id": "Variables", + "description": "A dictionary of channel variables", + "properties": { + "variables": { + "required": true, + "type": "object", + "description": "A dictionary of channel variables" + } + } + }, "ConfigTuple": { "id": "ConfigTuple", "description": "A key/value pair that makes up part of a configuration object.", diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/bridges.json index ae5ee56f..c0947cb0 100644 --- a/codegen/src/main/resources/codegen-data/ari_10_0_0/bridges.json +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/bridges.json @@ -60,6 +60,14 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge on creation. Each variable is an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"name\": \"SupportBridge\", \"variables\": { \"Bridge_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false } ], "errorResponses": [ @@ -108,6 +116,14 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge on creation. Each variable is an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"name\": \"SupportBridge\", \"variables\": { \"Bridge_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false } ], "errorResponses": [ @@ -170,6 +186,207 @@ } ] }, + { + "path": "/bridges/{bridgeId}/variable", + "description": "Variables on a bridge", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of a bridge variable or function.", + "nickname": "getBridgeVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The bridge variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Bridge or variable not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the value of a bridge variable or function.", + "nickname": "setBridgeVar", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The bridge variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "report_events", + "description": "Whether this variable should be included in bridge events. Defaults to false.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/variables", + "description": "Multiple variables on a bridge", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of multiple bridge variables or functions.", + "nickname": "getBridgeVars", + "responseClass": "Variables", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The bridge variables or functions to get", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Bridge or variable not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the values of multiple bridge variables or functions.", + "nickname": "setBridgeVars", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"variables\": { \"Bridge_State\": \"WaitingForAgent\", \"Support_Level\": { \"value\": \"Premium\", \"report_events\": true } } }", + "paramType": "body", + "required": true, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, { "path": "/bridges/{bridgeId}/addChannel", "description": "Add a channel to a bridge", @@ -857,6 +1074,11 @@ "required": true, "type": "Date", "description": "Timestamp when bridge was created" + }, + "bridgevars": { + "required": false, + "type": "object", + "description": "Bridge variables" } } } diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/channels.json index f7ea634d..f1b711d3 100644 --- a/codegen/src/main/resources/codegen-data/ari_10_0_0/channels.json +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/channels.json @@ -114,7 +114,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -237,7 +237,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -375,7 +375,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -1601,6 +1601,15 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "report_events", + "description": "Whether this variable should be included in channel events. Defaults to false.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false } ], "errorResponses": [ @@ -1620,6 +1629,99 @@ } ] }, + { + "path": "/channels/{channelId}/variables", + "description": "Multiple variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of multiple channel variables or functions.", + "nickname": "getChannelVars", + "responseClass": "Variables", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The channel variables or functions to get", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the values of multiple channel variables or functions.", + "nickname": "setChannelVars", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Ex. { \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": true, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + + } + ] + }, { "path": "/channels/{channelId}/snoop", "description": "Snoop (spy/whisper) on a channel", @@ -1933,7 +2035,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", diff --git a/codegen/src/main/resources/codegen-data/ari_10_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_10_0_0/events.json index f08a665e..9dfe4c4f 100644 --- a/codegen/src/main/resources/codegen-data/ari_10_0_0/events.json +++ b/codegen/src/main/resources/codegen-data/ari_10_0_0/events.json @@ -110,6 +110,52 @@ ] } ] + }, + { + "path": "/events/claim", + "description": "Broadcast channel claim operations", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "20.17.0", + "22.7.0", + "23.1.0" + ], + "summary": "Claim a broadcast channel for this application.", + "notes": "Atomically claims a channel that is in broadcast state. Only the first claim succeeds.", + "nickname": "claimChannel", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "The ID of the channel to claim", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application claiming the channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found or not in broadcast state." + }, + { + "code": 409, + "reason": "Channel has already been claimed by another application." + } + ] + } + ] } ], "models": { @@ -203,7 +249,9 @@ "ChannelConnectedLine", "PeerStatusChange", "ChannelTransfer", - "RESTResponse" + "RESTResponse", + "CallBroadcast", + "CallClaimed" ] }, "ContactInfo": { @@ -1179,6 +1227,43 @@ "description": "Response message body" } } + }, + "CallBroadcast": { + "id": "CallBroadcast", + "description": "Notification that a channel is being broadcast to ARI applications for claiming.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel being broadcast." + }, + "caller": { + "required": false, + "type": "string", + "description": "The caller ID number." + }, + "called": { + "required": false, + "type": "string", + "description": "The called number." + } + } + }, + "CallClaimed": { + "id": "CallClaimed", + "description": "Notification that a broadcast channel has been successfully claimed by an ARI application.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that was claimed." + }, + "winner_app": { + "required": true, + "type": "string", + "description": "The name of the ARI application that claimed the channel." + } + } } } } diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/asterisk.json index 83fef8b7..9b0ab523 100644 --- a/codegen/src/main/resources/codegen-data/ari_11_0_0/asterisk.json +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/asterisk.json @@ -757,6 +757,17 @@ } } }, + "Variables": { + "id": "Variables", + "description": "A dictionary of channel variables", + "properties": { + "variables": { + "required": true, + "type": "object", + "description": "A dictionary of channel variables" + } + } + }, "ConfigTuple": { "id": "ConfigTuple", "description": "A key/value pair that makes up part of a configuration object.", diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/bridges.json index ae5ee56f..c0947cb0 100644 --- a/codegen/src/main/resources/codegen-data/ari_11_0_0/bridges.json +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/bridges.json @@ -60,6 +60,14 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge on creation. Each variable is an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"name\": \"SupportBridge\", \"variables\": { \"Bridge_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false } ], "errorResponses": [ @@ -108,6 +116,14 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge on creation. Each variable is an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"name\": \"SupportBridge\", \"variables\": { \"Bridge_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false } ], "errorResponses": [ @@ -170,6 +186,207 @@ } ] }, + { + "path": "/bridges/{bridgeId}/variable", + "description": "Variables on a bridge", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of a bridge variable or function.", + "nickname": "getBridgeVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The bridge variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Bridge or variable not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the value of a bridge variable or function.", + "nickname": "setBridgeVar", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The bridge variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "report_events", + "description": "Whether this variable should be included in bridge events. Defaults to false.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/variables", + "description": "Multiple variables on a bridge", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of multiple bridge variables or functions.", + "nickname": "getBridgeVars", + "responseClass": "Variables", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The bridge variables or functions to get", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Bridge or variable not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the values of multiple bridge variables or functions.", + "nickname": "setBridgeVars", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"variables\": { \"Bridge_State\": \"WaitingForAgent\", \"Support_Level\": { \"value\": \"Premium\", \"report_events\": true } } }", + "paramType": "body", + "required": true, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, { "path": "/bridges/{bridgeId}/addChannel", "description": "Add a channel to a bridge", @@ -857,6 +1074,11 @@ "required": true, "type": "Date", "description": "Timestamp when bridge was created" + }, + "bridgevars": { + "required": false, + "type": "object", + "description": "Bridge variables" } } } diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/channels.json index f7ea634d..f1b711d3 100644 --- a/codegen/src/main/resources/codegen-data/ari_11_0_0/channels.json +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/channels.json @@ -114,7 +114,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -237,7 +237,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -375,7 +375,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -1601,6 +1601,15 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "report_events", + "description": "Whether this variable should be included in channel events. Defaults to false.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false } ], "errorResponses": [ @@ -1620,6 +1629,99 @@ } ] }, + { + "path": "/channels/{channelId}/variables", + "description": "Multiple variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of multiple channel variables or functions.", + "nickname": "getChannelVars", + "responseClass": "Variables", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The channel variables or functions to get", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the values of multiple channel variables or functions.", + "nickname": "setChannelVars", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Ex. { \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": true, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + + } + ] + }, { "path": "/channels/{channelId}/snoop", "description": "Snoop (spy/whisper) on a channel", @@ -1933,7 +2035,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", diff --git a/codegen/src/main/resources/codegen-data/ari_11_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_11_0_0/events.json index f08a665e..9dfe4c4f 100644 --- a/codegen/src/main/resources/codegen-data/ari_11_0_0/events.json +++ b/codegen/src/main/resources/codegen-data/ari_11_0_0/events.json @@ -110,6 +110,52 @@ ] } ] + }, + { + "path": "/events/claim", + "description": "Broadcast channel claim operations", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "20.17.0", + "22.7.0", + "23.1.0" + ], + "summary": "Claim a broadcast channel for this application.", + "notes": "Atomically claims a channel that is in broadcast state. Only the first claim succeeds.", + "nickname": "claimChannel", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "The ID of the channel to claim", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application claiming the channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found or not in broadcast state." + }, + { + "code": 409, + "reason": "Channel has already been claimed by another application." + } + ] + } + ] } ], "models": { @@ -203,7 +249,9 @@ "ChannelConnectedLine", "PeerStatusChange", "ChannelTransfer", - "RESTResponse" + "RESTResponse", + "CallBroadcast", + "CallClaimed" ] }, "ContactInfo": { @@ -1179,6 +1227,43 @@ "description": "Response message body" } } + }, + "CallBroadcast": { + "id": "CallBroadcast", + "description": "Notification that a channel is being broadcast to ARI applications for claiming.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel being broadcast." + }, + "caller": { + "required": false, + "type": "string", + "description": "The caller ID number." + }, + "called": { + "required": false, + "type": "string", + "description": "The called number." + } + } + }, + "CallClaimed": { + "id": "CallClaimed", + "description": "Notification that a broadcast channel has been successfully claimed by an ARI application.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that was claimed." + }, + "winner_app": { + "required": true, + "type": "string", + "description": "The name of the ARI application that claimed the channel." + } + } } } } diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/asterisk.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/asterisk.json index 83fef8b7..9b0ab523 100644 --- a/codegen/src/main/resources/codegen-data/ari_8_0_0/asterisk.json +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/asterisk.json @@ -757,6 +757,17 @@ } } }, + "Variables": { + "id": "Variables", + "description": "A dictionary of channel variables", + "properties": { + "variables": { + "required": true, + "type": "object", + "description": "A dictionary of channel variables" + } + } + }, "ConfigTuple": { "id": "ConfigTuple", "description": "A key/value pair that makes up part of a configuration object.", diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/bridges.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/bridges.json index ae5ee56f..c0947cb0 100644 --- a/codegen/src/main/resources/codegen-data/ari_8_0_0/bridges.json +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/bridges.json @@ -60,6 +60,14 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge on creation. Each variable is an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"name\": \"SupportBridge\", \"variables\": { \"Bridge_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false } ], "errorResponses": [ @@ -108,6 +116,14 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge on creation. Each variable is an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"name\": \"SupportBridge\", \"variables\": { \"Bridge_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": false, + "dataType": "containers", + "allowMultiple": false } ], "errorResponses": [ @@ -170,6 +186,207 @@ } ] }, + { + "path": "/bridges/{bridgeId}/variable", + "description": "Variables on a bridge", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of a bridge variable or function.", + "nickname": "getBridgeVar", + "responseClass": "Variable", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The bridge variable or function to get", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Bridge or variable not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the value of a bridge variable or function.", + "nickname": "setBridgeVar", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variable", + "description": "The bridge variable or function to set", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "value", + "description": "The value to set the variable to", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "report_events", + "description": "Whether this variable should be included in bridge events. Defaults to false.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variable parameter." + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, + { + "path": "/bridges/{bridgeId}/variables", + "description": "Multiple variables on a bridge", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of multiple bridge variables or functions.", + "nickname": "getBridgeVars", + "responseClass": "Variables", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The bridge variables or functions to get", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Bridge or variable not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the values of multiple bridge variables or functions.", + "nickname": "setBridgeVars", + "responseClass": "void", + "parameters": [ + { + "name": "bridgeId", + "description": "Bridge's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the bridge. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in bridge events (defaults to false). Ex. { \"variables\": { \"Bridge_State\": \"WaitingForAgent\", \"Support_Level\": { \"value\": \"Premium\", \"report_events\": true } } }", + "paramType": "body", + "required": true, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Bridge not found" + }, + { + "code": 409, + "reason": "Bridge not in a Stasis application" + } + ] + } + ] + }, { "path": "/bridges/{bridgeId}/addChannel", "description": "Add a channel to a bridge", @@ -857,6 +1074,11 @@ "required": true, "type": "Date", "description": "Timestamp when bridge was created" + }, + "bridgevars": { + "required": false, + "type": "object", + "description": "Bridge variables" } } } diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/channels.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/channels.json index e5ec6a4b..22ced770 100644 --- a/codegen/src/main/resources/codegen-data/ari_8_0_0/channels.json +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/channels.json @@ -114,7 +114,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -237,7 +237,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -375,7 +375,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", @@ -1601,6 +1601,15 @@ "required": false, "allowMultiple": false, "dataType": "string" + }, + { + "name": "report_events", + "description": "Whether this variable should be included in channel events. Defaults to false.", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "boolean", + "defaultValue": false } ], "errorResponses": [ @@ -1620,6 +1629,99 @@ } ] }, + { + "path": "/channels/{channelId}/variables", + "description": "Multiple variables on a channel", + "operations": [ + { + "httpMethod": "GET", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Get the value of multiple channel variables or functions.", + "nickname": "getChannelVars", + "responseClass": "Variables", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The channel variables or functions to get", + "paramType": "query", + "required": true, + "allowMultiple": true, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Channel or variable not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "POST", + "since": [ + "20.20.0", + "22.10.0", + "23.4.0" + ], + "summary": "Set the values of multiple channel variables or functions.", + "nickname": "setChannelVars", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "variables", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Ex. { \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", + "paramType": "body", + "required": true, + "dataType": "containers", + "allowMultiple": false + } + ], + "errorResponses": [ + { + "code": 400, + "reason": "Missing variables parameter." + }, + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + + } + ] + }, { "path": "/channels/{channelId}/snoop", "description": "Snoop (spy/whisper) on a channel", @@ -1933,7 +2035,7 @@ }, { "name": "variables", - "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\" } }", + "description": "The \"variables\" key in the body object holds variable key/value pairs to set on the channel on creation. Each variable value may be either a string or an object containing \"value\" (string) and optional \"report_events\" (boolean) to include updates for that variable in channel events (defaults to false). Other keys in the body object are interpreted as query parameters. Ex. { \"endpoint\": \"SIP/Alice\", \"variables\": { \"CALLERID(name)\": \"Alice\", \"Call_State\": { \"value\": \"WaitingForAgent\", \"report_events\": true } } }", "paramType": "body", "required": false, "dataType": "containers", diff --git a/codegen/src/main/resources/codegen-data/ari_8_0_0/events.json b/codegen/src/main/resources/codegen-data/ari_8_0_0/events.json index b7d14ef1..63d34405 100644 --- a/codegen/src/main/resources/codegen-data/ari_8_0_0/events.json +++ b/codegen/src/main/resources/codegen-data/ari_8_0_0/events.json @@ -110,6 +110,52 @@ ] } ] + }, + { + "path": "/events/claim", + "description": "Broadcast channel claim operations", + "operations": [ + { + "httpMethod": "POST", + "since": [ + "20.17.0", + "22.7.0", + "23.1.0" + ], + "summary": "Claim a broadcast channel for this application.", + "notes": "Atomically claims a channel that is in broadcast state. Only the first claim succeeds.", + "nickname": "claimChannel", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "The ID of the channel to claim", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + }, + { + "name": "application", + "description": "The name of the application claiming the channel", + "paramType": "query", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found or not in broadcast state." + }, + { + "code": 409, + "reason": "Channel has already been claimed by another application." + } + ] + } + ] } ], "models": { @@ -202,7 +248,9 @@ "ChannelConnectedLine", "PeerStatusChange", "ChannelTransfer", - "RESTResponse" + "RESTResponse", + "CallBroadcast", + "CallClaimed" ] }, "ContactInfo": { @@ -1167,6 +1215,43 @@ "description": "Response message body" } } + }, + "CallBroadcast": { + "id": "CallBroadcast", + "description": "Notification that a channel is being broadcast to ARI applications for claiming.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel being broadcast." + }, + "caller": { + "required": false, + "type": "string", + "description": "The caller ID number." + }, + "called": { + "required": false, + "type": "string", + "description": "The called number." + } + } + }, + "CallClaimed": { + "id": "CallClaimed", + "description": "Notification that a broadcast channel has been successfully claimed by an ARI application.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that was claimed." + }, + "winner_app": { + "required": true, + "type": "string", + "description": "The name of the ARI application that claimed the channel." + } + } } } }