Asterisk - The Open Source Telephony Project GIT-master-7e7a603
Macros | Enumerations | Functions | Variables
say.h File Reference

Say numbers and dates (maybe words one day too) More...

#include "asterisk/channel.h"
#include "asterisk/file.h"
#include <time.h>
Include dependency graph for say.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SAY_EXTERN   extern
 
#define SAY_INIT(x)
 The basic ast_say_* functions are implemented as function pointers, initialized to the function say_stub() which simply returns an error. Other interfaces, declared here as regular functions, are simply wrappers around the basic functions. More...
 

Enumerations

enum  ast_say_case_sensitivity { AST_SAY_CASE_NONE , AST_SAY_CASE_LOWER , AST_SAY_CASE_UPPER , AST_SAY_CASE_ALL }
 Controls how ast_say_character_str denotes the case of characters in a string. More...
 

Functions

struct ast_strast_get_character_str (const char *str, const char *lang, enum ast_say_case_sensitivity sensitivity)
 Returns an ast_str of files for SayAlpha playback. More...
 
struct ast_strast_get_digit_str (const char *str, const char *lang)
 Returns an ast_str of files for SayDigits playback. More...
 
struct ast_strast_get_money_str (const char *str, const char *lang)
 Returns an ast_str of files for SayMoney playback. More...
 
struct ast_strast_get_number_str (int num, const char *lang)
 Returns an ast_str of files for SayNumber playback. More...
 
struct ast_strast_get_ordinal_str (int num, const char *lang)
 Returns an ast_str of files for SayOrdinal playback. More...
 
struct ast_strast_get_phonetic_str (const char *str, const char *lang)
 Returns an ast_str of files for SayPhonetic playback. More...
 
int ast_say_character_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang, enum ast_say_case_sensitivity sensitivity)
 function to pronounce character and phonetic strings More...
 
int ast_say_counted_adjective (struct ast_channel *chan, int num, const char *adjective, const char *gender)
 
int ast_say_counted_noun (struct ast_channel *chan, int num, const char *noun)
 
int ast_say_digit_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang)
 says digits of a string More...
 
int ast_say_digits (struct ast_channel *chan, int num, const char *ints, const char *lang)
 says digits More...
 
int ast_say_digits_full (struct ast_channel *chan, int num, const char *ints, const char *lang, int audiofd, int ctrlfd)
 Same as ast_say_digits() with audiofd for received audio and returns 1 on ctrlfd being readable. More...
 
int ast_say_enumeration (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
 says an enumeration More...
 
int ast_say_money_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang)
 function to pronounce monetary amounts More...
 
