--- app_voicemail.c.orig 2005-09-30 11:35:33.000000000 +0400 +++ app_voicemail.c 2005-09-30 16:51:34.000000000 +0400 @@ -5,6 +5,9 @@ * * Mark Spencer * + * 09-30-2005 : Support for Russian added by iPBX Solutions (http://www.ipbx.ru) + * Roman Avramenko + * * 12-16-2004 : Support for Greek added by InAccess Networks (work funded by HOL, www.hol.gr) * George Konstantoulakis * @@ -4496,6 +4499,66 @@ return res; } +/* RUSSIAN syntax */ +static int vm_intro_ru(struct ast_channel *chan,struct vm_state *vms) +{ + /* Introduce messages they have */ + int res; + res = ast_play_and_wait(chan, "vm-youhave"); + if (!res) { + if (vms->newmessages) { + if (vms->newmessages == 1) { + res = ast_play_and_wait(chan, "digits/1s"); /* odno */ + } else { + res = say_and_wait(chan, vms->newmessages, chan->language); + } + if (!res) { + if (vms->newmessages == 1) + res = ast_play_and_wait(chan, "vm-INBOXs"); + else + res = ast_play_and_wait(chan, "vm-INBOX"); + } + if (vms->oldmessages && !res) + res = ast_play_and_wait(chan, "vm-and"); + else if (!res) { + if ((vms->newmessages == 1)) + res = ast_play_and_wait(chan, "vm-message"); + else + res = ast_play_and_wait(chan, "vm-messages"); + } + + } + if (!res && vms->oldmessages) { + if (vms->oldmessages == 1) { + res = ast_play_and_wait(chan, "digits/1s"); + } else { + res = say_and_wait(chan, vms->oldmessages, chan->language); + } + if (!res) { + if (vms->oldmessages == 1) + res = ast_play_and_wait(chan, "vm-Olds"); + else + res = ast_play_and_wait(chan, "vm-Old"); + } + if (!res) { + if (vms->oldmessages == 1) + res = ast_play_and_wait(chan, "vm-message"); + else + res = ast_play_and_wait(chan, "vm-messages"); + } + } + if (!res) { + if (!vms->oldmessages && !vms->newmessages) { + res = ast_play_and_wait(chan, "vm-no"); + if (!res) + res = ast_play_and_wait(chan, "vm-messages"); + } + } + } + return res; +} + + static int vm_intro(struct ast_channel *chan,struct vm_state *vms) { /* Play voicemail intro - syntax is different for different languages */ @@ -4519,6 +4582,8 @@ return vm_intro_se(chan, vms); } else if (!strcasecmp(chan->language, "no")) { /* NORWEGIAN syntax */ return vm_intro_no(chan, vms); + } else if (!strcasecmp(chan->language, "ru")) { /* RUSSIAN syntax */ + return vm_intro_ru(chan, vms); } else { /* Default to ENGLISH */ return vm_intro_en(chan, vms); } @@ -5207,8 +5272,11 @@ if (useadsi) adsi_status2(chan, &vms); - if (!cmd) + if (!cmd) { + if(!strcasecmp(chan->language, "ru")) + cmd = ast_play_and_wait(chan, "vm-selectedfolder"); cmd = vm_play_folder_name(chan, vms.vmbox); + } vms.starting = 1; break;