#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.
Functions | |
| int | ast_say_character_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang) |
| int | ast_say_character_str_full (struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) |
| int | ast_say_date (struct ast_channel *chan, time_t t, const char *ints, const char *lang) |
| 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) |
| int | ast_say_datetime (struct ast_channel *chan, time_t t, const char *ints, const char *lang) |
| int | ast_say_datetime_from_now (struct ast_channel *chan, time_t t, const char *ints, const char *lang) |
| int | ast_say_digit_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang) |
| int | ast_say_digit_str_full (struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) |
| 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) |
| ast_say_enumeration: call language-specific functions without file descriptors | |
| int | ast_say_enumeration_full (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) |
| ast_say_enumeration_full: call language-specific functions | |
| int | ast_say_number (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options) |
| ast_say_number: call language-specific functions without file descriptors | |
| int | ast_say_number_full (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) |
| ast_say_number_full: call language-specific functions | |
| int | ast_say_phonetic_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang) |
| int | ast_say_phonetic_str_full (struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) |
| int | ast_say_time (struct ast_channel *chan, time_t t, const char *ints, const char *lang) |
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 136 of file say.c.
References ast_say_character_str_full().
Referenced by chanspy_exec(), pbx_builtin_saycharacters(), play_mailbox_owner(), rpt_tele_thread(), and saycharstr().
00137 { 00138 return ast_say_character_str_full(chan, str, ints, lang, -1, -1); 00139 }
| int ast_say_character_str_full | ( | struct ast_channel * | chan, | |
| const char * | num, | |||
| const char * | ints, | |||
| const char * | lang, | |||
| int | audiofd, | |||
| int | ctrlfd | |||
| ) |
Definition at line 57 of file say.c.
References ast_stopstream(), ast_streamfile(), ast_waitstream(), and ast_waitstream_full().
Referenced by ast_say_character_str(), and handle_sayalpha().
00058 { 00059 const char *fn; 00060 char fnbuf[256]; 00061 char ltr; 00062 int num = 0; 00063 int res = 0; 00064 00065 while (str[num] && !res) { 00066 fn = NULL; 00067 switch (str[num]) { 00068 case ('*'): 00069 fn = "digits/star"; 00070 break; 00071 case ('#'): 00072 fn = "digits/pound"; 00073 break; 00074 case ('!'): 00075 fn = "letters/exclaimation-point"; 00076 break; 00077 case ('@'): 00078 fn = "letters/at"; 00079 break; 00080 case ('$'): 00081 fn = "letters/dollar"; 00082 break; 00083 case ('-'): 00084 fn = "letters/dash"; 00085 break; 00086 case ('.'): 00087 fn = "letters/dot"; 00088 break; 00089 case ('='): 00090 fn = "letters/equals"; 00091 break; 00092 case ('+'): 00093 fn = "letters/plus"; 00094 break; 00095 case ('/'): 00096 fn = "letters/slash"; 00097 break; 00098 case (' '): 00099 fn = "letters/space"; 00100 break; 00101 case ('0'): 00102 case ('1'): 00103 case ('2'): 00104 case ('3'): 00105 case ('4'): 00106 case ('5'): 00107 case ('6'): 00108 case ('7'): 00109 case ('8'): 00110 case ('9'): 00111 strcpy(fnbuf, "digits/X"); 00112 fnbuf[7] = str[num]; 00113 fn = fnbuf; 00114 break; 00115 default: 00116 ltr = str[num]; 00117 if ('A' <= ltr && ltr <= 'Z') ltr += 'a' - 'A'; /* file names are all lower-case */ 00118 strcpy(fnbuf, "letters/X"); 00119 fnbuf[8] = ltr; 00120 fn = fnbuf; 00121 } 00122 res = ast_streamfile(chan, fn, lang); 00123 if (!res) { 00124 if ((audiofd > -1) && (ctrlfd > -1)) 00125 res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); 00126 else 00127 res = ast_waitstream(chan, ints); 00128 } 00129 ast_stopstream(chan); 00130 num++; 00131 } 00132 00133 return res; 00134 }
| int ast_say_date | ( | struct ast_channel * | chan, | |
| time_t | t, | |||
| const char * | ints, | |||
| const char * | lang | |||
| ) |
Definition at line 2731 of file say.c.
References ast_say_date_da(), ast_say_date_de(), ast_say_date_en(), ast_say_date_fr(), ast_say_date_gr(), ast_say_date_nl(), and ast_say_date_pt().
Referenced by ast_say_datetime_de(), ast_say_datetime_nl(), and handle_saydate().
02732 { 02733 if (!strcasecmp(lang, "en") ) { /* English syntax */ 02734 return(ast_say_date_en(chan, t, ints, lang)); 02735 } else if (!strcasecmp(lang, "da") ) { /* Danish syntax */ 02736 return(ast_say_date_da(chan, t, ints, lang)); 02737 } else if (!strcasecmp(lang, "de") ) { /* German syntax */ 02738 return(ast_say_date_de(chan, t, ints, lang)); 02739 } else if (!strcasecmp(lang, "fr") ) { /* French syntax */ 02740 return(ast_say_date_fr(chan, t, ints, lang)); 02741 } else if (!strcasecmp(lang, "nl") ) { /* Dutch syntax */ 02742 return(ast_say_date_nl(chan, t, ints, lang)); 02743 } else if (!strcasecmp(lang, "pt") ) { /* Portuguese syntax */ 02744 return(ast_say_date_pt(chan, t, ints, lang)); 02745 } else if (!strcasecmp(lang, "gr") ) { /* Greek syntax */ 02746 return(ast_say_date_gr(chan, t, ints, lang)); 02747 } 02748 02749 /* Default to English */ 02750 return(ast_say_date_en(chan, t, ints, lang)); 02751 }
| 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 | |||
| ) |
Definition at line 2960 of file say.c.
References 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_gr(), ast_say_date_with_format_he(), ast_say_date_with_format_it(), ast_say_date_with_format_nl(), ast_say_date_with_format_pt(), and ast_say_date_with_format_tw().
Referenced by 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_gr(), ast_say_date_with_format_he(), ast_say_date_with_format_it(), ast_say_date_with_format_nl(), ast_say_date_with_format_pt(), ast_say_date_with_format_tw(), handle_saydatetime(), play_message_datetime(), and sayunixtime_exec().
02961 { 02962 if (!strcasecmp(lang, "en") ) { /* English syntax */ 02963 return(ast_say_date_with_format_en(chan, time, ints, lang, format, timezone)); 02964 } else if (!strcasecmp(lang, "da") ) { /* Danish syntax */ 02965 return(ast_say_date_with_format_da(chan, time, ints, lang, format, timezone)); 02966 } else if (!strcasecmp(lang, "de") ) { /* German syntax */ 02967 return(ast_say_date_with_format_de(chan, time, ints, lang, format, timezone)); 02968 } else if (!strcasecmp(lang, "es") || !strcasecmp(lang, "mx")) { /* Spanish syntax */ 02969 return(ast_say_date_with_format_es(chan, time, ints, lang, format, timezone)); 02970 } else if (!strcasecmp(lang, "he")) { /* Hebrew syntax */ 02971 return(ast_say_date_with_format_he(chan, time, ints, lang, format, timezone)); 02972 } else if (!strcasecmp(lang, "fr") ) { /* French syntax */ 02973 return(ast_say_date_with_format_fr(chan, time, ints, lang, format, timezone)); 02974 } else if (!strcasecmp(lang, "it") ) { /* Italian syntax */ 02975 return(ast_say_date_with_format_it(chan, time, ints, lang, format, timezone)); 02976 } else if (!strcasecmp(lang, "nl") ) { /* Dutch syntax */ 02977 return(ast_say_date_with_format_nl(chan, time, ints, lang, format, timezone)); 02978 } else if (!strcasecmp(lang, "pt") ) { /* Portuguese syntax */ 02979 return(ast_say_date_with_format_pt(chan, time, ints, lang, format, timezone)); 02980 } else if (!strcasecmp(lang, "tw") ) { /* Taiwanese syntax */ 02981 return(ast_say_date_with_format_tw(chan, time, ints, lang, format, timezone)); 02982 } else if (!strcasecmp(lang, "gr") ) { /* Greek syntax */ 02983 return(ast_say_date_with_format_gr(chan, time, ints, lang, format, timezone)); 02984 } 02985 02986 /* Default to English */ 02987 return(ast_say_date_with_format_en(chan, time, ints, lang, format, timezone)); 02988 }
| int ast_say_datetime | ( | struct ast_channel * | chan, | |
| time_t | t, | |||
| const char * | ints, | |||
| const char * | lang | |||
| ) |
Definition at line 5266 of file say.c.
References ast_say_datetime_de(), ast_say_datetime_en(), ast_say_datetime_fr(), ast_say_datetime_gr(), ast_say_datetime_nl(), ast_say_datetime_pt(), and ast_say_datetime_tw().
Referenced by datetime_exec().
05267 { 05268 if (!strcasecmp(lang, "en") ) { /* English syntax */ 05269 return(ast_say_datetime_en(chan, t, ints, lang)); 05270 } else if (!strcasecmp(lang, "de") ) { /* German syntax */ 05271 return(ast_say_datetime_de(chan, t, ints, lang)); 05272 } else if (!strcasecmp(lang, "fr") ) { /* French syntax */ 05273 return(ast_say_datetime_fr(chan, t, ints, lang)); 05274 } else if (!strcasecmp(lang, "nl") ) { /* Dutch syntax */ 05275 return(ast_say_datetime_nl(chan, t, ints, lang)); 05276 } else if (!strcasecmp(lang, "pt") ) { /* Portuguese syntax */ 05277 return(ast_say_datetime_pt(chan, t, ints, lang)); 05278 } else if (!strcasecmp(lang, "tw") ) { /* Taiwanese syntax */ 05279 return(ast_say_datetime_tw(chan, t, ints, lang)); 05280 } else if (!strcasecmp(lang, "gr") ) { /* Greek syntax */ 05281 return(ast_say_datetime_gr(chan, t, ints, lang)); 05282 } 05283 05284 /* Default to English */ 05285 return(ast_say_datetime_en(chan, t, ints, lang)); 05286 }
| int ast_say_datetime_from_now | ( | struct ast_channel * | chan, | |
| time_t | t, | |||
| const char * | ints, | |||
| const char * | lang | |||
| ) |
Definition at line 5545 of file say.c.
References ast_say_datetime_from_now_en(), ast_say_datetime_from_now_fr(), and ast_say_datetime_from_now_pt().
05546 { 05547 if (!strcasecmp(lang, "en") ) { /* English syntax */ 05548 return(ast_say_datetime_from_now_en(chan, t, ints, lang)); 05549 } else if (!strcasecmp(lang, "fr") ) { /* French syntax */ 05550 return(ast_say_datetime_from_now_fr(chan, t, ints, lang)); 05551 } else if (!strcasecmp(lang, "pt") ) { /* Portuguese syntax */ 05552 return(ast_say_datetime_from_now_pt(chan, t, ints, lang)); 05553 } 05554 05555 /* Default to English */ 05556 return(ast_say_datetime_from_now_en(chan, t, ints, lang)); 05557 }
| int ast_say_digit_str | ( | struct ast_channel * | chan, | |
| const char * | num, | |||
| const char * | ints, | |||
| const char * | lang | |||
| ) |
Definition at line 274 of file say.c.
References ast_say_digit_str_full().
Referenced by invent_message(), mgcp_ss(), pbx_builtin_saydigits(), play_message_callerid(), skinny_ss(), and ss_thread().
00275 { 00276 return ast_say_digit_str_full(chan, str, ints, lang, -1, -1); 00277 }
| int ast_say_digit_str_full | ( | struct ast_channel * | chan, | |
| const char * | num, | |||
| const char * | ints, | |||
| const char * | lang, | |||
| int | audiofd, | |||
| int | ctrlfd | |||
| ) |
Definition at line 224 of file say.c.
References ast_stopstream(), ast_streamfile(), ast_waitstream(), and ast_waitstream_full().
Referenced by ast_say_digit_str(), ast_say_digits_full(), and handle_saydigits().
00225 { 00226 const char *fn; 00227 char fnbuf[256]; 00228 int num = 0; 00229 int res = 0; 00230 00231 while (str[num] && !res) { 00232 fn = NULL; 00233 switch (str[num]) { 00234 case ('*'): 00235 fn = "digits/star"; 00236 break; 00237 case ('#'): 00238 fn = "digits/pound"; 00239 break; 00240 case ('-'): 00241 fn = "digits/minus"; 00242 break; 00243 case '0': 00244 case '1': 00245 case '2': 00246 case '3': 00247 case '4': 00248 case '5': 00249 case '6': 00250 case '7': 00251 case '8': 00252 case '9': 00253 strcpy(fnbuf, "digits/X"); 00254 fnbuf[7] = str[num]; 00255 fn = fnbuf; 00256 break; 00257 } 00258 if (fn) { 00259 res = ast_streamfile(chan, fn, lang); 00260 if (!res) { 00261 if ((audiofd > -1) && (ctrlfd > -1)) 00262 res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); 00263 else 00264 res = ast_waitstream(chan, ints); 00265 } 00266 ast_stopstream(chan); 00267 } 00268 num++; 00269 } 00270 00271 return res; 00272 }
| int ast_say_digits | ( | struct ast_channel * | chan, | |
| int | num, | |||
| const char * | ints, | |||
| const char * | lang | |||
| ) |
Definition at line 287 of file say.c.
References ast_say_digits_full().
Referenced by ast_park_call(), chanspy_exec(), conf_exec(), parkandannounce_exec(), and rpt_tele_thread().
00288 { 00289 return ast_say_digits_full(chan, num, ints, lang, -1, -1); 00290 }
| int ast_say_digits_full | ( | struct ast_channel * | chan, | |
| int | num, | |||
| const char * | ints, | |||
| const char * | lang, | |||
| int | audiofd, | |||
| int | ctrlfd | |||
| ) |
Definition at line 279 of file say.c.
References ast_say_digit_str_full().
Referenced by ast_say_digits(), ast_say_enumeration_full_da(), ast_say_enumeration_full_de(), ast_say_number_full_cz(), 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_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_tw().
00280 { 00281 char fn2[256]; 00282 00283 snprintf(fn2, sizeof(fn2), "%d", num); 00284 return ast_say_digit_str_full(chan, fn2, ints, lang, audiofd, ctrlfd); 00285 }
| int ast_say_enumeration | ( | struct ast_channel * | chan, | |
| int | num, | |||
| const char * | ints, | |||
| const char * | lang, | |||
| const char * | options | |||
| ) |
ast_say_enumeration: call language-specific functions without file descriptors
Definition at line 2301 of file say.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(), and ast_say_date_with_format_en().
02302 { 02303 return(ast_say_enumeration_full(chan, num, ints, language, options, -1, -1)); 02304 }
| int ast_say_enumeration_full | ( | struct ast_channel * | chan, | |
| int | num, | |||
| const char * | ints, | |||
| const char * | lang, | |||
| const char * | options, | |||
| int | audiofd, | |||
| int | ctrlfd | |||
| ) |
ast_say_enumeration_full: call language-specific functions
Definition at line 2286 of file say.c.
References ast_say_enumeration_full_da(), ast_say_enumeration_full_de(), and ast_say_enumeration_full_en().
Referenced by ast_say_enumeration().
02287 { 02288 if (!strcasecmp(language,"en") ) { /* English syntax */ 02289 return(ast_say_enumeration_full_en(chan, num, ints, language, audiofd, ctrlfd)); 02290 } else if (!strcasecmp(language, "da") ) { /* Danish syntax */ 02291 return(ast_say_enumeration_full_da(chan, num, ints, language, options, audiofd, ctrlfd)); 02292 } else if (!strcasecmp(language, "de") ) { /* German syntax */ 02293 return(ast_say_enumeration_full_de(chan, num, ints, language, options, audiofd, ctrlfd)); 02294 } 02295 02296 /* Default to english */ 02297 return(ast_say_enumeration_full_en(chan, num, ints, language, audiofd, ctrlfd)); 02298 }
| int ast_say_number | ( | struct ast_channel * | chan, | |
| int | num, | |||
| const char * | ints, | |||
| const char * | lang, | |||
| const char * | options | |||
| ) |
ast_say_number: call language-specific functions without file descriptors
Definition at line 469 of file say.c.
References ast_say_number_full().
Referenced by ast_say_date_da(), ast_say_date_de(), ast_say_date_en(), ast_say_date_fr(), ast_say_date_gr(), 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_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_pt(), ast_say_datetime_pt(), ast_say_datetime_tw(), ast_say_time_de(), ast_say_time_en(), ast_say_time_fr(), ast_say_time_gr(), ast_say_time_nl(), ast_say_time_pt(), ast_say_time_tw(), 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(), and vm_intro_pt().
00470 { 00471 return(ast_say_number_full(chan, num, ints, language, options, -1, -1)); 00472 }
| int ast_say_number_full | ( | struct ast_channel * | chan, | |
| int | num, | |||
| const char * | ints, | |||
| const char * | lang, | |||
| const char * | options, | |||
| int | audiofd, | |||
| int | ctrlfd | |||
| ) |
ast_say_number_full: call language-specific functions
Definition at line 426 of file say.c.
References ast_say_number_full_cz(), 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_gr(), ast_say_number_full_he(), ast_say_number_full_it(), ast_say_number_full_nl(), ast_say_number_full_no(), ast_say_number_full_pl(), ast_say_number_full_pt(), ast_say_number_full_ru(), ast_say_number_full_se(), and ast_say_number_full_tw().
Referenced by ast_say_number(), and handle_saynumber().
00427 { 00428 if (!strcasecmp(language,"en") ) { /* English syntax */ 00429 return(ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd)); 00430 } else if (!strcasecmp(language, "cz") ) { /* Czech syntax */ 00431 return(ast_say_number_full_cz(chan, num, ints, language, options, audiofd, ctrlfd)); 00432 } else if (!strcasecmp(language, "da") ) { /* Danish syntax */ 00433 return(ast_say_number_full_da(chan, num, ints, language, options, audiofd, ctrlfd)); 00434 } else if (!strcasecmp(language, "de") ) { /* German syntax */ 00435 return(ast_say_number_full_de(chan, num, ints, language, options, audiofd, ctrlfd)); 00436 } else if (!strcasecmp(language, "en_GB") ) { /* British syntax */ 00437 return(ast_say_number_full_en_GB(chan, num, ints, language, audiofd, ctrlfd)); 00438 } else if (!strcasecmp(language, "no") ) { /* Norwegian syntax */ 00439 return(ast_say_number_full_no(chan, num, ints, language, options, audiofd, ctrlfd)); 00440 } else if (!strcasecmp(language, "es") || !strcasecmp(language, "mx")) { /* Spanish syntax */ 00441 return(ast_say_number_full_es(chan, num, ints, language, options, audiofd, ctrlfd)); 00442 } else if (!strcasecmp(language, "fr") ) { /* French syntax */ 00443 return(ast_say_number_full_fr(chan, num, ints, language, options, audiofd, ctrlfd)); 00444 } else if (!strcasecmp(language, "he") ) { /* Hebrew syntax */ 00445 return(ast_say_number_full_he(chan, num, ints, language, options, audiofd, ctrlfd)); 00446 } else if (!strcasecmp(language, "it") ) { /* Italian syntax */ 00447 return(ast_say_number_full_it(chan, num, ints, language, audiofd, ctrlfd)); 00448 } else if (!strcasecmp(language, "nl") ) { /* Dutch syntax */ 00449 return(ast_say_number_full_nl(chan, num, ints, language, audiofd, ctrlfd)); 00450 } else if (!strcasecmp(language, "pl") ) { /* Polish syntax */ 00451 return(ast_say_number_full_pl(chan, num, ints, language, options, audiofd, ctrlfd)); 00452 } else if (!strcasecmp(language, "pt") ) { /* Portuguese syntax */ 00453 return(ast_say_number_full_pt(chan, num, ints, language, options, audiofd, ctrlfd)); 00454 } else if (!strcasecmp(language, "se") ) { /* Swedish syntax */ 00455 return(ast_say_number_full_se(chan, num, ints, language, options, audiofd, ctrlfd)); 00456 } else if (!strcasecmp(language, "tw")) { /* Taiwanese syntax */ 00457 return(ast_say_number_full_tw(chan, num, ints, language, audiofd, ctrlfd)); 00458 } else if (!strcasecmp(language, "gr") ) { /* Greek syntax */ 00459 return(ast_say_number_full_gr(chan, num, ints, language, audiofd, ctrlfd)); 00460 } else if (!strcasecmp(language, "ru") ) { /* Russian syntax */ 00461 return(ast_say_number_full_ru(chan, num, ints, language, options, audiofd, ctrlfd)); 00462 } 00463 00464 /* Default to english */ 00465 return(ast_say_number_full_en(chan, num, ints, language, audiofd, ctrlfd)); 00466 }
| int ast_say_phonetic_str | ( | struct ast_channel * | chan, | |
| const char * | num, | |||
| const char * | ints, | |||
| const char * | lang | |||
| ) |
Definition at line 219 of file say.c.
References ast_say_phonetic_str_full().
Referenced by pbx_builtin_sayphonetic().
00220 { 00221 return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1); 00222 }
| int ast_say_phonetic_str_full | ( | struct ast_channel * | chan, | |
| const char * | num, | |||
| const char * | ints, | |||
| const char * | lang, | |||
| int | audiofd, | |||
| int | ctrlfd | |||
| ) |
Definition at line 141 of file say.c.
References ast_stopstream(), ast_streamfile(), ast_waitstream(), and ast_waitstream_full().
Referenced by ast_say_phonetic_str(), and handle_sayphonetic().
00142 { 00143 const char *fn; 00144 char fnbuf[256]; 00145 char ltr; 00146 int num = 0; 00147 int res = 0; 00148 00149 while (str[num] && !res) { 00150 fn = NULL; 00151 switch (str[num]) { 00152 case ('*'): 00153 fn = "digits/star"; 00154 break; 00155 case ('#'): 00156 fn = "digits/pound"; 00157 break; 00158 case ('!'): 00159 fn = "letters/exclaimation-point"; 00160 break; 00161 case ('@'): 00162 fn = "letters/at"; 00163 break; 00164 case ('$'): 00165 fn = "letters/dollar"; 00166 break; 00167 case ('-'): 00168 fn = "letters/dash"; 00169 break; 00170 case ('.'): 00171 fn = "letters/dot"; 00172 break; 00173 case ('='): 00174 fn = "letters/equals"; 00175 break; 00176 case ('+'): 00177 fn = "letters/plus"; 00178 break; 00179 case ('/'): 00180 fn = "letters/slash"; 00181 break; 00182 case (' '): 00183 fn = "letters/space"; 00184 break; 00185 case ('0'): 00186 case ('1'): 00187 case ('2'): 00188 case ('3'): 00189 case ('4'): 00190 case ('5'): 00191 case ('6'): 00192 case ('7'): 00193 case ('8'): 00194 strcpy(fnbuf, "digits/X"); 00195 fnbuf[7] = str[num]; 00196 fn = fnbuf; 00197 break; 00198 default: /* '9' falls here... */ 00199 ltr = str[num]; 00200 if ('A' <= ltr && ltr <= 'Z') ltr += 'a' - 'A'; /* file names are all lower-case */ 00201 strcpy(fnbuf, "phonetic/X_p"); 00202 fnbuf[9] = ltr; 00203 fn = fnbuf; 00204 } 00205 res = ast_streamfile(chan, fn, lang); 00206 if (!res) { 00207 if ((audiofd > -1) && (ctrlfd > -1)) 00208 res = ast_waitstream_full(chan, ints, audiofd, ctrlfd); 00209 else 00210 res = ast_waitstream(chan, ints); 00211 } 00212 ast_stopstream(chan); 00213 num++; 00214 } 00215 00216 return res; 00217 }
| int ast_say_time | ( | struct ast_channel * | chan, | |
| time_t | t, | |||
| const char * | ints, | |||
| const char * | lang | |||
| ) |
Definition at line 5077 of file say.c.
References ast_say_time_de(), ast_say_time_en(), ast_say_time_fr(), ast_say_time_gr(), ast_say_time_nl(), ast_say_time_pt(), and ast_say_time_tw().
Referenced by ast_say_datetime_de(), ast_say_datetime_from_now_en(), ast_say_datetime_from_now_fr(), ast_say_datetime_from_now_pt(), ast_say_datetime_nl(), handle_saytime(), and rpt_tele_thread().
05078 { 05079 if (!strcasecmp(lang, "en") ) { /* English syntax */ 05080 return(ast_say_time_en(chan, t, ints, lang)); 05081 } else if (!strcasecmp(lang, "de") ) { /* German syntax */ 05082 return(ast_say_time_de(chan, t, ints, lang)); 05083 } else if (!strcasecmp(lang, "fr") ) { /* French syntax */ 05084 return(ast_say_time_fr(chan, t, ints, lang)); 05085 } else if (!strcasecmp(lang, "nl") ) { /* Dutch syntax */ 05086 return(ast_say_time_nl(chan, t, ints, lang)); 05087 } else if (!strcasecmp(lang, "pt") ) { /* Portuguese syntax */ 05088 return(ast_say_time_pt(chan, t, ints, lang)); 05089 } else if (!strcasecmp(lang, "tw") ) { /* Taiwanese syntax */ 05090 return(ast_say_time_tw(chan, t, ints, lang)); 05091 } else if (!strcasecmp(lang, "gr") ) { /* Greek syntax */ 05092 return(ast_say_time_gr(chan, t, ints, lang)); 05093 } 05094 05095 /* Default to English */ 05096 return(ast_say_time_en(chan, t, ints, lang)); 05097 }
1.5.1