|
|
@ -115,6 +115,7 @@ struct ast_vm_user {
|
|
|
|
int saycid;
|
|
|
|
int saycid;
|
|
|
|
int review;
|
|
|
|
int review;
|
|
|
|
int operator;
|
|
|
|
int operator;
|
|
|
|
|
|
|
|
int envelope;
|
|
|
|
struct ast_vm_user *next;
|
|
|
|
struct ast_vm_user *next;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -227,6 +228,7 @@ static int maxlogins;
|
|
|
|
static int reviewvm;
|
|
|
|
static int reviewvm;
|
|
|
|
static int calloper;
|
|
|
|
static int calloper;
|
|
|
|
static int saycidinfo;
|
|
|
|
static int saycidinfo;
|
|
|
|
|
|
|
|
static int hearenv;
|
|
|
|
static char dialcontext[80];
|
|
|
|
static char dialcontext[80];
|
|
|
|
static char callcontext[80];
|
|
|
|
static char callcontext[80];
|
|
|
|
|
|
|
|
|
|
|
@ -254,6 +256,8 @@ static void populate_defaults(struct ast_vm_user *vmu)
|
|
|
|
vmu->operator = 1;
|
|
|
|
vmu->operator = 1;
|
|
|
|
if (saycidinfo)
|
|
|
|
if (saycidinfo)
|
|
|
|
vmu->saycid = 1;
|
|
|
|
vmu->saycid = 1;
|
|
|
|
|
|
|
|
if (hearenv)
|
|
|
|
|
|
|
|
vmu->envelope = 1;
|
|
|
|
if (callcontext)
|
|
|
|
if (callcontext)
|
|
|
|
strncpy(vmu->callback, callcontext, sizeof(vmu->callback) -1);
|
|
|
|
strncpy(vmu->callback, callcontext, sizeof(vmu->callback) -1);
|
|
|
|
if (dialcontext)
|
|
|
|
if (dialcontext)
|
|
|
@ -294,6 +298,11 @@ static void apply_options(struct ast_vm_user *vmu, char *options)
|
|
|
|
vmu->operator = 1;
|
|
|
|
vmu->operator = 1;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
vmu->operator = 0;
|
|
|
|
vmu->operator = 0;
|
|
|
|
|
|
|
|
} else if (!strcasecmp(var, "envelope")){
|
|
|
|
|
|
|
|
if(ast_true(value))
|
|
|
|
|
|
|
|
vmu->envelope = 1;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
vmu->envelope = 0;
|
|
|
|
} else if (!strcasecmp(var, "callback")) {
|
|
|
|
} else if (!strcasecmp(var, "callback")) {
|
|
|
|
strncpy(vmu->callback, value, sizeof(vmu->callback) -1);
|
|
|
|
strncpy(vmu->callback, value, sizeof(vmu->callback) -1);
|
|
|
|
} else if (!strcasecmp(var, "dialout")) {
|
|
|
|
} else if (!strcasecmp(var, "dialout")) {
|
|
|
@ -2706,7 +2715,7 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
|
|
|
|
if(!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */
|
|
|
|
if(!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */
|
|
|
|
context = ast_variable_retrieve(msg_cfg, "message","macrocontext");
|
|
|
|
context = ast_variable_retrieve(msg_cfg, "message","macrocontext");
|
|
|
|
|
|
|
|
|
|
|
|
if (!res)
|
|
|
|
if ((!res)&&(vmu->envelope))
|
|
|
|
res = play_message_datetime(chan, vmu, origtime, filename);
|
|
|
|
res = play_message_datetime(chan, vmu, origtime, filename);
|
|
|
|
|
|
|
|
|
|
|
|
if ((!res)&&(vmu->saycid))
|
|
|
|
if ((!res)&&(vmu->saycid))
|
|
|
@ -3588,6 +3597,7 @@ static int load_config(void)
|
|
|
|
char *astsaycid;
|
|
|
|
char *astsaycid;
|
|
|
|
char *astcallop;
|
|
|
|
char *astcallop;
|
|
|
|
char *astreview;
|
|
|
|
char *astreview;
|
|
|
|
|
|
|
|
char *asthearenv;
|
|
|
|
char *silencestr;
|
|
|
|
char *silencestr;
|
|
|
|
char *thresholdstr;
|
|
|
|
char *thresholdstr;
|
|
|
|
char *fmt;
|
|
|
|
char *fmt;
|
|
|
@ -3740,6 +3750,13 @@ static int load_config(void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
saycidinfo = ast_true(astsaycid);
|
|
|
|
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"))) {
|
|
|
|
if ((dialoutcxt = ast_variable_retrieve(cfg, "general", "dialout"))) {
|
|
|
|
strncpy(dialcontext, dialoutcxt, sizeof(dialcontext) - 1);
|
|
|
|
strncpy(dialcontext, dialoutcxt, sizeof(dialcontext) - 1);
|
|
|
|
ast_log(LOG_DEBUG, "found dialout context: %s\n", dialcontext);
|
|
|
|
ast_log(LOG_DEBUG, "found dialout context: %s\n", dialcontext);
|
|
|
|