[Asterisk-cvs] asterisk/apps app_voicemail.c,1.246,1.247
kpfleming
kpfleming
Wed Sep 14 16:02:24 CDT 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv5016/apps
Modified Files:
app_voicemail.c
Log Message:
allow channel receive gain to be adjusted while recording messages/greetings in voicemail (workaround for issue #2023 from the ancient past)
Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -d -r1.246 -r1.247
--- app_voicemail.c 9 Sep 2005 21:13:42 -0000 1.246
+++ app_voicemail.c 14 Sep 2005 20:00:54 -0000 1.247
@@ -97,6 +97,23 @@
#define ERROR_LOCK_PATH -100
+#define OPT_SILENT (1 << 0)
+#define OPT_BUSY_GREETING (1 << 1)
+#define OPT_UNAVAIL_GREETING (1 << 2)
+#define OPT_RECORDGAIN (1 << 3)
+#define OPT_PREPEND_MAILBOX (1 << 4)
+
+#define OPT_ARG_RECORDGAIN 0
+#define OPT_ARG_ARRAY_SIZE 1
[...1591 lines suppressed...]
@@ -6431,6 +6477,7 @@
int attempts = 0;
int recorded = 0;
int message_exists = 0;
+ signed char zero_gain = 0;
/* Note that urgent and private are for flagging messages as such in the future */
/* barf if no pointer passed to store duration in */
@@ -6477,7 +6524,11 @@
}
recorded = 1;
/* After an attempt has been made to record message, we have to take care of INTRO and beep for incoming messages, but not for greetings */
+ if (record_gain)
+ ast_channel_setoption(chan, AST_OPTION_RXGAIN, &record_gain, sizeof(record_gain), 0);
cmd = ast_play_and_record(chan, playfile, recordfile, maxtime, fmt, duration, silencethreshold, maxsilence, unlockdir);
+ if (record_gain)
+ ast_channel_setoption(chan, AST_OPTION_RXGAIN, &zero_gain, sizeof(zero_gain), 0);
if (cmd == -1) {
/* User has hung up, no options to give */
return cmd;
More information about the svn-commits
mailing list