Asterisk - The Open Source Telephony Project GIT-master-f36a736
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 64 of file say.c.

64 {
65 const char *fn;
66 char fnbuf[10], asciibuf[20] = "letters/ascii";
67 char ltr;
68 int num = 0;
69 int res = 0;
70 int upper = 0;
71 int lower = 0;
72
73 struct ast_str *filenames = ast_str_create(20);
74 if (!filenames) {
75 return NULL;
76 }
77 ast_str_reset(filenames);
78
79 while (str[num] && !res) {
80 fn = NULL;
81 switch (str[num]) {
82 case ('*'):
83 fn = "digits/star";
84 break;
85 case ('#'):
86 fn = "digits/pound";
87 break;
88 case ('!'):
89 fn = "letters/exclaimation-point";
90 break;
91 case ('@'):
92 fn = "letters/at";
93 break;
94 case ('$'):
95 fn = "letters/dollar";
96 break;
97 case ('-'):
98 fn = "letters/dash";
99 break;
100 case ('.'):
101 fn = "letters/dot";
102 break;
103 case ('='):
104 fn = "letters/equals";
105 break;
106 case ('+'):
107 fn = "letters/plus";
108 break;
109 case ('/'):
110 fn = "letters/slash";
111 break;
112 case (' '):
113 fn = "letters/space";
114 break;
115 case ('0'):
116 case ('1'):
117 case ('2'):
118 case ('3'):
119 case ('4'):
120 case ('5'):
121 case ('6'):
122 case ('7'):
123 case ('8'):
124 case ('9'):
125 strcpy(fnbuf, "digits/X");
126 fnbuf[7] = str[num];
127 fn = fnbuf;
128 break;
129 default:
130 ltr = str[num];
131 if ('A' <= ltr && ltr <= 'Z') {
132 ltr += 'a' - 'A'; /* file names are all lower-case */
133 switch (sensitivity) {
135 case AST_SAY_CASE_ALL:
136 upper = !upper;
139 break;
140 }
141 } else if ('a' <= ltr && ltr <= 'z') {
142 switch (sensitivity) {
144 case AST_SAY_CASE_ALL:
145 lower = !lower;
148 break;
149 }
150 }
151
152 if (upper) {
153 strcpy(fnbuf, "uppercase");
154 } else if (lower) {
155 strcpy(fnbuf, "lowercase");
156 } else {
157 strcpy(fnbuf, "letters/X");
158 fnbuf[8] = ltr;
159 }
160 fn = fnbuf;
161 }
162 if ((fn && ast_fileexists(fn, NULL, lang) > 0) ||
163 (snprintf(asciibuf + 13, sizeof(asciibuf) - 13, "%d", str[num]) > 0 && ast_fileexists(asciibuf, NULL, lang) > 0 && (fn = asciibuf))) {
164 ast_str_append(&filenames, 0, "%s%s", ast_str_strlen(filenames) ? "&" : "", fn);
165 }
166 if (upper || lower) {
167 continue;
168 }
169 num++;
170 }
171
172 return filenames;
173}
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 300 of file say.c.

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

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 449 of file say.c.

450{
451 if (!strncasecmp(lang, "en", 2)) { /* English syntax */
452 return ast_get_money_en_dollars_str(str, lang);
453 }
454
455 ast_log(LOG_WARNING, "Language %s not currently supported, defaulting to US Dollars\n", lang);
456 /* Default to english */
457 return ast_get_money_en_dollars_str(str, lang);
458}
#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:354

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 566 of file say.c.

567{
568 if (!strncasecmp(lang, "en", 2)) { /* English syntax */
569 return get_number_str_en(num, lang);
570 }
571
572 ast_log(LOG_WARNING, "Language %s not currently supported, defaulting to English\n", lang);
573 /* Default to english */
574 return get_number_str_en(num, lang);
575}
static struct ast_str * get_number_str_en(int num, const char *lang)
Definition: say.c:466

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 686 of file say.c.

687{
688 if (!strncasecmp(lang, "en", 2)) { /* English syntax */
689 return get_ordinal_str_en(num, lang);
690 }
691
692 ast_log(LOG_WARNING, "Language %s not currently supported, defaulting to English\n", lang);
693 /* Default to english */
694 return get_ordinal_str_en(num, lang);
695}
static struct ast_str * get_ordinal_str_en(int num, const char *lang)
Definition: say.c:577

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 216 of file say.c.

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

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 8293 of file channel.c.

8295{
8296 return ast_say_character_str_full(chan, str, ints, lang, sensitivity, -1, -1);
8297}
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 8281 of file channel.c.

8283{
8284 return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
8285}
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 8275 of file channel.c.

8277{
8278 return ast_say_digits_full(chan, num, ints, lang, -1, -1);
8279}
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:8305

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 8269 of file channel.c.

8271{
8272 return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
8273}
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 8287 of file channel.c.

8289{
8290 return ast_say_money_str_full(chan, str, ints, lang, -1, -1);
8291}
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 8257 of file channel.c.

8259{
8260 return ast_say_number_full(chan, num, ints, language, options, -1, -1);
8261}
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 8263 of file channel.c.

8265{
8266 return ast_say_ordinal_full(chan, num, ints, language, options, -1, -1);
8267}
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 8299 of file channel.c.

8301{
8302 return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
8303}
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 
)