[Freeswitch-branches] [commit] r4768 - in freeswitch/branches/mikej/sofiasip-upgrade: . build build/config libs/apr-util libs/apr-util/build libs/apr-util/include/private libs/apr-util/xml/expat libs/apr-util/xml/expat/lib libs/apr/build libs/codec/gsm libs/iksemel/include libs/js libs/libdingaling/src libs/libetpan libs/libresample/src libs/libsndfile/src libs/libteletone libs/pcre libs/portaudio libs/portaudio/src/common libs/sofia-sip libs/srtp libs/srtp/doc libs/xmlrpc-c src src/include src/mod src/mod/applications/mod_conference src/mod/asr_tts/mod_lumenvox src/mod/codecs/mod_g723_1 src/mod/codecs/mod_g729 src/mod/dialplans/mod_dialplan_xml src/mod/endpoints/mod_iax src/mod/endpoints/mod_wanpipe src/mod/endpoints/mod_wanpipe/libsangoma src/mod/event_handlers/mod_cdr src/mod/formats/mod_shout src/mod/languages/mod_perl src/mod/languages/mod_spidermonkey_odbc src/mod/languages/mod_spidermonkey_teletone src/mod/loggers/mod_console src/mod/xml_int/mod_xml_rpc w32/Library
Freeswitch SVN
mikej at freeswitch.org
Mon Mar 26 14:45:37 EDT 2007
Author: mikej
Date: Mon Mar 26 14:45:37 2007
New Revision: 4768
Added:
freeswitch/branches/mikej/sofiasip-upgrade/build/config/ax_lib_mysql.m4
- copied unchanged from r4767, /freeswitch/trunk/build/config/ax_lib_mysql.m4
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/
- copied from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/g711.h
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/g711.h
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.dsp
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.dsp
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.dsw
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.dsw
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.h
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.h
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.so.conf
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.so.conf
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.vcproj
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.vcproj
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.c
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.c
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.h
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.h
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/libsangoma/win_api_common.h
- copied unchanged from r4767, /freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/win_api_common.h
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/event_handlers/mod_cdr/Makefile.am
- copied unchanged from r4767, /freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile.am
Removed:
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/build/apr_common.m4
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/build/find_apr.m4
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/build/get-version.sh
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/build/install.sh
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/acconfig.h
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/config.h.in
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/event_handlers/mod_cdr/Makefile
Modified:
freeswitch/branches/mikej/sofiasip-upgrade/Makefile.am
freeswitch/branches/mikej/sofiasip-upgrade/acinclude.m4
freeswitch/branches/mikej/sofiasip-upgrade/bootstrap.sh
freeswitch/branches/mikej/sofiasip-upgrade/build/getlib.sh.in
freeswitch/branches/mikej/sofiasip-upgrade/build/modmake.rules.in
freeswitch/branches/mikej/sofiasip-upgrade/configure.in
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/build/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/include/private/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/configure.in
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/lib/winconfig.h
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/lib/xmlparse.c
freeswitch/branches/mikej/sofiasip-upgrade/libs/apr/build/apr_common.m4
freeswitch/branches/mikej/sofiasip-upgrade/libs/codec/gsm/configure.in
freeswitch/branches/mikej/sofiasip-upgrade/libs/iksemel/include/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/js/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/libdingaling/src/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/libetpan/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/libresample/src/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/libsndfile/src/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/libteletone/configure.in
freeswitch/branches/mikej/sofiasip-upgrade/libs/pcre/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/portaudio/Makefile.in
freeswitch/branches/mikej/sofiasip-upgrade/libs/portaudio/src/common/pa_ringbuffer.c
freeswitch/branches/mikej/sofiasip-upgrade/libs/sofia-sip/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/srtp/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/srtp/doc/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/libs/xmlrpc-c/configure.gnu
freeswitch/branches/mikej/sofiasip-upgrade/src/include/ (props changed)
freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch.h
freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_config.h
freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_log.h
freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_resample.h
freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_types.h
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/Makefile.am
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/applications/mod_conference/mod_conference.c
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/asr_tts/mod_lumenvox/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/codecs/mod_g723_1/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/codecs/mod_g729/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/formats/mod_shout/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_perl/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_spidermonkey_odbc/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_spidermonkey_teletone/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/loggers/mod_console/mod_console.c
freeswitch/branches/mikej/sofiasip-upgrade/src/mod/xml_int/mod_xml_rpc/Makefile
freeswitch/branches/mikej/sofiasip-upgrade/src/switch_apr.c
freeswitch/branches/mikej/sofiasip-upgrade/src/switch_channel.c
freeswitch/branches/mikej/sofiasip-upgrade/src/switch_console.c
freeswitch/branches/mikej/sofiasip-upgrade/src/switch_ivr.c
freeswitch/branches/mikej/sofiasip-upgrade/src/switch_resample.c
freeswitch/branches/mikej/sofiasip-upgrade/src/switch_rtp.c
freeswitch/branches/mikej/sofiasip-upgrade/w32/Library/FreeSwitchCore.vcproj
Log:
merged changes from trunk revisions 4706-4767, except for revision 4747 (was hack fix that is now corrected properly in sofia)
Modified: freeswitch/branches/mikej/sofiasip-upgrade/Makefile.am
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/Makefile.am (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/Makefile.am Mon Mar 26 14:45:37 2007
@@ -25,7 +25,6 @@
src/switch_buffer.c \
src/switch_caller.c \
src/switch_channel.c \
-src/switch_config.c \
src/switch_console.c \
src/switch_core.c \
src/switch_core_db.c\
@@ -38,7 +37,10 @@
src/switch_ivr.c \
src/switch_stun.c\
src/switch_log.c\
-src/switch_xml.c
+src/switch_xml.c\
+libs/libteletone/src/libteletone_detect.c\
+libs/libteletone/src/libteletone_generate.c
+
library_includedir = $(PREFIX)/include
@@ -49,7 +51,6 @@
src/include/switch_buffer.h\
src/include/switch_caller.h\
src/include/switch_channel.h\
-src/include/switch_config.h\
src/include/switch_console.h\
src/include/switch_core.h\
src/include/switch_core_db.h\
@@ -66,7 +67,12 @@
src/include/switch_rtp.h\
src/include/switch_stun.h\
src/include/switch_log.h\
-src/include/switch_xml.h
+src/include/switch_xml.h\
+libs/libteletone/src/libteletone_detect.h\
+libs/libteletone/src/libteletone_generate.h\
+libs/libteletone/src/libteletone.h
+
+
CORE_CFLAGS = `$(switch_srcdir)/libs/apr/apr-1-config --cflags --cppflags --includes`
CORE_CFLAGS += `$(switch_srcdir)/libs/apr-util/apu-1-config --includes`
@@ -80,7 +86,6 @@
CORE_LIBS = libs/apr/libapr-1.la libs/apr-util/libaprutil-1.la
CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la
CORE_LIBS += libs/srtp/libsrtp.la libs/libresample/libresample.la
-CORE_LIBS += libs/libteletone/libteletone.la
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS)
@@ -93,11 +98,12 @@
CLEANFILES = src/include/switch_version.h
BUILT_SOURCES = src/include/switch_version.h
-bin_PROGRAMS = freeswitch
-freeswitch_SOURCES = src/switch.c
+bin_PROGRAMS = freeswitch
+freeswitch_SOURCES = src/switch.c
nodist_freeswitch_SOURCES = src/include/switch_version.h
freeswitch_CFLAGS = $(AM_CFLAGS)
-freeswitch_LDADD = ${MOD_LINK} libs/apr/libapr-1.la
+freeswitch_LDFLAGS = $(AM_LDFLAGS) -rpath $(libdir)
+freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
$(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/quiet_libtool
@@ -112,11 +118,6 @@
@if [ ! -f $(DESTDIR)$(PREFIX)/conf/freeswitch.xml ] ; then \
$(INSTALL) conf/*.xml $(DESTDIR)$(PREFIX)/conf ; \
fi
- @if [ -f .libs/$(NAME) ] ; then \
- $(INSTALL) .libs/$(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) ; \
- else \
- $(INSTALL) ./$(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) ;\
- fi
.version:
touch .version
@@ -170,10 +171,6 @@
@cd libs/srtp && $(MAKE)
@$(TOUCH_TARGET)
-libs/libteletone/libteletone.la: libs/libteletone libs/libteletone/.update
- @cd libs/libteletone && $(MAKE)
- @$(TOUCH_TARGET)
-
libs/libresample/libresample.la: libs/libresample libs/libresample/.update
@cd libs/libresample && $(MAKE)
@$(TOUCH_TARGET)
Modified: freeswitch/branches/mikej/sofiasip-upgrade/acinclude.m4
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/acinclude.m4 (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/acinclude.m4 Mon Mar 26 14:45:37 2007
@@ -4,5 +4,6 @@
m4_include([build/config/ax_check_compiler_flags.m4])
m4_include([build/config/ac_gcc_archflag.m4])
m4_include([build/config/ac_gcc_x86_cpuid.m4])
+m4_include([build/config/ax_lib_mysql.m4])
m4_include([libs/apr/build/apr_common.m4])
m4_include([libs/curl/docs/libcurl/libcurl.m4])
Modified: freeswitch/branches/mikej/sofiasip-upgrade/bootstrap.sh
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/bootstrap.sh (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/bootstrap.sh Mon Mar 26 14:45:37 2007
@@ -60,7 +60,7 @@
lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
if test -z "$lt_pversion"; then
echo "bootstrap: libtool not found."
-echo " You need libtool version 1.5.7 or newer installed"
+echo " You need libtool version 1.5.14 or newer installed"
echo " to build FreeSWITCH from SVN."
exit 1
fi
@@ -68,16 +68,18 @@
IFS=.; set $lt_version; IFS=' '
lt_status="good"
-if test "$1" = "1"; then
- if test "$2" -lt "5" -o "$2" = "5" -a "$3" -lt "22" || test ; then
+if test "$1" -lt "2"; then
+ if test "$2" -lt "5" -o "$2" = "5" -a "$3" -lt "14" ; then
lt_status="bad"
fi
+else
+ lt_status="bad"
fi
if test $lt_status = "good"; then
echo "bootstrap: libtool version $lt_pversion (ok)"
else
echo "bootstrap: libtool version $lt_pversion found."
-echo " You need libtool version 1.5.7 or newer installed"
+echo " You need libtool version 1.5.14 or newer installed"
echo " to build FreeSWITCH from SVN."
exit 1
Modified: freeswitch/branches/mikej/sofiasip-upgrade/build/getlib.sh.in
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/build/getlib.sh.in (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/build/getlib.sh.in Mon Mar 26 14:45:37 2007
@@ -13,8 +13,14 @@
fi
fi
-base=http://svn.freeswitch.org/downloads/libs
+base=http://svn.freeswitch.org/downloads/libs/
tarfile=$1
+url=`echo $tarfile | grep "://"`
+
+if [ ! -z $url ] ; then
+ base=$tarfile/
+ tarfile=$2
+fi
if [ ! -d $tarfile ] ; then
uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
@@ -22,7 +28,7 @@
if [ ! -f $tarfile ] ; then
rm -fr $uncompressed
- $DOWNLOAD_CMD $base/$tarfile
+ $DOWNLOAD_CMD $base$tarfile
if [ ! -f $tarfile ] ; then
echo cannot find $tarfile
exit 1
Modified: freeswitch/branches/mikej/sofiasip-upgrade/build/modmake.rules.in
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/build/modmake.rules.in (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/build/modmake.rules.in Mon Mar 26 14:45:37 2007
@@ -117,7 +117,7 @@
fi;
mod_clean:
- @rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *.lo *~ .libs
+ @rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *.lo *~ .libs $(LOCAL_OBJS)
mod_install: $(DESTDIR)$(PREFIX)/mod/$(MODNAME).$(DYNAMIC_LIB_EXTEN)
Modified: freeswitch/branches/mikej/sofiasip-upgrade/configure.in
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/configure.in (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/configure.in Mon Mar 26 14:45:37 2007
@@ -291,11 +291,16 @@
AC_ARG_ENABLE(crash-protection,
[ --enable-crash-protection Compile with CRASH Protection],,[enable_crash_prot="no"])
+#AX_LIB_MYSQL([MINIMUM-VERSION])
+AX_LIB_MYSQL
+
AM_CONDITIONAL([CRASHPROT],[test "x$enable_crash_prot" != "xno"])
+AM_CONDITIONAL([HAVE_MYSQL],[test "$have_mysql" = "yes"])
AC_CONFIG_FILES([Makefile
src/Makefile
src/mod/Makefile
+ src/mod/event_handlers/mod_cdr/Makefile
src/include/switch_am_config.h
build/getlib.sh
build/modmake.rules])
@@ -308,7 +313,6 @@
AC_CONFIG_SUBDIRS(libs/srtp)
AC_CONFIG_SUBDIRS(libs/sqlite)
AC_CONFIG_SUBDIRS(libs/libresample)
-AC_CONFIG_SUBDIRS(libs/libteletone)
AC_CONFIG_SUBDIRS(libs/pcre)
AC_CONFIG_SUBDIRS(libs/apr)
AC_CONFIG_SUBDIRS(libs/apr-util)
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/configure.in
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/configure.in (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/configure.in Mon Mar 26 14:45:37 2007
@@ -86,9 +86,19 @@
if test "$cross_compiling" = "no"; then
AC_C_BIGENDIAN
else
- AC_DEFINE(AP_UNKNOWN_BYTE_ORDER,1,
- [byte order is unknown due to cross-compilation])
+ AC_DEFINE(AP_UNKNOWN_BYTE_ORDER,1,[byte order is unknown due to cross-compilation])
fi
+
+if test "$ac_cv_c_bigendian" = "yes"; then
+ AC_DEFINE(XML_BYTE_ORDER,21,[21 for big endian or 12 for little])
+else
+ AC_DEFINE(XML_BYTE_ORDER,12,[z])
+fi
+
+AC_DEFINE(XML_NS,,[Define me])
+AC_DEFINE(XML_DTD,,[Define me])
+AC_DEFINE(XML_CONTEXT_BYTES,1024,[1024])
+
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/lib/winconfig.h
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/lib/winconfig.h (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/lib/winconfig.h Mon Mar 26 14:45:37 2007
@@ -23,5 +23,6 @@
#define XML_DTD 1
#define XML_BYTE_ORDER 12
#define XML_CONTEXT_BYTES 1024
+#define HAVE_MEMMOVE
#endif /* ndef WINCONFIG_H */
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/lib/xmlparse.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/lib/xmlparse.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/apr-util/xml/expat/lib/xmlparse.c Mon Mar 26 14:45:37 2007
@@ -14,6 +14,14 @@
#else
#include <config.h>
+#ifndef HAVE_MEMMOVE
+#ifdef HAVE_BCOPY
+#define memmove(d,s,l) bcopy((s),(d),(l))
+#else
+#define memmove(d,s,l) ;punting on memmove;
+#endif
+#endif
+
#ifdef HAVE_STRING_H
# include <string.h>
#endif
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/apr/build/apr_common.m4
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/apr/build/apr_common.m4 (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/apr/build/apr_common.m4 Mon Mar 26 14:45:37 2007
@@ -23,7 +23,7 @@
dnl
dnl Saves a snapshot of the configure command-line for later reuse
dnl
-AC_DEFUN(APR_CONFIG_NICE,[
+AC_DEFUN([APR_CONFIG_NICE],[
rm -f $1
cat >$1<<EOF
#! /bin/sh
@@ -80,7 +80,7 @@
dnl APR_MKDIR_P_CHECK(fallback-mkdir-p)
dnl checks whether mkdir -p works
-AC_DEFUN(APR_MKDIR_P_CHECK,[
+AC_DEFUN([APR_MKDIR_P_CHECK],[
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
test -d conftestdir && rm -rf conftestdir
mkdir -p conftestdir/somedir >/dev/null 2>&1
@@ -118,7 +118,7 @@
dnl Trying to optimize this is left as an exercise to the reader who wants
dnl to put up with more autoconf craziness. I give up.
dnl
-AC_DEFUN(APR_SUBDIR_CONFIG, [
+AC_DEFUN([APR_SUBDIR_CONFIG], [
# save our work to this point; this allows the sub-package to use it
AC_CACHE_SAVE
@@ -186,7 +186,7 @@
dnl
dnl Stores the variable (usually a Makefile macro) for later restoration
dnl
-AC_DEFUN(APR_SAVE_THE_ENVIRONMENT,[
+AC_DEFUN([APR_SAVE_THE_ENVIRONMENT],[
apr_ste_save_$1="$$1"
])dnl
@@ -198,7 +198,7 @@
dnl and restoring the original variable contents. This makes it possible
dnl for a user to override configure when it does something stupid.
dnl
-AC_DEFUN(APR_RESTORE_THE_ENVIRONMENT,[
+AC_DEFUN([APR_RESTORE_THE_ENVIRONMENT],[
if test "x$apr_ste_save_$1" = "x"; then
$2$1="$$1"
$1=
@@ -222,7 +222,7 @@
dnl
dnl Set variable iff it's currently null
dnl
-AC_DEFUN(APR_SETIFNULL,[
+AC_DEFUN([APR_SETIFNULL],[
if test -z "$$1"; then
test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
$1="$2"
@@ -234,7 +234,7 @@
dnl
dnl Set variable no matter what
dnl
-AC_DEFUN(APR_SETVAR,[
+AC_DEFUN([APR_SETVAR],[
test "x$silent" != "xyes" && echo " forcing $1 to \"$2\""
$1="$2"
])dnl
@@ -244,7 +244,7 @@
dnl
dnl Add value to variable
dnl
-AC_DEFUN(APR_ADDTO,[
+AC_DEFUN([APR_ADDTO],[
if test "x$$1" = "x"; then
test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
$1="$2"
@@ -271,7 +271,7 @@
dnl
dnl Remove a value from a variable
dnl
-AC_DEFUN(APR_REMOVEFROM,[
+AC_DEFUN([APR_REMOVEFROM],[
if test "x$$1" = "x$2"; then
test "x$silent" != "xyes" && echo " nulling $1"
$1=""
@@ -295,7 +295,7 @@
dnl
dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] )
dnl
-AC_DEFUN(APR_CHECK_DEFINE_FILES,[
+AC_DEFUN([APR_CHECK_DEFINE_FILES],[
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
ac_cv_define_$1=no
for curhdr in $2
@@ -317,7 +317,7 @@
dnl
dnl APR_CHECK_DEFINE(symbol, header_file)
dnl
-AC_DEFUN(APR_CHECK_DEFINE,[
+AC_DEFUN([APR_CHECK_DEFINE],[
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
AC_EGREP_CPP(YES_IS_DEFINED, [
#include <$2>
@@ -334,7 +334,7 @@
dnl
dnl APR_CHECK_APR_DEFINE( symbol )
dnl
-AC_DEFUN(APR_CHECK_APR_DEFINE,[
+AC_DEFUN([APR_CHECK_APR_DEFINE],[
apr_old_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $INCLUDES"
AC_EGREP_CPP(YES_IS_DEFINED, [
@@ -450,7 +450,7 @@
dnl A variant of AC_CHECK_SIZEOF which allows the checking of
dnl sizes of non-builtin types
dnl
-AC_DEFUN(APR_CHECK_SIZEOF_EXTENDED,
+AC_DEFUN([APR_CHECK_SIZEOF_EXTENDED],
[changequote(<<,>>)dnl
dnl The name to #define
define(<<AC_TYPE_NAME>>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
@@ -511,7 +511,7 @@
dnl string.
dnl
dnl
-AC_DEFUN(APR_CHECK_STRERROR_R_RC,[
+AC_DEFUN([APR_CHECK_STRERROR_R_RC],[
AC_MSG_CHECKING(for type of return code from strerror_r)
AC_TRY_RUN([
#include <errno.h>
@@ -546,7 +546,7 @@
dnl structure on this platform. Single UNIX Spec says d_ino,
dnl BSD uses d_fileno. Undef to find the real beast.
dnl
-AC_DEFUN(APR_CHECK_DIRENT_INODE, [
+AC_DEFUN([APR_CHECK_DIRENT_INODE], [
AC_CACHE_CHECK([for inode member of struct dirent], apr_cv_dirent_inode, [
apr_cv_dirent_inode=no
AC_TRY_COMPILE([
@@ -584,7 +584,7 @@
dnl Note that this is worthless without DT_xxx macros, so
dnl look for one while we are at it.
dnl
-AC_DEFUN(APR_CHECK_DIRENT_TYPE,[
+AC_DEFUN([APR_CHECK_DIRENT_TYPE],[
AC_CACHE_CHECK([for file type member of struct dirent], apr_cv_dirent_type,[
apr_cv_dirent_type=no
AC_TRY_COMPILE([
@@ -633,7 +633,7 @@
dnl all "." and "-" chars. If the 3rd parameter is "yes" then instead of
dnl setting to 1 or 0, we set FLAG-TO-SET to yes or no.
dnl
-AC_DEFUN(APR_FLAG_HEADERS,[
+AC_DEFUN([APR_FLAG_HEADERS],[
AC_CHECK_HEADERS($1)
for aprt_i in $1
do
@@ -654,7 +654,7 @@
dnl is "yes" then instead of setting to 1 or 0, we set FLAG-TO-SET
dnl to yes or no.
dnl
-AC_DEFUN(APR_FLAG_FUNCS,[
+AC_DEFUN([APR_FLAG_FUNCS],[
AC_CHECK_FUNCS($1)
for aprt_j in $1
do
@@ -679,7 +679,7 @@
dnl APR_EXPAND_VAR(fraz, $baz)
dnl $fraz is now "1/2/3"
dnl
-AC_DEFUN(APR_EXPAND_VAR,[
+AC_DEFUN([APR_EXPAND_VAR],[
ap_last=
ap_cur="$2"
while test "x${ap_cur}" != "x${ap_last}";
@@ -698,7 +698,7 @@
dnl orig_path="${prefix}/bar"
dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
dnl $final_path now contains "bar"
-AC_DEFUN(APR_PATH_RELATIVE,[
+AC_DEFUN([APR_PATH_RELATIVE],[
ap_stripped=`echo $2 | sed -e "s#^$3##"`
# check if the stripping was successful
if test "x$2" != "x${ap_stripped}"; then
@@ -716,12 +716,12 @@
dnl Note: this define must be on one line so that it can be properly returned
dnl as the help string. When using this macro with a multi-line RHS, ensure
dnl that you surround the macro invocation with []s
-AC_DEFUN(APR_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
+AC_DEFUN([APR_HELP_STRING],[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
dnl
dnl APR_LAYOUT(configlayout, layoutname [, extravars])
dnl
-AC_DEFUN(APR_LAYOUT,[
+AC_DEFUN([APR_LAYOUT],[
if test ! -f $srcdir/config.layout; then
echo "** Error: Layout file $srcdir/config.layout not found"
echo "** Error: Cannot use undefined layout '$LAYOUT'"
@@ -784,7 +784,7 @@
dnl
dnl APR_ENABLE_LAYOUT(default layout name [, extra vars])
dnl
-AC_DEFUN(APR_ENABLE_LAYOUT,[
+AC_DEFUN([APR_ENABLE_LAYOUT],[
AC_ARG_ENABLE(layout,
[ --enable-layout=LAYOUT],[
LAYOUT=$enableval
@@ -805,7 +805,7 @@
dnl a reimplementation of autoconf's argument parser,
dnl used here to allow us to co-exist layouts and argument based
dnl set ups.
-AC_DEFUN(APR_PARSE_ARGUMENTS,[
+AC_DEFUN([APR_PARSE_ARGUMENTS],[
ac_prev=
# Retrieve the command-line arguments. The eval is needed because
# the arguments are quoted to preserve accuracy.
@@ -931,7 +931,7 @@
dnl
dnl Determine what program we can use to generate .deps-style dependencies
dnl
-AC_DEFUN(APR_CHECK_DEPEND,[
+AC_DEFUN([APR_CHECK_DEPEND],[
dnl Try to determine what depend program we can use
dnl All GCC-variants should have -MM.
dnl If not, then we can check on those, too.
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/codec/gsm/configure.in
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/codec/gsm/configure.in (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/codec/gsm/configure.in Mon Mar 26 14:45:37 2007
@@ -5,7 +5,6 @@
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AM_INIT_AUTOMAKE(libgsm,0.1)
AC_CONFIG_SRCDIR([src])
-#AC_CONFIG_HEADER([])
# Checks for programs.
AC_PROG_CC
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/libteletone/configure.in
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/libteletone/configure.in (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/libteletone/configure.in Mon Mar 26 14:45:37 2007
@@ -6,7 +6,6 @@
AC_CONFIG_AUX_DIR(build)
AM_INIT_AUTOMAKE(libteletone,0.1)
AC_CONFIG_SRCDIR([src])
-#AC_CONFIG_HEADER([])
# Checks for programs.
AC_PROG_CC
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/portaudio/Makefile.in
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/portaudio/Makefile.in (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/portaudio/Makefile.in Mon Mar 26 14:45:37 2007
@@ -57,61 +57,61 @@
src/common/pa_trace.o
TESTS = \
- bin/paqa_devs \
- bin/paqa_errs \
- bin/patest1 \
- bin/patest_buffer \
- bin/patest_callbackstop \
- bin/patest_clip \
- bin/patest_dither \
- bin/patest_hang \
- bin/patest_in_overflow \
- bin/patest_latency \
- bin/patest_leftright \
- bin/patest_longsine \
- bin/patest_many \
- bin/patest_maxsines \
- bin/patest_multi_sine \
- bin/patest_out_underflow \
- bin/patest_pink \
- bin/patest_prime \
- bin/patest_read_record \
- bin/patest_read_write_wire \
- bin/patest_record \
- bin/patest_ringmix \
- bin/patest_saw \
- bin/patest_sine8 \
- bin/patest_sine \
- bin/patest_sine_formats \
- bin/patest_sine_time \
- bin/patest_start_stop \
- bin/patest_stop \
- bin/patest_stop_playout \
- bin/patest_toomanysines \
- bin/patest_underflow \
- bin/patest_wire \
- bin/patest_write_sine \
- bin/pa_devs \
- bin/pa_fuzz \
- bin/pa_minlat
+ test/paqa_devs \
+ test/paqa_errs \
+ test/patest1 \
+ test/patest_buffer \
+ test/patest_callbackstop \
+ test/patest_clip \
+ test/patest_dither \
+ test/patest_hang \
+ test/patest_in_overflow \
+ test/patest_latency \
+ test/patest_leftright \
+ test/patest_longsine \
+ test/patest_many \
+ test/patest_maxsines \
+ test/patest_multi_sine \
+ test/patest_out_underflow \
+ test/patest_pink \
+ test/patest_prime \
+ test/patest_read_record \
+ test/patest_read_write_wire \
+ test/patest_record \
+ test/patest_ringmix \
+ test/patest_saw \
+ test/patest_sine8 \
+ test/patest_sine \
+ test/patest_sine_formats \
+ test/patest_sine_time \
+ test/patest_start_stop \
+ test/patest_stop \
+ test/patest_stop_playout \
+ test/patest_toomanysines \
+ test/patest_underflow \
+ test/patest_wire \
+ test/patest_write_sine \
+ test/pa_devs \
+ test/pa_fuzz \
+ test/pa_minlat
# Most of these don't compile yet. Put them in TESTS, above, if
# you want to try to compile them...
ALL_TESTS = \
$(TESTS) \
- bin/patest_sync \
- bin/debug_convert \
- bin/debug_dither_calc \
- bin/debug_dual \
- bin/debug_multi_in \
- bin/debug_multi_out \
- bin/debug_record \
- bin/debug_record_reuse \
- bin/debug_sine_amp \
- bin/debug_sine \
- bin/debug_sine_formats \
- bin/debug_srate \
- bin/debug_test1
+ test/patest_sync \
+ test/debug_convert \
+ test/debug_dither_calc \
+ test/debug_dual \
+ test/debug_multi_in \
+ test/debug_multi_out \
+ test/debug_record \
+ test/debug_record_reuse \
+ test/debug_sine_amp \
+ test/debug_sine \
+ test/debug_sine_formats \
+ test/debug_srate \
+ test/debug_test1
OBJS = $(COMMON_OBJS) $(OTHER_OBJS)
@@ -128,9 +128,8 @@
lib/$(PALIB): lib-stamp $(LTOBJS) $(MAKEFILE) $(PAINC)
$(LIBTOOL) --mode=link $(CC) $(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS)
-$(ALL_TESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) test/%.c
- $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
-
+$(ALL_TESTS): lib/$(PALIB) $(MAKEFILE) $(PAINC)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/$@.c lib/$(PALIB) $(LIBS)
install: lib/$(PALIB) portaudio-2.0.pc
$(INSTALL) -d $(DESTDIR)$(libdir)
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/portaudio/src/common/pa_ringbuffer.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/portaudio/src/common/pa_ringbuffer.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/portaudio/src/common/pa_ringbuffer.c Mon Mar 26 14:45:37 2007
@@ -71,7 +71,7 @@
*
****************/
-#if defined(HAVE_LIBKERN_OSATOMIC_H) && defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(HAVE_LIBKERN_OSATOMIC_H) && (defined(__APPLE__) || defined(__FreeBSD__))
# include <libkern/OSAtomic.h>
/* Here are the memory barrier functions. Mac OS X and FreeBSD only provide
full memory barriers, so the three types of barriers are the same. */
Modified: freeswitch/branches/mikej/sofiasip-upgrade/libs/xmlrpc-c/configure.gnu
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/libs/xmlrpc-c/configure.gnu (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/libs/xmlrpc-c/configure.gnu Mon Mar 26 14:45:37 2007
@@ -1,2 +1,2 @@
#! /bin/sh
-./configure "$@" --disable-cplusplus --disable-wininet-client --disable-libwww-client --disable-shared --with-pic
+./configure "$@" --disable-cplusplus --disable-wininet-client --disable-libwww-client --disable-shared --with-pic --disable-curl-client
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch.h
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch.h (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch.h Mon Mar 26 14:45:37 2007
@@ -79,7 +79,6 @@
#include <switch_console.h>
#include <switch_utils.h>
#include <switch_caller.h>
-#include <switch_config.h>
#include <switch_frame.h>
#include <switch_module_interfaces.h>
#include <switch_channel.h>
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_config.h
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_config.h (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_config.h Mon Mar 26 14:45:37 2007
@@ -60,6 +60,8 @@
SWITCH_BEGIN_EXTERN_C
+typedef struct switch_config switch_config_t;
+
/*! \brief A simple file handle representing an open configuration file **/
struct switch_config {
/*! FILE stream buffer to the opened file */
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_log.h
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_log.h (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_log.h Mon Mar 26 14:45:37 2007
@@ -64,6 +64,9 @@
switch_time_t timestamp;
/*! A pointer to where the actual content of the message starts (skipping past the preformatted portion) */
char *content;
+
+ /* To maintain abi, only add new elements to the end of this struct and do not delete any elements */
+
} switch_log_node_t;
typedef switch_status_t (*switch_log_function_t)(const switch_log_node_t *node, switch_log_level_t level);
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_resample.h
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_resample.h (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_resample.h Mon Mar 26 14:45:37 2007
@@ -155,6 +155,14 @@
SWITCH_DECLARE(void) switch_swap_linear(int16_t *buf, int len);
/*!
+ \brief Generate static noise
+ \param data the audio data buffer
+ \param samples the number of 2 byte samples
+ \param divisor the volume factor
+ */
+SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples, uint32_t divisor);
+
+/*!
\brief Change the volume of a signed linear audio frame
\param data the audio data
\param samples the number of 2 byte samples
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_types.h
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_types.h (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/include/switch_types.h Mon Mar 26 14:45:37 2007
@@ -943,7 +943,6 @@
typedef struct switch_codec_implementation switch_codec_implementation_t;
typedef struct switch_buffer switch_buffer_t;
typedef struct switch_codec_settings switch_codec_settings_t;
-typedef struct switch_config switch_config_t;
typedef struct switch_io_event_hook_outgoing_channel switch_io_event_hook_outgoing_channel_t;
typedef struct switch_io_event_hook_answer_channel switch_io_event_hook_answer_channel_t;
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/Makefile.am
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/Makefile.am (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/Makefile.am Mon Mar 26 14:45:37 2007
@@ -1,9 +1,9 @@
CONF_MODULES=if test ! -f $(switch_builddir)/modules.conf ; then cp $(switch_builddir)/build/modules.conf.in $(switch_builddir)/modules.conf ; fi ; conf_modules=`grep -v "\#" $(switch_builddir)/modules.conf` ;
FOUND_MODULES=found_modules=`find . -type d -name mod_\* | sed -e 's|^\./||'` ;
-OUR_MODULES=if test -z "$(MODULES)" ; then our_modules=$$conf_modules ; else our_modules=$(MODULES) ; fi ;
+OUR_MODULES=if test -z "$(MODULES)" ; then our_modules=$$conf_modules ; else our_modules="$(MODULES)" ; fi ;
OUR_CLEAN_MODULES=if test -z "$(MODULES)" ; then tmp_clean_modules=`echo $$conf_modules $$found_modules`; \
our_clean_modules=`for i in $$tmp_clean_modules ; do echo $$i ; done | sort | uniq` ; \
- else our_clean_modules=$(MODULES) ; fi ;
+ else our_clean_modules="$(MODULES)" ; fi ;
MOD_NAME=`echo $$i | sed -e 's|^.*/||'`
MOD_DIR=`if test -d $(switch_srcdir)/src/mod/$$i ; then echo $(switch_srcdir)/src/mod/$$i ; else echo $$i ; fi;`
AM_MAKEFLAGS = `test -n "$(VERBOSE)" || echo -s`
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/applications/mod_conference/mod_conference.c Mon Mar 26 14:45:37 2007
@@ -735,7 +735,7 @@
if (conference->fnode->leadin) {
conference->fnode->leadin--;
} else {
- ready++;
+ file_sample_len = samples;
if (conference->fnode->type == NODE_TYPE_SPEECH) {
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_BLOCKING;
uint32_t rate = conference->rate;
@@ -758,34 +758,40 @@
}
}
has_file_data = 1;
+ ready++;
} else {
has_file_data = 0;
}
if (conference->async_fnode) {
- switch_core_file_read(&conference->async_fnode->fh, async_file_frame, &file_sample_len);
-
- if (file_sample_len <= 0) {
- conference->async_fnode->done++;
+ /* Lead in time */
+ if (conference->async_fnode->leadin) {
+ conference->async_fnode->leadin--;
} else {
- if (has_file_data) {
- switch_size_t x;
- for (x = 0; x < file_sample_len; x++) {
- int32_t z;
- int16_t *bptr, *muxed;
-
- muxed = (int16_t *) file_frame;
- bptr = (int16_t *) async_file_frame;
- z = muxed[x] + bptr[x];
- switch_normalize_to_16bit(z);
- muxed[x] = (int16_t)z;
- }
+ file_sample_len = samples;
+ switch_core_file_read(&conference->async_fnode->fh, async_file_frame, &file_sample_len);
+ if (file_sample_len <= 0) {
+ conference->async_fnode->done++;
} else {
- memcpy(file_frame, async_file_frame, file_sample_len * 2);
- has_file_data = 1;
+ if (has_file_data) {
+ switch_size_t x;
+ for (x = 0; x < file_sample_len; x++) {
+ int32_t z;
+ int16_t *bptr, *muxed;
+
+ muxed = (int16_t *) file_frame;
+ bptr = (int16_t *) async_file_frame;
+ z = muxed[x] + bptr[x];
+ switch_normalize_to_16bit(z);
+ muxed[x] = (int16_t)z;
+ }
+ } else {
+ memcpy(file_frame, async_file_frame, file_sample_len * 2);
+ has_file_data = 1;
+ ready++;
+ }
}
}
-
}
if (ready) {
@@ -833,22 +839,22 @@
if (imember->read > imember->len) {
imember->len = imember->read;
}
-
+
bptr = (int16_t *) imember->frame;
muxed = (int16_t *) omember->mux_frame;
-
+
for (x = 0; x < imember->read / 2; x++) {
int32_t z = muxed[x] + bptr[x];
switch_normalize_to_16bit(z);
muxed[x] = (int16_t)z;
}
-
+
ready++;
}
}
}
-
+
/* Go back and write each member his dedicated copy of the audio frame that does not contain his own audio. */
for (imember = conference->members; imember; imember = imember->next) {
if (switch_test_flag(imember, MFLAG_RUNNING)) {
@@ -1466,7 +1472,7 @@
samples,
NULL) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "setup timer %s success interval: %u samples: %u\n",
- member->conference->timer_name, member->conference->interval, samples);
+ member->conference->timer_name, interval, samples);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Timer Setup Failed. Conference Cannot Start\n");
return;
@@ -1696,7 +1702,7 @@
} else {
if (switch_test_flag(member, MFLAG_WASTE_BANDWIDTH)) {
- memset(write_frame.data, 255, bytes);
+ switch_generate_sln_silence(write_frame.data, samples, 1400);
write_frame.datalen = bytes;
write_frame.samples = samples;
write_frame.timestamp = timer.samplecount;
@@ -1958,7 +1964,7 @@
}
}
- if (!strncasecmp(file, "say:", 4)) {
+ if (!async && !strncasecmp(file, "say:", 4)) {
status = conference_say(conference, file + 4, leadin);
goto done;
}
@@ -1969,10 +1975,12 @@
goto done;
}
file = dfile;
- } else {
+ } else if (!async) {
status = conference_say(conference, file, leadin);
goto done;
- }
+ } else {
+ goto done;
+ }
}
/* Setup a memory pool to use. */
@@ -2017,8 +2025,10 @@
conference->async_fnode = fnode;
if (nptr) {
- switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_NONE;
- switch_core_speech_close(&conference->fnode->sh, &flags);
+ switch_memory_pool_t *pool;
+ switch_core_file_close(&nptr->fh);
+ pool = nptr->pool;
+ switch_core_destroy_memory_pool(&pool);
}
} else {
@@ -4046,10 +4056,12 @@
NULL,
member.pool) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Success L16@%uhz 1 channel %dms\n",
- conference->rate, conference->interval);
+ read_codec->implementation->samples_per_second,
+ read_codec->implementation->microseconds_per_frame / 1000);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n",
- conference->rate, conference->interval);
+ read_codec->implementation->samples_per_second,
+ read_codec->implementation->microseconds_per_frame / 1000);
flags = 0;
goto done;
}
@@ -4075,17 +4087,19 @@
if (switch_core_codec_init(&member.write_codec,
"L16",
NULL,
- conference->rate,
- conference->interval,
+ read_codec->implementation->samples_per_second,
+ read_codec->implementation->microseconds_per_frame / 1000,
1,
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
NULL,
member.pool) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Success L16@%uhz 1 channel %dms\n",
- conference->rate, conference->interval);
+ read_codec->implementation->samples_per_second,
+ read_codec->implementation->microseconds_per_frame / 1000);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n",
- conference->rate, conference->interval);
+ read_codec->implementation->samples_per_second,
+ read_codec->implementation->microseconds_per_frame / 1000);
flags = 0;
goto codec_done2;
}
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/asr_tts/mod_lumenvox/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/asr_tts/mod_lumenvox/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/asr_tts/mod_lumenvox/Makefile Mon Mar 26 14:45:37 2007
@@ -3,9 +3,9 @@
# and define these variables to impact your build
-LOCAL_CFLAGS= -fpermissive -Wno-deprecated -Wno-conversion -fpermissive -Wno-unused -Wno-comment -Wno-sign-compare \
- -Wno-conversion -Wno-reorder -I/opt/lumenvox/eng\ine_7.0/include
-LOCAL_LDFLAGS= -L/opt/lumenvox/engine_7.0/lib -llv_lvspeechport
-LOCAL_OBJS=
+LVENGINE_DIR=/opt/lumenvox/engine_7.0
+LOCAL_CFLAGS= -fpermissive -Wno-deprecated -Wno-conversion -fpermissive -Wno-unused
+LOCAL_CFLAGS+= -Wno-comment -Wno-sign-compare -Wno-conversion -Wno-reorder -I$(LVINCLUDE)
+LOCAL_LDFLAGS= -L$(LVLIB) -llv_lvspeechport
include ../../../../build/modmake.rules
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/codecs/mod_g723_1/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/codecs/mod_g723_1/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/codecs/mod_g723_1/Makefile Mon Mar 26 14:45:37 2007
@@ -1,6 +1,8 @@
BASE=../../../..
+DIR=$(BASE)/libs/libg723_1
+A=$(DIR)/.libs/libg723.a
-LOCAL_INSERT_CFLAGS=if test -d $(BASE)/libs/libg723_1; then echo "-I$(PREFIX)/include/g723" ; else echo "-DG723_PASSTHROUGH" ; fi ;
-LOCAL_INSERT_LDFLAGS=test ! -d $(BASE)/libs/libg723_1 || echo "-lg723"
+LOCAL_INSERT_CFLAGS=if test -f $(A); then echo "-I$(DIR)/src/include" ; else echo "-DG723_PASSTHROUGH" ; fi ;
+LOCAL_INSERT_LDFLAGS=test ! -f $(A) || echo $(A)
include $(BASE)/build/modmake.rules
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/codecs/mod_g729/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/codecs/mod_g729/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/codecs/mod_g729/Makefile Mon Mar 26 14:45:37 2007
@@ -1,4 +1,7 @@
BASE=../../../..
-LOCAL_INSERT_CFLAGS=if test -d $(BASE)/libs/libg729; then echo "-I$(PREFIX)/include/libg729" ; else echo "-DG729_PASSTHROUGH" ; fi ;
-LOCAL_INSERT_LDFLAGS=test ! -d $(BASE)/libs/libg729 || echo "-lg729"
+DIR=$(BASE)/libs/libg729
+A=$(DIR)/.libs/libg729.a
+
+LOCAL_INSERT_CFLAGS=if test -f $(A); then echo "-I$(DIR)/src/include" ; else echo "-DG729_PASSTHROUGH" ; fi ;
+LOCAL_INSERT_LDFLAGS=test ! -f $(A) || echo $(A)
include $(BASE)/build/modmake.rules
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c Mon Mar 26 14:45:37 2007
@@ -34,11 +34,8 @@
#include <sys/stat.h>
#include <fcntl.h>
-
static const char modname[] = "mod_dialplan_xml";
-
-
typedef enum {
BREAK_ON_TRUE,
BREAK_ON_FALSE,
@@ -193,36 +190,26 @@
return proceed;
}
-static switch_caller_extension_t *dialplan_hunt(switch_core_session_t *session, void *arg)
+static switch_status_t dialplan_xml_locate(switch_core_session_t *session,
+ switch_caller_profile_t *caller_profile,
+ switch_xml_t *root,
+ switch_xml_t *node)
{
- switch_caller_profile_t *caller_profile;
- switch_caller_extension_t *extension = NULL;
+ switch_status_t status = SWITCH_STATUS_GENERR;
switch_channel_t *channel;
- switch_xml_t alt_root = NULL, cfg, xml, xcontext, xexten;
- char *context = NULL;
switch_stream_handle_t stream = {0};
switch_size_t encode_len = 1024, new_len = 0;
char *encode_buf = NULL;
char *prof[12] = {0}, *prof_names[12] = {0}, *e = NULL;
switch_hash_index_t *hi;
uint32_t x = 0;
- char *alt_path = (char *) arg;
channel = switch_core_session_get_channel(session);
- if ((caller_profile = switch_channel_get_caller_profile(channel))) {
- context = caller_profile->context ? caller_profile->context : "default";
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Obtaining Profile!\n");
- return NULL;
- }
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Processing %s->%s!\n", caller_profile->caller_id_name,
- caller_profile->destination_number);
SWITCH_STANDARD_STREAM(stream);
if (!(encode_buf = malloc(encode_len))) {
- return NULL;
+ goto done;
}
prof[0] = caller_profile->context;
@@ -250,6 +237,9 @@
prof_names[10] = "uuid";
for (x = 0; prof[x]; x++) {
+ if (switch_strlen_zero(prof[x])) {
+ continue;
+ }
new_len = (strlen(prof[x]) * 3) + 1;
if (encode_len < new_len) {
char *tmp;
@@ -257,8 +247,7 @@
encode_len = new_len;
if (!(tmp = realloc(encode_buf, encode_len))) {
- switch_safe_free(encode_buf);
- return NULL;
+ goto done;
}
encode_buf = tmp;
@@ -280,8 +269,7 @@
encode_len = new_len;
if (!(tmp = realloc(encode_buf, encode_len))) {
- switch_safe_free(encode_buf);
- return NULL;
+ goto done;
}
encode_buf = tmp;
@@ -298,11 +286,43 @@
*e = '\0';
}
- if (!switch_strlen_zero(alt_path)) {
+ status = switch_xml_locate("dialplan", NULL, NULL, NULL, root, node, stream.data);
+
+done:
+ switch_safe_free(stream.data);
+ switch_safe_free(encode_buf);
+ return status;
+}
+
+static switch_caller_extension_t *dialplan_hunt(switch_core_session_t *session, void *arg)
+{
+ switch_caller_profile_t *caller_profile;
+ switch_caller_extension_t *extension = NULL;
+ switch_channel_t *channel;
+ switch_xml_t alt_root = NULL, cfg, xml = NULL, xcontext, xexten;
+ char *alt_path = (char *) arg;
+
+ channel = switch_core_session_get_channel(session);
+
+ if ((caller_profile = switch_channel_get_caller_profile(channel))) {
+ if (!caller_profile->context) {
+ caller_profile->context = "default";
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Obtaining Profile!\n");
+ goto done;
+ }
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Processing %s->%s!\n", caller_profile->caller_id_name,
+ caller_profile->destination_number);
+
+ /* get our handle to the "dialplan" section of the config */
+
+ if (!switch_strlen_zero(alt_path)) {
switch_xml_t conf = NULL, tag = NULL;
if (!(alt_root = switch_xml_parse_file(alt_path))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of [%s] failed\n", alt_path);
- return NULL;
+ goto done;
}
if ((conf = switch_xml_find_child(alt_root, "section", "name", "dialplan")) &&
@@ -312,22 +332,20 @@
cfg = tag;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of dialplan failed\n");
- return NULL;
+ goto done;
}
- } else if (switch_xml_locate("dialplan", NULL, NULL, NULL, &xml, &cfg, stream.data) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of dialplan failed\n");
- return NULL;
+ } else {
+ if (dialplan_xml_locate(session, caller_profile, &xml, &cfg) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of dialplan failed\n");
+ goto done;
+ }
}
-
- switch_safe_free(stream.data);
- switch_safe_free(encode_buf);
-
- if (!(xcontext = switch_xml_find_child(cfg, "context", "name", context))) {
+ /* get a handle to the context tag */
+ if (!(xcontext = switch_xml_find_child(cfg, "context", "name", caller_profile->context))) {
if (!(xcontext = switch_xml_find_child(cfg, "context", "name", "global"))) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "context %s not found\n", context);
- switch_xml_free(xml);
- return NULL;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "context %s not found\n", caller_profile->context);
+ goto done;
}
}
@@ -355,6 +373,8 @@
switch_channel_set_state(channel, CS_EXECUTE);
}
+done:
+ switch_xml_free(xml);
return extension;
}
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_iax/mod_iax.c Mon Mar 26 14:45:37 2007
@@ -587,9 +587,7 @@
default:
break;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL KILL\n", switch_channel_get_name(channel));
-
-
+
return SWITCH_STATUS_SUCCESS;
}
@@ -649,7 +647,8 @@
private_t *tech_pvt = NULL;
switch_time_t started = switch_time_now();
unsigned int elapsed;
-
+ switch_byte_t *data;
+
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -703,12 +702,14 @@
return SWITCH_STATUS_FALSE;
cng:
- tech_pvt->read_frame.datalen = 13;
- memset(tech_pvt->read_frame.data, 0, 13);
+ data = (switch_byte_t *) tech_pvt->read_frame.data;
+ data[0] = 65;
+ data[1] = 0;
+ tech_pvt->read_frame.datalen = 2;
tech_pvt->read_frame.flags = SFF_CNG;
*frame = &tech_pvt->read_frame;
return SWITCH_STATUS_SUCCESS;
-
+
}
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/Makefile Mon Mar 26 14:45:37 2007
@@ -1,10 +1,36 @@
BASE=../../../..
-LOCAL_CFLAGS =-I/usr/local/include -I/usr/src/libpri -I/usr/src/linux/include -I. -I/usr/include
-LOCAL_CFLAGS +=-D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -DAFT_A104 -DWANPIPE_TDM_API -I$(switch_srcdir)/libs/libteletone/src
-LOCAL_CFLAGS +=-w
-LOCAL_LDFLAGS=-lsangoma $(BASE)/libs/libteletone/libteletone.la
-LOCAL_OBJS=ss7boost_client.o
-include $(BASE)/build/modmake.rules
+LIBPRI_HOST=http://ftp.digium.com/pub/libpri
+LIBPRI=libpri-1.2.4
+LIBPRI_FILE=$(LIBPRI).tar.gz
+LIBPRI_DIR=$(BASE)/libs/$(LIBPRI)
+WANPIPE=wanpipe-3.1.0.p13
+WANPIPE_HOST=ftp://ftp.sangoma.com/linux/custom/3.1
+WANPIPE_FILE=$(WANPIPE).tgz
+WANPIPE_DIR=$(BASE)/libs/$(WANPIPE)
+WANPIPE_INCLUDE=$(WANPIPE_DIR)/patches/kdrivers/include
+WANPIPE_KO=$(WANPIPE_DIR)/patches/kdrivers/src/net/wanpipe.ko
+WANPIPE_INSTALLED_KO=$(shell echo "/lib/modules/`uname -r`/kernel/drivers/net/wan/wanpipe.ko")
+LIBSANGOMA_DIR=$(WANPIPE_DIR)/api/libsangoma
+LOCAL_CFLAGS =-w -I$(WANPIPE_INCLUDE) -I$(LIBSANGOMA_DIR) -I/usr/local/include -I$(LIBPRI_DIR) -I/usr/src/linux/include -I. -I/usr/include
+LOCAL_CFLAGS +=-D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -DAFT_A104 -DWANPIPE_TDM_API -I$(switch_srcdir)/libs/libteletone/src -D_GNUC_ -DWANPIPE_TDM_API
+LOCAL_OBJS = ss7boost_client.o $(LIBPRI_DIR)/copy_string.o $(LIBPRI_DIR)/pri.o $(LIBPRI_DIR)/q921.o $(LIBPRI_DIR)/prisched.o $(LIBPRI_DIR)/q931.o $(LIBPRI_DIR)/pri_facility.o $(LIBSANGOMA_DIR)/libsangoma.o $(LIBSANGOMA_DIR)/sangoma_pri.o
+
+include $(BASE)/build/modmake.rules
+
+$(LIBPRI_DIR):
+ $(GETLIB) $(LIBPRI_HOST) $(LIBPRI_FILE)
+
+$(WANPIPE_DIR):
+ $(GETLIB) $(WANPIPE_HOST) $(WANPIPE_FILE)
+
+$(WANPIPE_KO): $(WANPIPE_DIR)
+ cd $(WANPIPE_DIR) && $(MAKE)
+ @$(TOUCH_TARGET)
+
+$(WANPIPE_INSTALLED_KO): $(WANPIPE_KO)
+ cd $(WANPIPE_DIR) && $(MAKE) install
+
+local_depend: $(LIBPRI_DIR) $(WANPIPE_KO)
+
+local_install: $(WANPIPE_INSTALLED_KO)
-local_depend:
- MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libsangoma --prefix=$(PREFIX) --with-libpri=/usr/src/libpri
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Mon Mar 26 14:45:37 2007
@@ -80,7 +80,6 @@
char map[SANGOMA_MAX_CHAN_PER_SPAN][SWITCH_UUID_FORMATTED_LENGTH + 1];
};
-
unsigned int txseq=0;
unsigned int rxseq=0;
@@ -116,6 +115,8 @@
switch_mutex_t *hash_mutex;
switch_mutex_t *channel_mutex;
ss7boost_handle_t *ss7boost_handle;
+ uint32_t fxo_index;
+ uint32_t fxs_index;
} globals;
struct wanpipe_pri_span {
@@ -138,6 +139,37 @@
typedef struct wpsock wpsock_t;
+typedef enum {
+ ANALOG_TYPE_UNKNOWN,
+ ANALOG_TYPE_PHONE_FXS,
+ ANLOG_TYPE_LINE_FXO
+} analog_type_t;
+
+typedef enum {
+ ANALOG_STATE_DOWN,
+ ANALOG_STATE_ONHOOK,
+ ANALOG_STATE_OFFHOOK,
+ ANALOG_STATE_RING
+} analog_state_t;
+
+struct analog_channel {
+ analog_type_t a_type;
+ analog_state_t state;
+ wpsock_t *sock;
+ int chan;
+ int span;
+ char *device;
+ char *user;
+ char *domain;
+ char *cid_name;
+ char *cid_num;
+};
+typedef struct analog_channel analog_channel_t;
+
+#define MAX_ANALOG_CHANNELS 128
+static struct analog_channel *FXS_ANALOG_CHANNELS[MAX_ANALOG_CHANNELS];
+static struct analog_channel *FXO_ANALOG_CHANNELS[MAX_ANALOG_CHANNELS];
+
static struct wanpipe_pri_span *SPANS[MAX_SPANS];
struct private_object {
@@ -176,6 +208,105 @@
};
typedef struct private_object private_object_t;
+
+
+static int local_sangoma_tdm_read_event(sng_fd_t fd, wp_tdm_api_rx_hdr_t *rx_event)
+{
+ wanpipe_tdm_api_t tdm_api[1];
+
+#if defined(WIN32)
+ rx_event = &last_tdm_api_event_buffer;
+#else
+ int err;
+
+ tdm_api->wp_tdm_cmd.cmd = SIOC_WP_TDM_READ_EVENT;
+
+ if ((err = sangoma_tdm_cmd_exec(fd, tdm_api))) {
+ return err;
+ }
+
+ rx_event = &tdm_api->wp_tdm_cmd.event;
+#endif
+
+ return 0;
+}
+
+static int analog_set_state(analog_channel_t *alc, analog_state_t state)
+{
+ alc->state = state;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Changing State to %d\n", state);
+}
+
+static void analog_check_state(analog_channel_t *alc)
+{
+ wanpipe_tdm_api_t tdm_api;
+
+ switch(alc->state) {
+ case ANALOG_STATE_DOWN:
+ sangoma_tdm_enable_rxhook_events(alc->sock->fd, &tdm_api);
+ analog_set_state(alc, ANALOG_STATE_ONHOOK);
+ break;
+ default:
+ break;
+ }
+}
+
+static void analog_parse_event(analog_channel_t *alc)
+{
+ wp_tdm_api_rx_hdr_t rx_event;
+ int err = local_sangoma_tdm_read_event(alc->sock->fd, &rx_event);
+
+ if (err < 0) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error reading event!\n");
+ return;
+ }
+
+ switch (rx_event.wp_tdm_api_event_type) {
+ case WP_TDM_EVENT_RXHOOK:
+ printf("hook\n");
+ break;
+ }
+
+}
+
+static void *SWITCH_THREAD_FUNC fxs_thread_run(switch_thread_t *thread, void *obj)
+{
+
+ for(;;) {
+ int i = 0, sel_on = -1;
+ fd_set oob;
+ FD_ZERO(&oob);
+
+ for(i = 0; i < globals.fxs_index; i++) {
+ int fd;
+ assert(FXS_ANALOG_CHANNELS[i]);
+ assert(FXS_ANALOG_CHANNELS[i]->sock);
+
+ fd = FXS_ANALOG_CHANNELS[i]->sock->fd;
+
+ analog_check_state(FXS_ANALOG_CHANNELS[i]);
+
+ FD_SET(fd, &oob);
+
+ if (fd > sel_on) {
+ sel_on = fd;
+ }
+ }
+
+ if (sel_on > -1) {
+ if (select(++sel_on, NULL, NULL, &oob, NULL)) {
+ for(i = 0; i < globals.fxs_index; i++) {
+ int fd = FXS_ANALOG_CHANNELS[i]->sock->fd;
+ if (FD_ISSET(fd, &oob)) {
+ analog_parse_event(FXS_ANALOG_CHANNELS[i]);
+ }
+ }
+ }
+ }
+ }
+}
+
+
static int wp_close(private_object_t *tech_pvt)
{
int ret = 0;
@@ -190,7 +321,7 @@
return ret;
}
-static int wp_open(private_object_t *tech_pvt, int span, int chan)
+static wpsock_t *wp_open(private_object_t *tech_pvt, int span, int chan)
{
sng_fd_t fd;
wpsock_t *sock;
@@ -212,7 +343,7 @@
}
}
- if (sock) {
+ if (sock && tech_pvt) {
if (sock->tech_pvt) {
if (tech_pvt->session) {
switch_channel_t *channel = switch_core_session_get_channel(tech_pvt->session);
@@ -225,7 +356,7 @@
switch_mutex_unlock(globals.hash_mutex);
- return sock ? 1 : 0;
+ return sock;
}
static int wp_restart(int span, int chan)
@@ -2038,7 +2169,7 @@
{
char *cf = "wanpipe.conf";
int current_span = 0, min_span = 0, max_span = 0;
- switch_xml_t cfg, xml, settings, param, pri_spans, ss7boost_handles, span;
+ switch_xml_t cfg, xml, settings, param, pri_spans, ss7boost_handles, span, analog_channels, channel;
globals.samples_per_frame = DEFAULT_SAMPLES_PER_FRAME;
globals.dtmf_on = 150;
@@ -2112,6 +2243,102 @@
break;
}
+ analog_channels = switch_xml_child(cfg, "analog_channels");
+ for(channel = switch_xml_child(analog_channels, "channel"); channel; channel = channel->next) {
+ char *c_type = (char *) switch_xml_attr(channel, "type");
+ char *c_dev = (char *) switch_xml_attr(channel, "device");
+ char *user = NULL;
+ char *domain = NULL;
+ char *cid_name = NULL, *cid_num = NULL;
+ analog_channel_t *alc;
+ analog_type_t a_type = ANALOG_TYPE_UNKNOWN;
+ wpsock_t *sock;
+ int chan, span;
+
+ if (!c_type) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing required attribute 'type'\n");
+ continue;
+ }
+
+ if (!strcasecmp(c_type, "phone") || !strcasecmp(c_type, "fxs")) {
+ a_type = ANALOG_TYPE_PHONE_FXS;
+ } else if (!strcasecmp(c_type, "line") || !strcasecmp(c_type, "fxo")) {
+ a_type = ANLOG_TYPE_LINE_FXO;
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid type '%s'\n", c_type);
+ continue;
+ }
+
+ if (!c_dev) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing required attribute 'device'\n");
+ continue;
+ }
+
+ if (!sangoma_span_chan_fromif(c_dev, &span, &chan)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid device name '%s'\n", c_dev);
+ continue;
+ }
+
+ if (!(sock = wp_open(NULL, span, chan))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot open device '%s' (%s)\n", c_dev, strerror(errno));
+ continue;
+ }
+
+ for (param = switch_xml_child(channel, "param"); param; param = param->next) {
+ char *var = (char *) switch_xml_attr_soft(param, "name");
+ char *val = (char *) switch_xml_attr_soft(param, "value");
+
+ if (!strcasecmp(var, "user")) {
+ user = var;
+ } else if (!strcasecmp(var, "domain")) {
+ domain = val;
+ } else if (!strcasecmp(var, "caller-id-name")) {
+ cid_name = val;
+ } else if (!strcasecmp(var, "caller-id-number")) {
+ cid_num = val;
+ }
+ }
+
+ assert((alc = malloc(sizeof(*alc))));
+ memset(alc, 0, sizeof(*alc));
+ if (user) {
+ alc->user = strdup(user);
+ }
+ if (domain) {
+ alc->domain = strdup(domain);
+ }
+ if (cid_name) {
+ alc->cid_name = strdup(cid_name);
+ }
+ if (cid_num) {
+ alc->cid_name = strdup(cid_num);
+ }
+
+ alc->a_type = a_type;
+ alc->sock = sock;
+ alc->chan = chan;
+ alc->span = span;
+
+ if (a_type == ANALOG_TYPE_PHONE_FXS) {
+ FXS_ANALOG_CHANNELS[globals.fxs_index++] = alc;
+ } else {
+ FXO_ANALOG_CHANNELS[globals.fxo_index++] = alc;
+ }
+ }
+
+
+ if (globals.fxs_index) {
+ switch_thread_t *thread;
+ switch_threadattr_t *thd_attr = NULL;
+
+ switch_threadattr_create(&thd_attr, module_pool);
+ switch_threadattr_detach_set(thd_attr, 1);
+ switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
+ switch_thread_create(&thread, thd_attr, fxs_thread_run, NULL, module_pool);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Starting FXS Thread!\n");
+ }
+
+
pri_spans = switch_xml_child(cfg, "pri_spans");
for (span = switch_xml_child(pri_spans, "span"); span; span = span->next) {
char *id = (char *) switch_xml_attr(span, "id");
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/formats/mod_shout/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/formats/mod_shout/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/formats/mod_shout/Makefile Mon Mar 26 14:45:37 2007
@@ -11,8 +11,9 @@
SHOUTLA=$(SHOUT_DIR)/src/libshout.la
LOCAL_CFLAGS=-I$(SHOUT_DIR)/include -I$(LAME_DIR)/include
-LOCAL_LIBADD=$(LAMELA) $(SHOUTLA)
+LOCAL_LIBADD=$(LAMELA) $(SHOUTLA)
+LOCAL_LDFLAGS=`cat ../../../../libs/libshout-2.2.2/Makefile | grep SPEEX_LIBS | sed -e 's|^SPEEX_LIBS =||'`
MP3SOURCES=common.c dct64_i386.c decode_ntom.c layer3.c tabinit.c interface.c
MP3OBJS=common.o dct64_i386.o decode_ntom.o layer3.o tabinit.o interface.o
LOCAL_OBJS=$(MP3OBJS)
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_perl/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_perl/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_perl/Makefile Mon Mar 26 14:45:37 2007
@@ -3,18 +3,21 @@
# and define these variables to impact your build
-LOCAL_CFLAGS=-DMULTIPLICITY $(shell $(PERL) -MExtUtils::Embed -e ccopts) -DEMBED_PERL
+PERL = `which perl`
+PERL_LIBDIR =-L$(shell perl -MConfig -e 'print $$Config{archlib}')/CORE
+PERL_LIBS =$(shell perl -MConfig -e 'print $$Config{libs}')
+
+LOCAL_CFLAGS=-w -DMULTIPLICITY $(shell $(PERL) -MExtUtils::Embed -e ccopts) -DEMBED_PERL
LOCAL_LDFLAGS=$(shell $(PERL) -MExtUtils::Embed -e ldopts) $(shell $(PERL) -MConfig -e 'print $$Config{libs}')
LOCAL_OBJS=perlxsi.o
include ../../../../build/modmake.rules
-PERL = $(shell which perl)
-PERL_LIBDIR =-L$(shell perl -MConfig -e 'print $$Config{archlib}')/CORE
-PERL_LIBS =$(shell perl -MConfig -e 'print $$Config{libs}')
SWIGCFILE=../../../switch_swig.c
SWIGIFILE=../../../switch_swig.i
+
+
local_all: fs_perl.$(DYNAMIC_LIB_EXTEN)
.perlok:
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_spidermonkey_odbc/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_spidermonkey_odbc/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_spidermonkey_odbc/Makefile Mon Mar 26 14:45:37 2007
@@ -25,4 +25,4 @@
$(INST_ODBCLA): $(UNINST_ODBCLA)
cd $(ODBC_DIR) && $(MAKE) install
-
+ @$(TOUCH_TARGET)
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_spidermonkey_teletone/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_spidermonkey_teletone/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/languages/mod_spidermonkey_teletone/Makefile Mon Mar 26 14:45:37 2007
@@ -1,5 +1,4 @@
switch_srcdir=../../../..
LOCAL_CFLAGS=-I$(switch_srcdir)/libs/libteletone/src
-LOCAL_LIBADD=$(switch_srcdir)/libs/libteletone/libteletone.la
include ../mod_spidermonkey/sm.mak
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/loggers/mod_console/mod_console.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/loggers/mod_console/mod_console.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/loggers/mod_console/mod_console.c Mon Mar 26 14:45:37 2007
@@ -36,19 +36,19 @@
static int COLORIZE = 0;
#ifdef WIN32
static HANDLE hStdout;
-static WORD wOldColorAttrs;
-static CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
-static WORD COLORS[] =
- { FOREGROUND_RED | FOREGROUND_INTENSITY,
- FOREGROUND_RED | FOREGROUND_INTENSITY,
- FOREGROUND_RED | FOREGROUND_INTENSITY,
- FOREGROUND_RED | FOREGROUND_INTENSITY,
- FOREGROUND_BLUE | FOREGROUND_INTENSITY,
- FOREGROUND_BLUE | FOREGROUND_INTENSITY,
- FOREGROUND_GREEN | FOREGROUND_INTENSITY,
- FOREGROUND_GREEN | FOREGROUND_INTENSITY,
- FOREGROUND_GREEN | FOREGROUND_INTENSITY };
-#else
+static WORD wOldColorAttrs;
+static CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
+static WORD COLORS[] =
+ { FOREGROUND_RED | FOREGROUND_INTENSITY,
+ FOREGROUND_RED | FOREGROUND_INTENSITY,
+ FOREGROUND_RED | FOREGROUND_INTENSITY,
+ FOREGROUND_RED | FOREGROUND_INTENSITY,
+ FOREGROUND_BLUE | FOREGROUND_INTENSITY,
+ FOREGROUND_BLUE | FOREGROUND_INTENSITY,
+ FOREGROUND_GREEN | FOREGROUND_INTENSITY,
+ FOREGROUND_GREEN | FOREGROUND_INTENSITY,
+ FOREGROUND_GREEN | FOREGROUND_INTENSITY };
+#else
static const char *COLORS[] =
{ SWITCH_SEQ_FRED, SWITCH_SEQ_FRED, SWITCH_SEQ_FRED, SWITCH_SEQ_FRED, SWITCH_SEQ_FMAGEN, SWITCH_SEQ_FCYAN, SWITCH_SEQ_FGREEN, SWITCH_SEQ_FYELLOW, "" };
#endif
@@ -170,7 +170,7 @@
if (COLORIZE) {
#ifdef WIN32
SetConsoleTextAttribute(hStdout, COLORS[node->level]);
- WriteFile(hStdout, node->data, (DWORD)strlen(node->data), NULL, NULL);
+ WriteFile(hStdout, node->data, (DWORD)strlen(node->data), NULL, NULL);
SetConsoleTextAttribute(hStdout, wOldColorAttrs);
#else
fprintf(handle, "%s%s%s", COLORS[node->level], node->data, SWITCH_SEQ_DEFAULT_COLOR);
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/mod/xml_int/mod_xml_rpc/Makefile
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/mod/xml_int/mod_xml_rpc/Makefile (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/mod/xml_int/mod_xml_rpc/Makefile Mon Mar 26 14:45:37 2007
@@ -1,17 +1,18 @@
BASE=../../../..
XMLRPC_DIR=$(BASE)/libs/xmlrpc-c
-XMLRPCLAS = $(XMLRPC_DIR)/src/libxmlrpc.la $(XMLRPC_DIR)/src/libxmlrpc_server.la
+#XMLRPCLAS = $(XMLRPC_DIR)/src/libxmlrpc.la
+#dont ask...
+XMLRPCLAS = $(XMLRPC_DIR)/src/*.o
+XMLRPCLAS += $(XMLRPC_DIR)/src/libxmlrpc_server.la
XMLRPCLAS += $(XMLRPC_DIR)/src/libxmlrpc_server_abyss.la $(XMLRPC_DIR)/lib/abyss/src/libxmlrpc_abyss.la
-XMLRPCLAS += $(XMLRPC_DIR)/lib/expat/xmlparse/libxmlrpc_xmlparse.la
+XMLRPCLAS += $(XMLRPC_DIR)/lib/expat/xmlparse/libxmlrpc_xmlparse.la $(XMLRPC_DIR)/lib/expat/xmltok/libxmlrpc_xmltok.la
-LOCAL_LDFLAGS = $(XMLRPCLAS)
+LOCAL_LIBADD =$(XMLRPCLAS)
LOCAL_CFLAGS=-I$(XMLRPC_DIR)/include
include $(BASE)/build/modmake.rules
-local_depend: $(XMLRPCLAS)
-
$(XMLRPCLAS): $(XMLRPC_DIR) $(XMLRPC_DIR)/.update
cd $(XMLRPC_DIR) && $(MAKE)
$(TOUCH_TARGET)
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/switch_apr.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/switch_apr.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/switch_apr.c Mon Mar 26 14:45:37 2007
@@ -608,57 +608,35 @@
return apr_queue_trypush(queue, data);
}
-#if 0
-/* Utility functions */
-struct switch_vasprintf_data {
- apr_vformatter_buff_t vbuff;
- switch_size_t len;
- switch_size_t block_size;
- char *buf;
-};
-
-static int vasprintf_flush(apr_vformatter_buff_t *buff)
+SWITCH_DECLARE(int) switch_vasprintf(char **ret, const char *fmt, va_list ap)
{
- struct switch_vasprintf_data *data = (struct switch_vasprintf_data *)buff;
-
- char *temp;
- switch_size_t len = data->vbuff.curpos - data->buf;
+#ifdef HAVE_VASPRINTF
+ return vasprintf(ret, fmt, ap);
+#else
+ char *buf;
+ int len;
+ size_t buflen;
+ va_list ap2;
- if ((temp = realloc(data->buf, data->len + data->block_size))) {
- data->buf = temp;
- data->vbuff.curpos = data->buf + len;
- data->len = data->len + data->block_size;
- data->vbuff.endpos = data->buf + data->len;
- return 0;
- }
-
- return -1;
-}
+#ifdef _MSC_VER
+ ap2 = ap;
+#else
+ va_copy(ap2, ap);
#endif
-SWITCH_DECLARE(int) switch_vasprintf(char **buf, const char *format, va_list ap)
-{
-#if 0
- struct switch_vasprintf_data data;
-
- data.block_size = 1024;
- data.buf = malloc(data.block_size);
+ len = vsnprintf(NULL, 0, fmt, ap2);
- if (data.buf == NULL) {
- *buf = NULL;
- return 0;
- }
+ if (len > 0 && (buf = malloc((buflen = (size_t)(len + 1)))) != NULL) {
+ len = vsnprintf(buf, buflen, fmt, ap);
+ *ret = buf;
+ } else {
+ *ret = NULL;
+ len = -1;
+ }
- data.vbuff.curpos = data.buf;
- data.vbuff.endpos = data.buf + data.block_size;
+ va_end(ap2);
+ return len;
- return apr_vformatter(vasprintf_flush, (apr_vformatter_buff_t *)&data, format, ap);
-#endif
-#ifdef HAVE_VASPRINTF
- return vasprintf(buf, format, ap);
-#else
- *buf = (char *) malloc(2048);
- return vsnprintf(*buf, 2048, format, ap);
#endif
}
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/switch_channel.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/switch_channel.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/switch_channel.c Mon Mar 26 14:45:37 2007
@@ -1036,10 +1036,10 @@
switch_event_fire(&event);
}
- /* if we're in a bridge and the other channel is in a blocking read they will never realize we have answered so send
+ /* if we're the child of another channel and the other channel is in a blocking read they will never realize we have answered so send
a SWITCH_SIG_BREAK to interrupt any blocking reads on that channel
*/
- if ((uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
+ if ((uuid = switch_channel_get_variable(channel, SWITCH_ORIGINATOR_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK);
switch_core_session_rwunlock(other_session);
}
@@ -1075,7 +1075,7 @@
msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
msg.from = channel->name;
status = switch_core_session_message_send(uuid, &msg);
-
+
if (status == SWITCH_STATUS_SUCCESS) {
status = switch_channel_perform_mark_pre_answered(channel, file, func, line);
}
@@ -1148,11 +1148,11 @@
switch_channel_event_set_data(channel, event);
switch_event_fire(&event);
}
-
- /* if we're in a bridge and the other channel is in a blocking read they will never realize we have answered so send
+
+ /* if we're the child of another channel and the other channel is in a blocking read they will never realize we have answered so send
a SWITCH_SIG_BREAK to interrupt any blocking reads on that channel
*/
- if ((uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
+ if ((uuid = switch_channel_get_variable(channel, SWITCH_ORIGINATOR_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK);
switch_core_session_rwunlock(other_session);
}
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/switch_console.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/switch_console.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/switch_console.c Mon Mar 26 14:45:37 2007
@@ -41,7 +41,7 @@
char *buf = handle->data;
char *end = handle->end;
int ret = 0;
- char *data;
+ char *data = NULL;
if (handle->data_len >= handle->data_size) {
return SWITCH_STATUS_FALSE;
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/switch_ivr.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/switch_ivr.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/switch_ivr.c Mon Mar 26 14:45:37 2007
@@ -2048,9 +2048,8 @@
switch_channel_answer(chan_a);
ans_a++;
} else if (!pre_b && switch_channel_test_flag(chan_b, CF_EARLY_MEDIA)) {
- if (switch_channel_pre_answer(chan_a) == SWITCH_STATUS_SUCCESS) {
- pre_b++;
- }
+ switch_channel_pre_answer(chan_a);
+ pre_b++;
}
if (!pre_b) {
switch_yield(10000);
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/switch_resample.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/switch_resample.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/switch_resample.c Mon Mar 26 14:45:37 2007
@@ -183,6 +183,27 @@
}
}
+SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples, uint32_t divisor)
+{
+ int16_t rnd, x;
+ uint32_t i;
+ int sum_rnd = 0;
+
+ assert(divisor);
+
+ for(i = 0; i < samples; i++, sum_rnd = 0) {
+ for(x = 0; x < 7; x++) {
+ rnd = (int16_t) (rand() * sizeof(int16_t));
+ sum_rnd += rnd;
+ }
+ switch_normalize_to_16bit(sum_rnd);
+ *data = (int16_t)((int16_t)sum_rnd / (int)divisor);
+
+ data++;
+ }
+}
+
+
SWITCH_DECLARE(void) switch_change_sln_volume(int16_t *data, uint32_t samples, int32_t vol)
{
double newrate = 0;
Modified: freeswitch/branches/mikej/sofiasip-upgrade/src/switch_rtp.c
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/src/switch_rtp.c (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/src/switch_rtp.c Mon Mar 26 14:45:37 2007
@@ -105,6 +105,7 @@
unsigned char out_digit_packet[4];
unsigned int out_digit_sofar;
unsigned int out_digit_dur;
+ uint16_t in_digit_seq;
uint16_t out_digit_seq;
uint32_t out_digit_ssrc;
int32_t timestamp_dtmf;
@@ -910,31 +911,36 @@
int end = packet[1]&0x80;
int duration = (packet[2]<<8) + packet[3];
char key = switch_rfc2833_to_char(packet[0]);
+ uint16_t in_digit_seq = ntohs((uint16_t)rtp_session->recv_msg.header.seq);
/* SHEESH.... Curse you RFC2833 inventors!!!!*/
if ((time(NULL) - rtp_session->dtmf_data.last_digit_time) > 2) {
rtp_session->dtmf_data.last_digit = 0;
rtp_session->dtmf_data.dc = 0;
}
+ if (in_digit_seq > rtp_session->dtmf_data.in_digit_seq) {
+ rtp_session->dtmf_data.in_digit_seq = in_digit_seq;
+
+ if (duration && end) {
+ if (key != rtp_session->dtmf_data.last_digit) {
+ char digit_str[] = {key, 0};
+ time(&rtp_session->dtmf_data.last_digit_time);
+ switch_rtp_queue_dtmf(rtp_session, digit_str);
+ }
+ if (++rtp_session->dtmf_data.dc >= 3) {
+ rtp_session->dtmf_data.last_digit = 0;
+ rtp_session->dtmf_data.dc = 0;
+ }
- if (duration && end) {
- if (key != rtp_session->dtmf_data.last_digit) {
- char digit_str[] = {key, 0};
- time(&rtp_session->dtmf_data.last_digit_time);
- switch_rtp_queue_dtmf(rtp_session, digit_str);
- }
- if (++rtp_session->dtmf_data.dc >= 3) {
+ rtp_session->dtmf_data.last_digit = key;
+ } else {
rtp_session->dtmf_data.last_digit = 0;
rtp_session->dtmf_data.dc = 0;
}
-
- rtp_session->dtmf_data.last_digit = key;
- } else {
- rtp_session->dtmf_data.last_digit = 0;
- rtp_session->dtmf_data.dc = 0;
}
continue;
+
}
break;
Modified: freeswitch/branches/mikej/sofiasip-upgrade/w32/Library/FreeSwitchCore.vcproj
==============================================================================
--- freeswitch/branches/mikej/sofiasip-upgrade/w32/Library/FreeSwitchCore.vcproj (original)
+++ freeswitch/branches/mikej/sofiasip-upgrade/w32/Library/FreeSwitchCore.vcproj Mon Mar 26 14:45:37 2007
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;..\..\libs\libresample\include;..\..\libs\libteletone\src"
+ AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;..\..\libs\libresample\include;..\..\libs\libteletone\src;..\..\libs\win32\sqlite;..\..\libs\pcre"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS;PCRE_STATIC"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -136,7 +136,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;..\..\libs\libresample\include;..\..\libs\libteletone\src"
+ AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;..\..\libs\libresample\include;..\..\libs\libteletone\src;..\..\libs\win32\sqlite;..\..\libs\pcre"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS;CRASH_PROT;PCRE_STATIC"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
@@ -240,10 +240,6 @@
>
</File>
<File
- RelativePath="..\..\src\switch_config.c"
- >
- </File>
- <File
RelativePath="..\..\src\switch_console.c"
>
</File>
@@ -322,10 +318,6 @@
>
</File>
<File
- RelativePath="..\..\src\include\switch_config.h"
- >
- </File>
- <File
RelativePath="..\..\src\include\switch_console.h"
>
</File>
More information about the Freeswitch-branches
mailing list