diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/_private.h | 8 | ||||
-rw-r--r-- | include/asterisk/features.h | 71 | ||||
-rw-r--r-- | include/asterisk/parking.h | 5 | ||||
-rw-r--r-- | include/asterisk/pickup.h | 91 |
4 files changed, 100 insertions, 75 deletions
diff --git a/include/asterisk/_private.h b/include/asterisk/_private.h index 942747357..b1f6bd471 100644 --- a/include/asterisk/_private.h +++ b/include/asterisk/_private.h @@ -8,7 +8,7 @@ * * \brief * Prototypes for public functions only of internal interest, - * + * */ @@ -25,7 +25,7 @@ int astdb_init(void); /*!< Provided by db.c */ void ast_channels_init(void); /*!< Provided by channel.c */ void ast_builtins_init(void); /*!< Provided by cli.c */ int ast_cli_perms_init(int reload); /*!< Provided by cli.c */ -int dnsmgr_init(void); /*!< Provided by dnsmgr.c */ +int dnsmgr_init(void); /*!< Provided by dnsmgr.c */ void dnsmgr_start_refresh(void); /*!< Provided by dnsmgr.c */ int dnsmgr_reload(void); /*!< Provided by dnsmgr.c */ void threadstorage_init(void); /*!< Provided by threadstorage.c */ @@ -109,9 +109,9 @@ enum ast_module_reload_result ast_module_reload(const char *name); */ void ast_process_pending_reloads(void); -/*! \brief Load XML documentation. Provided by xmldoc.c +/*! \brief Load XML documentation. Provided by xmldoc.c * \retval 1 on error. - * \retval 0 on success. + * \retval 0 on success. */ int ast_xmldoc_load_documentation(void); diff --git a/include/asterisk/features.h b/include/asterisk/features.h index 43edca07a..9430bc4cb 100644 --- a/include/asterisk/features.h +++ b/include/asterisk/features.h @@ -28,30 +28,6 @@ #include "asterisk/linkedlists.h" #include "asterisk/bridge.h" -#define FEATURE_MAX_LEN 11 -#define FEATURE_APP_LEN 64 -#define FEATURE_APP_ARGS_LEN 256 -#define FEATURE_SNAME_LEN 32 -#define FEATURE_EXTEN_LEN 32 -#define FEATURE_MOH_LEN 80 /* same as MAX_MUSICCLASS from channel.h */ - -#define DEFAULT_PARKINGLOT "default" /*!< Default parking lot */ - -#define AST_FEATURE_RETURN_HANGUP -1 -#define AST_FEATURE_RETURN_SUCCESSBREAK 0 -#define AST_FEATURE_RETURN_PBX_KEEPALIVE AST_PBX_KEEPALIVE -#define AST_FEATURE_RETURN_NO_HANGUP_PEER AST_PBX_NO_HANGUP_PEER -#define AST_FEATURE_RETURN_PASSDIGITS 21 -#define AST_FEATURE_RETURN_STOREDIGITS 22 -#define AST_FEATURE_RETURN_SUCCESS 23 -#define AST_FEATURE_RETURN_KEEPTRYING 24 -#define AST_FEATURE_RETURN_PARKFAILED 25 - -#define FEATURE_SENSE_CHAN (1 << 0) -#define FEATURE_SENSE_PEER (1 << 1) - -typedef int (*ast_feature_operation)(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, const char *code, int sense, void *data); - /*! \brief main call feature structure */ enum { @@ -93,54 +69,7 @@ int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer,struct as int ast_bridge_add_channel(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_bridge_features *features, int play_tone, const char *xfersound); -/*! - * \brief Test if a channel can be picked up. - * - * \param chan Channel to test if can be picked up. - * - * \note This function assumes that chan is locked. - * - * \return TRUE if channel can be picked up. - */ -int ast_can_pickup(struct ast_channel *chan); - -/*! - * \brief Find a pickup channel target by group. - * - * \param chan channel that initiated pickup. - * - * \retval target on success. The returned channel is locked and reffed. - * \retval NULL on error. - */ -struct ast_channel *ast_pickup_find_by_group(struct ast_channel *chan); - -/*! \brief Pickup a call */ -int ast_pickup_call(struct ast_channel *chan); - -/*! - * \brief Pickup a call target. - * - * \param chan channel that initiated pickup. - * \param target channel to be picked up. - * - * \note This function assumes that target is locked. - * - * \retval 0 on success. - * \retval -1 on failure. - */ -int ast_do_pickup(struct ast_channel *chan, struct ast_channel *target); - -/*! - * \brief accessor for call pickup message type - * \since 12.0.0 - * - * \retval pointer to the stasis message type - * \retval NULL if not initialized - */ -struct stasis_message_type *ast_call_pickup_type(void); -/*! \brief Reload call features from features.conf */ -int ast_features_reload(void); /*! * \brief parse L option and read associated channel variables to set warning, warning frequency, and timelimit diff --git a/include/asterisk/parking.h b/include/asterisk/parking.h index a835d104a..b9c80d43c 100644 --- a/include/asterisk/parking.h +++ b/include/asterisk/parking.h @@ -31,6 +31,11 @@ #define PARK_APPLICATION "Park" /*! + * \brief The default parking lot + */ +#define DEFAULT_PARKINGLOT "default" + +/*! * \brief Defines the type of parked call message being published * \since 12 */ diff --git a/include/asterisk/pickup.h b/include/asterisk/pickup.h new file mode 100644 index 000000000..de5c8961e --- /dev/null +++ b/include/asterisk/pickup.h @@ -0,0 +1,91 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 1999 - 2013, Digium, Inc. + * + * Matt Jordan <mjordan@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. + */ + +/*! + * \file + * \brief Call Pickup API + * + * Includes code and algorithms from the Zapata library. + * + */ + +#ifndef _AST_FEATURES_H +#define _AST_FEATURES_H + +/*! + * \brief Test if a channel can be picked up. + * + * \param chan Channel to test if can be picked up. + * + * \note This function assumes that chan is locked. + * + * \return TRUE if channel can be picked up. + */ +int ast_can_pickup(struct ast_channel *chan); + +/*! + * \brief Find a pickup channel target by group. + * + * \param chan channel that initiated pickup. + * + * \retval target on success. The returned channel is locked and reffed. + * \retval NULL on error. + */ +struct ast_channel *ast_pickup_find_by_group(struct ast_channel *chan); + +/*! + * \brief Pickup a call + * + * \param chan The channel that initiated the pickup + * + * \retval 0 on success + * \retval -1 on failure + */ +int ast_pickup_call(struct ast_channel *chan); + +/*! + * \brief Pickup a call target. + * + * \param chan channel that initiated pickup. + * \param target channel to be picked up. + * + * \note This function assumes that target is locked. + * + * \retval 0 on success. + * \retval -1 on failure. + */ +int ast_do_pickup(struct ast_channel *chan, struct ast_channel *target); + +/*! + * \brief accessor for call pickup message type + * \since 12.0.0 + * + * \retval pointer to the stasis message type + * \retval NULL if not initialized + */ +struct stasis_message_type *ast_call_pickup_type(void); + +/*! + * \brief Initialize pickup + * + * \retval 0 on success + * \retval non-zero on failure + */ +int ast_pickup_init(void); + +#endif /* _AST_FEATURES_H */ |