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

(cherry picked from commit 87097b3dd1)
This commit is contained in:
George Joseph
2025-03-28 06:54:21 -06:00
parent 32e749517f
commit b1f6c7689c
15 changed files with 2948 additions and 963 deletions

View File

@@ -169,6 +169,8 @@
"RecordingFinished",
"RecordingFailed",
"ApplicationMoveFailed",
"ApplicationRegistered",
"ApplicationUnregistered",
"ApplicationReplaced",
"BridgeCreated",
"BridgeDestroyed",
@@ -366,6 +368,16 @@
}
}
},
"ApplicationRegistered": {
"id": "ApplicationRegistered",
"description": "Notification that a Stasis app has been registered.",
"properties": {}
},
"ApplicationUnregistered": {
"id": "ApplicationUnregistered",
"description": "Notification that a Stasis app has been unregistered.",
"properties": {}
},
"ApplicationReplaced": {
"id": "ApplicationReplaced",
"description": "Notification that another WebSocket has taken over for an application.\n\nAn application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.",