[asterisk-commits] wdoekes: branch 11 r413838 - in /branches/11: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 13 09:34:37 CDT 2014


Author: wdoekes
Date: Tue May 13 09:34:31 2014
New Revision: 413838

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

Merged revisions 413832 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/channels/chan_sip.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=413838&r1=413837&r2=413838
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Tue May 13 09:34:31 2014
@@ -24932,7 +24932,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 asterisk-commits mailing list