summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorDavid Kerr <david@kerr.net>2016-11-21 16:43:47 -0500
committerDavid Kerr <david@kerr.net>2016-11-29 19:40:02 -0500
commitddc951060ad748c31fb5c37b82d258ef6bfaa7f2 (patch)
tree8f2e227f0010778e45972a5b0696131a09a3e193 /include/asterisk
parentaa9d91c290e9efebff8702fa2d262560c5e8dd2e (diff)
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
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/pbx.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 6da447034..00ca4acbe 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -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
*