*** apps/app_voicemail.c.orig 2010-05-05 03:46:46.000000000 +0900 --- apps/app_voicemail.c 2010-06-08 23:30:12.000000000 +0900 *************** *** 5092,5097 **** --- 5092,5124 ---- return d; } + /* Japanese Syntax */ + static int get_folder_jp(struct ast_channel *chan, int start) + { + int x; + int d; + char fn[256]; + for (x = start; x< 5; x++) { /* For all folders */ + if ((d = ast_say_number(chan, x, AST_DIGIT_ANY, chan->language,(char *) NULL))) + return d; + snprintf(fn, sizeof(fn), "vm-%s", mbox(x)); /* Folder name */ + d = vm_play_folder_name(chan, fn); + if (d) + return d; + d = ast_waitfordigit(chan, 500); + if (d) + return d; + } + d = ast_play_and_wait(chan, "vm-tocancel"); /* "or pound to cancel" */ + if (d) + return d; + d = ast_play_and_wait(chan, "jp-oshitekudasai"); + if (d) + return d; + d = ast_waitfordigit(chan, 4000); + return d; + } + static int get_folder2(struct ast_channel *chan, char *fn, int start) { int res = 0; *************** *** 5588,5593 **** --- 5615,5622 ---- res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q H 'digits/kai' M ", NULL); } else if (!strncasecmp(chan->language, "he", 2)) { /* HEBREW syntax */ res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' Ad 'at2' kM", NULL); + } else if (!strncasecmp(chan->language, "jp", 2)) { /* Japanese syntax */ + res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "PHM q 'jp-ni' 'vm-received'", NULL); } else if (!strncasecmp(chan->language, "it", 2)) { /* ITALIAN syntax */ res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/at' 'digits/hours' k 'digits/e' M 'digits/minutes'", NULL); } else if (!strncasecmp(chan->language, "nl", 2)) { /* DUTCH syntax */ *************** *** 6871,6876 **** --- 6900,6949 ---- return res; } + /* Japanese syntax */ + static int vm_intro_jp(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) { + res = ast_play_and_wait(chan, "vm-INBOX"); + if (!res) + res = ast_play_and_wait(chan, "vm-message"); + if (!res) + res = ast_play_and_wait(chan, "jp-ga"); + if (!res) + res = say_and_wait(chan, vms->newmessages, chan->language); + if (vms->oldmessages && !res) + res = ast_play_and_wait(chan, "vm-and"); + + } + if (!res && vms->oldmessages) { + res = ast_play_and_wait(chan, "vm-Old"); + if (!res) + res = ast_play_and_wait(chan, "vm-message"); + if (!res) + res = ast_play_and_wait(chan, "jp-ga"); + if (!res) + res = say_and_wait(chan, vms->oldmessages, chan->language); + } + if (!res) { + if (!vms->oldmessages && !vms->newmessages) { + res = ast_play_and_wait(chan, "vm-messages"); + if (!res) + res = ast_play_and_wait(chan, "jp-wa"); + if (!res) + res = ast_play_and_wait(chan, "vm-no"); + } + else if (!res) { + res = ast_play_and_wait(chan, "jp-arimasu"); + } + } + } + return res; + } /* Japanese */ + static int vm_intro(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms) { char prefile[256]; *************** *** 6906,6911 **** --- 6979,6986 ---- return vm_intro_he(chan, vms); } else if (!strncasecmp(chan->language, "it", 2)) { /* ITALIAN syntax */ return vm_intro_it(chan, vms); + } else if (!strncasecmp(chan->language, "jp", 2)) { /* Japanese syntax */ + return vm_intro_jp(chan, vms); } else if (!strncasecmp(chan->language, "nl", 2)) { /* DUTCH syntax */ return vm_intro_nl(chan, vms); } else if (!strncasecmp(chan->language, "no", 2)) { /* NORWEGIAN syntax */