mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-05 04:32:44 +00:00
ARI: Add the ability to subscribe to all events
This patch adds the ability to subscribe to all events. There are two possible ways to accomplish this: (1) On initial WebSocket connection. This patch adds a new query parameter, 'subscribeAll'. If present and True, Asterisk will subscribe the applications to all ARI events. (2) Via the applications resource. When subscribing in this manner, an ARI client should merely specify a blank resource name, i.e., 'channels:' instead of 'channels:12354'. This will subscribe the application to all resources of the 'channels' type. ASTERISK-24870 #close Change-Id: I4a943b4db24442cf28bc64b24bfd541249790ad6
This commit is contained in:
@@ -91,6 +91,21 @@ struct ao2_container *stasis_app_get_all(void);
|
||||
*/
|
||||
int stasis_app_register(const char *app_name, stasis_app_cb handler, void *data);
|
||||
|
||||
/*!
|
||||
* \brief Register a new Stasis application that receives all Asterisk events.
|
||||
*
|
||||
* If an application is already registered with the given name, the old
|
||||
* application is sent a 'replaced' message and unregistered.
|
||||
*
|
||||
* \param app_name Name of this application.
|
||||
* \param handler Callback for application messages.
|
||||
* \param data Data blob to pass to the callback. Must be AO2 managed.
|
||||
*
|
||||
* \return 0 for success
|
||||
* \return -1 for error.
|
||||
*/
|
||||
int stasis_app_register_all(const char *app_name, stasis_app_cb handler, void *data);
|
||||
|
||||
/*!
|
||||
* \brief Unregister a Stasis application.
|
||||
* \param app_name Name of the application to unregister.
|
||||
|
Reference in New Issue
Block a user