int ast_say_number (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
 says a number More...
 
int ast_say_ordinal (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
 says an ordinal number More...
 
int ast_say_phonetic_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang)
 

Variables

SAY_EXTERN int(* ast_say_character_str_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, enum ast_say_case_sensitivity sensitivity, int audiofd, int ctrlfd) SAY_INIT(ast_say_character_str_full)
 
SAY_EXTERN int(* ast_say_date )(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_date)
 
SAY_EXTERN int(* ast_say_date_with_format )(struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *timezone) SAY_INIT(ast_say_date_with_format)
 
SAY_EXTERN int(* ast_say_datetime )(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_datetime)
 
SAY_EXTERN int(* ast_say_datetime_from_now )(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_datetime_from_now)
 
SAY_EXTERN int(* ast_say_digit_str_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_digit_str_full)
 Same as ast_say_digit_str() with audiofd for received audio and returns 1 on ctrlfd being readable. More...
 
SAY_EXTERN int(* ast_say_enumeration_full )(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_enumeration_full)
 Same as ast_say_enumeration() with audiofd for received audio and returns 1 on ctrlfd being readable. More...
 
SAY_EXTERN int(* ast_say_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_full)
 the generic 'say' routine, with the first chars in the string defining the format to use More...
 
SAY_EXTERN int(* ast_say_money_str_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_money_str_full)
 
SAY_EXTERN int(* ast_say_number_full )(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_number_full)
 Same as ast_say_number() with audiofd for received audio and returns 1 on ctrlfd being readable. More...
 
SAY_EXTERN int(* ast_say_ordinal_full )(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_ordinal_full)
 Same as ast_say_number() with audiofd for received audio and returns 1 on ctrlfd being readable. More...
 
SAY_EXTERN int(* ast_say_phonetic_str_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_phonetic_str_full)
 
SAY_EXTERN int(* ast_say_time )(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_time)
 

Detailed Description

Say numbers and dates (maybe words one day too)

Definition in file say.h.

Macro Definition Documentation

◆ SAY_EXTERN

#define SAY_EXTERN   extern

Definition at line 66 of file say.h.

◆ SAY_INIT

#define SAY_INIT (   x)

The basic ast_say_* functions are implemented as function pointers, initialized to the function say_stub() which simply returns an error. Other interfaces, declared here as regular functions, are simply wrappers around the basic functions.

An implementation of the basic ast_say functions (e.g. from say.c or from a dynamically loaded module) will just have to reassign the pointers to the relevant functions to override the previous implementation.

Todo:
XXX As the conversion from the old implementation of say.c to the new implementation will be completed, and the API suitably reworked by removing redundant functions and/or arguments, this mechanism may be reverted back to pure static functions, if needed.

Definition at line 65 of file say.h.

Enumeration Type Documentation

◆ ast_say_case_sensitivity

Controls how ast_say_character_str denotes the case of characters in a string.

Enumerator
AST_SAY_CASE_NONE 

Do not distinguish case on any letters

AST_SAY_CASE_LOWER 

Denote case only on lower case letters, upper case is assumed otherwise

AST_SAY_CASE_UPPER 

Denote case only on upper case letters, lower case is assumed otherwise

AST_SAY_CASE_ALL 

Denote case on all letters, upper and lower

Definition at line 181 of file say.h.

181 {
182 AST_SAY_CASE_NONE, /*!< Do not distinguish case on any letters */
183 AST_SAY_CASE_LOWER, /*!< Denote case only on lower case letters, upper case is assumed otherwise */
184 AST_SAY_CASE_UPPER, /*!< Denote case only on upper case letters, lower case is assumed otherwise */
185 AST_SAY_CASE_ALL, /*!< Denote case on all letters, upper and lower */
186};
@ AST_SAY_CASE_LOWER
Definition: say.h:183
@ AST_SAY_CASE_ALL
Definition: say.h:185
@ AST_SAY_CASE_UPPER
Definition: say.h:184
@ AST_SAY_CASE_NONE
Definition: say.h:182

Function Documentation

◆ ast_get_character_str()

struct ast_str * ast_get_character_str ( const char *  str,
const char *  lang,
enum ast_say_case_sensitivity  sensitivity 
)

Returns an ast_str of files for SayAlpha playback.

Parameters
strText to be translated to the corresponding audio files.
langChannel language
sensitivityCase sensitivity

Computes the list of files to be played by SayAlpha.

Return values
ampersand-separatedstring of Asterisk sound files that can be played back.

Definition at line 63 of file say.c.

63 {
64 const char *fn;
65 char fnbuf[10], asciibuf[20] = "letters/ascii";
66 char ltr;
67 int num = 0;
68 int res = 0;
69 int upper = 0;
70 int lower = 0;
71
72 struct ast_str *filenames = ast_str_create(20);
73 if (!filenames) {
74 return NULL;
75 }
76 ast_str_reset(filenames);
77
78 while (str[num] && !res) {
79 fn = NULL;
80 switch (str[num]) {
81 case ('*'):
82 fn = "digits/star";
83 break;
84 case ('#'):
85 fn = "digits/pound";
86 break;
87 case ('!'):
88 fn = "letters/exclaimation-point";
89 break;
90 case ('@'):
91 fn = "letters/at";
92 break;
93 case ('$'):
94 fn = "letters/dollar";
95 break;
96 case ('-'):
97 fn = "letters/dash";
98 break;
99 case ('.'):
100 fn = "letters/dot";
101 break;
102 case ('='):
103 fn = "letters/equals";
104 break;
105 case ('+'):
106 fn = "letters/plus";
107 break;
108 case ('/'):
109 fn = "letters/slash";
110 break;
111 case (' '):
112 fn = "letters/space";
113 break;
114 case ('0'):
115 case ('1'):
116 case ('2'):
117 case ('3'):
118 case ('4'):
119 case ('5'):
120 case ('6'):
121 case ('7'):
122 case ('8'):
123 case ('9'):
124 strcpy(fnbuf, "digits/X");
125 fnbuf[7] = str[num];
126 fn = fnbuf;
127 break;
128 default:
129 ltr = str[num];
130 if ('A' <= ltr && ltr <= 'Z') {
131 ltr += 'a' - 'A'; /* file names are all lower-case */
132 switch (sensitivity) {
134 case AST_SAY_CASE_ALL:
135 upper = !upper;
138 break;
139 }
140 } else if ('a' <= ltr && ltr <= 'z') {
141 switch (sensitivity) {
143 case AST_SAY_CASE_ALL:
144 lower = !lower;
147 break;
148 }
149 }
150
151 if (upper) {
152 strcpy(fnbuf, "uppercase");
153 } else if (lower) {
154 strcpy(fnbuf, "lowercase");
155 } else {
156 strcpy(fnbuf, "letters/X");
157 fnbuf[8] = ltr;
158 }
159 fn = fnbuf;
160 }
161 if ((fn && ast_fileexists(fn, NULL, lang) > 0) ||
162 (snprintf(asciibuf + 13, sizeof(asciibuf) - 13, "%d", str[num]) > 0 && ast_fileexists(asciibuf, NULL, lang) > 0 && (fn = asciibuf))) {
163 ast_str_append(&filenames, 0, "%s%s", ast_str_strlen(filenames) ? "&" : "", fn);
164 }
165 if (upper || lower) {
166 continue;
167 }
168 num++;
169 }
170
171 return filenames;
172}
const char * str
Definition: app_jack.c:147
int ast_fileexists(const char *filename, const char *fmt, const char *preflang)
Checks for the existence of a given file.
Definition: file.c:1129
#define NULL
Definition: resample.c:96
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
Definition: strings.h:1139
void ast_str_reset(struct ast_str *buf)
Reset the content of a dynamic string. Useful before a series of ast_str_append.
Definition: strings.h:693
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
Definition: strings.h:659
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
Definition: strings.h:730
Support for dynamic strings.
Definition: strings.h:623

References ast_fileexists(), AST_SAY_CASE_ALL, AST_SAY_CASE_LOWER, AST_SAY_CASE_NONE, AST_SAY_CASE_UPPER, ast_str_append(), ast_str_create, ast_str_reset(), ast_str_strlen(), NULL, and str.

Referenced by say_character_str_full(), and sayfile_exec().

◆ ast_get_digit_str()

struct ast_str * ast_get_digit_str ( const char *  str,
const char *  lang 
)

Returns an ast_str of files for SayDigits playback.

Parameters
strText to be translated to the corresponding audio files.
langChannel language

Computes the list of files to be played by SayDigits.

Return values
ampersand-separatedstring of Asterisk sound files that can be played back.

Definition at line 299 of file say.c.

300{
301 const char *fn;
302 char fnbuf[256];
303 int num = 0;
304
305 struct ast_str *filenames = ast_str_create(20);
306 if (!filenames) {
307 return NULL;
308 }
309 ast_str_reset(filenames);
310
311 while (str[num]) {
312 fn = NULL;
313 switch (str[num]) {
314 case ('*'):
315 fn = "digits/star";
316 break;
317 case ('#'):
318 fn = "digits/pound";
319 break;
320 case ('-'):
321 fn = "digits/minus";
322 break;
323 case '0':
324 case '1':
325 case '2':
326 case '3':
327 case '4':
328 case '5':
329 case '6':
330 case '7':
331 case '8':
332 case '9':
333 strcpy(fnbuf, "digits/X");
334 fnbuf[7] = str[num];
335 fn = fnbuf;
336 break;
337 }
338 if (fn && ast_fileexists(fn, NULL, lang) > 0) {
339 ast_str_append(&filenames, 0, "%s%s", ast_str_strlen(filenames) ? "&" : "", fn);
340 }
341 num++;
342 }
343
344 return filenames;
345}

References ast_fileexists(), ast_str_append(), ast_str_create, ast_str_reset(), ast_str_strlen(), NULL, and str.

Referenced by ast_get_money_en_dollars_str(), get_number_str_en(), say_digit_str_full(), and sayfile_exec().

◆ ast_get_money_str()

struct ast_str * ast_get_money_str ( const char *  str,
const char *  lang 
)

Returns an ast_str of files for SayMoney playback.

Parameters
strText to be translated to the corresponding audio files.
langChannel language

Computes the list of files to be played by SayMoney.

Return values
ampersand-separatedstring of Asterisk sound files that can be played back.

Returns an ast_str of files for SayMoney playback.

Definition at line 427 of file say.c.

428{
429 if (!strncasecmp(lang, "en", 2)) { /* English syntax */
430 return ast_get_money_en_dollars_str(str, lang);
431 }
432
433 ast_log(LOG_WARNING, "Language %s not currently supported, defaulting to US Dollars\n", lang);
434 /* Default to english */
435 return ast_get_money_en_dollars_str(str, lang);
436}
#define ast_log
Definition: astobj2.c:42
#define LOG_WARNING
static struct ast_str * ast_get_money_en_dollars_str(const char *str, const char *lang)
Definition: say.c:353

References ast_get_money_en_dollars_str(), ast_log, LOG_WARNING, and str.

Referenced by say_money_str_full(), and sayfile_exec().

◆ ast_get_number_str()

struct ast_str * ast_get_number_str ( int  num,
const char *  lang 
)

Returns an ast_str of files for SayNumber playback.

Parameters
numInteger to be translated to the corresponding audio files.
langChannel language

Computes the list of files to be played by SayNumber.

Return values
ampersand-separatedstring of Asterisk sound files that can be played back.

Returns an ast_str of files for SayNumber playback.

Definition at line 544 of file say.c.

545{
546 if (!strncasecmp(lang, "en", 2)) { /* English syntax */
547 return get_number_str_en(num, lang);
548 }
549
550 ast_log(LOG_WARNING, "Language %s not currently supported, defaulting to English\n", lang);
551 /* Default to english */
552 return get_number_str_en(num, lang);
553}
static struct ast_str * get_number_str_en(int num, const char *lang)
Definition: say.c:444

References ast_log, get_number_str_en(), and LOG_WARNING.

Referenced by ast_get_money_en_dollars_str(), ast_say_number_full_en(), and sayfile_exec().

◆ ast_get_ordinal_str()

struct ast_str * ast_get_ordinal_str ( int  num,
const char *  lang 
)

Returns an ast_str of files for SayOrdinal playback.

Parameters
numInteger to be translated to the corresponding audio files.
langChannel language

Computes the list of files to be played by SayOrdinal.

Return values
ampersand-separatedstring of Asterisk sound files that can be played back.

Returns an ast_str of files for SayOrdinal playback.

Definition at line 664 of file say.c.

665{
666 if (!strncasecmp(lang, "en", 2)) { /* English syntax */
667 return get_ordinal_str_en(num, lang);
668 }
669
670 ast_log(LOG_WARNING, "Language %s not currently supported, defaulting to English\n", lang);
671 /* Default to english */
672 return get_ordinal_str_en(num, lang);
673}
static struct ast_str * get_ordinal_str_en(int num, const char *lang)
Definition: say.c:555

References ast_log, get_ordinal_str_en(), and LOG_WARNING.

Referenced by say_ordinal_full(), and sayfile_exec().

◆ ast_get_phonetic_str()

struct ast_str * ast_get_phonetic_str ( const char *  str,
const char *  lang 
)

Returns an ast_str of files for SayPhonetic playback.

Parameters
strText to be translated to the corresponding audio files.
langChannel language

Computes the list of files to be played by SayPhonetic.

Return values
ampersand-separatedstring of Asterisk sound files that can be played back.

Definition at line 215 of file say.c.

216{
217 const char *fn;
218 char fnbuf[256];
219 char ltr;
220 int num = 0;
221
222 struct ast_str *filenames = ast_str_create(20);
223 if (!filenames) {
224 return NULL;
225 }
226 ast_str_reset(filenames);
227
228 while (str[num]) {
229 fn = NULL;
230 switch (str[num]) {
231 case ('*'):
232 fn = "digits/star";
233 break;
234 case ('#'):
235 fn = "digits/pound";
236 break;
237 case ('!'):
238 fn = "letters/exclaimation-point";
239 break;
240 case ('@'):
241 fn = "letters/at";
242 break;
243 case ('$'):
244 fn = "letters/dollar";
245 break;
246 case ('-'):
247 fn = "letters/dash";
248 break;
249 case ('.'):
250 fn = "letters/dot";
251 break;
252 case ('='):
253 fn = "letters/equals";
254 break;
255 case ('+'):
256 fn = "letters/plus";
257 break;
258 case ('/'):
259 fn = "letters/slash";
260 break;
261 case (' '):
262 fn = "letters/space";
263 break;
264 case ('0'):
265 case ('1'):
266 case ('2'):
267 case ('3'):
268 case ('4'):
269 case ('5'):
270 case ('6'):
271 case ('7'):
272 case ('8'):
273 strcpy(fnbuf, "digits/X");
274 fnbuf[7] = str[num];
275 fn = fnbuf;
276 break;
277 default: /* '9' falls here... */
278 ltr = str[num];
279 if ('A' <= ltr && ltr <= 'Z') ltr += 'a' - 'A'; /* file names are all lower-case */
280 strcpy(fnbuf, "phonetic/X_p");
281 fnbuf[9] = ltr;
282 fn = fnbuf;
283 }
284 if (fn && ast_fileexists(fn, NULL, lang) > 0) {
285 ast_str_append(&filenames, 0, "%s%s", ast_str_strlen(filenames) ? "&" : "", fn);
286 }
287 num++;
288 }
289
290 return filenames;
291}

References ast_fileexists(), ast_str_append(), ast_str_create, ast_str_reset(), ast_str_strlen(), NULL, and str.

Referenced by say_phonetic_str_full(), and sayfile_exec().

◆ ast_say_character_str()

int ast_say_character_str ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang,
enum ast_say_case_sensitivity  sensitivity 
)

