[svn-commits] wdoekes: branch 1.8 r413832 - /branches/1.8/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 13 09:32:32 CDT 2014


Author: wdoekes
Date: Tue May 13 09:32:25 2014
New Revision: 413832

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=413832
Log:
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/

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=413832&r1=413831&r2=413832
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Tue May 13 09:32:25 2014
@@ -22939,7 +22939,15 @@
 	/* 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);




More information about the svn-commits mailing list