|
|
|
@ -430,6 +430,11 @@ static int unload_module(void)
|
|
|
|
|
static int load_module(void)
|
|
|
|
|
{
|
|
|
|
|
int res = 0;
|
|
|
|
|
|
|
|
|
|
CHECK_ARI_MODULE_LOADED();
|
|
|
|
|
|
|
|
|
|
/* This is scoped to not conflict with CHECK_ARI_MODULE_LOADED */
|
|
|
|
|
{
|
|
|
|
|
struct ast_websocket_protocol *protocol;
|
|
|
|
|
|
|
|
|
|
if (ast_ari_websocket_events_event_websocket_init() == -1) {
|
|
|
|
@ -452,6 +457,8 @@ static int load_module(void)
|
|
|
|
|
protocol->session_attempted = ast_ari_events_event_websocket_ws_attempted_cb;
|
|
|
|
|
protocol->session_established = ast_ari_events_event_websocket_ws_established_cb;
|
|
|
|
|
res |= ast_websocket_server_add_protocol2(events.ws_server, protocol);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stasis_app_ref();
|
|
|
|
|
res |= ast_ari_add_handler(&events);
|
|
|
|
|
if (res) {
|
|
|
|
|