--- apps/app_voicemail.c.orig 2010-11-30 18:28:16.000000000 -0600 +++ apps/app_voicemail.c 2011-02-17 18:50:20.000000000 -0600 @@ -847,6 +847,10 @@ static char listen_control_restart_key[12]; static char listen_control_stop_key[12]; +/* custom intro sounds */ +static char vm_login[80] = "vm-login"; +static char vm_newuser_sound[80] = "vm-newuser"; + /* custom password sounds */ static char vm_password[80] = "vm-password"; static char vm_newpassword[80] = "vm-newpassword"; @@ -9519,7 +9523,7 @@ adsi_begin(chan, &useadsi); if (!skipuser && useadsi) adsi_login(chan); - if (!silent && !skipuser && ast_streamfile(chan, "vm-login", chan->language)) { + if (!silent && !skipuser && ast_streamfile(chan, vm_login, chan->language)) { ast_log(AST_LOG_WARNING, "Couldn't stream login file\n"); return -1; } @@ -9861,7 +9865,7 @@ /* 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_sound) == -1) ast_log(AST_LOG_WARNING, "Couldn't stream new user file\n"); cmd = vm_newuser(chan, vmu, &vms, vmfmts, record_gain); if ((cmd == 't') || (cmd == '#')) { @@ -11964,6 +11968,12 @@ exitcontext[0] = '\0'; } + /* load configurable intro messages */ + 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_sound, val, sizeof(vm_newuser_sound)); + /* load password sounds configuration */ if ((val = ast_variable_retrieve(cfg, "general", "vm-password"))) ast_copy_string(vm_password, val, sizeof(vm_password));