mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
app_originate: Add option to execute gosub prior to dial
Issue/patch ASTERISK-26587 was inspired by issue ASTERISK-22992 that requested ability to add callerid into app_originate. Comments in that issue suggested that it was better solved by adding an option to gosub prior to originating the call. The attached patch implements this much like app_dial with two options one to gosub on the originating channel and one to gosub on the newly created channel and behaves just like app_dial. I have tested this patch by adding callerid info to the new channel and also SIPAddHeader (to e.g. add header to force auto answer) and confirmed it works. Have also tested both 'exten' and 'app' versions of app_originate. Opened by: dkerr Patch by: dkerr Change-Id: I36abc39b58567ffcab4a636ea196ef48be234c57
This commit is contained in:
@@ -1176,6 +1176,12 @@ int ast_pbx_outgoing_exten(const char *type, struct ast_format_cap *cap, const c
|
||||
const char *account, struct ast_channel **locked_channel, int early_media,
|
||||
const struct ast_assigned_ids *assignedids);
|
||||
|
||||
int ast_pbx_outgoing_exten_predial(const char *type, struct ast_format_cap *cap, const char *addr,
|
||||
int timeout, const char *context, const char *exten, int priority, int *reason,
|
||||
int synchronous, const char *cid_num, const char *cid_name, struct ast_variable *vars,
|
||||
const char *account, struct ast_channel **locked_channel, int early_media,
|
||||
const struct ast_assigned_ids *assignedids, const char *predial_callee);
|
||||
|
||||
/*!
|
||||
* \brief Synchronously or asynchronously make an outbound call and execute an
|
||||
* application on the channel.
|
||||
@@ -1211,6 +1217,12 @@ int ast_pbx_outgoing_app(const char *type, struct ast_format_cap *cap, const cha
|
||||
const char *account, struct ast_channel **locked_channel,
|
||||
const struct ast_assigned_ids *assignedids);
|
||||
|
||||
int ast_pbx_outgoing_app_predial(const char *type, struct ast_format_cap *cap, const char *addr,
|
||||
int timeout, const char *app, const char *appdata, int *reason, int synchronous,
|
||||
const char *cid_num, const char *cid_name, struct ast_variable *vars,
|
||||
const char *account, struct ast_channel **locked_channel,
|
||||
const struct ast_assigned_ids *assignedids, const char *predial_callee);
|
||||
|
||||
/*!
|
||||
* \brief Evaluate a condition
|
||||
*
|
||||
|
Reference in New Issue
Block a user