aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-31 13:32:11 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-31 13:32:11 +0000
commitefb40d0fe59817d10d6bcf2d545ae4ac0a887553 (patch)
tree8b96ade1ef4f07a1645bf7bdbfc34fcaa2b725db /res
parent116b73cebbd211cbbeaaba949acc84178cf24784 (diff)
Merge NetBSD and Courtesty tone with modifications (bug #2329)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3686 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-xres/res_features.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 4d219298a..7cab65b10 100755
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -3,9 +3,9 @@
*
* Routines implementing call parking
*
- * Copyright (C) 1999, Mark Spencer
+ * Copyright (C) 1999-2004, Digium, Inc.
*
- * Mark Spencer <markster@linux-support.net>
+ * Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -61,6 +61,9 @@ static int parking_stop = 750;
static int transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT;
+/* Default courtesy tone played when party joins conference */
+static char courtesytone[256] = "";
+
/* Registrar for operations */
static char *registrar = "res_features";
@@ -692,6 +695,17 @@ static int park_exec(struct ast_channel *chan, void *data)
}
if (peer) {
+ /* Play a courtesy beep in the calling channel to prefix the bridge connecting */
+ if (!ast_strlen_zero(courtesytone)) {
+ if (!ast_streamfile(chan, courtesytone, chan->language)) {
+ if (ast_waitstream(chan, "") < 0) {
+ ast_log(LOG_WARNING, "Failed to play courtesy tone!\n");
+ ast_hangup(peer);
+ return -1;
+ }
+ }
+ }
+
ast_moh_stop(peer);
res = ast_channel_make_compatible(chan, peer);
if (res < 0) {
@@ -850,6 +864,8 @@ int load_module(void)
transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT;
} else
transferdigittimeout = transferdigittimeout * 1000;
+ } else if (!strcasecmp(var->name, "courtesytone")) {
+ strncpy(courtesytone, var->value, sizeof(courtesytone) - 1);
}
var = var->next;
}