55 "TELEPHONE_EXTENSION",
119 #define say_file(...) { \
121 switch_status_t tstatus; \
122 switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__); \
124 switch_ivr_play_file(session, NULL, tmp, args)) \
125 != SWITCH_STATUS_SUCCESS){ \
128 if (!switch_channel_ready(switch_core_session_get_channel(session))) { \
129 return SWITCH_STATUS_FALSE; \
139 for (p = tosay; p && *p; p++) {
140 int a = tolower((
int) *p);
141 if (a >=
'0' && a <=
'9') {
147 say_file(
"phonetic-ascii/%d.wav", a);
157 #define say_num(num, meth) { \
159 switch_status_t tstatus; \
160 switch_say_method_t smeth = say_args->method; \
161 switch_say_type_t stype = say_args->type; \
162 say_args->type = SST_ITEMS; say_args->method = meth; \
163 switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num); \
165 number_func(session, tmp, say_args, args)) \
166 != SWITCH_STATUS_SUCCESS) { \
169 say_args->method = smeth; say_args->type = stype; \
187 if (!(b = strchr(a,
'.'))) {
193 if (!(c = strchr(b,
'.'))) {
199 if (!(d = strchr(c,
'.'))) {
205 say_num(atoi(a), say_args->method);
207 say_num(atoi(b), say_args->method);
209 say_num(atoi(c), say_args->method);
211 say_num(atoi(d), say_args->method);
static char * SAY_METHOD_NAMES[]
#define arg_recursion_check_stop(_args)
switch_status_t(* switch_say_callback_t)(switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
#define say_num(num, meth)
static char * SAY_GENDER_NAMES[]
#define arg_recursion_check_start(_args)
switch_status_t
Common return values.
#define switch_goto_status(_status, _label)
#define switch_core_session_strdup(_session, _todup)
Copy a string using memory allocation from a session's pool.
static char * SAY_TYPE_NAMES[]