[asterisk-commits] kmoore: branch group/bridge_construction r388294 - in /team/group/bridge_cons...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 10 08:23:38 CDT 2013


Author: kmoore
Date: Fri May 10 08:23:36 2013
New Revision: 388294

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388294
Log:
Add the bridging-specific portion of the res_stasis channel events merge

Modified:
    team/group/bridge_construction/include/asterisk/stasis_bridging.h
    team/group/bridge_construction/main/stasis_bridging.c
    team/group/bridge_construction/res/res_stasis_http_events.c
    team/group/bridge_construction/res/stasis_http/resource_events.h
    team/group/bridge_construction/rest-api-templates/res_stasis_http_resource.c.mustache
    team/group/bridge_construction/rest-api/api-docs/events.json

Modified: team/group/bridge_construction/include/asterisk/stasis_bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/include/asterisk/stasis_bridging.h?view=diff&rev=388294&r1=388293&r2=388294
==============================================================================
--- team/group/bridge_construction/include/asterisk/stasis_bridging.h (original)
+++ team/group/bridge_construction/include/asterisk/stasis_bridging.h Fri May 10 08:23:36 2013
@@ -204,6 +204,13 @@
 void ast_bridge_publish_leave(struct ast_bridge *bridge, struct ast_channel *chan);
 
 /*!
+ * \brief Build a JSON object from a \ref ast_bridge_snapshot.
+ * \return JSON object representing bridge snapshot.
+ * \return \c NULL on error
+ */
+struct ast_json *ast_bridge_snapshot_to_json(const struct ast_bridge_snapshot *snapshot);
+
+/*!
  * \brief Dispose of the stasis bridging topics and message types
  */
 void ast_stasis_bridging_shutdown(void);

Modified: team/group/bridge_construction/main/stasis_bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/main/stasis_bridging.c?view=diff&rev=388294&r1=388293&r2=388294
==============================================================================
--- team/group/bridge_construction/main/stasis_bridging.c (original)
+++ team/group/bridge_construction/main/stasis_bridging.c Fri May 10 08:23:36 2013
@@ -145,6 +145,20 @@
 	stasis_publish(ast_bridge_topic(bridge), msg);
 }
 
+static void bridge_publish_state_from_blob(struct ast_bridge_blob *obj)
+{
+	RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
+
+	ast_assert(obj != NULL);
+
+	msg = stasis_message_create(ast_bridge_snapshot_type(), obj->bridge);
+	if (!msg) {
+		return;
+	}
+
+	stasis_publish(stasis_topic_pool_get_topic(bridge_topic_pool, obj->bridge->uniqueid), msg);
+}
+
 struct stasis_message_type *ast_bridge_merge_message_type(void)
 {
 	return bridge_merge_message_type;
@@ -282,8 +296,6 @@
 	RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
 	RAII_VAR(struct ast_json *, enter_json, NULL, ast_json_unref);
 
-	ast_bridge_publish_state(bridge);
-
 	enter_json = ast_json_pack("{s: s}",
 			"type", "enter");
 
@@ -292,15 +304,15 @@
 		return;
 	}
 
+	/* enter blob first, then state */
 	stasis_publish(ast_bridge_topic(bridge), msg);
+	bridge_publish_state_from_blob(stasis_message_data(msg));
 }
 
 void ast_bridge_publish_leave(struct ast_bridge *bridge, struct ast_channel *chan)
 {
 	RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
 	RAII_VAR(struct ast_json *, leave_json, NULL, ast_json_unref);
-
-	ast_bridge_publish_state(bridge);
 
 	leave_json = ast_json_pack("{s: s}",
 			"type", "leave");
@@ -310,7 +322,29 @@
 		return;
 	}
 
+	/* state first, then leave blob (opposite of enter, preserves nesting of events) */
+	bridge_publish_state_from_blob(stasis_message_data(msg));
 	stasis_publish(ast_bridge_topic(bridge), msg);
