mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
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:
26
pbx.c
26
pbx.c
@@ -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;
|
||||
|
Reference in New Issue
Block a user