[svn-commits] mmichelson: branch group/ari-greedy-atxfer r419887 - in /team/group/ari-greed...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 1 08:58:59 CDT 2014


Author: mmichelson
Date: Fri Aug  1 08:58:52 2014
New Revision: 419887

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419887
Log:
Be sure event validation understands the new fields in transfer messages.


Modified:
    team/group/ari-greedy-atxfer/res/ari/ari_model_validators.c
    team/group/ari-greedy-atxfer/res/ari/ari_model_validators.h
    team/group/ari-greedy-atxfer/rest-api/api-docs/events.json

Modified: team/group/ari-greedy-atxfer/res/ari/ari_model_validators.c
URL: http://svnview.digium.com/svn/asterisk/team/group/ari-greedy-atxfer/res/ari/ari_model_validators.c?view=diff&rev=419887&r1=419886&r2=419887
==============================================================================
--- team/group/ari-greedy-atxfer/res/ari/ari_model_validators.c (original)
+++ team/group/ari-greedy-atxfer/res/ari/ari_model_validators.c Fri Aug  1 08:58:52 2014
@@ -1730,6 +1730,24 @@
 				res = 0;
 			}
 		} else
+		if (strcmp("transfer_target", ast_json_object_iter_key(iter)) == 0) {
+			int prop_is_valid;
+			prop_is_valid = ast_ari_validate_channel(
+				ast_json_object_iter_value(iter));
+			if (!prop_is_valid) {
+				ast_log(LOG_ERROR, "ARI BridgeAttendedTransfer field transfer_target failed validation\n");
+				res = 0;
+			}
+		} else
+		if (strcmp("transferee", ast_json_object_iter_key(iter)) == 0) {
+			int prop_is_valid;
+			prop_is_valid = ast_ari_validate_channel(
+				ast_json_object_iter_value(iter));
+			if (!prop_is_valid) {
+				ast_log(LOG_ERROR, "ARI BridgeAttendedTransfer field transferee failed validation\n");
+				res = 0;
+			}
+		} else
 		if (strcmp("transferer_first_leg", ast_json_object_iter_key(iter)) == 0) {
 			int prop_is_valid;
 			has_transferer_first_leg = 1;
@@ -1920,6 +1938,15 @@
 				res = 0;
 			}
 		} else
+		if (strcmp("transferee", ast_json_object_iter_key(iter)) == 0) {
+			int prop_is_valid;
+			prop_is_valid = ast_ari_validate_channel(
+				ast_json_object_iter_value(iter));
+			if (!prop_is_valid) {
+				ast_log(LOG_ERROR, "ARI BridgeBlindTransfer field transferee failed validation\n");
+				res = 0;
+			}
+		} else
 		{
 			ast_log(LOG_ERROR,
 				"ARI BridgeBlindTransfer has undocumented field %s\n",

Modified: team/group/ari-greedy-atxfer/res/ari/ari_model_validators.h
URL: http://svnview.digium.com/svn/asterisk/team/group/ari-greedy-atxfer/res/ari/ari_model_validators.h?view=diff&rev=419887&r1=419886&r2=419887
==============================================================================
--- team/group/ari-greedy-atxfer/res/ari/ari_model_validators.h (original)
+++ team/group/ari-greedy-atxfer/res/ari/ari_model_validators.h Fri Aug  1 08:58:52 2014
@@ -1227,6 +1227,8 @@
  * - is_external: boolean (required)
  * - replace_channel: Channel
  * - result: string (required)
+ * - transfer_target: Channel
+ * - transferee: Channel
  * - transferer_first_leg: Channel (required)
  * - transferer_first_leg_bridge: Bridge
  * - transferer_second_leg: Channel (required)
@@ -1241,6 +1243,7 @@
  * - exten: string (required)
  * - is_external: boolean (required)
  * - result: string (required)
+ * - transferee: Channel
  * BridgeCreated
  * - type: string (required)
  * - application: string (required)

Modified: team/group/ari-greedy-atxfer/rest-api/api-docs/events.json
URL: http://svnview.digium.com/svn/asterisk/team/group/ari-greedy-atxfer/rest-api/api-docs/events.json?view=diff&rev=419887&r1=419886&r2=419887
==============================================================================
--- team/group/ari-greedy-atxfer/rest-api/api-docs/events.json (original)
+++ team/group/ari-greedy-atxfer/rest-api/api-docs/events.json Fri Aug  1 08:58:52 2014
@@ -284,6 +284,11 @@
 					"required": true,
 					"type": "Channel"
 				},
+				"transferee": {
+					"description": "The channel that is being transferred",
+					"required": false,
+					"type": "Channel"
+				},
 				"exten": {
 					"description": "The extension transferred to",
 					"required": true,
@@ -329,6 +334,16 @@
 					"required": false,
 					"type": "Channel"
 				},
+				"transferee": {
+					"description": "The channel that is being transferred",
+					"required": false,
+					"type": "Channel"
+				},
+				"transfer_target": {
+					"description": "The channel that is being transferred to",
+					"required": false,
+					"type": "Channel"
+				},
 				"result": {
 					"description": "The result of the transfer attempt",
 					"required": true,




More information about the svn-commits mailing list