diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-06 15:43:43 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-06 15:43:43 +0000 |
commit | 2184e527649e2165fb010f06dc359c7ccb6e1616 (patch) | |
tree | 02c0b835043c20126724585d6542ba52a5f7104f /apps | |
parent | 93ab11ea6151a5bf27ff21df91c65b041d8da761 (diff) |
Add Czech digit/voicemail support
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3731 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_meetme.c | 2 | ||||
-rwxr-xr-x | apps/app_voicemail.c | 78 |
2 files changed, 79 insertions, 1 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index d9f229053..42f42fc13 100755 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -3,7 +3,7 @@ * * Meet me conference bridge * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2004, Digium, Inc. * * Mark Spencer <markster@linux-support.net> * diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 11188afd9..42e0349fa 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3318,6 +3318,82 @@ static int vm_intro_pt(struct ast_channel *chan,struct vm_state *vms) return res; } + +/* CZECH syntax */ +/* in czech there must be declension of word new and message + * czech : english : czech : english + * -------------------------------------------------------- + * vm-youhave : you have + * vm-novou : one new : vm-zpravu : message + * vm-nove : 2-4 new : vm-zpravy : messages + * vm-novych : 5-infinite new : vm-zprav : messages + * vm-starou : one old + * vm-stare : 2-4 old + * vm-starych : 5-infinite old + * jednu : one - falling 4. + * vm-no : no ( no messages ) + */ + +static int vm_intro_cz(struct ast_channel *chan,struct vm_state *vms) +{ + int res; + res = play_and_wait(chan, "vm-youhave"); + if (!res) { + if (vms->newmessages) { + if (vms->newmessages == 1) { + res = play_and_wait(chan, "digits/jednu"); + } else { + res = say_and_wait(chan, vms->newmessages, chan->language); + } + if (!res) { + if ((vms->newmessages == 1)) + res = play_and_wait(chan, "vm-novou"); + if ((vms->newmessages) > 1 && (vms->newmessages < 5)) + res = play_and_wait(chan, "vm-nove"); + if (vms->newmessages > 4) + res = play_and_wait(chan, "vm-novych"); + } + if (vms->oldmessages && !res) + res = play_and_wait(chan, "vm-and"); + else if (!res) { + if ((vms->newmessages == 1)) + res = play_and_wait(chan, "vm-zpravu"); + if ((vms->newmessages) > 1 && (vms->newmessages < 5)) + res = play_and_wait(chan, "vm-zpravy"); + if (vms->newmessages > 4) + res = play_and_wait(chan, "vm-zprav"); + } + } + if (!res && vms->oldmessages) { + res = say_and_wait(chan, vms->oldmessages, chan->language); + if (!res) { + if ((vms->oldmessages == 1)) + res = play_and_wait(chan, "vm-starou"); + if ((vms->oldmessages) > 1 && (vms->oldmessages < 5)) + res = play_and_wait(chan, "vm-stare"); + if (vms->oldmessages > 4) + res = play_and_wait(chan, "vm-starych"); + } + if (!res) { + if ((vms->oldmessages == 1)) + res = play_and_wait(chan, "vm-zpravu"); + if ((vms->oldmessages) > 1 && (vms->oldmessages < 5)) + res = play_and_wait(chan, "vm-zpravy"); + if (vms->oldmessages > 4) + res = play_and_wait(chan, "vm-zprav"); + } + } + if (!res) { + if (!vms->oldmessages && !vms->newmessages) { + res = play_and_wait(chan, "vm-no"); + if (!res) + res = play_and_wait(chan, "vm-zpravy"); + } + } + } + return res; +} + static int vm_instructions(struct ast_channel *chan, struct vm_state *vms, int skipadvanced) { int res = 0; @@ -3712,6 +3788,8 @@ static int vm_execmain(struct ast_channel *chan, void *data) cmd = vm_intro_nl(chan, &vms); } else if (!strcasecmp(chan->language, "pt")) { /* PORTUGUESE syntax */ cmd = vm_intro_pt(chan, &vms); + } else if (!strcasecmp(chan->language, "cz")) { /* CZECH syntax */ + cmd = vm_intro_cz(chan, &vms); } else { /* Default to ENGLISH */ cmd = vm_intro(chan, &vms); } |