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-22 15:36:24 -0500
commitb50e372394bf0950ebbc96793d9594de97282749 (patch)
tree03ee026c21af4a125e1f4803e3446b163326fe2c /rest-api
parent3502c0431db52d00eb16dc1cc2462be7a509ba5e (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 6276fc224..e62fbcb96 100644
--- a/rest-api/api-docs/events.json
+++ b/rest-api/api-docs/events.json
@@ -171,14 +171,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.",
@@ -662,6 +731,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.",