diff options
author | Mark Spencer <markster@digium.com> | 2003-06-26 20:32:52 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-06-26 20:32:52 +0000 |
commit | e7a1bdc90c3d819be236cd5a05df021606233a6a (patch) | |
tree | 0e104ecdc598eb151d361467ce4f5a38793f3109 /manager.c | |
parent | 3a83b65a88b8e25eda53513d720cb4b816825059 (diff) |
Extend manager originate functionality
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'manager.c')
-rwxr-xr-x | manager.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -405,6 +405,8 @@ static int action_originate(struct mansession *s, struct message *m) char *priority = astman_get_header(m, "Priority"); char *timeout = astman_get_header(m, "Timeout"); char *callerid = astman_get_header(m, "CallerID"); + char *app = astman_get_header(m, "Application"); + char *appdata = astman_get_header(m, "Data"); char *tech, *data; int pi = 0; int res; @@ -432,7 +434,11 @@ static int action_originate(struct mansession *s, struct message *m) } *data = '\0'; data++; - res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 0, strlen(callerid) ? callerid : NULL, NULL ); + if (strlen(app)) { + res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 0, strlen(callerid) ? callerid : NULL ); + } else { + res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 0, strlen(callerid) ? callerid : NULL, NULL ); + } if (!res) astman_send_ack(s, "Originate successfully queued"); else |