function to pronounce character and phonetic strings

Definition at line 8271 of file channel.c.

8273{
8274 return ast_say_character_str_full(chan, str, ints, lang, sensitivity, -1, -1);
8275}
SAY_EXTERN int(* ast_say_character_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, enum ast_say_case_sensitivity sensitivity, int audiofd, int ctrlfd) SAY_INIT(ast_say_character_str_full)
Definition: say.h:194

References ast_say_character_str_full, and str.

Referenced by common_exec(), pbx_builtin_saycharacters(), pbx_builtin_saycharacters_case(), play_mailbox_owner(), play_on_channel(), and vmsayname_exec().

◆ ast_say_counted_adjective()

int ast_say_counted_adjective ( struct ast_channel chan,
int  num,
const char *  adjective,
const char *  gender 
)

◆ ast_say_counted_noun()

int ast_say_counted_noun ( struct ast_channel chan,
int  num,
const char *  noun 
)

◆ ast_say_digit_str()

int ast_say_digit_str ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang 
)

says digits of a string

Parameters
chanchannel to act upon
numstring to speak
intswhich dtmf to interrupt on
langlanguage to speak in

Vocally says the digits of a given string

Return values
0on succes
DTMFif interrupted
-1on failure

Definition at line 8259 of file channel.c.

