<p>sungtae kim has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11176">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res/res_ari: Added timestamp as a requirement for all ARI events<br><br>Changed to requirement to having timestamp for all of ARI events.<br>The below ARI events were changed to having timestamp.<br>PlaybackStarted, PlaybackContinuing, PlaybackFinished,<br>RecordingStarted, RecordingFinished, RecordingFailed,<br>ApplicationReplaced, ApplicationMoveFailed<br><br>ASTERISK-28326<br><br>Change-Id: I382c2fef58f5fe107e1074869a6d05310accb41f<br>---<br>M res/ari/ari_model_validators.c<br>M res/ari/ari_model_validators.h<br>M res/res_stasis.c<br>M res/res_stasis_playback.c<br>M res/res_stasis_recording.c<br>M res/stasis/app.c<br>M rest-api/api-docs/events.json<br>M tests/test_res_stasis.c<br>8 files changed, 337 insertions(+), 60 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/76/11176/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/ari/ari_model_validators.c b/res/ari/ari_model_validators.c</span><br><span>index 72df98d..071a24d 100644</span><br><span>--- a/res/ari/ari_model_validators.c</span><br><span>+++ b/res/ari/ari_model_validators.c</span><br><span>@@ -2034,6 +2034,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_args = 0;</span><br><span> int has_channel = 0;</span><br><span> int has_destination = 0;</span><br><span>@@ -2070,6 +2071,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -2126,6 +2128,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ApplicationMoveFailed missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_args) {</span><br><span> ast_log(LOG_ERROR, "ARI ApplicationMoveFailed missing required field args\n");</span><br><span> res = 0;</span><br><span>@@ -2155,6 +2162,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span> if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {</span><br><span>@@ -2188,6 +2196,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -2213,6 +2222,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ApplicationReplaced missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> return res;</span><br><span> }</span><br><span> </span><br><span>@@ -2227,6 +2241,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_destination_type = 0;</span><br><span> int has_is_external = 0;</span><br><span> int has_result = 0;</span><br><span>@@ -2265,6 +2280,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -2439,6 +2455,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI BridgeAttendedTransfer missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_destination_type) {</span><br><span> ast_log(LOG_ERROR, "ARI BridgeAttendedTransfer missing required field destination_type\n");</span><br><span> res = 0;</span><br><span>@@ -2478,6 +2499,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> int has_context = 0;</span><br><span> int has_exten = 0;</span><br><span>@@ -2516,6 +2538,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -2618,6 +2641,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI BridgeBlindTransfer missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI BridgeBlindTransfer missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -2657,6 +2685,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_bridge = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -2691,6 +2720,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -2726,6 +2756,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI BridgeCreated missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_bridge) {</span><br><span> ast_log(LOG_ERROR, "ARI BridgeCreated missing required field bridge\n");</span><br><span> res = 0;</span><br><span>@@ -2745,6 +2780,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_bridge = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -2779,6 +2815,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -2814,6 +2851,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI BridgeDestroyed missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_bridge) {</span><br><span> ast_log(LOG_ERROR, "ARI BridgeDestroyed missing required field bridge\n");</span><br><span> res = 0;</span><br><span>@@ -2833,6 +2875,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_bridge = 0;</span><br><span> int has_bridge_from = 0;</span><br><span> </span><br><span>@@ -2868,6 +2911,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -2913,6 +2957,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI BridgeMerged missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_bridge) {</span><br><span> ast_log(LOG_ERROR, "ARI BridgeMerged missing required field bridge\n");</span><br><span> res = 0;</span><br><span>@@ -2937,6 +2986,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_bridge = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -2971,6 +3021,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3015,6 +3066,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI BridgeVideoSourceChanged missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_bridge) {</span><br><span> ast_log(LOG_ERROR, "ARI BridgeVideoSourceChanged missing required field bridge\n");</span><br><span> res = 0;</span><br><span>@@ -3034,6 +3090,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_caller_presentation = 0;</span><br><span> int has_caller_presentation_txt = 0;</span><br><span> int has_channel = 0;</span><br><span>@@ -3070,6 +3127,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3125,6 +3183,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelCallerId missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_caller_presentation) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelCallerId missing required field caller_presentation\n");</span><br><span> res = 0;</span><br><span>@@ -3154,6 +3217,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -3188,6 +3252,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3223,6 +3288,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelConnectedLine missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelConnectedLine missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -3242,6 +3312,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -3276,6 +3347,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3311,6 +3383,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelCreated missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelCreated missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -3330,6 +3407,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_cause = 0;</span><br><span> int has_cause_txt = 0;</span><br><span> int has_channel = 0;</span><br><span>@@ -3366,6 +3444,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3421,6 +3500,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelDestroyed missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_cause) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelDestroyed missing required field cause\n");</span><br><span> res = 0;</span><br><span>@@ -3450,6 +3534,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> int has_dialplan_app = 0;</span><br><span> int has_dialplan_app_data = 0;</span><br><span>@@ -3486,6 +3571,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3541,6 +3627,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelDialplan missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelDialplan missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -3570,6 +3661,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> int has_digit = 0;</span><br><span> int has_duration_ms = 0;</span><br><span>@@ -3606,6 +3698,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3661,6 +3754,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelDtmfReceived missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelDtmfReceived missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -3690,6 +3788,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_bridge = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -3724,6 +3823,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3768,6 +3868,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelEnteredBridge missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_bridge) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelEnteredBridge missing required field bridge\n");</span><br><span> res = 0;</span><br><span>@@ -3787,6 +3892,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -3821,6 +3927,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3874,6 +3981,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelHangupRequest missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelHangupRequest missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -3893,6 +4005,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -3927,6 +4040,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -3971,6 +4085,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelHold missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelHold missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -3990,6 +4109,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_bridge = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span>@@ -4025,6 +4145,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4070,6 +4191,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelLeftBridge missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_bridge) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelLeftBridge missing required field bridge\n");</span><br><span> res = 0;</span><br><span>@@ -4094,6 +4220,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -4128,6 +4255,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4163,6 +4291,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelStateChange missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelStateChange missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -4182,6 +4315,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> int has_duration = 0;</span><br><span> </span><br><span>@@ -4217,6 +4351,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4262,6 +4397,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelTalkingFinished missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelTalkingFinished missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -4286,6 +4426,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -4320,6 +4461,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4355,6 +4497,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelTalkingStarted missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelTalkingStarted missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -4374,6 +4521,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -4408,6 +4556,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4443,6 +4592,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelUnhold missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelUnhold missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -4462,6 +4616,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_eventname = 0;</span><br><span> int has_userevent = 0;</span><br><span> </span><br><span>@@ -4497,6 +4652,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4569,6 +4725,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelUserevent missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_eventname) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelUserevent missing required field eventname\n");</span><br><span> res = 0;</span><br><span>@@ -4593,6 +4754,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_value = 0;</span><br><span> int has_variable = 0;</span><br><span> </span><br><span>@@ -4628,6 +4790,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4682,6 +4845,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ChannelVarset missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_value) {</span><br><span> ast_log(LOG_ERROR, "ARI ChannelVarset missing required field value\n");</span><br><span> res = 0;</span><br><span>@@ -4785,6 +4953,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_contact_info = 0;</span><br><span> int has_endpoint = 0;</span><br><span> </span><br><span>@@ -4820,6 +4989,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4865,6 +5035,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI ContactStatusChange missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_contact_info) {</span><br><span> ast_log(LOG_ERROR, "ARI ContactStatusChange missing required field contact_info\n");</span><br><span> res = 0;</span><br><span>@@ -4889,6 +5064,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_device_state = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -4923,6 +5099,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -4958,6 +5135,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI DeviceStateChanged missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_device_state) {</span><br><span> ast_log(LOG_ERROR, "ARI DeviceStateChanged missing required field device_state\n");</span><br><span> res = 0;</span><br><span>@@ -4977,6 +5159,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_dialstatus = 0;</span><br><span> int has_peer = 0;</span><br><span> </span><br><span>@@ -5012,6 +5195,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -5093,6 +5277,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI Dial missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_dialstatus) {</span><br><span> ast_log(LOG_ERROR, "ARI Dial missing required field dialstatus\n");</span><br><span> res = 0;</span><br><span>@@ -5117,6 +5306,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_endpoint = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -5151,6 +5341,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -5186,6 +5377,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI EndpointStateChange missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_endpoint) {</span><br><span> ast_log(LOG_ERROR, "ARI EndpointStateChange missing required field endpoint\n");</span><br><span> res = 0;</span><br><span>@@ -5205,6 +5401,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> const char *discriminator;</span><br><span> </span><br><span> discriminator = ast_json_string_get(ast_json_object_get(json, "type"));</span><br><span>@@ -5365,6 +5562,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -5390,6 +5588,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI Event missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> return res;</span><br><span> }</span><br><span> </span><br><span>@@ -5722,6 +5925,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_endpoint = 0;</span><br><span> int has_peer = 0;</span><br><span> </span><br><span>@@ -5757,6 +5961,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -5802,6 +6007,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI PeerStatusChange missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_endpoint) {</span><br><span> ast_log(LOG_ERROR, "ARI PeerStatusChange missing required field endpoint\n");</span><br><span> res = 0;</span><br><span>@@ -5826,6 +6036,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_playback = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -5860,6 +6071,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -5895,6 +6107,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI PlaybackFinished missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_playback) {</span><br><span> ast_log(LOG_ERROR, "ARI PlaybackFinished missing required field playback\n");</span><br><span> res = 0;</span><br><span>@@ -5914,6 +6131,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_playback = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -5948,6 +6166,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -5983,6 +6202,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI PlaybackStarted missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_playback) {</span><br><span> ast_log(LOG_ERROR, "ARI PlaybackStarted missing required field playback\n");</span><br><span> res = 0;</span><br><span>@@ -6002,6 +6226,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_recording = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -6036,6 +6261,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -6071,6 +6297,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI RecordingFailed missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_recording) {</span><br><span> ast_log(LOG_ERROR, "ARI RecordingFailed missing required field recording\n");</span><br><span> res = 0;</span><br><span>@@ -6090,6 +6321,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_recording = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -6124,6 +6356,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -6159,6 +6392,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI RecordingFinished missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_recording) {</span><br><span> ast_log(LOG_ERROR, "ARI RecordingFinished missing required field recording\n");</span><br><span> res = 0;</span><br><span>@@ -6178,6 +6416,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_recording = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -6212,6 +6451,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -6247,6 +6487,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI RecordingStarted missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_recording) {</span><br><span> ast_log(LOG_ERROR, "ARI RecordingStarted missing required field recording\n");</span><br><span> res = 0;</span><br><span>@@ -6266,6 +6511,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -6300,6 +6546,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -6335,6 +6582,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI StasisEnd missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_channel) {</span><br><span> ast_log(LOG_ERROR, "ARI StasisEnd missing required field channel\n");</span><br><span> res = 0;</span><br><span>@@ -6354,6 +6606,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_args = 0;</span><br><span> int has_channel = 0;</span><br><span> </span><br><span>@@ -6389,6 +6642,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -6444,6 +6698,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI StasisStart missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_args) {</span><br><span> ast_log(LOG_ERROR, "ARI StasisStart missing required field args\n");</span><br><span> res = 0;</span><br><span>@@ -6468,6 +6727,7 @@</span><br><span> struct ast_json_iter *iter;</span><br><span> int has_type = 0;</span><br><span> int has_application = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int has_timestamp = 0;</span><br><span> int has_message = 0;</span><br><span> </span><br><span> for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {</span><br><span>@@ -6502,6 +6762,7 @@</span><br><span> } else</span><br><span> if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {</span><br><span> int prop_is_valid;</span><br><span style="color: hsl(120, 100%, 40%);">+ has_timestamp = 1;</span><br><span> prop_is_valid = ast_ari_validate_date(</span><br><span> ast_json_object_iter_value(iter));</span><br><span> if (!prop_is_valid) {</span><br><span>@@ -6546,6 +6807,11 @@</span><br><span> res = 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!has_timestamp) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "ARI TextMessageReceived missing required field timestamp\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!has_message) {</span><br><span> ast_log(LOG_ERROR, "ARI TextMessageReceived missing required field message\n");</span><br><span> res = 0;</span><br><span>diff --git a/res/ari/ari_model_validators.h b/res/ari/ari_model_validators.h</span><br><span>index d2442f3..54e852f 100644</span><br><span>--- a/res/ari/ari_model_validators.h</span><br><span>+++ b/res/ari/ari_model_validators.h</span><br><span>@@ -1531,7 +1531,7 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - args: List[string] (required)</span><br><span> * - channel: Channel (required)</span><br><span> * - destination: string (required)</span><br><span>@@ -1539,12 +1539,12 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * BridgeAttendedTransfer</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - destination_application: string</span><br><span> * - destination_bridge: string</span><br><span> * - destination_link_first_leg: Channel</span><br><span>@@ -1565,7 +1565,7 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - bridge: Bridge</span><br><span> * - channel: Channel (required)</span><br><span> * - context: string (required)</span><br><span>@@ -1578,33 +1578,33 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - bridge: Bridge (required)</span><br><span> * BridgeDestroyed</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - bridge: Bridge (required)</span><br><span> * BridgeMerged</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - bridge: Bridge (required)</span><br><span> * - bridge_from: Bridge (required)</span><br><span> * BridgeVideoSourceChanged</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - bridge: Bridge (required)</span><br><span> * - old_video_source_id: string</span><br><span> * ChannelCallerId</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - caller_presentation: int (required)</span><br><span> * - caller_presentation_txt: string (required)</span><br><span> * - channel: Channel (required)</span><br><span>@@ -1612,19 +1612,19 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * ChannelCreated</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * ChannelDestroyed</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - cause: int (required)</span><br><span> * - cause_txt: string (required)</span><br><span> * - channel: Channel (required)</span><br><span>@@ -1632,7 +1632,7 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * - dialplan_app: string (required)</span><br><span> * - dialplan_app_data: string (required)</span><br><span>@@ -1640,7 +1640,7 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * - digit: string (required)</span><br><span> * - duration_ms: int (required)</span><br><span>@@ -1648,14 +1648,14 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - bridge: Bridge (required)</span><br><span> * - channel: Channel</span><br><span> * ChannelHangupRequest</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - cause: int</span><br><span> * - channel: Channel (required)</span><br><span> * - soft: boolean</span><br><span>@@ -1663,46 +1663,46 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * - musicclass: string</span><br><span> * ChannelLeftBridge</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - bridge: Bridge (required)</span><br><span> * - channel: Channel (required)</span><br><span> * ChannelStateChange</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * ChannelTalkingFinished</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * - duration: int (required)</span><br><span> * ChannelTalkingStarted</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * ChannelUnhold</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * ChannelUserevent</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - bridge: Bridge</span><br><span> * - channel: Channel</span><br><span> * - endpoint: Endpoint</span><br><span>@@ -1712,7 +1712,7 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel</span><br><span> * - value: string (required)</span><br><span> * - variable: string (required)</span><br><span>@@ -1725,20 +1725,20 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - contact_info: ContactInfo (required)</span><br><span> * - endpoint: Endpoint (required)</span><br><span> * DeviceStateChanged</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - device_state: DeviceState (required)</span><br><span> * Dial</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - caller: Channel</span><br><span> * - dialstatus: string (required)</span><br><span> * - dialstring: string</span><br><span>@@ -1749,13 +1749,13 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - endpoint: Endpoint (required)</span><br><span> * Event</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * Message</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span>@@ -1773,50 +1773,50 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - endpoint: Endpoint (required)</span><br><span> * - peer: Peer (required)</span><br><span> * PlaybackFinished</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - playback: Playback (required)</span><br><span> * PlaybackStarted</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - playback: Playback (required)</span><br><span> * RecordingFailed</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - recording: LiveRecording (required)</span><br><span> * RecordingFinished</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - recording: LiveRecording (required)</span><br><span> * RecordingStarted</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - recording: LiveRecording (required)</span><br><span> * StasisEnd</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - channel: Channel (required)</span><br><span> * StasisStart</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - args: List[string] (required)</span><br><span> * - channel: Channel (required)</span><br><span> * - replace_channel: Channel</span><br><span>@@ -1824,7 +1824,7 @@</span><br><span> * - asterisk_id: string</span><br><span> * - type: string (required)</span><br><span> * - application: string (required)</span><br><span style="color: hsl(0, 100%, 40%);">- * - timestamp: Date</span><br><span style="color: hsl(120, 100%, 40%);">+ * - timestamp: Date (required)</span><br><span> * - endpoint: Endpoint</span><br><span> * - message: TextMessage (required)</span><br><span> * Application</span><br><span>diff --git a/res/res_stasis.c b/res/res_stasis.c</span><br><span>index e040d64..114a43f 100644</span><br><span>--- a/res/res_stasis.c</span><br><span>+++ b/res/res_stasis.c</span><br><span>@@ -1443,30 +1443,35 @@</span><br><span> int next_argc = control_next_app_args_size(control);</span><br><span> char **next_argv = control_next_app_args(control);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- msg = ast_json_pack("{s: s, s: o, s: s, s: []}",</span><br><span style="color: hsl(120, 100%, 40%);">+ msg = ast_json_pack("{s: s, s: o, s: o, s: s, s: []}",</span><br><span> "type", "ApplicationMoveFailed",</span><br><span style="color: hsl(120, 100%, 40%);">+ "timestamp", ast_json_timeval(ast_tvnow(), NULL),</span><br><span> "channel", ast_channel_snapshot_to_json(snapshot, NULL),</span><br><span> "destination", control_next_app(control),</span><br><span> "args");</span><br><span style="color: hsl(0, 100%, 40%);">- json_args = ast_json_object_get(msg, "args");</span><br><span style="color: hsl(0, 100%, 40%);">- if (!json_args) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_log(LOG_ERROR, "Could not get args json array");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!msg) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "Failed to pack JSON for ApplicationMoveFailed message\n");</span><br><span> } else {</span><br><span style="color: hsl(0, 100%, 40%);">- int r = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- int idx;</span><br><span style="color: hsl(0, 100%, 40%);">- for (idx = 0; idx < next_argc; ++idx) {</span><br><span style="color: hsl(0, 100%, 40%);">- r = ast_json_array_append(json_args,</span><br><span style="color: hsl(0, 100%, 40%);">- ast_json_string_create(next_argv[idx]));</span><br><span style="color: hsl(0, 100%, 40%);">- if (r != 0) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_log(LOG_ERROR, "Error appending to ApplicationMoveFailed message\n");</span><br><span style="color: hsl(0, 100%, 40%);">- break;</span><br><span style="color: hsl(120, 100%, 40%);">+ json_args = ast_json_object_get(msg, "args");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!json_args) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "Could not get args json array");</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ int r = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int idx;</span><br><span style="color: hsl(120, 100%, 40%);">+ for (idx = 0; idx < next_argc; ++idx) {</span><br><span style="color: hsl(120, 100%, 40%);">+ r = ast_json_array_append(json_args,</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_json_string_create(next_argv[idx]));</span><br><span style="color: hsl(120, 100%, 40%);">+ if (r != 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "Error appending to ApplicationMoveFailed message\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ if (r == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ app_send(control_app(control), msg);</span><br><span> }</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- if (r == 0) {</span><br><span style="color: hsl(0, 100%, 40%);">- app_send(control_app(control), msg);</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_json_unref(msg);</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- ast_json_unref(msg);</span><br><span> }</span><br><span> }</span><br><span> control_move_cleanup(control);</span><br><span>diff --git a/res/res_stasis_playback.c b/res/res_stasis_playback.c</span><br><span>index 999e6d0..8145e40 100644</span><br><span>--- a/res/res_stasis_playback.c</span><br><span>+++ b/res/res_stasis_playback.c</span><br><span>@@ -105,9 +105,10 @@</span><br><span> return NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- return ast_json_pack("{s: s, s: o}",</span><br><span style="color: hsl(120, 100%, 40%);">+ return ast_json_pack("{s: s, s: o?, s: O}",</span><br><span> "type", type,</span><br><span style="color: hsl(0, 100%, 40%);">- "playback", ast_json_deep_copy(blob));</span><br><span style="color: hsl(120, 100%, 40%);">+ "timestamp", ast_json_timeval(*stasis_message_timestamp(message), NULL),</span><br><span style="color: hsl(120, 100%, 40%);">+ "playback", blob);</span><br><span> }</span><br><span> </span><br><span> STASIS_MESSAGE_TYPE_DEFN(stasis_app_playback_snapshot_type,</span><br><span>diff --git a/res/res_stasis_recording.c b/res/res_stasis_recording.c</span><br><span>index 66203df..c21af2a 100644</span><br><span>--- a/res/res_stasis_recording.c</span><br><span>+++ b/res/res_stasis_recording.c</span><br><span>@@ -91,9 +91,10 @@</span><br><span> return NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- return ast_json_pack("{s: s, s: o}",</span><br><span style="color: hsl(120, 100%, 40%);">+ return ast_json_pack("{s: s, s: o?, s: O}",</span><br><span> "type", type,</span><br><span style="color: hsl(0, 100%, 40%);">- "recording", ast_json_deep_copy(blob));</span><br><span style="color: hsl(120, 100%, 40%);">+ "timestamp", ast_json_timeval(*stasis_message_timestamp(message), NULL),</span><br><span style="color: hsl(120, 100%, 40%);">+ "recording", blob);</span><br><span> }</span><br><span> </span><br><span> STASIS_MESSAGE_TYPE_DEFN(stasis_app_recording_snapshot_type,</span><br><span>diff --git a/res/stasis/app.c b/res/stasis/app.c</span><br><span>index 336dfdc..8e719a1 100644</span><br><span>--- a/res/stasis/app.c</span><br><span>+++ b/res/stasis/app.c</span><br><span>@@ -1164,8 +1164,9 @@</span><br><span> </span><br><span> ast_verb(1, "Replacing Stasis app '%s'\n", app->name);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- msg = ast_json_pack("{s: s, s: s}",</span><br><span style="color: hsl(120, 100%, 40%);">+ msg = ast_json_pack("{s: s, s: o?, s: s}",</span><br><span> "type", "ApplicationReplaced",</span><br><span style="color: hsl(120, 100%, 40%);">+ "timestamp", ast_json_timeval(ast_tvnow(), NULL),</span><br><span> "application", app->name);</span><br><span> if (msg) {</span><br><span> app_send(app, msg);</span><br><span>diff --git a/rest-api/api-docs/events.json b/rest-api/api-docs/events.json</span><br><span>index 6a4fda8..24d5513 100644</span><br><span>--- a/rest-api/api-docs/events.json</span><br><span>+++ b/rest-api/api-docs/events.json</span><br><span>@@ -145,7 +145,7 @@</span><br><span> "timestamp": {</span><br><span> "type": "Date",</span><br><span> "description": "Time at which this event was created.",</span><br><span style="color: hsl(0, 100%, 40%);">- "required": false</span><br><span style="color: hsl(120, 100%, 40%);">+ "required": true</span><br><span> }</span><br><span> },</span><br><span> "subTypes": [</span><br><span>diff --git a/tests/test_res_stasis.c b/tests/test_res_stasis.c</span><br><span>index 634d360..50562bb 100644</span><br><span>--- a/tests/test_res_stasis.c</span><br><span>+++ b/tests/test_res_stasis.c</span><br><span>@@ -168,7 +168,10 @@</span><br><span> res = stasis_app_send(app_name, message);</span><br><span> ast_test_validate(test, 0 == res);</span><br><span> ast_test_validate(test, 1 == app_data1->invocations);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate(test, ast_json_object_get(ast_json_array_get(app_data1->messages, 0), "timestamp")? 1: 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_json_object_del(ast_json_array_get(app_data1->messages, 0), "timestamp");</span><br><span> ast_test_validate(test, ast_json_equal(expected_message1, app_data1->messages));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ast_test_validate(test, 1 == app_data2->invocations);</span><br><span> ast_test_validate(test, ast_json_equal(expected_message2, app_data2->messages));</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11176">change 11176</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11176"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I382c2fef58f5fe107e1074869a6d05310accb41f </div>
<div style="display:none"> Gerrit-Change-Number: 11176 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>