diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-11 16:16:50 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-11 16:16:50 +0000 |
commit | 632a037c9d7e57c9f6c2b04c0509ba7f57853e8c (patch) | |
tree | 9ea8a655b08c0afc9caf94d9c30289bd30f97252 /res | |
parent | d76d351108efc714f896778481e25ec2117a0115 (diff) |
Add gender support for AGI SAY NUMBER.
(issue #9537, patch by chappell)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63901 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_agi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index c27b67f14..7a4db8f86 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -697,17 +697,16 @@ static int handle_getoption(struct ast_channel *chan, AGI *agi, int argc, char * /*--- handle_saynumber: Say number in various language syntaxes ---*/ -/* Need to add option for gender here as well. Coders wanted */ /* While waiting, we're sending a NULL. */ static int handle_saynumber(struct ast_channel *chan, AGI *agi, int argc, char *argv[]) { int res; int num; - if (argc != 4) + if (argc < 4 || argc > 5) return RESULT_SHOWUSAGE; if (sscanf(argv[2], "%d", &num) != 1) return RESULT_SHOWUSAGE; - res = ast_say_number_full(chan, num, argv[3], chan->language, NULL, agi->audio, agi->ctrl); + res = ast_say_number_full(chan, num, argv[3], chan->language, argc > 4 ? argv[4] : NULL, agi->audio, agi->ctrl); if (res == 1) return RESULT_SUCCESS; fdprintf(agi->fd, "200 result=%d\n", res); @@ -1513,7 +1512,7 @@ static char usage_getoption[] = " Behaves similar to STREAM FILE but used with a timeout option.\n"; static char usage_saynumber[] = -" Usage: SAY NUMBER <number> <escape digits>\n" +" Usage: SAY NUMBER <number> <escape digits> [gender]\n" " Say a given number, returning early if any of the given DTMF digits\n" " are received on the channel. Returns 0 if playback completes without a digit\n" " being pressed, or the ASCII numerical value of the digit if one was pressed or\n" |