FreeSWITCH API Documentation  1.7.0
Macros | Functions | Variables
switch_ivr_say.c File Reference
#include <switch.h>
+ Include dependency graph for switch_ivr_say.c:

Go to the source code of this file.

Macros

#define say_file(...)
 
#define say_num(num, meth)
 

Functions

switch_say_gender_t switch_ivr_get_say_gender_by_name (const char *name)
 
switch_say_method_t switch_ivr_get_say_method_by_name (const char *name)
 
switch_say_type_t switch_ivr_get_say_type_by_name (const char *name)
 
switch_status_t switch_ivr_say_spell (switch_core_session_t *session, char *tosay, switch_say_args_t *say_args, switch_input_args_t *args)
 
switch_status_t switch_ivr_say_ip (switch_core_session_t *session, char *tosay, switch_say_callback_t number_func, switch_say_args_t *say_args, switch_input_args_t *args)
 

Variables

static char * SAY_METHOD_NAMES []
 
static char * SAY_TYPE_NAMES []
 
static char * SAY_GENDER_NAMES []
 

Macro Definition Documentation

#define say_file (   ...)
Value:
{ \
char tmp[80]; \
switch_snprintf(tmp, sizeof(tmp), __VA_ARGS__); \
if ((tstatus = \
switch_ivr_play_file(session, NULL, tmp, args)) \
return tstatus; \
} \
}} \
#define switch_channel_ready(_channel)
return
switch_status_t switch_ivr_play_file(switch_core_session_t *session, switch_file_handle_t *fh, const char *file, switch_input_args_t *args)
play a file from the disk to the session
int switch_snprintf(_Out_z_cap_(len) char *buf, _In_ switch_size_t len, _In_z_ _Printf_format_string_ const char *format,...)
_Ret_ switch_channel_t * switch_core_session_get_channel(_In_ switch_core_session_t *session)
Retrieve a pointer to the channel object associated with a given session.
if((uint32_t)(unpack->cur-unpack->buf) > unpack->buflen)
switch_core_session_t * session
switch_status_t
Common return values.

Definition at line 119 of file switch_ivr_say.c.

Referenced by switch_ivr_say_ip(), and switch_ivr_say_spell().

#define say_num (   num,
  meth 
)
Value:
{ \
char tmp[80]; \
switch_say_method_t smeth = say_args->method; \
switch_say_type_t stype = say_args->type; \
say_args->type = SST_ITEMS; say_args->method = meth; \
switch_snprintf(tmp, sizeof(tmp), "%u", (unsigned)num); \
if ((tstatus = \
number_func(session, tmp, say_args, args)) \
return tstatus; \
} \
say_args->method = smeth; say_args->type = stype; \
} \
return
int switch_snprintf(_Out_z_cap_(len) char *buf, _In_ switch_size_t len, _In_z_ _Printf_format_string_ const char *format,...)
if((uint32_t)(unpack->cur-unpack->buf) > unpack->buflen)
switch_core_session_t * session
switch_status_t
Common return values.
switch_say_type_t
Definition: switch_types.h:420
switch_say_method_t
Definition: switch_types.h:411

Definition at line 157 of file switch_ivr_say.c.

Referenced by switch_ivr_say_ip().

Variable Documentation

char* SAY_GENDER_NAMES[]
static
Initial value:
= {
"MASCULINE",
"FEMININE",
"NEUTER",
NULL
}

Definition at line 67 of file switch_ivr_say.c.

Referenced by switch_ivr_get_say_gender_by_name().

char* SAY_METHOD_NAMES[]
static
Initial value:
= {
"N/A",
"PRONOUNCED",
"ITERATED",
"COUNTED",
"PRONOUNCED_YEAR",
NULL
}

Definition at line 35 of file switch_ivr_say.c.

Referenced by switch_ivr_get_say_method_by_name().

char* SAY_TYPE_NAMES[]
static
Initial value:
= {
"NUMBER",
"ITEMS",
"PERSONS",
"MESSAGES",
"CURRENCY",
"TIME_MEASUREMENT",
"CURRENT_DATE",
"CURRENT_TIME",
"CURRENT_DATE_TIME",
"TELEPHONE_NUMBER",
"TELEPHONE_EXTENSION",
"URL",
"IP_ADDRESS",
"EMAIL_ADDRESS",
"POSTAL_ADDRESS",
"ACCOUNT_NUMBER",
"NAME_SPELLED",
"NAME_PHONETIC",
"SHORT_DATE_TIME",
NULL
}

Definition at line 44 of file switch_ivr_say.c.

Referenced by switch_ivr_get_say_type_by_name().