RTS API Documentation
1.10.11
|
Data Structures | |
struct | profile_node_s |
struct | switch_caller_profile |
Call Specific Data. More... | |
struct | switch_caller_application |
An Abstract Representation of a dialplan Application. More... | |
struct | switch_caller_extension |
An Abstract Representation of a dialplan extension. More... | |
Macros | |
#define | profile_dup(a, b, p) if (!zstr(a)) { b = switch_core_strdup(p, a); } else { b = SWITCH_BLANK_STRING; } |
#define | profile_dup_clean(a, b, p) if (!zstr(a)) { b = switch_var_clean_string(switch_clean_string(switch_core_strdup(p, a)));} else { b = SWITCH_BLANK_STRING; } |
Typedefs | |
typedef struct profile_node_s | profile_node_t |
Functions | |
switch_caller_extension_t * | switch_caller_extension_new (_In_ switch_core_session_t *session, _In_z_ const char *extension_name, _In_z_ const char *extension_number) |
Create a new extension with desired parameters. More... | |
switch_status_t | switch_caller_extension_clone (switch_caller_extension_t **new_ext, switch_caller_extension_t *orig, switch_memory_pool_t *pool) |
void | switch_caller_extension_add_application (_In_ switch_core_session_t *session, _In_ switch_caller_extension_t *caller_extension, _In_z_ const char *application_name, _In_z_ const char *extra_data) |
Add an application (instruction) to the given extension. More... | |
void | switch_caller_extension_add_application_printf (_In_ switch_core_session_t *session, _In_ switch_caller_extension_t *caller_extension, _In_z_ const char *application_name, _In_z_ const char *fmt,...) |
Add an application (instruction) to the given extension. More... | |
_Check_return_ _Ret_opt_z_ const char * | switch_caller_get_field_by_name (_In_ switch_caller_profile_t *caller_profile, _In_z_ const char *name) |
Get the value of a field in a caller profile based on it's name. More... | |
switch_caller_profile_t * | switch_caller_profile_new (_In_ switch_memory_pool_t *pool, _In_opt_z_ const char *username, _In_opt_z_ const char *dialplan, _In_opt_z_ const char *caller_id_name, _In_opt_z_ const char *caller_id_number, _In_opt_z_ const char *network_addr, _In_opt_z_ const char *ani, _In_opt_z_ const char *aniii, _In_opt_z_ const char *rdnis, _In_opt_z_ const char *source, _In_opt_z_ const char *context, _In_opt_z_ const char *destination_number) |
Create a new caller profile object. More... | |
switch_caller_profile_t * | switch_caller_profile_clone (_In_ switch_core_session_t *session, _In_ switch_caller_profile_t *tocopy) |
Clone an existing caller profile object. More... | |
switch_caller_profile_t * | switch_caller_profile_dup (_In_ switch_memory_pool_t *pool, _In_ switch_caller_profile_t *tocopy) |
Duplicate an existing caller profile object. More... | |
void | switch_caller_profile_event_set_data (_In_ switch_caller_profile_t *caller_profile, _In_opt_z_ const char *prefix, _In_ switch_event_t *event) |
Add headers to an existing event in regards to a specific profile. More... | |
This module implements a caller profile which is a group of information about a connected endpoint such as common caller id and other useful information such as ip address and destination number. A connected session's channel has up to 3 profiles: It's own, that of the session who spawned it and that of the session it has spawned.
In addition, this module implements an abstract interface for extensions and applications. A connected session's channel has one extension object which may have one or more applications linked into a stack which will be executed in order by the session's state machine when the current state is CS_EXECUTE.
#define profile_dup | ( | a, | |
b, | |||
p | |||
) | if (!zstr(a)) { b = switch_core_strdup(p, a); } else { b = SWITCH_BLANK_STRING; } |
Definition at line 60 of file switch_caller.h.
Referenced by switch_caller_profile_dup().
#define profile_dup_clean | ( | a, | |
b, | |||
p | |||
) | if (!zstr(a)) { b = switch_var_clean_string(switch_clean_string(switch_core_strdup(p, a)));} else { b = SWITCH_BLANK_STRING; } |
Definition at line 61 of file switch_caller.h.
Referenced by switch_caller_profile_new().
typedef struct profile_node_s profile_node_t |
void switch_caller_extension_add_application | ( | _In_ switch_core_session_t * | session, |
_In_ switch_caller_extension_t * | caller_extension, | ||
_In_z_ const char * | application_name, | ||
_In_z_ const char * | extra_data | ||
) |
Add an application (instruction) to the given extension.
session | session associated with the extension (bound by scope) |
caller_extension | extension to add the application to |
application_name | the name of the application |
extra_data | optional argument to the application |
Referenced by audio_bridge_thread(), recover_callback(), switch_channel_caller_extension_masquerade(), and switch_ivr_parse_event().
void switch_caller_extension_add_application_printf | ( | _In_ switch_core_session_t * | session, |
_In_ switch_caller_extension_t * | caller_extension, | ||
_In_z_ const char * | application_name, | ||
_In_z_ const char * | fmt, | ||
... | |||
) |
Add an application (instruction) to the given extension.
session | session associated with the extension (bound by scope) |
caller_extension | extension to add the application to |
application_name | the name of the application |
fmt | optional argument to the application (printf format string) |
switch_status_t switch_caller_extension_clone | ( | switch_caller_extension_t ** | new_ext, |
switch_caller_extension_t * | orig, | ||
switch_memory_pool_t * | pool | ||
) |
Definition at line 466 of file switch_caller.c.
References switch_caller_application::application_data, switch_caller_application::application_name, switch_caller_extension::applications, switch_caller_extension::current_application, switch_caller_extension::extension_name, switch_caller_extension::extension_number, switch_caller_extension::last_application, switch_caller_application::next, switch_core_alloc, switch_core_strdup, SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
Referenced by switch_channel_set_caller_profile().
switch_caller_extension_t* switch_caller_extension_new | ( | _In_ switch_core_session_t * | session, |
_In_z_ const char * | extension_name, | ||
_In_z_ const char * | extension_number | ||
) |
Create a new extension with desired parameters.
session | session associated with the extension (bound by scope) |
extension_name | extension name |
extension_number | extension number |
Referenced by audio_bridge_thread(), recover_callback(), switch_channel_caller_extension_masquerade(), and switch_ivr_parse_event().
_Check_return_ _Ret_opt_z_ const char* switch_caller_get_field_by_name | ( | _In_ switch_caller_profile_t * | caller_profile, |
_In_z_ const char * | name | ||
) |
Get the value of a field in a caller profile based on it's name.
caller_profile | The caller profile |
name | the name |
Referenced by switch_channel_get_variable_dup().
switch_caller_profile_t* switch_caller_profile_clone | ( | _In_ switch_core_session_t * | session, |
_In_ switch_caller_profile_t * | tocopy | ||
) |
Clone an existing caller profile object.
session | session associated with the profile (bound by scope) |
tocopy | the existing profile |
Referenced by switch_channel_caller_extension_masquerade(), switch_channel_step_caller_profile(), switch_core_session_execute_exten(), switch_core_session_outgoing_channel(), switch_ivr_enterprise_originate(), switch_ivr_originate(), switch_ivr_session_transfer(), and switch_ivr_uuid_bridge().
switch_caller_profile_t* switch_caller_profile_dup | ( | _In_ switch_memory_pool_t * | pool, |
_In_ switch_caller_profile_t * | tocopy | ||
) |
Duplicate an existing caller profile object.
pool | pool to duplicate with |
tocopy | the existing profile |
Referenced by process_device_hup(), switch_ivr_enterprise_originate(), and switch_ivr_originate().
void switch_caller_profile_event_set_data | ( | _In_ switch_caller_profile_t * | caller_profile, |
_In_opt_z_ const char * | prefix, | ||
_In_ switch_event_t * | event | ||
) |
Add headers to an existing event in regards to a specific profile.
caller_profile | the desired profile |
prefix | a prefix string to all of the field names (for uniqueness) |
event | the event to add the information to |
Referenced by switch_channel_clear_device_record(), switch_channel_event_set_basic_data(), and switch_ivr_uuid_bridge().
switch_caller_profile_t* switch_caller_profile_new | ( | _In_ switch_memory_pool_t * | pool, |
_In_opt_z_ const char * | username, | ||
_In_opt_z_ const char * | dialplan, | ||
_In_opt_z_ const char * | caller_id_name, | ||
_In_opt_z_ const char * | caller_id_number, | ||
_In_opt_z_ const char * | network_addr, | ||
_In_opt_z_ const char * | ani, | ||
_In_opt_z_ const char * | aniii, | ||
_In_opt_z_ const char * | rdnis, | ||
_In_opt_z_ const char * | source, | ||
_In_opt_z_ const char * | context, | ||
_In_opt_z_ const char * | destination_number | ||
) |
Create a new caller profile object.
pool | memory pool to use |
username | tne username of the caller |
dialplan | name of the dialplan module in use |
caller_id_name | caller ID name |
caller_id_number | caller ID number |
network_addr | network address |
ani | ANI information |
aniii | ANI II information |
rdnis | RDNIS |
source | the source |
context | a logical context |
destination_number | destination number |
Referenced by switch_core_session_request_xml(), and switch_ivr_originate().