23 #ifndef _ASTERISK_SAY_H
24 #define _ASTERISK_SAY_H
31 #if defined(__cplusplus) || defined(c_plusplus)
51 #if defined(SAY_STUBS)
57 ast_log(LOG_WARNING,
"no implementation for the say() functions\n");
62 #define SAY_INIT(x) = (typeof (x))say_stub
66 #define SAY_EXTERN extern
83 const char *ints,
const char *lang,
const char *options);
102 const char *ints,
const char *lang,
const char *options);
122 const char *ints,
const char *lang,
const char *options);
140 const char *ints,
const char *lang);
144 const char *ints,
const char *lang,
int audiofd,
int ctrlfd);
159 const char *ints,
const char *lang);
168 const char *ints,
const char *lang);
170 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);
194 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);
196 int ast_say_phonetic_str(
struct ast_channel *chan,
const char *num,
197 const char *ints,
const char *lang);
199 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);
201 SAY_EXTERN int (* ast_say_datetime)(
struct ast_channel *chan, time_t t,
const char *ints,
const char *lang)
SAY_INIT(ast_say_datetime);
202 SAY_EXTERN int (* ast_say_time)(
struct ast_channel *chan, time_t t,
const char *ints,
const char *lang)
SAY_INIT(ast_say_time);
204 SAY_EXTERN int (* ast_say_date)(
struct ast_channel *chan, time_t t,
const char *ints,
const char *lang)
SAY_INIT(ast_say_date);
206 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);
208 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);
210 int ast_say_counted_noun(
struct ast_channel *chan,
int num,
const char *noun);
212 int ast_say_counted_adjective(
struct ast_channel *chan,
int num,
const char *adjective,
const char *gender);
287 #if defined(__cplusplus) || defined(c_plusplus)
Main Channel structure associated with a channel.
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...
struct ast_str * ast_get_ordinal_str(int num, const char *lang)
Returns an ast_str of files for SayOrdinal playback.
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...
Time-related functions and macros.
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...
struct ast_str * ast_get_number_str(int num, const char *lang)
Returns an ast_str of files for SayNumber playback.
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_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
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_money_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang)
function to pronounce monetary amounts
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
struct ast_str * ast_get_money_str(const char *str, const char *lang)
Returns an ast_str of files for SayMoney playback.
General Asterisk PBX channel definitions.
struct ast_str * ast_get_digit_str(const char *str, const char *lang)
Returns an ast_str of files for SayDigits playback.
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_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...
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
ast_say_case_sensitivity
Controls how ast_say_character_str denotes the case of characters in a string.
Support for dynamic strings.
#define SAY_INIT(x)
The basic ast_say_* functions are implemented as function pointers, initialized to the function say_s...
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.
int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
says a number
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 ...
int ast_say_enumeration(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
says an enumeration