summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-05-05 22:57:11 +0000
committerRussell Bryant <russell@russellbryant.com>2006-05-05 22:57:11 +0000
commit10b4545ac002e0a2b039d1eee07065ac3da06f39 (patch)
tree4776e874c932a8cb13b09fe9dcaa7e2ed4d7fadf /apps/app_voicemail.c
parent272de2c3942846bfec84f67344862594b59af5f5 (diff)
modify the handling of the new temporary greeting reminder feature so that
it works for any language git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index ac652e185..fccc9e041 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4060,17 +4060,9 @@ static int vm_intro_gr(struct ast_channel *chan, struct vm_state *vms)
}
/* Default English syntax */
-static int vm_intro_en(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms)
- {
+static int vm_intro_en(struct ast_channel *chan, struct vm_state *vms)
+{
int res;
- char prefile[256]="";
-
- /* Notify the user that the temp greeting is set and give them the option to remove it */
- snprintf(prefile, sizeof(prefile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, vms->username);
- if (ast_test_flag(vmu, VM_TEMPGREETWARN)) {
- if (ast_fileexists(prefile, NULL, NULL) > 0)
- res = ast_play_and_wait(chan, "vm-tempgreetactive");
- }
/* Introduce messages they have */
res = ast_play_and_wait(chan, "vm-youhave");
@@ -4629,6 +4621,15 @@ static int vm_intro_ru(struct ast_channel *chan,struct vm_state *vms)
static int vm_intro(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms)
{
+ char prefile[256];
+
+ /* Notify the user that the temp greeting is set and give them the option to remove it */
+ snprintf(prefile, sizeof(prefile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, vms->username);
+ if (ast_test_flag(vmu, VM_TEMPGREETWARN)) {
+ if (ast_fileexists(prefile, NULL, NULL) > 0)
+ ast_play_and_wait(chan, "vm-tempgreetactive");
+ }
+
/* Play voicemail intro - syntax is different for different languages */
if (!strcasecmp(chan->language, "de")) { /* GERMAN syntax */
return vm_intro_de(chan, vms);
@@ -4653,7 +4654,7 @@ static int vm_intro(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm
} else if (!strcasecmp(chan->language, "ru")) { /* RUSSIAN syntax */
return vm_intro_ru(chan, vms);
} else { /* Default to ENGLISH */
- return vm_intro_en(chan, vmu, vms);
+ return vm_intro_en(chan, vms);
}
}