8261{
8262 return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
8263}
SAY_EXTERN int(* ast_say_digit_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_digit_str_full)
Same as ast_say_digit_str() with audiofd for received audio and returns 1 on ctrlfd being readable.
Definition: say.h:162

References ast_say_digit_str_full, and str.

Referenced by __analog_ss_thread(), forward_message(), invent_message(), pbx_builtin_saydigits(), play_message_callerid(), and play_on_channel().

◆ ast_say_digits()

int ast_say_digits ( struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang 
)

says digits

Parameters
chanchannel to act upon
numnumber to speak
intswhich dtmf to interrupt on
langlanguage to speak

Vocally says digits of a given number

Return values
0on success
DTMFif interrupted
-1on failure

Definition at line 8253 of file channel.c.

8255{
8256 return ast_say_digits_full(chan, num, ints, lang, -1, -1);
8257}
int ast_say_digits_full(struct ast_channel *chan, int num, const char *ints, const char *lang, int audiofd, int ctrlfd)
Same as ast_say_digits() with audiofd for received audio and returns 1 on ctrlfd being readable.
Definition: channel.c:8283

References ast_say_digits_full().

Referenced by announce_to_dial(), common_exec(), conf_exec(), conf_run(), and say_parking_space().

◆ ast_say_digits_full()

