[Asterisk-cvs] asterisk/apps app_voicemail.c,1.91,1.92
markster at lists.digium.com
markster at lists.digium.com
Thu May 20 03:45:36 CDT 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv3742/apps
Modified Files:
app_voicemail.c
Log Message:
Make playback of envelope a configurable option (bug #1683)
Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- app_voicemail.c 12 May 2004 00:17:31 -0000 1.91
+++ app_voicemail.c 20 May 2004 07:58:15 -0000 1.92
@@ -115,6 +115,7 @@
int saycid;
int review;
int operator;
+ int envelope;
struct ast_vm_user *next;
};
@@ -227,6 +228,7 @@
static int reviewvm;
static int calloper;
static int saycidinfo;
+static int hearenv;
static char dialcontext[80];
static char callcontext[80];
@@ -254,6 +256,8 @@
vmu->operator = 1;
if (saycidinfo)
vmu->saycid = 1;
+ if (hearenv)
+ vmu->envelope = 1;
if (callcontext)
strncpy(vmu->callback, callcontext, sizeof(vmu->callback) -1);
if (dialcontext)
@@ -294,6 +298,11 @@
vmu->operator = 1;
else
vmu->operator = 0;
+ } else if (!strcasecmp(var, "envelope")){
+ if(ast_true(value))
+ vmu->envelope = 1;
+ else
+ vmu->envelope = 0;
} else if (!strcasecmp(var, "callback")) {
strncpy(vmu->callback, value, sizeof(vmu->callback) -1);
} else if (!strcasecmp(var, "dialout")) {
@@ -2706,7 +2715,7 @@
if(!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */
context = ast_variable_retrieve(msg_cfg, "message","macrocontext");
- if (!res)
+ if ((!res)&&(vmu->envelope))
res = play_message_datetime(chan, vmu, origtime, filename);
if ((!res)&&(vmu->saycid))
@@ -3588,6 +3597,7 @@
char *astsaycid;
char *astcallop;
char *astreview;
+ char *asthearenv;
char *silencestr;
char *thresholdstr;
char *fmt;
@@ -3739,6 +3749,13 @@
astsaycid = "no";
}
saycidinfo = ast_true(astsaycid);
+
+ hearenv = 1;
+ if (!(asthearenv = ast_variable_retrieve(cfg, "general", "envelope"))) {
+ ast_log(LOG_DEBUG,"ENVELOPE before msg enabled globally\n");
+ asthearenv = "yes";
+ }
+ hearenv = ast_true(asthearenv);
if ((dialoutcxt = ast_variable_retrieve(cfg, "general", "dialout"))) {
strncpy(dialcontext, dialoutcxt, sizeof(dialcontext) - 1);
More information about the svn-commits
mailing list