ari: Provide the caller ID RDNIS for the channels

Provide the caller ID RDNIS when available. This will allow an
application to follow the redirect.
This commit is contained in:
Holger Hans Peter Freyther
2023-10-14 15:48:10 +08:00
parent d1f8978d91
commit 3c9e7ad4ba
4 changed files with 18 additions and 0 deletions

View File

@@ -1067,6 +1067,15 @@ int ast_ari_validate_channel(struct ast_json *json)
res = 0;
}
} else
if (strcmp("caller_rdnis", 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 Channel field caller_rdnis failed validation\n");
res = 0;
}
} else
if (strcmp("channelvars", ast_json_object_iter_key(iter)) == 0) {
int prop_is_valid;
prop_is_valid = ast_ari_validate_object(

View File

@@ -1346,6 +1346,7 @@ ari_validator ast_ari_validate_application_fn(void);
* Channel
* - accountcode: string (required)
* - caller: CallerID (required)
* - caller_rdnis: string
* - channelvars: object
* - connected: CallerID (required)
* - creationtime: Date (required)