From df899dbdb4bf4df684696f9ab0ea8aae74daf043 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Thu, 23 Feb 2012 21:24:04 -0600 Subject: [PATCH 1/5] vs2010 reswig --- .../mod_managed/freeswitch_wrap.2010.cxx | 164 ++++++++++++++++- .../mod_managed/managed/swig.2010.cs | 165 ++++++++++++++++-- 2 files changed, 310 insertions(+), 19 deletions(-) diff --git a/src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx b/src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx index 579be71bad..d25bcff52d 100644 --- a/src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx +++ b/src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx @@ -3514,6 +3514,68 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_rtcp_hdr_t(void * jarg1) { } +SWIGEXPORT void SWIGSTDCALL CSharp_audio_buffer_header_t_ts_set(void * jarg1, unsigned long jarg2) { + audio_buffer_header_t *arg1 = (audio_buffer_header_t *) 0 ; + uint32_t arg2 ; + + arg1 = (audio_buffer_header_t *)jarg1; + arg2 = (uint32_t)jarg2; + if (arg1) (arg1)->ts = arg2; +} + + +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_audio_buffer_header_t_ts_get(void * jarg1) { + unsigned long jresult ; + audio_buffer_header_t *arg1 = (audio_buffer_header_t *) 0 ; + uint32_t result; + + arg1 = (audio_buffer_header_t *)jarg1; + result = (uint32_t) ((arg1)->ts); + jresult = (unsigned long)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_audio_buffer_header_t_len_set(void * jarg1, unsigned long jarg2) { + audio_buffer_header_t *arg1 = (audio_buffer_header_t *) 0 ; + uint32_t arg2 ; + + arg1 = (audio_buffer_header_t *)jarg1; + arg2 = (uint32_t)jarg2; + if (arg1) (arg1)->len = arg2; +} + + +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_audio_buffer_header_t_len_get(void * jarg1) { + unsigned long jresult ; + audio_buffer_header_t *arg1 = (audio_buffer_header_t *) 0 ; + uint32_t result; + + arg1 = (audio_buffer_header_t *)jarg1; + result = (uint32_t) ((arg1)->len); + jresult = (unsigned long)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_audio_buffer_header_t() { + void * jresult ; + audio_buffer_header_t *result = 0 ; + + result = (audio_buffer_header_t *)new audio_buffer_header_t(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_audio_buffer_header_t(void * jarg1) { + audio_buffer_header_t *arg1 = (audio_buffer_header_t *) 0 ; + + arg1 = (audio_buffer_header_t *)jarg1; + delete arg1; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_t38_options_t_T38FaxVersion_set(void * jarg1, unsigned short jarg2) { switch_t38_options_t *arg1 = (switch_t38_options_t *) 0 ; uint16_t arg2 ; @@ -6661,6 +6723,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_flush_all(void * jarg1) } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_media_bug_set_pre_buffer_framecount(void * jarg1, unsigned long jarg2) { + int jresult ; + switch_media_bug_t *arg1 = (switch_media_bug_t *) 0 ; + uint32_t arg2 ; + switch_status_t result; + + arg1 = (switch_media_bug_t *)jarg1; + arg2 = (uint32_t)jarg2; + result = (switch_status_t)switch_core_media_bug_set_pre_buffer_framecount(arg1,arg2); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_port_allocator_new(unsigned short jarg1, unsigned short jarg2, unsigned long jarg3, void * jarg4) { int jresult ; switch_port_t arg1 ; @@ -7975,11 +8051,15 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_thread_session_end(void * jarg1) } -SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_service_session(void * jarg1) { +SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_service_session_av(void * jarg1, int jarg2, int jarg3) { switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + switch_bool_t arg2 ; + switch_bool_t arg3 ; arg1 = (switch_core_session_t *)jarg1; - switch_core_service_session(arg1); + arg2 = (switch_bool_t)jarg2; + arg3 = (switch_bool_t)jarg3; + switch_core_service_session_av(arg1,arg2,arg3); } @@ -8830,6 +8910,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_set_read_codec(void * jarg } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_session_set_real_read_codec(void * jarg1, void * jarg2) { + int jresult ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + switch_codec_t *arg2 = (switch_codec_t *) 0 ; + switch_status_t result; + + arg1 = (switch_core_session_t *)jarg1; + arg2 = (switch_codec_t *)jarg2; + result = (switch_status_t)switch_core_session_set_real_read_codec(arg1,arg2); + jresult = result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_unset_read_codec(void * jarg1) { switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; @@ -13697,6 +13791,30 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_format_number(char * jarg1) { } +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_switch_atoui(char * jarg1) { + unsigned int jresult ; + char *arg1 = (char *) 0 ; + unsigned int result; + + arg1 = (char *)jarg1; + result = (unsigned int)switch_atoui((char const *)arg1); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_atoul(char * jarg1) { + unsigned long jresult ; + char *arg1 = (char *) 0 ; + unsigned long result; + + arg1 = (char *)jarg1; + result = (unsigned long)switch_atoul((char const *)arg1); + jresult = (unsigned long)result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_profile_node_t_var_set(void * jarg1, char * jarg2) { profile_node_t *arg1 = (profile_node_t *) 0 ; char *arg2 = (char *) 0 ; @@ -25173,15 +25291,19 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_event_set_extended_data(void * } -SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_expand_variables(void * jarg1, char * jarg2) { +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_channel_expand_variables_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4) { char * jresult ; switch_channel_t *arg1 = (switch_channel_t *) 0 ; char *arg2 = (char *) 0 ; + switch_event_t *arg3 = (switch_event_t *) 0 ; + switch_event_t *arg4 = (switch_event_t *) 0 ; char *result = 0 ; arg1 = (switch_channel_t *)jarg1; arg2 = (char *)jarg2; - result = (char *)switch_channel_expand_variables(arg1,(char const *)arg2); + arg3 = (switch_event_t *)jarg3; + arg4 = (switch_event_t *)jarg4; + result = (char *)switch_channel_expand_variables_check(arg1,(char const *)arg2,arg3,arg4); jresult = SWIG_csharp_string_callback((const char *)result); return jresult; } @@ -26759,15 +26881,19 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_set_body(void * jarg1, char * jar } -SWIGEXPORT char * SWIGSTDCALL CSharp_switch_event_expand_headers(void * jarg1, char * jarg2) { +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_event_expand_headers_check(void * jarg1, char * jarg2, void * jarg3, void * jarg4) { char * jresult ; switch_event_t *arg1 = (switch_event_t *) 0 ; char *arg2 = (char *) 0 ; + switch_event_t *arg3 = (switch_event_t *) 0 ; + switch_event_t *arg4 = (switch_event_t *) 0 ; char *result = 0 ; arg1 = (switch_event_t *)jarg1; arg2 = (char *)jarg2; - result = (char *)switch_event_expand_headers(arg1,(char const *)arg2); + arg3 = (switch_event_t *)jarg3; + arg4 = (switch_event_t *)jarg4; + result = (char *)switch_event_expand_headers_check(arg1,(char const *)arg2,arg3,arg4); jresult = SWIG_csharp_string_callback((const char *)result); return jresult; } @@ -26851,6 +26977,20 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_event_build_param_string(void * jarg } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_check_permission_list(void * jarg1, char * jarg2) { + int jresult ; + switch_event_t *arg1 = (switch_event_t *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + arg1 = (switch_event_t *)jarg1; + arg2 = (char *)jarg2; + result = (int)switch_event_check_permission_list(arg1,(char const *)arg2); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RESAMPLE_QUALITY_get() { int jresult ; int result; @@ -29481,6 +29621,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_uuid_exists(char * jarg1) { } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_last_ping(void * jarg1) { + int jresult ; + switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ; + switch_status_t result; + + arg1 = (switch_ivr_dmachine_t *)jarg1; + result = (switch_status_t)switch_ivr_dmachine_last_ping(arg1); + jresult = result; + return jresult; +} + + SWIGEXPORT char * SWIGSTDCALL CSharp_switch_ivr_dmachine_get_name(void * jarg1) { char * jresult ; switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ; diff --git a/src/mod/languages/mod_managed/managed/swig.2010.cs b/src/mod/languages/mod_managed/managed/swig.2010.cs index 6f0c848599..336e468c61 100644 --- a/src/mod/languages/mod_managed/managed/swig.2010.cs +++ b/src/mod/languages/mod_managed/managed/swig.2010.cs @@ -72,6 +72,75 @@ public class Api : IDisposable { namespace FreeSWITCH.Native { +using System; +using System.Runtime.InteropServices; + +public class audio_buffer_header_t : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal audio_buffer_header_t(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(audio_buffer_header_t obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~audio_buffer_header_t() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + freeswitchPINVOKE.delete_audio_buffer_header_t(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + } + } + + public uint ts { + set { + freeswitchPINVOKE.audio_buffer_header_t_ts_set(swigCPtr, value); + } + get { + uint ret = freeswitchPINVOKE.audio_buffer_header_t_ts_get(swigCPtr); + return ret; + } + } + + public uint len { + set { + freeswitchPINVOKE.audio_buffer_header_t_len_set(swigCPtr, value); + } + get { + uint ret = freeswitchPINVOKE.audio_buffer_header_t_len_get(swigCPtr); + return ret; + } + } + + public audio_buffer_header_t() : this(freeswitchPINVOKE.new_audio_buffer_header_t(), true) { + } + +} + +} +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +namespace FreeSWITCH.Native { + public enum cache_db_flag_t { CDF_INUSE = (1 << 0), CDF_PRUNE = (1 << 1) @@ -1111,6 +1180,11 @@ public class freeswitch { return ret; } + public static switch_status_t switch_core_media_bug_set_pre_buffer_framecount(SWIGTYPE_p_switch_media_bug bug, uint framecount) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_media_bug_set_pre_buffer_framecount(SWIGTYPE_p_switch_media_bug.getCPtr(bug), framecount); + return ret; + } + public static switch_status_t switch_core_port_allocator_new(ushort start, ushort end, uint flags, SWIGTYPE_p_p_switch_core_port_allocator new_allocator) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_port_allocator_new(start, end, flags, SWIGTYPE_p_p_switch_core_port_allocator.getCPtr(new_allocator)); return ret; @@ -1611,8 +1685,8 @@ public class freeswitch { freeswitchPINVOKE.switch_core_thread_session_end(SWIGTYPE_p_switch_core_session.getCPtr(session)); } - public static void switch_core_service_session(SWIGTYPE_p_switch_core_session session) { - freeswitchPINVOKE.switch_core_service_session(SWIGTYPE_p_switch_core_session.getCPtr(session)); + public static void switch_core_service_session_av(SWIGTYPE_p_switch_core_session session, switch_bool_t audio, switch_bool_t video) { + freeswitchPINVOKE.switch_core_service_session_av(SWIGTYPE_p_switch_core_session.getCPtr(session), (int)audio, (int)video); } public static switch_call_cause_t switch_core_session_outgoing_channel(SWIGTYPE_p_switch_core_session session, switch_event var_event, string endpoint_name, switch_caller_profile caller_profile, SWIGTYPE_p_p_switch_core_session new_session, SWIGTYPE_p_p_apr_pool_t pool, uint flags, SWIGTYPE_p_switch_call_cause_t cancel_cause) { @@ -1887,6 +1961,11 @@ public class freeswitch { return ret; } + public static switch_status_t switch_core_session_set_real_read_codec(SWIGTYPE_p_switch_core_session session, switch_codec codec) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_session_set_real_read_codec(SWIGTYPE_p_switch_core_session.getCPtr(session), switch_codec.getCPtr(codec)); + return ret; + } + public static void switch_core_session_unset_read_codec(SWIGTYPE_p_switch_core_session session) { freeswitchPINVOKE.switch_core_session_unset_read_codec(SWIGTYPE_p_switch_core_session.getCPtr(session)); } @@ -3351,6 +3430,16 @@ public class freeswitch { return ret; } + public static uint switch_atoui(string nptr) { + uint ret = freeswitchPINVOKE.switch_atoui(nptr); + return ret; + } + + public static uint switch_atoul(string nptr) { + uint ret = freeswitchPINVOKE.switch_atoul(nptr); + return ret; + } + public static switch_caller_extension switch_caller_extension_new(SWIGTYPE_p_switch_core_session session, string extension_name, string extension_number) { IntPtr cPtr = freeswitchPINVOKE.switch_caller_extension_new(SWIGTYPE_p_switch_core_session.getCPtr(session), extension_name, extension_number); switch_caller_extension ret = (cPtr == IntPtr.Zero) ? null : new switch_caller_extension(cPtr, false); @@ -3860,8 +3949,8 @@ public class freeswitch { freeswitchPINVOKE.switch_channel_event_set_extended_data(SWIGTYPE_p_switch_channel.getCPtr(channel), switch_event.getCPtr(arg1)); } - public static string switch_channel_expand_variables(SWIGTYPE_p_switch_channel channel, string arg1) { - string ret = freeswitchPINVOKE.switch_channel_expand_variables(SWIGTYPE_p_switch_channel.getCPtr(channel), arg1); + public static string switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel channel, string arg1, switch_event var_list, switch_event api_list) { + string ret = freeswitchPINVOKE.switch_channel_expand_variables_check(SWIGTYPE_p_switch_channel.getCPtr(channel), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list)); return ret; } @@ -4243,8 +4332,8 @@ public class freeswitch { return ret; } - public static string switch_event_expand_headers(switch_event arg0, string arg1) { - string ret = freeswitchPINVOKE.switch_event_expand_headers(switch_event.getCPtr(arg0), arg1); + public static string switch_event_expand_headers_check(switch_event arg0, string arg1, switch_event var_list, switch_event api_list) { + string ret = freeswitchPINVOKE.switch_event_expand_headers_check(switch_event.getCPtr(arg0), arg1, switch_event.getCPtr(var_list), switch_event.getCPtr(api_list)); return ret; } @@ -4267,6 +4356,11 @@ public class freeswitch { return ret; } + public static int switch_event_check_permission_list(switch_event list, string name) { + int ret = freeswitchPINVOKE.switch_event_check_permission_list(switch_event.getCPtr(list), name); + return ret; + } + public static switch_status_t switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t new_resampler, uint from_rate, uint to_rate, uint to_size, int quality, uint channels, string file, string func, int line) { switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t.getCPtr(new_resampler), from_rate, to_rate, to_size, quality, channels, file, func, line); return ret; @@ -4873,6 +4967,11 @@ public class freeswitch { return ret; } + public static switch_status_t switch_ivr_dmachine_last_ping(SWIGTYPE_p_switch_ivr_dmachine dmachine) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_ivr_dmachine_last_ping(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine)); + return ret; + } + public static string switch_ivr_dmachine_get_name(SWIGTYPE_p_switch_ivr_dmachine dmachine) { string ret = freeswitchPINVOKE.switch_ivr_dmachine_get_name(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine)); return ret; @@ -7094,6 +7193,24 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_delete_switch_rtcp_hdr_t")] public static extern void delete_switch_rtcp_hdr_t(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_audio_buffer_header_t_ts_set")] + public static extern void audio_buffer_header_t_ts_set(HandleRef jarg1, uint jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_audio_buffer_header_t_ts_get")] + public static extern uint audio_buffer_header_t_ts_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_audio_buffer_header_t_len_set")] + public static extern void audio_buffer_header_t_len_set(HandleRef jarg1, uint jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_audio_buffer_header_t_len_get")] + public static extern uint audio_buffer_header_t_len_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_new_audio_buffer_header_t")] + public static extern IntPtr new_audio_buffer_header_t(); + + [DllImport("mod_managed", EntryPoint="CSharp_delete_audio_buffer_header_t")] + public static extern void delete_audio_buffer_header_t(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_t38_options_t_T38FaxVersion_set")] public static extern void switch_t38_options_t_T38FaxVersion_set(HandleRef jarg1, ushort jarg2); @@ -7886,6 +8003,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_flush_all")] public static extern int switch_core_media_bug_flush_all(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_media_bug_set_pre_buffer_framecount")] + public static extern int switch_core_media_bug_set_pre_buffer_framecount(HandleRef jarg1, uint jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_port_allocator_new")] public static extern int switch_core_port_allocator_new(ushort jarg1, ushort jarg2, uint jarg3, HandleRef jarg4); @@ -8189,8 +8309,8 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_thread_session_end")] public static extern void switch_core_thread_session_end(HandleRef jarg1); - [DllImport("mod_managed", EntryPoint="CSharp_switch_core_service_session")] - public static extern void switch_core_service_session(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_service_session_av")] + public static extern void switch_core_service_session_av(HandleRef jarg1, int jarg2, int jarg3); [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_outgoing_channel")] public static extern int switch_core_session_outgoing_channel(HandleRef jarg1, HandleRef jarg2, string jarg3, HandleRef jarg4, HandleRef jarg5, HandleRef jarg6, uint jarg7, HandleRef jarg8); @@ -8354,6 +8474,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_set_read_codec")] public static extern int switch_core_session_set_read_codec(HandleRef jarg1, HandleRef jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_set_real_read_codec")] + public static extern int switch_core_session_set_real_read_codec(HandleRef jarg1, HandleRef jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_unset_read_codec")] public static extern void switch_core_session_unset_read_codec(HandleRef jarg1); @@ -9455,6 +9578,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_format_number")] public static extern string switch_format_number(string jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_atoui")] + public static extern uint switch_atoui(string jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_atoul")] + public static extern uint switch_atoul(string jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_profile_node_t_var_set")] public static extern void profile_node_t_var_set(HandleRef jarg1, string jarg2); @@ -12362,8 +12491,8 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_event_set_extended_data")] public static extern void switch_channel_event_set_extended_data(HandleRef jarg1, HandleRef jarg2); - [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_expand_variables")] - public static extern string switch_channel_expand_variables(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_expand_variables_check")] + public static extern string switch_channel_expand_variables_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4); [DllImport("mod_managed", EntryPoint="CSharp_switch_channel_build_param_string")] public static extern string switch_channel_build_param_string(HandleRef jarg1, HandleRef jarg2, string jarg3); @@ -12716,8 +12845,8 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_event_set_body")] public static extern int switch_event_set_body(HandleRef jarg1, string jarg2); - [DllImport("mod_managed", EntryPoint="CSharp_switch_event_expand_headers")] - public static extern string switch_event_expand_headers(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_switch_event_expand_headers_check")] + public static extern string switch_event_expand_headers_check(HandleRef jarg1, string jarg2, HandleRef jarg3, HandleRef jarg4); [DllImport("mod_managed", EntryPoint="CSharp_switch_event_create_pres_in_detailed")] public static extern int switch_event_create_pres_in_detailed(string jarg1, string jarg2, int jarg3, string jarg4, string jarg5, string jarg6, string jarg7, string jarg8, string jarg9, string jarg10, int jarg11, string jarg12, string jarg13, string jarg14, string jarg15); @@ -12731,6 +12860,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_event_build_param_string")] public static extern string switch_event_build_param_string(HandleRef jarg1, string jarg2, HandleRef jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_event_check_permission_list")] + public static extern int switch_event_check_permission_list(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RESAMPLE_QUALITY_get")] public static extern int SWITCH_RESAMPLE_QUALITY_get(); @@ -13256,6 +13388,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_uuid_exists")] public static extern int switch_ivr_uuid_exists(string jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_last_ping")] + public static extern int switch_ivr_dmachine_last_ping(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_get_name")] public static extern string switch_ivr_dmachine_get_name(HandleRef jarg1); @@ -22884,6 +23019,9 @@ public enum switch_channel_flag_t { CF_ZOMBIE_EXEC, CF_INTERCEPT, CF_INTERCEPTED, + CF_VIDEO_REFRESH_REQ, + CF_SERVICE_AUDIO, + CF_SERVICE_VIDEO, CF_FLAG_MAX } @@ -26095,7 +26233,8 @@ namespace FreeSWITCH.Native { public enum switch_event_flag_t { EF_UNIQ_HEADERS = (1 << 0), - EF_NO_CHAT_EXEC = (1 << 1) + EF_NO_CHAT_EXEC = (1 << 1), + EF_DEFAULT_ALLOW = (1 << 2) } } From 1e6c4bef92f88b97974579a4fc5621cd18e3d050 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 24 Feb 2012 14:15:32 -0600 Subject: [PATCH 2/5] FS-3943 --resolve --- src/mod/applications/mod_dptools/mod_dptools.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 246295f0fe..80797b0a32 100755 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -3251,7 +3251,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session, switch_call_cause_t *cancel_cause) { switch_xml_t x_user = NULL, x_param, x_params; - char *user = NULL, *domain = NULL, *dup_domain = NULL; + char *user = NULL, *domain = NULL, *dup_domain = NULL, *dialed_user = NULL; const char *dest = NULL; switch_call_cause_t cause = SWITCH_CAUSE_NONE; unsigned int timelimit = 60; @@ -3321,11 +3321,13 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session, } } + dialed_user = (char *)switch_xml_attr(x_user, "id"); + if (var_event) { - switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "dialed_user", user); + switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "dialed_user", dialed_user); switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "dialed_domain", domain); if (!strstr(dest, "presence_id=")) { - switch_event_add_header(var_event, SWITCH_STACK_BOTTOM, "presence_id", "%s@%s", user, domain); + switch_event_add_header(var_event, SWITCH_STACK_BOTTOM, "presence_id", "%s@%s", dialed_user, domain); } } @@ -3352,7 +3354,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session, timelimit = atoi(varval); } - switch_channel_set_variable(channel, "dialed_user", user); + switch_channel_set_variable(channel, "dialed_user", dialed_user); switch_channel_set_variable(channel, "dialed_domain", domain); d_dest = switch_channel_expand_variables(channel, dest); @@ -3373,7 +3375,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session, switch_assert(event); } - switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "dialed_user", user); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "dialed_user", dialed_user); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "dialed_domain", domain); d_dest = switch_event_expand_headers(event, dest); switch_event_destroy(&event); @@ -3388,7 +3390,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session, } - switch_snprintf(stupid, sizeof(stupid), "user/%s", user); + switch_snprintf(stupid, sizeof(stupid), "user/%s", dialed_user); if (switch_stristr(stupid, d_dest)) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Waddya Daft? You almost called '%s' in an infinate loop!\n", stupid); From ee95a35b7189417eb64d340c1141b60a860eaf57 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 24 Feb 2012 15:18:44 -0600 Subject: [PATCH 3/5] formatting --- src/mod/endpoints/mod_sofia/sofia.c | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index a30cbb699d..b84cc00f4a 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -5806,11 +5806,11 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, } } else { if (sofia_test_pflag(profile, PFLAG_3PCC)) { - if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) { + if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "No SDP in INVITE and 3pcc=yes cannot work with bypass or proxy media, hanging up.\n"); switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "3PCC DISABLED"); switch_channel_hangup(channel, SWITCH_CAUSE_MANDATORY_IE_MISSING); - } else { + } else { switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP"); sofia_glue_tech_choose_port(tech_pvt, 0); sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0); @@ -5830,23 +5830,23 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->local_sdp_str), TAG_END()); } } - } else if (sofia_test_pflag(profile, PFLAG_3PCC_PROXY)) { - //3PCC proxy mode delays the 200 OK until the call is answered + } else if (sofia_test_pflag(profile, PFLAG_3PCC_PROXY)) { + //3PCC proxy mode delays the 200 OK until the call is answered // so can be made to work with bypass media as we have time to find out what the other end thinks codec offer should be... - switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP"); - sofia_set_flag_locked(tech_pvt, TFLAG_3PCC); - //sofia_glue_tech_choose_port(tech_pvt, 0); - //sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0); - sofia_set_flag(tech_pvt, TFLAG_LATE_NEGOTIATION); - //Moves into CS_INIT so call moves forward into the dialplan - switch_channel_set_state(channel, CS_INIT); - } else { - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "No SDP in INVITE and 3pcc not enabled, hanging up.\n"); - switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "3PCC DISABLED"); - switch_channel_hangup(channel, SWITCH_CAUSE_MANDATORY_IE_MISSING); - } - goto done; + switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP"); + sofia_set_flag_locked(tech_pvt, TFLAG_3PCC); + //sofia_glue_tech_choose_port(tech_pvt, 0); + //sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0); + sofia_set_flag(tech_pvt, TFLAG_LATE_NEGOTIATION); + //Moves into CS_INIT so call moves forward into the dialplan + switch_channel_set_state(channel, CS_INIT); + } else { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "No SDP in INVITE and 3pcc not enabled, hanging up.\n"); + switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "3PCC DISABLED"); + switch_channel_hangup(channel, SWITCH_CAUSE_MANDATORY_IE_MISSING); } + goto done; + } } else if (tech_pvt && sofia_test_flag(tech_pvt, TFLAG_SDP) && !r_sdp) { sofia_set_flag_locked(tech_pvt, TFLAG_NOSDP_REINVITE); From 803d25c45c4d92035ed78dc0bcec1d43c9cefa20 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Sat, 24 Sep 2011 06:24:49 +0000 Subject: [PATCH 4/5] Add ability to sign releases with tagscript --- scripts/tagscript.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/tagscript.sh b/scripts/tagscript.sh index 44797b3640..1ac817cb74 100755 --- a/scripts/tagscript.sh +++ b/scripts/tagscript.sh @@ -7,9 +7,20 @@ if [ ! -d .git ]; then exit 1; fi -if [ -z "$1" ]; then - echo "usage: ./scripts/tagscript.sh MAJOR.MINOR.MICRO[.REVISION]" 1>&2 +showusage() { + echo "usage: ./scripts/tagscript.sh [-s] MAJOR.MINOR.MICRO[.REVISION]" 1>&2 exit 1; +} + +while getopts "s" o; do + case "$o" in + s) opts="-s" ;; + esac +done +shift $(($OPTIND-1)) + +if [ -z "$1" ]; then + showusage fi ver="$1" @@ -46,7 +57,7 @@ fi git add configure.in git commit -m "Release freeswitch-$ver" -git tag -a -m "freeswitch-$ver release" v$ver +git tag -a ${opts} -m "freeswitch-$ver release" v$ver git clone $src_repo $dst_dir if [ -n "$stash_saved" ]; then From c9261be6d1829b9b98e2f5fba26186c276d7acec Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 24 Feb 2012 16:09:30 -0600 Subject: [PATCH 5/5] FS-3942 --- src/mod/say/mod_say_de/mod_say_de.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mod/say/mod_say_de/mod_say_de.c b/src/mod/say/mod_say_de/mod_say_de.c index 667f3f6669..542e4e6da4 100644 --- a/src/mod/say/mod_say_de/mod_say_de.c +++ b/src/mod/say/mod_say_de/mod_say_de.c @@ -87,7 +87,7 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_ if (a) { /*german nominativ for "one" in numbers like 21, 171, 4591 is flexed("ein" instead of "eins"), 2-9 are not*/ if ( a == 1 ) { - say_file("digits/s-%d.wav"); + say_file("digits/s-1.wav"); } else { say_file("digits/%d.wav", a); } @@ -98,7 +98,7 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_ if (b > 1) { /*german nominativ for "one" in numbers like 21, 171, 4591 is flexed, 2-9 are not*/ if ( c == 1 ) { - say_file("digits/s-%d.wav"); + say_file("digits/s-1.wav"); } else { say_file("digits/%d.wav", c); } @@ -127,7 +127,7 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_ if ( b == 0 && c == 1 && gender == SSG_FEMININE ) { say_file("digits/%d_f.wav", c); } else if ( b == 0 && c == 1 && what ) { - say_file("digits/s-%d.wav"); + say_file("digits/s-1.wav"); } else { say_file("digits/%d.wav", c); }