Upgrade 3CX to v18 and get it hosted free!

Asterisk chinese voicemail intro

Author image

Let’s Asterisk Speak Chinese Usage.

Change asterisk-sources/apps/app_voicemail.c add Function vm_intro_cn in every where

/* Chinese syntax
—————————————–
By hoowa sun 2007-2-5
*/
static int vm_intro_cn(struct ast_channel *chan,struct vm_state *vms)
{
/* Introduce messages they have */
int res;
if (vms->newmessages || vms->oldmessages)
{
res = ast_play_and_wait(chan, "vm-youhave");
if (vms->newmessages) {
res = say_and_wait(chan, vms->newmessages, chan->language);
if (!res)
res = ast_play_and_wait(chan, "vm-line");
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) {
res = say_and_wait(chan, vms->oldmessages, chan->language);
if (!res)
res = ast_play_and_wait(chan, "vm-line");
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");
}
}
} else {
res = ast_play_and_wait(chan, "vm-you");
res = ast_play_and_wait(chan, "vm-no");
if (!res)
res = ast_play_and_wait(chan, "vm-messages");
}
return res;
}

Change asterisk-sources/apps/app_voicemail.c modify function vm_intro

add this

} else if (!strcasecmp(chan->language, "cn")) { /* CHINA syntax by hoowa sun */
return vm_intro_cn(chan, vms);

after

} else if (!strcasecmp(chan->language, "no")) { /* NORWEGIAN syntax */
return vm_intro_no(chan, vms);

change asterisk-source/apps/app_voicemail.c add

/* Chinese syntax
by hoowa.sun 2007-2-5
*/
static int vm_browse_messages_cn(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-you");
if (!cmd)
cmd = ast_play_and_wait(chan, "vm-no");
if (!cmd) {
snprintf(vms->fn, sizeof(vms->fn), "vm-%s", vms->curbox);
cmd = ast_play_and_wait(chan, vms->fn);
}
if (!cmd)
cmd = ast_play_and_wait(chan, "vm-messages");
}
return cmd;
}

Change asterisk-sources/apps/app_voicemail.c modify function vm_browse_messages

add this

} else if (!strcasecmp(chan->language, "cn")){
return vm_browse_messages_cn(chan, vms, vmu); /* CHINA hoowa.sun */

after

} else if (!strcasecmp(chan->language, "gr")){
return vm_browse_messages_gr(chan, vms, vmu); /* GREEK */

make && make install

if your select chinese will be better speaks

hoowa.sun

🙂


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.
Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.