mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-28 00:10:25 -07:00
Merge "ARI: Channels added to Stasis application during WebSocket creation ..."
This commit is contained in:
@@ -187,6 +187,16 @@ struct ast_json *ast_ari_websocket_session_read(
|
||||
int ast_ari_websocket_session_write(struct ast_ari_websocket_session *session,
|
||||
struct ast_json *message);
|
||||
|
||||
/*!
|
||||
* \brief Get the Session ID for an ARI WebSocket.
|
||||
*
|
||||
* \param session Session to query.
|
||||
* \return Session ID.
|
||||
* \return \c NULL on error.
|
||||
*/
|
||||
const char *ast_ari_websocket_session_id(
|
||||
const struct ast_ari_websocket_session *session);
|
||||
|
||||
/*!
|
||||
* \brief The stock message to return when out of memory.
|
||||
*
|
||||
|
||||
@@ -1642,7 +1642,7 @@ void *__ao2_unlink(struct ao2_container *c, void *obj, int flags,
|
||||
* The use of flags argument is the follow:
|
||||
*
|
||||
* OBJ_UNLINK unlinks the object found
|
||||
* OBJ_NODATA on match, do return an object
|
||||
* OBJ_NODATA on match, do not return an object
|
||||
* Callbacks use OBJ_NODATA as a default
|
||||
* functions such as find() do
|
||||
* OBJ_MULTIPLE return multiple matches
|
||||
|
||||
@@ -77,13 +77,14 @@ struct ast_websocket;
|
||||
* \param ser The TCP/TLS session
|
||||
* \param parameters Parameters extracted from the request URI
|
||||
* \param headers Headers included in the request
|
||||
* \param session_id The id of the current session.
|
||||
*
|
||||
* \retval 0 The session should be accepted
|
||||
* \retval -1 The session should be rejected. Note that the caller must send an error
|
||||
* response using \ref ast_http_error.
|
||||
* \since 13.5.0
|
||||
*/
|
||||
typedef int (*ast_websocket_pre_callback)(struct ast_tcptls_session_instance *ser, struct ast_variable *parameters, struct ast_variable *headers);
|
||||
typedef int (*ast_websocket_pre_callback)(struct ast_tcptls_session_instance *ser, struct ast_variable *parameters, struct ast_variable *headers, const char *session_id);
|
||||
|
||||
/*!
|
||||
* \brief Callback for when a new connection for a sub-protocol is established
|
||||
@@ -359,6 +360,13 @@ AST_OPTIONAL_API(int, ast_websocket_is_secure, (struct ast_websocket *session),
|
||||
*/
|
||||
AST_OPTIONAL_API(int, ast_websocket_set_nonblock, (struct ast_websocket *session), { errno = ENOSYS; return -1;});
|
||||
|
||||
/*!
|
||||
* \brief Get the session ID for a WebSocket session.
|
||||
*
|
||||
* \retval session id
|
||||
*/
|
||||
AST_OPTIONAL_API(const char *, ast_websocket_session_id, (struct ast_websocket *session), { errno = ENOSYS; return NULL;});
|
||||
|
||||
/*!
|
||||
* \brief Result code for a websocket client.
|
||||
*/
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
/*!
|
||||
* \brief Deallocates this vector.
|
||||
*
|
||||
* If any code to free the elements of this vector need to be run, that should
|
||||
* If any code to free the elements of this vector needs to be run, that should
|
||||
* be done prior to this call.
|
||||
*
|
||||
* \param vec Vector to deallocate.
|
||||
|
||||
Reference in New Issue
Block a user