ARI: Remove channels/{channelId}/dial

This removes the /ari/channels/{channelId}/dial URI since it is
redundant, overly complex, is likely to become more externally complex
over time, and is too high-level compared with other ARI operations.
See the following for further information:
http://lists.digium.com/pipermail/asterisk-app-dev/2013-October/000002.html

(closes issue ASTERISK-22784)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2968/
........

Merged revisions 402152 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2013-10-29 12:51:57 +00:00
parent 6c417b0475
commit aa7f9e55f2
4 changed files with 2 additions and 188 deletions

View File

@@ -34,7 +34,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/pbx.h"
#include "asterisk/dial.h"
#include "asterisk/bridge.h"
#include "asterisk/callerid.h"
#include "asterisk/stasis_app.h"
@@ -81,23 +80,6 @@ static struct stasis_app_control *find_control(
return control;
}
void ast_ari_dial(struct ast_variable *headers, struct ast_dial_args *args, struct ast_ari_response *response)
{
struct stasis_app_control *control;
control = find_control(response, args->channel_id);
if (control == NULL) {
return;
}
if (stasis_app_control_dial(control, args->endpoint, args->extension, args->context, args->timeout)) {
ast_ari_response_alloc_failed(response);
return;
}
ast_ari_response_no_content(response);
}
void ast_ari_continue_in_dialplan(
struct ast_variable *headers,
struct ast_continue_in_dialplan_args *args,

View File

@@ -105,27 +105,6 @@ struct ast_delete_channel_args {
* \param[out] response HTTP response
*/
void ast_ari_delete_channel(struct ast_variable *headers, struct ast_delete_channel_args *args, struct ast_ari_response *response);
/*! \brief Argument struct for ast_ari_dial() */
struct ast_dial_args {
/*! \brief Channel's id */
const char *channel_id;
/*! \brief Endpoint to call. If not specified, dial is routed via dialplan */
const char *endpoint;
/*! \brief Extension to dial */
const char *extension;
/*! \brief When routing via dialplan, the context use. If omitted, uses 'default' */
const char *context;
/*! \brief Timeout (in seconds) before giving up dialing, or -1 for no timeout. */
int timeout;
};
/*!
* \brief Create a new channel (originate) and bridge to this channel.
*
* \param headers HTTP headers
* \param args Swagger parameters
* \param[out] response HTTP response
*/
void ast_ari_dial(struct ast_variable *headers, struct ast_dial_args *args, struct ast_ari_response *response);
/*! \brief Argument struct for ast_ari_continue_in_dialplan() */
struct ast_continue_in_dialplan_args {
/*! \brief Channel's id */