int ast_say_digits_full ( struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
int  audiofd,
int  ctrlfd 
)

◆ ast_say_enumeration()

int ast_say_enumeration ( struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
const char *  options 
)

says an enumeration

Parameters
chanchannel to say them enumeration on
numnumber to say on the channel
intswhich dtmf to interrupt on
langlanguage to speak the enumeration
optionsset to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter

Vocally says an enumeration on a given channel (first, second, third, forth, thirtyfirst, hundredth, ....) Especially useful for dates and messages. Says 'last' if num equals to INT_MAX

Return values
0on success
DTMFdigit on interrupt
-1on failure

Definition at line 8247 of file channel.c.

8249{
8250 return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
8251}
static char language[MAX_LANGUAGE]
Definition: chan_iax2.c:324
SAY_EXTERN int(* ast_say_enumeration_full)(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_enumeration_full)
Same as ast_say_enumeration() with audiofd for received audio and returns 1 on ctrlfd being readable.
Definition: say.h:125
static struct test_options options

References ast_say_enumeration_full, language, and options.

Referenced by ast_say_date_da(), ast_say_date_de(), ast_say_date_is(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), ast_say_date_with_format_is(), ast_say_date_with_format_pl(), and ast_say_date_with_format_vi().

◆ ast_say_money_str()