+}
+
+struct ast_json *ast_bridge_snapshot_to_json(const struct ast_bridge_snapshot *snapshot)
+{
+	RAII_VAR(struct ast_json *, json_chan, NULL, ast_json_unref);
+	int r = 0;
+
+	if (snapshot == NULL) {
+		return NULL;
+	}
+
+	json_chan = ast_json_object_create();
+	if (!json_chan) { ast_log(LOG_ERROR, "Error creating channel json object\n"); return NULL; }
+
+	r = ast_json_object_set(json_chan, "bridge-uniqueid", ast_json_string_create(snapshot->uniqueid));
+	if (r) { ast_log(LOG_ERROR, "Error adding attrib to channel json object\n"); return NULL; }
+	r = ast_json_object_set(json_chan, "bridge-technology", ast_json_string_create(snapshot->technology));
+	if (r) { ast_log(LOG_ERROR, "Error adding attrib to channel json object\n"); return NULL; }
+
+	return ast_json_ref(json_chan);
 }
 
 void ast_stasis_bridging_shutdown(void)

Modified: team/group/bridge_construction/res/res_stasis_http_events.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/res/res_stasis_http_events.c?view=diff&rev=388294&r1=388293&r2=388294
==============================================================================
--- team/group/bridge_construction/res/res_stasis_http_events.c (original)
+++ team/group/bridge_construction/res/res_stasis_http_events.c Fri May 10 08:23:36 2013
@@ -43,6 +43,7 @@
 #include "asterisk/module.h"
 #include "stasis_http/resource_events.h"
 #include "asterisk/stasis_channels.h"
+#include "asterisk/stasis_bridging.h"
 
 /*!
  * \brief Parameter parsing callback for /events.
@@ -77,6 +78,127 @@
 	.children = {  }
 };
 
+struct ast_json *stasis_json_event_channel_userevent_create(
+	struct ast_channel_snapshot *channel_snapshot,
+	struct ast_json *blob
+	)
+{
+	RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
+	RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
+	struct ast_json *validator;
+	int ret;
+
+	ast_assert(channel_snapshot != NULL);
+	ast_assert(blob != NULL);
+	ast_assert(ast_json_object_get(blob, "channel") == NULL);
+	ast_assert(ast_json_object_get(blob, "type") == NULL);
+
+	validator = ast_json_object_get(blob, "eventname");
+	if (validator) {
+		/* do validation? XXX */
+	} else {
+		/* fail message generation if the required parameter doesn't exist */
+		return NULL;
+	}
+
+	event = ast_json_deep_copy(blob);
+	if (!event) {
+		return NULL;
+	}
+
+	ret = ast_json_object_set(event,
+		"channel", ast_channel_snapshot_to_json(channel_snapshot));
+	if (ret) {
+		return NULL;
+	}
+
+	message = ast_json_pack("{s: o}", "channel_userevent", ast_json_ref(event));
+	if (!message) {
+		return NULL;
+	}
+
+	return ast_json_ref(message);
+}
+
+struct ast_json *stasis_json_event_bridge_created_create(
+	struct ast_bridge_snapshot *bridge_snapshot
+	)
+{
+	RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
+	RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
+	int ret;
+
+	ast_assert(bridge_snapshot != NULL);
+
+	event = ast_json_object_create();
+	if (!event) {
+		return NULL;
+	}
+
+	ret = ast_json_object_set(event,
+		"bridge", ast_bridge_snapshot_to_json(bridge_snapshot));
+	if (ret) {
+		return NULL;
+	}
+
+	message = ast_json_pack("{s: o}", "bridge_created", ast_json_ref(event));
+	if (!message) {
+		return NULL;
+	}
+
+	return ast_json_ref(message);
+}
+
+struct ast_json *stasis_json_event_channel_destroyed_create(
+	struct ast_channel_snapshot *channel_snapshot,
+	struct ast_json *blob
+	)
+{
+	RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
+	RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
+	struct ast_json *validator;
+	int ret;
+
+	ast_assert(channel_snapshot != NULL);
+	ast_assert(blob != NULL);
+	ast_assert(ast_json_object_get(blob, "channel") == NULL);
+	ast_assert(ast_json_object_get(blob, "type") == NULL);
+
+	validator = ast_json_object_get(blob, "cause");
+	if (validator) {
+		/* do validation? XXX */
+	} else {
+		/* fail message generation if the required parameter doesn't exist */
+		return NULL;
+	}
+
+	validator = ast_json_object_get(blob, "cause_txt");
+	if (validator) {
+		/* do validation? XXX */
+	} else {
+		/* fail message generation if the required parameter doesn't exist */
+		return NULL;
+	}
+
+	event = ast_json_deep_copy(blob);
+	if (!event) {
+		return NULL;
+	}
+
+	ret = ast_json_object_set(event,
+		"channel", ast_channel_snapshot_to_json(channel_snapshot));
+	if (ret) {
+		return NULL;
+	}
+
+	message = ast_json_pack("{s: o}", "channel_destroyed", ast_json_ref(event));
+	if (!message) {
+		return NULL;
+	}
+
+	return ast_json_ref(message);
+}
+
 struct ast_json *stasis_json_event_channel_snapshot_create(
 	struct ast_channel_snapshot *channel_snapshot
 	)
