Add SayPhonetic and SayAlpha applications (bug #793)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-05-03 00:54:16 +00:00
parent 09eeb42315
commit 73b389da6c
71 changed files with 527 additions and 4 deletions

26
pbx.c
View File

@@ -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;