diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/autoconfig.h.in | 6 | ||||
-rw-r--r-- | include/asterisk/compat.h | 2 | ||||
-rw-r--r-- | include/asterisk/config_options.h | 22 | ||||
-rw-r--r-- | include/asterisk/multicast_rtp.h | 58 | ||||
-rw-r--r-- | include/asterisk/poll-compat.h | 2 | ||||
-rw-r--r-- | include/asterisk/res_hep.h | 8 | ||||
-rw-r--r-- | include/asterisk/res_pjsip.h | 11 | ||||
-rw-r--r-- | include/asterisk/res_pjsip_session.h | 3 | ||||
-rw-r--r-- | include/asterisk/sorcery.h | 14 | ||||
-rw-r--r-- | include/asterisk/stasis.h | 14 | ||||
-rw-r--r-- | include/asterisk/stasis_app.h | 9 | ||||
-rw-r--r-- | include/asterisk/stasis_message_router.h | 14 | ||||
-rw-r--r-- | include/asterisk/taskprocessor.h | 23 |
13 files changed, 180 insertions, 6 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index a01131cc3..64580205c 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -587,6 +587,9 @@ /* Define if your system has pjsip_dlg_create_uas_and_inc_lock declared. */ #undef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK +/* Define if your system has PJSIP_EVSUB_GRP_LOCK */ +#undef HAVE_PJSIP_EVSUB_GRP_LOCK + /* Define if your system has pjsip_endpt_set_ext_resolver declared. */ #undef HAVE_PJSIP_EXTERNAL_RESOLVER @@ -1249,9 +1252,6 @@ /* Define if your system needs braces around PTHREAD_ONCE_INIT */ #undef PTHREAD_ONCE_INIT_NEEDS_BRACES -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h index c9c99c150..c7bc5b093 100644 --- a/include/asterisk/compat.h +++ b/include/asterisk/compat.h @@ -68,7 +68,7 @@ #endif #ifndef AST_POLL_COMPAT -#include <sys/poll.h> +#include <poll.h> #else #include "asterisk/poll-compat.h" #endif diff --git a/include/asterisk/config_options.h b/include/asterisk/config_options.h index 30c042176..30d0c9142 100644 --- a/include/asterisk/config_options.h +++ b/include/asterisk/config_options.h @@ -445,6 +445,28 @@ enum aco_option_type { * {endcode} */ OPT_UINT_T, + + /*! \brief Type for default option handler for bools (ast_true/ast_false) + * \note aco_option_register flags: + * non-zero : process via ast_true + * 0 : process via ast_false + * aco_option_register varargs: + * FLDSET macro with the field of type int. It is important to note that the field + * cannot be a bitfield. If bitfields are required, they must be set via a custom handler. + * + * This is exactly the same as OPT_BOOL_T. The only difference is that when + * translated to a string, OPT_BOOL_T becomes "true" or "false"; OPT_YESNO_T becomes + * "yes" or "no". + * + * Example: + * {code} + * struct test_item { + * int enabled; + * }; + * aco_option_register(&cfg_info, "enabled", ACO_EXACT, my_types, "no", OPT_YESNO_T, 1, FLDSET(struct test_item, enabled)); + * {endcode} + */ + OPT_YESNO_T, }; /*! \brief A callback function for handling a particular option diff --git a/include/asterisk/multicast_rtp.h b/include/asterisk/multicast_rtp.h new file mode 100644 index 000000000..c286c1f96 --- /dev/null +++ b/include/asterisk/multicast_rtp.h @@ -0,0 +1,58 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 2016, Digium, Inc. + * + * Mark Michelson <mmichelson@digium.com> + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +#ifndef MULTICAST_RTP_H_ +#define MULTICAST_RTP_H_ +struct ast_multicast_rtp_options; + +/*! + * \brief Create multicast RTP options. + * + * These are passed to the multicast RTP engine on its creation. + * + * \param type The type of multicast RTP, either "basic" or "linksys" + * \param options Miscellaneous options + * \retval NULL Failure + * \retval non-NULL success + */ +struct ast_multicast_rtp_options *ast_multicast_rtp_create_options(const char *type, + const char *options); + +/*! + * \brief Free multicast RTP options + * + * This function is NULL-tolerant + * + * \param mcast_options Options to free + */ +void ast_multicast_rtp_free_options(struct ast_multicast_rtp_options *mcast_options); + +/*! + * \brief Get format specified in multicast options + * + * Multicast options allow for a format to be selected. + * This function accesses the selected format and creates + * an ast_format structure for it. + * + * \param mcast_options The options where a codec was specified + * \retval NULL No format specified in the options + * \revval non-NULL The format to use for communication + */ +struct ast_format *ast_multicast_rtp_options_get_format(struct ast_multicast_rtp_options *mcast_options); + +#endif /* MULTICAST_RTP_H_ */ diff --git a/include/asterisk/poll-compat.h b/include/asterisk/poll-compat.h index cbb610925..72ac2c3e2 100644 --- a/include/asterisk/poll-compat.h +++ b/include/asterisk/poll-compat.h @@ -83,7 +83,7 @@ #ifndef AST_POLL_COMPAT -#include <sys/poll.h> +#include <poll.h> #define ast_poll(a, b, c) poll(a, b, c) diff --git a/include/asterisk/res_hep.h b/include/asterisk/res_hep.h index bd0129eea..cfd213ad7 100644 --- a/include/asterisk/res_hep.h +++ b/include/asterisk/res_hep.h @@ -118,6 +118,14 @@ int hepv3_send_packet(struct hepv3_capture_info *capture_info); */ enum hep_uuid_type hepv3_get_uuid_type(void); +/*! + * \brief Return whether or not we're currently loaded and active + * + * \retval 0 The module is not loaded + * \retval 1 The module is loaded + */ +int hepv3_is_loaded(void); + #if defined(__cplusplus) || defined(c_plusplus) } #endif diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h index 4319dbdb6..5b830ea2e 100644 --- a/include/asterisk/res_pjsip.h +++ b/include/asterisk/res_pjsip.h @@ -1348,6 +1348,17 @@ struct ast_taskprocessor *ast_sip_create_serializer_group(struct ast_serializer_ struct ast_taskprocessor *ast_sip_create_serializer_group_named(const char *name, struct ast_serializer_shutdown_group *shutdown_group); /*! + * \brief Determine the distributor serializer for the SIP message. + * \since 13.10.0 + * + * \param rdata The incoming message. + * + * \retval Calculated distributor serializer on success. + * \retval NULL on error. + */ +struct ast_taskprocessor *ast_sip_get_distributor_serializer(pjsip_rx_data *rdata); + +/*! * \brief Set a serializer on a SIP dialog so requests and responses are automatically serialized * * Passing a NULL serializer is a way to remove a serializer from a dialog. diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h index 75d37ac3d..e4c54a173 100644 --- a/include/asterisk/res_pjsip_session.h +++ b/include/asterisk/res_pjsip_session.h @@ -406,9 +406,10 @@ struct ast_sip_channel_pvt *ast_sip_channel_pvt_alloc(void *pvt, struct ast_sip_ * \param endpoint The endpoint that this session communicates with * \param contact The contact associated with this session * \param inv_session The PJSIP INVITE session data + * \param rdata INVITE request received (NULL if for outgoing allocation) */ struct ast_sip_session *ast_sip_session_alloc(struct ast_sip_endpoint *endpoint, - struct ast_sip_contact *contact, pjsip_inv_session *inv); + struct ast_sip_contact *contact, pjsip_inv_session *inv, pjsip_rx_data *rdata); /*! * \brief Request and wait for the session serializer to be suspended. diff --git a/include/asterisk/sorcery.h b/include/asterisk/sorcery.h index 5e947257b..0cb434766 100644 --- a/include/asterisk/sorcery.h +++ b/include/asterisk/sorcery.h @@ -692,6 +692,20 @@ int __ast_sorcery_object_register(struct ast_sorcery *sorcery, const char *type, __ast_sorcery_object_register((sorcery), (type), 1, 1, (alloc), (transform), (apply)) /*! + * \brief Set the high and low alert water marks of the sorcery object type. + * \since 13.10.0 + * + * \param sorcery Pointer to a sorcery structure + * \param type Type of object + * \param low_water New queue low water mark. (-1 to set as 90% of high_water) + * \param high_water New queue high water mark. + * + * \retval 0 on success. + * \retval -1 on error (water marks not changed). + */ +int ast_sorcery_object_set_congestion_levels(struct ast_sorcery *sorcery, const char *type, long low_water, long high_water); + +/*! * \brief Set the copy handler for an object type * * \param sorcery Pointer to a sorcery structure diff --git a/include/asterisk/stasis.h b/include/asterisk/stasis.h index 4fc295bc4..de44206b6 100644 --- a/include/asterisk/stasis.h +++ b/include/asterisk/stasis.h @@ -601,6 +601,20 @@ struct stasis_subscription *stasis_unsubscribe( struct stasis_subscription *subscription); /*! + * \brief Set the high and low alert water marks of the stasis subscription. + * \since 13.10.0 + * + * \param subscription Pointer to a stasis subscription + * \param low_water New queue low water mark. (-1 to set as 90% of high_water) + * \param high_water New queue high water mark. + * + * \retval 0 on success. + * \retval -1 on error (water marks not changed). + */ +int stasis_subscription_set_congestion_limits(struct stasis_subscription *subscription, + long low_water, long high_water); + +/*! * \brief Block until the last message is processed on a subscription. * * This function will not return until the \a subscription's callback for the diff --git a/include/asterisk/stasis_app.h b/include/asterisk/stasis_app.h index 90ef82ebf..8ceeffba3 100644 --- a/include/asterisk/stasis_app.h +++ b/include/asterisk/stasis_app.h @@ -746,6 +746,15 @@ int stasis_app_bridge_playback_channel_add(struct ast_bridge *bridge, struct stasis_app_control *control); /*! + * \brief remove channel from list of ARI playback channels for bridges. + * + * \param bridge_id The unique ID of the bridge the playback channel is in. + * \param control The app control structure for the playback channel + */ +void stasis_app_bridge_playback_channel_remove(char *bridge_id, + struct stasis_app_control *control); + +/*! * \brief Result codes used when adding/removing channels to/from bridges. */ enum stasis_app_control_channel_result { diff --git a/include/asterisk/stasis_message_router.h b/include/asterisk/stasis_message_router.h index 89657a5ee..50270a788 100644 --- a/include/asterisk/stasis_message_router.h +++ b/include/asterisk/stasis_message_router.h @@ -127,6 +127,20 @@ void stasis_message_router_publish_sync(struct stasis_message_router *router, struct stasis_message *message); /*! + * \brief Set the high and low alert water marks of the stasis message router. + * \since 13.10.0 + * + * \param router Pointer to a stasis message router + * \param low_water New queue low water mark. (-1 to set as 90% of high_water) + * \param high_water New queue high water mark. + * + * \retval 0 on success. + * \retval -1 on error (water marks not changed). + */ +int stasis_message_router_set_congestion_limits(struct stasis_message_router *router, + long low_water, long high_water); + +/*! * \brief Add a route to a message router. * * A particular \a message_type may have at most one route per \a router. If diff --git a/include/asterisk/taskprocessor.h b/include/asterisk/taskprocessor.h index af3ce747f..e51122269 100644 --- a/include/asterisk/taskprocessor.h +++ b/include/asterisk/taskprocessor.h @@ -59,6 +59,7 @@ struct ast_taskprocessor; /*! \brief Suggested maximum taskprocessor name length (less null terminator). */ #define AST_TASKPROCESSOR_MAX_NAME 45 +/*! Default taskprocessor high water level alert trigger */ #define AST_TASKPROCESSOR_HIGH_WATER_LEVEL 500 /*! @@ -297,4 +298,26 @@ const char *ast_taskprocessor_name(struct ast_taskprocessor *tps); */ long ast_taskprocessor_size(struct ast_taskprocessor *tps); +/*! + * \brief Get the current taskprocessor high water alert count. + * \since 13.10.0 + * + * \retval 0 if no taskprocessors are in high water alert. + * \retval non-zero if some task processors are in high water alert. + */ +unsigned int ast_taskprocessor_alert_get(void); + +/*! + * \brief Set the high and low alert water marks of the given taskprocessor queue. + * \since 13.10.0 + * + * \param tps Taskprocessor to update queue water marks. + * \param low_water New queue low water mark. (-1 to set as 90% of high_water) + * \param high_water New queue high water mark. + * + * \retval 0 on success. + * \retval -1 on error (water marks not changed). + */ +int ast_taskprocessor_alert_set_levels(struct ast_taskprocessor *tps, long low_water, long high_water); + #endif /* __AST_TASKPROCESSOR_H__ */ |