Index: channels/chan_sip.c
===================================================================
--- channels/chan_sip.c	(revision 133438)
+++ channels/chan_sip.c	(working copy)
@@ -17748,17 +17748,6 @@
 
 	ast_set_flag(&transferer->flags[0], SIP_DEFER_BYE_ON_TRANSFER);	/* Delay hangup */
 
-	/* If we are performing an attended transfer and we have two channels involved then copy sound file information to play upon attended transfer completion */
-	if (target.chan2) {
-		const char *chan1_attended_sound = pbx_builtin_getvar_helper(target.chan1, "ATTENDED_TRANSFER_COMPLETE_SOUND"), *chan2_attended_sound = pbx_builtin_getvar_helper(target.chan2, "ATTENDED_TRANSFER_COMPLETE_SOUND");
-		if (!ast_strlen_zero(chan1_attended_sound)) {
-			pbx_builtin_setvar_helper(target.chan1, "BRIDGE_PLAY_SOUND", chan1_attended_sound);
-		}
-		if (!ast_strlen_zero(chan2_attended_sound)) {
-			pbx_builtin_setvar_helper(target.chan2, "BRIDGE_PLAY_SOUND", chan2_attended_sound);
-		}
-	}
-
 	/* 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",
 		transferer->owner->name,
Index: CHANGES
===================================================================
--- CHANGES	(revision 133438)
+++ CHANGES	(working copy)
@@ -105,8 +105,6 @@
 
 SIP Changes
 -----------
- * The ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using setvar to cause a given
-   audio file to be played upon completion of an attended transfer.
  * Added DNS manager support to registrations for peers referencing peer entries.
    DNS manager runs in the background which allows DNS lookups to be run asynchronously 
    as well as periodically updating the IP address. These properties allow for
@@ -176,6 +174,12 @@
     "QUEUE TIMING OPTIONS" in configs/queues.conf.sample for a detailed explanation of the option
     as well as an explanation about timeout options in general
 
+Miscellaneous
+-------------
+ * The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using the 'setvar'
+   option to cause a given audio file to be played upon completion of an attended transfer.
+   Currently it works for DAHDI, IAX2, SIP and Skinny channels only.
+
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0  -------------
 ------------------------------------------------------------------------------
Index: main/features.c
===================================================================
--- main/features.c	(revision 133438)
+++ main/features.c	(working copy)
@@ -1235,6 +1235,21 @@
 
 	l = strlen(xferto);
 	snprintf(xferto + l, sizeof(xferto) - l, "@%s/n", transferer_real_context);	/* append context */
+
+	/* If we are performing an attended transfer and we have two channels involved then
+	   copy sound file information to play upon attended transfer completion */
+	if (transferee) {
+		const char *chan1_attended_sound = pbx_builtin_getvar_helper(transferer, "ATTENDED_TRANSFER_COMPLETE_SOUND");
+		const char *chan2_attended_sound = pbx_builtin_getvar_helper(transferee, "ATTENDED_TRANSFER_COMPLETE_SOUND");
+
+		if (!ast_strlen_zero(chan1_attended_sound)) {
+			pbx_builtin_setvar_helper(transferer, "BRIDGE_PLAY_SOUND", chan1_attended_sound);
+		}
+		if (!ast_strlen_zero(chan2_attended_sound)) {
+			pbx_builtin_setvar_helper(transferee, "BRIDGE_PLAY_SOUND", chan2_attended_sound);
+		}
+	}
+
 	newchan = ast_feature_request_and_dial(transferer, transferee, "Local", ast_best_codec(transferer->nativeformats),
 		xferto, atxfernoanswertimeout, &outstate, transferer->cid.cid_num, transferer->cid.cid_name, 1, transferer->language);
 
Index: configs/skinny.conf.sample
===================================================================
--- configs/skinny.conf.sample	(revision 133438)
+++ configs/skinny.conf.sample	(working copy)
@@ -87,6 +87,8 @@
 ;nat=yes
 ;callerid="George W. Bush" <202-456-1414>
 ;setvar=CUSTID=5678	; Channel variable to be set for all calls from this device
+;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep	; This channel variable will cause the given audio file to be played
+						; upon completion of an attended transfer
 ;mailbox=500
 ;callwaiting=yes
 ;transfer=yes
Index: configs/iax.conf.sample
===================================================================
--- configs/iax.conf.sample	(revision 133438)
+++ configs/iax.conf.sample	(working copy)
@@ -368,7 +368,8 @@
 ;context=local
 ;auth=md5,plaintext,rsa
 ;secret=markpasswd
-;setvar=foo=bar
+;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep	; This channel variable will cause the given audio file to be played
+						; upon completion of an attended transfer
 ;dbsecret=mysecrets/place	; Secrets can be stored in astdb, too
 ;transfer=no		; Disable IAX native transfer
 ;transfer=mediaonly	; When doing IAX native transfers, transfer 
Index: configs/chan_dahdi.conf.sample
===================================================================
--- configs/chan_dahdi.conf.sample	(revision 133438)
+++ configs/chan_dahdi.conf.sample	(working copy)
@@ -539,7 +539,9 @@
 pickupgroup=1
 
 ; Channel variable to be set for all calls from this channel
-;setvar=CHANNEL=42             
+;setvar=CHANNEL=42
+;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep	; This channel variable will cause the given audio file to be played
+						; upon completion of an attended transfer
 
 ;
 ; Specify whether the channel should be answered immediately or if the simple
