diff --git a/build/Makefile.centos5 b/build/Makefile.centos5 index ba3188603b..0ca56fd781 100644 --- a/build/Makefile.centos5 +++ b/build/Makefile.centos5 @@ -8,10 +8,10 @@ # Brian West # FSPREFIX=/usr/local/freeswitch -PREFIX=/opt/fs-libs +PREFIX=/usr/local/freeswitch DOWNLOAD=http://files.freeswitch.org/downloads/libs JPEG=v8d -OPENSSL=1.0.1h +OPENSSL=1.0.1i SQLITE=autoconf-3080403 PCRE=8.35 CURL=7.35.0 diff --git a/build/Makefile.openbsd b/build/Makefile.openbsd index 58b0051720..8d72e3e0a0 100644 --- a/build/Makefile.openbsd +++ b/build/Makefile.openbsd @@ -10,7 +10,7 @@ PKG=rsync-3.1.0 git automake-1.14.1 autoconf-2.69p1 libtool gmake bzip2 jpeg wget pcre speex libldns PREFIX=/usr/local/freeswitch DOWNLOAD=http://files.freeswitch.org/downloads/libs -LIBRESSL=2.0.3 +OPENSSL=1.0.1i LIBEDIT=20140618-3.1 CURL=7.35.0 @@ -39,11 +39,11 @@ has-git: deps: libedit libressl curl @PKG_PATH=http://openbsd.mirrors.pair.com/`uname -r`/packages/`machine -a`/ pkg_add -r $(PKG) -libressl: libressl-$(LIBRESSL)/Makefile -libressl-$(LIBRESSL)/Makefile: libressl-$(LIBRESSL) -libressl-$(LIBRESSL): +openssl: openssl-$(OPENSSL)/.done +openssl-$(OPENSSL)/.done: openssl-$(OPENSSL) +openssl-$(OPENSSL): (test -d $@) || (wget -4 -O $@.tar.gz $(DOWNLOAD)/$@.tar.gz && tar zxfv $@.tar.gz) - (cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install) + (cd $@ && ./Configure --prefix=$(PREFIX) BSD-x86_64 shared && make && sudo make install && touch .done) libedit: libedit-$(LIBEDIT)/Makefile libedit-$(LIBEDIT)/Makefile: libedit-$(LIBEDIT) diff --git a/build/Makefile.solaris11 b/build/Makefile.solaris11 index c510808e1e..7de640dc20 100644 --- a/build/Makefile.solaris11 +++ b/build/Makefile.solaris11 @@ -10,7 +10,7 @@ FSPREFIX=/usr/local/freeswitch PREFIX=/usr/local/ DOWNLOAD=http://files.freeswitch.org/downloads/libs JP=v8d -SSL=1.0.1h +SSL=1.0.1i SQLITE=autoconf-3080403 PCRE=8.35 CURL=7.35.0 diff --git a/build/modules.conf.in b/build/modules.conf.in index 44b386f151..71ece983ef 100644 --- a/build/modules.conf.in +++ b/build/modules.conf.in @@ -1,5 +1,6 @@ #applications/mod_abstraction #applications/mod_avmd +#applications/mod_bert #applications/mod_blacklist #applications/mod_callcenter #applications/mod_cidlookup diff --git a/conf/vanilla/autoload_configs/blacklist.conf.xml b/conf/vanilla/autoload_configs/blacklist.conf.xml index a981ebbdb0..9995febd83 100644 --- a/conf/vanilla/autoload_configs/blacklist.conf.xml +++ b/conf/vanilla/autoload_configs/blacklist.conf.xml @@ -5,7 +5,7 @@ NOTE: make sure the file exists and is readable by FreeSWITCH. - + --> diff --git a/conf/vanilla/autoload_configs/callcenter.conf.xml b/conf/vanilla/autoload_configs/callcenter.conf.xml index a069413ac6..fbc02c4a10 100644 --- a/conf/vanilla/autoload_configs/callcenter.conf.xml +++ b/conf/vanilla/autoload_configs/callcenter.conf.xml @@ -9,7 +9,7 @@ - + diff --git a/conf/vanilla/autoload_configs/cdr_pg_csv.conf.xml b/conf/vanilla/autoload_configs/cdr_pg_csv.conf.xml index 4fec817b45..9891455f8a 100644 --- a/conf/vanilla/autoload_configs/cdr_pg_csv.conf.xml +++ b/conf/vanilla/autoload_configs/cdr_pg_csv.conf.xml @@ -9,7 +9,7 @@ - + diff --git a/conf/vanilla/autoload_configs/erlang_event.conf.xml b/conf/vanilla/autoload_configs/erlang_event.conf.xml index 62deb84f67..7f627668ef 100644 --- a/conf/vanilla/autoload_configs/erlang_event.conf.xml +++ b/conf/vanilla/autoload_configs/erlang_event.conf.xml @@ -11,7 +11,7 @@ - + diff --git a/conf/vanilla/autoload_configs/fax.conf.xml b/conf/vanilla/autoload_configs/fax.conf.xml index c7d825665e..d6a5ff734b 100644 --- a/conf/vanilla/autoload_configs/fax.conf.xml +++ b/conf/vanilla/autoload_configs/fax.conf.xml @@ -6,7 +6,7 @@ - + diff --git a/conf/vanilla/autoload_configs/format_cdr.conf.xml b/conf/vanilla/autoload_configs/format_cdr.conf.xml index 227bcb4722..0c42e78b40 100644 --- a/conf/vanilla/autoload_configs/format_cdr.conf.xml +++ b/conf/vanilla/autoload_configs/format_cdr.conf.xml @@ -46,7 +46,7 @@ - + @@ -63,21 +63,21 @@ Specify your public key with 'ssl-cert-path' and the private key with 'ssl-key-path'. If your private key has a password, specify it with 'ssl-key-password'. --> - - + + - + - + diff --git a/conf/vanilla/autoload_configs/httapi.conf.xml b/conf/vanilla/autoload_configs/httapi.conf.xml index 50bbe78f40..723a336bc9 100644 --- a/conf/vanilla/autoload_configs/httapi.conf.xml +++ b/conf/vanilla/autoload_configs/httapi.conf.xml @@ -100,8 +100,8 @@ Specify your public key with 'ssl-cert-path' and the private key with 'ssl-key-path'. If your private key has a password, specify it with 'ssl-key-password'. --> - - + + @@ -109,14 +109,14 @@ - + - + diff --git a/conf/vanilla/autoload_configs/http_cache.conf.xml b/conf/vanilla/autoload_configs/http_cache.conf.xml index 5d0294c662..cd6ec119b4 100644 --- a/conf/vanilla/autoload_configs/http_cache.conf.xml +++ b/conf/vanilla/autoload_configs/http_cache.conf.xml @@ -3,12 +3,12 @@ - + - + diff --git a/conf/vanilla/autoload_configs/java.conf.xml b/conf/vanilla/autoload_configs/java.conf.xml index 5f71553e30..705114ac4a 100644 --- a/conf/vanilla/autoload_configs/java.conf.xml +++ b/conf/vanilla/autoload_configs/java.conf.xml @@ -1,7 +1,7 @@ - diff --git a/conf/vanilla/autoload_configs/lua.conf.xml b/conf/vanilla/autoload_configs/lua.conf.xml index f50307ea89..fafd336169 100644 --- a/conf/vanilla/autoload_configs/lua.conf.xml +++ b/conf/vanilla/autoload_configs/lua.conf.xml @@ -13,7 +13,7 @@ These entries will be pre-pended to the LUA_PATH environment variable --> - + diff --git a/conf/vanilla/autoload_configs/perl.conf.xml b/conf/vanilla/autoload_configs/perl.conf.xml index b2435000ff..0249119230 100644 --- a/conf/vanilla/autoload_configs/perl.conf.xml +++ b/conf/vanilla/autoload_configs/perl.conf.xml @@ -1,6 +1,6 @@ - + diff --git a/conf/vanilla/autoload_configs/voicemail.conf.xml b/conf/vanilla/autoload_configs/voicemail.conf.xml index 9e5e67ffa3..33d5a97760 100644 --- a/conf/vanilla/autoload_configs/voicemail.conf.xml +++ b/conf/vanilla/autoload_configs/voicemail.conf.xml @@ -64,7 +64,7 @@ - + diff --git a/conf/vanilla/autoload_configs/xml_cdr.conf.xml b/conf/vanilla/autoload_configs/xml_cdr.conf.xml index ac9b1f94d3..d4c4bea8d9 100644 --- a/conf/vanilla/autoload_configs/xml_cdr.conf.xml +++ b/conf/vanilla/autoload_configs/xml_cdr.conf.xml @@ -35,7 +35,7 @@ - + @@ -52,20 +52,20 @@ Specify your public key with 'ssl-cert-path' and the private key with 'ssl-key-path'. If your private key has a password, specify it with 'ssl-key-password'. --> - - + + - + - + diff --git a/conf/vanilla/autoload_configs/xml_curl.conf.xml b/conf/vanilla/autoload_configs/xml_curl.conf.xml index 30951d83c8..19214ee065 100644 --- a/conf/vanilla/autoload_configs/xml_curl.conf.xml +++ b/conf/vanilla/autoload_configs/xml_curl.conf.xml @@ -24,8 +24,8 @@ Specify your public key with 'ssl-cert-path' and the private key with 'ssl-key-path'. If your private key has a password, specify it with 'ssl-key-password'. --> - - + + @@ -33,14 +33,14 @@ - + - + diff --git a/conf/vanilla/dialplan/default.xml b/conf/vanilla/dialplan/default.xml index 8c4a1f0312..8971939ec2 100644 --- a/conf/vanilla/dialplan/default.xml +++ b/conf/vanilla/dialplan/default.xml @@ -129,7 +129,7 @@ - + @@ -598,14 +598,14 @@ - + - + @@ -675,14 +675,14 @@ - + - + @@ -710,7 +710,7 @@ - + diff --git a/conf/vanilla/sip_profiles/internal.xml b/conf/vanilla/sip_profiles/internal.xml index 583db26db3..9e6a93ae2a 100644 --- a/conf/vanilla/sip_profiles/internal.xml +++ b/conf/vanilla/sip_profiles/internal.xml @@ -307,7 +307,7 @@ - + diff --git a/conf/vanilla/vars.xml b/conf/vanilla/vars.xml index 20016cd85f..28a6dc96fb 100644 --- a/conf/vanilla/vars.xml +++ b/conf/vanilla/vars.xml @@ -28,6 +28,18 @@ recordings_dir sound_prefix sounds_dir + conf_dir + log_dir + run_dir + db_dir + mod_dir + htdocs_dir + script_dir + temp_dir + grammar_dir + certs_dir + storage_dir + cache_dir core_uuid zrtp_enabled nat_public_addr @@ -117,7 +129,7 @@ false - implies forbidden true - implies mandatory - default if not set is accept SAVP inbound if offered. + default if not set is accept SAVP inbound if offered. rtp_secure_media_inbound | rtp_secure_media_outbound diff --git a/configure.ac b/configure.ac index c008ebcff3..e698d4aa21 100644 --- a/configure.ac +++ b/configure.ac @@ -84,6 +84,7 @@ default_runtimedir="$rundir" default_scriptdir="$prefix/scripts" default_soundsdir="$prefix/sounds" default_storagedir="$prefix/storage" +default_cachedir="$prefix/cache" if test "$enable_fhs" = yes; then prefix="/usr" exec_prefix="$prefix" @@ -102,6 +103,7 @@ if test "$enable_fhs" = yes; then default_scriptdir="/usr/share/freeswitch/scripts" default_soundsdir="/usr/share/freeswitch/sounds" default_storagedir="/var/lib/freeswitch/storage" + default_cachedir="/var/cache/freeswitch" fi # Where to install the modules @@ -161,6 +163,11 @@ AC_ARG_WITH([storagedir], AC_SUBST(storagedir) AC_DEFINE_UNQUOTED([SWITCH_STORAGE_DIR],"${storagedir}",[where to put storage files]) +AC_ARG_WITH([cachedir], + [AS_HELP_STRING([--with-cachedir=DIR], [Put cache files into this location (default: $prefix/cache)])], [cachedir="$withval"], [cachedir="${default_cachedir}"]) +AC_SUBST(cachedir) +AC_DEFINE_UNQUOTED([SWITCH_CACHE_DIR],"${cachedir}",[where to put cache files]) + if test "$sysconfdir" = "\${prefix}/etc" ; then confdir="$prefix/conf" else @@ -1448,6 +1455,7 @@ AC_CONFIG_FILES([Makefile src/mod/Makefile src/mod/applications/mod_abstraction/Makefile src/mod/applications/mod_avmd/Makefile + src/mod/applications/mod_bert/Makefile src/mod/applications/mod_blacklist/Makefile src/mod/applications/mod_callcenter/Makefile src/mod/applications/mod_cidlookup/Makefile @@ -1748,5 +1756,6 @@ echo " runtimedir: ${runtimedir}" echo " scriptdir: ${scriptdir}" echo " soundsdir: ${soundsdir}" echo " storagedir: ${storagedir}" +echo " cachedir: ${cachedir}" echo "" echo "------------------------------------------------------------------------------" diff --git a/debian/bootstrap.sh b/debian/bootstrap.sh index b71ab98265..e9b77825a0 100755 --- a/debian/bootstrap.sh +++ b/debian/bootstrap.sh @@ -41,6 +41,7 @@ avoid_mods_jessie=( languages/mod_java ) avoid_mods_wheezy=( + languages/mod_java ) avoid_mods_squeeze=( formats/mod_vlc diff --git a/debian/control-modules b/debian/control-modules index 57b62dd6d1..9246317117 100644 --- a/debian/control-modules +++ b/debian/control-modules @@ -13,6 +13,10 @@ Description: Advanced voicemail detection This module attempts to determine when a voicemail system has answered the call. +Module: applications/mod_bert +Description: Line testing tool + This module provides a tool to test a line. + Module: applications/mod_blacklist Description: Blacklist helper This module provides tools to blacklist callers. diff --git a/debian/rules b/debian/rules index 398226139f..eefc3bc277 100755 --- a/debian/rules +++ b/debian/rules @@ -80,6 +80,7 @@ override_dh_auto_clean: --with-htdocsdir=/usr/share/freeswitch/htdocs \ --with-soundsdir=/usr/share/freeswitch/sounds \ --with-storagedir=/var/lib/freeswitch/storage \ + --with-cachedir=/var/cache/freeswitch \ --with-grammardir=/usr/share/freeswitch/grammar \ --with-certsdir=/etc/freeswitch/tls \ --with-scriptdir=/usr/share/freeswitch/scripts \ diff --git a/html5/verto/demo/verto.js b/html5/verto/demo/verto.js index 3935854ffb..4325d56ecc 100644 --- a/html5/verto/demo/verto.js +++ b/html5/verto/demo/verto.js @@ -461,8 +461,6 @@ function init() { if (verto) { verto.iceServers(tmp); } - - alert(tmp); }); verto = new $.verto({ diff --git a/scripts/perl/timezone-gen.pl b/scripts/perl/timezone-gen.pl index 682964d77d..281f88556c 100755 --- a/scripts/perl/timezone-gen.pl +++ b/scripts/perl/timezone-gen.pl @@ -55,7 +55,7 @@ foreach my $name ( sort( keys(%name_to_file) ) ) { my $data = join( "", <$in> ); close($in); - if ( $data !~ /^TZif2/o ) { + if ( $data !~ /^TZif/o ) { $debug && print "Skipped $file\n"; next; } diff --git a/src/include/switch_core_media.h b/src/include/switch_core_media.h index 1dfc4688c9..59e1b02b34 100644 --- a/src/include/switch_core_media.h +++ b/src/include/switch_core_media.h @@ -255,6 +255,7 @@ SWITCH_DECLARE(void) switch_core_session_clear_crypto(switch_core_session_t *ses SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core_session_t *session, switch_media_type_t type, const char *iananame, + uint32_t rate, switch_payload_t *ptP, switch_payload_t *recv_ptP, char **fmtpP); diff --git a/src/include/switch_cpp.h b/src/include/switch_cpp.h index 49f4c116dd..07c77ec54f 100644 --- a/src/include/switch_cpp.h +++ b/src/include/switch_cpp.h @@ -149,7 +149,9 @@ SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *bod SWITCH_DECLARE_CONSTRUCTOR Stream(void); SWITCH_DECLARE_CONSTRUCTOR Stream(switch_stream_handle_t *); virtual SWITCH_DECLARE_CONSTRUCTOR ~ Stream(); + SWITCH_DECLARE(const char *) read(int *len); SWITCH_DECLARE(void) write(const char *data); + SWITCH_DECLARE(void) raw_write(const char *data, int len); SWITCH_DECLARE(const char *) get_data(void); }; diff --git a/src/include/switch_module_interfaces.h b/src/include/switch_module_interfaces.h index aff702962b..0f4eebf239 100644 --- a/src/include/switch_module_interfaces.h +++ b/src/include/switch_module_interfaces.h @@ -91,6 +91,7 @@ struct switch_state_handler_table { }; struct switch_stream_handle { + switch_stream_handle_read_function_t read_function; switch_stream_handle_write_function_t write_function; switch_stream_handle_raw_write_function_t raw_write_function; void *data; diff --git a/src/include/switch_stfu.h b/src/include/switch_stfu.h index 1af6b23010..7bc2c766dc 100644 --- a/src/include/switch_stfu.h +++ b/src/include/switch_stfu.h @@ -172,6 +172,8 @@ typedef struct { uint32_t clean_count; uint32_t consecutive_good_count; uint32_t consecutive_bad_count; + double period_jitter_percent; + double period_missing_percent; } stfu_report_t; typedef void (*stfu_n_call_me_t)(stfu_instance_t *i, void *); diff --git a/src/include/switch_types.h b/src/include/switch_types.h index 55f1bd1614..b29a6176fd 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -510,6 +510,7 @@ struct switch_directories { char *htdocs_dir; char *grammar_dir; char *storage_dir; + char *cache_dir; char *recordings_dir; char *sounds_dir; char *lib_dir; @@ -2152,6 +2153,7 @@ typedef void (*switch_scheduler_func_t) (switch_scheduler_task_t *task); typedef switch_status_t (*switch_state_handler_t) (switch_core_session_t *); typedef struct switch_stream_handle switch_stream_handle_t; +typedef uint8_t * (*switch_stream_handle_read_function_t) (switch_stream_handle_t *handle, int *len); typedef switch_status_t (*switch_stream_handle_write_function_t) (switch_stream_handle_t *handle, const char *fmt, ...); typedef switch_status_t (*switch_stream_handle_raw_write_function_t) (switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen); diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index 8e019f1fb3..d7c07e7171 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -24,6 +24,7 @@ * Contributor(s): * * Anthony Minessale II + * Seven Du * * * switch_utils.h -- Compatability and Helper Code @@ -1102,6 +1103,52 @@ SWITCH_DECLARE(char *) switch_strerror_r(int errnum, char *buf, switch_size_t bu SWITCH_DECLARE(int) switch_wait_sock(switch_os_socket_t sock, uint32_t ms, switch_poll_t flags); SWITCH_DECLARE(int) switch_wait_socklist(switch_waitlist_t *waitlist, uint32_t len, uint32_t ms); +typedef struct switch_http_request_s { + const char *method; /* GET POST PUT DELETE OPTIONS PATCH HEAD */ + const char *uri; + const char *qs; /* query string*/ + const char *host; + switch_port_t port; + const char *from; + const char *user_agent; + const char *referer; + const char *user; + switch_bool_t keepalive; + const char *content_type; + switch_size_t content_length; + switch_size_t bytes_header; + switch_size_t bytes_read; + switch_size_t bytes_buffered; + switch_event_t *headers; + void *user_data; /* private user data */ + + /* private members used by the parser internally */ + char *_buffer; + switch_bool_t _destroy_headers; +} switch_http_request_t; + +/** + * parse http headers in a buffer + * return status of success or not + * \param[in] buffer the buffer start from the very begining of the http request, e.g. 'GET ' + * \param[in] datalen the buffer length + * \param[out] the http request pointer or null, need destroy later if got non-NULL pointer + * \return SWITCH_STATUS_SUCCESS | SWITCH_STATUS_FALSE + */ +SWITCH_DECLARE(switch_status_t) switch_http_parse_header(char *buffer, uint32_t datalen, switch_http_request_t *request); +SWITCH_DECLARE(void) switch_http_free_request(switch_http_request_t *request); +SWITCH_DECLARE(void) switch_http_dump_request(switch_http_request_t *request); +/** + * parse http query string + * \param[in] request the http request object + * \param[in] qs the query string buffer + * + * qs buffer will be modified, so be sure to dup the qs before passing into this function if you want to keep the original string untouched + * if qs is NULL, the it will parse request->qs, request->qs will be duplicated before parse to avoid being modified + */ + +SWITCH_DECLARE(void) switch_http_parse_qs(switch_http_request_t *request, char *qs); + SWITCH_END_EXTERN_C #endif /* For Emacs: diff --git a/src/mod/applications/mod_bert/Makefile.am b/src/mod/applications/mod_bert/Makefile.am new file mode 100644 index 0000000000..97fefcce10 --- /dev/null +++ b/src/mod/applications/mod_bert/Makefile.am @@ -0,0 +1,8 @@ +include $(top_srcdir)/build/modmake.rulesam +MODNAME=mod_bert + +mod_LTLIBRARIES = mod_bert.la +mod_bert_la_SOURCES = mod_bert.c +mod_bert_la_CFLAGS = $(AM_CFLAGS) +mod_bert_la_LIBADD = $(switch_builddir)/libfreeswitch.la +mod_bert_la_LDFLAGS = -avoid-version -module -no-undefined -shared diff --git a/src/mod/applications/mod_bert/mod_bert.c b/src/mod/applications/mod_bert/mod_bert.c new file mode 100644 index 0000000000..0988ffdbb9 --- /dev/null +++ b/src/mod/applications/mod_bert/mod_bert.c @@ -0,0 +1,389 @@ +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2005-2011, Anthony Minessale II + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Oreka Recording Module + * + * The Initial Developer of the Original Code is + * Moises Silva + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Moises Silva + * + * mod_bert -- Naive BERT tester + * + */ + +#include + +SWITCH_MODULE_LOAD_FUNCTION(mod_bert_load); +SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_bert_shutdown); +SWITCH_MODULE_DEFINITION(mod_bert, mod_bert_load, mod_bert_shutdown, NULL); + +#define G711_ULAW_IDLE_OCTET 0xFF + +/* http://en.wikipedia.org/wiki/Digital_milliwatt */ +unsigned char ulaw_digital_milliwatt[8] = { 0x1e, 0x0b, 0x0b, 0x1e, 0x9e, 0x8b, 0x8b, 0x9e }; + +typedef struct { + uint32_t processed_samples; + uint32_t err_samples; + uint32_t window_ms; + uint32_t window_samples; + uint32_t stats_sync_lost_cnt; + uint32_t stats_cng_cnt; + uint8_t sequence_sample; + uint8_t predicted_sample; + float max_err; + float max_err_hit; + float max_err_ever; + uint8_t in_sync; + uint8_t hangup_on_error; + uint8_t milliwatt_index; + uint8_t milliwatt_prediction_index; + switch_time_t timeout; + FILE *input_debug_f; + FILE *output_debug_f; + switch_timer_t timer; +} bert_t; + +#define bert_increase_milliwatt_index(index) \ + do { \ + if ((index) == (switch_arraylen(ulaw_digital_milliwatt)-1)) { \ + (index) = 0; \ + } else { \ + (index) = ((index) + 1); \ + } \ + } while (0); + +#define bert_close_debug_streams(bert, session) \ + do { \ + int rc = 0; \ + if (bert.input_debug_f) { \ + rc = fclose(bert.input_debug_f); \ + if (rc) { \ + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to close BERT input debug file!\n"); \ + } \ + bert.input_debug_f = NULL; \ + } \ + if (bert.output_debug_f) { \ + rc = fclose(bert.output_debug_f); \ + if (rc) { \ + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to close BERT output debug file!\n"); \ + } \ + bert.output_debug_f = NULL; \ + } \ + } while (0); + +#define BERT_STATS_VAR_SYNC_LOST "bert_stats_sync_lost" +#define BERT_STATS_VAR_SYNC_LOST_CNT "bert_stats_sync_lost_count" + +#define BERT_EVENT_TIMEOUT "mod_bert::timeout" +#define BERT_EVENT_LOST_SYNC "mod_bert::lost_sync" +#define BERT_EVENT_IN_SYNC "mod_bert::in_sync" + +#define BERT_DEFAULT_WINDOW_MS 1000 +#define BERT_DEFAULT_MAX_ERR 10.0 +#define BERT_DEFAULT_TIMEOUT_MS 10000 +SWITCH_STANDARD_APP(bert_test_function) +{ + switch_status_t status; + switch_frame_t *read_frame = NULL, write_frame = { 0 }; + switch_codec_implementation_t read_impl = { 0 }; + switch_channel_t *channel = NULL; + switch_event_t *event = NULL; + const char *var = NULL; + int i = 0; + int synced = 0; + int32_t timeout_ms = 0; + int32_t interval = 20; + int32_t samples = 0; + uint8_t *write_samples = NULL; + uint8_t *read_samples = NULL; + const char *timer_name = NULL; + bert_t bert = { 0 }; + + memset(&bert, 0, sizeof(bert)); + + channel = switch_core_session_get_channel(session); + + switch_channel_answer(channel); + + switch_core_session_get_read_impl(session, &read_impl); + + if (read_impl.ianacode != 0) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "This application only works when using ulaw codec\n"); + goto done; + } + + bert.window_ms = BERT_DEFAULT_WINDOW_MS; + bert.window_samples = switch_samples_per_packet(read_impl.samples_per_second, bert.window_ms); + bert.max_err = BERT_DEFAULT_MAX_ERR; + timeout_ms = BERT_DEFAULT_TIMEOUT_MS; + + /* check if there are user-defined overrides */ + if ((var = switch_channel_get_variable(channel, "bert_window_ms"))) { + int tmp = atoi(var); + if (tmp > 0) { + bert.window_ms = tmp; + bert.window_samples = switch_samples_per_packet(read_impl.samples_per_second, bert.window_ms); + } + } + if ((var = switch_channel_get_variable(channel, "bert_timeout_ms"))) { + int tmp = atoi(var); + if (tmp > 0) { + timeout_ms = tmp; + } + } + if ((var = switch_channel_get_variable(channel, "bert_max_err"))) { + double tmp = atoi(var); + if (tmp > 0) { + bert.max_err = (float)tmp; + } + } + if ((var = switch_channel_get_variable(channel, "bert_hangup_on_error"))) { + if (switch_true(var)) { + bert.hangup_on_error = 1; + } + } + if ((var = switch_channel_get_variable(channel, "bert_debug_io_file"))) { + char debug_file[1024]; + snprintf(debug_file, sizeof(debug_file), "%s.in", var); + bert.input_debug_f = fopen(debug_file, "w"); + if (!bert.input_debug_f) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to open input debug file %s\n", debug_file); + } + snprintf(debug_file, sizeof(debug_file), "%s.out", var); + bert.output_debug_f = fopen(debug_file, "w"); + if (!bert.output_debug_f) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to open output debug file %s\n", debug_file); + } + } + if ((var = switch_channel_get_variable(channel, "bert_timer_name"))) { + timer_name = var; + } + + /* Setup the timer, so we can send audio at correct time frames even if we do not receive audio */ + if (timer_name) { + interval = read_impl.microseconds_per_packet / 1000; + samples = switch_samples_per_packet(read_impl.samples_per_second, interval); + if (switch_core_timer_init(&bert.timer, timer_name, interval, samples, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setup timer success interval: %u samples: %u\n", interval, samples); + } else { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Timer Setup Failed. BERT cannot start!\n"); + goto done; + } + switch_core_timer_sync(&bert.timer); + } + + bert.timeout = (switch_micro_time_now() + (timeout_ms * 1000)); + + write_frame.codec = switch_core_session_get_read_codec(session); + write_frame.data = switch_core_session_alloc(session, SWITCH_RECOMMENDED_BUFFER_SIZE); + write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE; + + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "BERT Test Window=%ums/%u, MaxErr=%f%%, Timeout=%dms\n", bert.window_ms, bert.window_samples, bert.max_err, timeout_ms); + if (bert.window_samples <= 0) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to compute BERT window samples!\n"); + goto done; + } + switch_channel_set_variable(channel, BERT_STATS_VAR_SYNC_LOST_CNT, "0"); + switch_channel_set_variable(channel, BERT_STATS_VAR_SYNC_LOST, "false"); + write_samples = write_frame.data; + for (;;) { + + if (!switch_channel_ready(channel)) { + break; + } + + switch_ivr_parse_all_events(session); + + if (timer_name) { + if (switch_core_timer_next(&bert.timer) != SWITCH_STATUS_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to step on timer!\n"); + break; + } + } + + /* Write our frame before anything else happens */ + for (i = 0; i < read_impl.samples_per_packet; i++) { + /* Calculate our next sequence sample to write */ + bert.sequence_sample = ulaw_digital_milliwatt[bert.milliwatt_index]; + //switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "[%d] 0x%X\n", bert.milliwatt_index, bert.sequence_sample); + bert_increase_milliwatt_index(bert.milliwatt_index); + //switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "[%d] 0x%X\n", bert.milliwatt_index, bert.sequence_sample); + write_samples[i] = bert.sequence_sample; + } + + write_frame.datalen = read_impl.samples_per_packet; + write_frame.samples = read_impl.samples_per_packet; + if (timer_name) { + write_frame.timestamp = bert.timer.samplecount; + } else { + /* playback() does not set write_frame.timestamp unless a timer is used, what's the catch? */ + } + if (bert.output_debug_f) { + fwrite(write_frame.data, write_frame.datalen, 1, bert.output_debug_f); + } + status = switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0); + if (!SWITCH_READ_ACCEPTABLE(status)) { + break; + } + + /* Proceed to read and process the read frame ... + * Note core_session_read_frame is a blocking operation, we should probably do reathing in another thread like playback() does using switch_core_service_session() */ + status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0); + if (!SWITCH_READ_ACCEPTABLE(status)) { + break; + } + + if (bert.timeout && !synced) { + switch_time_t now = switch_micro_time_now(); + if (now >= bert.timeout) { + bert.timeout = 0; + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "BERT Timeout (read_samples=%d, read_bytes=%d, expected_samples=%d, session=%s)\n", + read_frame->samples, read_frame->datalen, read_impl.samples_per_packet, switch_core_session_get_uuid(session)); + if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, BERT_EVENT_TIMEOUT) == SWITCH_STATUS_SUCCESS) { + switch_channel_event_set_basic_data(channel, event); + switch_event_fire(&event); + } + if (bert.hangup_on_error) { + switch_channel_hangup(channel, SWITCH_CAUSE_MEDIA_TIMEOUT); + } + } + } + + /* Treat CNG as silence */ + if (switch_test_flag(read_frame, SFF_CNG)) { + read_frame->samples = read_impl.samples_per_packet; + read_frame->datalen = read_impl.samples_per_packet; + memset(read_frame->data, G711_ULAW_IDLE_OCTET, read_frame->datalen); + bert.stats_cng_cnt++; + } + + if (read_frame->samples != read_impl.samples_per_packet || !read_frame->datalen) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Read %d samples, expected %d!\n", read_frame->samples, read_impl.samples_per_packet); + continue; + } + + read_samples = read_frame->data; + if (bert.input_debug_f) { + size_t ret = fwrite(read_frame->data, read_frame->datalen, 1, bert.input_debug_f); + if (ret != 1) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to write to BERT input debug file!\n"); + } + } + + /* BERT Sync Loop */ + for (i = 0; i < read_frame->samples; i++) { + if (bert.window_samples == bert.processed_samples) { + float err = 0.0; + /* If the channel is going down, then it is expected we'll have errors, ignore them and bail out */ + if (!switch_channel_ready(channel)) { + bert_close_debug_streams(bert, session); + break; + } + /* Calculate error rate */ + err = ((float)((float)bert.err_samples / (float)bert.processed_samples) * 100.0); + if (err > bert.max_err) { + if (bert.in_sync) { + bert.in_sync = 0; + bert.stats_sync_lost_cnt++; + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "BERT Sync Lost: %f%% loss (count=%u, cng_count=%d, err_samples=%u, session=%s)\n", + err, bert.stats_sync_lost_cnt, bert.stats_cng_cnt, bert.err_samples, switch_core_session_get_uuid(session)); + switch_channel_set_variable_printf(channel, BERT_STATS_VAR_SYNC_LOST_CNT, "%u", bert.stats_sync_lost_cnt); + switch_channel_set_variable(channel, BERT_STATS_VAR_SYNC_LOST, "true"); + if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, BERT_EVENT_LOST_SYNC) == SWITCH_STATUS_SUCCESS) { + switch_channel_event_set_basic_data(channel, event); + switch_event_fire(&event); + } + if (bert.hangup_on_error) { + switch_channel_hangup(channel, SWITCH_CAUSE_MEDIA_TIMEOUT); + bert_close_debug_streams(bert, session); + } + } + } else if (!bert.in_sync) { + bert.in_sync = 1; + synced = 1; + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "BERT Sync Success\n"); + bert.stats_cng_cnt = 0; + bert.timeout = 0; + if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, BERT_EVENT_IN_SYNC) == SWITCH_STATUS_SUCCESS) { + switch_channel_event_set_basic_data(channel, event); + switch_event_fire(&event); + } + } + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG10, "Err=%f%% (%u/%u)\n", err, bert.err_samples, bert.processed_samples); + if (synced && err > bert.max_err_hit) { + bert.max_err_hit = err; + } + if (err > bert.max_err_ever) { + bert.max_err_ever = err; + } + bert.processed_samples = 0; + bert.err_samples = 0; + } + + if (bert.predicted_sample != read_samples[i]) { + bert.err_samples++; + if (!bert.in_sync) { + /* If we're not in sync, we must reset the index on error to start the pattern detection again */ + bert.milliwatt_prediction_index = 0; + } + } + + /* Try to guess what the next sample will be in the milliwatt sequence */ + bert.predicted_sample = ulaw_digital_milliwatt[bert.milliwatt_prediction_index]; + bert_increase_milliwatt_index(bert.milliwatt_prediction_index); + + bert.processed_samples++; + } + } + +done: + bert_close_debug_streams(bert, session); + if (bert.timer.interval) { + switch_core_timer_destroy(&bert.timer); + } + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "BERT Test Completed. MaxErr=%f%%\n", synced ? bert.max_err_hit : bert.max_err_ever); +} + +SWITCH_MODULE_LOAD_FUNCTION(mod_bert_load) +{ + switch_application_interface_t *app_interface = NULL; + + *module_interface = switch_loadable_module_create_module_interface(pool, modname); + + SWITCH_ADD_APP(app_interface, "bert_test", "Start BERT Test", "Start BERT Test", bert_test_function, "", SAF_NONE); + return SWITCH_STATUS_SUCCESS; +} + +SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_bert_shutdown) +{ + return SWITCH_STATUS_UNLOAD; +} + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:nil + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4: + */ diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index fbb1cd9036..406aa14b95 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -4633,7 +4633,7 @@ static void member_add_file_data(conference_member_t *member, int16_t *data, swi pool = fnode->pool; fnode = NULL; switch_core_destroy_memory_pool(&pool); - } else { + } else if(!switch_test_flag(member->fnode, NFLAG_PAUSE)) { /* skip this frame until leadin time has expired */ if (member->fnode->leadin) { member->fnode->leadin--; @@ -7145,64 +7145,103 @@ static switch_status_t conf_api_sub_xml_list(conference_obj_t *conference, switc return SWITCH_STATUS_SUCCESS; } +static void switch_fnode_toggle_pause(conference_file_node_t *fnode, switch_stream_handle_t *stream) +{ + if (fnode) { + if (switch_test_flag(fnode, NFLAG_PAUSE)) { + stream->write_function(stream, "+OK Resume\n"); + switch_clear_flag(fnode, NFLAG_PAUSE); + } else { + stream->write_function(stream, "+OK Pause\n"); + switch_set_flag(fnode, NFLAG_PAUSE); + } + } +} + static switch_status_t conf_api_sub_pause_play(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv) { if (argc == 2) { switch_mutex_lock(conference->mutex); - if (conference->fnode) { - if (switch_test_flag(conference->fnode, NFLAG_PAUSE)) { - stream->write_function(stream, "+OK Resume\n"); - switch_clear_flag(conference->fnode, NFLAG_PAUSE); - } else { - stream->write_function(stream, "+OK Pause\n"); - switch_set_flag(conference->fnode, NFLAG_PAUSE); - } - } + switch_fnode_toggle_pause(conference->fnode, stream); switch_mutex_unlock(conference->mutex); return SWITCH_STATUS_SUCCESS; } + if (argc == 3) { + uint32_t id = atoi(argv[2]); + conference_member_t *member; + + if ((member = conference_member_get(conference, id))) { + switch_mutex_lock(member->fnode_mutex); + switch_fnode_toggle_pause(member->fnode, stream); + switch_mutex_unlock(member->fnode_mutex); + switch_thread_rwlock_unlock(member->rwlock); + return SWITCH_STATUS_SUCCESS; + } else { + stream->write_function(stream, "Member: %u not found.\n", id); + } + } + return SWITCH_STATUS_GENERR; } -static switch_status_t conf_api_sub_file_seek(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv) +static void switch_fnode_seek(conference_file_node_t *fnode, switch_stream_handle_t *stream, char *arg) { - if (argc == 3) { + if (fnode && fnode->type == NODE_TYPE_FILE) { unsigned int samps = 0; unsigned int pos = 0; - switch_mutex_lock(conference->mutex); - - if (conference->fnode && conference->fnode->type == NODE_TYPE_FILE) { - if (*argv[2] == '+' || *argv[2] == '-') { + if (*arg == '+' || *arg == '-') { int step; int32_t target; - if (!(step = atoi(argv[2]))) { + if (!(step = atoi(arg))) { step = 1000; } - samps = step * (conference->fnode->fh.native_rate / 1000); - target = (int32_t)conference->fnode->fh.pos + samps; + samps = step * (fnode->fh.native_rate / 1000); + target = (int32_t)fnode->fh.pos + samps; if (target < 0) { target = 0; } stream->write_function(stream, "+OK seek to position %d\n", target); - switch_core_file_seek(&conference->fnode->fh, &pos, target, SEEK_SET); + switch_core_file_seek(&fnode->fh, &pos, target, SEEK_SET); } else { - samps = switch_atoui(argv[2]) * (conference->fnode->fh.native_rate / 1000); + samps = switch_atoui(arg) * (fnode->fh.native_rate / 1000); stream->write_function(stream, "+OK seek to position %d\n", samps); - switch_core_file_seek(&conference->fnode->fh, &pos, samps, SEEK_SET); + switch_core_file_seek(&fnode->fh, &pos, samps, SEEK_SET); } } +} + +static switch_status_t conf_api_sub_file_seek(conference_obj_t *conference, switch_stream_handle_t *stream, int argc, char **argv) +{ + if (argc == 3) { + switch_mutex_lock(conference->mutex); + switch_fnode_seek(conference->fnode, stream, argv[2]); switch_mutex_unlock(conference->mutex); return SWITCH_STATUS_SUCCESS; } + if (argc == 4) { + uint32_t id = atoi(argv[3]); + conference_member_t *member = conference_member_get(conference, id); + if (member == NULL) { + stream->write_function(stream, "Member: %u not found.\n", id); + return SWITCH_STATUS_GENERR; + } + + switch_mutex_lock(member->fnode_mutex); + switch_fnode_seek(member->fnode, stream, argv[2]); + switch_mutex_unlock(member->fnode_mutex); + switch_thread_rwlock_unlock(member->rwlock); + return SWITCH_STATUS_SUCCESS; + } + return SWITCH_STATUS_GENERR; } @@ -8108,8 +8147,8 @@ static api_command_t conf_api_sub_commands[] = { {"position", (void_fn_t) & conf_api_sub_position, CONF_API_SUB_MEMBER_TARGET, "position", " ,,"}, {"auto-3d-position", (void_fn_t) & conf_api_sub_auto_position, CONF_API_SUB_ARGS_SPLIT, "auto-3d-position", "[on|off]"}, {"play", (void_fn_t) & conf_api_sub_play, CONF_API_SUB_ARGS_SPLIT, "play", " [async| [nomux]]"}, - {"pause_play", (void_fn_t) & conf_api_sub_pause_play, CONF_API_SUB_ARGS_SPLIT, "pause", ""}, - {"file_seek", (void_fn_t) & conf_api_sub_file_seek, CONF_API_SUB_ARGS_SPLIT, "file_seek", "[+-]"}, + {"pause_play", (void_fn_t) & conf_api_sub_pause_play, CONF_API_SUB_ARGS_SPLIT, "pause", "[]"}, + {"file_seek", (void_fn_t) & conf_api_sub_file_seek, CONF_API_SUB_ARGS_SPLIT, "file_seek", "[+-] []"}, {"say", (void_fn_t) & conf_api_sub_say, CONF_API_SUB_ARGS_AS_ONE, "say", ""}, {"saymember", (void_fn_t) & conf_api_sub_saymember, CONF_API_SUB_ARGS_AS_ONE, "saymember", " "}, {"stop", (void_fn_t) & conf_api_sub_stop, CONF_API_SUB_ARGS_SPLIT, "stop", "<[current|all|async|last]> []"}, diff --git a/src/mod/applications/mod_hash/mod_hash.c b/src/mod/applications/mod_hash/mod_hash.c index 133f05de3e..fdc12bee2b 100644 --- a/src/mod/applications/mod_hash/mod_hash.c +++ b/src/mod/applications/mod_hash/mod_hash.c @@ -280,12 +280,13 @@ SWITCH_LIMIT_RELEASE(limit_release_hash) limit_hash_private_t *pvt = switch_channel_get_private(channel, "limit_hash"); limit_hash_item_t *item = NULL; + switch_thread_rwlock_wrlock(globals.limit_hash_rwlock); + if (!pvt || !pvt->hash) { + switch_thread_rwlock_unlock(globals.limit_hash_rwlock); return SWITCH_STATUS_SUCCESS; } - switch_thread_rwlock_wrlock(globals.limit_hash_rwlock); - /* clear for uuid */ if (realm == NULL && resource == NULL) { switch_hash_index_t *hi = NULL; diff --git a/src/mod/applications/mod_translate/mod_translate.c b/src/mod/applications/mod_translate/mod_translate.c index ae6dcab9ac..7180ea1d6b 100644 --- a/src/mod/applications/mod_translate/mod_translate.c +++ b/src/mod/applications/mod_translate/mod_translate.c @@ -117,9 +117,9 @@ static void translate_number(char *number, char *profile, char **translated, swi translate_rule_t *hi = NULL; translate_rule_t *rule = NULL; switch_regex_t *re = NULL; - int proceed = 0, ovector[30]; - char *substituted = NULL; - uint32_t len = 0; + int proceed = 0, ovector[30], subbedlen = 0; + char *substituted = NULL, *subbed = NULL, *session_malloc = NULL; + uint32_t len = 1024; if (!profile) { profile = "US"; @@ -137,7 +137,7 @@ static void translate_number(char *number, char *profile, char **translated, swi switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s =~ /%s/\n", number, rule->regex); if ((proceed = switch_regex_perform(number, rule->regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s matched %s, replacing with %s\n", number, rule->regex, rule->replace); - if (!(substituted = malloc(len))) { + if (!(substituted = switch_core_session_alloc(session, len))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n"); switch_regex_safe_free(re); goto end; @@ -149,10 +149,21 @@ static void translate_number(char *number, char *profile, char **translated, swi if ((switch_string_var_check_const(substituted) || switch_string_has_escaped_data(substituted))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "perform variable expansion\n"); if (session) { - substituted = switch_channel_expand_variables(switch_core_session_get_channel(session), substituted); + subbed = switch_channel_expand_variables(switch_core_session_get_channel(session), substituted); } else if (event) { - substituted = switch_event_expand_headers(event, substituted); + subbed = switch_event_expand_headers(event, substituted); } + + subbedlen = strlen(subbed) + 1; + session_malloc = (char *)switch_core_session_alloc(session, subbedlen); + memset(session_malloc, 0, subbedlen); + strncpy(session_malloc, subbed, subbedlen); + if (subbed != substituted) + { + switch_safe_free(subbed); + } + + substituted = session_malloc; } break; diff --git a/src/mod/applications/mod_valet_parking/mod_valet_parking.c b/src/mod/applications/mod_valet_parking/mod_valet_parking.c index 90f20233d3..05b8074a02 100644 --- a/src/mod/applications/mod_valet_parking/mod_valet_parking.c +++ b/src/mod/applications/mod_valet_parking/mod_valet_parking.c @@ -397,7 +397,7 @@ static switch_status_t read_frame_callback(switch_core_session_t *session, switc return SWITCH_STATUS_SUCCESS; } -#define VALET_APP_SYNTAX " |[ask [] [] [] []|auto in [min] [max]]" +#define VALET_APP_SYNTAX " |[ask [] [] [] []|auto [in|out] [min] [max]]" SWITCH_STANDARD_APP(valet_parking_function) { char *argv[6], *lbuf; diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c index 18b10e584d..f54224640f 100644 --- a/src/mod/endpoints/mod_skinny/skinny_server.c +++ b/src/mod/endpoints/mod_skinny/skinny_server.c @@ -191,6 +191,7 @@ switch_status_t skinny_create_incoming_session(listener_t *listener, uint32_t *l goto done; error: + skinny_log_l(listener, SWITCH_LOG_CRIT, "Failed to create incoming session for line instance %d", *line_instance_p); if (nsession) { switch_core_session_destroy(&nsession); } @@ -896,8 +897,13 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener switch_status_t status = SWITCH_STATUS_SUCCESS; private_t *tech_pvt = NULL; switch_channel_t *channel = NULL; + switch_channel_t *channel2 = NULL; + const char *local_uuid = NULL; + const char *local_uuid2 = NULL; const char *remote_uuid = NULL; + const char *remote_uuid2 = NULL; switch_core_session_t *session2 = NULL; + switch_core_session_t *rsession = NULL; private_t *tech_pvt2 = NULL; switch_assert(session); @@ -906,30 +912,75 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener tech_pvt = switch_core_session_get_private(session); channel = switch_core_session_get_channel(session); + local_uuid = switch_channel_get_uuid(channel); remote_uuid = switch_channel_get_partner_uuid(channel); + if ( switch_core_session_get_partner(session, &rsession) == SWITCH_STATUS_SUCCESS ) + { + switch_channel_t *rchannel = NULL; + rchannel = switch_core_session_get_channel(rsession); + + skinny_log_l_msg(listener, SWITCH_LOG_INFO, "SST: setting uuid bridge continue flag on remote channel\n"); + + switch_channel_set_variable(rchannel, "uuid_bridge_continue_on_cancel", "true"); + switch_core_session_rwunlock(rsession); + } + + skinny_log_l(listener, SWITCH_LOG_INFO, "SST: local_uuid=%s remote_uuid=%s\n", local_uuid, remote_uuid); + if (tech_pvt->transfer_from_call_id) { + skinny_log_l_msg(listener, SWITCH_LOG_INFO, "SST: transfer_from_call_id\n"); + if((session2 = skinny_profile_find_session(listener->profile, listener, &line_instance, tech_pvt->transfer_from_call_id))) { - switch_channel_t *channel2 = switch_core_session_get_channel(session2); - const char *remote_uuid2 = switch_channel_get_partner_uuid(channel2); - if (switch_ivr_uuid_bridge(remote_uuid, remote_uuid2) == SWITCH_STATUS_SUCCESS) { + channel2 = switch_core_session_get_channel(session2); + local_uuid2 = switch_channel_get_uuid(channel2); + remote_uuid2 = switch_channel_get_partner_uuid(channel2); + skinny_log_ls(listener, session2, SWITCH_LOG_INFO, "SST: tx from session - local_uuid=%s remote_uuid=%s local_uuid2=%s remote_uuid2=%s\n", + local_uuid, remote_uuid, local_uuid2, remote_uuid2); + + skinny_log_ls(listener, session2, SWITCH_LOG_INFO, "SST: attempting ivr bridge from (%s) to (%s)\n", remote_uuid, remote_uuid2); + + if (switch_ivr_uuid_bridge(remote_uuid2, remote_uuid) == SWITCH_STATUS_SUCCESS) { + skinny_log_ls_msg(listener, session2, SWITCH_LOG_INFO, "SST: success on uuid bridge\n"); + switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); switch_channel_hangup(channel2, SWITCH_CAUSE_NORMAL_CLEARING); } else { + skinny_log_ls_msg(listener, session2, SWITCH_LOG_INFO, "SST: failure on uuid bridge\n"); /* TODO: How to inform the user that the bridge is not possible? */ } switch_core_session_rwunlock(session2); } } else { + skinny_log_l_msg(listener, SWITCH_LOG_INFO, "SST: !transfer_from_call_id\n"); + if(remote_uuid) { + skinny_log_ls_msg(listener, session2, SWITCH_LOG_INFO, "SST: found remote_uuid\n"); + /* TODO CallSelectStat */ + skinny_log_ls_msg(listener, session2, SWITCH_LOG_INFO, "SST: creating incoming session\n"); status = skinny_create_incoming_session(listener, &line_instance, &session2); + if ( ! session2 ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "SST: Unable to create incoming session for transfer.\n"); + return SWITCH_STATUS_FALSE; + } tech_pvt2 = switch_core_session_get_private(session2); tech_pvt2->transfer_from_call_id = tech_pvt->call_id; tech_pvt->transfer_to_call_id = tech_pvt2->call_id; + skinny_log_ls(listener, session2, SWITCH_LOG_INFO, "SST: transfer_to_call_id=%d transfer_from_call_id=%d\n", tech_pvt2->call_id, + tech_pvt->call_id); + skinny_log_ls_msg(listener, session2, SWITCH_LOG_INFO, "SST: triggering dial on incoming session\n"); skinny_session_process_dest(session2, listener, line_instance, NULL, '\0', 0); + + channel2 = switch_core_session_get_channel(session2); + local_uuid2 = switch_channel_get_uuid(channel2); + remote_uuid2 = switch_channel_get_partner_uuid(channel2); + skinny_log_ls(listener, session2, SWITCH_LOG_INFO, "SST: new session - local_uuid2=%s remote_uuid2=%s\n", local_uuid2, remote_uuid2); + switch_core_session_rwunlock(session2); } else { + skinny_log_ls_msg(listener, session2, SWITCH_LOG_INFO, "SST: could not find remote_uuid\n"); + /* TODO: How to inform the user that the bridge is not possible? */ } } @@ -1387,6 +1438,10 @@ switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_mess switch(request->data.stimulus.instance_type) { case SKINNY_BUTTON_LAST_NUMBER_REDIAL: skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle last number redial stimulus message, couldn't create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, empty_null2(listener->ext_redial,listener->profile->ext_redial), '\0', 0); break; @@ -1395,9 +1450,13 @@ switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_mess session = skinny_profile_find_session(listener->profile, listener, &line_instance, 0); if(strlen(button_speed_dial->line) > 0) { - if (!session) { + if ( !session ) { skinny_create_incoming_session(listener, &line_instance, &session); } + if ( !session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle speed dial stimulus message, couldn't create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, button_speed_dial->line, '\0', 0); } break; @@ -1417,6 +1476,10 @@ switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_mess break; case SKINNY_BUTTON_VOICEMAIL: skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle stimulus message, couldn't create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, empty_null2(listener->ext_voicemail, listener->profile->ext_voicemail), '\0', 0); break; @@ -1451,6 +1514,10 @@ switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_mess } skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle stimulus message, couldn't create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, NULL, '\0', 0); } break; @@ -1489,6 +1556,10 @@ switch_status_t skinny_handle_off_hook_message(listener_t *listener, skinny_mess skinny_session_answer(session, listener, line_instance); } else { /* start a new call */ skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle off hook message, could not create session.\n"); + return SWITCH_STATUS_FALSE; + } tech_pvt = switch_core_session_get_private(session); assert(tech_pvt != NULL); @@ -2003,11 +2074,19 @@ switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinn switch(request->data.soft_key_event.event) { case SOFTKEY_REDIAL: status = skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle soft key event, could not create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, empty_null2(listener->ext_redial,listener->profile->ext_redial), '\0', 0); break; case SOFTKEY_NEWCALL: status = skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle soft key event, could not create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, NULL, '\0', 0); break; case SOFTKEY_HOLD: @@ -2064,17 +2143,29 @@ switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinn break; case SOFTKEY_MEETME: skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle soft key event, could not create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, empty_null2(listener->ext_meetme, listener->profile->ext_meetme), '\0', 0); break; case SOFTKEY_CALLPICKUP: case SOFTKEY_GRPCALLPICKUP: skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle soft key event, could not create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, empty_null2(listener->ext_pickup, listener->profile->ext_pickup), '\0', 0); break; case SOFTKEY_CFWDALL: skinny_create_incoming_session(listener, &line_instance, &session); + if ( ! session ) { + skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle soft key event, could not create incoming session.\n"); + return SWITCH_STATUS_FALSE; + } skinny_session_process_dest(session, listener, line_instance, empty_null2(listener->ext_cfwdall, listener->profile->ext_cfwdall), '\0', 0); break; diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 33f4e0f855..aff86a6331 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2584,6 +2584,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t stream->write_function(stream, "PingState\t%d/%d/%d\n", gp->ping_min, gp->ping_count, gp->ping_max); stream->write_function(stream, "State \t%s\n", sofia_state_names[gp->state]); stream->write_function(stream, "Status \t%s%s\n", status_names[gp->status], gp->pinging ? " (ping)" : ""); + stream->write_function(stream, "Uptime \t%lds\n", gp->status == SOFIA_GATEWAY_UP ? (switch_time_now()-gp->uptime)/1000000 : 0); stream->write_function(stream, "CallsIN \t%u\n", gp->ib_calls); stream->write_function(stream, "CallsOUT\t%u\n", gp->ob_calls); stream->write_function(stream, "FailedCallsIN\t%u\n", gp->ib_failed_calls); @@ -2827,6 +2828,7 @@ static void xml_gateway_status(sofia_gateway_t *gp, switch_stream_handle_t *stre stream->write_function(stream, " %d\n", gp->pinging); stream->write_function(stream, " %s\n", sofia_state_names[gp->state]); stream->write_function(stream, " %s\n", status_names[gp->status]); + stream->write_function(stream, " %ld\n", gp->status == SOFIA_GATEWAY_UP ? switch_time_now()-gp->uptime : 0); stream->write_function(stream, " %u\n", gp->ib_calls); stream->write_function(stream, " %u\n", gp->ob_calls); stream->write_function(stream, " %u\n", gp->ib_failed_calls); @@ -5561,8 +5563,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load) switch_management_interface_t *management_interface; switch_application_interface_t *app_interface; struct in_addr in; - struct tm tm = {0}; - time_t now; memset(&mod_sofia_globals, 0, sizeof(mod_sofia_globals)); mod_sofia_globals.destroy_private.destroy_nh = 1; @@ -5571,11 +5571,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load) mod_sofia_globals.pool = pool; switch_mutex_init(&mod_sofia_globals.mutex, SWITCH_MUTEX_NESTED, mod_sofia_globals.pool); - now = switch_epoch_time_now(NULL); - tm = *(localtime(&now)); - - mod_sofia_globals.presence_epoch = now - (tm.tm_yday * 86400) - (tm.tm_hour * 60 * 60) - (tm.tm_min * 60) - tm.tm_sec; - switch_find_local_ip(mod_sofia_globals.guess_ip, sizeof(mod_sofia_globals.guess_ip), &mod_sofia_globals.guess_mask, AF_INET); in.s_addr = mod_sofia_globals.guess_mask; switch_set_string(mod_sofia_globals.guess_mask_str, inet_ntoa(in)); diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h index 577ff07bbc..ee03f235ce 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.h +++ b/src/mod/endpoints/mod_sofia/mod_sofia.h @@ -369,6 +369,7 @@ struct mod_sofia_globals { switch_thread_t *presence_thread; uint32_t max_reg_threads; time_t presence_epoch; + int presence_year; }; extern struct mod_sofia_globals mod_sofia_globals; @@ -488,10 +489,12 @@ struct sofia_gateway { time_t reg_timeout; int pinging; sofia_gateway_status_t status; + switch_time_t uptime; uint32_t ping_freq; int ping_count; int ping_max; int ping_min; + switch_bool_t ping_monitoring; uint8_t flags[REG_FLAG_MAX]; int32_t retry_seconds; int32_t reg_timeout_seconds; diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index edc15cf69b..c2fd9adb2f 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -3274,7 +3274,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) if ((gateway = switch_core_alloc(profile->pool, sizeof(*gateway)))) { const char *sipip, *format; switch_uuid_t uuid; - uint32_t ping_freq = 0, extension_in_contact = 0, distinct_to = 0, rfc_5626 = 0; + uint32_t ping_freq = 0, extension_in_contact = 0, ping_monitoring = 0, distinct_to = 0, rfc_5626 = 0; int ping_max = 1, ping_min = 1; char *register_str = "true", *scheme = "Digest", *realm = NULL, @@ -3311,6 +3311,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) gateway->ping_max = 0; gateway->ping_min = 0; gateway->ping_count = 0; + gateway->ping_monitoring = SWITCH_FALSE; gateway->ib_calls = 0; gateway->ob_calls = 0; gateway->ib_failed_calls = 0; @@ -3393,6 +3394,8 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) ping_min = atoi(val); } else if (!strcmp(var, "ping-user-agent")) { options_user_agent = val; + } else if (!strcmp(var, "ping-monitoring")) { // if true then every gw ping result will fire a gateway status event + ping_monitoring = switch_true(val); } else if (!strcmp(var, "proxy")) { proxy = val; } else if (!strcmp(var, "context")) { @@ -3487,6 +3490,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) if (!switch_true(register_str)) { gateway->state = REG_STATE_NOREG; gateway->status = SOFIA_GATEWAY_UP; + gateway->uptime = switch_time_now(); } if (zstr(auth_username)) { @@ -3569,6 +3573,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) gateway->ping_freq = ping_freq; gateway->ping_max = ping_max; gateway->ping_min = ping_min; + gateway->ping_monitoring = ping_monitoring; gateway->ping = switch_epoch_time_now(NULL) + ping_freq; gateway->options_to_uri = switch_core_sprintf(gateway->pool, "", !zstr(from_domain) ? from_domain : proxy); @@ -5542,6 +5547,7 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu tagi_t tags[]) { sofia_gateway_t *gateway = NULL; + switch_bool_t do_fire_gateway_state_event = SWITCH_FALSE; if (sofia_private && !zstr(sofia_private->gateway_name)) { gateway = sofia_reg_find_gateway(sofia_private->gateway_name); @@ -5563,9 +5569,10 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu if (gateway->ping_count >= gateway->ping_min && gateway->status != SOFIA_GATEWAY_UP) { gateway->status = SOFIA_GATEWAY_UP; - sofia_reg_fire_custom_gateway_state_event(gateway, status, phrase); + gateway->uptime = switch_time_now(); + do_fire_gateway_state_event = SWITCH_TRUE; } - + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Ping succeeded %s with code %d - count %d/%d/%d, state %s\n", gateway->name, status, gateway->ping_min, gateway->ping_count, gateway->ping_max, sofia_gateway_status_name(gateway->status)); @@ -5582,13 +5589,16 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu if (gateway->ping_count < gateway->ping_min && gateway->status != SOFIA_GATEWAY_DOWN) { gateway->status = SOFIA_GATEWAY_DOWN; - sofia_reg_fire_custom_gateway_state_event(gateway, status, phrase); + do_fire_gateway_state_event = SWITCH_TRUE; } switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Ping failed %s with code %d - count %d/%d/%d, state %s\n", gateway->name, status, gateway->ping_min, gateway->ping_count, gateway->ping_max, sofia_gateway_status_name(gateway->status)); } + if (gateway->ping_monitoring || do_fire_gateway_state_event) { + sofia_reg_fire_custom_gateway_state_event(gateway, status, phrase); + } gateway->ping = switch_epoch_time_now(NULL) + gateway->ping_freq; sofia_reg_release_gateway(gateway); diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 0d318b4282..a7e4e6f78f 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -2105,17 +2105,44 @@ static int sofia_dialog_probe_callback(void *pArg, int argc, char **argv, char * return 0; } +#define SOFIA_PRESENCE_COLLISION_DELTA 50 +#define SOFIA_PRESENCE_ROLLOVER_YEAR (86400 * 365 * SOFIA_PRESENCE_COLLISION_DELTA) +static uint32_t check_presence_epoch(void) +{ + struct tm tm = {0}; + time_t now = switch_epoch_time_now(NULL); + uint32_t callsequence = (now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA; + + if (!mod_sofia_globals.presence_year || callsequence >= SOFIA_PRESENCE_ROLLOVER_YEAR) { + switch_mutex_lock(mod_sofia_globals.mutex); + tm = *(localtime(&now)); + + if (tm.tm_year != mod_sofia_globals.presence_year) { + mod_sofia_globals.presence_epoch = (uint32_t)now - (tm.tm_yday * 86400) - (tm.tm_hour * 60 * 60) - (tm.tm_min * 60) - tm.tm_sec; + mod_sofia_globals.presence_year = tm.tm_year; + callsequence = ((uint32_t)now - mod_sofia_globals.presence_epoch) * SOFIA_PRESENCE_COLLISION_DELTA; + } + + switch_mutex_unlock(mod_sofia_globals.mutex); + } + + return callsequence; +} + uint32_t sofia_presence_get_cseq(sofia_profile_t *profile) { uint32_t callsequence; - uint32_t now = (uint32_t) switch_epoch_time_now(NULL); + int diff = 0; switch_mutex_lock(profile->ireg_mutex); - callsequence = (now - mod_sofia_globals.presence_epoch) * 100; + callsequence = check_presence_epoch(); - if (profile->last_cseq && callsequence <= profile->last_cseq) { - callsequence = ++profile->last_cseq; + if (profile->last_cseq) { + diff = callsequence - profile->last_cseq; + if (diff <= 0 && diff > -100000) { + callsequence = ++profile->last_cseq; + } } profile->last_cseq = callsequence; diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 206b77283b..053ddd9a9e 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -372,8 +372,9 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now) switch (ostate) { case REG_STATE_NOREG: - if (!gateway_ptr->ping && !gateway_ptr->pinging) { + if (!gateway_ptr->ping && !gateway_ptr->pinging && gateway_ptr->status != SOFIA_GATEWAY_UP) { gateway_ptr->status = SOFIA_GATEWAY_UP; + gateway_ptr->uptime = switch_time_now(); } break; case REG_STATE_REGISTER: @@ -396,7 +397,10 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now) gateway_ptr->expires = now + delta; gateway_ptr->state = REG_STATE_REGED; - gateway_ptr->status = SOFIA_GATEWAY_UP; + if (gateway_ptr->status != SOFIA_GATEWAY_UP) { + gateway_ptr->status = SOFIA_GATEWAY_UP; + gateway_ptr->uptime = switch_time_now(); + } break; case REG_STATE_UNREGISTER: diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index 2782380ba7..f15f291ad9 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -24,6 +24,7 @@ * Contributor(s): * * Anthony Minessale II + * Seven Du * * mod_verto.c -- HTML5 Verto interface * @@ -1279,6 +1280,391 @@ static void jsock_check_event_queue(jsock_t *jsock) switch_mutex_unlock(jsock->write_mutex); } +/* DO NOT use this unless you know what you are doing, you are WARNNED!!! */ +static uint8_t *http_stream_read(switch_stream_handle_t *handle, int *len) +{ + switch_http_request_t *r = (switch_http_request_t *) handle->data; + jsock_t *jsock = r->user_data; + wsh_t *wsh = &jsock->ws; + + if (!jsock->profile->running) { + *len = 0; + return NULL; + } + + *len = r->bytes_buffered - r->bytes_read; + + if (*len > 0) { // we already read part of the body + uint8_t *data = (uint8_t *)wsh->buffer + r->bytes_read; + r->bytes_read = r->bytes_buffered; + return data; + } + + if (r->content_length && (r->bytes_read - r->bytes_header) >= r->content_length) { + *len = 0; + return NULL; + } + + *len = r->content_length - (r->bytes_read - r->bytes_header); + *len = *len > sizeof(wsh->buffer) ? sizeof(wsh->buffer) : *len; + + if ((*len = ws_raw_read(wsh, wsh->buffer, *len, wsh->block)) < 0) { + *len = 0; + return NULL; + } + + r->bytes_read += *len; + + return (uint8_t *)wsh->buffer; +} + +static switch_status_t http_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen) +{ + switch_http_request_t *r = (switch_http_request_t *) handle->data; + jsock_t *jsock = r->user_data; + + return ws_raw_write(&jsock->ws, data, (uint32_t)datalen) ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE; +} + +static switch_status_t http_stream_write(switch_stream_handle_t *handle, const char *fmt, ...) +{ + switch_http_request_t *r = (switch_http_request_t *) handle->data; + jsock_t *jsock = r->user_data; + int ret = 1; + char *data; + va_list ap; + + va_start(ap, fmt); + ret = switch_vasprintf(&data, fmt, ap); + va_end(ap); + + if (data) { + if (ret) { + ret = ws_raw_write(&jsock->ws, data, (uint32_t)strlen(data)); + } + switch_safe_free(data); + } + + return ret ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE; +} + +static void http_static_handler(switch_http_request_t *request, verto_vhost_t *vhost) +{ + jsock_t *jsock = request->user_data; + char path[512]; + switch_file_t *fd; + char *ext; + uint8_t chunk[4096]; + const char *mime_type = "text/html", *new_type; + + if (strncmp(request->method, "GET", 3) && strncmp(request->method, "HEAD", 4)) { + char *data = "HTTP/1.1 415 Method Not Allowed\r\n" + "Content-Length: 0\r\n\r\n"; + ws_raw_write(&jsock->ws, data, strlen(data)); + return; + } + + switch_snprintf(path, sizeof(path), "%s%s", vhost->root, request->uri); + + if (switch_directory_exists(path, NULL) == SWITCH_STATUS_SUCCESS) { + switch_snprintf(path, sizeof(path), "%s%s%s%s", + vhost->root, request->uri, end_of(path) == '/' ? "" : SWITCH_PATH_SEPARATOR, vhost->index); + // printf("local path: %s\n", path); + } + + if ((ext = strrchr(path, '.'))) { + ext++; + if ((new_type = switch_core_mime_ext2type(ext))) { + mime_type = new_type; + } + } + + if (switch_file_exists(path, NULL) == SWITCH_STATUS_SUCCESS && + switch_file_open(&fd, path, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD, jsock->pool) == SWITCH_STATUS_SUCCESS) { + + switch_size_t flen = switch_file_get_size(fd); + + switch_snprintf((char *)chunk, sizeof(chunk), + "HTTP/1.1 200 OK\r\n" + "Date: %s\r\n" + "Server: FreeSWITCH-%s-mod_verto\r\n" + "Content-Type: %s\r\n" + "Content-Length: %" SWITCH_SIZE_T_FMT "\r\n\r\n", + switch_event_get_header(request->headers, "Event-Date-GMT"), + switch_version_full(), + mime_type, + flen); + + ws_raw_write(&jsock->ws, chunk, strlen((char *)chunk)); + + for (;;) { + switch_status_t status; + + flen = sizeof(chunk); + status = switch_file_read(fd, chunk, &flen); + + if (status != SWITCH_STATUS_SUCCESS || flen == 0) { + break; + } + + ws_raw_write(&jsock->ws, chunk, flen); + } + switch_file_close(fd); + } else { + char *data = "HTTP/1.1 404 Not Found\r\n" + "Content-Length: 0\r\n\r\n"; + ws_raw_write(&jsock->ws, data, strlen(data)); + } +} + +static void http_run(jsock_t *jsock) +{ + switch_http_request_t request = { 0 }; + switch_stream_handle_t stream = { 0 }; + char *data = NULL; + char *ext; + verto_vhost_t *vhost; + switch_bool_t keepalive; + +new_req: + + request.user_data = jsock; + + if (switch_event_create(&stream.param_event, SWITCH_EVENT_CHANNEL_DATA) != SWITCH_STATUS_SUCCESS) { + goto err; + } + + request.headers = stream.param_event; + if (switch_http_parse_header(jsock->ws.buffer, jsock->ws.datalen, &request) != SWITCH_STATUS_SUCCESS) { + switch_event_destroy(&stream.param_event); + goto err; + } + + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s [%4" SWITCH_SIZE_T_FMT "] %s\n", jsock->name, jsock->ws.datalen, request.uri); + + if (!strncmp(request.method, "OPTIONS", 7)) { + char data[512]; + switch_snprintf(data, sizeof(data), + "HTTP/1.1 200 OK\r\n" + "Content-Length: 0\r\n" + "Date: %s\r\n" + "Allow: HEAD,GET,POST,PUT,DELETE,PATCH,OPTIONS\r\n" + "Server: FreeSWITCH-%s-mod_verto\r\n\r\n", + switch_event_get_header(request.headers, "Event-Date-GMT"), + switch_version_full()); + + ws_raw_write(&jsock->ws, data, strlen(data)); + goto done; + } + + if (!strncmp(request.method, "POST", 4) && request.content_length && + !strncmp(request.content_type, "application/x-www-form-urlencoded", 33)) { + + char *buffer = NULL; + int len = 0, bytes = 0; + + if (request.content_length > 2 * 1024 * 1024 - 1) { + char *data = "HTTP/1.1 413 Request Entity Too Large\r\n" + "Content-Length: 0\r\n\r\n"; + ws_raw_write(&jsock->ws, data, strlen(data)); + goto done; + } + + if (!(buffer = malloc(2 * 1024 * 1024))) { + goto request_err; + } + + if ((bytes = request.bytes_buffered - (request.bytes_read - request.bytes_header)) > 0) { + memcpy(buffer, jsock->ws.buffer + request.bytes_read, bytes); + } + + while(bytes < request.content_length) { + len = request.content_length - bytes; + + if ((len = ws_raw_read(&jsock->ws, buffer + bytes, len, jsock->ws.block)) < 0) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Read error %d\n", len); + goto done; + } + + bytes += len; + } + + *(buffer + bytes) = '\0'; + + switch_http_parse_qs(&request, buffer); + free(buffer); + } + + // switch_http_dump_request(&request); + + stream.data = &request; + stream.read_function = http_stream_read; + stream.write_function = http_stream_write; + stream.raw_write_function = http_stream_raw_write; + + switch_event_add_header_string(request.headers, SWITCH_STACK_BOTTOM, "Request-Method", request.method); + switch_event_add_header_string(request.headers, SWITCH_STACK_BOTTOM, "HTTP-Request-URI", request.uri); + + if (!jsock->profile->vhosts) goto err; + + /* only one vhost supported for now */ + vhost = jsock->profile->vhosts; + + if (!switch_test_flag(jsock, JPFLAG_AUTHED) && vhost->auth_realm) { + int code = CODE_AUTH_REQUIRED; + char message[128] = "Authentication Required"; + cJSON *params = NULL; + char *www_auth; + char auth_buffer[512]; + char *auth_user = NULL, *auth_pass = NULL; + + www_auth = switch_event_get_header(request.headers, "Authorization"); + + if (zstr(www_auth)) { + switch_snprintf(auth_buffer, sizeof(auth_buffer), + "HTTP/1.1 401 Authentication Required\r\n" + "WWW-Authenticate: Basic realm=\"%s\"\r\n" + "Content-Length: 0\r\n\r\n", + vhost->auth_realm); + ws_raw_write(&jsock->ws, auth_buffer, strlen(auth_buffer)); + goto done; + } + + if (strncasecmp(www_auth, "Basic ", 6)) goto err; + + www_auth += 6; + + switch_b64_decode(www_auth, auth_buffer, sizeof(auth_buffer)); + + auth_user = auth_buffer; + + if ((auth_pass = strchr(auth_user, ':'))) { + *auth_pass++ = '\0'; + } + + if (vhost->auth_user && vhost->auth_pass && + !strcmp(vhost->auth_user, auth_user) && + !strcmp(vhost->auth_pass, auth_pass)) { + goto authed; + } + + if (!(params = cJSON_CreateObject())) { + goto request_err; + } + + cJSON_AddItemToObject(params, "login", cJSON_CreateString(auth_user)); + cJSON_AddItemToObject(params, "passwd", cJSON_CreateString(auth_pass)); + + if (!check_auth(jsock, params, &code, message, sizeof(message))) { + switch_snprintf(auth_buffer, sizeof(auth_buffer), + "HTTP/1.1 401 Authentication Required\r\n" + "WWW-Authenticate: Basic realm=\"%s\"\r\n" + "Content-Length: 0\r\n\r\n", + vhost->auth_realm); + ws_raw_write(&jsock->ws, auth_buffer, strlen(auth_buffer)); + cJSON_Delete(params); + goto done; + } else { + cJSON_Delete(params); + } + +authed: + switch_set_flag(jsock, JPFLAG_AUTHED); + switch_event_add_header_string(request.headers, SWITCH_STACK_BOTTOM, "HTTP-USER", auth_user); + } + + if (vhost->rewrites) { + switch_event_header_t *rule = vhost->rewrites->headers; + switch_regex_t *re = NULL; + int ovector[30]; + int proceed; + + while(rule) { + char *expression = rule->name; + + if ((proceed = switch_regex_perform(request.uri, expression, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, + "%d request [%s] matched expr [%s]\n", proceed, request.uri, expression); + request.uri = rule->value; + break; + } + + rule = rule->next; + } + } + + switch_event_add_header_string(request.headers, SWITCH_STACK_BOTTOM, "HTTP-URI", request.uri); + + if ((ext = strrchr(request.uri, '.'))) { + char path[1024]; + + if (!strncmp(ext, ".lua", 4)) { + switch_snprintf(path, sizeof(path), "%s%s", vhost->script_root, request.uri); + switch_api_execute("lua", path, NULL, &stream); + } else { + http_static_handler(&request, vhost); + } + + } else { + http_static_handler(&request, vhost); + } + +done: + + keepalive = request.keepalive; + switch_http_free_request(&request); + + if (keepalive) { + wsh_t *wsh = &jsock->ws; + + memset(&request, 0, sizeof(request)); + wsh->datalen = 0; + *wsh->buffer = '\0'; + + while(jsock->profile->running) { + int pflags = switch_wait_sock(jsock->client_socket, 3000, SWITCH_POLL_READ | SWITCH_POLL_ERROR | SWITCH_POLL_HUP); + + if (jsock->drop) { die("%s Dropping Connection\n", jsock->name); } + if (pflags < 0 && (errno != EINTR)) { die("%s POLL FAILED\n", jsock->name); } + if (pflags & SWITCH_POLL_ERROR) { die("%s POLL ERROR\n", jsock->name); } + if (pflags & SWITCH_POLL_HUP) { die("%s POLL HANGUP DETECTED\n", jsock->name); } + if (pflags & SWITCH_POLL_INVALID) { die("%s POLL INVALID SOCKET\n", jsock->name); } + if (pflags & SWITCH_POLL_READ) { + ssize_t bytes; + + bytes = ws_raw_read(wsh, wsh->buffer + wsh->datalen, wsh->buflen - wsh->datalen, wsh->block); + + if (bytes < 0) { + die("BAD READ %" SWITCH_SIZE_T_FMT "\n", bytes); + break; + } + + wsh->datalen += bytes; + + if (strstr(wsh->buffer, "\r\n\r\n") || strstr(wsh->buffer, "\n\n")) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "socket %s is going to handle a new request\n", jsock->name); + goto new_req; + } + } else { + break; + } + } + } + + return; + +request_err: + switch_http_free_request(&request); + +err: + data = "HTTP/1.1 500 Internal Server Error\r\n" + "Content-Length: 0\r\n\r\n"; + ws_raw_write(&jsock->ws, data, strlen(data)); + +error: + return; +} + static void client_run(jsock_t *jsock) { @@ -1287,8 +1673,14 @@ static void client_run(jsock_t *jsock) jsock->local_addr.sin_port = 0; - if (ws_init(&jsock->ws, jsock->client_socket, (jsock->ptype & PTYPE_CLIENT_SSL) ? jsock->profile->ssl_ctx : NULL, 0, 1) < 0) { - die("%s WS SETUP FAILED", jsock->name); + if (ws_init(&jsock->ws, jsock->client_socket, (jsock->ptype & PTYPE_CLIENT_SSL) ? jsock->profile->ssl_ctx : NULL, 0, 1, !!jsock->profile->vhosts) < 0) { + if (jsock->profile->vhosts) { + http_run(jsock); + ws_close(&jsock->ws, WS_NONE); + goto error; + } else { + die("%s WS SETUP FAILED [%s]", jsock->name, jsock->ws.buffer); + } } while(jsock->profile->running) { @@ -3436,6 +3828,7 @@ static int runtime(verto_profile_t *profile) static void kill_profile(verto_profile_t *profile) { jsock_t *p; + verto_vhost_t *h; int i; profile->running = 0; @@ -3452,6 +3845,16 @@ static void kill_profile(verto_profile_t *profile) for(p = profile->jsock_head; p; p = p->next) { close_socket(&p->client_socket); } + + h = profile->vhosts; + while(h) { + if (h->rewrites) { + switch_event_destroy(&h->rewrites); + } + + h = h->next; + } + switch_mutex_unlock(profile->mutex); @@ -3601,6 +4004,7 @@ static switch_status_t parse_config(const char *cf) { switch_xml_t cfg, xml, settings, param, xprofile, xprofiles; + switch_xml_t xvhosts, xvhost, rewrites, rule; switch_status_t status = SWITCH_STATUS_SUCCESS; if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) { @@ -3749,8 +4153,89 @@ static switch_status_t parse_config(const char *cf) profile->name, profile->ip[i].local_ip, profile->ip[i].local_port); } } - } - } + + /* parse vhosts */ + /* WARNNING: Experimental feature, DO NOT use until we remove this warnning!! */ + if ((xvhosts = switch_xml_child(xprofile, "vhosts"))) { + verto_vhost_t *vhost_tail = NULL; + + for (xvhost = switch_xml_child(xvhosts, "vhost"); xvhost; xvhost = xvhost->next) { + verto_vhost_t *vhost; + const char *domain = switch_xml_attr(xvhost, "domain"); + + if (zstr(domain)) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Required field domain missing\n"); + continue; + } + + vhost = switch_core_alloc(profile->pool, sizeof(*vhost)); + memset(vhost, 0, sizeof(*vhost)); + vhost->pool = profile->pool; + vhost->domain = switch_core_strdup(profile->pool, domain); + + if (!vhost_tail) { + profile->vhosts = vhost; + } else { + vhost_tail->next = vhost; + } + + vhost_tail = vhost; + + for (param = switch_xml_child(xvhost, "param"); param; param = param->next) { + char *var = NULL; + char *val = NULL; + + var = (char *) switch_xml_attr_soft(param, "name"); + val = (char *) switch_xml_attr_soft(param, "value"); + + if (!strcasecmp(var, "alias")) { + vhost->alias = switch_core_strdup(vhost->pool, val); + } else if (!strcasecmp(var, "root")) { + vhost->root = switch_core_strdup(vhost->pool, val); + } else if (!strcasecmp(var, "script_root")) { + vhost->script_root = switch_core_strdup(vhost->pool, val); + } else if (!strcasecmp(var, "index")) { + vhost->index = switch_core_strdup(vhost->pool, val); + } else if (!strcasecmp(var, "auth-realm")) { + vhost->auth_realm = switch_core_strdup(vhost->pool, val); + } else if (!strcasecmp(var, "auth-user")) { + vhost->auth_user = switch_core_strdup(vhost->pool, val); + } else if (!strcasecmp(var, "auth-pass")) { + vhost->auth_pass = switch_core_strdup(vhost->pool, val); + } + } + + if (zstr(vhost->root)) { + vhost->root = SWITCH_GLOBAL_dirs.htdocs_dir; + } + + if (zstr(vhost->script_root)) { + vhost->root = SWITCH_GLOBAL_dirs.script_dir; + } + + if (zstr(vhost->index)) { + vhost->index = "index.html"; + } + + if ((rewrites = switch_xml_child(xvhost, "rewrites"))) { + if (switch_event_create(&vhost->rewrites, SWITCH_EVENT_CLONE) == SWITCH_STATUS_SUCCESS) { + for (rule = switch_xml_child(rewrites, "rule"); rule; rule = rule->next) { + char *expr = NULL; + char *val = NULL; + + expr = (char *) switch_xml_attr_soft(rule, "expression"); + val = (char *) switch_xml_attr_soft(rule, "value"); + + if (zstr(expr)) continue; + + switch_event_add_header_string(vhost->rewrites, SWITCH_STACK_BOTTOM, expr, val); + } + } + } // rewrites + } // xvhost + } // xvhosts + } // xprofile + } // xprofiles if ((settings = switch_xml_child(cfg, "settings"))) { for (param = switch_xml_child(settings, "param"); param; param = param->next) { @@ -3826,6 +4311,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t { verto_profile_t *profile = NULL; jsock_t *jsock; + verto_vhost_t *vhost; int cp = 0; int cc = 0; const char *line = "================================================================================================="; @@ -3838,14 +4324,22 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t for (int i = 0; i < profile->i; i++) { char *tmpurl = switch_mprintf("%s:%s:%d",(profile->ip[i].secure == 1) ? "wss" : "ws", profile->ip[i].local_ip, profile->ip[i].local_port); stream->write_function(stream, "%25s\t%s\t %40s\t%s\n", profile->name, "profile", tmpurl, (profile->running) ? "RUNNING" : "DOWN"); + switch_safe_free(tmpurl); } cp++; switch_mutex_lock(profile->mutex); - for(jsock = profile->jsock_head; jsock; jsock = jsock->next) { + for (vhost = profile->vhosts; vhost; vhost = vhost->next) { + char *tmpname = switch_mprintf("%s::%s", profile->name, vhost->domain); + stream->write_function(stream, "%25s\t%s\t %40s\t%s (%s)\n", tmpname, "vhost", vhost->root, vhost->auth_user ? "AUTH" : "NOAUTH", vhost->auth_user ? vhost->auth_user : ""); + switch_safe_free(tmpname); + } + + for (jsock = profile->jsock_head; jsock; jsock = jsock->next) { char *tmpname = switch_mprintf("%s::%s@%s", profile->name, jsock->id, jsock->domain); stream->write_function(stream, "%25s\t%s\t %40s\t%s (%s)\n", tmpname, "client", jsock->name, (!zstr(jsock->uid)) ? "CONN_REG" : "CONN_NO_REG", (jsock->ptype & PTYPE_CLIENT_SSL) ? "WSS": "WS"); cc++; + switch_safe_free(tmpname); } switch_mutex_unlock(profile->mutex); } @@ -3872,6 +4366,7 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl for (int i = 0; i < profile->i; i++) { char *tmpurl = switch_mprintf("%s:%s:%d",(profile->ip[i].secure == 1) ? "wss" : "ws", profile->ip[i].local_ip, profile->ip[i].local_port); stream->write_function(stream, "\n%s\n%s\n%s\n%s\n\n", profile->name, "profile", tmpurl, (profile->running) ? "RUNNING" : "DOWN"); + switch_safe_free(tmpurl); } cp++; @@ -3881,6 +4376,7 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl stream->write_function(stream, "\n%s\n%s\n%s\n%s\n%s (%s)\n\n", profile->name, tmpname, "client", jsock->name, (!zstr(jsock->uid)) ? "CONN_REG" : "CONN_NO_REG", (jsock->ptype & PTYPE_CLIENT_SSL) ? "WSS": "WS"); cc++; + switch_safe_free(tmpname); } switch_mutex_unlock(profile->mutex); } diff --git a/src/mod/endpoints/mod_verto/mod_verto.h b/src/mod/endpoints/mod_verto/mod_verto.h index d372e905d1..bafc0184c8 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.h +++ b/src/mod/endpoints/mod_verto/mod_verto.h @@ -24,6 +24,7 @@ * Contributor(s): * * Anthony Minessale II + * Seven Du * * mod_html.h -- HTML 5 interface * @@ -166,6 +167,20 @@ typedef struct verto_pvt_s { struct verto_pvt_s *next; } verto_pvt_t; +typedef struct verto_vhost_s { + char *domain; + char *alias; + char *root; + char *script_root; + char *index; + char *auth_realm; + char *auth_user; + char *auth_pass; + switch_event_t *rewrites; + switch_memory_pool_t *pool; + struct verto_vhost_s *next; +} verto_vhost_t; + struct verto_profile_s { char *name; switch_mutex_t *mutex; @@ -220,7 +235,7 @@ struct verto_profile_s { char *timer_name; char *local_network; - + verto_vhost_t *vhosts; struct verto_profile_s *next; }; diff --git a/src/mod/endpoints/mod_verto/ws.c b/src/mod/endpoints/mod_verto/ws.c index 2153855b08..6e91ff6493 100644 --- a/src/mod/endpoints/mod_verto/ws.c +++ b/src/mod/endpoints/mod_verto/ws.c @@ -264,7 +264,7 @@ int ws_handshake(wsh_t *wsh) goto err; } - *(wsh->buffer+bytes) = '\0'; + *(wsh->buffer + wsh->datalen) = '\0'; if (strncasecmp(wsh->buffer, "GET ", 4)) { goto err; @@ -312,15 +312,15 @@ int ws_handshake(wsh_t *wsh) err: - snprintf(respond, sizeof(respond), "HTTP/1.1 400 Bad Request\r\n" - "Sec-WebSocket-Version: 13\r\n\r\n"); + if (!wsh->stay_open) { - //printf("ERR:\n%s\n", respond); + snprintf(respond, sizeof(respond), "HTTP/1.1 400 Bad Request\r\n" + "Sec-WebSocket-Version: 13\r\n\r\n"); + ws_raw_write(wsh, respond, strlen(respond)); - ws_raw_write(wsh, respond, strlen(respond)); - - ws_close(wsh, WS_NONE); + ws_close(wsh, WS_NONE); + } return -1; @@ -538,7 +538,7 @@ static int establish_logical_layer(wsh_t *wsh) } -int ws_init(wsh_t *wsh, ws_socket_t sock, SSL_CTX *ssl_ctx, int close_sock, int block) +int ws_init(wsh_t *wsh, ws_socket_t sock, SSL_CTX *ssl_ctx, int close_sock, int block, int stay_open) { memset(wsh, 0, sizeof(*wsh)); @@ -546,6 +546,7 @@ int ws_init(wsh_t *wsh, ws_socket_t sock, SSL_CTX *ssl_ctx, int close_sock, int wsh->block = block; wsh->sanity = 5000; wsh->ssl_ctx = ssl_ctx; + wsh->stay_open = stay_open; if (!ssl_ctx) { ssl_ctx = ws_globals.ssl_ctx; diff --git a/src/mod/endpoints/mod_verto/ws.h b/src/mod/endpoints/mod_verto/ws.h index b4d30b47f2..37a3b9e401 100644 --- a/src/mod/endpoints/mod_verto/ws.h +++ b/src/mod/endpoints/mod_verto/ws.h @@ -88,6 +88,7 @@ typedef struct wsh_s { int sanity; int secure_established; int logical_established; + int stay_open; int x; void *write_buffer; size_t write_buffer_len; @@ -101,7 +102,7 @@ ssize_t ws_raw_read(wsh_t *wsh, void *data, size_t bytes, int block); ssize_t ws_raw_write(wsh_t *wsh, void *data, size_t bytes); ssize_t ws_read_frame(wsh_t *wsh, ws_opcode_t *oc, uint8_t **data); ssize_t ws_write_frame(wsh_t *wsh, ws_opcode_t oc, void *data, size_t bytes); -int ws_init(wsh_t *wsh, ws_socket_t sock, SSL_CTX *ssl_ctx, int close_sock, int block); +int ws_init(wsh_t *wsh, ws_socket_t sock, SSL_CTX *ssl_ctx, int close_sock, int block, int stay_open); ssize_t ws_close(wsh_t *wsh, int16_t reason); void ws_destroy(wsh_t *wsh); void init_ssl(void); diff --git a/src/mod/formats/mod_native_file/mod_native_file.c b/src/mod/formats/mod_native_file/mod_native_file.c index b875e82c22..d2db2b1b52 100644 --- a/src/mod/formats/mod_native_file/mod_native_file.c +++ b/src/mod/formats/mod_native_file/mod_native_file.c @@ -83,6 +83,13 @@ static switch_status_t native_file_file_open(switch_file_handle_t *handle, const handle->samples = 0; handle->samplerate = 8000; + + if (ext) { + if (!strcasecmp(ext, "G722")) { + handle->samplerate = 16000; + } + } + handle->channels = 1; handle->format = 0; handle->sections = 0; diff --git a/src/mod/languages/mod_java/.gitattributes b/src/mod/languages/mod_java/.gitattributes index e6b8d09c08..65f4715533 100644 --- a/src/mod/languages/mod_java/.gitattributes +++ b/src/mod/languages/mod_java/.gitattributes @@ -1 +1,2 @@ switch_swig_wrap.cpp -diff +src/org/freeswitch/swig/* -diff diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_int.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_int.java new file mode 100644 index 0000000000..bb712a806b --- /dev/null +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/SWIGTYPE_p_int.java @@ -0,0 +1,26 @@ +/* ---------------------------------------------------------------------------- + * 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. + * ----------------------------------------------------------------------------- */ + +package org.freeswitch.swig; + +public class SWIGTYPE_p_int { + private long swigCPtr; + + protected SWIGTYPE_p_int(long cPtr, boolean futureUse) { + swigCPtr = cPtr; + } + + protected SWIGTYPE_p_int() { + swigCPtr = 0; + } + + protected static long getCPtr(SWIGTYPE_p_int obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +} + diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/Stream.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/Stream.java index 63f8da2647..30350b001e 100644 --- a/src/mod/languages/mod_java/src/org/freeswitch/swig/Stream.java +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/Stream.java @@ -41,10 +41,18 @@ public class Stream { this(freeswitchJNI.new_Stream__SWIG_1(SWIGTYPE_p_switch_stream_handle_t.getCPtr(arg0)), true); } + public String read(SWIGTYPE_p_int len) { + return freeswitchJNI.Stream_read(swigCPtr, this, SWIGTYPE_p_int.getCPtr(len)); + } + public void write(String data) { freeswitchJNI.Stream_write(swigCPtr, this, data); } + public void raw_write(String data, int len) { + freeswitchJNI.Stream_raw_write(swigCPtr, this, data, len); + } + public String get_data() { return freeswitchJNI.Stream_get_data(swigCPtr, this); } diff --git a/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java b/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java index 8204194fae..359bd8b5bc 100644 --- a/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java +++ b/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java @@ -47,7 +47,9 @@ class freeswitchJNI { public final static native long new_Stream__SWIG_0(); public final static native long new_Stream__SWIG_1(long jarg1); public final static native void delete_Stream(long jarg1); + public final static native String Stream_read(long jarg1, Stream jarg1_, long jarg2); public final static native void Stream_write(long jarg1, Stream jarg1_, String jarg2); + public final static native void Stream_raw_write(long jarg1, Stream jarg1_, String jarg2, int jarg3); public final static native String Stream_get_data(long jarg1, Stream jarg1_); public final static native void Event_event_set(long jarg1, Event jarg1_, long jarg2); public final static native long Event_event_get(long jarg1, Event jarg1_); diff --git a/src/mod/languages/mod_java/switch_swig_wrap.cpp b/src/mod/languages/mod_java/switch_swig_wrap.cpp index 0c177274b0..a24b28ceaa 100644 --- a/src/mod/languages/mod_java/switch_swig_wrap.cpp +++ b/src/mod/languages/mod_java/switch_swig_wrap.cpp @@ -972,6 +972,23 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1Stream(JN } +SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Stream_1read(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) { + jstring jresult = 0 ; + Stream *arg1 = (Stream *) 0 ; + int *arg2 = (int *) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(Stream **)&jarg1; + arg2 = *(int **)&jarg2; + result = (char *)(arg1)->read(arg2); + if(result) jresult = jenv->NewStringUTF((const char *)result); + return jresult; +} + + SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_Stream_1write(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) { Stream *arg1 = (Stream *) 0 ; char *arg2 = (char *) 0 ; @@ -990,6 +1007,26 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_Stream_1write(JNI } +SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_Stream_1raw_1write(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) { + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(Stream **)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); + if (!arg2) return ; + } + arg3 = (int)jarg3; + (arg1)->raw_write((char const *)arg2,arg3); + if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); +} + + SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Stream_1get_1data(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jstring jresult = 0 ; Stream *arg1 = (Stream *) 0 ; diff --git a/src/mod/languages/mod_lua/freeswitch.i b/src/mod/languages/mod_lua/freeswitch.i index d94ce07fb2..a5c9d75a14 100644 --- a/src/mod/languages/mod_lua/freeswitch.i +++ b/src/mod/languages/mod_lua/freeswitch.i @@ -43,6 +43,9 @@ %newobject API::execute; %newobject API::executeString; +%include "typemaps.i" +%apply int *OUTPUT { int *len }; + /** * tell swig to grok everything defined in these header files and * build all sorts of c wrappers and lua shadows of the c wrappers. diff --git a/src/mod/languages/mod_lua/hack.diff b/src/mod/languages/mod_lua/hack.diff index 4004459b50..f0ea14dce4 100644 --- a/src/mod/languages/mod_lua/hack.diff +++ b/src/mod/languages/mod_lua/hack.diff @@ -1,6 +1,15 @@ ---- mod_lua_wrap.cpp.orig 2013-11-13 07:48:40.587304736 +0500 -+++ mod_lua_wrap.cpp 2013-11-13 07:43:09.059309154 +0500 -@@ -6427,7 +6427,7 @@ +--- mod_lua_wrap.cpp.orig 2014-09-06 19:25:05.000000000 +0800 ++++ mod_lua_wrap.cpp 2014-09-06 19:27:17.000000000 +0800 +@@ -2799,7 +2799,7 @@ + + result = (char *)(arg1)->read(arg2); + SWIG_arg=0; +- lua_pushstring(L,(const char*)result); SWIG_arg++; ++ lua_pushlstring(L,(const char*)result, (*arg2)); SWIG_arg++; + lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++; + return SWIG_arg; + +@@ -6750,7 +6750,7 @@ SWIG_check_num_args("LUA::Session",0,0) result = (LUA::Session *)new LUA::Session(); SWIG_arg=0; @@ -9,7 +18,7 @@ return SWIG_arg; if(0) SWIG_fail; -@@ -6455,7 +6455,7 @@ +@@ -6778,7 +6778,7 @@ result = (LUA::Session *)new LUA::Session(arg1,arg2); SWIG_arg=0; @@ -18,7 +27,7 @@ return SWIG_arg; if(0) SWIG_fail; -@@ -6476,7 +6476,7 @@ +@@ -6799,7 +6799,7 @@ arg1 = (char *)lua_tostring(L, 1); result = (LUA::Session *)new LUA::Session(arg1); SWIG_arg=0; @@ -27,7 +36,7 @@ return SWIG_arg; if(0) SWIG_fail; -@@ -6501,7 +6501,7 @@ +@@ -6824,7 +6824,7 @@ result = (LUA::Session *)new LUA::Session(arg1); SWIG_arg=0; @@ -36,7 +45,7 @@ return SWIG_arg; if(0) SWIG_fail; -@@ -7913,7 +7913,7 @@ +@@ -8236,7 +8236,7 @@ } #endif @@ -45,7 +54,7 @@ { "setGlobalVariable", _wrap_setGlobalVariable}, { "getGlobalVariable", _wrap_getGlobalVariable}, { "consoleLog", _wrap_consoleLog}, -@@ -8325,7 +8325,7 @@ +@@ -8654,7 +8654,7 @@ { int i; /* start with global table */ diff --git a/src/mod/languages/mod_lua/mod_lua_wrap.cpp b/src/mod/languages/mod_lua/mod_lua_wrap.cpp index bf06a26019..256f86b98b 100644 --- a/src/mod/languages/mod_lua/mod_lua_wrap.cpp +++ b/src/mod/languages/mod_lua/mod_lua_wrap.cpp @@ -1495,26 +1495,27 @@ SWIG_Lua_dostring(lua_State *L, const char* str) { #define SWIGTYPE_p_SWIGLUA_FN swig_types[8] #define SWIGTYPE_p_Stream swig_types[9] #define SWIGTYPE_p_input_callback_state swig_types[10] -#define SWIGTYPE_p_lua_State swig_types[11] -#define SWIGTYPE_p_p_switch_event_node_t swig_types[12] -#define SWIGTYPE_p_session_flag_t swig_types[13] -#define SWIGTYPE_p_switch_call_cause_t swig_types[14] -#define SWIGTYPE_p_switch_channel_state_t swig_types[15] -#define SWIGTYPE_p_switch_channel_t swig_types[16] -#define SWIGTYPE_p_switch_core_session_t swig_types[17] -#define SWIGTYPE_p_switch_event_t swig_types[18] -#define SWIGTYPE_p_switch_event_types_t swig_types[19] -#define SWIGTYPE_p_switch_input_args_t swig_types[20] -#define SWIGTYPE_p_switch_input_type_t swig_types[21] -#define SWIGTYPE_p_switch_priority_t swig_types[22] -#define SWIGTYPE_p_switch_queue_t swig_types[23] -#define SWIGTYPE_p_switch_state_handler_table_t swig_types[24] -#define SWIGTYPE_p_switch_status_t swig_types[25] -#define SWIGTYPE_p_switch_stream_handle_t swig_types[26] -#define SWIGTYPE_p_uint32_t swig_types[27] -#define SWIGTYPE_p_void swig_types[28] -static swig_type_info *swig_types[30]; -static swig_module_info swig_module = {swig_types, 29, 0, 0, 0, 0}; +#define SWIGTYPE_p_int swig_types[11] +#define SWIGTYPE_p_lua_State swig_types[12] +#define SWIGTYPE_p_p_switch_event_node_t swig_types[13] +#define SWIGTYPE_p_session_flag_t swig_types[14] +#define SWIGTYPE_p_switch_call_cause_t swig_types[15] +#define SWIGTYPE_p_switch_channel_state_t swig_types[16] +#define SWIGTYPE_p_switch_channel_t swig_types[17] +#define SWIGTYPE_p_switch_core_session_t swig_types[18] +#define SWIGTYPE_p_switch_event_t swig_types[19] +#define SWIGTYPE_p_switch_event_types_t swig_types[20] +#define SWIGTYPE_p_switch_input_args_t swig_types[21] +#define SWIGTYPE_p_switch_input_type_t swig_types[22] +#define SWIGTYPE_p_switch_priority_t swig_types[23] +#define SWIGTYPE_p_switch_queue_t swig_types[24] +#define SWIGTYPE_p_switch_state_handler_table_t swig_types[25] +#define SWIGTYPE_p_switch_status_t swig_types[26] +#define SWIGTYPE_p_switch_stream_handle_t swig_types[27] +#define SWIGTYPE_p_uint32_t swig_types[28] +#define SWIGTYPE_p_void swig_types[29] +static swig_type_info *swig_types[31]; +static swig_module_info swig_module = {swig_types, 30, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1536,6 +1537,161 @@ typedef struct{} LANGUAGE_OBJ; #include "switch_cpp.h" #include "freeswitch_lua.h" + +#ifdef __cplusplus /* generic alloc/dealloc fns*/ +#define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN] +#define SWIG_FREE_ARRAY(PTR) delete[] PTR; +#else +#define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE)) +#define SWIG_FREE_ARRAY(PTR) free(PTR); +#endif +/* counting the size of arrays:*/ +int SWIG_itable_size(lua_State* L, int index) +{ + int n=0; + while(1){ + lua_rawgeti(L,index,n+1); + if (lua_isnil(L,-1))break; + ++n; + lua_pop(L,1); + } + lua_pop(L,1); + return n; +} + +int SWIG_table_size(lua_State* L, int index) +{ + int n=0; + lua_pushnil(L); /* first key*/ + while (lua_next(L, index) != 0) { + ++n; + lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/ + } + return n; +} + +/* super macro to declare array typemap helper fns */ +#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\ + int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\ + int i;\ + for (i = 0; i < size; i++) {\ + lua_rawgeti(L,index,i+1);\ + if (lua_isnumber(L,-1)){\ + array[i] = (TYPE)lua_tonumber(L,-1);\ + } else {\ + lua_pop(L,1);\ + return 0;\ + }\ + lua_pop(L,1);\ + }\ + return 1;\ + }\ + static TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\ + TYPE *array;\ + if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\ + lua_pushfstring(L,"expected a table of size %d",size);\ + return 0;\ + }\ + array=SWIG_ALLOC_ARRAY(TYPE,size);\ + if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\ + lua_pushstring(L,"table must contain numbers");\ + SWIG_FREE_ARRAY(array);\ + return 0;\ + }\ + return array;\ + }\ + static TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\ + {\ + TYPE *array;\ + if (!lua_istable(L,index)) {\ + lua_pushstring(L,"expected a table");\ + return 0;\ + }\ + *size=SWIG_itable_size(L,index);\ + if (*size<1){\ + lua_pushstring(L,"table appears to be empty");\ + return 0;\ + }\ + array=SWIG_ALLOC_ARRAY(TYPE,*size);\ + if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\ + lua_pushstring(L,"table must contain numbers");\ + SWIG_FREE_ARRAY(array);\ + return 0;\ + }\ + return array;\ + }\ + void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\ + int i;\ + lua_newtable(L);\ + for (i = 0; i < size; i++){\ + lua_pushnumber(L,(lua_Number)array[i]);\ + lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \ + }\ + } + +SWIG_DECLARE_TYPEMAP_ARR_FN(int,int); +SWIG_DECLARE_TYPEMAP_ARR_FN(uint,unsigned int); +SWIG_DECLARE_TYPEMAP_ARR_FN(short,short); +SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short); +SWIG_DECLARE_TYPEMAP_ARR_FN(long,long); +SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long); +SWIG_DECLARE_TYPEMAP_ARR_FN(float,float); +SWIG_DECLARE_TYPEMAP_ARR_FN(double,double); + +int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){ + int i; + for (i = 0; i < size; i++) { + lua_rawgeti(L,index,i+1); + if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){ + lua_pop(L,1); + return 0; + } + lua_pop(L,1); + } + return 1; +} +static void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){ + void **array; + if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) { + lua_pushfstring(L,"expected a table of size %d",size); + return 0; + } + array=SWIG_ALLOC_ARRAY(void*,size); + if (!SWIG_read_ptr_array(L,index,array,size,type)){ + lua_pushfstring(L,"table must contain pointers of type %s",type->name); + SWIG_FREE_ARRAY(array); + return 0; + } + return array; +} +static void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){ + void **array; + if (!lua_istable(L,index)) { + lua_pushstring(L,"expected a table"); + return 0; + } + *size=SWIG_itable_size(L,index); + if (*size<1){ + lua_pushstring(L,"table appears to be empty"); + return 0; + } + array=SWIG_ALLOC_ARRAY(void*,*size); + if (!SWIG_read_ptr_array(L,index,array,*size,type)){ + lua_pushfstring(L,"table must contain pointers of type %s",type->name); + SWIG_FREE_ARRAY(array); + return 0; + } + return array; +} +void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){ + int i; + lua_newtable(L); + for (i = 0; i < size; i++){ + SWIG_NewPointerObj(L,array[i],type,own); + lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ + } +} + #ifdef __cplusplus extern "C" { #endif @@ -2626,6 +2782,35 @@ fail: } +static int _wrap_Stream_read(lua_State* L) { + int SWIG_arg = -1; + Stream *arg1 = (Stream *) 0 ; + int *arg2 = (int *) 0 ; + char *result = 0 ; + int temp2 ; + + arg2 = &temp2; + SWIG_check_num_args("read",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("read",1,"Stream *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Stream,0))){ + SWIG_fail_ptr("Stream_read",1,SWIGTYPE_p_Stream); + } + + result = (char *)(arg1)->read(arg2); + SWIG_arg=0; + lua_pushlstring(L,(const char*)result, (*arg2)); SWIG_arg++; + lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + static int _wrap_Stream_write(lua_State* L) { int SWIG_arg = -1; Stream *arg1 = (Stream *) 0 ; @@ -2653,6 +2838,36 @@ fail: } +static int _wrap_Stream_raw_write(lua_State* L) { + int SWIG_arg = -1; + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + + SWIG_check_num_args("raw_write",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("raw_write",1,"Stream *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("raw_write",2,"char const *"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("raw_write",3,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Stream,0))){ + SWIG_fail_ptr("Stream_raw_write",1,SWIGTYPE_p_Stream); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (int)lua_tonumber(L, 3); + (arg1)->raw_write((char const *)arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + static int _wrap_Stream_get_data(lua_State* L) { int SWIG_arg = -1; Stream *arg1 = (Stream *) 0 ; @@ -2683,7 +2898,9 @@ Stream *arg1 = (Stream *) obj; delete arg1; } static swig_lua_method swig_Stream_methods[] = { + {"read", _wrap_Stream_read}, {"write", _wrap_Stream_write}, + {"raw_write", _wrap_Stream_raw_write}, {"get_data", _wrap_Stream_get_data}, {0,0} }; @@ -8064,6 +8281,7 @@ static swig_type_info _swigt__p_LUA__Session = {"_p_LUA__Session", "LUA::Session static swig_type_info _swigt__p_SWIGLUA_FN = {"_p_SWIGLUA_FN", "SWIGLUA_FN *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)&_wrap_class_Stream, 0}; static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)&_wrap_class_input_callback_state_t, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_lua_State = {"_p_lua_State", "lua_State *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_switch_event_node_t = {"_p_p_switch_event_node_t", "switch_event_node_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0}; @@ -8095,6 +8313,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_SWIGLUA_FN, &_swigt__p_Stream, &_swigt__p_input_callback_state, + &_swigt__p_int, &_swigt__p_lua_State, &_swigt__p_p_switch_event_node_t, &_swigt__p_session_flag_t, @@ -8126,6 +8345,7 @@ static swig_cast_info _swigc__p_LUA__Session[] = { {&_swigt__p_LUA__Session, 0, static swig_cast_info _swigc__p_SWIGLUA_FN[] = { {&_swigt__p_SWIGLUA_FN, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_lua_State[] = { {&_swigt__p_lua_State, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_switch_event_node_t[] = { {&_swigt__p_p_switch_event_node_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -8157,6 +8377,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_SWIGLUA_FN, _swigc__p_Stream, _swigc__p_input_callback_state, + _swigc__p_int, _swigc__p_lua_State, _swigc__p_p_switch_event_node_t, _swigc__p_session_flag_t, diff --git a/src/mod/languages/mod_lua/my_swigable_cpp.h b/src/mod/languages/mod_lua/my_swigable_cpp.h index ebe597260f..80f689e56e 100644 --- a/src/mod/languages/mod_lua/my_swigable_cpp.h +++ b/src/mod/languages/mod_lua/my_swigable_cpp.h @@ -22,7 +22,12 @@ class Stream { Stream(void); Stream(switch_stream_handle_t *); virtual ~ Stream(); + +%inline %{ + char *read(int *len); +%} void write(const char *data); + void raw_write(void *data, int len); const char *get_data(void); }; diff --git a/src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx b/src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx index d8c9843b36..6edc41deb3 100644 --- a/src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx +++ b/src/mod/languages/mod_managed/freeswitch_wrap.2010.cxx @@ -2720,6 +2720,36 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_directories_storage_dir_get(void * j } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_directories_cache_dir_set(void * jarg1, char * jarg2) { + switch_directories *arg1 = (switch_directories *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_directories *)jarg1; + arg2 = (char *)jarg2; + { + if (arg1->cache_dir) delete [] arg1->cache_dir; + if (arg2) { + arg1->cache_dir = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->cache_dir, (const char *)arg2); + } else { + arg1->cache_dir = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_directories_cache_dir_get(void * jarg1) { + char * jresult ; + switch_directories *arg1 = (switch_directories *) 0 ; + char *result = 0 ; + + arg1 = (switch_directories *)jarg1; + result = (char *) ((arg1)->cache_dir); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_directories_recordings_dir_set(void * jarg1, char * jarg2) { switch_directories *arg1 = (switch_directories *) 0 ; char *arg2 = (char *) 0 ; @@ -4890,6 +4920,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_MEDIA_TYPE_TOTAL_get() { } +SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_SOCK_INVALID_get() { + int jresult ; + int result; + + result = (int)(-1); + jresult = result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_console_callback_match_node_val_set(void * jarg1, char * jarg2) { switch_console_callback_match_node *arg1 = (switch_console_callback_match_node *) 0 ; char *arg2 = (char *) 0 ; @@ -6230,6 +6270,90 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_payload_map_t(void * jarg1) { } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_waitlist_t_sock_set(void * jarg1, int jarg2) { + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + switch_os_socket_t arg2 ; + + arg1 = (switch_waitlist_t *)jarg1; + arg2 = (switch_os_socket_t)jarg2; + if (arg1) (arg1)->sock = arg2; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_waitlist_t_sock_get(void * jarg1) { + int jresult ; + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + switch_os_socket_t result; + + arg1 = (switch_waitlist_t *)jarg1; + result = (switch_os_socket_t) ((arg1)->sock); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_waitlist_t_events_set(void * jarg1, unsigned long jarg2) { + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + uint32_t arg2 ; + + arg1 = (switch_waitlist_t *)jarg1; + arg2 = (uint32_t)jarg2; + if (arg1) (arg1)->events = arg2; +} + + +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_waitlist_t_events_get(void * jarg1) { + unsigned long jresult ; + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + uint32_t result; + + arg1 = (switch_waitlist_t *)jarg1; + result = (uint32_t) ((arg1)->events); + jresult = (unsigned long)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_waitlist_t_revents_set(void * jarg1, unsigned long jarg2) { + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + uint32_t arg2 ; + + arg1 = (switch_waitlist_t *)jarg1; + arg2 = (uint32_t)jarg2; + if (arg1) (arg1)->revents = arg2; +} + + +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_waitlist_t_revents_get(void * jarg1) { + unsigned long jresult ; + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + uint32_t result; + + arg1 = (switch_waitlist_t *)jarg1; + result = (uint32_t) ((arg1)->revents); + jresult = (unsigned long)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_waitlist_t() { + void * jresult ; + switch_waitlist_t *result = 0 ; + + result = (switch_waitlist_t *)new switch_waitlist_t(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_waitlist_t(void * jarg1) { + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + + arg1 = (switch_waitlist_t *)jarg1; + delete arg1; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_db_close(void * jarg1) { int jresult ; switch_core_db_t *arg1 = (switch_core_db_t *) 0 ; @@ -18102,6 +18226,18 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_find_end_paren(char * jarg1, char ja } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_separate_file_params(char * jarg1, void * jarg2, void * jarg3) { + char *arg1 = (char *) 0 ; + char **arg2 = (char **) 0 ; + char **arg3 = (char **) 0 ; + + arg1 = (char *)jarg1; + arg2 = (char **)jarg2; + arg3 = (char **)jarg3; + switch_separate_file_params((char const *)arg1,arg2,arg3); +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_is_file_path(char * jarg1) { int jresult ; char *arg1 = (char *) 0 ; @@ -18426,6 +18562,611 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_strerror_r(int jarg1, char * jarg2, } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_wait_sock(int jarg1, unsigned long jarg2, int jarg3) { + int jresult ; + switch_os_socket_t arg1 ; + uint32_t arg2 ; + switch_poll_t arg3 ; + int result; + + arg1 = (switch_os_socket_t)jarg1; + arg2 = (uint32_t)jarg2; + arg3 = (switch_poll_t)jarg3; + result = (int)switch_wait_sock(arg1,arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_wait_socklist(void * jarg1, unsigned long jarg2, unsigned long jarg3) { + int jresult ; + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + uint32_t arg2 ; + uint32_t arg3 ; + int result; + + arg1 = (switch_waitlist_t *)jarg1; + arg2 = (uint32_t)jarg2; + arg3 = (uint32_t)jarg3; + result = (int)switch_wait_socklist(arg1,arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_method_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->method = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->method, (const char *)arg2); + } else { + arg1->method = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_method_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->method); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_uri_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->uri = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->uri, (const char *)arg2); + } else { + arg1->uri = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_uri_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->uri); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_qs_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->qs = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->qs, (const char *)arg2); + } else { + arg1->qs = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_qs_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->qs); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_host_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->host = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->host, (const char *)arg2); + } else { + arg1->host = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_host_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->host); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_port_set(void * jarg1, unsigned short jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_port_t arg2 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (switch_port_t)jarg2; + if (arg1) (arg1)->port = arg2; +} + + +SWIGEXPORT unsigned short SWIGSTDCALL CSharp_switch_http_request_t_port_get(void * jarg1) { + unsigned short jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_port_t result; + + arg1 = (switch_http_request_t *)jarg1; + result = (switch_port_t) ((arg1)->port); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_from_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->from = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->from, (const char *)arg2); + } else { + arg1->from = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_from_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->from); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_user_agent_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->user_agent = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->user_agent, (const char *)arg2); + } else { + arg1->user_agent = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_user_agent_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->user_agent); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_referer_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->referer = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->referer, (const char *)arg2); + } else { + arg1->referer = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_referer_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->referer); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_user_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->user = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->user, (const char *)arg2); + } else { + arg1->user = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_user_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->user); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_keepalive_set(void * jarg1, int jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_bool_t arg2 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (switch_bool_t)jarg2; + if (arg1) (arg1)->keepalive = arg2; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_http_request_t_keepalive_get(void * jarg1) { + int jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_bool_t result; + + arg1 = (switch_http_request_t *)jarg1; + result = (switch_bool_t) ((arg1)->keepalive); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_content_type_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->content_type = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->content_type, (const char *)arg2); + } else { + arg1->content_type = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_content_type_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->content_type); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_content_length_set(void * jarg1, void * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_size_t arg2 ; + switch_size_t *argp2 ; + + arg1 = (switch_http_request_t *)jarg1; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; + if (arg1) (arg1)->content_length = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_content_length_get(void * jarg1) { + void * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_size_t result; + + arg1 = (switch_http_request_t *)jarg1; + result = ((arg1)->content_length); + jresult = new switch_size_t((const switch_size_t &)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_bytes_header_set(void * jarg1, void * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_size_t arg2 ; + switch_size_t *argp2 ; + + arg1 = (switch_http_request_t *)jarg1; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; + if (arg1) (arg1)->bytes_header = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_bytes_header_get(void * jarg1) { + void * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_size_t result; + + arg1 = (switch_http_request_t *)jarg1; + result = ((arg1)->bytes_header); + jresult = new switch_size_t((const switch_size_t &)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_bytes_read_set(void * jarg1, void * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_size_t arg2 ; + switch_size_t *argp2 ; + + arg1 = (switch_http_request_t *)jarg1; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; + if (arg1) (arg1)->bytes_read = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_bytes_read_get(void * jarg1) { + void * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_size_t result; + + arg1 = (switch_http_request_t *)jarg1; + result = ((arg1)->bytes_read); + jresult = new switch_size_t((const switch_size_t &)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_bytes_buffered_set(void * jarg1, void * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_size_t arg2 ; + switch_size_t *argp2 ; + + arg1 = (switch_http_request_t *)jarg1; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; + if (arg1) (arg1)->bytes_buffered = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_bytes_buffered_get(void * jarg1) { + void * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_size_t result; + + arg1 = (switch_http_request_t *)jarg1; + result = ((arg1)->bytes_buffered); + jresult = new switch_size_t((const switch_size_t &)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_headers_set(void * jarg1, void * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_event_t *arg2 = (switch_event_t *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (switch_event_t *)jarg2; + if (arg1) (arg1)->headers = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_headers_get(void * jarg1) { + void * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_event_t *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (switch_event_t *) ((arg1)->headers); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_user_data_set(void * jarg1, void * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + void *arg2 = (void *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (void *)jarg2; + if (arg1) (arg1)->user_data = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_user_data_get(void * jarg1) { + void * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + void *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (void *) ((arg1)->user_data); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t__buffer_set(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + { + if (arg1->_buffer) delete [] arg1->_buffer; + if (arg2) { + arg1->_buffer = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->_buffer, (const char *)arg2); + } else { + arg1->_buffer = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t__buffer_get(void * jarg1) { + char * jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_t *)jarg1; + result = (char *) ((arg1)->_buffer); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t__destroy_headers_set(void * jarg1, int jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_bool_t arg2 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (switch_bool_t)jarg2; + if (arg1) (arg1)->_destroy_headers = arg2; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_http_request_t__destroy_headers_get(void * jarg1) { + int jresult ; + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + switch_bool_t result; + + arg1 = (switch_http_request_t *)jarg1; + result = (switch_bool_t) ((arg1)->_destroy_headers); + jresult = result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_http_request_t() { + void * jresult ; + switch_http_request_t *result = 0 ; + + result = (switch_http_request_t *)new switch_http_request_t(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_http_request_t(void * jarg1) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + delete arg1; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_http_parse_header(char * jarg1, unsigned long jarg2, void * jarg3) { + int jresult ; + char *arg1 = (char *) 0 ; + uint32_t arg2 ; + switch_http_request_t *arg3 = (switch_http_request_t *) 0 ; + switch_status_t result; + + arg1 = (char *)jarg1; + arg2 = (uint32_t)jarg2; + arg3 = (switch_http_request_t *)jarg3; + result = (switch_status_t)switch_http_parse_header(arg1,arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_free_request(void * jarg1) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + switch_http_free_request(arg1); +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_dump_request(void * jarg1) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + switch_http_dump_request(arg1); +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_parse_qs(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + switch_http_parse_qs(arg1,arg2); +} + + 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 ; @@ -20859,6 +21600,28 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_state_handler_table(void * jarg } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_stream_handle_read_function_set(void * jarg1, void * jarg2) { + switch_stream_handle *arg1 = (switch_stream_handle *) 0 ; + switch_stream_handle_read_function_t arg2 = (switch_stream_handle_read_function_t) 0 ; + + arg1 = (switch_stream_handle *)jarg1; + arg2 = (switch_stream_handle_read_function_t)jarg2; + if (arg1) (arg1)->read_function = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_stream_handle_read_function_get(void * jarg1) { + void * jresult ; + switch_stream_handle *arg1 = (switch_stream_handle *) 0 ; + switch_stream_handle_read_function_t result; + + arg1 = (switch_stream_handle *)jarg1; + result = (switch_stream_handle_read_function_t) ((arg1)->read_function); + jresult = (void *)result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_stream_handle_write_function_set(void * jarg1, void * jarg2) { switch_stream_handle *arg1 = (switch_stream_handle *) 0 ; switch_stream_handle_write_function_t arg2 = (switch_stream_handle_write_function_t) 0 ; @@ -36232,6 +36995,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_uuid_force_exists(char * jarg1) { } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_is_parsing(void * jarg1) { + int jresult ; + switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ; + switch_bool_t result; + + arg1 = (switch_ivr_dmachine_t *)jarg1; + result = (switch_bool_t)switch_ivr_dmachine_is_parsing(arg1); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_last_ping(void * jarg1) { int jresult ; switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ; @@ -42238,6 +43013,20 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_Stream(void * jarg1) { } +SWIGEXPORT char * SWIGSTDCALL CSharp_Stream_read(void * jarg1, void * jarg2) { + char * jresult ; + Stream *arg1 = (Stream *) 0 ; + int *arg2 = (int *) 0 ; + char *result = 0 ; + + arg1 = (Stream *)jarg1; + arg2 = (int *)jarg2; + result = (char *)(arg1)->read(arg2); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_Stream_Write(void * jarg1, char * jarg2) { Stream *arg1 = (Stream *) 0 ; char *arg2 = (char *) 0 ; @@ -42248,6 +43037,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Stream_Write(void * jarg1, char * jarg2) { } +SWIGEXPORT void SWIGSTDCALL CSharp_Stream_raw_write(void * jarg1, char * jarg2, int jarg3) { + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + + arg1 = (Stream *)jarg1; + arg2 = (char *)jarg2; + arg3 = (int)jarg3; + (arg1)->raw_write((char const *)arg2,arg3); +} + + SWIGEXPORT char * SWIGSTDCALL CSharp_Stream_get_data(void * jarg1) { char * jresult ; Stream *arg1 = (Stream *) 0 ; diff --git a/src/mod/languages/mod_managed/freeswitch_wrap.cxx b/src/mod/languages/mod_managed/freeswitch_wrap.cxx index a444a30749..83a87bcf94 100644 --- a/src/mod/languages/mod_managed/freeswitch_wrap.cxx +++ b/src/mod/languages/mod_managed/freeswitch_wrap.cxx @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.7 + * + * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGCSHARP @@ -65,28 +65,28 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -129,7 +129,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -2720,6 +2720,36 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_directories_storage_dir_get(void * j } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_directories_cache_dir_set(void * jarg1, char * jarg2) { + switch_directories *arg1 = (switch_directories *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_directories *)jarg1; + arg2 = (char *)jarg2; + { + delete [] arg1->cache_dir; + if (arg2) { + arg1->cache_dir = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->cache_dir, (const char *)arg2); + } else { + arg1->cache_dir = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_directories_cache_dir_get(void * jarg1) { + char * jresult ; + switch_directories *arg1 = (switch_directories *) 0 ; + char *result = 0 ; + + arg1 = (switch_directories *)jarg1; + result = (char *) ((arg1)->cache_dir); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_directories_recordings_dir_set(void * jarg1, char * jarg2) { switch_directories *arg1 = (switch_directories *) 0 ; char *arg2 = (char *) 0 ; @@ -4890,6 +4920,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_MEDIA_TYPE_TOTAL_get() { } +SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_SOCK_INVALID_get() { + int jresult ; + int result; + + result = (int)(-1); + jresult = result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_console_callback_match_node_val_set(void * jarg1, char * jarg2) { switch_console_callback_match_node *arg1 = (switch_console_callback_match_node *) 0 ; char *arg2 = (char *) 0 ; @@ -6230,6 +6270,90 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_payload_map_t(void * jarg1) { } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_waitlist_t_sock_set(void * jarg1, int jarg2) { + switch_waitlist_s *arg1 = (switch_waitlist_s *) 0 ; + switch_os_socket_t arg2 ; + + arg1 = (switch_waitlist_s *)jarg1; + arg2 = (switch_os_socket_t)jarg2; + if (arg1) (arg1)->sock = arg2; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_waitlist_t_sock_get(void * jarg1) { + int jresult ; + switch_waitlist_s *arg1 = (switch_waitlist_s *) 0 ; + switch_os_socket_t result; + + arg1 = (switch_waitlist_s *)jarg1; + result = (switch_os_socket_t) ((arg1)->sock); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_waitlist_t_events_set(void * jarg1, unsigned long jarg2) { + switch_waitlist_s *arg1 = (switch_waitlist_s *) 0 ; + uint32_t arg2 ; + + arg1 = (switch_waitlist_s *)jarg1; + arg2 = (uint32_t)jarg2; + if (arg1) (arg1)->events = arg2; +} + + +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_waitlist_t_events_get(void * jarg1) { + unsigned long jresult ; + switch_waitlist_s *arg1 = (switch_waitlist_s *) 0 ; + uint32_t result; + + arg1 = (switch_waitlist_s *)jarg1; + result = (uint32_t) ((arg1)->events); + jresult = (unsigned long)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_waitlist_t_revents_set(void * jarg1, unsigned long jarg2) { + switch_waitlist_s *arg1 = (switch_waitlist_s *) 0 ; + uint32_t arg2 ; + + arg1 = (switch_waitlist_s *)jarg1; + arg2 = (uint32_t)jarg2; + if (arg1) (arg1)->revents = arg2; +} + + +SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_waitlist_t_revents_get(void * jarg1) { + unsigned long jresult ; + switch_waitlist_s *arg1 = (switch_waitlist_s *) 0 ; + uint32_t result; + + arg1 = (switch_waitlist_s *)jarg1; + result = (uint32_t) ((arg1)->revents); + jresult = (unsigned long)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_waitlist_t() { + void * jresult ; + switch_waitlist_s *result = 0 ; + + result = (switch_waitlist_s *)new switch_waitlist_s(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_waitlist_t(void * jarg1) { + switch_waitlist_s *arg1 = (switch_waitlist_s *) 0 ; + + arg1 = (switch_waitlist_s *)jarg1; + delete arg1; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_db_close(void * jarg1) { int jresult ; switch_core_db_t *arg1 = (switch_core_db_t *) 0 ; @@ -18102,6 +18226,18 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_find_end_paren(char * jarg1, char ja } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_separate_file_params(char * jarg1, void * jarg2, void * jarg3) { + char *arg1 = (char *) 0 ; + char **arg2 = (char **) 0 ; + char **arg3 = (char **) 0 ; + + arg1 = (char *)jarg1; + arg2 = (char **)jarg2; + arg3 = (char **)jarg3; + switch_separate_file_params((char const *)arg1,arg2,arg3); +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_is_file_path(char * jarg1) { int jresult ; char *arg1 = (char *) 0 ; @@ -18426,6 +18562,611 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_switch_strerror_r(int jarg1, char * jarg2, } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_wait_sock(int jarg1, unsigned long jarg2, int jarg3) { + int jresult ; + switch_os_socket_t arg1 ; + uint32_t arg2 ; + switch_poll_t arg3 ; + int result; + + arg1 = (switch_os_socket_t)jarg1; + arg2 = (uint32_t)jarg2; + arg3 = (switch_poll_t)jarg3; + result = (int)switch_wait_sock(arg1,arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_wait_socklist(void * jarg1, unsigned long jarg2, unsigned long jarg3) { + int jresult ; + switch_waitlist_t *arg1 = (switch_waitlist_t *) 0 ; + uint32_t arg2 ; + uint32_t arg3 ; + int result; + + arg1 = (switch_waitlist_t *)jarg1; + arg2 = (uint32_t)jarg2; + arg3 = (uint32_t)jarg3; + result = (int)switch_wait_socklist(arg1,arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_method_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->method = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->method, (const char *)arg2); + } else { + arg1->method = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_method_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->method); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_uri_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->uri = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->uri, (const char *)arg2); + } else { + arg1->uri = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_uri_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->uri); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_qs_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->qs = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->qs, (const char *)arg2); + } else { + arg1->qs = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_qs_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->qs); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_host_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->host = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->host, (const char *)arg2); + } else { + arg1->host = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_host_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->host); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_port_set(void * jarg1, unsigned short jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_port_t arg2 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (switch_port_t)jarg2; + if (arg1) (arg1)->port = arg2; +} + + +SWIGEXPORT unsigned short SWIGSTDCALL CSharp_switch_http_request_t_port_get(void * jarg1) { + unsigned short jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_port_t result; + + arg1 = (switch_http_request_s *)jarg1; + result = (switch_port_t) ((arg1)->port); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_from_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->from = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->from, (const char *)arg2); + } else { + arg1->from = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_from_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->from); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_user_agent_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->user_agent = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->user_agent, (const char *)arg2); + } else { + arg1->user_agent = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_user_agent_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->user_agent); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_referer_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->referer = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->referer, (const char *)arg2); + } else { + arg1->referer = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_referer_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->referer); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_user_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->user = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->user, (const char *)arg2); + } else { + arg1->user = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_user_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->user); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_keepalive_set(void * jarg1, int jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_bool_t arg2 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (switch_bool_t)jarg2; + if (arg1) (arg1)->keepalive = arg2; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_http_request_t_keepalive_get(void * jarg1) { + int jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_bool_t result; + + arg1 = (switch_http_request_s *)jarg1; + result = (switch_bool_t) ((arg1)->keepalive); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_content_type_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + if (arg2) { + arg1->content_type = (char const *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->content_type, (const char *)arg2); + } else { + arg1->content_type = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t_content_type_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->content_type); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_content_length_set(void * jarg1, void * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_size_t arg2 ; + switch_size_t *argp2 ; + + arg1 = (switch_http_request_s *)jarg1; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; + if (arg1) (arg1)->content_length = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_content_length_get(void * jarg1) { + void * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_size_t result; + + arg1 = (switch_http_request_s *)jarg1; + result = ((arg1)->content_length); + jresult = new switch_size_t((const switch_size_t &)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_bytes_header_set(void * jarg1, void * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_size_t arg2 ; + switch_size_t *argp2 ; + + arg1 = (switch_http_request_s *)jarg1; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; + if (arg1) (arg1)->bytes_header = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_bytes_header_get(void * jarg1) { + void * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_size_t result; + + arg1 = (switch_http_request_s *)jarg1; + result = ((arg1)->bytes_header); + jresult = new switch_size_t((const switch_size_t &)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_bytes_read_set(void * jarg1, void * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_size_t arg2 ; + switch_size_t *argp2 ; + + arg1 = (switch_http_request_s *)jarg1; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; + if (arg1) (arg1)->bytes_read = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_bytes_read_get(void * jarg1) { + void * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_size_t result; + + arg1 = (switch_http_request_s *)jarg1; + result = ((arg1)->bytes_read); + jresult = new switch_size_t((const switch_size_t &)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_bytes_buffered_set(void * jarg1, void * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_size_t arg2 ; + switch_size_t *argp2 ; + + arg1 = (switch_http_request_s *)jarg1; + argp2 = (switch_size_t *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_size_t", 0); + return ; + } + arg2 = *argp2; + if (arg1) (arg1)->bytes_buffered = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_bytes_buffered_get(void * jarg1) { + void * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_size_t result; + + arg1 = (switch_http_request_s *)jarg1; + result = ((arg1)->bytes_buffered); + jresult = new switch_size_t((const switch_size_t &)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_headers_set(void * jarg1, void * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_event_t *arg2 = (switch_event_t *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (switch_event_t *)jarg2; + if (arg1) (arg1)->headers = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_headers_get(void * jarg1) { + void * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_event_t *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (switch_event_t *) ((arg1)->headers); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t_user_data_set(void * jarg1, void * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + void *arg2 = (void *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (void *)jarg2; + if (arg1) (arg1)->user_data = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_http_request_t_user_data_get(void * jarg1) { + void * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + void *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (void *) ((arg1)->user_data); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t__buffer_set(void * jarg1, char * jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (char *)jarg2; + { + delete [] arg1->_buffer; + if (arg2) { + arg1->_buffer = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->_buffer, (const char *)arg2); + } else { + arg1->_buffer = 0; + } + } +} + + +SWIGEXPORT char * SWIGSTDCALL CSharp_switch_http_request_t__buffer_get(void * jarg1) { + char * jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + char *result = 0 ; + + arg1 = (switch_http_request_s *)jarg1; + result = (char *) ((arg1)->_buffer); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_request_t__destroy_headers_set(void * jarg1, int jarg2) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_bool_t arg2 ; + + arg1 = (switch_http_request_s *)jarg1; + arg2 = (switch_bool_t)jarg2; + if (arg1) (arg1)->_destroy_headers = arg2; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_http_request_t__destroy_headers_get(void * jarg1) { + int jresult ; + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + switch_bool_t result; + + arg1 = (switch_http_request_s *)jarg1; + result = (switch_bool_t) ((arg1)->_destroy_headers); + jresult = result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_http_request_t() { + void * jresult ; + switch_http_request_s *result = 0 ; + + result = (switch_http_request_s *)new switch_http_request_s(); + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_http_request_t(void * jarg1) { + switch_http_request_s *arg1 = (switch_http_request_s *) 0 ; + + arg1 = (switch_http_request_s *)jarg1; + delete arg1; +} + + +SWIGEXPORT int SWIGSTDCALL CSharp_switch_http_parse_header(char * jarg1, unsigned long jarg2, void * jarg3) { + int jresult ; + char *arg1 = (char *) 0 ; + uint32_t arg2 ; + switch_http_request_t *arg3 = (switch_http_request_t *) 0 ; + switch_status_t result; + + arg1 = (char *)jarg1; + arg2 = (uint32_t)jarg2; + arg3 = (switch_http_request_t *)jarg3; + result = (switch_status_t)switch_http_parse_header(arg1,arg2,arg3); + jresult = result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_free_request(void * jarg1) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + switch_http_free_request(arg1); +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_dump_request(void * jarg1) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + switch_http_dump_request(arg1); +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_switch_http_parse_qs(void * jarg1, char * jarg2) { + switch_http_request_t *arg1 = (switch_http_request_t *) 0 ; + char *arg2 = (char *) 0 ; + + arg1 = (switch_http_request_t *)jarg1; + arg2 = (char *)jarg2; + switch_http_parse_qs(arg1,arg2); +} + + SWIGEXPORT void SWIGSTDCALL CSharp_profile_node_t_var_set(void * jarg1, char * jarg2) { profile_node_s *arg1 = (profile_node_s *) 0 ; char *arg2 = (char *) 0 ; @@ -20859,6 +21600,28 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_state_handler_table(void * jarg } +SWIGEXPORT void SWIGSTDCALL CSharp_switch_stream_handle_read_function_set(void * jarg1, void * jarg2) { + switch_stream_handle *arg1 = (switch_stream_handle *) 0 ; + switch_stream_handle_read_function_t arg2 = (switch_stream_handle_read_function_t) 0 ; + + arg1 = (switch_stream_handle *)jarg1; + arg2 = (switch_stream_handle_read_function_t)jarg2; + if (arg1) (arg1)->read_function = arg2; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_switch_stream_handle_read_function_get(void * jarg1) { + void * jresult ; + switch_stream_handle *arg1 = (switch_stream_handle *) 0 ; + switch_stream_handle_read_function_t result; + + arg1 = (switch_stream_handle *)jarg1; + result = (switch_stream_handle_read_function_t) ((arg1)->read_function); + jresult = (void *)result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_switch_stream_handle_write_function_set(void * jarg1, void * jarg2) { switch_stream_handle *arg1 = (switch_stream_handle *) 0 ; switch_stream_handle_write_function_t arg2 = (switch_stream_handle_write_function_t) 0 ; @@ -36232,6 +36995,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_uuid_force_exists(char * jarg1) { } +SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_is_parsing(void * jarg1) { + int jresult ; + switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ; + switch_bool_t result; + + arg1 = (switch_ivr_dmachine_t *)jarg1; + result = (switch_bool_t)switch_ivr_dmachine_is_parsing(arg1); + jresult = result; + return jresult; +} + + SWIGEXPORT int SWIGSTDCALL CSharp_switch_ivr_dmachine_last_ping(void * jarg1) { int jresult ; switch_ivr_dmachine_t *arg1 = (switch_ivr_dmachine_t *) 0 ; @@ -42238,6 +43013,20 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_Stream(void * jarg1) { } +SWIGEXPORT char * SWIGSTDCALL CSharp_Stream_read(void * jarg1, void * jarg2) { + char * jresult ; + Stream *arg1 = (Stream *) 0 ; + int *arg2 = (int *) 0 ; + char *result = 0 ; + + arg1 = (Stream *)jarg1; + arg2 = (int *)jarg2; + result = (char *)(arg1)->read(arg2); + jresult = SWIG_csharp_string_callback((const char *)result); + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_Stream_Write(void * jarg1, char * jarg2) { Stream *arg1 = (Stream *) 0 ; char *arg2 = (char *) 0 ; @@ -42248,6 +43037,18 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Stream_Write(void * jarg1, char * jarg2) { } +SWIGEXPORT void SWIGSTDCALL CSharp_Stream_raw_write(void * jarg1, char * jarg2, int jarg3) { + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + + arg1 = (Stream *)jarg1; + arg2 = (char *)jarg2; + arg3 = (int)jarg3; + (arg1)->raw_write((char const *)arg2,arg3); +} + + SWIGEXPORT char * SWIGSTDCALL CSharp_Stream_get_data(void * jarg1) { char * jresult ; Stream *arg1 = (Stream *) 0 ; diff --git a/src/mod/languages/mod_managed/managed/swig.2010.cs b/src/mod/languages/mod_managed/managed/swig.2010.cs index 85c1924b63..3b9815e11e 100644 --- a/src/mod/languages/mod_managed/managed/swig.2010.cs +++ b/src/mod/languages/mod_managed/managed/swig.2010.cs @@ -3948,6 +3948,10 @@ public class freeswitch { return ret; } + public static void switch_separate_file_params(string file, ref string file_portion, ref string params_portion) { + freeswitchPINVOKE.switch_separate_file_params(file, ref file_portion, ref params_portion); + } + public static switch_bool_t switch_is_file_path(string file) { switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_is_file_path(file); return ret; @@ -4054,6 +4058,33 @@ public class freeswitch { return ret; } + public static int switch_wait_sock(int sock, uint ms, switch_poll_t flags) { + int ret = freeswitchPINVOKE.switch_wait_sock(sock, ms, (int)flags); + return ret; + } + + public static int switch_wait_socklist(switch_waitlist_t waitlist, uint len, uint ms) { + int ret = freeswitchPINVOKE.switch_wait_socklist(switch_waitlist_t.getCPtr(waitlist), len, ms); + return ret; + } + + public static switch_status_t switch_http_parse_header(string buffer, uint datalen, switch_http_request_t request) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_http_parse_header(buffer, datalen, switch_http_request_t.getCPtr(request)); + return ret; + } + + public static void switch_http_free_request(switch_http_request_t request) { + freeswitchPINVOKE.switch_http_free_request(switch_http_request_t.getCPtr(request)); + } + + public static void switch_http_dump_request(switch_http_request_t request) { + freeswitchPINVOKE.switch_http_dump_request(switch_http_request_t.getCPtr(request)); + } + + public static void switch_http_parse_qs(switch_http_request_t request, string qs) { + freeswitchPINVOKE.switch_http_parse_qs(switch_http_request_t.getCPtr(request), qs); + } + 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); @@ -5894,6 +5925,11 @@ public class freeswitch { return ret; } + public static switch_bool_t switch_ivr_dmachine_is_parsing(SWIGTYPE_p_switch_ivr_dmachine dmachine) { + switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_ivr_dmachine_is_parsing(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine)); + 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; @@ -7093,6 +7129,7 @@ public class freeswitch { public static readonly int SWITCH_MAX_MANAGEMENT_BUFFER_LEN = freeswitchPINVOKE.SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get(); public static readonly int SWITCH_RTP_CNG_PAYLOAD = freeswitchPINVOKE.SWITCH_RTP_CNG_PAYLOAD_get(); public static readonly int SWITCH_MEDIA_TYPE_TOTAL = freeswitchPINVOKE.SWITCH_MEDIA_TYPE_TOTAL_get(); + public static readonly int SWITCH_SOCK_INVALID = freeswitchPINVOKE.SWITCH_SOCK_INVALID_get(); public static readonly int DMACHINE_MAX_DIGIT_LEN = freeswitchPINVOKE.DMACHINE_MAX_DIGIT_LEN_get(); public static readonly int MAX_ARG_RECURSION = freeswitchPINVOKE.MAX_ARG_RECURSION_get(); public static readonly int SWITCH_API_VERSION = freeswitchPINVOKE.SWITCH_API_VERSION_get(); @@ -8021,6 +8058,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_storage_dir_get")] public static extern string switch_directories_storage_dir_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_cache_dir_set")] + public static extern void switch_directories_cache_dir_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_cache_dir_get")] + public static extern string switch_directories_cache_dir_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_recordings_dir_set")] public static extern void switch_directories_recordings_dir_set(HandleRef jarg1, string jarg2); @@ -8585,6 +8628,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_MEDIA_TYPE_TOTAL_get")] public static extern int SWITCH_MEDIA_TYPE_TOTAL_get(); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_SOCK_INVALID_get")] + public static extern int SWITCH_SOCK_INVALID_get(); + [DllImport("mod_managed", EntryPoint="CSharp_switch_console_callback_match_node_val_set")] public static extern void switch_console_callback_match_node_val_set(HandleRef jarg1, string jarg2); @@ -8942,6 +8988,30 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_delete_payload_map_t")] public static extern void delete_payload_map_t(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_sock_set")] + public static extern void switch_waitlist_t_sock_set(HandleRef jarg1, int jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_sock_get")] + public static extern int switch_waitlist_t_sock_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_events_set")] + public static extern void switch_waitlist_t_events_set(HandleRef jarg1, uint jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_events_get")] + public static extern uint switch_waitlist_t_events_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_revents_set")] + public static extern void switch_waitlist_t_revents_set(HandleRef jarg1, uint jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_revents_get")] + public static extern uint switch_waitlist_t_revents_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_new_switch_waitlist_t")] + public static extern IntPtr new_switch_waitlist_t(); + + [DllImport("mod_managed", EntryPoint="CSharp_delete_switch_waitlist_t")] + public static extern void delete_switch_waitlist_t(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_db_close")] public static extern int switch_core_db_close(HandleRef jarg1); @@ -11711,6 +11781,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_find_end_paren")] public static extern string switch_find_end_paren(string jarg1, char jarg2, char jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_separate_file_params")] + public static extern void switch_separate_file_params(string jarg1, ref string jarg2, ref string jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_is_file_path")] public static extern int switch_is_file_path(string jarg1); @@ -11774,6 +11847,144 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_strerror_r")] public static extern string switch_strerror_r(int jarg1, string jarg2, HandleRef jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_wait_sock")] + public static extern int switch_wait_sock(int jarg1, uint jarg2, int jarg3); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_wait_socklist")] + public static extern int switch_wait_socklist(HandleRef jarg1, uint jarg2, uint jarg3); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_method_set")] + public static extern void switch_http_request_t_method_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_method_get")] + public static extern string switch_http_request_t_method_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_uri_set")] + public static extern void switch_http_request_t_uri_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_uri_get")] + public static extern string switch_http_request_t_uri_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_qs_set")] + public static extern void switch_http_request_t_qs_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_qs_get")] + public static extern string switch_http_request_t_qs_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_host_set")] + public static extern void switch_http_request_t_host_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_host_get")] + public static extern string switch_http_request_t_host_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_port_set")] + public static extern void switch_http_request_t_port_set(HandleRef jarg1, ushort jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_port_get")] + public static extern ushort switch_http_request_t_port_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_from_set")] + public static extern void switch_http_request_t_from_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_from_get")] + public static extern string switch_http_request_t_from_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_agent_set")] + public static extern void switch_http_request_t_user_agent_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_agent_get")] + public static extern string switch_http_request_t_user_agent_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_referer_set")] + public static extern void switch_http_request_t_referer_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_referer_get")] + public static extern string switch_http_request_t_referer_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_set")] + public static extern void switch_http_request_t_user_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_get")] + public static extern string switch_http_request_t_user_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_keepalive_set")] + public static extern void switch_http_request_t_keepalive_set(HandleRef jarg1, int jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_keepalive_get")] + public static extern int switch_http_request_t_keepalive_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_content_type_set")] + public static extern void switch_http_request_t_content_type_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_content_type_get")] + public static extern string switch_http_request_t_content_type_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_content_length_set")] + public static extern void switch_http_request_t_content_length_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_content_length_get")] + public static extern IntPtr switch_http_request_t_content_length_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_header_set")] + public static extern void switch_http_request_t_bytes_header_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_header_get")] + public static extern IntPtr switch_http_request_t_bytes_header_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_read_set")] + public static extern void switch_http_request_t_bytes_read_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_read_get")] + public static extern IntPtr switch_http_request_t_bytes_read_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_buffered_set")] + public static extern void switch_http_request_t_bytes_buffered_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_buffered_get")] + public static extern IntPtr switch_http_request_t_bytes_buffered_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_headers_set")] + public static extern void switch_http_request_t_headers_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_headers_get")] + public static extern IntPtr switch_http_request_t_headers_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_data_set")] + public static extern void switch_http_request_t_user_data_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_data_get")] + public static extern IntPtr switch_http_request_t_user_data_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t__buffer_set")] + public static extern void switch_http_request_t__buffer_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t__buffer_get")] + public static extern string switch_http_request_t__buffer_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t__destroy_headers_set")] + public static extern void switch_http_request_t__destroy_headers_set(HandleRef jarg1, int jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t__destroy_headers_get")] + public static extern int switch_http_request_t__destroy_headers_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_new_switch_http_request_t")] + public static extern IntPtr new_switch_http_request_t(); + + [DllImport("mod_managed", EntryPoint="CSharp_delete_switch_http_request_t")] + public static extern void delete_switch_http_request_t(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_parse_header")] + public static extern int switch_http_parse_header(string jarg1, uint jarg2, HandleRef jarg3); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_free_request")] + public static extern void switch_http_free_request(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_dump_request")] + public static extern void switch_http_dump_request(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_parse_qs")] + public static extern void switch_http_parse_qs(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_profile_node_t_var_set")] public static extern void profile_node_t_var_set(HandleRef jarg1, string jarg2); @@ -12371,6 +12582,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_delete_switch_state_handler_table")] public static extern void delete_switch_state_handler_table(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_stream_handle_read_function_set")] + public static extern void switch_stream_handle_read_function_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_stream_handle_read_function_get")] + public static extern IntPtr switch_stream_handle_read_function_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_stream_handle_write_function_set")] public static extern void switch_stream_handle_write_function_set(HandleRef jarg1, HandleRef jarg2); @@ -16070,6 +16287,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_uuid_force_exists")] public static extern int switch_ivr_uuid_force_exists(string jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_is_parsing")] + public static extern int switch_ivr_dmachine_is_parsing(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_last_ping")] public static extern int switch_ivr_dmachine_last_ping(HandleRef jarg1); @@ -17504,9 +17724,15 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_delete_Stream")] public static extern void delete_Stream(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_Stream_read")] + public static extern string Stream_read(HandleRef jarg1, HandleRef jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_Stream_Write")] public static extern void Stream_Write(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_Stream_raw_write")] + public static extern void Stream_raw_write(HandleRef jarg1, string jarg2, int jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_Stream_get_data")] public static extern string Stream_get_data(HandleRef jarg1); @@ -18865,10 +19091,19 @@ public partial class Stream : IDisposable { public Stream(switch_stream_handle arg0) : this(freeswitchPINVOKE.new_Stream__SWIG_1(switch_stream_handle.getCPtr(arg0)), true) { } + public string read(SWIGTYPE_p_int len) { + string ret = freeswitchPINVOKE.Stream_read(swigCPtr, SWIGTYPE_p_int.getCPtr(len)); + return ret; + } + public void Write(string data) { freeswitchPINVOKE.Stream_Write(swigCPtr, data); } + public void raw_write(string data, int len) { + freeswitchPINVOKE.Stream_raw_write(swigCPtr, data, len); + } + public string get_data() { string ret = freeswitchPINVOKE.Stream_get_data(swigCPtr); return ret; @@ -21440,6 +21675,36 @@ namespace FreeSWITCH.Native { using System; using System.Runtime.InteropServices; +public class SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char { + private HandleRef swigCPtr; + + internal SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char(IntPtr cPtr, bool futureUse) { + swigCPtr = new HandleRef(this, cPtr); + } + + protected SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char() { + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + + internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } +} + +} +/* ---------------------------------------------------------------------------- + * 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 { + +using System; +using System.Runtime.InteropServices; + public class SWIGTYPE_p_f_p_switch_stream_handle_p_q_const__char_v_______switch_status_t { private HandleRef swigCPtr; @@ -30726,6 +30991,16 @@ public class switch_directories : IDisposable { } } + public string cache_dir { + set { + freeswitchPINVOKE.switch_directories_cache_dir_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_directories_cache_dir_get(swigCPtr); + return ret; + } + } + public string recordings_dir { set { freeswitchPINVOKE.switch_directories_recordings_dir_set(swigCPtr, value); @@ -32963,6 +33238,255 @@ public class switch_hold_record_t : IDisposable { namespace FreeSWITCH.Native { +using System; +using System.Runtime.InteropServices; + +public class switch_http_request_t : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal switch_http_request_t(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(switch_http_request_t obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~switch_http_request_t() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + freeswitchPINVOKE.delete_switch_http_request_t(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + } + } + + public string method { + set { + freeswitchPINVOKE.switch_http_request_t_method_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_method_get(swigCPtr); + return ret; + } + } + + public string uri { + set { + freeswitchPINVOKE.switch_http_request_t_uri_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_uri_get(swigCPtr); + return ret; + } + } + + public string qs { + set { + freeswitchPINVOKE.switch_http_request_t_qs_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_qs_get(swigCPtr); + return ret; + } + } + + public string host { + set { + freeswitchPINVOKE.switch_http_request_t_host_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_host_get(swigCPtr); + return ret; + } + } + + public ushort port { + set { + freeswitchPINVOKE.switch_http_request_t_port_set(swigCPtr, value); + } + get { + ushort ret = freeswitchPINVOKE.switch_http_request_t_port_get(swigCPtr); + return ret; + } + } + + public string from { + set { + freeswitchPINVOKE.switch_http_request_t_from_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_from_get(swigCPtr); + return ret; + } + } + + public string user_agent { + set { + freeswitchPINVOKE.switch_http_request_t_user_agent_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_user_agent_get(swigCPtr); + return ret; + } + } + + public string referer { + set { + freeswitchPINVOKE.switch_http_request_t_referer_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_referer_get(swigCPtr); + return ret; + } + } + + public string user { + set { + freeswitchPINVOKE.switch_http_request_t_user_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_user_get(swigCPtr); + return ret; + } + } + + public switch_bool_t keepalive { + set { + freeswitchPINVOKE.switch_http_request_t_keepalive_set(swigCPtr, (int)value); + } + get { + switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_http_request_t_keepalive_get(swigCPtr); + return ret; + } + } + + public string content_type { + set { + freeswitchPINVOKE.switch_http_request_t_content_type_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_content_type_get(swigCPtr); + return ret; + } + } + + public SWIGTYPE_p_switch_size_t content_length { + set { + freeswitchPINVOKE.switch_http_request_t_content_length_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + } + get { + SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_http_request_t_content_length_get(swigCPtr), true); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SWIGTYPE_p_switch_size_t bytes_header { + set { + freeswitchPINVOKE.switch_http_request_t_bytes_header_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + } + get { + SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_http_request_t_bytes_header_get(swigCPtr), true); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SWIGTYPE_p_switch_size_t bytes_read { + set { + freeswitchPINVOKE.switch_http_request_t_bytes_read_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + } + get { + SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_http_request_t_bytes_read_get(swigCPtr), true); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SWIGTYPE_p_switch_size_t bytes_buffered { + set { + freeswitchPINVOKE.switch_http_request_t_bytes_buffered_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + } + get { + SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_http_request_t_bytes_buffered_get(swigCPtr), true); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public switch_event headers { + set { + freeswitchPINVOKE.switch_http_request_t_headers_set(swigCPtr, switch_event.getCPtr(value)); + } + get { + IntPtr cPtr = freeswitchPINVOKE.switch_http_request_t_headers_get(swigCPtr); + switch_event ret = (cPtr == IntPtr.Zero) ? null : new switch_event(cPtr, false); + return ret; + } + } + + public SWIGTYPE_p_void user_data { + set { + freeswitchPINVOKE.switch_http_request_t_user_data_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value)); + } + get { + IntPtr cPtr = freeswitchPINVOKE.switch_http_request_t_user_data_get(swigCPtr); + SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false); + return ret; + } + } + + public string _buffer { + set { + freeswitchPINVOKE.switch_http_request_t__buffer_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t__buffer_get(swigCPtr); + return ret; + } + } + + public switch_bool_t _destroy_headers { + set { + freeswitchPINVOKE.switch_http_request_t__destroy_headers_set(swigCPtr, (int)value); + } + get { + switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_http_request_t__destroy_headers_get(swigCPtr); + return ret; + } + } + + public switch_http_request_t() : this(freeswitchPINVOKE.new_switch_http_request_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 switch_hup_type_t { SHT_NONE = 0, SHT_UNANSWERED = (1 << 0), @@ -35701,6 +36225,28 @@ namespace FreeSWITCH.Native { namespace FreeSWITCH.Native { +public enum switch_poll_t { + SWITCH_POLL_READ = (1 << 0), + SWITCH_POLL_WRITE = (1 << 1), + SWITCH_POLL_ERROR = (1 << 2), + SWITCH_POLL_HUP = (1 << 3), + SWITCH_POLL_RDNORM = (1 << 4), + SWITCH_POLL_RDBAND = (1 << 5), + SWITCH_POLL_PRI = (1 << 6), + SWITCH_POLL_INVALID = (1 << 7) +} + +} +/* ---------------------------------------------------------------------------- + * 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 { + [System.Flags] public enum switch_port_flag_enum_t { SPF_NONE = 0, SPF_ODD = (1 << 0), @@ -38554,6 +39100,17 @@ public class switch_stream_handle : IDisposable { } } + public SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char read_function { + set { + freeswitchPINVOKE.switch_stream_handle_read_function_set(swigCPtr, SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char.getCPtr(value)); + } + get { + IntPtr cPtr = freeswitchPINVOKE.switch_stream_handle_read_function_get(swigCPtr); + SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char(cPtr, false); + return ret; + } + } + public SWIGTYPE_p_f_p_switch_stream_handle_p_q_const__char_v_______switch_status_t write_function { set { freeswitchPINVOKE.switch_stream_handle_write_function_set(swigCPtr, SWIGTYPE_p_f_p_switch_stream_handle_p_q_const__char_v_______switch_status_t.getCPtr(value)); @@ -39634,6 +40191,85 @@ namespace FreeSWITCH.Native { using System; using System.Runtime.InteropServices; +public class switch_waitlist_t : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal switch_waitlist_t(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(switch_waitlist_t obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~switch_waitlist_t() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + freeswitchPINVOKE.delete_switch_waitlist_t(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + } + } + + public int sock { + set { + freeswitchPINVOKE.switch_waitlist_t_sock_set(swigCPtr, value); + } + get { + int ret = freeswitchPINVOKE.switch_waitlist_t_sock_get(swigCPtr); + return ret; + } + } + + public uint events { + set { + freeswitchPINVOKE.switch_waitlist_t_events_set(swigCPtr, value); + } + get { + uint ret = freeswitchPINVOKE.switch_waitlist_t_events_get(swigCPtr); + return ret; + } + } + + public uint revents { + set { + freeswitchPINVOKE.switch_waitlist_t_revents_set(swigCPtr, value); + } + get { + uint ret = freeswitchPINVOKE.switch_waitlist_t_revents_get(swigCPtr); + return ret; + } + } + + public switch_waitlist_t() : this(freeswitchPINVOKE.new_switch_waitlist_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 { + +using System; +using System.Runtime.InteropServices; + public class switch_xml : IDisposable { private HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/mod/languages/mod_managed/managed/swig.cs b/src/mod/languages/mod_managed/managed/swig.cs index 6225771afa..2329ca5861 100644 --- a/src/mod/languages/mod_managed/managed/swig.cs +++ b/src/mod/languages/mod_managed/managed/swig.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -64,7 +64,7 @@ public class Api : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -133,7 +133,7 @@ public class audio_buffer_header_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -149,7 +149,7 @@ public enum cache_db_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -518,7 +518,7 @@ public class CoreSession : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -534,7 +534,7 @@ public enum dm_match_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -624,7 +624,7 @@ public class dtls_fingerprint_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -643,7 +643,7 @@ public enum dtls_state_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -661,7 +661,7 @@ public enum dtls_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -730,7 +730,7 @@ public class DTMF : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -746,7 +746,7 @@ public enum dtmf_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -882,7 +882,7 @@ public class EventConsumer : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -1020,7 +1020,7 @@ public partial class Event : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -3948,6 +3948,10 @@ public class freeswitch { return ret; } + public static void switch_separate_file_params(string file, ref string file_portion, ref string params_portion) { + freeswitchPINVOKE.switch_separate_file_params(file, ref file_portion, ref params_portion); + } + public static switch_bool_t switch_is_file_path(string file) { switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_is_file_path(file); return ret; @@ -4054,6 +4058,33 @@ public class freeswitch { return ret; } + public static int switch_wait_sock(int sock, uint ms, switch_poll_t flags) { + int ret = freeswitchPINVOKE.switch_wait_sock(sock, ms, (int)flags); + return ret; + } + + public static int switch_wait_socklist(switch_waitlist_t waitlist, uint len, uint ms) { + int ret = freeswitchPINVOKE.switch_wait_socklist(switch_waitlist_t.getCPtr(waitlist), len, ms); + return ret; + } + + public static switch_status_t switch_http_parse_header(string buffer, uint datalen, switch_http_request_t request) { + switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_http_parse_header(buffer, datalen, switch_http_request_t.getCPtr(request)); + return ret; + } + + public static void switch_http_free_request(switch_http_request_t request) { + freeswitchPINVOKE.switch_http_free_request(switch_http_request_t.getCPtr(request)); + } + + public static void switch_http_dump_request(switch_http_request_t request) { + freeswitchPINVOKE.switch_http_dump_request(switch_http_request_t.getCPtr(request)); + } + + public static void switch_http_parse_qs(switch_http_request_t request, string qs) { + freeswitchPINVOKE.switch_http_parse_qs(switch_http_request_t.getCPtr(request), qs); + } + 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); @@ -5894,6 +5925,11 @@ public class freeswitch { return ret; } + public static switch_bool_t switch_ivr_dmachine_is_parsing(SWIGTYPE_p_switch_ivr_dmachine dmachine) { + switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_ivr_dmachine_is_parsing(SWIGTYPE_p_switch_ivr_dmachine.getCPtr(dmachine)); + 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; @@ -7093,6 +7129,7 @@ public class freeswitch { public static readonly int SWITCH_MAX_MANAGEMENT_BUFFER_LEN = freeswitchPINVOKE.SWITCH_MAX_MANAGEMENT_BUFFER_LEN_get(); public static readonly int SWITCH_RTP_CNG_PAYLOAD = freeswitchPINVOKE.SWITCH_RTP_CNG_PAYLOAD_get(); public static readonly int SWITCH_MEDIA_TYPE_TOTAL = freeswitchPINVOKE.SWITCH_MEDIA_TYPE_TOTAL_get(); + public static readonly int SWITCH_SOCK_INVALID = freeswitchPINVOKE.SWITCH_SOCK_INVALID_get(); public static readonly int DMACHINE_MAX_DIGIT_LEN = freeswitchPINVOKE.DMACHINE_MAX_DIGIT_LEN_get(); public static readonly int MAX_ARG_RECURSION = freeswitchPINVOKE.MAX_ARG_RECURSION_get(); public static readonly int SWITCH_API_VERSION = freeswitchPINVOKE.SWITCH_API_VERSION_get(); @@ -7150,7 +7187,7 @@ public class freeswitch { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -8021,6 +8058,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_storage_dir_get")] public static extern string switch_directories_storage_dir_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_cache_dir_set")] + public static extern void switch_directories_cache_dir_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_cache_dir_get")] + public static extern string switch_directories_cache_dir_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_directories_recordings_dir_set")] public static extern void switch_directories_recordings_dir_set(HandleRef jarg1, string jarg2); @@ -8585,6 +8628,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_MEDIA_TYPE_TOTAL_get")] public static extern int SWITCH_MEDIA_TYPE_TOTAL_get(); + [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_SOCK_INVALID_get")] + public static extern int SWITCH_SOCK_INVALID_get(); + [DllImport("mod_managed", EntryPoint="CSharp_switch_console_callback_match_node_val_set")] public static extern void switch_console_callback_match_node_val_set(HandleRef jarg1, string jarg2); @@ -8942,6 +8988,30 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_delete_payload_map_t")] public static extern void delete_payload_map_t(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_sock_set")] + public static extern void switch_waitlist_t_sock_set(HandleRef jarg1, int jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_sock_get")] + public static extern int switch_waitlist_t_sock_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_events_set")] + public static extern void switch_waitlist_t_events_set(HandleRef jarg1, uint jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_events_get")] + public static extern uint switch_waitlist_t_events_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_revents_set")] + public static extern void switch_waitlist_t_revents_set(HandleRef jarg1, uint jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_waitlist_t_revents_get")] + public static extern uint switch_waitlist_t_revents_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_new_switch_waitlist_t")] + public static extern IntPtr new_switch_waitlist_t(); + + [DllImport("mod_managed", EntryPoint="CSharp_delete_switch_waitlist_t")] + public static extern void delete_switch_waitlist_t(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_core_db_close")] public static extern int switch_core_db_close(HandleRef jarg1); @@ -11711,6 +11781,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_find_end_paren")] public static extern string switch_find_end_paren(string jarg1, char jarg2, char jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_separate_file_params")] + public static extern void switch_separate_file_params(string jarg1, ref string jarg2, ref string jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_is_file_path")] public static extern int switch_is_file_path(string jarg1); @@ -11774,6 +11847,144 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_strerror_r")] public static extern string switch_strerror_r(int jarg1, string jarg2, HandleRef jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_switch_wait_sock")] + public static extern int switch_wait_sock(int jarg1, uint jarg2, int jarg3); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_wait_socklist")] + public static extern int switch_wait_socklist(HandleRef jarg1, uint jarg2, uint jarg3); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_method_set")] + public static extern void switch_http_request_t_method_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_method_get")] + public static extern string switch_http_request_t_method_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_uri_set")] + public static extern void switch_http_request_t_uri_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_uri_get")] + public static extern string switch_http_request_t_uri_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_qs_set")] + public static extern void switch_http_request_t_qs_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_qs_get")] + public static extern string switch_http_request_t_qs_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_host_set")] + public static extern void switch_http_request_t_host_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_host_get")] + public static extern string switch_http_request_t_host_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_port_set")] + public static extern void switch_http_request_t_port_set(HandleRef jarg1, ushort jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_port_get")] + public static extern ushort switch_http_request_t_port_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_from_set")] + public static extern void switch_http_request_t_from_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_from_get")] + public static extern string switch_http_request_t_from_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_agent_set")] + public static extern void switch_http_request_t_user_agent_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_agent_get")] + public static extern string switch_http_request_t_user_agent_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_referer_set")] + public static extern void switch_http_request_t_referer_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_referer_get")] + public static extern string switch_http_request_t_referer_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_set")] + public static extern void switch_http_request_t_user_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_get")] + public static extern string switch_http_request_t_user_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_keepalive_set")] + public static extern void switch_http_request_t_keepalive_set(HandleRef jarg1, int jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_keepalive_get")] + public static extern int switch_http_request_t_keepalive_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_content_type_set")] + public static extern void switch_http_request_t_content_type_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_content_type_get")] + public static extern string switch_http_request_t_content_type_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_content_length_set")] + public static extern void switch_http_request_t_content_length_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_content_length_get")] + public static extern IntPtr switch_http_request_t_content_length_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_header_set")] + public static extern void switch_http_request_t_bytes_header_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_header_get")] + public static extern IntPtr switch_http_request_t_bytes_header_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_read_set")] + public static extern void switch_http_request_t_bytes_read_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_read_get")] + public static extern IntPtr switch_http_request_t_bytes_read_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_buffered_set")] + public static extern void switch_http_request_t_bytes_buffered_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_bytes_buffered_get")] + public static extern IntPtr switch_http_request_t_bytes_buffered_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_headers_set")] + public static extern void switch_http_request_t_headers_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_headers_get")] + public static extern IntPtr switch_http_request_t_headers_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_data_set")] + public static extern void switch_http_request_t_user_data_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t_user_data_get")] + public static extern IntPtr switch_http_request_t_user_data_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t__buffer_set")] + public static extern void switch_http_request_t__buffer_set(HandleRef jarg1, string jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t__buffer_get")] + public static extern string switch_http_request_t__buffer_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t__destroy_headers_set")] + public static extern void switch_http_request_t__destroy_headers_set(HandleRef jarg1, int jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_request_t__destroy_headers_get")] + public static extern int switch_http_request_t__destroy_headers_get(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_new_switch_http_request_t")] + public static extern IntPtr new_switch_http_request_t(); + + [DllImport("mod_managed", EntryPoint="CSharp_delete_switch_http_request_t")] + public static extern void delete_switch_http_request_t(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_parse_header")] + public static extern int switch_http_parse_header(string jarg1, uint jarg2, HandleRef jarg3); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_free_request")] + public static extern void switch_http_free_request(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_dump_request")] + public static extern void switch_http_dump_request(HandleRef jarg1); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_http_parse_qs")] + public static extern void switch_http_parse_qs(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_profile_node_t_var_set")] public static extern void profile_node_t_var_set(HandleRef jarg1, string jarg2); @@ -12371,6 +12582,12 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_delete_switch_state_handler_table")] public static extern void delete_switch_state_handler_table(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_stream_handle_read_function_set")] + public static extern void switch_stream_handle_read_function_set(HandleRef jarg1, HandleRef jarg2); + + [DllImport("mod_managed", EntryPoint="CSharp_switch_stream_handle_read_function_get")] + public static extern IntPtr switch_stream_handle_read_function_get(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_stream_handle_write_function_set")] public static extern void switch_stream_handle_write_function_set(HandleRef jarg1, HandleRef jarg2); @@ -16070,6 +16287,9 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_uuid_force_exists")] public static extern int switch_ivr_uuid_force_exists(string jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_is_parsing")] + public static extern int switch_ivr_dmachine_is_parsing(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_switch_ivr_dmachine_last_ping")] public static extern int switch_ivr_dmachine_last_ping(HandleRef jarg1); @@ -17504,9 +17724,15 @@ class freeswitchPINVOKE { [DllImport("mod_managed", EntryPoint="CSharp_delete_Stream")] public static extern void delete_Stream(HandleRef jarg1); + [DllImport("mod_managed", EntryPoint="CSharp_Stream_read")] + public static extern string Stream_read(HandleRef jarg1, HandleRef jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_Stream_Write")] public static extern void Stream_Write(HandleRef jarg1, string jarg2); + [DllImport("mod_managed", EntryPoint="CSharp_Stream_raw_write")] + public static extern void Stream_raw_write(HandleRef jarg1, string jarg2, int jarg3); + [DllImport("mod_managed", EntryPoint="CSharp_Stream_get_data")] public static extern string Stream_get_data(HandleRef jarg1); @@ -17871,7 +18097,7 @@ class freeswitchPINVOKE { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18030,7 +18256,7 @@ public class icand_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18046,7 +18272,7 @@ public enum ice_proto_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18157,7 +18383,7 @@ public class ice_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18249,7 +18475,7 @@ public class input_callback_state_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18320,7 +18546,7 @@ public class ip_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18377,7 +18603,7 @@ public class IvrMenu : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18431,7 +18657,7 @@ public partial class ManagedSession : CoreSession { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18721,7 +18947,7 @@ public class payload_map_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18801,7 +19027,7 @@ public class profile_node_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18818,7 +19044,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18865,10 +19091,19 @@ public partial class Stream : IDisposable { public Stream(switch_stream_handle arg0) : this(freeswitchPINVOKE.new_Stream__SWIG_1(switch_stream_handle.getCPtr(arg0)), true) { } + public string read(SWIGTYPE_p_int len) { + string ret = freeswitchPINVOKE.Stream_read(swigCPtr, SWIGTYPE_p_int.getCPtr(len)); + return ret; + } + public void Write(string data) { freeswitchPINVOKE.Stream_Write(swigCPtr, data); } + public void raw_write(string data, int len) { + freeswitchPINVOKE.Stream_raw_write(swigCPtr, data, len); + } + public string get_data() { string ret = freeswitchPINVOKE.Stream_get_data(swigCPtr); return ret; @@ -18879,7 +19114,7 @@ public partial class Stream : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18909,7 +19144,7 @@ public class SWIGTYPE_p_a_2__icand_s { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18939,7 +19174,7 @@ public class SWIGTYPE_p_apr_pool_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18969,7 +19204,7 @@ public class SWIGTYPE_p_cJSON { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -18999,7 +19234,7 @@ public class SWIGTYPE_p_FILE { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19029,7 +19264,7 @@ public class SWIGTYPE_p_float { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19059,7 +19294,7 @@ public class SWIGTYPE_p_f_p_char_enum_switch_management_action_t_p_char_switch_s } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19089,7 +19324,7 @@ public class SWIGTYPE_p_f_p_p_switch_loadable_module_interface_p_apr_pool_t__swi } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19119,7 +19354,7 @@ public class SWIGTYPE_p_f_p_q_const__char_p_cJSON_p_q_const__char_unsigned_long_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19149,7 +19384,7 @@ public class SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_p_switch_console_cal } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19179,7 +19414,7 @@ public class SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_q_const__char_p_q_co } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19209,7 +19444,7 @@ public class SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_unsigned_long__int { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19239,7 +19474,7 @@ public class SWIGTYPE_p_f_p_q_const__char_p_q_const__char_p_void__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19269,7 +19504,7 @@ public class SWIGTYPE_p_f_p_q_const__char_p_q_const__char__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19299,7 +19534,7 @@ public class SWIGTYPE_p_f_p_q_const__char_p_switch_codec_fmtp__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19329,7 +19564,7 @@ public class SWIGTYPE_p_f_p_q_const__char_p_switch_core_session_p_switch_stream_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19359,7 +19594,7 @@ public class SWIGTYPE_p_f_p_q_const__cJSON_p_switch_core_session_p_p_cJSON__swit } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19389,7 +19624,7 @@ public class SWIGTYPE_p_f_p_q_const__switch_log_node_t_enum_switch_log_level_t__ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19419,7 +19654,7 @@ public class SWIGTYPE_p_f_p_q_const__void_p_q_const__void_p_void__switch_bool_t } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19449,7 +19684,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_char_double__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19479,7 +19714,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_char_int__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19509,7 +19744,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_char_p_q_const__char__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19539,7 +19774,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_p_char_p_unsigned_long__switch_s } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19569,7 +19804,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_p_switch_event_p_unsigned_long__ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19599,7 +19834,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_q_const__char_int_p_q_const__cha } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19629,7 +19864,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_q_const__char_p_q_const__char__s } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19659,7 +19894,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_q_const__char__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19689,7 +19924,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_q_const__switch_dtmf_t_p_unsigne } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19719,7 +19954,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_unsigned_long__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19749,7 +19984,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle_p_void_unsigned_int_p_unsigned_lon } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19779,7 +20014,7 @@ public class SWIGTYPE_p_f_p_switch_asr_handle__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19809,7 +20044,7 @@ public class SWIGTYPE_p_f_p_switch_codec_p_switch_codec_p_void_unsigned_long_uns } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19839,7 +20074,7 @@ public class SWIGTYPE_p_f_p_switch_codec__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19869,7 +20104,7 @@ public class SWIGTYPE_p_f_p_switch_codec_unsigned_long_p_q_const__switch_codec_s } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19899,7 +20134,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_enum_switch_channel_callstate_t_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19929,7 +20164,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_enum_switch_media_type_t__p_stfu } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19959,7 +20194,7 @@ public class SWIGTYPE_p_f_p_switch_core_session__int { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -19989,7 +20224,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_int__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20019,7 +20254,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_char_p_switch_say_args_t_p_p_c } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20049,7 +20284,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_char_p_switch_say_args_t_p_swi } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20079,7 +20314,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_p_switch_frame_unsigned_long_i } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20109,7 +20344,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_q_const__char_p_q_const__char_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20139,7 +20374,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_q_const__char_p_q_const__char_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20169,7 +20404,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_q_const__char_p_q_const__char_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20199,7 +20434,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_q_const__char__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20229,7 +20464,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_q_const__switch_dtmf_t_enum_sw } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20259,7 +20494,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_q_const__switch_dtmf_t__switch } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20289,7 +20524,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_switch_core_session_message__s } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20319,7 +20554,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_switch_event_p_switch_caller_p } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20349,7 +20584,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_switch_event_p_switch_caller_p } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20379,7 +20614,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_switch_event__switch_status_t } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20409,7 +20644,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_switch_frame_p_void__switch_st } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20439,7 +20674,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_switch_frame_unsigned_long_int } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20469,7 +20704,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_void_enum_switch_input_type_t_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20499,7 +20734,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_p_void__p_void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20529,7 +20764,7 @@ public class SWIGTYPE_p_f_p_switch_core_session__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20559,7 +20794,7 @@ public class SWIGTYPE_p_f_p_switch_core_session_t_p_void_p_switch_caller_profile } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20589,7 +20824,7 @@ public class SWIGTYPE_p_f_p_switch_directory_handle_p_char_p_char_p_char__switch } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20619,7 +20854,7 @@ public class SWIGTYPE_p_f_p_switch_directory_handle_p_char_p_char__switch_status } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20649,7 +20884,7 @@ public class SWIGTYPE_p_f_p_switch_directory_handle_p_p_char_p_p_char__switch_st } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20679,7 +20914,7 @@ public class SWIGTYPE_p_f_p_switch_directory_handle__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20709,7 +20944,7 @@ public class SWIGTYPE_p_f_p_switch_event_p_q_const__char__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20739,7 +20974,7 @@ public class SWIGTYPE_p_f_p_switch_event__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20769,7 +21004,7 @@ public class SWIGTYPE_p_f_p_switch_event__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20799,7 +21034,7 @@ public class SWIGTYPE_p_f_p_switch_file_handle_enum_switch_audio_col_t_p_p_q_con } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20829,7 +21064,7 @@ public class SWIGTYPE_p_f_p_switch_file_handle_enum_switch_audio_col_t_p_q_const } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20859,7 +21094,7 @@ public class SWIGTYPE_p_f_p_switch_file_handle_long_long__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20889,7 +21124,7 @@ public class SWIGTYPE_p_f_p_switch_file_handle_p_q_const__char__switch_status_t } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20919,7 +21154,7 @@ public class SWIGTYPE_p_f_p_switch_file_handle_p_unsigned_int_long_long_int__swi } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20949,7 +21184,7 @@ public class SWIGTYPE_p_f_p_switch_file_handle_p_void_p_switch_size_t__switch_st } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -20979,7 +21214,7 @@ public class SWIGTYPE_p_f_p_switch_file_handle__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21009,7 +21244,7 @@ public class SWIGTYPE_p_f_p_switch_ivr_dmachine_match__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21039,7 +21274,7 @@ public class SWIGTYPE_p_f_p_switch_ivr_menu_p_char_p_char_size_t_p_void__switch_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21069,7 +21304,7 @@ public class SWIGTYPE_p_f_p_switch_live_array_s_p_q_const__char_p_q_const__char_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21099,7 +21334,7 @@ public class SWIGTYPE_p_f_p_switch_media_bug_p_void_enum_switch_abc_type_t__swit } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21129,7 +21364,7 @@ public class SWIGTYPE_p_f_p_switch_media_bug_p_void__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21159,7 +21394,7 @@ public class SWIGTYPE_p_f_p_switch_rtp_p_switch_socket_t_p_void_switch_size_t_p_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21189,7 +21424,7 @@ public class SWIGTYPE_p_f_p_switch_scheduler_task__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21219,7 +21454,7 @@ public class SWIGTYPE_p_f_p_switch_speech_handle_p_char_double__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21249,7 +21484,7 @@ public class SWIGTYPE_p_f_p_switch_speech_handle_p_char_int__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21279,7 +21514,7 @@ public class SWIGTYPE_p_f_p_switch_speech_handle_p_char_p_q_const__char__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21309,7 +21544,7 @@ public class SWIGTYPE_p_f_p_switch_speech_handle_p_char_p_unsigned_long__switch_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21339,7 +21574,7 @@ public class SWIGTYPE_p_f_p_switch_speech_handle_p_q_const__char_int_int_p_unsig } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21369,7 +21604,7 @@ public class SWIGTYPE_p_f_p_switch_speech_handle_p_unsigned_long__switch_status_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21399,7 +21634,7 @@ public class SWIGTYPE_p_f_p_switch_speech_handle_p_void_p_switch_size_t_p_unsign } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21429,7 +21664,37 @@ public class SWIGTYPE_p_f_p_switch_speech_handle__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +namespace FreeSWITCH.Native { + +using System; +using System.Runtime.InteropServices; + +public class SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char { + private HandleRef swigCPtr; + + internal SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char(IntPtr cPtr, bool futureUse) { + swigCPtr = new HandleRef(this, cPtr); + } + + protected SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char() { + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + + internal static HandleRef getCPtr(SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } +} + +} +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21459,7 +21724,7 @@ public class SWIGTYPE_p_f_p_switch_stream_handle_p_q_const__char_v_______switch_ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21489,7 +21754,7 @@ public class SWIGTYPE_p_f_p_switch_stream_handle_p_unsigned_char_switch_size_t__ } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21519,7 +21784,7 @@ public class SWIGTYPE_p_f_p_switch_thread_t_p_void__p_void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21549,7 +21814,7 @@ public class SWIGTYPE_p_f_p_switch_timer_enum_switch_bool_t__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21579,7 +21844,7 @@ public class SWIGTYPE_p_f_p_switch_timer__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21609,7 +21874,7 @@ public class SWIGTYPE_p_f_p_void_int_p_p_char_p_p_char__int { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21639,7 +21904,7 @@ public class SWIGTYPE_p_f_p_void_p_q_const__char__int { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21669,7 +21934,7 @@ public class SWIGTYPE_p_f_p_void_p_switch_event__int { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21699,7 +21964,7 @@ public class SWIGTYPE_p_f_p_void__void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21729,7 +21994,7 @@ public class SWIGTYPE_p_f_uint8_t_p_p_q_const__char_p_void__p_switch_xml { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21759,7 +22024,7 @@ public class SWIGTYPE_p_f_void__p_char { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21789,7 +22054,7 @@ public class SWIGTYPE_p_f_void__switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21819,7 +22084,7 @@ public class SWIGTYPE_p_in6_addr { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21849,7 +22114,7 @@ public class SWIGTYPE_p_int { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21879,7 +22144,7 @@ public class SWIGTYPE_p_p_apr_pool_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21909,7 +22174,7 @@ public class SWIGTYPE_p_p_char { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21939,7 +22204,7 @@ public class SWIGTYPE_p_p_cJSON { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21969,7 +22234,7 @@ public class SWIGTYPE_p_pid_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -21999,7 +22264,7 @@ public class SWIGTYPE_p_p_payload_map_s { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22029,7 +22294,7 @@ public class SWIGTYPE_p_p_p_char { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22059,7 +22324,7 @@ public class SWIGTYPE_p_p_real_pcre { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22089,7 +22354,7 @@ public class SWIGTYPE_p_p_sqlite3 { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22119,7 +22384,7 @@ public class SWIGTYPE_p_p_sqlite3_stmt { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22149,7 +22414,7 @@ public class SWIGTYPE_p_p_switch_audio_resampler_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22179,7 +22444,7 @@ public class SWIGTYPE_p_p_switch_buffer { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22209,7 +22474,7 @@ public class SWIGTYPE_p_p_switch_cache_db_handle { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22239,7 +22504,7 @@ public class SWIGTYPE_p_p_switch_caller_extension { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22269,7 +22534,7 @@ public class SWIGTYPE_p_p_switch_channel { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22299,7 +22564,7 @@ public class SWIGTYPE_p_p_switch_codec_implementation { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22329,7 +22594,7 @@ public class SWIGTYPE_p_p_switch_console_callback_match { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22359,7 +22624,7 @@ public class SWIGTYPE_p_p_switch_core_port_allocator { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22389,7 +22654,7 @@ public class SWIGTYPE_p_p_switch_core_session { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22419,7 +22684,7 @@ public class SWIGTYPE_p_p_switch_core_session_message { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22449,7 +22714,7 @@ public class SWIGTYPE_p_p_switch_device_record_s { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22479,7 +22744,7 @@ public class SWIGTYPE_p_p_switch_event { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22509,7 +22774,7 @@ public class SWIGTYPE_p_p_switch_event_node { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22539,7 +22804,7 @@ public class SWIGTYPE_p_p_switch_file_handle { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22569,7 +22834,7 @@ public class SWIGTYPE_p_p_switch_frame { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22599,7 +22864,7 @@ public class SWIGTYPE_p_p_switch_hashtable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22629,7 +22894,7 @@ public class SWIGTYPE_p_p_switch_hashtable_iterator { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22659,7 +22924,7 @@ public class SWIGTYPE_p_p_switch_ivr_digit_stream { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22689,7 +22954,7 @@ public class SWIGTYPE_p_p_switch_ivr_digit_stream_parser { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22719,7 +22984,7 @@ public class SWIGTYPE_p_p_switch_ivr_dmachine { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22749,7 +23014,7 @@ public class SWIGTYPE_p_p_switch_ivr_dmachine_match { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22779,7 +23044,7 @@ public class SWIGTYPE_p_p_switch_ivr_menu { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22809,7 +23074,7 @@ public class SWIGTYPE_p_p_switch_ivr_menu_xml_ctx { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22839,7 +23104,7 @@ public class SWIGTYPE_p_p_switch_live_array_s { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22869,7 +23134,7 @@ public class SWIGTYPE_p_p_switch_log_node_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22899,7 +23164,7 @@ public class SWIGTYPE_p_p_switch_media_bug { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22929,7 +23194,7 @@ public class SWIGTYPE_p_p_switch_network_list { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22959,7 +23224,7 @@ public class SWIGTYPE_p_p_switch_rtp { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -22989,7 +23254,7 @@ public class SWIGTYPE_p_p_switch_say_file_handle { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23019,7 +23284,7 @@ public class SWIGTYPE_p_p_switch_sql_queue_manager { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23049,7 +23314,7 @@ public class SWIGTYPE_p_p_switch_thread_data_s { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23079,7 +23344,7 @@ public class SWIGTYPE_p_p_switch_xml_binding { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23109,7 +23374,7 @@ public class SWIGTYPE_p_p_switch_xml { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23139,7 +23404,7 @@ public class SWIGTYPE_p_p_void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23169,7 +23434,7 @@ public class SWIGTYPE_p_real_pcre { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23199,7 +23464,7 @@ public class SWIGTYPE_p_short { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23229,7 +23494,7 @@ public class SWIGTYPE_p_sockaddr { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23259,7 +23524,7 @@ public class SWIGTYPE_p_sockaddr_in6 { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23289,7 +23554,7 @@ public class SWIGTYPE_p_socklen_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23319,7 +23584,7 @@ public class SWIGTYPE_p_sqlite3 { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23349,7 +23614,7 @@ public class SWIGTYPE_p_sqlite3_stmt { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23379,7 +23644,7 @@ public class SWIGTYPE_p_stfu_instance_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23409,7 +23674,7 @@ public class SWIGTYPE_p_switch_buffer { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23439,7 +23704,7 @@ public class SWIGTYPE_p_switch_cache_db_handle { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23469,7 +23734,7 @@ public class SWIGTYPE_p_switch_call_cause_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23499,7 +23764,7 @@ public class SWIGTYPE_p_switch_channel { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23529,7 +23794,7 @@ public class SWIGTYPE_p_switch_core_port_allocator { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23559,7 +23824,7 @@ public class SWIGTYPE_p_switch_core_session { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23589,7 +23854,7 @@ public class SWIGTYPE_p_switch_event_types_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23619,7 +23884,7 @@ public class SWIGTYPE_p_switch_file_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23649,7 +23914,7 @@ public class SWIGTYPE_p_switch_hashtable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23679,7 +23944,7 @@ public class SWIGTYPE_p_switch_hashtable_iterator { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23709,7 +23974,7 @@ public class SWIGTYPE_p_switch_interval_time_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23739,7 +24004,7 @@ public class SWIGTYPE_p_switch_ivr_action_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23769,7 +24034,7 @@ public class SWIGTYPE_p_switch_ivr_digit_stream { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23799,7 +24064,7 @@ public class SWIGTYPE_p_switch_ivr_digit_stream_parser { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23829,7 +24094,7 @@ public class SWIGTYPE_p_switch_ivr_dmachine { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23859,7 +24124,7 @@ public class SWIGTYPE_p_switch_ivr_menu { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23889,7 +24154,7 @@ public class SWIGTYPE_p_switch_ivr_menu_xml_ctx { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23919,7 +24184,7 @@ public class SWIGTYPE_p_switch_live_array_s { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23949,7 +24214,7 @@ public class SWIGTYPE_p_switch_media_bug { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -23979,7 +24244,7 @@ public class SWIGTYPE_p_switch_mutex_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24009,7 +24274,7 @@ public class SWIGTYPE_p_switch_network_list { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24039,7 +24304,7 @@ public class SWIGTYPE_p_switch_odbc_handle { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24069,7 +24334,7 @@ public class SWIGTYPE_p_switch_pgsql_handle { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24099,7 +24364,7 @@ public class SWIGTYPE_p_switch_pollfd_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24129,7 +24394,7 @@ public class SWIGTYPE_p_switch_queue_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24159,7 +24424,7 @@ public class SWIGTYPE_p_switch_rtcp_frame { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24189,7 +24454,7 @@ public class SWIGTYPE_p_switch_rtp { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24219,7 +24484,7 @@ public class SWIGTYPE_p_switch_rtp_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24249,7 +24514,7 @@ public class SWIGTYPE_p_switch_say_file_handle { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24279,7 +24544,7 @@ public class SWIGTYPE_p_switch_size_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24309,7 +24574,7 @@ public class SWIGTYPE_p_switch_sockaddr_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24339,7 +24604,7 @@ public class SWIGTYPE_p_switch_socket_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24369,7 +24634,7 @@ public class SWIGTYPE_p_switch_sql_queue_manager { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24399,7 +24664,7 @@ public class SWIGTYPE_p_switch_ssize_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24429,7 +24694,7 @@ public class SWIGTYPE_p_switch_thread_rwlock_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24459,7 +24724,7 @@ public class SWIGTYPE_p_switch_thread_start_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24489,7 +24754,7 @@ public class SWIGTYPE_p_switch_time_exp_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24519,7 +24784,7 @@ public class SWIGTYPE_p_switch_time_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24549,7 +24814,7 @@ public class SWIGTYPE_p_switch_xml_binding { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24579,7 +24844,7 @@ public class SWIGTYPE_p_time_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24609,7 +24874,7 @@ public class SWIGTYPE_p_unsigned_char { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24639,7 +24904,7 @@ public class SWIGTYPE_p_unsigned_int { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24669,7 +24934,7 @@ public class SWIGTYPE_p_unsigned_long { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24699,7 +24964,7 @@ public class SWIGTYPE_p_unsigned_short { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24729,7 +24994,7 @@ public class SWIGTYPE_p_void { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24752,7 +25017,7 @@ public enum switch_abc_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24896,7 +25161,7 @@ public class switch_api_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -24916,7 +25181,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25080,7 +25345,7 @@ public class switch_application_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25172,7 +25437,7 @@ public class switch_app_log : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25192,7 +25457,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25399,7 +25664,7 @@ public class switch_asr_handle : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25710,7 +25975,7 @@ public class switch_asr_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25730,7 +25995,7 @@ public enum switch_audio_col_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25871,7 +26136,7 @@ public class switch_audio_resampler_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25893,7 +26158,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -25909,7 +26174,7 @@ public enum switch_bitpack_mode_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26090,7 +26355,7 @@ public class switch_bitpack_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26106,7 +26371,7 @@ public enum switch_bool_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26188,7 +26453,7 @@ public class switch_cache_db_connection_options_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26247,7 +26512,7 @@ public class switch_cache_db_core_db_options_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26264,7 +26529,7 @@ public enum switch_cache_db_handle_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26346,7 +26611,7 @@ public class switch_cache_db_native_handle_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26425,7 +26690,7 @@ public class switch_cache_db_odbc_options_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26484,7 +26749,7 @@ public class switch_cache_db_pgsql_options_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26568,7 +26833,7 @@ public enum switch_call_cause_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26584,7 +26849,7 @@ public enum switch_call_direction_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26675,7 +26940,7 @@ public class switch_caller_application : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26799,7 +27064,7 @@ public class switch_caller_extension : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27278,7 +27543,7 @@ public class switch_caller_profile : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27296,7 +27561,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27315,7 +27580,7 @@ public enum switch_channel_app_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27338,7 +27603,7 @@ public enum switch_channel_callstate_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27359,7 +27624,7 @@ public enum switch_channel_cap_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27496,7 +27761,7 @@ public enum switch_channel_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27524,7 +27789,7 @@ public enum switch_channel_state_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27716,7 +27981,7 @@ public class switch_channel_timetable : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27731,7 +27996,7 @@ public enum switch_chat_application_flag_enum_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -27895,7 +28160,7 @@ public class switch_chat_application_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28019,7 +28284,7 @@ public class switch_chat_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28196,7 +28461,7 @@ public class switch_codec : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28219,7 +28484,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28319,7 +28584,7 @@ public class switch_codec_fmtp : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28573,7 +28838,7 @@ public class switch_codec_implementation : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28718,7 +28983,7 @@ public class switch_codec_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28777,7 +29042,7 @@ public class switch_codec_settings : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28795,7 +29060,7 @@ public enum switch_codec_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -28935,7 +29200,7 @@ public class switch_config : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29026,7 +29291,7 @@ public class switch_console_callback_match : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29096,7 +29361,7 @@ public class switch_console_callback_match_node : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29136,7 +29401,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29153,7 +29418,7 @@ public enum switch_core_media_ice_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29395,7 +29660,7 @@ public class switch_core_session_message : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29412,7 +29677,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29475,7 +29740,7 @@ public enum switch_core_session_message_types_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29578,7 +29843,7 @@ public class switch_core_thread_session : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29697,7 +29962,7 @@ public class switch_core_time_duration : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29842,7 +30107,7 @@ public class switch_device_node_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30114,7 +30379,7 @@ public class switch_device_record_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30135,7 +30400,7 @@ public enum switch_device_state_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30434,7 +30699,7 @@ public class switch_device_stats_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30558,7 +30823,7 @@ public class switch_dialplan_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30575,7 +30840,7 @@ public enum switch_digit_action_target_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30726,6 +30991,16 @@ public class switch_directories : IDisposable { } } + public string cache_dir { + set { + freeswitchPINVOKE.switch_directories_cache_dir_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_directories_cache_dir_get(swigCPtr); + return ret; + } + } + public string recordings_dir { set { freeswitchPINVOKE.switch_directories_recordings_dir_set(swigCPtr, value); @@ -30774,7 +31049,7 @@ public class switch_directories : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30789,7 +31064,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30881,7 +31156,7 @@ public class switch_directory_handle : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31049,7 +31324,7 @@ public class switch_directory_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31065,7 +31340,7 @@ public enum switch_dtmf_direction_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31084,7 +31359,7 @@ public enum switch_dtmf_source_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31173,7 +31448,7 @@ public class switch_dtmf_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31192,7 +31467,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31349,7 +31624,7 @@ public class switch_endpoint_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31523,7 +31798,7 @@ public class switch_event : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31540,7 +31815,7 @@ public enum switch_event_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31649,7 +31924,7 @@ public class switch_event_header : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31753,7 +32028,7 @@ public enum switch_event_types_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -31786,7 +32061,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -32297,7 +32572,7 @@ public class switch_file_handle : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -32529,7 +32804,7 @@ public class switch_file_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -32588,7 +32863,7 @@ public class switch_filenames : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -32835,7 +33110,7 @@ public class switch_frame : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -32861,7 +33136,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -32955,7 +33230,256 @@ public class switch_hold_record_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +namespace FreeSWITCH.Native { + +using System; +using System.Runtime.InteropServices; + +public class switch_http_request_t : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal switch_http_request_t(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(switch_http_request_t obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~switch_http_request_t() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + freeswitchPINVOKE.delete_switch_http_request_t(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + } + } + + public string method { + set { + freeswitchPINVOKE.switch_http_request_t_method_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_method_get(swigCPtr); + return ret; + } + } + + public string uri { + set { + freeswitchPINVOKE.switch_http_request_t_uri_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_uri_get(swigCPtr); + return ret; + } + } + + public string qs { + set { + freeswitchPINVOKE.switch_http_request_t_qs_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_qs_get(swigCPtr); + return ret; + } + } + + public string host { + set { + freeswitchPINVOKE.switch_http_request_t_host_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_host_get(swigCPtr); + return ret; + } + } + + public ushort port { + set { + freeswitchPINVOKE.switch_http_request_t_port_set(swigCPtr, value); + } + get { + ushort ret = freeswitchPINVOKE.switch_http_request_t_port_get(swigCPtr); + return ret; + } + } + + public string from { + set { + freeswitchPINVOKE.switch_http_request_t_from_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_from_get(swigCPtr); + return ret; + } + } + + public string user_agent { + set { + freeswitchPINVOKE.switch_http_request_t_user_agent_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_user_agent_get(swigCPtr); + return ret; + } + } + + public string referer { + set { + freeswitchPINVOKE.switch_http_request_t_referer_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_referer_get(swigCPtr); + return ret; + } + } + + public string user { + set { + freeswitchPINVOKE.switch_http_request_t_user_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_user_get(swigCPtr); + return ret; + } + } + + public switch_bool_t keepalive { + set { + freeswitchPINVOKE.switch_http_request_t_keepalive_set(swigCPtr, (int)value); + } + get { + switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_http_request_t_keepalive_get(swigCPtr); + return ret; + } + } + + public string content_type { + set { + freeswitchPINVOKE.switch_http_request_t_content_type_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t_content_type_get(swigCPtr); + return ret; + } + } + + public SWIGTYPE_p_switch_size_t content_length { + set { + freeswitchPINVOKE.switch_http_request_t_content_length_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + } + get { + SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_http_request_t_content_length_get(swigCPtr), true); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SWIGTYPE_p_switch_size_t bytes_header { + set { + freeswitchPINVOKE.switch_http_request_t_bytes_header_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + } + get { + SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_http_request_t_bytes_header_get(swigCPtr), true); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SWIGTYPE_p_switch_size_t bytes_read { + set { + freeswitchPINVOKE.switch_http_request_t_bytes_read_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + } + get { + SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_http_request_t_bytes_read_get(swigCPtr), true); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SWIGTYPE_p_switch_size_t bytes_buffered { + set { + freeswitchPINVOKE.switch_http_request_t_bytes_buffered_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value)); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + } + get { + SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_http_request_t_bytes_buffered_get(swigCPtr), true); + if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public switch_event headers { + set { + freeswitchPINVOKE.switch_http_request_t_headers_set(swigCPtr, switch_event.getCPtr(value)); + } + get { + IntPtr cPtr = freeswitchPINVOKE.switch_http_request_t_headers_get(swigCPtr); + switch_event ret = (cPtr == IntPtr.Zero) ? null : new switch_event(cPtr, false); + return ret; + } + } + + public SWIGTYPE_p_void user_data { + set { + freeswitchPINVOKE.switch_http_request_t_user_data_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value)); + } + get { + IntPtr cPtr = freeswitchPINVOKE.switch_http_request_t_user_data_get(swigCPtr); + SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false); + return ret; + } + } + + public string _buffer { + set { + freeswitchPINVOKE.switch_http_request_t__buffer_set(swigCPtr, value); + } + get { + string ret = freeswitchPINVOKE.switch_http_request_t__buffer_get(swigCPtr); + return ret; + } + } + + public switch_bool_t _destroy_headers { + set { + freeswitchPINVOKE.switch_http_request_t__destroy_headers_set(swigCPtr, (int)value); + } + get { + switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_http_request_t__destroy_headers_get(swigCPtr); + return ret; + } + } + + public switch_http_request_t() : this(freeswitchPINVOKE.new_switch_http_request_t(), true) { + } + +} + +} +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -32972,7 +33496,7 @@ public enum switch_hup_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33096,7 +33620,7 @@ public class switch_input_args_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33112,7 +33636,7 @@ public enum switch_input_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33183,7 +33707,7 @@ public class switch_io_event_hook_kill_channel : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33254,7 +33778,7 @@ public class switch_io_event_hook_outgoing_channel : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33325,7 +33849,7 @@ public class switch_io_event_hook_read_frame : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33396,7 +33920,7 @@ public class switch_io_event_hook_receive_event : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33467,7 +33991,7 @@ public class switch_io_event_hook_receive_message : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33538,7 +34062,7 @@ public class switch_io_event_hook_recv_dtmf : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33719,7 +34243,7 @@ public class switch_io_event_hooks : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33790,7 +34314,7 @@ public class switch_io_event_hook_send_dtmf : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33861,7 +34385,7 @@ public class switch_io_event_hook_state_change : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33932,7 +34456,7 @@ public class switch_io_event_hook_state_run : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34003,7 +34527,7 @@ public class switch_io_event_hook_video_read_frame : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34074,7 +34598,7 @@ public class switch_io_event_hook_video_write_frame : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34145,7 +34669,7 @@ public class switch_io_event_hook_write_frame : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34162,7 +34686,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34187,7 +34711,7 @@ public enum switch_io_routine_name_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34379,7 +34903,7 @@ public class switch_io_routines : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34400,7 +34924,7 @@ public enum switch_ivr_action_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34501,7 +35025,7 @@ public class switch_ivr_dmachine_match : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34518,7 +35042,7 @@ public enum switch_ivr_menu_flags { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34535,7 +35059,7 @@ public enum switch_ivr_option_enum_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34679,7 +35203,7 @@ public class switch_json_api_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34858,7 +35382,7 @@ public class switch_limit_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -34960,7 +35484,7 @@ public class switch_loadable_module_function_table_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35227,7 +35751,7 @@ public class switch_loadable_module_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35261,7 +35785,7 @@ public enum switch_log_level_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35412,7 +35936,7 @@ public class switch_log_node_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35429,7 +35953,7 @@ public enum switch_management_action_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35553,7 +36077,7 @@ public class switch_management_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35585,7 +36109,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35609,7 +36133,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35625,7 +36149,7 @@ public enum switch_media_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35641,7 +36165,7 @@ public enum switch_module_flag_enum_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35671,7 +36195,7 @@ public enum switch_module_interface_name_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35693,7 +36217,29 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 + * + * 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 switch_poll_t { + SWITCH_POLL_READ = (1 << 0), + SWITCH_POLL_WRITE = (1 << 1), + SWITCH_POLL_ERROR = (1 << 2), + SWITCH_POLL_HUP = (1 << 3), + SWITCH_POLL_RDNORM = (1 << 4), + SWITCH_POLL_RDBAND = (1 << 5), + SWITCH_POLL_PRI = (1 << 6), + SWITCH_POLL_INVALID = (1 << 7) +} + +} +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35712,7 +36258,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35729,7 +36275,7 @@ public enum switch_priority_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35745,7 +36291,7 @@ public enum switch_pvt_class_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35762,7 +36308,7 @@ public enum switch_ring_ready_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35861,7 +36407,7 @@ public class switch_rtcp_hdr_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35940,7 +36486,7 @@ public class switch_rtcp_numbers_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35967,7 +36513,7 @@ public enum switch_rtp_bug_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -35986,7 +36532,7 @@ public enum switch_rtp_crypto_direction_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36089,7 +36635,7 @@ public class switch_rtp_crypto_key : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36113,7 +36659,7 @@ public enum switch_rtp_crypto_key_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36167,7 +36713,7 @@ public enum switch_rtp_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36184,7 +36730,7 @@ public enum switch_rtp_flush_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36253,7 +36799,7 @@ public class switch_rtp_hdr_ext_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36392,7 +36938,7 @@ public class switch_rtp_hdr_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36768,7 +37314,7 @@ public class switch_rtp_numbers_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36860,7 +37406,7 @@ public class switch_rtp_stats_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36949,7 +37495,7 @@ public class switch_say_args_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -36967,7 +37513,7 @@ public enum switch_say_gender_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37102,7 +37648,7 @@ public class switch_say_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37121,7 +37667,7 @@ public enum switch_say_method_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37154,7 +37700,7 @@ public enum switch_say_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37172,7 +37718,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37302,7 +37848,7 @@ public class switch_scheduler_task : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37318,7 +37864,7 @@ public enum switch_sdp_type_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37387,7 +37933,7 @@ public class switch_serial_event_header_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37496,7 +38042,7 @@ public class switch_serial_event_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37553,7 +38099,7 @@ public enum switch_session_ctl_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37571,7 +38117,7 @@ public enum switch_signal_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37663,7 +38209,7 @@ public class switch_slin_data : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37685,7 +38231,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -37932,7 +38478,7 @@ public class switch_speech_handle : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38133,7 +38679,7 @@ public class switch_speech_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38212,7 +38758,7 @@ public class switch_srtp_crypto_suite_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38231,7 +38777,7 @@ public enum switch_stack_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38246,7 +38792,7 @@ public enum switch_state_handler_flag_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38272,7 +38818,7 @@ public enum switch_state_handler_name_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38474,7 +39020,7 @@ public class switch_state_handler_table : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38513,7 +39059,7 @@ public enum switch_status_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38554,6 +39100,17 @@ public class switch_stream_handle : IDisposable { } } + public SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char read_function { + set { + freeswitchPINVOKE.switch_stream_handle_read_function_set(swigCPtr, SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char.getCPtr(value)); + } + get { + IntPtr cPtr = freeswitchPINVOKE.switch_stream_handle_read_function_get(swigCPtr); + SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_f_p_switch_stream_handle_p_int__p_unsigned_char(cPtr, false); + return ret; + } + } + public SWIGTYPE_p_f_p_switch_stream_handle_p_q_const__char_v_______switch_status_t write_function { set { freeswitchPINVOKE.switch_stream_handle_write_function_set(swigCPtr, SWIGTYPE_p_f_p_switch_stream_handle_p_q_const__char_v_______switch_status_t.getCPtr(value)); @@ -38665,7 +39222,7 @@ public class switch_stream_handle : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38864,7 +39421,7 @@ public class switch_t38_options_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38882,7 +39439,7 @@ public enum switch_text_channel_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38975,7 +39532,7 @@ public class switch_thread_data_t : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -38993,7 +39550,7 @@ public enum switch_thread_priority_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39139,7 +39696,7 @@ public class switch_timer : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39154,7 +39711,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39174,7 +39731,7 @@ public enum switch_timer_func_name_t { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39353,7 +39910,7 @@ public class switch_timer_interface : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39570,7 +40127,7 @@ public class switch_unicast_conninfo : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39588,7 +40145,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39605,7 +40162,7 @@ public enum switch_uri_flags { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39623,7 +40180,86 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +namespace FreeSWITCH.Native { + +using System; +using System.Runtime.InteropServices; + +public class switch_waitlist_t : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal switch_waitlist_t(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(switch_waitlist_t obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~switch_waitlist_t() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + freeswitchPINVOKE.delete_switch_waitlist_t(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + } + } + + public int sock { + set { + freeswitchPINVOKE.switch_waitlist_t_sock_set(swigCPtr, value); + } + get { + int ret = freeswitchPINVOKE.switch_waitlist_t_sock_get(swigCPtr); + return ret; + } + } + + public uint events { + set { + freeswitchPINVOKE.switch_waitlist_t_events_set(swigCPtr, value); + } + get { + uint ret = freeswitchPINVOKE.switch_waitlist_t_events_get(swigCPtr); + return ret; + } + } + + public uint revents { + set { + freeswitchPINVOKE.switch_waitlist_t_revents_set(swigCPtr, value); + } + get { + uint ret = freeswitchPINVOKE.switch_waitlist_t_revents_get(swigCPtr); + return ret; + } + } + + public switch_waitlist_t() : this(freeswitchPINVOKE.new_switch_waitlist_t(), true) { + } + +} + +} +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39808,7 +40444,7 @@ public class switch_xml : IDisposable { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -39826,7 +40462,7 @@ namespace FreeSWITCH.Native { } /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.12 + * Version 2.0.7 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/src/mod/languages/mod_managed/mod_managed.2010.vcxproj b/src/mod/languages/mod_managed/mod_managed.2010.vcxproj index ee1f7d7e96..4bd631a6f4 100644 --- a/src/mod/languages/mod_managed/mod_managed.2010.vcxproj +++ b/src/mod/languages/mod_managed/mod_managed.2010.vcxproj @@ -306,7 +306,12 @@ - + + 4505;4244;%(DisableSpecificWarnings) + 4505;4244;%(DisableSpecificWarnings) + 4505;4244;%(DisableSpecificWarnings) + 4505;4244;%(DisableSpecificWarnings) + diff --git a/src/mod/languages/mod_managed/mod_managed.2012.vcxproj b/src/mod/languages/mod_managed/mod_managed.2012.vcxproj index 9d35cafdab..30d2d5ac1a 100644 --- a/src/mod/languages/mod_managed/mod_managed.2012.vcxproj +++ b/src/mod/languages/mod_managed/mod_managed.2012.vcxproj @@ -322,7 +322,12 @@ - + + 4505;4244;%(DisableSpecificWarnings) + 4505;4244;%(DisableSpecificWarnings) + 4505;4244;%(DisableSpecificWarnings) + 4505;4244;%(DisableSpecificWarnings) + @@ -343,4 +348,4 @@ - + \ No newline at end of file diff --git a/src/mod/languages/mod_perl/.gitattributes b/src/mod/languages/mod_perl/.gitattributes index c53f2c274e..aea1c342bf 100644 --- a/src/mod/languages/mod_perl/.gitattributes +++ b/src/mod/languages/mod_perl/.gitattributes @@ -1 +1,2 @@ mod_perl_wrap.cpp -diff +freeswitch.pm -diff diff --git a/src/mod/languages/mod_perl/freeswitch.pm b/src/mod/languages/mod_perl/freeswitch.pm index c8e57832b1..f8b56f02bc 100644 --- a/src/mod/languages/mod_perl/freeswitch.pm +++ b/src/mod/languages/mod_perl/freeswitch.pm @@ -252,7 +252,9 @@ sub DESTROY { } } +*read = *freeswitchc::Stream_read; *write = *freeswitchc::Stream_write; +*raw_write = *freeswitchc::Stream_raw_write; *get_data = *freeswitchc::Stream_get_data; sub DISOWN { my $self = shift; diff --git a/src/mod/languages/mod_perl/mod_perl_wrap.cpp b/src/mod/languages/mod_perl/mod_perl_wrap.cpp index dfaebd8aa7..8784ad7060 100644 --- a/src/mod/languages/mod_perl/mod_perl_wrap.cpp +++ b/src/mod/languages/mod_perl/mod_perl_wrap.cpp @@ -1457,25 +1457,26 @@ SWIG_Perl_SetModule(swig_module_info *module) { #define SWIGTYPE_p_Stream swig_types[8] #define SWIGTYPE_p_char swig_types[9] #define SWIGTYPE_p_input_callback_state swig_types[10] -#define SWIGTYPE_p_p_switch_event_node_t swig_types[11] -#define SWIGTYPE_p_session_flag_t swig_types[12] -#define SWIGTYPE_p_switch_call_cause_t swig_types[13] -#define SWIGTYPE_p_switch_channel_state_t swig_types[14] -#define SWIGTYPE_p_switch_channel_t swig_types[15] -#define SWIGTYPE_p_switch_core_session_t swig_types[16] -#define SWIGTYPE_p_switch_event_t swig_types[17] -#define SWIGTYPE_p_switch_event_types_t swig_types[18] -#define SWIGTYPE_p_switch_input_args_t swig_types[19] -#define SWIGTYPE_p_switch_input_type_t swig_types[20] -#define SWIGTYPE_p_switch_priority_t swig_types[21] -#define SWIGTYPE_p_switch_queue_t swig_types[22] -#define SWIGTYPE_p_switch_state_handler_table_t swig_types[23] -#define SWIGTYPE_p_switch_status_t swig_types[24] -#define SWIGTYPE_p_switch_stream_handle_t swig_types[25] -#define SWIGTYPE_p_uint32_t swig_types[26] -#define SWIGTYPE_p_void swig_types[27] -static swig_type_info *swig_types[29]; -static swig_module_info swig_module = {swig_types, 28, 0, 0, 0, 0}; +#define SWIGTYPE_p_int swig_types[11] +#define SWIGTYPE_p_p_switch_event_node_t swig_types[12] +#define SWIGTYPE_p_session_flag_t swig_types[13] +#define SWIGTYPE_p_switch_call_cause_t swig_types[14] +#define SWIGTYPE_p_switch_channel_state_t swig_types[15] +#define SWIGTYPE_p_switch_channel_t swig_types[16] +#define SWIGTYPE_p_switch_core_session_t swig_types[17] +#define SWIGTYPE_p_switch_event_t swig_types[18] +#define SWIGTYPE_p_switch_event_types_t swig_types[19] +#define SWIGTYPE_p_switch_input_args_t swig_types[20] +#define SWIGTYPE_p_switch_input_type_t swig_types[21] +#define SWIGTYPE_p_switch_priority_t swig_types[22] +#define SWIGTYPE_p_switch_queue_t swig_types[23] +#define SWIGTYPE_p_switch_state_handler_table_t swig_types[24] +#define SWIGTYPE_p_switch_status_t swig_types[25] +#define SWIGTYPE_p_switch_stream_handle_t swig_types[26] +#define SWIGTYPE_p_uint32_t swig_types[27] +#define SWIGTYPE_p_void swig_types[28] +static swig_type_info *swig_types[30]; +static swig_module_info swig_module = {swig_types, 29, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3399,6 +3400,44 @@ XS(_wrap_delete_Stream) { } +XS(_wrap_Stream_read) { + { + Stream *arg1 = (Stream *) 0 ; + int *arg2 = (int *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Stream_read(self,len);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Stream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_read" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stream_read" "', argument " "2"" of type '" "int *""'"); + } + arg2 = reinterpret_cast< int * >(argp2); + result = (char *)(arg1)->read(arg2); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + XS(_wrap_Stream_write) { { Stream *arg1 = (Stream *) 0 ; @@ -3437,6 +3476,54 @@ XS(_wrap_Stream_write) { } +XS(_wrap_Stream_raw_write) { + { + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Stream_raw_write(self,data,len);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Stream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_raw_write" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stream_raw_write" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Stream_raw_write" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + (arg1)->raw_write((char const *)arg2,arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + SWIG_croak_null(); + } +} + + XS(_wrap_Stream_get_data) { { Stream *arg1 = (Stream *) 0 ; @@ -9907,6 +9994,7 @@ static swig_type_info _swigt__p_PerlInterpreter = {"_p_PerlInterpreter", "PerlIn static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)"freeswitch::Stream", 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)"freeswitch::input_callback_state_t", 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_switch_event_node_t = {"_p_p_switch_event_node_t", "switch_event_node_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_switch_call_cause_t = {"_p_switch_call_cause_t", "switch_call_cause_t *", 0, 0, (void*)0, 0}; @@ -9937,6 +10025,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Stream, &_swigt__p_char, &_swigt__p_input_callback_state, + &_swigt__p_int, &_swigt__p_p_switch_event_node_t, &_swigt__p_session_flag_t, &_swigt__p_switch_call_cause_t, @@ -9967,6 +10056,7 @@ static swig_cast_info _swigc__p_PerlInterpreter[] = { {&_swigt__p_PerlInterpret static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_switch_event_node_t[] = { {&_swigt__p_p_switch_event_node_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_switch_call_cause_t[] = { {&_swigt__p_switch_call_cause_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -9997,6 +10087,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Stream, _swigc__p_char, _swigc__p_input_callback_state, + _swigc__p_int, _swigc__p_p_switch_event_node_t, _swigc__p_session_flag_t, _swigc__p_switch_call_cause_t, @@ -10063,7 +10154,9 @@ static swig_command_info swig_commands[] = { {"freeswitchc::delete_DTMF", _wrap_delete_DTMF}, {"freeswitchc::new_Stream", _wrap_new_Stream}, {"freeswitchc::delete_Stream", _wrap_delete_Stream}, +{"freeswitchc::Stream_read", _wrap_Stream_read}, {"freeswitchc::Stream_write", _wrap_Stream_write}, +{"freeswitchc::Stream_raw_write", _wrap_Stream_raw_write}, {"freeswitchc::Stream_get_data", _wrap_Stream_get_data}, {"freeswitchc::Event_event_set", _wrap_Event_event_set}, {"freeswitchc::Event_event_get", _wrap_Event_event_get}, @@ -10500,17 +10593,17 @@ XS(SWIG_init) { SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu"); SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API"); SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t"); - /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { + /*@SWIG://share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { + /*@SWIG://share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { + /*@SWIG://share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK))); SvREADONLY_on(sv); diff --git a/src/mod/languages/mod_python/.gitattributes b/src/mod/languages/mod_python/.gitattributes index 3ce06f18c5..98d05d51d6 100644 --- a/src/mod/languages/mod_python/.gitattributes +++ b/src/mod/languages/mod_python/.gitattributes @@ -1 +1,2 @@ mod_python_wrap.cpp -diff +freeswitch.py -diff diff --git a/src/mod/languages/mod_python/freeswitch.py b/src/mod/languages/mod_python/freeswitch.py index 0420994ea7..e2831b47db 100644 --- a/src/mod/languages/mod_python/freeswitch.py +++ b/src/mod/languages/mod_python/freeswitch.py @@ -153,7 +153,9 @@ class Stream(_object): except: self.this = this __swig_destroy__ = _freeswitch.delete_Stream __del__ = lambda self : None; + def read(*args): return _freeswitch.Stream_read(*args) def write(*args): return _freeswitch.Stream_write(*args) + def raw_write(*args): return _freeswitch.Stream_raw_write(*args) def get_data(*args): return _freeswitch.Stream_get_data(*args) Stream_swigregister = _freeswitch.Stream_swigregister Stream_swigregister(Stream) diff --git a/src/mod/languages/mod_python/mod_python_wrap.cpp b/src/mod/languages/mod_python/mod_python_wrap.cpp index 1386a9814f..e7afa21ba5 100644 --- a/src/mod/languages/mod_python/mod_python_wrap.cpp +++ b/src/mod/languages/mod_python/mod_python_wrap.cpp @@ -2505,25 +2505,26 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_Stream swig_types[7] #define SWIGTYPE_p_char swig_types[8] #define SWIGTYPE_p_input_callback_state swig_types[9] -#define SWIGTYPE_p_p_switch_event_node_t swig_types[10] -#define SWIGTYPE_p_session_flag_t swig_types[11] -#define SWIGTYPE_p_switch_call_cause_t swig_types[12] -#define SWIGTYPE_p_switch_channel_state_t swig_types[13] -#define SWIGTYPE_p_switch_channel_t swig_types[14] -#define SWIGTYPE_p_switch_core_session_t swig_types[15] -#define SWIGTYPE_p_switch_event_t swig_types[16] -#define SWIGTYPE_p_switch_event_types_t swig_types[17] -#define SWIGTYPE_p_switch_input_args_t swig_types[18] -#define SWIGTYPE_p_switch_input_type_t swig_types[19] -#define SWIGTYPE_p_switch_priority_t swig_types[20] -#define SWIGTYPE_p_switch_queue_t swig_types[21] -#define SWIGTYPE_p_switch_state_handler_table_t swig_types[22] -#define SWIGTYPE_p_switch_status_t swig_types[23] -#define SWIGTYPE_p_switch_stream_handle_t swig_types[24] -#define SWIGTYPE_p_uint32_t swig_types[25] -#define SWIGTYPE_p_void swig_types[26] -static swig_type_info *swig_types[28]; -static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0}; +#define SWIGTYPE_p_int swig_types[10] +#define SWIGTYPE_p_p_switch_event_node_t swig_types[11] +#define SWIGTYPE_p_session_flag_t swig_types[12] +#define SWIGTYPE_p_switch_call_cause_t swig_types[13] +#define SWIGTYPE_p_switch_channel_state_t swig_types[14] +#define SWIGTYPE_p_switch_channel_t swig_types[15] +#define SWIGTYPE_p_switch_core_session_t swig_types[16] +#define SWIGTYPE_p_switch_event_t swig_types[17] +#define SWIGTYPE_p_switch_event_types_t swig_types[18] +#define SWIGTYPE_p_switch_input_args_t swig_types[19] +#define SWIGTYPE_p_switch_input_type_t swig_types[20] +#define SWIGTYPE_p_switch_priority_t swig_types[21] +#define SWIGTYPE_p_switch_queue_t swig_types[22] +#define SWIGTYPE_p_switch_state_handler_table_t swig_types[23] +#define SWIGTYPE_p_switch_status_t swig_types[24] +#define SWIGTYPE_p_switch_stream_handle_t swig_types[25] +#define SWIGTYPE_p_uint32_t swig_types[26] +#define SWIGTYPE_p_void swig_types[27] +static swig_type_info *swig_types[29]; +static swig_module_info swig_module = {swig_types, 28, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4332,6 +4333,37 @@ fail: } +SWIGINTERN PyObject *_wrap_Stream_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stream *arg1 = (Stream *) 0 ; + int *arg2 = (int *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stream_read",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_read" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stream_read" "', argument " "2"" of type '" "int *""'"); + } + arg2 = reinterpret_cast< int * >(argp2); + result = (char *)(arg1)->read(arg2); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Stream_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stream *arg1 = (Stream *) 0 ; @@ -4365,6 +4397,48 @@ fail: } +SWIGINTERN PyObject *_wrap_Stream_raw_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Stream_raw_write",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_raw_write" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stream_raw_write" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Stream_raw_write" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + (arg1)->raw_write((char const *)arg2,arg3); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + SWIGINTERN PyObject *_wrap_Stream_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stream *arg1 = (Stream *) 0 ; @@ -9568,7 +9642,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"DTMF_swigregister", DTMF_swigregister, METH_VARARGS, NULL}, { (char *)"new_Stream", _wrap_new_Stream, METH_VARARGS, NULL}, { (char *)"delete_Stream", _wrap_delete_Stream, METH_VARARGS, NULL}, + { (char *)"Stream_read", _wrap_Stream_read, METH_VARARGS, NULL}, { (char *)"Stream_write", _wrap_Stream_write, METH_VARARGS, NULL}, + { (char *)"Stream_raw_write", _wrap_Stream_raw_write, METH_VARARGS, NULL}, { (char *)"Stream_get_data", _wrap_Stream_get_data, METH_VARARGS, NULL}, { (char *)"Stream_swigregister", Stream_swigregister, METH_VARARGS, NULL}, { (char *)"Event_event_set", _wrap_Event_event_set, METH_VARARGS, NULL}, @@ -9730,6 +9806,7 @@ static swig_type_info _swigt__p_PYTHON__Session = {"_p_PYTHON__Session", "PYTHON static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_switch_event_node_t = {"_p_p_switch_event_node_t", "switch_event_node_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_switch_call_cause_t = {"_p_switch_call_cause_t", "switch_call_cause_t *", 0, 0, (void*)0, 0}; @@ -9759,6 +9836,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Stream, &_swigt__p_char, &_swigt__p_input_callback_state, + &_swigt__p_int, &_swigt__p_p_switch_event_node_t, &_swigt__p_session_flag_t, &_swigt__p_switch_call_cause_t, @@ -9788,6 +9866,7 @@ static swig_cast_info _swigc__p_PYTHON__Session[] = { {&_swigt__p_PYTHON__Sessi static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_switch_event_node_t[] = { {&_swigt__p_p_switch_event_node_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_switch_call_cause_t[] = { {&_swigt__p_switch_call_cause_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -9817,6 +9896,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Stream, _swigc__p_char, _swigc__p_input_callback_state, + _swigc__p_int, _swigc__p_p_switch_event_node_t, _swigc__p_session_flag_t, _swigc__p_switch_call_cause_t, diff --git a/src/mod/legacy/languages/mod_lua/.gitattributes b/src/mod/legacy/languages/mod_lua/.gitattributes new file mode 100644 index 0000000000..c0c4890955 --- /dev/null +++ b/src/mod/legacy/languages/mod_lua/.gitattributes @@ -0,0 +1 @@ +mod_lua_wrap.cpp -diff diff --git a/src/mod/legacy/languages/mod_lua/mod_lua_wrap.cpp b/src/mod/legacy/languages/mod_lua/mod_lua_wrap.cpp index abe8d944ba..1e2147f31f 100644 --- a/src/mod/legacy/languages/mod_lua/mod_lua_wrap.cpp +++ b/src/mod/legacy/languages/mod_lua/mod_lua_wrap.cpp @@ -1495,26 +1495,27 @@ SWIG_Lua_dostring(lua_State *L, const char* str) { #define SWIGTYPE_p_SWIGLUA_FN swig_types[8] #define SWIGTYPE_p_Stream swig_types[9] #define SWIGTYPE_p_input_callback_state swig_types[10] -#define SWIGTYPE_p_lua_State swig_types[11] -#define SWIGTYPE_p_p_switch_event_node_t swig_types[12] -#define SWIGTYPE_p_session_flag_t swig_types[13] -#define SWIGTYPE_p_switch_call_cause_t swig_types[14] -#define SWIGTYPE_p_switch_channel_state_t swig_types[15] -#define SWIGTYPE_p_switch_channel_t swig_types[16] -#define SWIGTYPE_p_switch_core_session_t swig_types[17] -#define SWIGTYPE_p_switch_event_t swig_types[18] -#define SWIGTYPE_p_switch_event_types_t swig_types[19] -#define SWIGTYPE_p_switch_input_args_t swig_types[20] -#define SWIGTYPE_p_switch_input_type_t swig_types[21] -#define SWIGTYPE_p_switch_priority_t swig_types[22] -#define SWIGTYPE_p_switch_queue_t swig_types[23] -#define SWIGTYPE_p_switch_state_handler_table_t swig_types[24] -#define SWIGTYPE_p_switch_status_t swig_types[25] -#define SWIGTYPE_p_switch_stream_handle_t swig_types[26] -#define SWIGTYPE_p_uint32_t swig_types[27] -#define SWIGTYPE_p_void swig_types[28] -static swig_type_info *swig_types[30]; -static swig_module_info swig_module = {swig_types, 29, 0, 0, 0, 0}; +#define SWIGTYPE_p_int swig_types[11] +#define SWIGTYPE_p_lua_State swig_types[12] +#define SWIGTYPE_p_p_switch_event_node_t swig_types[13] +#define SWIGTYPE_p_session_flag_t swig_types[14] +#define SWIGTYPE_p_switch_call_cause_t swig_types[15] +#define SWIGTYPE_p_switch_channel_state_t swig_types[16] +#define SWIGTYPE_p_switch_channel_t swig_types[17] +#define SWIGTYPE_p_switch_core_session_t swig_types[18] +#define SWIGTYPE_p_switch_event_t swig_types[19] +#define SWIGTYPE_p_switch_event_types_t swig_types[20] +#define SWIGTYPE_p_switch_input_args_t swig_types[21] +#define SWIGTYPE_p_switch_input_type_t swig_types[22] +#define SWIGTYPE_p_switch_priority_t swig_types[23] +#define SWIGTYPE_p_switch_queue_t swig_types[24] +#define SWIGTYPE_p_switch_state_handler_table_t swig_types[25] +#define SWIGTYPE_p_switch_status_t swig_types[26] +#define SWIGTYPE_p_switch_stream_handle_t swig_types[27] +#define SWIGTYPE_p_uint32_t swig_types[28] +#define SWIGTYPE_p_void swig_types[29] +static swig_type_info *swig_types[31]; +static swig_module_info swig_module = {swig_types, 30, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -2626,6 +2627,38 @@ fail: } +static int _wrap_Stream_read(lua_State* L) { + int SWIG_arg = -1; + Stream *arg1 = (Stream *) 0 ; + int *arg2 = (int *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("read",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("read",1,"Stream *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("read",2,"int *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Stream,0))){ + SWIG_fail_ptr("Stream_read",1,SWIGTYPE_p_Stream); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_int,0))){ + SWIG_fail_ptr("Stream_read",2,SWIGTYPE_p_int); + } + + result = (char *)(arg1)->read(arg2); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + static int _wrap_Stream_write(lua_State* L) { int SWIG_arg = -1; Stream *arg1 = (Stream *) 0 ; @@ -2653,6 +2686,36 @@ fail: } +static int _wrap_Stream_raw_write(lua_State* L) { + int SWIG_arg = -1; + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + + SWIG_check_num_args("raw_write",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("raw_write",1,"Stream *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("raw_write",2,"char const *"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("raw_write",3,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Stream,0))){ + SWIG_fail_ptr("Stream_raw_write",1,SWIGTYPE_p_Stream); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (int)lua_tonumber(L, 3); + (arg1)->raw_write((char const *)arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + static int _wrap_Stream_get_data(lua_State* L) { int SWIG_arg = -1; Stream *arg1 = (Stream *) 0 ; @@ -2683,7 +2746,9 @@ Stream *arg1 = (Stream *) obj; delete arg1; } static swig_lua_method swig_Stream_methods[] = { + {"read", _wrap_Stream_read}, {"write", _wrap_Stream_write}, + {"raw_write", _wrap_Stream_raw_write}, {"get_data", _wrap_Stream_get_data}, {0,0} }; @@ -8064,6 +8129,7 @@ static swig_type_info _swigt__p_LUA__Session = {"_p_LUA__Session", "LUA::Session static swig_type_info _swigt__p_SWIGLUA_FN = {"_p_SWIGLUA_FN", "SWIGLUA_FN *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)&_wrap_class_Stream, 0}; static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)&_wrap_class_input_callback_state_t, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_lua_State = {"_p_lua_State", "lua_State *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_switch_event_node_t = {"_p_p_switch_event_node_t", "switch_event_node_t **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0}; @@ -8095,6 +8161,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_SWIGLUA_FN, &_swigt__p_Stream, &_swigt__p_input_callback_state, + &_swigt__p_int, &_swigt__p_lua_State, &_swigt__p_p_switch_event_node_t, &_swigt__p_session_flag_t, @@ -8126,6 +8193,7 @@ static swig_cast_info _swigc__p_LUA__Session[] = { {&_swigt__p_LUA__Session, 0, static swig_cast_info _swigc__p_SWIGLUA_FN[] = { {&_swigt__p_SWIGLUA_FN, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_lua_State[] = { {&_swigt__p_lua_State, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_switch_event_node_t[] = { {&_swigt__p_p_switch_event_node_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -8157,6 +8225,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_SWIGLUA_FN, _swigc__p_Stream, _swigc__p_input_callback_state, + _swigc__p_int, _swigc__p_lua_State, _swigc__p_p_switch_event_node_t, _swigc__p_session_flag_t, diff --git a/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c b/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c index 4cfa99d39d..bc75843800 100644 --- a/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c +++ b/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c @@ -544,7 +544,12 @@ switch_status_t mod_xml_radius_add_params(switch_core_session_t *session, switch goto err; } } else if ( attribute->type == 1 ) { - int number = atoi(switch_channel_get_variable(channel, variable)); + const char *data = switch_channel_get_variable(channel, variable); + int number = 0; + + if ( data ) { + number = atoi(data); + } if (rc_avpair_add(handle, send, attr_num, &number, -1, vend_num) == NULL) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, @@ -990,7 +995,7 @@ switch_status_t mod_xml_radius_accounting_end(switch_core_session_t *session){ } /* If there are conditions defined, and none of them pass, then skip this accounting */ - if ((conditions = switch_xml_child(globals.acct_start_configs, "conditions")) != NULL && + if ((conditions = switch_xml_child(globals.acct_end_configs, "conditions")) != NULL && mod_xml_radius_check_conditions(channel, conditions) != SWITCH_STATUS_SUCCESS ) { goto end; } diff --git a/src/switch.c b/src/switch.c index c0d3a84f7a..2433535152 100644 --- a/src/switch.c +++ b/src/switch.c @@ -478,6 +478,7 @@ static const char usage[] = "\t-certs [directory] -- alternate directory for certificates\n" "\t-recordings [directory] -- alternate directory for recordings\n" "\t-storage [directory] -- alternate directory for voicemail storage\n" + "\t-cache [directory] -- alternate directory for cache files\n" "\t-sounds [directory] -- alternate directory for sound files\n"; @@ -929,6 +930,21 @@ int main(int argc, char *argv[]) strcpy(SWITCH_GLOBAL_dirs.storage_dir, local_argv[x]); } + else if (!strcmp(local_argv[x], "-cache")) { + x++; + if (switch_strlen_zero(local_argv[x]) || is_option(local_argv[x])) { + fprintf(stderr, "When using -cache you must specify a cache directory\n"); + return 255; + } + + SWITCH_GLOBAL_dirs.cache_dir = (char *) malloc(strlen(local_argv[x]) + 1); + if (!SWITCH_GLOBAL_dirs.cache_dir) { + fprintf(stderr, "Allocation error\n"); + return 255; + } + strcpy(SWITCH_GLOBAL_dirs.cache_dir, local_argv[x]); + } + else if (!strcmp(local_argv[x], "-recordings")) { x++; if (switch_strlen_zero(local_argv[x]) || is_option(local_argv[x])) { diff --git a/src/switch_core.c b/src/switch_core.c index b2b05e8b7a..bf07f46451 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -726,6 +726,17 @@ SWITCH_DECLARE(void) switch_core_set_globals(void) #endif } + if (!SWITCH_GLOBAL_dirs.cache_dir && (SWITCH_GLOBAL_dirs.cache_dir = (char *) malloc(BUFSIZE))) { + if (SWITCH_GLOBAL_dirs.base_dir) + switch_snprintf(SWITCH_GLOBAL_dirs.cache_dir, BUFSIZE, "%s%scache", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR); + else +#ifdef SWITCH_CACHE_DIR + switch_snprintf(SWITCH_GLOBAL_dirs.cache_dir, BUFSIZE, "%s", SWITCH_CACHE_DIR); +#else + switch_snprintf(SWITCH_GLOBAL_dirs.cache_dir, BUFSIZE, "%s%scache", base_dir, SWITCH_PATH_SEPARATOR); +#endif + } + if (!SWITCH_GLOBAL_dirs.db_dir && (SWITCH_GLOBAL_dirs.db_dir = (char *) malloc(BUFSIZE))) { if (SWITCH_GLOBAL_dirs.base_dir) switch_snprintf(SWITCH_GLOBAL_dirs.db_dir, BUFSIZE, "%s%sdb", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR); @@ -1717,6 +1728,18 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc switch_core_set_variable("recordings_dir", SWITCH_GLOBAL_dirs.recordings_dir); switch_core_set_variable("sound_prefix", SWITCH_GLOBAL_dirs.sounds_dir); switch_core_set_variable("sounds_dir", SWITCH_GLOBAL_dirs.sounds_dir); + switch_core_set_variable("conf_dir", SWITCH_GLOBAL_dirs.conf_dir); + switch_core_set_variable("log_dir", SWITCH_GLOBAL_dirs.log_dir); + switch_core_set_variable("run_dir", SWITCH_GLOBAL_dirs.run_dir); + switch_core_set_variable("db_dir", SWITCH_GLOBAL_dirs.db_dir); + switch_core_set_variable("mod_dir", SWITCH_GLOBAL_dirs.mod_dir); + switch_core_set_variable("htdocs_dir", SWITCH_GLOBAL_dirs.htdocs_dir); + switch_core_set_variable("script_dir", SWITCH_GLOBAL_dirs.script_dir); + switch_core_set_variable("temp_dir", SWITCH_GLOBAL_dirs.temp_dir); + switch_core_set_variable("grammar_dir", SWITCH_GLOBAL_dirs.grammar_dir); + switch_core_set_variable("certs_dir", SWITCH_GLOBAL_dirs.certs_dir); + switch_core_set_variable("storage_dir", SWITCH_GLOBAL_dirs.storage_dir); + switch_core_set_variable("cache_dir", SWITCH_GLOBAL_dirs.cache_dir); switch_core_set_serial(); switch_console_init(runtime.memory_pool); @@ -2702,6 +2725,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void) switch_safe_free(SWITCH_GLOBAL_dirs.htdocs_dir); switch_safe_free(SWITCH_GLOBAL_dirs.grammar_dir); switch_safe_free(SWITCH_GLOBAL_dirs.storage_dir); + switch_safe_free(SWITCH_GLOBAL_dirs.cache_dir); switch_safe_free(SWITCH_GLOBAL_dirs.recordings_dir); switch_safe_free(SWITCH_GLOBAL_dirs.sounds_dir); switch_safe_free(SWITCH_GLOBAL_dirs.run_dir); diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 505f024c3e..e09b8108c9 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -516,6 +516,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_process_t38_passthru(switch_co SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core_session_t *session, switch_media_type_t type, const char *iananame, + uint32_t rate, switch_payload_t *ptP, switch_payload_t *recv_ptP, char **fmtpP) @@ -540,7 +541,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core if (!pmap->allocated) continue; - if (!strcasecmp(pmap->iananame, iananame)) { + if (!strcasecmp(pmap->iananame, iananame) && (!rate || (rate == pmap->rate))) { pt = pmap->pt; recv_pt = pmap->recv_pt; fmtp = pmap->rm_fmtp; @@ -6229,7 +6230,7 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess if (orig_session && switch_core_session_get_payload_code(orig_session, imp->codec_type == SWITCH_CODEC_TYPE_AUDIO ? SWITCH_MEDIA_TYPE_AUDIO : SWITCH_MEDIA_TYPE_VIDEO, - imp->iananame, &orig_pt, NULL, &orig_fmtp) == SWITCH_STATUS_SUCCESS) { + imp->iananame, imp->samples_per_second, &orig_pt, NULL, &orig_fmtp) == SWITCH_STATUS_SUCCESS) { smh->ianacodes[i] = orig_pt; if (orig_fmtp) { diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index 778c53d20e..16179cfb8a 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -531,12 +531,37 @@ SWITCH_DECLARE_CONSTRUCTOR Stream::~Stream() } } +/* WARNING!! you are not encouraged to use this unless you understand the risk!!! */ +SWITCH_DECLARE(const char *) Stream::read(int *len) +{ + uint8_t *buff; + + this_check(NULL); + + if (!stream_p->read_function) return NULL; + + buff = stream_p->read_function(stream_p, len); + + if (!buff || *len <= 0) { + *len = 0; + return NULL; + } + + return (const char *)buff; +} + SWITCH_DECLARE(void) Stream::write(const char *data) { this_check_void(); stream_p->write_function(stream_p, "%s", data); } +SWITCH_DECLARE(void) Stream::raw_write(const char *data, int len) +{ + this_check_void(); + stream_p->raw_write_function(stream_p, (uint8_t *)data, len); +} + SWITCH_DECLARE(const char *)Stream::get_data() { this_check(""); diff --git a/src/switch_odbc.c b/src/switch_odbc.c index cf9c2b9d7b..04078c9c5f 100644 --- a/src/switch_odbc.c +++ b/src/switch_odbc.c @@ -56,6 +56,7 @@ struct switch_odbc_handle { switch_odbc_state_t state; char odbc_driver[256]; BOOL is_firebird; + BOOL is_oracle; int affected_rows; int num_retries; }; @@ -220,7 +221,9 @@ static int db_is_up(switch_odbc_handle_t *handle) goto done; } - if (handle->is_firebird) { + if (handle->is_oracle) { + strcpy((char *) sql, "select 1 from dual"); + } else if (handle->is_firebird) { strcpy((char *) sql, "select first 1 * from RDB$RELATIONS"); } else { strcpy((char *) sql, "select 1"); @@ -380,10 +383,15 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_connect(switch_odbc_hand handle->odbc_driver[i] = (char) toupper(handle->odbc_driver[i]); } - if (strstr(handle->odbc_driver, "FIREBIRD") != 0 || strstr(handle->odbc_driver, "FB32") != 0 || strstr(handle->odbc_driver, "FB64") != 0) { + if (strstr(handle->odbc_driver, "SQORA32.DLL") != 0 || strstr(handle->odbc_driver, "SQORA64.DLL") != 0) { + handle->is_firebird = FALSE; + handle->is_oracle = TRUE; + } else if (strstr(handle->odbc_driver, "FIREBIRD") != 0 || strstr(handle->odbc_driver, "FB32") != 0 || strstr(handle->odbc_driver, "FB64") != 0) { handle->is_firebird = TRUE; + handle->is_oracle = FALSE; } else { handle->is_firebird = FALSE; + handle->is_oracle = FALSE; } switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Connected to [%s]\n", handle->dsn); diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 161f46f782..eb9e7de49c 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1127,7 +1127,7 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d if (!strcmp(ice->ice_params->cands[i][ice->proto].con_addr, host) && !strcmp(ice->ice_params->cands[i][ice->proto].cand_type, "relay")) { - if (elapsed != 0 && elapsed < 5000) { + if (rtp_session->last_stun && elapsed < 5000) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "Skiping RELAY stun/%s/dtls port change from %s:%u to %s:%u\n", is_rtcp ? "rtcp" : "rtp", host2, port2, @@ -3585,13 +3585,15 @@ static void jb_callback(stfu_instance_t *i, void *udata) stfu_n_report(i, &r); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG8, - "%s JB REPORT:\nlen: %u\nin: %u\nclean: %u\ngood: %u\nbad: %u\n", + "%s JB REPORT:\nlen: %u\nin: %u\nclean: %u\ngood: %u\nbad: %u\njitter percent %0.2f\nmissing percent %0.2f\n\n", switch_core_session_get_name(session), r.qlen, r.packet_in_count, r.clean_count, r.consecutive_good_count, - r.consecutive_bad_count + r.consecutive_bad_count, + r.period_jitter_percent, + r.period_missing_percent ); } @@ -3646,7 +3648,7 @@ static void jb_logger(const char *file, const char *func, int line, int level, c va_start(ap, fmt); ret = switch_vasprintf(&data, fmt, ap); if (ret != -1) { - switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_CONSOLE, "%s", data); + switch_log_printf(SWITCH_CHANNEL_ID_LOG_CLEAN, file, func, line, NULL, SWITCH_LOG_CONSOLE, "%d: %s", line, data); free(data); } diff --git a/src/switch_stfu.c b/src/switch_stfu.c index 5bb5f50afe..169deda326 100644 --- a/src/switch_stfu.c +++ b/src/switch_stfu.c @@ -48,6 +48,9 @@ #define least1(_z) (_z ? _z : 1) +#define PERIOD_SECONDS 20 +#define PERIOD_JITTER_TOLERANCE 5.0f + static int stfu_log_level = 7; struct stfu_queue { @@ -74,6 +77,7 @@ struct stfu_instance { uint16_t cur_seq; uint32_t last_wr_ts; uint32_t last_rd_ts; + uint32_t ms_per_packet; uint32_t samples_per_packet; uint32_t samples_per_second; uint32_t miss_count; @@ -93,7 +97,9 @@ struct stfu_instance { uint32_t period_need_range; uint32_t period_need_range_avg; uint32_t period_clean_count; - + uint32_t period_jitter_count; + double period_jitter_percent; + double period_missing_percent; uint32_t session_clean_count; uint32_t session_missing_count; @@ -114,7 +120,6 @@ struct stfu_instance { int32_t same_ts; uint32_t period_time; - uint32_t decrement_time; uint32_t plc_len; uint32_t plc_pt; @@ -123,6 +128,8 @@ struct stfu_instance { uint8_t ready; uint8_t debug; + switch_time_t last_clock_ts; + char *name; stfu_n_call_me_t callback; void *udata; @@ -239,6 +246,8 @@ void stfu_n_report(stfu_instance_t *i, stfu_report_t *r) r->clean_count = i->period_clean_count; r->consecutive_good_count = i->consecutive_good_count; r->consecutive_bad_count = i->consecutive_bad_count; + r->period_jitter_percent = i->period_jitter_percent; + r->period_missing_percent = i->period_missing_percent; } stfu_status_t stfu_n_resize(stfu_instance_t *i, uint32_t qlen) @@ -248,7 +257,7 @@ stfu_status_t stfu_n_resize(stfu_instance_t *i, uint32_t qlen) if (i->qlen == i->max_qlen) { return STFU_IT_FAILED; } - + if (i->max_qlen && qlen > i->max_qlen) { if (i->qlen < i->max_qlen) { qlen = i->max_qlen; @@ -304,8 +313,7 @@ stfu_instance_t *stfu_n_init(uint32_t qlen, uint32_t max_qlen, uint32_t samples_ i->samples_per_second = samples_per_second ? samples_per_second : 8000; - i->period_time = ((i->samples_per_second * 20) / i->samples_per_packet); - i->decrement_time = ((i->samples_per_second * 15) / i->samples_per_packet); + i->period_time = ((i->samples_per_second * PERIOD_SECONDS) / i->samples_per_packet); return i; } @@ -316,6 +324,8 @@ static void stfu_n_reset_counters(stfu_instance_t *i) stfu_log(STFU_LOG_EMERG, "%s COUNTER RESET........\n", i->name); } + + if (i->callback) { i->callback(i, i->udata); } @@ -328,6 +338,7 @@ static void stfu_n_reset_counters(stfu_instance_t *i) i->period_packet_in_count = 0; i->period_packet_out_count = 0; i->period_missing_count = 0; + i->period_jitter_count = 0; i->period_need_range = 0; i->period_need_range_avg = 0; @@ -408,6 +419,9 @@ stfu_status_t stfu_n_add_data(stfu_instance_t *i, uint32_t ts, uint16_t seq, uin stfu_frame_t *frame; size_t cplen = 0; int good_ts = 0; + int32_t diff; + switch_time_t now; + if (!i->samples_per_packet && ts && i->last_rd_ts) { i->ts_diff = ts - i->last_rd_ts; @@ -430,7 +444,25 @@ stfu_status_t stfu_n_add_data(stfu_instance_t *i, uint32_t ts, uint16_t seq, uin return STFU_IT_FAILED; } } - + + if (!i->ms_per_packet) { + i->ms_per_packet = 1000 / (i->samples_per_second / i->samples_per_packet); + } + + now = switch_micro_time_now(); + + if (i->last_clock_ts) { + diff = (uint32_t) ((now - i->last_clock_ts) / 1000); + } else { + diff = 0; + } + + i->last_clock_ts = now; + + if (abs(diff - i->ms_per_packet) > 1) { + i->period_jitter_count++; + } + if (timer_ts) { if (ts && !i->ts_offset) { i->ts_offset = timer_ts - ts; @@ -448,7 +480,8 @@ stfu_status_t stfu_n_add_data(stfu_instance_t *i, uint32_t ts, uint16_t seq, uin if (i->ts_drift < i->max_drift) { if (++i->drift_dropped_packets < i->drift_max_dropped) { stfu_log(STFU_LOG_EMERG, "%s TOO LATE !!! %u \n\n\n", i->name, ts); - stfu_n_sync(i, 1); + stfu_n_reset(i); + //stfu_n_sync(i, 1); //return STFU_ITS_TOO_LATE; } } else { @@ -489,16 +522,10 @@ stfu_status_t stfu_n_add_data(stfu_instance_t *i, uint32_t ts, uint16_t seq, uin if (i->period_missing_count > i->qlen * 2) { if (stfu_log != null_logger && i->debug) { - stfu_log(STFU_LOG_EMERG, "%s resize %u %u\n", i->name, i->qlen, i->qlen + 1); + stfu_log(STFU_LOG_EMERG, "%s resize up %u %u\n", i->name, i->qlen, i->qlen + 1); } stfu_n_resize(i, i->qlen + 1); stfu_n_reset_counters(i); - } else { - if (i->qlen > i->orig_qlen && (i->consecutive_good_count > i->decrement_time || i->period_clean_count > i->decrement_time)) { - stfu_n_resize(i, i->qlen - 1); - stfu_n_reset_counters(i); - stfu_n_sync(i, i->qlen); - } } @@ -514,10 +541,20 @@ stfu_status_t stfu_n_add_data(stfu_instance_t *i, uint32_t ts, uint16_t seq, uin i->diff_total += i->diff; - if ((i->period_packet_in_count > i->period_time)) { + if ((i->period_packet_in_count >= i->period_time)) { + i->period_jitter_percent = (double)(((double)i->period_jitter_count / (double)i->period_time) * 100.0f); + i->period_missing_percent = (double)(((double)i->period_missing_count / (double)i->period_time) * 100.0f); + i->period_packet_in_count = 0; - if (i->period_missing_count == 0 && i->qlen > i->orig_qlen) { + if (stfu_log != null_logger && i->debug) { + stfu_log(STFU_LOG_EMERG, "PERIOD %f jitter missing:%f q:%d/%d\n", i->period_jitter_percent, i->period_missing_percent, i->qlen, i->orig_qlen); + } + + if (i->qlen > i->orig_qlen && i->period_jitter_percent < PERIOD_JITTER_TOLERANCE && i->period_missing_percent < PERIOD_JITTER_TOLERANCE) { + if (stfu_log != null_logger && i->debug) { + stfu_log(STFU_LOG_EMERG, "%s resize down %u %u\n", i->name, i->qlen, i->qlen - 1); + } stfu_n_resize(i, i->qlen - 1); stfu_n_sync(i, i->qlen); } @@ -526,12 +563,22 @@ stfu_status_t stfu_n_add_data(stfu_instance_t *i, uint32_t ts, uint16_t seq, uin } if (stfu_log != null_logger && i->debug) { - stfu_log(STFU_LOG_EMERG, "I: %s %u/%u i=%u/%u - g:%u/%u c:%u/%u b:%u - %u:%u - %u %d %u %u %d %d %d/%d\n", i->name, - i->qlen, i->max_qlen, i->period_packet_in_count, i->period_time, i->consecutive_good_count, - i->decrement_time, i->period_clean_count, i->decrement_time, i->consecutive_bad_count, + double jitter_percent = (double)(((double)i->period_jitter_count / (double)i->period_packet_in_count) * 100.0f); + double missing_percent = (double)(((double)i->period_missing_count / (double)i->period_packet_in_count) * 100.0f); + + stfu_log(STFU_LOG_EMERG, "I: %s len:%u/%u i=%u/%u - g:%u c:%u b:%u - ts:%u/%u/%u - m:%u(%f%%) j:%f%% dr:%d/%d\n", + i->name, + i->qlen, i->max_qlen, + i->period_packet_in_count, i->period_time, + i->consecutive_good_count, + i->period_clean_count, + i->consecutive_bad_count, ts, ts / i->samples_per_packet, - i->period_missing_count, i->period_need_range_avg, - i->last_wr_ts, ts, i->diff, i->diff_total / least1(i->period_packet_in_count), i->ts_drift, i->max_drift); + i->last_wr_ts, + i->period_missing_count, + missing_percent, + jitter_percent, + i->ts_drift, i->max_drift); } if (last || i->in_queue->array_len == i->in_queue->array_size) { @@ -763,7 +810,7 @@ stfu_frame_t *stfu_n_read_a_frame(stfu_instance_t *i) if (stfu_log != null_logger && i->debug) { if (found) { - stfu_log(STFU_LOG_EMERG, "%s O: %u:%u %u\n", i->name, rframe->ts, rframe->ts / i->samples_per_packet, rframe->plc); + stfu_log(STFU_LOG_EMERG, "%s OUT: %u:%u %u\n", i->name, rframe->ts, rframe->ts / i->samples_per_packet, rframe->plc); } } diff --git a/src/switch_utils.c b/src/switch_utils.c index 3028122c92..399442be71 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -25,6 +25,7 @@ * * Anthony Minessale II * Juan Jose Comellas + * Seven Du * * * switch_utils.c -- Compatibility and Helper Code @@ -3603,6 +3604,261 @@ SWITCH_DECLARE(char *) switch_strerror_r(int errnum, char *buf, switch_size_t bu #endif } +SWITCH_DECLARE(void) switch_http_parse_qs(switch_http_request_t *request, char *qs) +{ + char *q; + char *next; + char *name, *val; + + if (qs) { + q = qs; + } else { /*parse our own qs, dup to avoid modify the original string */ + q = strdup(request->qs); + } + + switch_assert(q); + next = q; + + do { + char *p; + + if ((next = strchr(next, '&'))) { + *next++ = '\0'; + } + + for (p = q; p && *p; p++) { + if (*p == '+') *p = ' '; + } + + switch_url_decode(q); + + name = q; + if ((val = strchr(name, '='))) { + *val++ = '\0'; + switch_event_add_header_string(request->headers, SWITCH_STACK_BOTTOM, name, val); + } + q = next; + } while (q); + + if (!qs) { + switch_safe_free(q); + } +} + +/* clean the uri to protect us from vulnerability attack */ +switch_status_t clean_uri(char *uri) +{ + int argc; + char *argv[64]; + int last, i, len, uri_len = 0; + + argc = switch_separate_string(uri, '/', argv, sizeof(argv) / sizeof(argv[0])); + + if (argc == sizeof(argv)) { /* too deep */ + return SWITCH_STATUS_FALSE; + } + + last = 1; + for(i = 1; i < argc; i++) { + if (*argv[i] == '\0' || !strcmp(argv[i], ".")) { + /* ignore //// or /././././ */ + } else if (!strcmp(argv[i], "..")) { + /* got /../, go up one level */ + if (last > 1) last--; + } else { + argv[last++] = argv[i]; + } + } + + for(i = 1; i < last; i++) { + len = strlen(argv[i]); + sprintf(uri + uri_len, "/%s", argv[i]); + uri_len += (len + 1); + } + + return SWITCH_STATUS_SUCCESS; +} + +SWITCH_DECLARE(switch_status_t) switch_http_parse_header(char *buffer, uint32_t datalen, switch_http_request_t *request) +{ + switch_status_t status = SWITCH_STATUS_FALSE; + char *p = buffer; + int i = 10; + char *http = NULL; + int header_count; + char *headers[64] = { 0 }; + int argc; + char *argv[2] = { 0 }; + char *body = NULL; + + if (datalen < 16) return status; /* minimum GET / HTTP/1.1\r\n */ + + while(i--) { // sanity check + if (*p++ == ' ') break; + } + + if (i == 0) return status; + + if ((body = strstr(buffer, "\r\n\r\n"))) { + *body = '\0'; + body += 4; + } else if (( body = strstr(buffer, "\n\n"))) { + *body = '\0'; + body += 2; + } else { + return status; + } + + request->_buffer = strdup(buffer); + request->method = request->_buffer; + request->bytes_buffered = datalen; + if (body) { + request->bytes_header = body - buffer; + request->bytes_read = body - buffer; + } + + p = strchr(request->method, ' '); + + if (!p) goto err; + + *p++ = '\0'; + + if (*p != '/') goto err; /* must start from '/' */ + + request->uri = p; + p = strchr(request->uri, ' '); + + if (!p) goto err; + + *p++ = '\0'; + http = p; + + p = strchr(request->uri, '?'); + + if (p) { + *p++ = '\0'; + request->qs = p; + } + + if (clean_uri((char *)request->uri) != SWITCH_STATUS_SUCCESS) { + goto err; + } + + if (!strncmp(http, "HTTP/1.1", 8)) { + request->keepalive = SWITCH_TRUE; + } else if (strncmp(http, "HTTP/1.0", 8)) { + goto err; + } + + if (!request->headers) { + if (switch_event_create(&request->headers, SWITCH_EVENT_CHANNEL_DATA) != SWITCH_STATUS_SUCCESS) { + goto err; + } + request->_destroy_headers = SWITCH_TRUE; + } + + p = strchr(http, '\n'); + + if (p) { + *p++ = '\0'; // now the first header + } else { + goto noheader; + } + + header_count = switch_separate_string(p, '\n', headers, sizeof(headers)/ sizeof(headers[0])); + + if (header_count < 1) goto err; + + for (i = 0; i < header_count; i++) { + char *header, *value; + int len; + + argc = switch_separate_string(headers[i], ':', argv, 2); + + if (argc != 2) goto err; + + header = argv[0]; + value = argv[1]; + + if (*value == ' ') value++; + + len = strlen(value); + + if (len && *(value + len - 1) == '\r') *(value + len - 1) = '\0'; + + switch_event_add_header_string(request->headers, SWITCH_STACK_BOTTOM, header, value); + + if (!strncasecmp(header, "User-Agent", 10)) { + request->user_agent = value; + } else if (!strncasecmp(header, "Host", 4)) { + request->host = value; + p = strchr(value, ':'); + + if (p) { + *p++ = '\0'; + + if (*p) request->port = (switch_port_t)atoi(p); + } + } else if (!strncasecmp(header, "Content-Type", 12)) { + request->content_type = value; + } else if (!strncasecmp(header, "Content-Length", 14)) { + request->content_length = atoi(value); + } else if (!strncasecmp(header, "Referer", 7)) { + request->referer = value; + } + } + +noheader: + + if (request->qs) { + switch_http_parse_qs(request, NULL); + } + + return SWITCH_STATUS_SUCCESS; + +err: + switch_http_free_request(request); + return status; +} + +SWITCH_DECLARE(void) switch_http_free_request(switch_http_request_t *request) +{ + if (request->_buffer) free(request->_buffer); + if (request->_destroy_headers && request->headers) { + switch_event_destroy(&request->headers); + } +} + +/* for debugging only */ +SWITCH_DECLARE(void) switch_http_dump_request(switch_http_request_t *request) +{ + switch_assert(request->method); + + printf("method: %s\n", request->method); + + if (request->uri) printf("uri: %s\n", request->uri); + if (request->qs) printf("qs: %s\n", request->qs); + if (request->host) printf("host: %s\n", request->host); + if (request->port) printf("port: %d\n", request->port); + if (request->from) printf("from: %s\n", request->from); + if (request->user_agent) printf("user_agent: %s\n", request->user_agent); + if (request->referer) printf("referer: %s\n", request->referer); + if (request->user) printf("user: %s\n", request->user); + if (request->keepalive) printf("uri: %d\n", request->keepalive); + if (request->content_type) printf("uri: %s\n", request->content_type); + if (request->content_length) printf("uri: %" SWITCH_SIZE_T_FMT "\n", request->content_length); + + { + switch_event_header_t *header = request->headers->headers; + + printf("headers:\n-------------------------\n"); + + while(header) { + printf("%s: %s\n", header->name, header->value); + header = header->next; + } + } +} /* For Emacs: * Local Variables: diff --git a/support-d/.bashrc b/support-d/.bashrc index ce221896bf..727f26b652 100644 --- a/support-d/.bashrc +++ b/support-d/.bashrc @@ -64,4 +64,6 @@ alias fstop='top -p `cat /usr/local/freeswitch/run/freeswitch.pid`' alias fsgdb='gdb /usr/local/freeswitch/bin/freeswitch `cat /usr/local/freeswitch/run/freeswitch.pid`' alias fscore='gdb /usr/local/freeswitch/bin/freeswitch `ls -rt core.* | tail -n1`' alias emacs='emacs -nw' +alias jitteron='tc qdisc add dev eth0 root handle 1: netem delay 40ms 20ms ; tc qdisc add dev eth0 parent 1:1 pfifo limit 1000' +alias jitteroff='tc qdisc del dev eth0 root netem' # End of file