[svn-commits] bmd: branch group/newcdr r118878 - /team/group/newcdr/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 28 20:06:49 CDT 2008


Author: bmd
Date: Wed May 28 20:06:49 2008
New Revision: 118878

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118878
Log:
report some extra info about the transfer.  For blind transfers we say which extension they were referred to.  For assisted transfers we log which linkedid the call is getting merged into

Modified:
    team/group/newcdr/channels/chan_sip.c

Modified: team/group/newcdr/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/channels/chan_sip.c?view=diff&rev=118878&r1=118877&r2=118878
==============================================================================
--- team/group/newcdr/channels/chan_sip.c (original)
+++ team/group/newcdr/channels/chan_sip.c Wed May 28 20:06:49 2008
@@ -17901,6 +17901,7 @@
 					/* Chan 2: Call from Asterisk to target */
 	int res = 0;
 	struct sip_pvt *targetcall_pvt;
+	char transferer_linkedid[32];
 
 	/* Check if the call ID of the replaces header does exist locally */
 	if (!(targetcall_pvt = get_sip_pvt_byid_locked(transferer->refer->replaces_callid, transferer->refer->replaces_callid_totag, 
@@ -17972,6 +17973,8 @@
 			pbx_builtin_setvar_helper(target.chan2, "BRIDGE_PLAY_SOUND", chan2_attended_sound);
 		}
 	}
+
+	ast_copy_string(transferer_linkedid, transferer->owner->linkedid, sizeof(transferer_linkedid));
 
 	/* Perform the transfer */
 	manager_event(EVENT_FLAG_CALL, "Transfer", "TransferMethod: SIP\r\nTransferType: Attended\r\nChannel: %s\r\nUniqueid: %s\r\nSIP-Callid: %s\r\nTargetChannel: %s\r\nTargetUniqueid: %s\r\n",
@@ -17996,7 +17999,7 @@
 	} else {
 		/* Transfer succeeded! */
 
-		ast_cel_report_event(target.chan1, CEL_ATTENDEDTRANSFER, NULL, NULL, target.chan2);
+		ast_cel_report_event(target.chan1, CEL_ATTENDEDTRANSFER, NULL, transferer_linkedid, target.chan2);
 		
 		/* Tell transferer that we're done. */
 		transmit_notify_with_sipfrag(transferer, seqno, "200 OK", TRUE);
@@ -18335,7 +18338,8 @@
 		/* Success  - we have a new channel */
 		ast_debug(3, "%s transfer succeeded. Telling transferer.\n", p->refer->attendedtransfer? "Attended" : "Blind");
 
-		ast_cel_report_event(current.chan1, p->refer->attendedtransfer? CEL_ATTENDEDTRANSFER : CEL_BLINDTRANSFER, NULL, NULL, current.chan2);
+		/* XXX - what to we put in CEL 'extra' for attended transfers to external systems? NULL for now */
+		ast_cel_report_event(current.chan1, p->refer->attendedtransfer? CEL_ATTENDEDTRANSFER : CEL_BLINDTRANSFER, NULL, p->refer->attendedtransfer ? NULL : p->refer->refer_to, current.chan2);
 		transmit_notify_with_sipfrag(p, seqno, "200 Ok", TRUE);
 		if (p->refer->localtransfer)
 			p->refer->status = REFER_200OK;




More information about the svn-commits mailing list