diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/ari.h | 10 | ||||
-rw-r--r-- | include/asterisk/astobj2.h | 2 | ||||
-rw-r--r-- | include/asterisk/autoconfig.h.in | 4 | ||||
-rw-r--r-- | include/asterisk/dns_resolver.h | 4 | ||||
-rw-r--r-- | include/asterisk/http_websocket.h | 10 | ||||
-rw-r--r-- | include/asterisk/logger.h | 44 | ||||
-rw-r--r-- | include/asterisk/rtp_engine.h | 18 | ||||
-rw-r--r-- | include/asterisk/vector.h | 2 |
8 files changed, 81 insertions, 13 deletions
diff --git a/include/asterisk/ari.h b/include/asterisk/ari.h index c3df46a2b..c9f47a6e5 100644 --- a/include/asterisk/ari.h +++ b/include/asterisk/ari.h @@ -188,6 +188,16 @@ 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. * * The refcount is NOT bumped on this object, so ast_json_ref() if you want to diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h index 4a7aeeedd..c28dd2387 100644 --- a/include/asterisk/astobj2.h +++ b/include/asterisk/astobj2.h @@ -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 diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index c0c34736b..17aac1d83 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -548,6 +548,9 @@ /* Define to 1 if CRYPTO has the OpenSSL Elliptic Curve Support feature. */ #undef HAVE_OPENSSL_EC +/* Define if your system has SSL_CTX_set_ecdh_auto declared. */ +#undef HAVE_OPENSSL_ECDH_AUTO + /* Define to 1 if CRYPTO has the OpenSSL SRTP Extension Support feature. */ #undef HAVE_OPENSSL_SRTP @@ -1379,4 +1382,3 @@ #undef volatile #endif - diff --git a/include/asterisk/dns_resolver.h b/include/asterisk/dns_resolver.h index 819ce7a59..2d5f57f13 100644 --- a/include/asterisk/dns_resolver.h +++ b/include/asterisk/dns_resolver.h @@ -90,6 +90,10 @@ void *ast_dns_resolver_get_data(const struct ast_dns_query *query); * \param answer The raw DNS answer * \param answer_size The size of the raw DNS answer * + * Zero-sized and NULL answers are permitted by this function. This may be + * necessary if the query fails at an early stage and no actual DNS response + * has been received from a DNS server. + * * \retval 0 success * \retval -1 failure */ diff --git a/include/asterisk/http_websocket.h b/include/asterisk/http_websocket.h index 5adc08925..23492ff95 100644 --- a/include/asterisk/http_websocket.h +++ b/include/asterisk/http_websocket.h @@ -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 @@ -360,6 +361,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. */ enum ast_websocket_result { diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h index c701d17ce..bf8ce6acf 100644 --- a/include/asterisk/logger.h +++ b/include/asterisk/logger.h @@ -45,6 +45,13 @@ extern "C" { #define AST_CALLID_BUFFER_LENGTH 13 +enum ast_logger_results { + AST_LOGGER_SUCCESS = 0, /*!< Log channel was created or deleted successfully*/ + AST_LOGGER_FAILURE = 1, /*!< Log channel already exists for create or doesn't exist for deletion of log channel */ + AST_LOGGER_DECLINE = -1, /*!< Log channel request was not accepted */ + AST_LOGGER_ALLOC_ERROR = -2 /*!< filename allocation error */ +}; + /*! \brief Used for sending a log message This is the standard logger function. Probably the only way you will invoke it would be something like this: ast_log(AST_LOG_WHATEVER, "Problem with the %s Captain. We should get some more. Will %d be enough?\n", "flux capacitor", 10); @@ -92,6 +99,36 @@ void ast_log_callid(int level, const char *file, int line, const char *function, __attribute__((format(printf, 6, 7))); /*! + * \brief Retrieve the existing log channels + * \param logentry A callback to an updater function + * \param data Data passed into the callback for manipulation + * + * For each of the logging channels, logentry will be executed with the + * channel file name, log type, status of the log, and configuration levels. + * + * \retval 0 on success + * \retval 1 on failure + * \retval -2 on allocation error + */ +int ast_logger_get_channels(int (*logentry)(const char *channel, const char *type, + const char *status, const char *configuration, void *data), void *data); + +/*! + * \brief Create a log channel + * + * \param log_channel Log channel to create + * \param components Logging config levels to add to the log channel + */ +int ast_logger_create_channel(const char *log_channel, const char *components); + +/*! + * \brief Delete the specified log channel + * + * \param log_channel The log channel to delete + */ +int ast_logger_remove_channel(const char *log_channel); + +/*! * \brief Log a backtrace of the current thread's execution stack to the Asterisk log */ void ast_log_backtrace(void); @@ -102,6 +139,13 @@ int logger_reload(void); /*! \brief Reload logger while rotating log files */ int ast_logger_rotate(void); +/*! + * \brief Rotate the specified log channel. + * + * \param log_channel The log channel to rotate + */ +int ast_logger_rotate_channel(const char *log_channel); + void __attribute__((format(printf, 5, 6))) ast_queue_log(const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt, ...); /*! diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index a782c7531..d6a9be574 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -1,4 +1,4 @@ - /* +/* * Asterisk -- An open source telephony toolkit. * * Copyright (C) 1999 - 2009, Digium, Inc. @@ -78,14 +78,13 @@ extern "C" { #include "asterisk/stasis.h" #include "asterisk/vector.h" -/* Maximum number of payloads supported */ -#if defined(LOW_MEMORY) +/*! Maximum number of payload types RTP can support. */ #define AST_RTP_MAX_PT 128 -#else -#define AST_RTP_MAX_PT 196 -#endif -/* Maximum number of generations */ +/*! First dynamic RTP payload type */ +#define AST_RTP_PT_FIRST_DYNAMIC 96 + +/*! Maximum number of generations */ #define AST_RED_MAX_GENERATION 5 /*! @@ -625,7 +624,7 @@ struct ast_rtp_glue { enum ast_rtp_glue_result (*get_trtp_info)(struct ast_channel *chan, struct ast_rtp_instance **instance); /*! Callback for updating the destination that the remote side should send RTP to */ int (*update_peer)(struct ast_channel *chan, struct ast_rtp_instance *instance, struct ast_rtp_instance *vinstance, struct ast_rtp_instance *tinstance, const struct ast_format_cap *cap, int nat_active); - /*! Callback for retrieving codecs that the channel can do. Result returned in result_cap*/ + /*! Callback for retrieving codecs that the channel can do. Result returned in result_cap. */ void (*get_codec)(struct ast_channel *chan, struct ast_format_cap *result_cap); /*! Linked list information */ AST_RWLIST_ENTRY(ast_rtp_glue) entry; @@ -1418,7 +1417,7 @@ unsigned int ast_rtp_lookup_sample_rate2(int asterisk_format, struct ast_format * \code * struct ast_format_cap *astformats = ast_format_cap_alloc_nolock() * int nonastformats; - * ast_rtp_codecs_payload_formats(&codecs, &astformats, &nonastformats); + * ast_rtp_codecs_payload_formats(&codecs, astformats, &nonastformats); * \endcode * * This retrieves all the formats known about in the codecs structure and puts the Asterisk ones in the integer @@ -1449,6 +1448,7 @@ void ast_rtp_codecs_payload_formats(struct ast_rtp_codecs *codecs, struct ast_fo * \since 1.8 */ int ast_rtp_codecs_payload_code(struct ast_rtp_codecs *codecs, int asterisk_format, const struct ast_format *format, int code); + /*! * \brief Search for a payload code in the ast_rtp_codecs structure * diff --git a/include/asterisk/vector.h b/include/asterisk/vector.h index 0a13c560b..be9091272 100644 --- a/include/asterisk/vector.h +++ b/include/asterisk/vector.h @@ -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. |