aboutsummaryrefslogtreecommitdiffstats
path: root/main/features.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-26 18:41:28 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-26 18:41:28 +0000
commit9ceb9293897dc3c42b2d59d3295ce8b6b3aa8dca (patch)
tree9c2c9a1ba14db8e994c4c68ca54d28728dcb918d /main/features.c
parenta7919bd73574403014adba6ac371aa0ccb731afc (diff)
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 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178919 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r--main/features.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/features.c b/main/features.c
index e910973f8..cbb49f19a 100644
--- a/main/features.c
+++ b/main/features.c
@@ -238,6 +238,8 @@ static char courtesytone[256]; /*!< Courtesy tone */
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;
@@ -3634,6 +3636,8 @@ static int load_config(void)
courtesytone[0] = '\0';
strcpy(xfersound, "beep");
strcpy(xferfailsound, "pbx-invalid");
+ pickupsound[0] = '\0';
+ pickupfailsound[0] = '\0';
adsipark = 0;
comebacktoorigin = 1;
@@ -3754,6 +3758,10 @@ static int load_config(void)
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")) {
@@ -4395,10 +4403,16 @@ int ast_pickup_call(struct ast_channel *chan)
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;
}