dect
/
asterisk
Archived
13
0
Fork 0

Version 0.1.9 from FTP

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@341 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2001-07-18 18:48:58 +00:00
parent 992d891411
commit 866bc8df25
3 changed files with 17 additions and 2 deletions

19
say.c
View File

@ -44,6 +44,8 @@ int ast_say_number(struct ast_channel *chan, int num, char *language)
int res = 0;
int playh = 0;
char fn[256] = "";
if (!num)
return ast_say_digits(chan, 0,language);
if (0) {
/* XXX Only works for english XXX */
} else {
@ -65,9 +67,22 @@ int ast_say_number(struct ast_channel *chan, int num, char *language)
if (num < 1000){
snprintf(fn, sizeof(fn), "digits/%d", (num/100));
playh++;
num -= ((num / 100) * 100);
} else {
ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
res = -1;
if (num < 1000000) {
ast_say_number(chan, num / 1000, language);
num = num % 1000;
snprintf(fn, sizeof(fn), "digits/thousand");
} else {
if (num < 1000000000) {
ast_say_number(chan, num / 1000000, language);
num = num % 1000000;
snprintf(fn, sizeof(fn), "digits/million");
} else {
ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
res = -1;
}
}
}
}
if (!res) {

BIN
sounds/digits/million.gsm Executable file

Binary file not shown.

BIN
sounds/digits/thousand.gsm Executable file

Binary file not shown.