diff options
author | Mark Michelson <mmichelson@digium.com> | 2016-03-30 16:47:15 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-04-05 11:55:50 -0500 |
commit | ef4d3f132892a0ce12649bea2f325803e9ad7076 (patch) | |
tree | a49591a9141952ff5456086796f63233b4f404a7 /include | |
parent | 23d2a561d55bc226414dc839544138d77b49adfa (diff) |
Dial: Add function to append already-created channel.
The Dial API takes responsiblity for creating an outbound channel when
calling ast_dial_append(). This commit adds a new function,
ast_dial_append_channel(), which allows us to create the channel outside
the Dial API and then to append the channel to the ast_dial structure.
This is useful for situations where the channel's creation and dialing
are distinct operations. Upcoming ARI early bridge work will illustrate
its usage.
ASTERISK-25889
Change-Id: Id8179f64f8f99132f80dead8d5db2030fd2c0509
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/dial.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/dial.h b/include/asterisk/dial.h index c59257ce5..168c5091a 100644 --- a/include/asterisk/dial.h +++ b/include/asterisk/dial.h @@ -76,6 +76,18 @@ struct ast_dial *ast_dial_create(void); */ int ast_dial_append(struct ast_dial *dial, const char *tech, const char *device, const struct ast_assigned_ids *assignedids); +/*! + * \brief Append a channel using an actual channel object + * + * \param dial The ast_dial to add the channel to + * \param chan The channel to add to the dial + * \retval -1 Failure + * \retval non-zero The position of the channel in the list of dialed channels + * + * \note The chan ref is stolen with a successful return. + */ +int ast_dial_append_channel(struct ast_dial *dial, struct ast_channel *chan); + /*! \brief Request all appended channels, but do not dial * \param dial Dialing structure * \param chan Optional dialing channel |