[Asterisk-cvs] asterisk/res res_features.c,1.9,1.10
markster at lists.digium.com
markster at lists.digium.com
Tue Aug 31 09:28:45 CDT 2004
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv31447/res
Modified Files:
res_features.c
Log Message:
Merge NetBSD and Courtesty tone with modifications (bug #2329)
Index: res_features.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_features.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- res_features.c 8 Aug 2004 17:15:02 -0000 1.9
+++ res_features.c 31 Aug 2004 13:32:11 -0000 1.10
@@ -3,9 +3,9 @@
*
* Routines implementing call parking
*
- * Copyright (C) 1999, Mark Spencer
+ * Copyright (C) 1999-2004, Digium, Inc.
*
- * Mark Spencer <markster at linux-support.net>
+ * Mark Spencer <markster at digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -61,6 +61,9 @@
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 @@
}
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 @@
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;
}
More information about the svn-commits
mailing list