[asterisk-commits] murf: branch murf/11583-disconB4bridge r178953 - in /team/murf/11583-disconB4...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 26 13:52:03 CST 2009


Author: murf
Date: Thu Feb 26 13:51:59 2009
New Revision: 178953

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=178953
Log:
Merged revisions 178919 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r178919 | tilghman | 2009-02-26 11:41:28 -0700 (Thu, 26 Feb 2009) | 8 lines
  
  Sound confirmation of call pickup success.
  (closes issue #13826)
   Reported by: azielke
   Patches: 
         pickupsound2-trunk.patch uploaded by azielke (license 548)
         __20081124_bug_13826_updated.patch uploaded by lmadsen (license 10)
   Tested by: lmadsen
........

Modified:
    team/murf/11583-disconB4bridge/   (props changed)
    team/murf/11583-disconB4bridge/CHANGES
    team/murf/11583-disconB4bridge/configs/features.conf.sample
    team/murf/11583-disconB4bridge/main/features.c

Propchange: team/murf/11583-disconB4bridge/
------------------------------------------------------------------------------
    automerge = fauxpas

Propchange: team/murf/11583-disconB4bridge/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Feb 26 13:51:59 2009
@@ -1,1 +1,1 @@
-/trunk:1-178902
+/trunk:1-178952

Modified: team/murf/11583-disconB4bridge/CHANGES
URL: http://svn.digium.com/svn-view/asterisk/team/murf/11583-disconB4bridge/CHANGES?view=diff&rev=178953&r1=178952&r2=178953
==============================================================================
--- team/murf/11583-disconB4bridge/CHANGES (original)
+++ team/murf/11583-disconB4bridge/CHANGES Thu Feb 26 13:51:59 2009
@@ -151,6 +151,8 @@
    can connect calls in passthrough mode, as well as record and play back files.
  * The 'one-touch' disconnect feature is now available during Dial,
    instead of just when a call is connected.
+ * Successful and unsuccessful call pickup can now be alerted through sounds, by
+   using pickupsound and pickupfailsound in features.conf.
 
 
 Asterisk Manager Interface

Modified: team/murf/11583-disconB4bridge/configs/features.conf.sample
URL: http://svn.digium.com/svn-view/asterisk/team/murf/11583-disconB4bridge/configs/features.conf.sample?view=diff&rev=178953&r1=178952&r2=178953
==============================================================================
--- team/murf/11583-disconB4bridge/configs/features.conf.sample (original)
+++ team/murf/11583-disconB4bridge/configs/features.conf.sample Thu Feb 26 13:51:59 2009
@@ -39,6 +39,8 @@
 ;xfersound = beep		; to indicate an attended transfer is complete
 ;xferfailsound = beeperr	; to indicate a failed transfer
 ;pickupexten = *8		; Configure the pickup extension. (default is *8)
+;pickupsound = beep		; to indicate a successful pickup (default: no sound)
+;pickupfailsound = beeperr	; to indicate that the pickup failed (default: no sound)
 ;featuredigittimeout = 2000	; Max time (ms) between digits for 
 				; feature activation  (default is 2000 ms)
 ;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.

Modified: team/murf/11583-disconB4bridge/main/features.c
URL: http://svn.digium.com/svn-view/asterisk/team/murf/11583-disconB4bridge/main/features.c?view=diff&rev=178953&r1=178952&r2=178953
==============================================================================
--- team/murf/11583-disconB4bridge/main/features.c (original)
+++ team/murf/11583-disconB4bridge/main/features.c Thu Feb 26 13:51:59 2009
@@ -238,6 +238,8 @@
 static int parkedplay = 0;                                 /*!< Who to play the courtesy tone to */
 static char xfersound[256];                                /*!< Call transfer sound */
 static char xferfailsound[256];                            /*!< Call transfer failure sound */
+static char pickupsound[256];                              /*!< Pickup sound */
+static char pickupfailsound[256];                          /*!< Pickup failure sound */
 
 static int adsipark;
 
@@ -3668,6 +3670,8 @@
 	courtesytone[0] = '\0';
 	strcpy(xfersound, "beep");
 	strcpy(xferfailsound, "pbx-invalid");
+	pickupsound[0] = '\0';
+	pickupfailsound[0] = '\0';
 	adsipark = 0;
 	comebacktoorigin = 1;
 
@@ -3788,6 +3792,10 @@
 			ast_copy_string(xferfailsound, var->value, sizeof(xferfailsound));
 		} else if (!strcasecmp(var->name, "pickupexten")) {
 			ast_copy_string(pickup_ext, var->value, sizeof(pickup_ext));
+		} else if (!strcasecmp(var->name, "pickupsound")) {
+			ast_copy_string(pickupsound, var->value, sizeof(pickupsound));
+		} else if (!strcasecmp(var->name, "pickupfailsound")) {
+			ast_copy_string(pickupfailsound, var->value, sizeof(pickupfailsound));
 		} else if (!strcasecmp(var->name, "comebacktoorigin")) {
 			comebacktoorigin = ast_true(var->value);
 		} else if (!strcasecmp(var->name, "parkedmusicclass")) {
@@ -4429,10 +4437,16 @@
 		res = ast_channel_masquerade(cur, chan);
 		if (res)
 			ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, cur->name);		/* Done */
+		if (!ast_strlen_zero(pickupsound)) {
+			ast_stream_and_wait(cur, pickupsound, "");
+		}
 		ast_channel_unlock(cur);
 		return res;
 	} else	{
 		ast_debug(1, "No call pickup possible...\n");
+		if (!ast_strlen_zero(pickupfailsound)) {
+			ast_stream_and_wait(chan, pickupfailsound, "");
+		}
 	}
 	return -1;
 }




More information about the asterisk-commits mailing list