int ast_say_money_str ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang 
)

function to pronounce monetary amounts

Definition at line 8265 of file channel.c.

8267{
8268 return ast_say_money_str_full(chan, str, ints, lang, -1, -1);
8269}
SAY_EXTERN int(* ast_say_money_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_money_str_full)
Definition: say.h:170

References ast_say_money_str_full, and str.

Referenced by pbx_builtin_saymoney().

◆ ast_say_number()

int ast_say_number ( struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
const char *  options 
)

says a number

Parameters
chanchannel to say them number on
numnumber to say on the channel
intswhich dtmf to interrupt on
langlanguage to speak the number
optionsset to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter

Vocally says a number on a given channel

Return values
0on success
DTMFdigit on interrupt
-1on failure
Examples
app_skel.c.

Definition at line 8235 of file channel.c.

8237{
8238 return ast_say_number_full(chan, num, ints, language, options, -1, -1);
8239}
SAY_EXTERN int(* ast_say_number_full)(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_number_full)
Same as ast_say_number() with audiofd for received audio and returns 1 on ctrlfd being readable.
Definition: say.h:86

References ast_say_number_full, language, and options.

Referenced by announce_user_count(), app_exec(), ast_say_date_da(), ast_say_date_de(), ast_say_date_en(), ast_say_date_fr(), ast_say_date_gr(), ast_say_date_he(), ast_say_date_hu(), ast_say_date_is(), ast_say_date_ja(), ast_say_date_ka(), ast_say_date_nl(), ast_say_date_pt(), ast_say_date_th(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), ast_say_date_with_format_es(), ast_say_date_with_format_fr(), ast_say_date_with_format_is(), ast_say_date_with_format_it(), ast_say_date_with_format_nl(), ast_say_date_with_format_pl(), ast_say_date_with_format_pt(), ast_say_date_with_format_th(), ast_say_date_with_format_vi(), ast_say_datetime_en(), ast_say_datetime_fr(), ast_say_datetime_from_now_en(), ast_say_datetime_from_now_fr(), ast_say_datetime_from_now_he(), ast_say_datetime_from_now_ka(), ast_say_datetime_from_now_pt(), ast_say_datetime_he(), ast_say_datetime_ja(), ast_say_datetime_pt(), ast_say_datetime_th(), ast_say_datetime_zh(), ast_say_time_de(), ast_say_time_en(), ast_say_time_fr(), ast_say_time_gr(), ast_say_time_hu(), ast_say_time_ja(), ast_say_time_ka(), ast_say_time_nl(), ast_say_time_pt(), ast_say_time_pt_BR(), ast_say_time_th(), ast_say_time_zh(), conf_run(), count_exec(), dictate_exec(), get_folder(), get_folder_ja(), gr_say_number_female(), limits_interval_playback(), meetme_menu_admin_extended(), pbx_builtin_saynumber(), play_message(), play_message_duration(), play_on_channel(), playback_common(), say_and_wait(), say_position(), try_calling(), vm_intro_gr(), vm_intro_he(), vm_intro_multilang(), vm_intro_pt(), and vm_intro_pt_BR().

