[asterisk-commits] dlee: branch dlee/stasis-http r385033 - in /team/dlee/stasis-http: cog/ res/s...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 8 15:24:37 CDT 2013


Author: dlee
Date: Mon Apr  8 15:24:33 2013
New Revision: 385033

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385033
Log:
Updated event documentation

Modified:
    team/dlee/stasis-http/cog/stasis_cog.py
    team/dlee/stasis-http/res/stasis_http/resource_channels.h
    team/dlee/stasis-http/res/stasis_http/resources.c
    team/dlee/stasis-http/rest-api/api-docs/events.json

Modified: team/dlee/stasis-http/cog/stasis_cog.py
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/cog/stasis_cog.py?view=diff&rev=385033&r1=385032&r2=385033
==============================================================================
--- team/dlee/stasis-http/cog/stasis_cog.py (original)
+++ team/dlee/stasis-http/cog/stasis_cog.py Mon Apr  8 15:24:33 2013
@@ -447,6 +447,7 @@
         self.nickname = snakify(nickname)
         self.query_parameters = OrderedDict()
         self.path_parameters = OrderedDict()
+        self.header_parameters = OrderedDict()
         self.summary = None
         self.notes = None
 
@@ -461,6 +462,8 @@
             p = self.path_parameters
         elif param_type == 'query':
             p = self.query_parameters
+        elif param_type == 'header':
+            p = self.header_parameters
         else:
             raise ValueError("Invalid param_type: %s" % param_type)
         p[name] = Parameter(name=name, description=description,

Modified: team/dlee/stasis-http/res/stasis_http/resource_channels.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/res/stasis_http/resource_channels.h?view=diff&rev=385033&r1=385032&r2=385033
==============================================================================
--- team/dlee/stasis-http/res/stasis_http/resource_channels.h (original)
+++ team/dlee/stasis-http/res/stasis_http/resource_channels.h Mon Apr  8 15:24:33 2013
@@ -35,6 +35,8 @@
 #ifndef _ASTERISK_RESOURCE_CHANNELS_H
 #define _ASTERISK_RESOURCE_CHANNELS_H
 struct ast_dial_args {
+	/*! Channel's id */
+	const char *channel_id;
 	/*! Endpoint to call. If not specified, dial is routed via dialplan */
 	const char *endpoint;
 	/*! Extension to dial */

Modified: team/dlee/stasis-http/res/stasis_http/resources.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/res/stasis_http/resources.c?view=diff&rev=385033&r1=385032&r2=385033
==============================================================================
--- team/dlee/stasis-http/res/stasis_http/resources.c (original)
+++ team/dlee/stasis-http/res/stasis_http/resources.c Mon Apr  8 15:24:33 2013
@@ -94,6 +94,11 @@
 	struct ast_variable *i;
 	struct ast_dial_args args = {};
 
+	for (i = path_vars; i; i = i->next) {
+		if (strcmp(i->name, "channelId") == 0) {
+			args.channel_id = i->value;
+		}
+	}
 	for (i = get_params; i; i = i->next) {
 		if (strcmp(i->name, "endpoint") == 0) {
 			args.endpoint = i->value;

Modified: team/dlee/stasis-http/rest-api/api-docs/events.json
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/rest-api/api-docs/events.json?view=diff&rev=385033&r1=385032&r2=385033
==============================================================================
--- team/dlee/stasis-http/rest-api/api-docs/events.json (original)
+++ team/dlee/stasis-http/rest-api/api-docs/events.json Mon Apr  8 15:24:33 2013
@@ -50,17 +50,18 @@
 			"properties": {
 				"application": {
 					"type": "string",
-					"description": "Name of the application receiving the event",
+					"description": "Name of the application receiving the event.",
 					"required": true
 				},
-				"stasis-start": { "type": "StasisStart" },
-				"stasis-end": { "type": "StasisEnd" },
-				"channel-state-change": { "type": "ChannelStateChange" },
-				"application-replaced": { "type": "ApplicationReplaced" }
+				"stasis_start": { "type": "StasisStart" },
+				"stasis_end": { "type": "StasisEnd" },
+				"channel_state_change": { "type": "ChannelStateChange" },
+				"application_replaced": { "type": "ApplicationReplaced" }
 			}
 		},
 		"StasisStart": {
 			"id": "StasisStart",
+			"description": "Notification that a channel has entered a Stasis appliction.",
 			"properties": {
 				"args": {
 					"type": "List[string]",
@@ -73,6 +74,7 @@
 		},
 		"StasisEnd": {
 			"id": "StasisEnd",
+			"description": "Notification that a channel has left a Stasis appliction.",
 			"properties": {
 				"channel_info": {
 					"type": "Channel"
@@ -81,6 +83,7 @@
 		},
 		"ChannelStateChange": {
 			"id": "ChannelStateChange",
+			"description": "Notification of a channel's state change.",
 			"properties": {
 				"channel_info": {
 					"type": "Channel"
@@ -89,7 +92,54 @@
 		},
 		"ApplicationReplaced": {
 			"id": "ApplicationReplaced",
+			"description": "Notification that another WebSocket has taken over for an application.",
+			"notes": "An application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.",
 			"properties": {
+				"application": {
+					"type": "string"
+				}
+			}
+		},
+		"BridgeCreated": {
+			"id": "BridgeCreated",
+			"description": "Notification that a bridge has been created.",
+			"properties": {
+				"bridge": {
+					"type": "Bridge"
+				}
+			}
+		},
+		"BridgeDestroyed": {
+			"id": "BridgeDestroyed",
+			"description": "Notification that a bridge has been destroyed.",
+			"properties": {
+				"bridge": {
+					"type": "Bridge"
+				}
+			}
+		},
+		"ChannelEnteredBridge": {
+			"id": "ChannelEnteredBridge",
+			"description": "Notification that a channel has entered a bridge.",
+			"properties": {
+				"bridge": {
+					"type": "Bridge"
+				},
+				"channel": {
+					"type": "Channel"
+				}
+			}
+		},
+		"ChannelLeftBridge": {
+			"id": "ChannelLeftBridge",
+			"description": "Notification that a channel has left a bridge.",
+			"properties": {
+				"bridge": {
+					"type": "Bridge"
+				},
+				"channel": {
+					"type": "Channel"
+				}
 			}
 		}
 	}




More information about the asterisk-commits mailing list