diff options
author | Mark Spencer <markster@digium.com> | 2004-05-03 00:54:16 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-05-03 00:54:16 +0000 |
commit | 73b389da6c341ac8d033ce2c3d54efc2cad7310c (patch) | |
tree | c0f02df20bee0b5575cee77409b55f0e9bdb91f1 /pbx.c | |
parent | 09eeb423157b786e365e4117700eaa03ddf5a611 (diff) |
Add SayPhonetic and SayAlpha applications (bug #793)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -169,6 +169,8 @@ static int pbx_builtin_gotoif(struct ast_channel *, void *); static int pbx_builtin_gotoiftime(struct ast_channel *, void *); static int pbx_builtin_saynumber(struct ast_channel *, void *); static int pbx_builtin_saydigits(struct ast_channel *, void *); +static int pbx_builtin_saycharacters(struct ast_channel *, void *); +static int pbx_builtin_sayphonetic(struct ast_channel *, void *); int pbx_builtin_setvar(struct ast_channel *, void *); void pbx_builtin_setvar_helper(struct ast_channel *chan, char *name, char *value); char *pbx_builtin_getvar_helper(struct ast_channel *chan, char *name); @@ -293,6 +295,14 @@ static struct pbx_builtin { "Say Digits", " SayDigits(digits): Says the passed digits\n" }, + { "SayAlpha", pbx_builtin_saycharacters, +"Say Alpha", +" SayAlpha(string): Spells the passed string\n" }, + + { "SayPhonetic", pbx_builtin_sayphonetic, +"Say Phonetic", +" SayPhonetic(string): Spells the passed string with phonetic alphabet\n" }, + { "SetAccount", pbx_builtin_setaccount, "Sets account code", " SetAccount([account]): Set the channel account code for billing\n" @@ -4601,6 +4611,22 @@ static int pbx_builtin_saydigits(struct ast_channel *chan, void *data) return res; } +static int pbx_builtin_saycharacters(struct ast_channel *chan, void *data) +{ + int res = 0; + if (data) + res = ast_say_character_str(chan, (char *)data, "", chan->language); + return res; +} + +static int pbx_builtin_sayphonetic(struct ast_channel *chan, void *data) +{ + int res = 0; + if (data) + res = ast_say_phonetic_str(chan, (char *)data, "", chan->language); + return res; +} + int load_pbx(void) { int x; |