mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
app_voicemail.c: Support for Danish syntax in VM
added support for playing the correct plural sound file dependen on where you have 1 or multipe messages based on the existing SE/NO code ASTERISK-29797 Change-Id: I88aa814d02f3772bb80b474204b1ffb26fe438c2
This commit is contained in:
@@ -9780,6 +9780,51 @@ static int vm_intro_no(struct ast_channel *chan, struct vm_state *vms)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Danish syntax */
|
||||||
|
static int vm_intro_da(struct ast_channel *chan, struct vm_state *vms)
|
||||||
|
{
|
||||||
|
/* Introduce messages they have */
|
||||||
|
int res;
|
||||||
|
|
||||||
|
res = ast_play_and_wait(chan, "vm-youhave");
|
||||||
|
if (res)
|
||||||
|
return res;
|
||||||
|
|
||||||
|
if (!vms->oldmessages && !vms->newmessages && !vms->urgentmessages) {
|
||||||
|
res = ast_play_and_wait(chan, "vm-no");
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-messages");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vms->newmessages) {
|
||||||
|
if ((vms->newmessages == 1)) {
|
||||||
|
res = ast_play_and_wait(chan, "digits/1");
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-INBOX");
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-message");
|
||||||
|
} else {
|
||||||
|
res = say_and_wait(chan, vms->newmessages, ast_channel_language(chan));
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-INBOXs");
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-messages");
|
||||||
|
}
|
||||||
|
if (!res && vms->oldmessages)
|
||||||
|
res = ast_play_and_wait(chan, "vm-and");
|
||||||
|
}
|
||||||
|
if (!res && vms->oldmessages) {
|
||||||
|
if (vms->oldmessages == 1) {
|
||||||
|
res = ast_play_and_wait(chan, "digits/1");
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-Old");
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-message");
|
||||||
|
} else {
|
||||||
|
res = say_and_wait(chan, vms->oldmessages, ast_channel_language(chan));
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-Olds");
|
||||||
|
res = res ? res : ast_play_and_wait(chan, "vm-messages");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* GERMAN syntax */
|
/* GERMAN syntax */
|
||||||
static int vm_intro_de(struct ast_channel *chan, struct vm_state *vms)
|
static int vm_intro_de(struct ast_channel *chan, struct vm_state *vms)
|
||||||
{
|
{
|
||||||
@@ -10260,6 +10305,8 @@ static int vm_intro(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm
|
|||||||
return vm_intro_nl(chan, vms);
|
return vm_intro_nl(chan, vms);
|
||||||
} else if (!strncasecmp(ast_channel_language(chan), "no", 2)) { /* NORWEGIAN syntax */
|
} else if (!strncasecmp(ast_channel_language(chan), "no", 2)) { /* NORWEGIAN syntax */
|
||||||
return vm_intro_no(chan, vms);
|
return vm_intro_no(chan, vms);
|
||||||
|
} else if (!strncasecmp(ast_channel_language(chan), "da", 2)) { /* DANISH syntax */
|
||||||
|
return vm_intro_da(chan, vms);
|
||||||
} else if (!strncasecmp(ast_channel_language(chan), "pl", 2)) { /* POLISH syntax */
|
} else if (!strncasecmp(ast_channel_language(chan), "pl", 2)) { /* POLISH syntax */
|
||||||
return vm_intro_pl(chan, vms);
|
return vm_intro_pl(chan, vms);
|
||||||
} else if (!strncasecmp(ast_channel_language(chan), "pt_BR", 5)) { /* BRAZILIAN PORTUGUESE syntax */
|
} else if (!strncasecmp(ast_channel_language(chan), "pt_BR", 5)) { /* BRAZILIAN PORTUGUESE syntax */
|
||||||
|
6
doc/CHANGES-staging/app_voicemail_danish_syntax.txt
Normal file
6
doc/CHANGES-staging/app_voicemail_danish_syntax.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Subject: app_voicemail
|
||||||
|
Subject: Applications
|
||||||
|
|
||||||
|
added support for Danish syntax, playing the correct plural sound file
|
||||||
|
dependen on where you have 1 or multipe messages
|
||||||
|
based on the existing SE/NO code
|
Reference in New Issue
Block a user