mirror of
https://github.com/asterisk/asterisk.git
synced 2026-04-29 18:23:11 +00:00
app_macro: Remove deprecated module.
For most modules that interacted with app_macro, this change is limited to no longer looking for the current context from the macrocontext when set. Additionally, the following modules are impacted: app_dial - no longer supports M^ connected/redirecting macro app_minivm - samples written using macro will no longer work. The sample needs a re-write app_queue - can no longer a macro on the called party's channel. Use gosub which is currently supported ccss - no callback macro, gosub only app_voicemail - no macro support channel - remove macrocontext and priority, no connected line or redirection macro options options - stdexten is deprecated to gosub as the default and only pbx - removed macrolock pbx_dundi - no longer look for macro snmp - removed macro context, exten, and priority ASTERISK-30304 Change-Id: I830daab293117179b8d61bd4df0d971a1b3d07f6
This commit is contained in:
committed by
Friendly Automation
parent
6ecec51e6a
commit
e8f548c155
@@ -95,9 +95,7 @@ struct ast_vm_recording_data {
|
||||
AST_STRING_FIELD(folder);
|
||||
AST_STRING_FIELD(recording_file);
|
||||
AST_STRING_FIELD(recording_ext);
|
||||
|
||||
AST_STRING_FIELD(call_context);
|
||||
AST_STRING_FIELD(call_macrocontext);
|
||||
AST_STRING_FIELD(call_extension);
|
||||
AST_STRING_FIELD(call_callerchan);
|
||||
AST_STRING_FIELD(call_callerid);
|
||||
@@ -161,50 +159,6 @@ int ast_app_getdata_terminator(struct ast_channel *c, const char *prompt, char *
|
||||
/*! \brief Full version with audiofd and controlfd. NOTE: returns '2' on ctrlfd available, not '1' like other full functions */
|
||||
int ast_app_getdata_full(struct ast_channel *c, const char *prompt, char *s, int maxlen, int timeout, int audiofd, int ctrlfd);
|
||||
|
||||
/*!
|
||||
* \brief Run a macro on a channel, placing an optional second channel into autoservice.
|
||||
* \since 11.0
|
||||
*
|
||||
* \details
|
||||
* This is a shorthand method that makes it very easy to run a
|
||||
* macro on any given channel. It is perfectly reasonable to
|
||||
* supply a NULL autoservice_chan here in case there is no
|
||||
* channel to place into autoservice.
|
||||
*
|
||||
* \note Absolutely _NO_ channel locks should be held before calling this function.
|
||||
*
|
||||
* \param autoservice_chan A channel to place into autoservice while the macro is run
|
||||
* \param macro_chan Channel to execute macro on.
|
||||
* \param macro_args Macro application argument string.
|
||||
*
|
||||
* \retval 0 success
|
||||
* \retval -1 on error
|
||||
*/
|
||||
int ast_app_exec_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const char *macro_args);
|
||||
|
||||
/*!
|
||||
* \since 1.8
|
||||
* \brief Run a macro on a channel, placing an optional second channel into autoservice.
|
||||
*
|
||||
* \details
|
||||
* This is a shorthand method that makes it very easy to run a
|
||||
* macro on any given channel. It is perfectly reasonable to
|
||||
* supply a NULL autoservice_chan here in case there is no
|
||||
* channel to place into autoservice.
|
||||
*
|
||||
* \note Absolutely _NO_ channel locks should be held before calling this function.
|
||||
*
|
||||
* \param autoservice_chan A channel to place into autoservice while the macro is run
|
||||
* \param macro_chan Channel to execute macro on.
|
||||
* \param macro_name The name of the macro to run.
|
||||
* \param macro_args The arguments to pass to the macro.
|
||||
*
|
||||
* \retval 0 success
|
||||
* \retval -1 on error
|
||||
*/
|
||||
int ast_app_run_macro(struct ast_channel *autoservice_chan,
|
||||
struct ast_channel *macro_chan, const char *macro_name, const char *macro_args);
|
||||
|
||||
/*!
|
||||
* \brief Stack applications callback functions.
|
||||
*/
|
||||
|
||||
@@ -362,22 +362,6 @@ unsigned int ast_get_cc_max_monitors(struct ast_cc_config_params *config);
|
||||
*/
|
||||
void ast_set_cc_max_monitors(struct ast_cc_config_params *config, unsigned int value);
|
||||
|
||||
/*!
|
||||
* \since 1.8
|
||||
* \brief Get the name of the callback_macro
|
||||
* \param config The configuration to retrieve the callback_macro from
|
||||
* \return The callback_macro name
|
||||
*/
|
||||
const char *ast_get_cc_callback_macro(struct ast_cc_config_params *config);
|
||||
|
||||
/*!
|
||||
* \since 1.8
|
||||
* \brief Set the callback_macro name
|
||||
* \param config The configuration to set the callback_macro on
|
||||
* \param value The new callback macro we want to change to
|
||||
*/
|
||||
void ast_set_cc_callback_macro(struct ast_cc_config_params *config, const char * const value);
|
||||
|
||||
/*!
|
||||
* \since 11
|
||||
* \brief Get the name of the callback subroutine
|
||||
|
||||
@@ -3847,37 +3847,6 @@ void ast_channel_update_redirecting(struct ast_channel *chan, const struct ast_p
|
||||
*/
|
||||
void ast_channel_queue_redirecting_update(struct ast_channel *chan, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update);
|
||||
|
||||
/*!
|
||||
* \since 1.8
|
||||
* \brief Run a connected line interception macro and update a channel's connected line
|
||||
* information
|
||||
* \deprecated You should use the ast_channel_connected_line_sub() function instead.
|
||||
*
|
||||
* Whenever we want to update a channel's connected line information, we may need to run
|
||||
* a macro so that an administrator can manipulate the information before sending it
|
||||
* out. This function both runs the macro and sends the update to the channel.
|
||||
*
|
||||
* \param autoservice_chan Channel to place into autoservice while the macro is running.
|
||||
* It is perfectly safe for this to be NULL
|
||||
* \param macro_chan The channel to run the macro on. Also the channel from which we
|
||||
* determine which macro we need to run.
|
||||
* \param connected_info Either an ast_party_connected_line or ast_frame pointer of type
|
||||
* AST_CONTROL_CONNECTED_LINE
|
||||
* \param is_caller If true, then run CONNECTED_LINE_CALLER_SEND_MACRO with arguments from
|
||||
* CONNECTED_LINE_CALLER_SEND_MACRO_ARGS, otherwise run CONNECTED_LINE_CALLEE_SEND_MACRO
|
||||
* with arguments from CONNECTED_LINE_CALLEE_SEND_MACRO_ARGS
|
||||
* \param frame If true, then connected_info is an ast_frame pointer, otherwise it is an
|
||||
* ast_party_connected_line pointer.
|
||||
* \retval 0 Success
|
||||
* \retval -1 Either the macro does not exist, or there was an error while attempting to
|
||||
* run the macro
|
||||
*
|
||||
* \todo Have multiple return codes based on the MACRO_RESULT
|
||||
* \todo Make constants so that caller and frame can be more expressive than just '1' and
|
||||
* '0'
|
||||
*/
|
||||
int ast_channel_connected_line_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const void *connected_info, int is_caller, int frame);
|
||||
|
||||
/*!
|
||||
* \since 11
|
||||
* \brief Run a connected line interception subroutine and update a channel's connected line
|
||||
@@ -3902,38 +3871,6 @@ int ast_channel_connected_line_macro(struct ast_channel *autoservice_chan, struc
|
||||
*/
|
||||
int ast_channel_connected_line_sub(struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const void *connected_info, int frame);
|
||||
|
||||
/*!
|
||||
* \since 1.8
|
||||
* \brief Run a redirecting interception macro and update a channel's redirecting information
|
||||
* \deprecated You should use the ast_channel_redirecting_sub() function instead.
|
||||
*
|
||||
* \details
|
||||
* Whenever we want to update a channel's redirecting information, we may need to run
|
||||
* a macro so that an administrator can manipulate the information before sending it
|
||||
* out. This function both runs the macro and sends the update to the channel.
|
||||
*
|
||||
* \param autoservice_chan Channel to place into autoservice while the macro is running.
|
||||
* It is perfectly safe for this to be NULL
|
||||
* \param macro_chan The channel to run the macro on. Also the channel from which we
|
||||
* determine which macro we need to run.
|
||||
* \param redirecting_info Either an ast_party_redirecting or ast_frame pointer of type
|
||||
* AST_CONTROL_REDIRECTING
|
||||
* \param is_caller If true, then run REDIRECTING_CALLER_SEND_MACRO with arguments from
|
||||
* REDIRECTING_CALLER_SEND_MACRO_ARGS, otherwise run REDIRECTING_CALLEE_SEND_MACRO with
|
||||
* arguments from REDIRECTING_CALLEE_SEND_MACRO_ARGS
|
||||
* \param is_frame If true, then redirecting_info is an ast_frame pointer, otherwise it is an
|
||||
* ast_party_redirecting pointer.
|
||||
*
|
||||
* \retval 0 Success
|
||||
* \retval -1 Either the macro does not exist, or there was an error while attempting to
|
||||
* run the macro
|
||||
*
|
||||
* \todo Have multiple return codes based on the MACRO_RESULT
|
||||
* \todo Make constants so that caller and frame can be more expressive than just '1' and
|
||||
* '0'
|
||||
*/
|
||||
int ast_channel_redirecting_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const void *redirecting_info, int is_caller, int is_frame);
|
||||
|
||||
/*!
|
||||
* \since 11
|
||||
* \brief Run a redirecting interception subroutine and update a channel's redirecting information
|
||||
@@ -4168,10 +4105,6 @@ void ast_channel_context_set(struct ast_channel *chan, const char *value);
|
||||
const char *ast_channel_lastexten(const struct ast_channel *chan);
|
||||
const char *ast_channel_exten(const struct ast_channel *chan);
|
||||
void ast_channel_exten_set(struct ast_channel *chan, const char *value);
|
||||
const char *ast_channel_macrocontext(const struct ast_channel *chan);
|
||||
void ast_channel_macrocontext_set(struct ast_channel *chan, const char *value);
|
||||
const char *ast_channel_macroexten(const struct ast_channel *chan);
|
||||
void ast_channel_macroexten_set(struct ast_channel *chan, const char *value);
|
||||
|
||||
char ast_channel_dtmf_digit_to_emulate(const struct ast_channel *chan);
|
||||
void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value);
|
||||
@@ -4191,8 +4124,6 @@ int ast_channel_fdno(const struct ast_channel *chan);
|
||||
void ast_channel_fdno_set(struct ast_channel *chan, int value);
|
||||
int ast_channel_hangupcause(const struct ast_channel *chan);
|
||||
void ast_channel_hangupcause_set(struct ast_channel *chan, int value);
|
||||
int ast_channel_macropriority(const struct ast_channel *chan);
|
||||
void ast_channel_macropriority_set(struct ast_channel *chan, int value);
|
||||
int ast_channel_priority(const struct ast_channel *chan);
|
||||
void ast_channel_priority_set(struct ast_channel *chan, int value);
|
||||
int ast_channel_rings(const struct ast_channel *chan);
|
||||
|
||||
@@ -157,7 +157,6 @@ struct ast_context {
|
||||
struct ast_ignorepat *ignorepats; /*!< Patterns for which to continue playing dialtone */
|
||||
const char *registrar; /*!< Registrar */
|
||||
AST_LIST_HEAD_NOLOCK(, ast_sw) alts; /*!< Alternative switches */
|
||||
ast_mutex_t macrolock; /*!< A lock to implement "exclusive" macros - held whilst a call is executing in the macro */
|
||||
char name[0]; /*!< Name of the context */
|
||||
};
|
||||
|
||||
|
||||
@@ -114,8 +114,6 @@ enum ast_option_flags {
|
||||
#define ast_opt_no_color ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR)
|
||||
#define ast_fully_booted ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)
|
||||
#define ast_opt_transcode_via_slin ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN)
|
||||
/*! Invoke the stdexten using the legacy macro method. */
|
||||
#define ast_opt_stdexten_macro ast_test_flag(&ast_options, AST_OPT_FLAG_STDEXTEN_MACRO)
|
||||
#define ast_opt_dump_core ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE)
|
||||
#define ast_opt_cache_record_files ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES)
|
||||
#define ast_opt_cache_media_frames ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_MEDIA_FRAMES)
|
||||
|
||||
@@ -1123,30 +1123,6 @@ int ast_rdlock_context(struct ast_context *con);
|
||||
*/
|
||||
int ast_unlock_context(struct ast_context *con);
|
||||
|
||||
/*!
|
||||
* \brief locks the macrolock in the given context
|
||||
*
|
||||
* \param macrocontext name of the macro-context to lock
|
||||
*
|
||||
* Locks the given macro-context to ensure only one thread (call) can execute it at a time
|
||||
*
|
||||
* \retval 0 on success
|
||||
* \retval -1 on failure
|
||||
*/
|
||||
int ast_context_lockmacro(const char *macrocontext);
|
||||
|
||||
/*!
|
||||
* \brief Unlocks the macrolock in the given context
|
||||
*
|
||||
* \param macrocontext name of the macro-context to unlock
|
||||
*
|
||||
* Unlocks the given macro-context so that another thread (call) can execute it
|
||||
*
|
||||
* \retval 0 on success
|
||||
* \retval -1 on failure
|
||||
*/
|
||||
int ast_context_unlockmacro(const char *macrocontext);
|
||||
|
||||
/*!
|
||||
* \brief Set the channel to next execute the specified dialplan location.
|
||||
* \see ast_async_parseable_goto, ast_async_goto_if_exists
|
||||
|
||||
Reference in New Issue
Block a user