|
|
|
@ -1941,6 +1941,15 @@ int ast_ari_validate_application_replaced(struct ast_json *json)
|
|
|
|
|
int has_application = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ApplicationReplaced field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2009,6 +2018,15 @@ int ast_ari_validate_bridge_attended_transfer(struct ast_json *json)
|
|
|
|
|
int has_transferer_second_leg = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI BridgeAttendedTransfer field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2251,6 +2269,15 @@ int ast_ari_validate_bridge_blind_transfer(struct ast_json *json)
|
|
|
|
|
int has_result = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI BridgeBlindTransfer field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2417,6 +2444,15 @@ int ast_ari_validate_bridge_created(struct ast_json *json)
|
|
|
|
|
int has_bridge = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI BridgeCreated field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2496,6 +2532,15 @@ int ast_ari_validate_bridge_destroyed(struct ast_json *json)
|
|
|
|
|
int has_bridge = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI BridgeDestroyed field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2576,6 +2621,15 @@ int ast_ari_validate_bridge_merged(struct ast_json *json)
|
|
|
|
|
int has_bridge_from = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI BridgeMerged field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2672,6 +2726,15 @@ int ast_ari_validate_channel_caller_id(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelCallerId field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2781,6 +2844,15 @@ int ast_ari_validate_channel_connected_line(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelConnectedLine field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2860,6 +2932,15 @@ int ast_ari_validate_channel_created(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelCreated field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -2941,6 +3022,15 @@ int ast_ari_validate_channel_destroyed(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelDestroyed field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3052,6 +3142,15 @@ int ast_ari_validate_channel_dialplan(struct ast_json *json)
|
|
|
|
|
int has_dialplan_app_data = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelDialplan field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3163,6 +3262,15 @@ int ast_ari_validate_channel_dtmf_received(struct ast_json *json)
|
|
|
|
|
int has_duration_ms = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelDtmfReceived field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3272,6 +3380,15 @@ int ast_ari_validate_channel_entered_bridge(struct ast_json *json)
|
|
|
|
|
int has_bridge = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelEnteredBridge field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3360,6 +3477,15 @@ int ast_ari_validate_channel_hangup_request(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelHangupRequest field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3457,6 +3583,15 @@ int ast_ari_validate_channel_hold(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelHold field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3546,6 +3681,15 @@ int ast_ari_validate_channel_left_bridge(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelLeftBridge field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3640,6 +3784,15 @@ int ast_ari_validate_channel_state_change(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelStateChange field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3720,6 +3873,15 @@ int ast_ari_validate_channel_talking_finished(struct ast_json *json)
|
|
|
|
|
int has_duration = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelTalkingFinished field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3814,6 +3976,15 @@ int ast_ari_validate_channel_talking_started(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelTalkingStarted field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3893,6 +4064,15 @@ int ast_ari_validate_channel_unhold(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelUnhold field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -3973,6 +4153,15 @@ int ast_ari_validate_channel_userevent(struct ast_json *json)
|
|
|
|
|
int has_userevent = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelUserevent field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -4095,6 +4284,15 @@ int ast_ari_validate_channel_varset(struct ast_json *json)
|
|
|
|
|
int has_variable = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ChannelVarset field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -4278,6 +4476,15 @@ int ast_ari_validate_contact_status_change(struct ast_json *json)
|
|
|
|
|
int has_endpoint = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI ContactStatusChange field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -4372,6 +4579,15 @@ int ast_ari_validate_device_state_changed(struct ast_json *json)
|
|
|
|
|
int has_device_state = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI DeviceStateChanged field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -4452,6 +4668,15 @@ int ast_ari_validate_dial(struct ast_json *json)
|
|
|
|
|
int has_peer = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI Dial field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -4582,6 +4807,15 @@ int ast_ari_validate_endpoint_state_change(struct ast_json *json)
|
|
|
|
|
int has_endpoint = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI EndpointStateChange field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -4784,6 +5018,15 @@ int ast_ari_validate_event(struct ast_json *json)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI Event field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -4976,6 +5219,15 @@ int ast_ari_validate_message(struct ast_json *json)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI Message field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5015,6 +5267,15 @@ int ast_ari_validate_missing_params(struct ast_json *json)
|
|
|
|
|
int has_params = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI MissingParams field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5146,6 +5407,15 @@ int ast_ari_validate_peer_status_change(struct ast_json *json)
|
|
|
|
|
int has_peer = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI PeerStatusChange field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5319,6 +5589,15 @@ int ast_ari_validate_playback_finished(struct ast_json *json)
|
|
|
|
|
int has_playback = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI PlaybackFinished field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5398,6 +5677,15 @@ int ast_ari_validate_playback_started(struct ast_json *json)
|
|
|
|
|
int has_playback = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI PlaybackStarted field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5477,6 +5765,15 @@ int ast_ari_validate_recording_failed(struct ast_json *json)
|
|
|
|
|
int has_recording = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI RecordingFailed field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5556,6 +5853,15 @@ int ast_ari_validate_recording_finished(struct ast_json *json)
|
|
|
|
|
int has_recording = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI RecordingFinished field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5635,6 +5941,15 @@ int ast_ari_validate_recording_started(struct ast_json *json)
|
|
|
|
|
int has_recording = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI RecordingStarted field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5714,6 +6029,15 @@ int ast_ari_validate_stasis_end(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI StasisEnd field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5794,6 +6118,15 @@ int ast_ari_validate_stasis_start(struct ast_json *json)
|
|
|
|
|
int has_channel = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI StasisStart field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
@ -5898,6 +6231,15 @@ int ast_ari_validate_text_message_received(struct ast_json *json)
|
|
|
|
|
int has_message = 0;
|
|
|
|
|
|
|
|
|
|
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
|
|
|
|
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
prop_is_valid = ast_ari_validate_string(
|
|
|
|
|
ast_json_object_iter_value(iter));
|
|
|
|
|
if (!prop_is_valid) {
|
|
|
|
|
ast_log(LOG_ERROR, "ARI TextMessageReceived field asterisk_id failed validation\n");
|
|
|
|
|
res = 0;
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
|
|
|
|
int prop_is_valid;
|
|
|
|
|
has_type = 1;
|
|
|
|
|