summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2017-02-14 17:42:07 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-02-14 17:42:07 -0600
commit0b5a17082be78be17c5191d86f806936dcdc7d61 (patch)
treefb68455d06d196176761ca17678faff4bb2492be /apps/app_voicemail.c
parent9498ad8361d54c2ccc07b9139d3ddd5c7a92a066 (diff)
parent275f469a4d38e4895e2533a09b6afb5a77b09692 (diff)
Merge "app_voicemail: Allow 'Comedian Mail' branding to be overriden"
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index ef1c52606..91e810429 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1034,6 +1034,8 @@ static char listen_control_restart_key[12];
static char listen_control_stop_key[12];
/* custom password sounds */
+static char vm_login[80] = "vm-login";
+static char vm_newuser[80] = "vm-newuser";
static char vm_password[80] = "vm-password";
static char vm_newpassword[80] = "vm-newpassword";
static char vm_passchanged[80] = "vm-passchanged";
@@ -10483,7 +10485,7 @@ static int vm_instructions(struct ast_channel *chan, struct ast_vm_user *vmu, st
}
-static int vm_newuser(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain)
+static int vm_newuser_setup(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain)
{
int cmd = 0;
int duration = 0;
@@ -11073,7 +11075,7 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
adsi_begin(chan, &useadsi);
if (!skipuser && useadsi)
adsi_login(chan);
- if (!silent && !skipuser && ast_streamfile(chan, "vm-login", ast_channel_language(chan))) {
+ if (!silent && !skipuser && ast_streamfile(chan, vm_login, ast_channel_language(chan))) {
ast_log(AST_LOG_WARNING, "Couldn't stream login file\n");
return -1;
}
@@ -11571,9 +11573,9 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
/* Check to see if this is a new user */
if (!strcasecmp(vmu->mailbox, vmu->password) &&
(ast_test_flag(vmu, VM_FORCENAME | VM_FORCEGREET))) {
- if (ast_play_and_wait(chan, "vm-newuser") == -1)
+ if (ast_play_and_wait(chan, vm_newuser) == -1)
ast_log(AST_LOG_WARNING, "Couldn't stream new user file\n");
- cmd = vm_newuser(chan, vmu, &vms, vmfmts, record_gain);
+ cmd = vm_newuser_setup(chan, vmu, &vms, vmfmts, record_gain);
if ((cmd == 't') || (cmd == '#')) {
/* Timeout */
ast_test_suite_event_notify("TIMEOUT", "Message: response from user timed out");
@@ -13990,6 +13992,10 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
}
/* load password sounds configuration */
+ if ((val = ast_variable_retrieve(cfg, "general", "vm-login")))
+ ast_copy_string(vm_login, val, sizeof(vm_login));
+ if ((val = ast_variable_retrieve(cfg, "general", "vm-newuser")))
+ ast_copy_string(vm_newuser, val, sizeof(vm_newuser));
if ((val = ast_variable_retrieve(cfg, "general", "vm-password")))
ast_copy_string(vm_password, val, sizeof(vm_password));
if ((val = ast_variable_retrieve(cfg, "general", "vm-newpassword")))