@@ -106,56 +228,6 @@
 	return ast_json_ref(message);
 }
 
-struct ast_json *stasis_json_event_channel_destroyed_create(
-	struct ast_channel_snapshot *channel_snapshot,
-	struct ast_json *blob
-	)
-{
-	RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
-	RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
-	struct ast_json *validator;
-	int ret;
-
-	ast_assert(channel_snapshot != NULL);
-	ast_assert(blob != NULL);
-	ast_assert(ast_json_object_get(blob, "channel") == NULL);
-	ast_assert(ast_json_object_get(blob, "type") == NULL);
-
-	validator = ast_json_object_get(blob, "cause");
-	if (validator) {
-		/* do validation? XXX */
-	} else {
-		/* fail message generation if the required parameter doesn't exist */
-		return NULL;
-	}
-
-	validator = ast_json_object_get(blob, "cause_txt");
-	if (validator) {
-		/* do validation? XXX */
-	} else {
-		/* fail message generation if the required parameter doesn't exist */
-		return NULL;
-	}
-
-	event = ast_json_deep_copy(blob);
-	if (!event) {
-		return NULL;
-	}
-
-	ret = ast_json_object_set(event,
-		"channel", ast_channel_snapshot_to_json(channel_snapshot));
-	if (ret) {
-		return NULL;
-	}
-
-	message = ast_json_pack("{s: o}", "channel_destroyed", ast_json_ref(event));
-	if (!message) {
-		return NULL;
-	}
-
-	return ast_json_ref(message);
-}
-
 struct ast_json *stasis_json_event_channel_caller_id_create(
 	struct ast_channel_snapshot *channel_snapshot,
 	struct ast_json *blob
@@ -250,6 +322,35 @@
 	return ast_json_ref(message);
 }
 
+struct ast_json *stasis_json_event_bridge_destroyed_create(
+	struct ast_bridge_snapshot *bridge_snapshot
+	)
+{
+	RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
+	RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
+	int ret;
+
+	ast_assert(bridge_snapshot != NULL);
+
+	event = ast_json_object_create();
+	if (!event) {
+		return NULL;
+	}
+
+	ret = ast_json_object_set(event,
+		"bridge", ast_bridge_snapshot_to_json(bridge_snapshot));
+	if (ret) {
+		return NULL;
+	}
+
+	message = ast_json_pack("{s: o}", "bridge_destroyed", ast_json_ref(event));
+	if (!message) {
+		return NULL;
+	}
+
+	return ast_json_ref(message);
+}
+
 struct ast_json *stasis_json_event_application_replaced_create(
 	struct ast_json *blob
 	)
@@ -332,41 +433,36 @@
 	return ast_json_ref(message);
 }
 