◆ ast_say_ordinal()

int ast_say_ordinal ( struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
const char *  options 
)

says an ordinal number

Parameters
chanchannel to say them number on
numordinal number to say on the channel
intswhich dtmf to interrupt on
langlanguage to speak the number
optionsset to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter

Vocally says an ordinal number on a given channel

Return values
0on success
DTMFdigit on interrupt
-1on failure

Definition at line 8241 of file channel.c.

8243{
8244 return ast_say_ordinal_full(chan, num, ints, language, options, -1, -1);
8245}
SAY_EXTERN int(* ast_say_ordinal_full)(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_ordinal_full)
Same as ast_say_number() with audiofd for received audio and returns 1 on ctrlfd being readable.
Definition: say.h:105

References ast_say_ordinal_full, language, and options.

Referenced by pbx_builtin_sayordinal().

◆ ast_say_phonetic_str()

int ast_say_phonetic_str ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang 
)

Definition at line 8277 of file channel.c.

8279{
8280 return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
8281}
SAY_EXTERN int(* ast_say_phonetic_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_phonetic_str_full)
Definition: say.h:199

References ast_say_phonetic_str_full, and str.

Referenced by pbx_builtin_sayphonetic().

Variable Documentation

◆ ast_say_character_str_full

SAY_EXTERN int(* ast_say_character_str_full) (struct ast_channel *chan, const char *num, const char *ints, const char *lang, enum ast_say_case_sensitivity sensitivity, int audiofd, int ctrlfd) SAY_INIT(ast_say_character_str_full) ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang,
enum ast_say_case_sensitivity  sensitivity,
int  audiofd,
int  ctrlfd 
)

◆ ast_say_date

