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
"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 -------------
------------------------------------------------------------------------------
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,
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
;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
;defaultuser=goran ; Username to use when calling this device before registration
; Normally you do NOT need to set this parameter
;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
+;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep ; This channel variable will
+ ; cause the given audio file to
+ ; be played upon completion of
+ ; an attended transfer.
;[pre14-asterisk]
;type=friend
;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
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);