33 #define DEFAULT_LEAD_FRAMES 10 58 unsigned char *text_framedata = NULL;
63 text_framesize = 1024;
85 if (inuse + 4 > text_framesize) {
86 void *tmp = malloc(inuse + 1024);
89 memcpy(tmp, text_framedata, text_framesize);
91 text_framesize = inuse + 1024;
103 for (x = 0; x < bytes - 2; x++) {
104 if (text_framedata[x] == 0xe2 && text_framedata[x+1] == 0x80 && text_framedata[x+2] == 0xa8) {
105 text_framedata[x] =
'\0';
106 bytes = strlen((
char *)text_framedata);
112 if (!bytes)
continue;
114 *(text_framedata + bytes) =
'\r';
115 *(text_framedata + bytes + 1) =
'\n';
116 *(text_framedata + bytes + 2) =
'\0';
118 frame.
data = text_framedata;
145 #ifdef SWITCH_VIDEO_IN_THREADS 154 int set_decoded_read = 0, refresh_timer = 0;
155 int refresh_cnt = 300;
156 int pass_val = 0, last_pass_val = 0;
174 refresh_timer = refresh_cnt;
184 if (pass_val != last_pass_val) {
186 last_pass_val = pass_val;
191 refresh_timer = refresh_cnt;
203 if (set_decoded_read) {
205 set_decoded_read = 0;
206 refresh_timer = refresh_cnt;
210 if (session_a_codec_implementation.
impl_id != session_b_codec_implementation.
impl_id ||
213 set_decoded_read = 1;
214 refresh_timer = refresh_cnt;
220 if (refresh_timer > 0 && (refresh_timer % 100) == 0) {
248 if (set_decoded_read) {
267 static void launch_video(
struct vid_helper *vh)
318 if ((p = strrchr(number,
'/'))) {
321 if ((p = strrchr(name,
'/'))) {
330 msg->
from = __FILE__;
359 int stream_id = 0, pre_b = 0, ans_a = 0, ans_b = 0, originator = 0;
366 uint32_t read_frame_count = 0;
367 const char *app_name = NULL, *app_arg = NULL;
368 int inner_bridge = 0, exec_check = 0;
372 const char *silence_var;
373 int silence_val = 0, bypass_media_after_bridge = 0;
374 const char *bridge_answer_timeout = NULL;
375 int bridge_filter_dtmf, answer_timeout, sent_update = 0;
376 time_t answer_limit = 0;
378 const char *exec_data = NULL;
380 uint32_t txt_launch = 0;
382 const char *banner_file = NULL;
383 int played_banner = 0, banner_counter = 0;
384 int pass_val = 0, last_pass_val = 0;
386 #ifdef SWITCH_VIDEO_IN_THREADS 388 uint32_t vid_launch = 0;
423 if ((answer_timeout = atoi(bridge_answer_timeout)) >= 0) {
440 goto end_of_bridge_loop;
454 if (bypass_media_after_bridge) {
458 if (!source_a) source_a =
"";
459 if (!source_b) source_b =
"";
463 bypass_media_after_bridge = 0;
471 goto end_of_bridge_loop;
477 if ((silence_val = atoi(silence_var)) < -1) {
497 silence_frame.
codec = &silence_codec;
498 silence_frame.
data = silence_data;
499 silence_frame.
buflen =
sizeof(silence_data);
519 if (pass_val != last_pass_val) {
521 last_pass_val = pass_val;
531 goto end_of_bridge_loop;
535 goto end_of_bridge_loop;
542 goto end_of_bridge_loop;
546 goto end_of_bridge_loop;
553 hmsg.
from = __FILE__;
578 goto end_of_bridge_loop;
592 #ifdef SWITCH_VIDEO_IN_THREADS 614 ++banner_counter > 100 &&
619 if (!b_banner_file) {
658 exec_app = exec_data = NULL;
670 goto end_of_bridge_loop;
680 if (input_callback) {
688 goto end_of_bridge_loop;
692 if (bridge_filter_dtmf) {
705 if (input_callback) {
720 goto end_of_bridge_loop;
732 goto end_of_bridge_loop;
738 goto end_of_bridge_loop;
751 if (ans_a != ans_b) {
762 goto end_of_bridge_loop;
779 #ifndef SWITCH_VIDEO_IN_THREADS 785 goto end_of_bridge_loop;
807 read_frame = &silence_frame;
821 goto end_of_bridge_loop;
826 goto end_of_bridge_loop;
835 #ifdef SWITCH_VIDEO_IN_THREADS 889 #ifdef SWITCH_VIDEO_IN_THREADS 955 char *argv[4] = { 0 };
1150 const char *other_uuid = NULL;
1162 int ready_a, ready_b;
1164 int max = 1000, loops = max;
1176 if (state <
CS_HANGUP && state == running_state) {
1219 if (!ready_a || !ready_b) {
1226 if (ready_a && cid) {
1276 if (other_session) {
1278 other_session = NULL;
1336 msg->
from = __FILE__;
1340 switch_core_event_hook_remove_state_change(session,
hanguphook);
1358 msg.
from = __FILE__;
1361 switch_core_event_hook_add_state_change(session,
hanguphook);
1367 switch_core_event_hook_add_recv_dtmf(session,
sb_on_dtmf);
1398 "%s not hibernating due to active digit parser, semi-hibernation engaged.\n",
switch_channel_get_name(channel));
1430 switch_core_event_hook_remove_recv_dtmf(session,
sb_on_dtmf);
1616 void *peer_session_data)
1648 b_leg->
session = peer_session;
1673 const char *app, *data;
1744 msg.
from = __FILE__;
1828 if (copy_xml_cdr || copy_json_cdr) {
1829 char *cdr_text = NULL;
1841 if (copy_json_cdr) {
1845 cdr_text = cJSON_PrintUnformatted(cdr);
1888 msg.
from = __FILE__;
1910 explicit = !strcasecmp(hup,
"explicit");
1937 }
else if (answered) {
2047 swap_session = originator_session;
2048 originator_session = originatee_session;
2049 originatee_session = swap_session;
2051 swap_channel = originator_channel;
2052 originator_channel = originatee_channel;
2053 originatee_channel = swap_channel;
2128 #ifdef DEEP_DEBUG_CID 2151 #ifdef DEEP_DEBUG_CID 2261 const char *buuid, *var;
#define SWITCH_SIGNAL_BRIDGE_VARIABLE
switch_channel_state_t switch_channel_get_state(switch_channel_t *channel)
Get the current state of a channel in the state engine.
#define switch_event_fire(event)
Fire an event filling in most of the arguements with obvious values.
#define switch_channel_hangup(channel, hangup_cause)
Hangup a channel flagging it's state machine to end.
void switch_xml_free(_In_opt_ switch_xml_t xml)
frees the memory allocated for an switch_xml structure
#define switch_channel_answer(channel)
Answer a channel (initiate/acknowledge a successful connection)
switch_status_t switch_channel_execute_on(switch_channel_t *channel, const char *variable_prefix)
switch_event_types_t event_id
void switch_channel_set_flag_recursive(switch_channel_t *channel, switch_channel_flag_t flag)
static switch_bool_t switch_true(const char *expr)
Evaluate the truthfullness of a string expression.
#define SWITCH_CHANNEL_SESSION_LOG(x)
An Abstract Representation of a dialplan extension.
#define SWITCH_LAST_BRIDGE_VARIABLE
switch_core_session_message_types_t message_id
void switch_core_session_reset(_In_ switch_core_session_t *session, switch_bool_t flush_dtmf, switch_bool_t reset_read_codec)
Reset the buffers and resampler on a session.
switch_size_t switch_buffer_read(_In_ switch_buffer_t *buffer, _In_ void *data, _In_ switch_size_t datalen)
Read data from a switch_buffer_t up to the ammount of datalen if it is available. Remove read data fr...
void switch_core_session_passthru(switch_core_session_t *session, switch_media_type_t type, switch_bool_t on)
switch_status_t switch_channel_set_variable_name_printf(switch_channel_t *channel, const char *val, const char *fmt,...)
const char *const const double number
#define SWITCH_COPY_XML_CDR_VARIABLE
switch_core_session_t * session
#define SWITCH_PARK_AFTER_EARLY_BRIDGE_VARIABLE
const char * switch_channel_get_partner_uuid(switch_channel_t *channel)
#define switch_channel_set_state(channel, state)
Set the current state of a channel.
switch_status_t switch_channel_set_private(switch_channel_t *channel, const char *key, const void *private_info)
Set private data on channel.
const char * switch_channel_cause2str(_In_ switch_call_cause_t cause)
return a cause string for a given cause
void switch_channel_clear_state_flag(switch_channel_t *channel, switch_channel_flag_t flag)
switch_status_t switch_buffer_create_dynamic(_Out_ switch_buffer_t **buffer, _In_ switch_size_t blocksize, _In_ switch_size_t start_len, _In_ switch_size_t max_len)
Allocate a new dynamic switch_buffer.
#define SWITCH_TRANSFER_SOURCE_VARIABLE
#define SWITCH_API_BRIDGE_END_VARIABLE
switch_status_t switch_ivr_sleep(switch_core_session_t *session, uint32_t ms, switch_bool_t sync, switch_input_args_t *args)
Wait for time to pass for a specified number of milliseconds.
static switch_status_t uuid_bridge_on_soft_execute(switch_core_session_t *session)
switch_status_t switch_ivr_nomedia(const char *uuid, switch_media_flag_t flags)
Signal a session to request indirect media allowing it to exchange media directly with another device...
#define switch_channel_stop_broadcast(_channel)
void switch_channel_set_bridge_time(switch_channel_t *channel)
#define switch_channel_up(_channel)
#define SWITCH_RECOMMENDED_BUFFER_SIZE
void switch_event_add_presence_data_cols(switch_channel_t *channel, switch_event_t *event, const char *prefix)
void switch_channel_event_set_data(_In_ switch_channel_t *channel, _In_ switch_event_t *event)
Add information about a given channel to an event object.
#define switch_core_strdup(_pool, _todup)
Copy a string using memory allocation from a given pool.
switch_core_session_t * session_a
switch_status_t switch_ivr_broadcast(const char *uuid, const char *path, switch_media_flag_t flags)
Signal the session to broadcast audio.
uint32_t decoded_bytes_per_packet
switch_status_t switch_core_session_read_video_frame(_In_ switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id)
Read a video frame from a session.
Representation of an event.
struct switch_ivr_bridge_data * other_leg_data
static void send_display(switch_core_session_t *session, switch_core_session_t *peer_session)
#define switch_channel_ready(_channel)
static switch_status_t audio_bridge_on_consume_media(switch_core_session_t *session)
switch_status_t switch_core_session_read_lock(_In_ switch_core_session_t *session)
Acquire a read lock on the session.
static const switch_state_handler_table_t uuid_bridge_state_handlers
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.
void switch_generate_sln_silence(int16_t *data, uint32_t samples, uint32_t channels, uint32_t divisor)
Generate static noise.
switch_channel_state_t switch_channel_get_running_state(switch_channel_t *channel)
void switch_channel_flip_cid(switch_channel_t *channel)
#define switch_channel_media_ready(_channel)
#define switch_channel_outbound_display(_channel)
A representation of an XML tree.
switch_status_t switch_core_codec_destroy(switch_codec_t *codec)
Destroy an initalized codec handle.
const char * switch_channel_get_variable_dup(switch_channel_t *channel, const char *varname, switch_bool_t dup, int idx)
Retrieve a variable from a given channel.
const char * string_array_arg[MESSAGE_STRING_ARG_MAX]
static void cleanup_proxy_mode_b(switch_core_session_t *session)
void switch_channel_set_state_flag(switch_channel_t *channel, switch_channel_flag_t flag)
Set given flag(s) on a given channel to be applied on the next state change.
static switch_status_t sb_on_dtmf(switch_core_session_t *session, const switch_dtmf_t *dtmf, switch_dtmf_direction_t direction)
switch_status_t switch_core_session_queue_message(_In_ switch_core_session_t *session, _In_ switch_core_session_message_t *message)
Queue a message on a session.
switch_status_t switch_ivr_parse_all_events(switch_core_session_t *session)
Parse all commands from an event.
switch_status_t switch_ivr_media(const char *uuid, switch_media_flag_t flags)
Signal a session to request direct media access to it's remote end.
switch_status_t switch_core_session_execute_application_async(switch_core_session_t *session, const char *app, const char *arg)
static switch_thread_t * thread
#define SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE
switch_size_t switch_buffer_write(_In_ switch_buffer_t *buffer, _In_bytecount_(datalen) const void *data, _In_ switch_size_t datalen)
Write data into a switch_buffer_t up to the length of datalen.
uint32_t switch_channel_test_flag(switch_channel_t *channel, switch_channel_flag_t flag)
Test for presence of given flag on a given channel.
switch_status_t switch_core_session_read_frame(_In_ switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id)
Read a frame from a session.
A message object designed to allow unlike technologies to exchange data.
#define SWITCH_COPY_JSON_CDR_VARIABLE
#define SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE
switch_status_t switch_core_session_get_video_write_impl(switch_core_session_t *session, switch_codec_implementation_t *impp)
#define SWITCH_PARK_AFTER_BRIDGE_VARIABLE
switch_status_t switch_ivr_session_transfer(_In_ switch_core_session_t *session, const char *extension, const char *dialplan, const char *context)
Transfer an existing session to another location.
switch_status_t switch_core_session_write_frame(_In_ switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)
Write a frame to a session.
void switch_channel_invert_cid(switch_channel_t *channel)
switch_status_t switch_core_session_get_read_impl(switch_core_session_t *session, switch_codec_implementation_t *impp)
_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.
switch_status_t switch_ivr_parse_next_event(switch_core_session_t *session)
#define SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE
#define SWITCH_EXEC_AFTER_BRIDGE_APP_VARIABLE
#define SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE
void switch_channel_mark_hold(switch_channel_t *channel, switch_bool_t on)
void switch_channel_wait_for_state(switch_channel_t *channel, switch_channel_t *other_channel, switch_channel_state_t want_state)
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.
#define SWITCH_BRIDGE_EXPORT_VARS_VARIABLE
#define switch_yield(ms)
Wait a desired number of microseconds and yield the CPU.
#define switch_channel_audio_sync(_c)
unsigned int switch_separate_string(_In_ char *buf, char delim, _Post_count_(return) char **array, unsigned int arraylen)
Separate a string into an array based on a character delimiter.
#define switch_channel_inbound_display(_channel)
char b_uuid[SWITCH_UUID_FORMATTED_LENGTH+1]
const char * callee_id_number
void switch_channel_process_export(switch_channel_t *channel, switch_channel_t *peer_channel, switch_event_t *var_event, const char *export_varname)
switch_status_t switch_channel_add_variable_var_check(switch_channel_t *channel, const char *varname, const char *value, switch_bool_t var_check, switch_stack_t stack)
#define switch_core_session_request_video_refresh(_s)
uint32_t actual_samples_per_second
switch_status_t switch_core_session_send_dtmf(_In_ switch_core_session_t *session, const switch_dtmf_t *dtmf)
Send DTMF to a session.
void switch_channel_clear_state_handler(switch_channel_t *channel, const switch_state_handler_table_t *state_handler)
clear a state handler table from a given channel
#define switch_channel_get_variable(_c, _v)
switch_status_t switch_channel_dequeue_dtmf(_In_ switch_channel_t *channel, _In_ switch_dtmf_t *dtmf)
Retrieve DTMF digits from a given channel.
switch_status_t switch_event_add_header_string(switch_event_t *event, switch_stack_t stack, const char *header_name, const char *data)
Add a string header to an event.
#define switch_zmalloc(ptr, len)
switch_status_t switch_ivr_bridge_bleg(switch_core_session_t *session, switch_core_session_t *peer_session, uint32_t max_wait_ms)
Bridge leaving b-leg in the control of another thread. Call from b-leg first then call switch_ivr_mul...
#define DEFAULT_LEAD_FRAMES
const char * caller_id_name
#define switch_channel_set_variable_partner(_channel, _var, _val)
#define switch_safe_free(it)
Free a pointer and set it to NULL unless it already is NULL.
#define SWITCH_BRIDGE_HANGUP_CAUSE_VARIABLE
switch_status_t switch_ivr_uuid_bridge(const char *originator_uuid, const char *originatee_uuid)
Bridge two existing sessions.
switch_status_t(* switch_input_callback_function_t)(switch_core_session_t *session, void *input, switch_input_type_t input_type, void *buf, unsigned int buflen)
#define SWITCH_BRIDGE_UUID_VARIABLE
#define switch_channel_down_nosig(_channel)
#define SWITCH_API_BRIDGE_START_VARIABLE
void switch_channel_set_caller_extension(switch_channel_t *channel, switch_caller_extension_t *caller_extension)
Assign a caller extension to a given channel.
An abstraction of a data frame.
#define SWITCH_TRANSFER_AFTER_EARLY_BRIDGE_VARIABLE
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.
void switch_channel_set_originator_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile)
Set the given channel's originator caller profile.
static switch_status_t hanguphook(switch_core_session_t *session)
#define switch_core_codec_init(_codec, _codec_name, _modname, _fmtp, _rate, _ms, _channels, _flags, _codec_settings, _pool)
Initialize a codec handle.
void switch_cond_next(void)
#define switch_core_session_get_partner(_session, _partner)
int microseconds_per_packet
char * switch_copy_string(_Out_z_cap_(dst_size) char *dst, _In_z_ const char *src, _In_ switch_size_t dst_size)
#define SWITCH_BRIDGE_VARIABLE
static switch_status_t switch_event_create_plain(switch_event_t **event, switch_event_types_t event_id)
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.
#define switch_core_session_receive_message(_session, _message)
void switch_core_session_rwunlock(_In_ switch_core_session_t *session)
Unlock a read or write lock on as given session.
void switch_core_session_video_reset(switch_core_session_t *session)
char * switch_core_session_get_uuid(_In_ switch_core_session_t *session)
Retrieve the unique identifier from a session.
switch_input_callback_function_t input_callback
static switch_status_t uuid_bridge_on_reset(switch_core_session_t *session)
static switch_status_t audio_bridge_on_exchange_media(switch_core_session_t *session)
switch_bool_t switch_core_session_transcoding(switch_core_session_t *session_a, switch_core_session_t *session_b, switch_media_type_t type)
static switch_status_t signal_bridge_on_hibernate(switch_core_session_t *session)
switch_status_t switch_core_session_write_video_frame(_In_ switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)
Write a video frame to a session.
switch_channel_state_t
Channel States (these are the defaults, CS_SOFT_EXECUTE, CS_EXCHANGE_MEDIA, and CS_CONSUME_MEDIA are ...
switch_status_t switch_ivr_3p_nomedia(const char *uuid, switch_media_flag_t flags)
#define switch_channel_down(_channel)
uint8_t number_of_channels
static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
void switch_channel_step_caller_profile(switch_channel_t *channel)
switch_status_t switch_ivr_generate_json_cdr(switch_core_session_t *session, cJSON **json_cdr, switch_bool_t urlencode)
Generate an JSON CDR report.
switch_status_t
Common return values.
#define MESSAGE_STAMP_FFL(_m)
#define SWITCH_EXEC_AFTER_BRIDGE_ARG_VARIABLE
void * switch_channel_get_private(switch_channel_t *channel, const char *key)
Retrieve private from a given channel.
static void check_bridge_export(switch_channel_t *channel, switch_channel_t *peer_channel)
switch_status_t switch_core_session_dequeue_event(_In_ switch_core_session_t *session, _Out_ switch_event_t **event, switch_bool_t force)
DE-Queue an event on a given session.
static void transfer_after_bridge(switch_core_session_t *session, const char *where)
#define SWITCH_SIGNAL_BOND_VARIABLE
char * destination_number
switch_status_t switch_core_session_receive_event(_In_ switch_core_session_t *session, _Inout_ switch_event_t **event)
Send an event to a session translating it to it's native message format.
void switch_channel_set_originatee_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile)
Set the given channel's originatee caller profile.
switch_size_t switch_channel_has_dtmf(_In_ switch_channel_t *channel)
Test for presence of DTMF on a given channel.
#define switch_core_session_locate(uuid_str)
Locate a session based on it's uuid.
switch_ivr_dmachine_t * switch_core_session_get_dmachine(switch_core_session_t *session, switch_digit_action_target_t target)
#define switch_event_create(event, id)
Create a new event assuming it will not be custom event and therefore hiding the unused parameters...
uint32_t switch_core_session_private_event_count(_In_ switch_core_session_t *session)
Indicate the number of waiting private events on a session.
static void abort_call(switch_channel_t *caller_channel, switch_channel_t *peer_channel)
#define switch_channel_set_flag(_c, _f)
void switch_ivr_bridge_display(switch_core_session_t *session, switch_core_session_t *peer_session)
switch_call_direction_t switch_channel_direction(switch_channel_t *channel)
static void cleanup_proxy_mode_a(switch_core_session_t *session)
#define SWITCH_TRANSFER_HISTORY_VARIABLE
#define switch_channel_media_ack(_channel)
static const switch_state_handler_table_t audio_bridge_peer_state_handlers
time_t switch_epoch_time_now(time_t *t)
Get the current epoch time.
const char * caller_id_number
int switch_channel_add_state_handler(switch_channel_t *channel, const switch_state_handler_table_t *state_handler)
add a state handler table to a given channel
#define switch_core_session_alloc(_session, _memory)
Allocate memory from a session's pool.
#define switch_test_flag(obj, flag)
Test for the existance of a flag on an arbitary object.
static switch_status_t audio_bridge_on_routing(switch_core_session_t *session)
void switch_ivr_check_hold(switch_core_session_t *session)
void switch_channel_clear_flag_recursive(switch_channel_t *channel, switch_channel_flag_t flag)
void switch_log_printf(_In_ switch_text_channel_t channel, _In_z_ const char *file, _In_z_ const char *func, _In_ int line, _In_opt_z_ const char *userdata, _In_ switch_log_level_t level, _In_z_ _Printf_format_string_ const char *fmt,...) PRINTF_FUNCTION(7
Write log data to the logging engine.
const char * switch_stristr(const char *instr, const char *str)
A table of settings and callbacks that define a paticular implementation of a codec.
#define switch_channel_up_nosig(_channel)
switch_status_t switch_ivr_multi_threaded_bridge(switch_core_session_t *session, switch_core_session_t *peer_session, switch_input_callback_function_t input_callback, void *session_data, void *peer_session_data)
#define switch_core_session_strdup(_session, _todup)
Copy a string using memory allocation from a session's pool.
void switch_event_destroy(switch_event_t **event)
Destroy an event.
switch_status_t switch_core_session_get_video_read_impl(switch_core_session_t *session, switch_codec_implementation_t *impp)
switch_status_t switch_channel_wait_for_flag(switch_channel_t *channel, switch_channel_flag_t want_flag, switch_bool_t pres, uint32_t to, switch_channel_t *super_channel)
void switch_channel_clear_flag(switch_channel_t *channel, switch_channel_flag_t flag)
Clear given flag(s) from a channel.
switch_status_t switch_ivr_signal_bridge(switch_core_session_t *session, switch_core_session_t *peer_session)
Bridge Signalling from one session to another.
char * switch_core_sprintf(_In_ switch_memory_pool_t *pool, _In_z_ _Printf_format_string_ const char *fmt,...)
printf-style style printing routine. The data is output to a string allocated from the pool ...
struct fspr_thread_t switch_thread_t
#define switch_channel_set_variable(_channel, _var, _val)
switch_status_t switch_ivr_generate_xml_cdr(switch_core_session_t *session, switch_xml_t *xml_cdr)
Generate an XML CDR report.
#define switch_channel_pre_answer(channel)
Indicate progress on a channel to attempt early media.
switch_caller_profile_t * switch_channel_get_caller_profile(switch_channel_t *channel)
Retrieve the given channel's caller profile.
#define switch_core_session_kill_channel(session, sig)
Send a signal to a channel.
switch_size_t switch_buffer_inuse(_In_ switch_buffer_t *buffer)
Get the in use amount of a switch_buffer_t.
switch_status_t switch_channel_api_on(switch_channel_t *channel, const char *variable_prefix)
#define SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE
void switch_buffer_destroy(switch_buffer_t **buffer)
Destroy the buffer.
char * switch_channel_get_name(switch_channel_t *channel)
Retrieve the name of a given channel.
switch_status_t switch_channel_pass_callee_id(switch_channel_t *channel, switch_channel_t *other_channel)
#define SWITCH_READ_ACCEPTABLE(status)
#define switch_channel_media_up(_channel)
static const switch_state_handler_table_t signal_bridge_state_handlers
const char * callee_id_name
switch_memory_pool_t * switch_core_session_get_pool(_In_ switch_core_session_t *session)
Retrieve the memory pool from a session.
#define SWITCH_UUID_FORMATTED_LENGTH
#define SWITCH_BRIDGE_CHANNEL_VARIABLE
switch_core_session_t * session_b
switch_call_cause_t switch_channel_get_cause(_In_ switch_channel_t *channel)
return the cause code for a given channel
#define SWITCH_UUID_BRIDGE
#define switch_xml_toxml(xml, prn_header)
Converts an switch_xml structure back to xml in html format. Returns a string of html data that \ mus...
static void text_bridge_thread(switch_core_session_t *session, void *obj)
static void * audio_bridge_thread(switch_thread_t *thread, void *obj)
switch_status_t switch_ivr_parse_all_messages(switch_core_session_t *session)
switch_memory_pool_t * pool
static switch_status_t uuid_bridge_on_hibernate(switch_core_session_t *session)
void switch_channel_handle_cause(switch_channel_t *channel, switch_call_cause_t cause)