-struct ast_json *stasis_json_event_channel_userevent_create(
-	struct ast_channel_snapshot *channel_snapshot,
-	struct ast_json *blob
-	)
-{
-	RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
-	RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
-	struct ast_json *validator;
-	int ret;
-
-	ast_assert(channel_snapshot != NULL);
-	ast_assert(blob != NULL);
-	ast_assert(ast_json_object_get(blob, "channel") == NULL);
-	ast_assert(ast_json_object_get(blob, "type") == NULL);
-
-	validator = ast_json_object_get(blob, "eventname");
-	if (validator) {
-		/* do validation? XXX */
-	} else {
-		/* fail message generation if the required parameter doesn't exist */
-		return NULL;
-	}
-
-	event = ast_json_deep_copy(blob);
-	if (!event) {
-		return NULL;
-	}
-
-	ret = ast_json_object_set(event,
-		"channel", ast_channel_snapshot_to_json(channel_snapshot));
-	if (ret) {
-		return NULL;
-	}
-
-	message = ast_json_pack("{s: o}", "channel_userevent", ast_json_ref(event));
+struct ast_json *stasis_json_event_channel_left_bridge_create(
+	struct ast_bridge_snapshot *bridge_snapshot,
+	struct ast_channel_snapshot *channel_snapshot
+	)
+{
+	RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
+	RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
+	int ret;
+
+	ast_assert(channel_snapshot != NULL);
+	ast_assert(bridge_snapshot != NULL);
+
+	event = ast_json_object_create();
+	if (!event) {
+		return NULL;
+	}
+
+	ret = ast_json_object_set(event,
+		"channel", ast_channel_snapshot_to_json(channel_snapshot));
+	if (ret) {
+		return NULL;
+	}
+
+	ret = ast_json_object_set(event,
+		"bridge", ast_bridge_snapshot_to_json(bridge_snapshot));
+	if (ret) {
+		return NULL;
+	}
+
+	message = ast_json_pack("{s: o}", "channel_left_bridge", ast_json_ref(event));
 	if (!message) {
 		return NULL;
 	}
@@ -517,6 +613,43 @@
 	}
 
 	message = ast_json_pack("{s: o}", "channel_state_change", ast_json_ref(event));
+	if (!message) {
+		return NULL;
+	}
+
+	return ast_json_ref(message);
+}
+
+struct ast_json *stasis_json_event_channel_entered_bridge_create(
+	struct ast_bridge_snapshot *bridge_snapshot,
+	struct ast_channel_snapshot *channel_snapshot
+	)
+{
+	RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
+	RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
+	int ret;
+
+	ast_assert(channel_snapshot != NULL);
+	ast_assert(bridge_snapshot != NULL);
+
+	event = ast_json_object_create();
+	if (!event) {
+		return NULL;
+	}
+
+	ret = ast_json_object_set(event,
+		"channel", ast_channel_snapshot_to_json(channel_snapshot));
+	if (ret) {
+		return NULL;
+	}
+
+	ret = ast_json_object_set(event,
+		"bridge", ast_bridge_snapshot_to_json(bridge_snapshot));
+	if (ret) {
+		return NULL;
+	}
+
+	message = ast_json_pack("{s: o}", "channel_entered_bridge", ast_json_ref(event));
 	if (!message) {
 		return NULL;
 	}

Modified: team/group/bridge_construction/res/stasis_http/resource_events.h
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/res/stasis_http/resource_events.h?view=diff&rev=388294&r1=388293&r2=388294
==============================================================================
--- team/group/bridge_construction/res/stasis_http/resource_events.h (original)
+++ team/group/bridge_construction/res/stasis_http/resource_events.h Fri May 10 08:23:36 2013
@@ -59,15 +59,30 @@
 struct ast_bridge_snapshot;
 
 /*!
- * \brief Some part of channel state changed.
- *
- * \param channel The channel to be used to generate this event
- *
- * \retval NULL on error
- * \retval JSON (ast_json) describing the event
- */
-struct ast_json *stasis_json_event_channel_snapshot_create(
-	struct ast_channel_snapshot *channel_snapshot
+ * \brief User-generated event with additional user-defined fields in the object.
+ *
+ * \param channel The channel that signaled the user event.
+ * \param blob JSON blob containing the following parameters:
+ * - eventname: string - The name of the user event. (required)
+ *
+ * \retval NULL on error
+ * \retval JSON (ast_json) describing the event
+ */
+struct ast_json *stasis_json_event_channel_userevent_create(
+	struct ast_channel_snapshot *channel_snapshot,
+	struct ast_json *blob
+	);
+
+/*!
+ * \brief Notification that a bridge has been created.
+ *
+ * \param bridge The bridge to be used to generate this event
+ *
+ * \retval NULL on error
+ * \retval JSON (ast_json) describing the event
+ */
+struct ast_json *stasis_json_event_bridge_created_create(
+	struct ast_bridge_snapshot *bridge_snapshot
 	);
 
 /*!
@@ -87,6 +102,18 @@
 	);
 
 /*!
+ * \brief Some part of channel state changed.
+ *
+ * \param channel The channel to be used to generate this event
+ *
+ * \retval NULL on error
+ * \retval JSON (ast_json) describing the event
+ */
+struct ast_json *stasis_json_event_channel_snapshot_create(
+	struct ast_channel_snapshot *channel_snapshot
+	);
+
+/*!
  * \brief Channel changed Caller ID.
  *
  * \param channel The channel that changed Caller ID.
@@ -119,6 +146,18 @@
 	);
 
 /*!
+ * \brief Notification that a bridge has been destroyed.
+ *
+ * \param bridge The bridge to be used to generate this event
+ *
+ * \retval NULL on error
+ * \retval JSON (ast_json) describing the event
+ */
+struct ast_json *stasis_json_event_bridge_destroyed_create(
+	struct ast_bridge_snapshot *bridge_snapshot
+	);
+
+/*!
  * \brief Notification that another WebSocket has taken over for an application.
  *
  * \param blob JSON blob containing the following parameters:
@@ -148,18 +187,17 @@
 	);
 
 /*!
- * \brief User-generated event with additional user-defined fields in the object.
- *
- * \param channel The channel that signaled the user event.
- * \param blob JSON blob containing the following parameters:
- * - eventname: string - The name of the user event. (required)
- *
- * \retval NULL on error
- * \retval JSON (ast_json) describing the event
- */
-struct ast_json *stasis_json_event_channel_userevent_create(
-	struct ast_channel_snapshot *channel_snapshot,
-	struct ast_json *blob
+ * \brief Notification that a channel has left a bridge.
+ *
+ * \param channel The channel to be used to generate this event
+ * \param bridge The bridge to be used to generate this event
+ *
+ * \retval NULL on error
+ * \retval JSON (ast_json) describing the event
+ */
+struct ast_json *stasis_json_event_channel_left_bridge_create(
+	struct ast_bridge_snapshot *bridge_snapshot,
+	struct ast_channel_snapshot *channel_snapshot
 	);
 
 /*!
@@ -218,6 +256,20 @@
 	);
 
 /*!
+ * \brief Notification that a channel has entered a bridge.
+ *
+ * \param channel The channel to be used to generate this event
+ * \param bridge The bridge to be used to generate this event
+ *
+ * \retval NULL on error
+ * \retval JSON (ast_json) describing the event
+ */
+struct ast_json *stasis_json_event_channel_entered_bridge_create(
+	struct ast_bridge_snapshot *bridge_snapshot,
+	struct ast_channel_snapshot *channel_snapshot
+	);
+
+/*!
  * \brief DTMF received on a channel.
  *
  * \param channel The channel on which DTMF was received
@@ -247,23 +299,26 @@
 /*
  * JSON models
  *
- * ChannelSnapshot
+ * ChannelUserevent
+ * - eventname: string (required)
+ * BridgeCreated
  * ChannelDestroyed
  * - cause: integer (required)
  * - cause_txt: string (required)
+ * ChannelSnapshot
  * ChannelCallerId
  * - caller_presentation_txt: string (required)
  * - caller_presentation: integer (required)
  * ChannelHangupRequest
  * - soft: boolean
  * - cause: integer
+ * BridgeDestroyed
  * ApplicationReplaced
  * - application: string (required)
  * ChannelVarset
  * - variable: string (required)
  * - value: string (required)
- * ChannelUserevent
- * - eventname: string (required)
+ * ChannelLeftBridge
  * ChannelCreated
  * StasisStart
  * - args: List[string] (required)
@@ -271,22 +326,27 @@
  * - application: string (required)
  * - application_data: string (required)
  * ChannelStateChange
+ * ChannelEnteredBridge
  * ChannelDtmfReceived
  * - digit: string (required)
  * Event
+ * - stasis_start: StasisStart
  * - channel_created: ChannelCreated
  * - channel_destroyed: ChannelDestroyed
+ * - channel_entered_bridge: ChannelEnteredBridge
+ * - channel_left_bridge: ChannelLeftBridge
  * - channel_dialplan: ChannelDialplan
  * - channel_varset: ChannelVarset
  * - application_replaced: ApplicationReplaced
  * - channel_state_change: ChannelStateChange
- * - stasis_start: StasisStart
+ * - bridge_created: BridgeCreated
  * - application: string (required)
  * - channel_hangup_request: ChannelHangupRequest
  * - channel_userevent: ChannelUserevent
  * - channel_snapshot: ChannelSnapshot
  * - channel_dtmf_received: ChannelDtmfReceived
  * - channel_caller_id: ChannelCallerId
+ * - bridge_destroyed: BridgeDestroyed
  * - stasis_end: StasisEnd
  * StasisEnd
  */

Modified: team/group/bridge_construction/rest-api-templates/res_stasis_http_resource.c.mustache
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/rest-api-templates/res_stasis_http_resource.c.mustache?view=diff&rev=388294&r1=388293&r2=388294
==============================================================================
--- team/group/bridge_construction/rest-api-templates/res_stasis_http_resource.c.mustache (original)
+++ team/group/bridge_construction/rest-api-templates/res_stasis_http_resource.c.mustache Fri May 10 08:23:36 2013
@@ -49,6 +49,7 @@
 #include "stasis_http/resource_{{name}}.h"
 {{#has_events}}
 #include "asterisk/stasis_channels.h"
+#include "asterisk/stasis_bridging.h"
 {{/has_events}}
 
 {{#apis}}

Modified: team/group/bridge_construction/rest-api/api-docs/events.json
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/rest-api/api-docs/events.json?view=diff&rev=388294&r1=388293&r2=388294
==============================================================================
--- team/group/bridge_construction/rest-api/api-docs/events.json (original)
+++ team/group/bridge_construction/rest-api/api-docs/events.json Fri May 10 08:23:36 2013
@@ -54,9 +54,13 @@
 					"required": true
 				},
 				"application_replaced": { "type": "ApplicationReplaced" },
+				"bridge_created": { "type": "BridgeCreated" },
+				"bridge_destroyed": { "type": "BridgeDestroyed" },
 				"channel_created": { "type": "ChannelCreated" },
 				"channel_destroyed": { "type": "ChannelDestroyed" },
 				"channel_snapshot": { "type": "ChannelSnapshot" },
+				"channel_entered_bridge": { "type": "ChannelEnteredBridge" },
+				"channel_left_bridge": { "type": "ChannelLeftBridge" },
 				"channel_state_change": { "type": "ChannelStateChange" },
 				"channel_dtmf_received": { "type": "ChannelDtmfReceived" },
 				"channel_dialplan": { "type": "ChannelDialplan" },
@@ -79,6 +83,26 @@
 				}
 			}
 		},
+		"BridgeCreated": {
+			"id": "BridgeCreated",
+			"description": "Notification that a bridge has been created.",
+			"properties": {
+				"bridge": {
+					"required": true,
+					"type": "Bridge"
+				}
+			}
+		},
+		"BridgeDestroyed": {
+			"id": "BridgeDestroyed",
+			"description": "Notification that a bridge has been destroyed.",
+			"properties": {
+				"bridge": {
+					"required": true,
+					"type": "Bridge"
+				}
+			}
+		},
 		"ChannelCreated": {
 			"id": "ChannelCreated",
 			"description": "Notification that a channel has been created.",
@@ -112,6 +136,33 @@
 					"required": true,
 					"description": "Text representation of the cause of the hangup",
 					"type": "string"
+				},
+				"channel": {
+					"required": true,
+					"type": "Channel"
+				}
+			}
+		},
+		"ChannelEnteredBridge": {
+			"id": "ChannelEnteredBridge",
+			"description": "Notification that a channel has entered a bridge.",
+			"properties": {
+				"bridge": {
+					"required": true,
+					"type": "Bridge"
+				},
+				"channel": {
+					"type": "Channel"
+				}
+			}
+		},
+		"ChannelLeftBridge": {
+			"id": "ChannelLeftBridge",
+			"description": "Notification that a channel has left a bridge.",
+			"properties": {
+				"bridge": {
+					"required": true,
+					"type": "Bridge"
 				},
 				"channel": {
 					"required": true,




More information about the asterisk-commits mailing list