[asterisk-commits] kmoore: branch kmoore/stasis-bridging-channel_events r387801 - in /team/kmoor...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 7 09:44:58 CDT 2013


Author: kmoore
Date: Tue May  7 09:44:55 2013
New Revision: 387801

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387801
Log:
Update Stasis stubs

Modified:
    team/kmoore/stasis-bridging-channel_events/res/res_stasis_http_events.c
    team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h

Modified: team/kmoore/stasis-bridging-channel_events/res/res_stasis_http_events.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging-channel_events/res/res_stasis_http_events.c?view=diff&rev=387801&r1=387800&r2=387801
==============================================================================
--- team/kmoore/stasis-bridging-channel_events/res/res_stasis_http_events.c (original)
+++ team/kmoore/stasis-bridging-channel_events/res/res_stasis_http_events.c Tue May  7 09:44:55 2013
@@ -101,14 +101,6 @@
 		return NULL;
 	}
 
-	validator = ast_json_object_get(blob, "Body");
-	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;
@@ -172,15 +164,15 @@
 	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-txt");
-	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");
+	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 {
@@ -251,15 +243,15 @@
 	ast_assert(ast_json_object_get(blob, "channel") == NULL);
 	ast_assert(ast_json_object_get(blob, "type") == NULL);
 
-	validator = ast_json_object_get(blob, "CallerPresentation-txt");
-	if (validator) {
-		/* do validation? XXX */
-	} else {
-		/* fail message generation if the required parameter doesn't exist */
-		return NULL;
-	}
-
-	validator = ast_json_object_get(blob, "CallerPresentation");
+	validator = ast_json_object_get(blob, "caller_presentation_txt");
+	if (validator) {
+		/* do validation? XXX */
+	} else {
+		/* fail message generation if the required parameter doesn't exist */
+		return NULL;
+	}
+
+	validator = ast_json_object_get(blob, "caller_presentation");
 	if (validator) {
 		/* do validation? XXX */
 	} else {
@@ -564,15 +556,15 @@
 	ast_assert(ast_json_object_get(blob, "channel") == NULL);
 	ast_assert(ast_json_object_get(blob, "type") == NULL);
 
-	validator = ast_json_object_get(blob, "Application");
-	if (validator) {
-		/* do validation? XXX */
-	} else {
-		/* fail message generation if the required parameter doesn't exist */
-		return NULL;
-	}
-
-	validator = ast_json_object_get(blob, "ApplicationData");
+	validator = ast_json_object_get(blob, "application");
+	if (validator) {
+		/* do validation? XXX */
+	} else {
+		/* fail message generation if the required parameter doesn't exist */
+		return NULL;
+	}
+
+	validator = ast_json_object_get(blob, "application_data");
 	if (validator) {
 		/* do validation? XXX */
 	} else {

Modified: team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h?view=diff&rev=387801&r1=387800&r2=387801
==============================================================================
--- team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h (original)
+++ team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h Tue May  7 09:44:55 2013
@@ -59,12 +59,11 @@
 struct ast_bridge_snapshot;
 
 /*!
- * \brief Channel changed Caller ID.
+ * \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)
- * - Body: string - The additional body parameters for the user event. (required)
  *
  * \retval NULL on error
  * \retval JSON (ast_json) describing the event
@@ -91,8 +90,8 @@
  *
  * \param channel The channel to be used to generate this event
  * \param blob JSON blob containing the following parameters:
- * - Cause-txt: string - Text representation of the cause of the hangup (required)
- * - Cause: integer - Integer representation of the cause of the hangup (required)
+ * - cause: integer - Integer representation of the cause of the hangup (required)
+ * - cause_txt: string - Text representation of the cause of the hangup (required)
  *
  * \retval NULL on error
  * \retval JSON (ast_json) describing the event
@@ -119,8 +118,8 @@
  *
  * \param channel The channel that changed Caller ID.
  * \param blob JSON blob containing the following parameters:
- * - CallerPresentation-txt: string - The text representation of the Caller Presentation value. (required)
- * - CallerPresentation: integer - The integer representation of the Caller Presentation value. (required)
+ * - caller_presentation_txt: string - The text representation of the Caller Presentation value. (required)
+ * - caller_presentation: integer - The integer representation of the Caller Presentation value. (required)
  *
  * \retval NULL on error
  * \retval JSON (ast_json) describing the event
@@ -131,11 +130,11 @@
 	);
 
 /*!
- * \brief Channel changed Caller ID.
+ * \brief A hangup was requested on the channel.
  *
  * \param channel The channel on which the hangup was requested.
  * \param blob JSON blob containing the following parameters:
- * - soft: integer - Whether the hangup request was a soft hangup request.
+ * - soft: boolean - Whether the hangup request was a soft hangup request.
  * - cause: integer - Integer representation of the cause of the hangup.
  *
  * \retval NULL on error
@@ -233,8 +232,8 @@
  *
  * \param channel The channel that changed dialplan location.
  * \param blob JSON blob containing the following parameters:
- * - Application: string - The application that the channel is currently in. (required)
- * - ApplicationData: string - The data that was passed to the application when it was invoked. (required)
+ * - application: string - The application that the channel is currently in. (required)
+ * - application_data: string - The data that was passed to the application when it was invoked. (required)
  *
  * \retval NULL on error
  * \retval JSON (ast_json) describing the event
@@ -302,17 +301,16 @@
  *
  * ChannelUserevent
  * - eventname: string (required)
- * - Body: string (required)
  * BridgeCreated
  * ChannelDestroyed
- * - Cause-txt: string (required)
- * - Cause: integer (required)
+ * - cause: integer (required)
+ * - cause_txt: string (required)
  * ChannelSnapshot
  * ChannelCallerId
- * - CallerPresentation-txt: string (required)
- * - CallerPresentation: integer (required)
+ * - caller_presentation_txt: string (required)
+ * - caller_presentation: integer (required)
  * ChannelHangupRequest
- * - soft: integer
+ * - soft: boolean
  * - cause: integer
  * BridgeDestroyed
  * ApplicationReplaced
@@ -325,8 +323,8 @@
  * StasisStart
  * - args: List[string] (required)
  * ChannelDialplan
- * - Application: string (required)
- * - ApplicationData: string (required)
+ * - application: string (required)
+ * - application_data: string (required)
  * ChannelStateChange
  * ChannelEnteredBridge
  * ChannelDtmfReceived




More information about the asterisk-commits mailing list