mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 10:28:32 +00:00
Here lies the fixes that killed bug 8423 -- OriginateSuccess and OriginateError incomplete channel name. May it rest in peace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -337,3 +337,5 @@ Changes since Asterisk 1.2:
|
|||||||
2. chan_modem_* and related modules are gone because the kernel support for those interfaces is old, buggy and unsupported
|
2. chan_modem_* and related modules are gone because the kernel support for those interfaces is old, buggy and unsupported
|
||||||
* New Utils:
|
* New Utils:
|
||||||
1. aelparse -- compile .ael files outside of asterisk
|
1. aelparse -- compile .ael files outside of asterisk
|
||||||
|
* New manager events:
|
||||||
|
1. OriginateResponse event comes to replace OriginateSuccess and OriginateFailure
|
||||||
|
|||||||
@@ -247,6 +247,10 @@ Manager:
|
|||||||
also been deprecated in favor of the already existing MeetmeTalking event
|
also been deprecated in favor of the already existing MeetmeTalking event
|
||||||
with a "Status" of "on" or "off" added.
|
with a "Status" of "on" or "off" added.
|
||||||
|
|
||||||
|
* OriginateFailure and OriginateSuccess events were replaced by event
|
||||||
|
OriginateResponse with a header named "Response" to indicate success or
|
||||||
|
failure
|
||||||
|
|
||||||
Variables:
|
Variables:
|
||||||
|
|
||||||
* The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
|
* The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
|
||||||
|
|||||||
@@ -1567,6 +1567,7 @@ static void *fast_originate(void *data)
|
|||||||
int res;
|
int res;
|
||||||
int reason = 0;
|
int reason = 0;
|
||||||
struct ast_channel *chan = NULL;
|
struct ast_channel *chan = NULL;
|
||||||
|
char requested_channel[AST_CHANNEL_NAME];
|
||||||
|
|
||||||
if (!ast_strlen_zero(in->app)) {
|
if (!ast_strlen_zero(in->app)) {
|
||||||
res = ast_pbx_outgoing_app(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->app, in->appdata, &reason, 1,
|
res = ast_pbx_outgoing_app(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->app, in->appdata, &reason, 1,
|
||||||
@@ -1578,13 +1579,15 @@ static void *fast_originate(void *data)
|
|||||||
S_OR(in->cid_num, NULL),
|
S_OR(in->cid_num, NULL),
|
||||||
S_OR(in->cid_name, NULL),
|
S_OR(in->cid_name, NULL),
|
||||||
in->vars, in->account, &chan);
|
in->vars, in->account, &chan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!chan)
|
||||||
|
snprintf(requested_channel, AST_CHANNEL_NAME, "%s/%s", in->tech, in->data);
|
||||||
/* Tell the manager what happened with the channel */
|
/* Tell the manager what happened with the channel */
|
||||||
manager_event(EVENT_FLAG_CALL,
|
manager_event(EVENT_FLAG_CALL, "OriginateResponse",
|
||||||
res ? "OriginateFailure" : "OriginateSuccess",
|
|
||||||
"%s"
|
"%s"
|
||||||
"Channel: %s/%s\r\n"
|
"Response: %s\r\n"
|
||||||
|
"Channel: %s\r\n"
|
||||||
"Context: %s\r\n"
|
"Context: %s\r\n"
|
||||||
"Exten: %s\r\n"
|
"Exten: %s\r\n"
|
||||||
"Reason: %d\r\n"
|
"Reason: %d\r\n"
|
||||||
@@ -1592,7 +1595,7 @@ static void *fast_originate(void *data)
|
|||||||
"CallerID: %s\r\n" /* This parameter is deprecated and will be removed post-1.4 */
|
"CallerID: %s\r\n" /* This parameter is deprecated and will be removed post-1.4 */
|
||||||
"CallerIDNum: %s\r\n"
|
"CallerIDNum: %s\r\n"
|
||||||
"CallerIDName: %s\r\n",
|
"CallerIDName: %s\r\n",
|
||||||
in->idtext, in->tech, in->data, in->context, in->exten, reason,
|
in->idtext, res ? "Failure" : "Success", chan ? chan->name : requested_channel, in->context, in->exten, reason,
|
||||||
chan ? chan->uniqueid : "<null>",
|
chan ? chan->uniqueid : "<null>",
|
||||||
S_OR(in->cid_num, "<unknown>"),
|
S_OR(in->cid_num, "<unknown>"),
|
||||||
S_OR(in->cid_num, "<unknown>"),
|
S_OR(in->cid_num, "<unknown>"),
|
||||||
|
|||||||
Reference in New Issue
Block a user