SAY_EXTERN int(* ast_say_date) (struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_date) ( struct ast_channel chan,
time_t  t,
const char *  ints,
const char *  lang 
)

◆ ast_say_date_with_format

SAY_EXTERN int(* ast_say_date_with_format) (struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *timezone) SAY_INIT(ast_say_date_with_format) ( struct ast_channel chan,
time_t  t,
const char *  ints,
const char *  lang,
const char *  format,
const char *  timezone 
)

◆ ast_say_datetime

SAY_EXTERN int(* ast_say_datetime) (struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_datetime) ( struct ast_channel chan,
time_t  t,
const char *  ints,
const char *  lang 
)

Definition at line 201 of file say.h.

Referenced by __say_init(), restore_say_mode(), save_say_mode(), and say_init_mode().

◆ ast_say_datetime_from_now

SAY_EXTERN int(* ast_say_datetime_from_now) (struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_datetime_from_now) ( struct ast_channel chan,
time_t  t,
const char *  ints,
const char *  lang 
)

Definition at line 206 of file say.h.

Referenced by __say_init(), restore_say_mode(), save_say_mode(), and say_init_mode().

◆ ast_say_digit_str_full

SAY_EXTERN int(* ast_say_digit_str_full) (struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_digit_str_full) ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang,
int  audiofd,
int  ctrlfd 
)

Same as ast_say_digit_str() with audiofd for received audio and returns 1 on ctrlfd being readable.

Definition at line 162 of file say.h.

Referenced by __say_init(), ast_say_digit_str(), ast_say_digits_full(), handle_saydigits(), restore_say_mode(), save_say_mode(), and say_init_mode().

◆ ast_say_enumeration_full

SAY_EXTERN int(* ast_say_enumeration_full) (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_enumeration_full) ( struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
const char *  options,
int  audiofd,
int  ctrlfd 
)

Same as ast_say_enumeration() with audiofd for received audio and returns 1 on ctrlfd being readable.

Definition at line 125 of file say.h.

Referenced by __say_init(), ast_say_enumeration(), restore_say_mode(), save_say_mode(), and say_init_mode().

◆ ast_say_full

SAY_EXTERN int(* ast_say_full) (struct ast_channel *chan, const char *num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_full) ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang,
const char *  options,
int  audiofd,
int  ctrlfd 
)

the generic 'say' routine, with the first chars in the string defining the format to use

Definition at line 176 of file say.h.

◆ ast_say_money_str_full

SAY_EXTERN int(* ast_say_money_str_full) (struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_money_str_full) ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang,
int  audiofd,
int  ctrlfd 
)

Definition at line 170 of file say.h.

Referenced by __say_init(), and ast_say_money_str().

◆ ast_say_number_full

SAY_EXTERN int(* ast_say_number_full) (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_number_full) ( struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
const char *  options,
int  audiofd,
int  ctrlfd 
)

Same as ast_say_number() with audiofd for received audio and returns 1 on ctrlfd being readable.

Definition at line 86 of file say.h.

Referenced by __say_init(), ast_say_number(), handle_saynumber(), restore_say_mode(), save_say_mode(), and say_init_mode().

◆ ast_say_ordinal_full

SAY_EXTERN int(* ast_say_ordinal_full) (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_ordinal_full) ( struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
const char *  options,
int  audiofd,
int  ctrlfd 
)

Same as ast_say_number() with audiofd for received audio and returns 1 on ctrlfd being readable.

Definition at line 105 of file say.h.

Referenced by __say_init(), and ast_say_ordinal().

◆ ast_say_phonetic_str_full

SAY_EXTERN int(* ast_say_phonetic_str_full) (struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_phonetic_str_full) ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang,
int  audiofd,
int  ctrlfd 
)

◆ ast_say_time

SAY_EXTERN int(* ast_say_time) (struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_time) ( struct ast_channel chan,
time_t  t,
const char *  ints,
const char *  lang 
)