mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 22:30:28 +00:00
AMI: Fixed OriginateResponse message
When the asterisk sending OriginateResponse message, it doesn't set the "Uniqueid". And it didn't support correct response message for Application originate. ASTERISK-25624 #close Change-Id: I26f54f677ccfb0b7cfd4967a844a1657fd69b74d
This commit is contained in:
@@ -659,6 +659,8 @@ ASTERISK_REGISTER_FILE()
|
|||||||
<parameter name="Channel"/>
|
<parameter name="Channel"/>
|
||||||
<parameter name="Context"/>
|
<parameter name="Context"/>
|
||||||
<parameter name="Exten"/>
|
<parameter name="Exten"/>
|
||||||
|
<parameter name="Application"/>
|
||||||
|
<parameter name="Data"/>
|
||||||
<parameter name="Reason"/>
|
<parameter name="Reason"/>
|
||||||
<parameter name="Uniqueid"/>
|
<parameter name="Uniqueid"/>
|
||||||
<parameter name="CallerIDNum"/>
|
<parameter name="CallerIDNum"/>
|
||||||
@@ -4993,22 +4995,43 @@ static void *fast_originate(void *data)
|
|||||||
}
|
}
|
||||||
/* Tell the manager what happened with the channel */
|
/* Tell the manager what happened with the channel */
|
||||||
chans[0] = chan;
|
chans[0] = chan;
|
||||||
ast_manager_event_multichan(EVENT_FLAG_CALL, "OriginateResponse", chan ? 1 : 0, chans,
|
if (!ast_strlen_zero(in->app)) {
|
||||||
"%s"
|
ast_manager_event_multichan(EVENT_FLAG_CALL, "OriginateResponse", chan ? 1 : 0, chans,
|
||||||
"Response: %s\r\n"
|
"%s"
|
||||||
"Channel: %s\r\n"
|
"Response: %s\r\n"
|
||||||
"Context: %s\r\n"
|
"Channel: %s\r\n"
|
||||||
"Exten: %s\r\n"
|
"Application: %s\r\n"
|
||||||
"Reason: %d\r\n"
|
"Data: %s\r\n"
|
||||||
"Uniqueid: %s\r\n"
|
"Reason: %d\r\n"
|
||||||
"CallerIDNum: %s\r\n"
|
"Uniqueid: %s\r\n"
|
||||||
"CallerIDName: %s\r\n",
|
"CallerIDNum: %s\r\n"
|
||||||
in->idtext, res ? "Failure" : "Success",
|
"CallerIDName: %s\r\n",
|
||||||
chan ? ast_channel_name(chan) : requested_channel, in->context, in->exten, reason,
|
in->idtext, res ? "Failure" : "Success",
|
||||||
chan ? ast_channel_uniqueid(chan) : "<null>",
|
chan ? ast_channel_name(chan) : requested_channel,
|
||||||
S_OR(in->cid_num, "<unknown>"),
|
in->app, in->appdata, reason,
|
||||||
S_OR(in->cid_name, "<unknown>")
|
chan ? ast_channel_uniqueid(chan) : S_OR(in->channelid, "<unknown>"),
|
||||||
);
|
S_OR(in->cid_num, "<unknown>"),
|
||||||
|
S_OR(in->cid_name, "<unknown>")
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
ast_manager_event_multichan(EVENT_FLAG_CALL, "OriginateResponse", chan ? 1 : 0, chans,
|
||||||
|
"%s"
|
||||||
|
"Response: %s\r\n"
|
||||||
|
"Channel: %s\r\n"
|
||||||
|
"Context: %s\r\n"
|
||||||
|
"Exten: %s\r\n"
|
||||||
|
"Reason: %d\r\n"
|
||||||
|
"Uniqueid: %s\r\n"
|
||||||
|
"CallerIDNum: %s\r\n"
|
||||||
|
"CallerIDName: %s\r\n",
|
||||||
|
in->idtext, res ? "Failure" : "Success",
|
||||||
|
chan ? ast_channel_name(chan) : requested_channel,
|
||||||
|
in->context, in->exten, reason,
|
||||||
|
chan ? ast_channel_uniqueid(chan) : S_OR(in->channelid, "<unknown>"),
|
||||||
|
S_OR(in->cid_num, "<unknown>"),
|
||||||
|
S_OR(in->cid_name, "<unknown>")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/* Locked and ref'd by ast_pbx_outgoing_exten or ast_pbx_outgoing_app */
|
/* Locked and ref'd by ast_pbx_outgoing_exten or ast_pbx_outgoing_app */
|
||||||
if (chan) {
|
if (chan) {
|
||||||
|
|||||||
Reference in New Issue
Block a user