src/include/switch_jitterbuffer.h \
src/include/switch_estimators.h \
src/include/switch_rtcp_frame.h \
+ src/include/switch_spandsp.h \
src/include/switch_stun.h \
src/include/switch_nat.h \
src/include/switch_log.h \
src/switch_ivr_say.c \
src/switch_ivr_menu.c \
src/switch_ivr.c \
+ src/switch_spandsp.c \
src/switch_stun.c \
src/switch_nat.c \
src/switch_log.c \
$(switch_srcdir)/src/include/switch_event.h $(switch_srcdir)/src/include/switch_resample.h \
$(switch_srcdir)/src/include/switch_ivr.h $(switch_srcdir)/src/include/switch_rtp.h \
$(switch_srcdir)/src/include/switch_stun.h $(switch_srcdir)/src/include/switch_log.h \
- $(switch_srcdir)/src/include/switch_xml.h
+ $(switch_srcdir)/src/include/switch_xml.h $(switch_srcdir)/src/include/switch_spandsp.h
@echo Compiling $<...
if test -f "$(CSOURCEFILE)" -o -f "$(MODDIR)/$(CSOURCEFILE)"; then \
if test ! -z $(VERBOSE) ; then echo $(COMPILE) -c -o $@ `test -f '$<' || echo '$(MODDIR)/'`$< ; fi ;\
$(switch_srcdir)/src/include/switch_event.h $(switch_srcdir)/src/include/switch_resample.h \
$(switch_srcdir)/src/include/switch_ivr.h $(switch_srcdir)/src/include/switch_rtp.h \
$(switch_srcdir)/src/include/switch_stun.h $(switch_srcdir)/src/include/switch_log.h \
- $(switch_srcdir)/src/include/switch_xml.h
+ $(switch_srcdir)/src/include/switch_xml.h $(switch_srcdir)/src/include/switch_spandsp.h
@echo Compiling $<...
if test -f "$(CSOURCEFILE)" -o -f "$(MODDIR)/$(CSOURCEFILE)"; then \
if test ! -z $(VERBOSE) ; then echo $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(MODDIR)/'`$< ; fi ;\
$(switch_srcdir)/src/include/switch_rtp.h:
+$(switch_srcdir)/src/include/switch_spandsp.h:
+
$(switch_srcdir)/src/include/switch_stun.h:
$(switch_srcdir)/src/include/switch_log.h:
mariadb-connector-c-*
/spandsp*/
/spandsp*
-win32/spandsp/spandsp.h
\ No newline at end of file
+win32/spandsp/spandsp.h
+win32/spandsp/win32
\ No newline at end of file
--- /dev/null
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005-2021, Anthony Minessale II <anthm@freeswitch.org>
+ *
+ * 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 / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II <anthm@freeswitch.org>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Anthony Minessale II <anthm@freeswitch.org>
+ * Andrey Volk <andywolk@gmail.com>
+ *
+ *
+ * switch_apr_pvt.h - APR
+ *
+ */
+
+#ifndef __SWITCH_APR_PVT_H__
+#define __SWITCH_APR_PVT_H__
+
+/* for apr_pool_create and apr_pool_destroy */
+/* functions only used in this file so not exposed */
+#include <apr_pools.h>
+
+/* for apr_hash_make, apr_hash_pool_get, apr_hash_set */
+/* functions only used in this file so not exposed */
+#include <apr_hash.h>
+
+/* for apr_pvsprintf */
+/* function only used in this file so not exposed */
+#include <apr_strings.h>
+
+/* for apr_initialize and apr_terminate */
+/* function only used in this file so not exposed */
+#include <apr_general.h>
+
+#include <apr_portable.h>
+
+#endif // __SWITCH_APR_PVT_H__
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:t
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
+ */
* this file does not exist!!!!
*
*/
-#define SPANDSP_NO_TIFF 1
-#include "spandsp.h"
#include "switch_profile.h"
#ifndef WIN32
#include <switch_private.h>
#endif
-/* for apr_pool_create and apr_pool_destroy */
-/* functions only used in this file so not exposed */
-#include <apr_pools.h>
-
-/* for apr_hash_make, apr_hash_pool_get, apr_hash_set */
-/* functions only used in this file so not exposed */
-#include <apr_hash.h>
-
-/* for apr_pvsprintf */
-/* function only used in this file so not exposed */
-#include <apr_strings.h>
-
-/* for apr_initialize and apr_terminate */
-/* function only used in this file so not exposed */
-#include <apr_general.h>
-
-#include <apr_portable.h>
-
#ifdef HAVE_MLOCKALL
#include <sys/mman.h>
#endif
switch_log_level_t loglevel;
uint32_t soft_lock;
switch_ivr_dmachine_t *dmachine[2];
- plc_state_t *plc;
+ switch_plc_state_t *plc;
switch_media_handle_t *media_handle;
uint32_t decoder_errors;
#include "switch_platform.h"
#include "switch_types.h"
#include "switch_apr.h"
+#include "switch_spandsp.h"
#include "switch_mprintf.h"
#include "switch_core_db.h"
#include "switch_dso.h"
--- /dev/null
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
+ *
+ * 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 / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II <anthm@freeswitch.org>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Anthony Minessale II <anthm@freeswitch.org>
+ * Andrey Volk <andrey@signalwire.com>
+ *
+ * switch_spandsp.h -- SpanDSP includes header
+ *
+ */
+#ifndef SWITCH_SPANDSP_H
+#define SWITCH_SPANDSP_H
+
+SWITCH_BEGIN_EXTERN_C
+
+SWITCH_DECLARE(switch_plc_state_t *) switch_plc_init(switch_plc_state_t *s);
+SWITCH_DECLARE(int) switch_plc_free(switch_plc_state_t *s);
+SWITCH_DECLARE(int) switch_plc_rx(switch_plc_state_t *s, int16_t amp[], int len);
+SWITCH_DECLARE(int) switch_plc_fillin(switch_plc_state_t *s, int16_t amp[], int len);
+
+SWITCH_END_EXTERN_C
+#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:t
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
+ */
#endif
typedef struct apr_pool_t switch_memory_pool_t;
+typedef void* switch_plc_state_t;
typedef uint16_t switch_port_t;
typedef uint8_t switch_payload_t;
typedef struct switch_app_log switch_app_log_t;
#endif
#include <switch.h>
+#include "private/switch_apr_pvt.h"
#include "private/switch_core_pvt.h"
/* pid filename: Stores the process id of the freeswitch process */
#include <switch_ssl.h>
#include <switch_stun.h>
#include <switch_nat.h>
+#include "private/switch_apr_pvt.h"
#include "private/switch_core_pvt.h"
#include <switch_curl.h>
#include <switch_msrp.h>
if (is_cng) {
if (session->plc) {
- plc_fillin(session->plc, session->raw_read_frame.data, read_frame->codec->implementation->decoded_bytes_per_packet / 2);
+ switch_plc_fillin(session->plc, session->raw_read_frame.data, read_frame->codec->implementation->decoded_bytes_per_packet / 2);
is_cng = 0;
flag &= ~SFF_CNG;
} else {
if (!switch_test_flag(read_frame->codec, SWITCH_CODEC_FLAG_HAS_PLC) &&
(switch_channel_test_flag(session->channel, CF_JITTERBUFFER_PLC) ||
switch_channel_test_flag(session->channel, CF_CNG_PLC)) && !session->plc) {
- session->plc = plc_init(NULL);
+ session->plc = switch_plc_init(NULL);
}
if (!switch_test_flag(read_frame->codec, SWITCH_CODEC_FLAG_HAS_PLC) && session->plc && switch_test_flag(read_frame, SFF_PLC)) {
if (status == SWITCH_STATUS_SUCCESS && session->read_impl.number_of_channels == 1) {
if (session->plc) {
if (switch_test_flag(read_frame, SFF_PLC)) {
- plc_fillin(session->plc, session->raw_read_frame.data, session->raw_read_frame.datalen / 2);
+ switch_plc_fillin(session->plc, session->raw_read_frame.data, session->raw_read_frame.datalen / 2);
switch_clear_flag(read_frame, SFF_PLC);
} else {
- plc_rx(session->plc, session->raw_read_frame.data, session->raw_read_frame.datalen / 2);
+ switch_plc_rx(session->plc, session->raw_read_frame.data, session->raw_read_frame.datalen / 2);
}
}
}
#include <sofia-sip/sdp.h>
#include <sofia-sip/su.h>
+#include <stdbool.h>
+
static switch_t38_options_t * switch_core_media_process_udptl(switch_core_session_t *session, sdp_session_t *sdp, sdp_media_t *m);
static void switch_core_media_find_zrtp_hash(switch_core_session_t *session, sdp_session_t *sdp);
static void switch_core_media_set_r_sdp_codec_string(switch_core_session_t *session, const char *codec_string, sdp_session_t *sdp, switch_sdp_type_t sdp_type);
*/
#include <switch.h>
+#include "private/switch_apr_pvt.h"
#include "private/switch_core_pvt.h"
//#define DEBUG_ALLOC
switch_mutex_unlock(runtime.session_hash_mutex);
if ((*session)->plc) {
- plc_free((*session)->plc);
+ switch_plc_free((*session)->plc);
(*session)->plc = NULL;
}
--- /dev/null
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005-2015, Anthony Minessale II <anthm@freeswitch.org>
+ *
+ * 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/F
+ *
+ * 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 / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Michael Jerris <mike@jerris.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Michael Jerris <mike@jerris.com>
+ * Andrey Volk <andrey@signalwrie.com>
+ *
+ * switch_spandsp.c -- spandsp wrappers and extensions
+ *
+ */
+
+#include <switch.h>
+
+#define SPANDSP_NO_TIFF 1
+#include "spandsp.h"
+
+SWITCH_DECLARE(switch_plc_state_t *) switch_plc_init(switch_plc_state_t *s) {
+ return (switch_plc_state_t *)plc_init((plc_state_t *)s);
+}
+
+SWITCH_DECLARE(int) switch_plc_free(switch_plc_state_t *s) {
+ return plc_free((plc_state_t *)s);
+}
+
+SWITCH_DECLARE(int) switch_plc_fillin(switch_plc_state_t *s, int16_t amp[], int len) {
+ return plc_fillin((plc_state_t *)s, amp, len);
+}
+
+SWITCH_DECLARE(int) switch_plc_rx(switch_plc_state_t* s, int16_t amp[], int len)
+{
+ return plc_rx((plc_state_t*)s, amp, len);
+}
+
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:t
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
+ */
#include <switch.h>
#include <stdio.h>
+#include "private/switch_apr_pvt.h"
#include "private/switch_core_pvt.h"
#ifdef HAVE_TIMERFD_CREATE
*/
#include <switch.h>
+#include "private/switch_apr_pvt.h"
#ifndef WIN32
#include <arpa/inet.h>
#if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H)
conf/*/
conf_playsay/*/
conf_async/*/
+x64
+win32
+*.vcxproj.user
\ No newline at end of file
<ClCompile Include="..\..\src\switch_rtp.c" />\r
<ClCompile Include="..\..\src\switch_scheduler.c" />\r
<ClCompile Include="..\..\src\switch_sdp.c" />\r
+ <ClCompile Include="..\..\src\switch_spandsp.c" />\r
<ClCompile Include="..\..\src\switch_stun.c" />\r
<ClCompile Include="..\..\src\switch_time.c" />\r
<ClCompile Include="..\..\src\switch_utils.c" />\r
<ClInclude Include="..\..\src\include\switch_resample.h" />\r
<ClInclude Include="..\..\src\include\switch_rtp.h" />\r
<ClInclude Include="..\..\src\include\switch_scheduler.h" />\r
+ <ClInclude Include="..\..\src\include\switch_spandsp.h" />\r
<ClInclude Include="..\..\src\include\switch_stun.h" />\r
<ClInclude Include="..\..\src\include\switch_types.h" />\r
<ClInclude Include="..\..\src\include\switch_utils.h" />\r