Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 192928) +++ apps/app_voicemail.c (working copy) @@ -6777,6 +6777,8 @@ res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' Ad 'digits/pt-de' B 'digits/pt-de' Y 'digits/pt-as' HM ", NULL); else if (!strcasecmp(chan->language,"tw")) /* CHINESE (Taiwan) syntax */ res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "qR 'vm-received'", NULL); + else if (!strcasecmp(chan->language, "vi")) /* Vietnamese syntax */ + res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/at' H 'hours' M 'minutes' p", NULL); else { res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/at' IMp", NULL); } @@ -7288,7 +7290,7 @@ { int cmd; - if (!strcasecmp(chan->language, "it") || !strcasecmp(chan->language, "es") || !strcasecmp(chan->language, "pt") || !strcasecmp(chan->language, "pt_BR")) { /* Italian, Spanish, French or Portuguese syntax */ + if (!strcasecmp(chan->language, "it") || !strcasecmp(chan->language, "es") || !strcasecmp(chan->language, "pt") || !strcasecmp(chan->language, "pt_BR") || !strcasecmp(chan->language, "vi")) { /* Italian, Spanish, French, Portuguese or Vietnamese syntax */ cmd = ast_play_and_wait(chan, "vm-messages"); /* "messages */ return cmd ? cmd : ast_play_and_wait(chan, box); } else if (!strcasecmp(chan->language, "gr")){ @@ -8170,6 +8172,38 @@ return res; } +/* Vietnamese syntax */ +static int vm_intro_vi(struct ast_channel *chan, struct vm_state *vms) +{ + int res; + + /* Introduce messages they have */ + res = ast_play_and_wait(chan, "vm-youhave"); + if (!res) { + if (vms->newmessages) { + res = say_and_wait(chan, vms->newmessages, chan->language); + if (!res) + res = ast_play_and_wait(chan, "vm-message") || ast_play_and_wait(chan, "vm-INBOX"); + if (vms->oldmessages && !res) + res = ast_play_and_wait(chan, "vm-and"); + + } + if (!res && vms->oldmessages) { + res = say_and_wait(chan, vms->oldmessages, chan->language); + if (!res) + res = ast_play_and_wait(chan, "vm-message") || ast_play_and_wait(chan, "vm-Old"); + } + 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 ast_vm_user *vmu, struct vm_state *vms) { char prefile[256]; @@ -8217,6 +8251,8 @@ return vm_intro_multilang(chan, vms, "n"); } else if (!strcasecmp(chan->language, "he")) { /* HEBREW syntax */ return vm_intro_he(chan, vms); + } else if (!strcasecmp(chan->language, "vi")) { /* Vietnamese syntax */ + return vm_intro_vi(chan, vms); } else { /* Default to ENGLISH */ return vm_intro_en(chan, vms); } @@ -8669,6 +8705,25 @@ return cmd; } +/* Vietnamese Syntax */ +static int vm_browse_messages_vi(struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu) +{ + int cmd = 0; + + if (vms->lastmsg > -1) { + cmd = play_message(chan, vmu, vms); + } else { + cmd = ast_play_and_wait(chan, "vm-no"); + if (!cmd) + cmd = ast_play_and_wait(chan, "vm-message"); + if (!cmd) { + snprintf(vms->fn, sizeof(vms->fn), "vm-%s", vms->curbox); + cmd = ast_play_and_wait(chan, vms->fn); + } + } + return cmd; +} + /*! * \brief Default English syntax for 'You have N messages' greeting. * \param chan @@ -8828,6 +8883,8 @@ return vm_browse_messages_tw(chan, vms, vmu); /* CHINESE (Taiwan) */ } else if (!strcasecmp(chan->language, "he")) { return vm_browse_messages_he(chan, vms, vmu); /* HEBREW */ + } else if (!strcasecmp(chan->language, "vi")) { /* VIETNAMESE*/ + return vm_browse_messages_vi(chan, vms, vmu); } else { /* Default to English syntax */ return vm_browse_messages_en(chan, vms, vmu); }