Index: main/manager.c =================================================================== --- main/manager.c (revision 45773) +++ main/manager.c (working copy) @@ -1481,6 +1481,7 @@ char *async = astman_get_header(m, "Async"); char *id = astman_get_header(m, "ActionID"); struct ast_variable *vars = astman_get_variables(m); + struct ast_channel *chan = NULL; char *tech, *data; char *l = NULL, *n = NULL; int pi = 0; @@ -1555,17 +1556,26 @@ } } } else if (!ast_strlen_zero(app)) { - res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, l, n, vars, account, NULL); + res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, l, n, vars, account, &chan); } else { if (exten && context && pi) - res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 1, l, n, vars, account, NULL); + res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 1, l, n, vars, account, &chan); else { astman_send_error(s, m, "Originate with 'Exten' requires 'Context' and 'Priority'"); return 0; } } - if (!res) - astman_send_ack(s, m, "Originate successfully queued"); + if (!res) { + if (chan && chan->uniqueid[0]) { + astman_start_ack(s, m); + astman_append(s, "Uniqueid: %s\r\n", chan->uniqueid); + astman_append(s, "Message: Originate successfully queued\r\n"); + astman_append(s, "\r\n"); + + } else { + astman_send_ack(s, m, "Originate successfully queued"); + } + } else astman_send_error(s, m, "Originate failed"); return 0;