Say numbers and dates (maybe words one day too). More...
#include "asterisk/channel.h"
#include "asterisk/file.h"
#include <time.h>
Go to the source code of this file.
Defines | |
#define | SAY_EXTERN |
#define | SAY_INIT(x) = (typeof (x))say_stub |
Functions | |
int | ast_say_character_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang) |
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) |
int | ast_say_digits (struct ast_channel *chan, int num, const char *ints, const char *lang) |
int | ast_say_digits_full (struct ast_channel *chan, int num, const char *ints, const char *lang, int audiofd, int ctrlfd) |
int | ast_say_enumeration (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options) |
int | ast_say_number (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options) |
int | ast_say_phonetic_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang) |
static int | say_stub (struct ast_channel *chan,...) |
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. | |
Variables | |
SAY_EXTERN int(* | ast_say_character_str_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, 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) |
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) |
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) |
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) |
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) |
Say numbers and dates (maybe words one day too).
Definition in file say.h.
int ast_say_character_str | ( | struct ast_channel * | chan, | |
const char * | num, | |||
const char * | ints, | |||
const char * | lang | |||
) |
Definition at line 5629 of file channel.c.
References ast_say_character_str_full.
Referenced by common_exec(), pbx_builtin_saycharacters(), play_mailbox_owner(), rpt_exec(), rpt_tele_thread(), and saycharstr().
05631 { 05632 return ast_say_character_str_full(chan, str, ints, lang, -1, -1); 05633 }
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 | |||
) |
Definition at line 5623 of file channel.c.
References ast_say_digit_str_full.
Referenced by invent_message(), mgcp_ss(), pbx_builtin_saydigits(), play_message_callerid(), and ss_thread().
05625 { 05626 return ast_say_digit_str_full(chan, str, ints, lang, -1, -1); 05627 }
int ast_say_digits | ( | struct ast_channel * | chan, | |
int | num, | |||
const char * | ints, | |||
const char * | lang | |||
) |
Definition at line 5617 of file channel.c.
References ast_say_digits_full().
Referenced by common_exec(), conf_exec(), park_call_full(), parkandannounce_exec(), and rpt_tele_thread().
05619 { 05620 return ast_say_digits_full(chan, num, ints, lang, -1, -1); 05621 }
int ast_say_digits_full | ( | struct ast_channel * | chan, | |
int | num, | |||
const char * | ints, | |||
const char * | lang, | |||
int | audiofd, | |||
int | ctrlfd | |||
) |
Definition at line 5641 of file channel.c.
References ast_say_digit_str_full.
Referenced by __say_init(), ast_say_digits(), ast_say_enumeration_full_da(), ast_say_enumeration_full_de(), ast_say_number_full_cs(), ast_say_number_full_da(), ast_say_number_full_de(), ast_say_number_full_en(), ast_say_number_full_en_GB(), ast_say_number_full_es(), ast_say_number_full_fr(), ast_say_number_full_he(), ast_say_number_full_it(), ast_say_number_full_ka(), ast_say_number_full_nl(), ast_say_number_full_no(), ast_say_number_full_pt(), ast_say_number_full_ru(), ast_say_number_full_se(), and ast_say_number_full_zh().
05643 { 05644 char buf[256]; 05645 05646 snprintf(buf, sizeof(buf), "%d", num); 05647 return ast_say_digit_str_full(chan, buf, ints, lang, audiofd, ctrlfd); 05648 }
int ast_say_enumeration | ( | struct ast_channel * | chan, | |
int | num, | |||
const char * | ints, | |||
const char * | lang, | |||
const char * | options | |||
) |
Definition at line 5611 of file channel.c.
References ast_say_enumeration_full.
Referenced by ast_say_date_da(), ast_say_date_de(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), and ast_say_date_with_format_pl().
05613 { 05614 return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1); 05615 }
int ast_say_number | ( | struct ast_channel * | chan, | |
int | num, | |||
const char * | ints, | |||
const char * | lang, | |||
const char * | options | |||
) |
Definition at line 5605 of file channel.c.
References ast_say_number_full.
Referenced by ast_say_date_da(), ast_say_date_de(), ast_say_date_en(), ast_say_date_es(), ast_say_date_fr(), ast_say_date_gr(), ast_say_date_he(), ast_say_date_ka(), ast_say_date_nl(), ast_say_date_pt(), 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_it(), ast_say_date_with_format_nl(), ast_say_date_with_format_pl(), ast_say_date_with_format_pt(), 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_pt(), ast_say_datetime_zh(), ast_say_time_de(), ast_say_time_en(), ast_say_time_es(), ast_say_time_fr(), ast_say_time_gr(), ast_say_time_ka(), ast_say_time_nl(), ast_say_time_pt(), ast_say_time_pt_BR(), ast_say_time_zh(), bridge_playfile(), conf_exec(), conf_run(), count_exec(), dictate_exec(), get_folder(), gr_say_number_female(), pbx_builtin_saynumber(), play_message(), play_message_duration(), rpt_tele_thread(), say_and_wait(), say_position(), saynum(), try_calling(), vm_intro_gr(), vm_intro_he(), vm_intro_multilang(), vm_intro_pt(), and vm_intro_pt_BR().
05607 { 05608 return ast_say_number_full(chan, num, ints, language, options, -1, -1); 05609 }
int ast_say_phonetic_str | ( | struct ast_channel * | chan, | |
const char * | num, | |||
const char * | ints, | |||
const char * | lang | |||
) |
Definition at line 5635 of file channel.c.
References ast_say_phonetic_str_full.
Referenced by pbx_builtin_sayphonetic().
05637 { 05638 return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1); 05639 }
static int say_stub | ( | struct ast_channel * | chan, | |
... | ||||
) | [static] |
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.
Definition at line 55 of file say.h.
References ast_log(), and LOG_WARNING.
00056 { 00057 ast_log(LOG_WARNING, "no implementation for the say() functions\n"); 00058 return -1; 00059 };
SAY_EXTERN int(* ast_say_character_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_character_str_full) |
Referenced by __say_init(), ast_say_character_str(), handle_sayalpha(), restore_say_mode(), and save_say_mode().
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) |
Referenced by __say_init(), restore_say_mode(), and save_say_mode().
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) |
Referenced by __say_init(), restore_say_mode(), and save_say_mode().
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) |
Referenced by __say_init(), ast_say_digit_str(), ast_say_digits_full(), handle_saydigits(), restore_say_mode(), and save_say_mode().
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) |
Referenced by __say_init(), ast_say_enumeration(), restore_say_mode(), and save_say_mode().
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) |
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) |
Referenced by __say_init(), ast_say_number(), handle_saynumber(), restore_say_mode(), and save_say_mode().
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) |
Referenced by __say_init(), ast_say_phonetic_str(), handle_sayphonetic(), restore_say_mode(), and save_say_mode().
SAY_EXTERN int(* ast_say_time)(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_time) |
Referenced by __say_init(), ast_say_datetime_de(), 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_ka(), ast_say_datetime_nl(), ast_say_datetime_pt_BR(), handle_saytime(), pbx_builtin_saytime(), restore_say_mode(), rpt_tele_thread(), and save_say_mode().