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:
Walter Doekes
2014-05-13 14:32:25 +00:00
parent 228d5c9052
commit adb0ee2dcd

View File

@@ -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);
ast_setstate(c, AST_STATE_UP);
/* 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);