summaryrefslogtreecommitdiff
path: root/rest-api
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-09-03 21:19:21 -0500
committerMatt Jordan <mjordan@digium.com>2015-09-21 08:21:58 -0500
commit5206aa9d300475e264f929b497115cbe83210633 (patch)
tree876ca762d3081b65400e786bedf3c1f0386f9907 /rest-api
parent5541c6de6e74f1c08e9b3e4467c50bab83c85c88 (diff)
ARI: Add events for Contact and Peer Status changes
This patch adds support for receiving events regarding Peer status changes and Contact status changes. This is particularly useful in scenarios where we are subscribed to all endpoints and channels, where we often want to know more about the state of channel technology specific items than a single endpoint's state. ASTERISK-24870 Change-Id: I6137459cdc25ce27efc134ad58abf065653da4e9
Diffstat (limited to 'rest-api')
-rw-r--r--rest-api/api-docs/events.json99
1 files changed, 98 insertions, 1 deletions
diff --git a/rest-api/api-docs/events.json b/rest-api/api-docs/events.json
index 392b0ac70..54269a407 100644
--- a/rest-api/api-docs/events.json
+++ b/rest-api/api-docs/events.json
@@ -163,14 +163,83 @@
"ChannelTalkingFinished",
"ChannelHold",
"ChannelUnhold",
+ "ContactStatusChange",
"EndpointStateChange",
"Dial",
"StasisEnd",
"StasisStart",
"TextMessageReceived",
- "ChannelConnectedLine"
+ "ChannelConnectedLine",
+ "PeerStatusChange"
]
},
+ "ContactInfo": {
+ "id": "ContactInfo",
+ "description": "Detailed information about a contact on an endpoint.",
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "The location of the contact.",
+ "required": true
+ },
+ "contact_status": {
+ "type": "string",
+ "description": "The current status of the contact.",
+ "required": true,
+ "allowableValues": {
+ "valueType": "LIST",
+ "values": [
+ "Unreachable",
+ "Reachable",
+ "Unknown",
+ "Created",
+ "Removed"
+ ]
+ }
+ },
+ "aor": {
+ "type": "string",
+ "description": "The Address of Record this contact belongs to.",
+ "required": true
+ },
+ "roundtrip_usec": {
+ "type": "string",
+ "description": "Current round trip time, in microseconds, for the contact.",
+ "required": false
+ }
+ }
+ },
+ "Peer": {
+ "id": "Peer",
+ "description": "Detailed information about a remote peer that communicates with Asterisk.",
+ "properties": {
+ "peer_status": {
+ "type": "string",
+ "description": "The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.",
+ "required": true
+ },
+ "cause": {
+ "type": "string",
+ "description": "An optional reason associated with the change in peer_status.",
+ "required": false
+ },
+ "address": {
+ "type": "string",
+ "description": "The IP address of the peer.",
+ "required": false
+ },
+ "port": {
+ "type": "string",
+ "description": "The port of the peer.",
+ "required": false
+ },
+ "time": {
+ "type": "string",
+ "description": "The last known time the peer was contacted.",
+ "required": false
+ }
+ }
+ },
"DeviceStateChanged": {
"id": "DeviceStateChanged",
"description": "Notification that a device state has changed.",
@@ -654,6 +723,34 @@
}
}
},
+ "ContactStatusChange": {
+ "id": "ContactStatusChange",
+ "description": "The state of a contact on an endpoint has changed.",
+ "properties": {
+ "endpoint": {
+ "required": true,
+ "type": "Endpoint"
+ },
+ "contact_info": {
+ "required": true,
+ "type": "ContactInfo"
+ }
+ }
+ },
+ "PeerStatusChange": {
+ "id": "PeerStatusChange",
+ "description": "The state of a peer associated with an endpoint has changed.",
+ "properties": {
+ "endpoint": {
+ "required": true,
+ "type": "Endpoint"
+ },
+ "peer": {
+ "required": true,
+ "type": "Peer"
+ }
+ }
+ },
"EndpointStateChange": {
"id": "EndpointStateChange",
"description": "Endpoint state changed.",