Skip to content

Commit

Permalink
use routes for websocket script event extensibility
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo committed Oct 3, 2023
1 parent a37cdbb commit 5b17e4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kamailio/websockets-role.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ route[WEBSOCKET_REQUEST]
exit;
}

route_if_exists("WS_ON_BEFORE_HANSHAKE");
routes(WS_ON_BEFORE_HANDSHAKE);

if (ws_handle_handshake()) {
$var(count) = $shtinc(websockets=>$var(ws_orig_ip)::count);
Expand All @@ -237,7 +237,7 @@ route[WEBSOCKET_REQUEST]
} else {
xlog("L_INFO", "opened websocket $ws_conid from $var(ws_orig_ip):$sp\n");
}
route_if_exists("WS_ON_SUCCESSFULL_HANSHAKE");
routes(WS_ON_SUCCESSFULL_HANDSHAKE);
exit;
}

Expand All @@ -259,5 +259,5 @@ event_route[websocket:closed]
xlog("L_INFO", "closed websocket $ws_conid from $var(ws_orig_ip):$sp\n");
}
if ($var(count) < 1) $sht(websockets=>$si::count) = $null;
route_if_exists("WS_ON_CLOSE");
routes(WS_ON_CLOSE);
}

0 comments on commit 5b17e4f

Please sign in to comment.