diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-02 21:17:49 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-02 21:17:49 +0000 |
commit | fcf177a2575c17139c96fd4a60fdd1cfa26419da (patch) | |
tree | d601a0e2ddfaa00461f18697efcbf6ee54f01f5b /include/asterisk/channel.h | |
parent | 8160bfb09a0e9259f6e60a6a85148c6bdcdd50d4 (diff) |
Generic call forward api, ast_call_forward()
The function ast_call_forward() forwards a call to an extension specified in an ast_channel's call_forward string. After an ast_channel is called, if the channel's call_forward string is set this function can be used to forward the call to a new channel and terminate the original one. I have included this api call in both channel.c's ast_request_and_dial() and feature.c's feature_request_and_dial(). App_dial and app_queue already contain call forward logic specific for their application and options.
(closes issue #13630)
Reported by: festr
Review: https://reviewboard.asterisk.org/r/271/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198856 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 6bfb7b6d5..8c0fa8957 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1081,6 +1081,18 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *d int timeout, int *reason, const char *cid_num, const char *cid_name, struct outgoing_helper *oh); /*! + * \brief Forwards a call to a new channel specified by the original channel's call_forward str. If possible, the new forwarded channel is created and returned while the original one is terminated. + * \param caller in channel that requested orig + * \param orig channel being replaced by the call forward channel + * \param timeout maximum amount of time to wait for setup of new forward channel + * \param format requested channel format + * \param oh outgoing helper used with original channel + * \param outstate reason why unsuccessful (if uncuccessful) + * \return Returns the forwarded call's ast_channel on success or NULL on failure + */ +struct ast_channel *ast_call_forward(struct ast_channel *caller, struct ast_channel *orig, int *timeout, int format, struct outgoing_helper *oh, int *outstate); + +/*! * \brief Register a channel technology (a new channel driver) * Called by a channel module to register the kind of channels it supports. * \param tech Structure defining channel technology or "type" |