diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-05 22:57:11 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-05 22:57:11 +0000 |
commit | 53dc3b55cb1681728ff4c21f31ada2b6307a041f (patch) | |
tree | 4776e874c932a8cb13b09fe9dcaa7e2ed4d7fadf /apps | |
parent | 2b18e6b01a97586508b7705af37c27294e97a86d (diff) |
modify the handling of the new temporary greeting reminder feature so that
it works for any language
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25096 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 23 |
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); } } |