aboutsummaryrefslogtreecommitdiffstats
path: root/say.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2000-01-02 20:59:00 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2000-01-02 20:59:00 +0000
commit999d3524e27900ec85d461f644d0e2fde138fca4 (patch)
tree53bb1d4c35295fea70d6179bfa71cd1e10d402df /say.c
parent2137f5008cf14c94312348e272f9b38df43233e1 (diff)
Version 0.1.2 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'say.c')
-rwxr-xr-xsay.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/say.c b/say.c
index c3f5fba5b..41b66925e 100755
--- a/say.c
+++ b/say.c
@@ -42,8 +42,13 @@ int ast_say_digits(struct ast_channel *chan, int num)
int ast_say_number(struct ast_channel *chan, int num)
{
int res = 0;
+ int playh = 0;
char fn[256] = "";
while(num && !res) {
+ if (playh) {
+ snprintf(fn, sizeof(fn), "digits/hundred");
+ playh = 0;
+ } else
if (num < 20) {
snprintf(fn, sizeof(fn), "digits/%d", num);
num = 0;
@@ -52,8 +57,13 @@ int ast_say_number(struct ast_channel *chan, int num)
snprintf(fn, sizeof(fn), "digits/%d", (num /10) * 10);
num -= ((num / 10) * 10);
} else {
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
- res = -1;
+ if (num < 1000){
+ snprintf(fn, sizeof(fn), "digits/%d", (num/100));
+ playh++;
+ } else {
+ ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ res = -1;
+ }
}
if (!res) {
res = ast_streamfile(chan, fn);