Asterisk - The Open Source Telephony Project GIT-master-57e2743
Loading...
Searching...
No Matches
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.
 

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_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.
 
struct ast_str * ast_get_digit_str (const char *str, const char *lang)
 Returns an ast_str of files for SayDigits playback.
 
struct ast_str * ast_get_money_str (const char *str, const char *lang)
 Returns an ast_str of files for SayMoney playback.
 
struct ast_str * ast_get_number_str (int num, const char *lang)
 Returns an ast_str of files for SayNumber playback.
 
struct ast_str * ast_get_ordinal_str (int num, const char *lang)
 Returns an ast_str of files for SayOrdinal playback.
 
struct ast_str * ast_get_phonetic_str (const char *str, const char *lang)
 Returns an ast_str of files for SayPhonetic playback.
 
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
 
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
 
int ast_say_digits (struct ast_channel *chan, int num, const char *ints, const char *lang)
 says digits
 
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.
 
int ast_say_enumeration (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
 says an enumeration
 
int ast_say_money_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang)
 function to pronounce monetary amounts
 
int ast_say_number (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
 says a number
 
int ast_say_ordinal (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
 says an ordinal number
 
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.
 
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.
 
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
 
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.
 
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.
 
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 65 of file say.c.

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

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

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

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

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

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

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

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

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

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

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

8449{
8450 return ast_say_character_str_full(chan, str, ints, lang, sensitivity, -1, -1);
8451}
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 8435 of file channel.c.

8437{
8438 return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
8439}
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(), 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 8429 of file channel.c.

8431{
8432 return ast_say_digits_full(chan, num, ints, lang, -1, -1);
8433}
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:8459

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

8425{
8426 return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
8427}
static char language[MAX_LANGUAGE]
Definition chan_iax2.c:361
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 8441 of file channel.c.

8443{
8444 return ast_say_money_str_full(chan, str, ints, lang, -1, -1);
8445}
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 8411 of file channel.c.

8413{
8414 return ast_say_number_full(chan, num, ints, language, options, -1, -1);
8415}
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 8417 of file channel.c.

8419{
8420 return ast_say_ordinal_full(chan, num, ints, language, options, -1, -1);
8421}
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 8453 of file channel.c.

8455{
8456 return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
8457}
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 
)