mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 06:18:38 +00:00
chan_sip+CEL: Add missing ANSWER and PICKUP events to INVITE/w/replaces pickup.
When doing a "BLF-style call pickup" -- an INVITE with Replaces: header -- the CEL log would lack the ANSWER and PICKUP events. This patch adds the two missing events to the handle_invite_replaces() function. ASTERISK-22977 #close Review: https://reviewboard.asterisk.org/r/3073/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@413832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -22939,7 +22939,15 @@ static int handle_invite_replaces(struct sip_pvt *p, struct sip_request *req, in
|
||||
/* Answer the incoming call and set channel to UP state */
|
||||
transmit_response_with_sdp(p, "200 OK", req, XMIT_RELIABLE, FALSE, FALSE);
|
||||
|
||||
/* Is this a call pickup? */
|
||||
if (earlyreplace || oneleggedreplace) {
|
||||
/* Report pickup event, in this order: PICKUP, CHAN_UP, ANSWER */
|
||||
ast_cel_report_event(replacecall, AST_CEL_PICKUP, NULL, NULL, c);
|
||||
ast_setstate(c, AST_STATE_UP);
|
||||
ast_cel_report_event(c, AST_CEL_ANSWER, NULL, NULL, NULL);
|
||||
} else {
|
||||
ast_setstate(c, AST_STATE_UP);
|
||||
}
|
||||
|
||||
/* Stop music on hold and other generators */
|
||||
ast_quiet_chan(replacecall);
|
||||
|
||||
Reference in New Issue
Block a user