summaryrefslogtreecommitdiff
path: root/res/ari/ari_model_validators.h
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 /res/ari/ari_model_validators.h
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 'res/ari/ari_model_validators.h')
-rw-r--r--res/ari/ari_model_validators.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/res/ari/ari_model_validators.h b/res/ari/ari_model_validators.h
index 1803f57c9..0bcdb0fa2 100644
--- a/res/ari/ari_model_validators.h
+++ b/res/ari/ari_model_validators.h
@@ -1007,6 +1007,42 @@ int ast_ari_validate_channel_varset(struct ast_json *json);
ari_validator ast_ari_validate_channel_varset_fn(void);
/*!
+ * \brief Validator for ContactInfo.
+ *
+ * Detailed information about a contact on an endpoint.
+ *
+ * \param json JSON object to validate.
+ * \returns True (non-zero) if valid.
+ * \returns False (zero) if invalid.
+ */
+int ast_ari_validate_contact_info(struct ast_json *json);
+
+/*!
+ * \brief Function pointer to ast_ari_validate_contact_info().
+ *
+ * See \ref ast_ari_model_validators.h for more details.
+ */
+ari_validator ast_ari_validate_contact_info_fn(void);
+
+/*!
+ * \brief Validator for ContactStatusChange.
+ *
+ * The state of a contact on an endpoint has changed.
+ *
+ * \param json JSON object to validate.
+ * \returns True (non-zero) if valid.
+ * \returns False (zero) if invalid.
+ */
+int ast_ari_validate_contact_status_change(struct ast_json *json);
+
+/*!
+ * \brief Function pointer to ast_ari_validate_contact_status_change().
+ *
+ * See \ref ast_ari_model_validators.h for more details.
+ */
+ari_validator ast_ari_validate_contact_status_change_fn(void);
+
+/*!
* \brief Validator for DeviceStateChanged.
*
* Notification that a device state has changed.
@@ -1115,6 +1151,42 @@ int ast_ari_validate_missing_params(struct ast_json *json);
ari_validator ast_ari_validate_missing_params_fn(void);
/*!
+ * \brief Validator for Peer.
+ *
+ * Detailed information about a remote peer that communicates with Asterisk.
+ *
+ * \param json JSON object to validate.
+ * \returns True (non-zero) if valid.
+ * \returns False (zero) if invalid.
+ */
+int ast_ari_validate_peer(struct ast_json *json);
+
+/*!
+ * \brief Function pointer to ast_ari_validate_peer().
+ *
+ * See \ref ast_ari_model_validators.h for more details.
+ */
+ari_validator ast_ari_validate_peer_fn(void);
+
+/*!
+ * \brief Validator for PeerStatusChange.
+ *
+ * The state of a peer associated with an endpoint has changed.
+ *
+ * \param json JSON object to validate.
+ * \returns True (non-zero) if valid.
+ * \returns False (zero) if invalid.
+ */
+int ast_ari_validate_peer_status_change(struct ast_json *json);
+
+/*!
+ * \brief Function pointer to ast_ari_validate_peer_status_change().
+ *
+ * See \ref ast_ari_model_validators.h for more details.
+ */
+ari_validator ast_ari_validate_peer_status_change_fn(void);
+
+/*!
* \brief Validator for PlaybackFinished.
*
* Event showing the completion of a media playback operation.
@@ -1546,6 +1618,17 @@ ari_validator ast_ari_validate_application_fn(void);
* - channel: Channel
* - value: string (required)
* - variable: string (required)
+ * ContactInfo
+ * - aor: string (required)
+ * - contact_status: string (required)
+ * - roundtrip_usec: string
+ * - uri: string (required)
+ * ContactStatusChange
+ * - type: string (required)
+ * - application: string (required)
+ * - timestamp: Date
+ * - contact_info: ContactInfo (required)
+ * - endpoint: Endpoint (required)
* DeviceStateChanged
* - type: string (required)
* - application: string (required)
@@ -1575,6 +1658,18 @@ ari_validator ast_ari_validate_application_fn(void);
* MissingParams
* - type: string (required)
* - params: List[string] (required)
+ * Peer
+ * - address: string
+ * - cause: string
+ * - peer_status: string (required)
+ * - port: string
+ * - time: string
+ * PeerStatusChange
+ * - type: string (required)
+ * - application: string (required)
+ * - timestamp: Date
+ * - endpoint: Endpoint (required)
+ * - peer: Peer (required)
* PlaybackFinished
* - type: string (required)
* - application: string (required)