Merge branch 'master' of ssh://git.freeswitch.org/freeswitch
This commit is contained in:
commit
9a8eea27fe
|
@ -40,6 +40,9 @@
|
|||
#define MAX_FEC_ENTRIES 4
|
||||
#define MAX_FEC_SPAN 4
|
||||
|
||||
#define SPANDSP_EVENT_TXFAXRESULT "spandsp::txfaxresult"
|
||||
#define SPANDSP_EVENT_RXFAXRESULT "spandsp::rxfaxresult"
|
||||
|
||||
/*****************************************************************************
|
||||
OUR DEFINES AND STRUCTS
|
||||
*****************************************************************************/
|
||||
|
@ -305,7 +308,14 @@ static void phase_e_handler(t30_state_t *s, void *user_data, int result)
|
|||
switch_core_session_t *session;
|
||||
switch_channel_t *channel;
|
||||
pvt_t *pvt;
|
||||
char *tmp;
|
||||
char *fax_document_transferred_pages = NULL;
|
||||
char *fax_document_total_pages = NULL;
|
||||
char *fax_image_resolution = NULL;
|
||||
char *fax_image_size = NULL;
|
||||
char *fax_bad_rows = NULL;
|
||||
char *fax_transfer_rate = NULL;
|
||||
char *fax_result_code = NULL;
|
||||
switch_event_t *event;
|
||||
|
||||
pvt = (pvt_t *) user_data;
|
||||
switch_assert(pvt);
|
||||
|
@ -353,13 +363,12 @@ static void phase_e_handler(t30_state_t *s, void *user_data, int result)
|
|||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "==============================================================================\n");
|
||||
|
||||
/*
|
||||
Set our channel variables
|
||||
Set our channel variables, variables are also used in event
|
||||
*/
|
||||
|
||||
tmp = switch_mprintf("%i", result);
|
||||
if (tmp) {
|
||||
switch_channel_set_variable(channel, "fax_result_code", tmp);
|
||||
switch_safe_free(tmp);
|
||||
fax_result_code = switch_core_session_sprintf(session, "%i", result);
|
||||
if (fax_result_code) {
|
||||
switch_channel_set_variable(channel, "fax_result_code", fax_result_code);
|
||||
}
|
||||
|
||||
switch_channel_set_variable(channel, "fax_result_text", t30_completion_code_to_str(result));
|
||||
|
@ -368,49 +377,56 @@ static void phase_e_handler(t30_state_t *s, void *user_data, int result)
|
|||
switch_channel_set_variable(channel, "fax_local_station_id", local_ident);
|
||||
switch_channel_set_variable(channel, "fax_remote_station_id", far_ident);
|
||||
|
||||
tmp = switch_mprintf("%i", pvt->app_mode == FUNCTION_TX ? t.pages_tx : t.pages_rx);
|
||||
if (tmp) {
|
||||
switch_channel_set_variable(channel, "fax_document_transferred_pages", tmp);
|
||||
switch_safe_free(tmp);
|
||||
fax_document_transferred_pages = switch_core_session_sprintf(session, "%i", pvt->app_mode == FUNCTION_TX ? t.pages_tx : t.pages_rx);
|
||||
if (fax_document_transferred_pages) {
|
||||
switch_channel_set_variable(channel, "fax_document_transferred_pages", fax_document_transferred_pages);
|
||||
}
|
||||
|
||||
tmp = switch_mprintf("%i", t.pages_in_file);
|
||||
if (tmp) {
|
||||
switch_channel_set_variable(channel, "fax_document_total_pages", tmp);
|
||||
switch_safe_free(tmp);
|
||||
fax_document_total_pages = switch_core_session_sprintf(session, "%i", t.pages_in_file);
|
||||
if (fax_document_total_pages) {
|
||||
switch_channel_set_variable(channel, "fax_document_total_pages", fax_document_total_pages);
|
||||
}
|
||||
|
||||
tmp = switch_mprintf("%ix%i", t.x_resolution, t.y_resolution);
|
||||
if (tmp) {
|
||||
switch_channel_set_variable(channel, "fax_image_resolution", tmp);
|
||||
switch_safe_free(tmp);
|
||||
fax_image_resolution = switch_core_session_sprintf(session, "%ix%i", t.x_resolution, t.y_resolution);
|
||||
if (fax_image_resolution) {
|
||||
switch_channel_set_variable(channel, "fax_image_resolution", fax_image_resolution);
|
||||
}
|
||||
|
||||
tmp = switch_mprintf("%d", t.image_size);
|
||||
if (tmp) {
|
||||
switch_channel_set_variable(channel, "fax_image_size", tmp);
|
||||
switch_safe_free(tmp);
|
||||
fax_image_size = switch_core_session_sprintf(session, "%d", t.image_size);
|
||||
if (fax_image_size) {
|
||||
switch_channel_set_variable(channel, "fax_image_size", fax_image_size);
|
||||
}
|
||||
|
||||
tmp = switch_mprintf("%d", t.bad_rows);
|
||||
if (tmp) {
|
||||
switch_channel_set_variable(channel, "fax_bad_rows", tmp);
|
||||
switch_safe_free(tmp);
|
||||
fax_bad_rows = switch_core_session_sprintf(session, "%d", t.bad_rows);
|
||||
if (fax_bad_rows) {
|
||||
switch_channel_set_variable(channel, "fax_bad_rows", fax_bad_rows);
|
||||
}
|
||||
|
||||
tmp = switch_mprintf("%i", t.bit_rate);
|
||||
if (tmp) {
|
||||
switch_channel_set_variable(channel, "fax_transfer_rate", tmp);
|
||||
switch_safe_free(tmp);
|
||||
fax_transfer_rate = switch_core_session_sprintf(session, "%i", t.bit_rate);
|
||||
if (fax_transfer_rate) {
|
||||
switch_channel_set_variable(channel, "fax_transfer_rate", fax_transfer_rate);
|
||||
}
|
||||
|
||||
/* switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); */
|
||||
|
||||
pvt->done = 1;
|
||||
|
||||
/*
|
||||
TODO Fire events
|
||||
*/
|
||||
/* Fire event */
|
||||
|
||||
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, pvt->app_mode == FUNCTION_TX ? SPANDSP_EVENT_TXFAXRESULT : SPANDSP_EVENT_RXFAXRESULT) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-document-transferred-pages", fax_document_transferred_pages);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-document-total-pages", fax_document_total_pages);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-image-resolution", fax_image_resolution);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-image-size", fax_image_size);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-bad-rows", fax_bad_rows);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-transfer-rate", fax_transfer_rate);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-result-code", fax_result_code);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-result-text", t30_completion_code_to_str(result));
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-ecm-used", (t.error_correcting_mode) ? "on" : "off");
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-local-station-id", local_ident);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "fax-remote-station-id", far_ident);
|
||||
switch_core_session_queue_private_event(session, &event, SWITCH_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static int t38_tx_packet_handler(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
|
||||
|
@ -1026,7 +1042,6 @@ void mod_spandsp_fax_process_fax(switch_core_session_t *session, const char *dat
|
|||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Fax TX filename not set.\n");
|
||||
goto done;
|
||||
} else if (pvt->app_mode == FUNCTION_RX) {
|
||||
char *fname;
|
||||
const char *prefix;
|
||||
switch_time_t time;
|
||||
|
||||
|
@ -1036,11 +1051,7 @@ void mod_spandsp_fax_process_fax(switch_core_session_t *session, const char *dat
|
|||
prefix = globals.prepend_string;
|
||||
}
|
||||
|
||||
fname = switch_mprintf("%s/%s-%ld-%ld.tif", globals.spool, prefix, globals.total_sessions, time);
|
||||
if (fname) {
|
||||
pvt->filename = switch_core_session_strdup(session, fname);
|
||||
switch_safe_free(fname);
|
||||
} else {
|
||||
if (!(pvt->filename = switch_core_session_sprintf(session, "%s/%s-%ld-%ld.tif", globals.spool, prefix, globals.total_sessions, time))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot automatically set fax RX destination file\n");
|
||||
goto done;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,20 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_snmp_runtime);
|
|||
SWITCH_MODULE_DEFINITION(mod_snmp, mod_snmp_load, mod_snmp_shutdown, mod_snmp_runtime);
|
||||
|
||||
|
||||
static switch_status_t snmp_manage(char *relative_oid, switch_management_action_t action, char *data, switch_size_t datalen)
|
||||
{
|
||||
if (action == SMA_GET) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Mutex lock request from relative OID %s.\n", relative_oid);
|
||||
switch_mutex_lock(globals.mutex);
|
||||
} else if (action == SMA_SET) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Mutex unlock request from relative OID %s.\n", relative_oid);
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static int snmp_callback_log(int major, int minor, void *serverarg, void *clientarg)
|
||||
{
|
||||
struct snmp_log_message *slm = (struct snmp_log_message *) serverarg;
|
||||
|
@ -71,10 +85,14 @@ static switch_status_t load_config(switch_memory_pool_t *pool)
|
|||
SWITCH_MODULE_LOAD_FUNCTION(mod_snmp_load)
|
||||
{
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
switch_management_interface_t *management_interface;
|
||||
|
||||
load_config(pool);
|
||||
|
||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||
management_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_MANAGEMENT_INTERFACE);
|
||||
management_interface->relative_oid = "1000";
|
||||
management_interface->management_function = snmp_manage;
|
||||
|
||||
/* Register callback function so we get Net-SNMP logging handled by FreeSWITCH */
|
||||
snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_LOGGING, snmp_callback_log, NULL);
|
||||
|
@ -86,10 +104,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_snmp_load)
|
|||
init_agent("mod_snmp");
|
||||
|
||||
/*
|
||||
* Override master/subagent ping interval to 5s, to ensure that
|
||||
* Override master/subagent ping interval to 2s, to ensure that
|
||||
* agent_check_and_process() never blocks for longer than that.
|
||||
*/
|
||||
netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 5);
|
||||
netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 2);
|
||||
|
||||
init_subagent();
|
||||
init_snmp("mod_snmp");
|
||||
|
@ -107,6 +125,8 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_snmp_runtime)
|
|||
switch_mutex_unlock(globals.mutex);
|
||||
}
|
||||
|
||||
switch_yield(5000);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -7413,6 +7413,20 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_session_get_dmachine(void * jar
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_set_codec_slin(void * jarg1, void * jarg2) {
|
||||
int jresult ;
|
||||
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
||||
switch_slin_data_t *arg2 = (switch_slin_data_t *) 0 ;
|
||||
switch_status_t result;
|
||||
|
||||
arg1 = (switch_core_session_t *)jarg1;
|
||||
arg2 = (switch_slin_data_t *)jarg2;
|
||||
result = (switch_status_t)switch_core_session_set_codec_slin(arg1,arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_core_get_uuid() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
@ -22794,6 +22808,119 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_api_interface(void * jarg1) {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_slin_data_session_set(void * jarg1, void * jarg2) {
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
arg2 = (switch_core_session_t *)jarg2;
|
||||
if (arg1) (arg1)->session = arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_slin_data_session_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
switch_core_session_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
result = (switch_core_session_t *) ((arg1)->session);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_slin_data_write_frame_set(void * jarg1, void * jarg2) {
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
switch_frame_t *arg2 = (switch_frame_t *) 0 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
arg2 = (switch_frame_t *)jarg2;
|
||||
if (arg1) (arg1)->write_frame = *arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_slin_data_write_frame_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
switch_frame_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
result = (switch_frame_t *)& ((arg1)->write_frame);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_slin_data_codec_set(void * jarg1, void * jarg2) {
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
switch_codec_t *arg2 = (switch_codec_t *) 0 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
arg2 = (switch_codec_t *)jarg2;
|
||||
if (arg1) (arg1)->codec = *arg2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_slin_data_codec_get(void * jarg1) {
|
||||
void * jresult ;
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
switch_codec_t *result = 0 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
result = (switch_codec_t *)& ((arg1)->codec);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_slin_data_frame_data_set(void * jarg1, char * jarg2) {
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
char *arg2 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
{
|
||||
if (arg2) strncpy((char *)arg1->frame_data, (const char *)arg2, 4096);
|
||||
else arg1->frame_data[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_switch_slin_data_frame_data_get(void * jarg1) {
|
||||
char * jresult ;
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
result = (char *)(char *) ((arg1)->frame_data);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_slin_data() {
|
||||
void * jresult ;
|
||||
switch_slin_data *result = 0 ;
|
||||
|
||||
result = (switch_slin_data *)new switch_slin_data();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_slin_data(void * jarg1) {
|
||||
switch_slin_data *arg1 = (switch_slin_data *) 0 ;
|
||||
|
||||
arg1 = (switch_slin_data *)jarg1;
|
||||
delete arg1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_timetable_profile_created_set(void * jarg1, void * jarg2) {
|
||||
switch_channel_timetable *arg1 = (switch_channel_timetable *) 0 ;
|
||||
switch_time_t arg2 ;
|
||||
|
|
|
@ -1357,6 +1357,11 @@ public class freeswitch {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static switch_status_t switch_core_session_set_codec_slin(SWIGTYPE_p_switch_core_session session, switch_slin_data data) {
|
||||
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_set_codec_slin(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_slin_data.getCPtr(data));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string switch_core_get_uuid() {
|
||||
string ret = freeswitchPINVOKE.switch_core_get_uuid();
|
||||
return ret;
|
||||
|
@ -7504,6 +7509,9 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_get_dmachine")]
|
||||
public static extern IntPtr switch_core_session_get_dmachine(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_set_codec_slin")]
|
||||
public static extern int switch_core_session_set_codec_slin(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_get_uuid")]
|
||||
public static extern string switch_core_get_uuid();
|
||||
|
||||
|
@ -11188,6 +11196,36 @@ class freeswitchPINVOKE {
|
|||
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_api_interface")]
|
||||
public static extern void delete_switch_api_interface(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_slin_data_session_set")]
|
||||
public static extern void switch_slin_data_session_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_slin_data_session_get")]
|
||||
public static extern IntPtr switch_slin_data_session_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_slin_data_write_frame_set")]
|
||||
public static extern void switch_slin_data_write_frame_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_slin_data_write_frame_get")]
|
||||
public static extern IntPtr switch_slin_data_write_frame_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_slin_data_codec_set")]
|
||||
public static extern void switch_slin_data_codec_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_slin_data_codec_get")]
|
||||
public static extern IntPtr switch_slin_data_codec_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_slin_data_frame_data_set")]
|
||||
public static extern void switch_slin_data_frame_data_set(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_slin_data_frame_data_get")]
|
||||
public static extern string switch_slin_data_frame_data_get(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_slin_data")]
|
||||
public static extern IntPtr new_switch_slin_data();
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_slin_data")]
|
||||
public static extern void delete_switch_slin_data(HandleRef jarg1);
|
||||
|
||||
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_timetable_profile_created_set")]
|
||||
public static extern void switch_channel_timetable_profile_created_set(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
|
@ -28401,7 +28439,8 @@ public enum switch_rtp_bug_flag_t {
|
|||
RTP_BUG_IGNORE_MARK_BIT = (1 << 2),
|
||||
RTP_BUG_SEND_LINEAR_TIMESTAMPS = (1 << 3),
|
||||
RTP_BUG_START_SEQ_AT_ZERO = (1 << 4),
|
||||
RTP_BUG_NEVER_SEND_MARKER = (1 << 5)
|
||||
RTP_BUG_NEVER_SEND_MARKER = (1 << 5),
|
||||
RTP_BUG_IGNORE_DTMF_DURATION = (1 << 6)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29437,6 +29476,96 @@ public enum switch_signal_t {
|
|||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class switch_slin_data : IDisposable {
|
||||
private HandleRef swigCPtr;
|
||||
protected bool swigCMemOwn;
|
||||
|
||||
internal switch_slin_data(IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(switch_slin_data obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
|
||||
~switch_slin_data() {
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public virtual void Dispose() {
|
||||
lock(this) {
|
||||
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
freeswitchPINVOKE.delete_switch_slin_data(swigCPtr);
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_switch_core_session session {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_slin_data_session_set(swigCPtr, SWIGTYPE_p_switch_core_session.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_slin_data_session_get(swigCPtr);
|
||||
SWIGTYPE_p_switch_core_session ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_core_session(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_frame write_frame {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_slin_data_write_frame_set(swigCPtr, switch_frame.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_slin_data_write_frame_get(swigCPtr);
|
||||
switch_frame ret = (cPtr == IntPtr.Zero) ? null : new switch_frame(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_codec codec {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_slin_data_codec_set(swigCPtr, switch_codec.getCPtr(value));
|
||||
}
|
||||
get {
|
||||
IntPtr cPtr = freeswitchPINVOKE.switch_slin_data_codec_get(swigCPtr);
|
||||
switch_codec ret = (cPtr == IntPtr.Zero) ? null : new switch_codec(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public string frame_data {
|
||||
set {
|
||||
freeswitchPINVOKE.switch_slin_data_frame_data_set(swigCPtr, value);
|
||||
}
|
||||
get {
|
||||
string ret = freeswitchPINVOKE.switch_slin_data_frame_data_get(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public switch_slin_data() : this(freeswitchPINVOKE.new_switch_slin_data(), true) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.35
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace FreeSWITCH.Native {
|
||||
|
||||
[System.Flags] public enum switch_speech_flag_enum_t {
|
||||
SWITCH_SPEECH_FLAG_NONE = 0,
|
||||
SWITCH_SPEECH_FLAG_HASTEXT = (1 << 0),
|
||||
|
@ -30146,7 +30275,7 @@ public enum switch_status_t {
|
|||
SWITCH_STATUS_FALSE,
|
||||
SWITCH_STATUS_TIMEOUT,
|
||||
SWITCH_STATUS_RESTART,
|
||||
SWITCH_STATUS_TERM,
|
||||
SWITCH_STATUS_INTR,
|
||||
SWITCH_STATUS_NOTIMPL,
|
||||
SWITCH_STATUS_MEMERR,
|
||||
SWITCH_STATUS_NOOP,
|
||||
|
@ -30163,6 +30292,7 @@ public enum switch_status_t {
|
|||
SWITCH_STATUS_TOO_SMALL,
|
||||
SWITCH_STATUS_FOUND,
|
||||
SWITCH_STATUS_CONTINUE,
|
||||
SWITCH_STATUS_TERM,
|
||||
SWITCH_STATUS_NOT_INITALIZED
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue