summaryrefslogtreecommitdiff
path: root/include/asterisk/stasis_app.h
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2016-03-30 17:18:39 -0500
committerJoshua Colp <jcolp@digium.com>2016-04-05 18:14:17 -0500
commitabbb2edd4c897fc3ac8a3589c5b799ff53ed10d2 (patch)
tree331914612f6d23a58a720f008065256b90c96a99 /include/asterisk/stasis_app.h
parentdd48d60c5ba239f76b054b1bb6c1e17c68537497 (diff)
ARI: Add method to Dial a created channel.
This adds a new ARI method that allows for you to dial a channel that you previously created in ARI. By combining this with the create method for channels, it allows for a workflow where a channel can be created, manipulated, and then dialed. The channel is under control of the ARI application during all stages of the Dial and can even be manipulated based on channel state changes observed within an ARI application. The overarching goal for this is to eventually be able to add a dialed channel to a Stasis bridge earlier than the "Up" state. However, at the moment more work is needed in the Dial and Bridge APIs in order to facilitate that. ASTERISK-25889 #close Change-Id: Ic6c399c791e66c4aa52454222fe4f8b02483a205
Diffstat (limited to 'include/asterisk/stasis_app.h')
-rw-r--r--include/asterisk/stasis_app.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/include/asterisk/stasis_app.h b/include/asterisk/stasis_app.h
index f2b07e0bf..981d2d66f 100644
--- a/include/asterisk/stasis_app.h
+++ b/include/asterisk/stasis_app.h
@@ -451,23 +451,6 @@ const char *stasis_app_control_get_channel_id(
const struct stasis_app_control *control);
/*!
- * \brief Dial an endpoint and bridge it to a channel in \c res_stasis
- *
- * If the channel is no longer in \c res_stasis, this function does nothing.
- *
- * \param control Control for \c res_stasis
- * \param endpoint The endpoint to dial.
- * \param exten Extension to dial if no endpoint specified.
- * \param context Context to use with extension.
- * \param timeout The amount of time to wait for answer, before giving up.
- *
- * \return 0 for success
- * \return -1 for error.
- */
-int stasis_app_control_dial(struct stasis_app_control *control, const char *endpoint, const char *exten,
- const char *context, int timeout);
-
-/*!
* \brief Apply a bridge role to a channel controlled by a stasis app control
*
* \param control Control for \c res_stasis
@@ -862,6 +845,20 @@ int stasis_app_channel_unreal_set_internal(struct ast_channel *chan);
*/
int stasis_app_channel_set_internal(struct ast_channel *chan);
+struct ast_dial;
+
+/*!
+ * \brief Dial a channel
+ * \param control Control for \c res_stasis.
+ * \param dial The ast_dial for the outbound channel
+ */
+int stasis_app_control_dial(struct stasis_app_control *control, struct ast_dial *dial);
+
+/*!
+ * \brief Get dial structure on a control
+ */
+struct ast_dial *stasis_app_get_dial(struct stasis_app_control *control);
+
/*! @} */
#endif /* _ASTERISK_STASIS_APP_H */