ARI Outbound Websockets

Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws

Code change summary:
* Added an ast_vector_string_join() function,
* Added ApplicationRegistered and ApplicationUnregistered ARI events.
* Converted res/ari/config.c to use sorcery to process ari.conf.
* Added the "outbound-websocket" ARI config object.
* Refactored res/ari/ari_websockets.c to handle outbound websockets.
* Refactored res/ari/cli.c for the sorcery changeover.
* Updated res/res_stasis.c for the sorcery changeover.
* Updated apps/app_stasis.c to allow initiating per-call outbound websockets.
* Added CLI commands to manage ARI websockets.
* Added the new "outbound-websocket" object to ari.conf.sample.
* Moved the ARI XML documentation out of res_ari.c into res/ari/ari_doc.xml

UserNote: Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws
This commit is contained in:
George Joseph
2025-03-28 06:54:21 -06:00
parent 831c961a63
commit 65199303b9
15 changed files with 2948 additions and 963 deletions

View File

@@ -603,6 +603,22 @@ int ast_ari_validate_application_move_failed(struct ast_json *json);
*/
ari_validator ast_ari_validate_application_move_failed_fn(void);
/*!
* \brief Validator for ApplicationRegistered.
*
* Notification that a Stasis app has been registered.
*
* \param json JSON object to validate.
* \retval True (non-zero) if valid.
* \retval False (zero) if invalid.
*/
int ast_ari_validate_application_registered(struct ast_json *json);
/*!
* \brief Function pointer to ast_ari_validate_application_registered().
*/
ari_validator ast_ari_validate_application_registered_fn(void);
/*!
* \brief Validator for ApplicationReplaced.
*
@@ -621,6 +637,22 @@ int ast_ari_validate_application_replaced(struct ast_json *json);
*/
ari_validator ast_ari_validate_application_replaced_fn(void);
/*!
* \brief Validator for ApplicationUnregistered.
*
* Notification that a Stasis app has been unregistered.
*
* \param json JSON object to validate.
* \retval True (non-zero) if valid.
* \retval False (zero) if invalid.
*/
int ast_ari_validate_application_unregistered(struct ast_json *json);
/*!
* \brief Function pointer to ast_ari_validate_application_unregistered().
*/
ari_validator ast_ari_validate_application_unregistered_fn(void);
/*!
* \brief Validator for BridgeAttendedTransfer.
*
@@ -1612,11 +1644,21 @@ ari_validator ast_ari_validate_application_fn(void);
* - args: List[string] (required)
* - channel: Channel (required)
* - destination: string (required)
* ApplicationRegistered
* - asterisk_id: string
* - type: string (required)
* - application: string (required)
* - timestamp: Date (required)
* ApplicationReplaced
* - asterisk_id: string
* - type: string (required)
* - application: string (required)
* - timestamp: Date (required)
* ApplicationUnregistered
* - asterisk_id: string
* - type: string (required)
* - application: string (required)
* - timestamp: Date (required)
* BridgeAttendedTransfer
* - asterisk_id: string
* - type: string (required)