Merge branch 'smgmaster' into releases.3.4.experimental_head

Conflicts:
	libs/freetdm/mod_freetdm/mod_freetdm.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c
	src/mod/endpoints/mod_sofia/mod_sofia.c
	src/mod/endpoints/mod_sofia/sofia_glue.c
This commit is contained in:
Moises Silva 2011-12-17 17:42:34 -05:00
commit 7bd2d154d6
615 changed files with 41286 additions and 47127 deletions

1
.gitignore vendored
View File

@ -83,6 +83,7 @@ core.*
/build/config/compile
/build/config/config.guess
/build/config/config.sub
/build/config/depcomp
/build/config/install-sh
/build/config/ltmain.sh

View File

@ -466,6 +466,8 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dingaling", "src\mod\endpoints\mod_dingaling\mod_dingaling.2008.vcproj", "{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}"
ProjectSection(ProjectDependencies) = postProject
{1906D736-08BD-4EE1-924F-B536249B9A54} = {1906D736-08BD-4EE1-924F-B536249B9A54}
{D331904D-A00A-4694-A5A3-FCFF64AB5DBE} = {D331904D-A00A-4694-A5A3-FCFF64AB5DBE}
{B4B62169-5AD4-4559-8707-3D933AC5DB39} = {B4B62169-5AD4-4559-8707-3D933AC5DB39}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}

View File

@ -716,6 +716,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ldns", "libs\win32\ldns\ldn
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_callcenter", "src\mod\applications\mod_callcenter\mod_callcenter.2010.vcxproj", "{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_blacklist", "src\mod\applications\mod_blacklist\mod_blacklist.2010.vcxproj", "{50AAC2CE-BFC9-4912-87CC-C6381850D735}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@ -3665,6 +3667,19 @@ Global
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Release|x64.ActiveCfg = Release|x64
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Release|x64 Setup.ActiveCfg = Release|x64
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.Release|x86 Setup.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.All|Win32.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.All|x64.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.All|x64.Build.0 = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.All|x64 Setup.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.All|x86 Setup.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Debug|Win32.ActiveCfg = Debug|Win32
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Debug|x64.ActiveCfg = Debug|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Debug|x64 Setup.ActiveCfg = Debug|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Debug|x86 Setup.ActiveCfg = Debug|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Release|Win32.ActiveCfg = Release|Win32
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Release|x64.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Release|x64 Setup.ActiveCfg = Release|x64
{50AAC2CE-BFC9-4912-87CC-C6381850D735}.Release|x86 Setup.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -3714,6 +3729,7 @@ Global
{B889A18E-70A7-44B5-B2C9-47798D4F43B3} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{5C2B4D88-3BEA-4FE0-90DF-FA9836099D5F} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{50AAC2CE-BFC9-4912-87CC-C6381850D735} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{07113B25-D3AF-4E04-BA77-4CD1171F022C} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
{A27CCA23-1541-4337-81A4-F0A6413078A0} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}

View File

@ -1,6 +1,6 @@
EXTRA_DIST =
SUBDIRS = . src
AUTOMAKE_OPTS = foreign
AUTOMAKE_OPTIONS = foreign
NAME = freeswitch
AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
@ -106,6 +106,7 @@ CORE_CFLAGS += -I$(switch_srcdir)/libs/spandsp/src -I$(switch_srcdir)/libs/tiff-
CORE_LIBS = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la
CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la
if ENABLE_SRTP
CORE_CFLAGS += -DENABLE_SRTP
CORE_LIBS += libs/srtp/libsrtp.la
@ -128,13 +129,17 @@ if ENABLE_TIMERFD_WRAPPER
CORE_CFLAGS += -DTIMERFD_WRAP
endif
if CURL_BUILTIN
CORE_LIBS += libs/curl/lib/libcurl.la
endif
##
## libfreeswitch
##
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS)
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_DEPLIBS)
libfreeswitch_la_LIBADD = $(CORE_LIBS)
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_LDFLAGS)
libfreeswitch_la_LIBADD = $(CORE_LIBS) $(PLATFORM_CORE_LIBS)
libfreeswitch_la_DEPENDENCIES = $(BUILT_SOURCES)
if HAVE_ODBC
@ -244,6 +249,7 @@ libfreeswitch_la_SOURCES = \
src/switch_pcm.c \
src/switch_profile.c \
src/switch_json.c \
src/switch_curl.c \
libs/stfu/stfu.c \
libs/libteletone/src/libteletone_detect.c \
libs/libteletone/src/libteletone_generate.c \
@ -294,21 +300,32 @@ fs_cli_CFLAGS += -DHAVE_EDITLINE -I$(switch_srcdir)/libs/libedit/src
fs_cli_LDADD = libs/libedit/src/.libs/libedit.a
endif
##
## fs_encode ()
##
fs_encode_SOURCES = src/fs_encode.c
fs_encode_CFLAGS = $(AM_CFLAGS)
fs_encode_LDFLAGS = $(AM_LDFLAGS) $(CORE_LIBS)
fs_encode_LDADD = libfreeswitch.la
fs_encode_CFLAGS = $(AM_CFLAGS)
fs_encode_LDFLAGS = $(AM_LDFLAGS)
fs_encode_LDADD = libfreeswitch.la $(CORE_LIBS)
if HAVE_ODBC
fs_encode_LDADD += $(ODBC_LIB_FLAGS)
endif
##
## tone2wav ()
##
tone2wav_SOURCES = src/tone2wav.c
tone2wav_CFLAGS = $(AM_CFLAGS)
tone2wav_LDFLAGS = $(AM_LDFLAGS) $(CORE_LIBS)
tone2wav_LDADD = libfreeswitch.la
tone2wav_LDFLAGS = $(AM_LDFLAGS)
tone2wav_LDADD = libfreeswitch.la $(CORE_LIBS)
if HAVE_ODBC
tone2wav_LDADD += $(ODBC_LIB_FLAGS)
endif
##
## fs_ivrd ()
@ -332,6 +349,10 @@ freeswitch_CFLAGS += -Ilibs/libedit/src -DSWITCH_HAVE_LIBEDIT
freeswitch_LDADD += libs/libedit/src/.libs/libedit.a
endif
if HAVE_ODBC
freeswitch_LDADD += $(ODBC_LIB_FLAGS)
endif
##
## Scripts
@ -415,6 +436,13 @@ src/include/switch_version.h: src/include/switch_version.h.in .version $(libfree
libs/libedit/src/.libs/libedit.a:
cd libs/libedit && $(MAKE)
libs/curl/Makefile:
cd libs/curl && sh ./configure.gnu --prefix=$(prefix)
libs/curl/lib/libcurl.la: libs/curl libs/curl/Makefile
@cd libs/curl && $(MAKE)
@$(TOUCH_TARGET)
libs/apr/libapr-1.la: libs/apr libs/apr/.update
@cd libs/apr && $(MAKE)
@$(TOUCH_TARGET)
@ -560,7 +588,9 @@ libs/openzap/Makefile:
cd libs/openzap && autoconf
cd libs/openzap && ./configure
update-clean: clean modwipe uninstall libs/openzap/Makefile python-reconf
reinstall: modwipe uninstall install
update-clean: clean libs/openzap/Makefile python-reconf
cd libs/sofia-sip && $(MAKE) clean
cd libs/openzap && $(MAKE) clean
cd libs/portaudio && $(MAKE) clean
@ -584,6 +614,11 @@ speex-reconf:
cd libs/speex && ./config.status --recheck
cd libs/speex && ./config.status
sndfile-reconf:
cd libs/libsndfile && autoreconf
cd libs/libsndfile && ./config.status --recheck
cd libs/libsndfile && ./config.status
tiff-reconf:
cd libs/tiff-3.8.2 && autoreconf -fi
cd libs/tiff-3.8.2 && sh ./configure.gnu
@ -633,14 +668,14 @@ cluecon:
current: cluecon update-clean is-scm
$(MAKE) update
$(MAKE) all
$(MAKE) install
$(MAKE) reinstall
installall: current
speedy-current: update-clean is-scm
$(MAKE) update
$(MAKE) speedy-sure
$(MAKE) install
$(MAKE) reinstall
wayclean: clean
@ -661,7 +696,7 @@ modclean: $(switch_builddir)/modules.conf
@cd src/mod && $(MAKE) $(AM_MAKEFLAGS) clean
modwipe:
rm -f $(prefix)/$(modulesdir)/*.${DYNAMIC_LIB_EXTEN}
rm -f $(modulesdir)/*.${DYNAMIC_LIB_EXTEN}
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf

View File

@ -15,7 +15,7 @@ done
BASEDIR=`pwd`;
LIBDIR=${BASEDIR}/libs;
SUBDIRS="ilbc curl iksemel js js/nsprpub libdingaling libedit libsndfile pcre sofia-sip \
SUBDIRS="ilbc curl iksemel js js/nsprpub ldns libdingaling libedit libsndfile pcre sofia-sip \
speex sqlite srtp openzap freetdm spandsp libg722_1 portaudio unimrcp tiff-3.8.2 broadvoice silk libcodec2";
if [ ! -f modules.conf ]; then
@ -300,12 +300,13 @@ libbootstrap()
AMTEST=`grep "AM_INIT_AUTOMAKE" ${CFFILE}`
AMTEST2=`grep "AC_PROG_INSTALL" ${CFFILE}`
AHTEST=`grep "AC_CONFIG_HEADERS" ${CFFILE}`
AXTEST=`grep "ACX_LIBTOOL_C_ONLY" ${CFFILE}`
echo "Creating aclocal.m4"
${ACLOCAL:-aclocal} ${ACLOCAL_OPTS} ${ACLOCAL_FLAGS}
#only run if AC_PROG_LIBTOOL is in configure.in/configure.ac
if [ ! -z "${LTTEST}" -o "${LTTEST2}" ] ; then
if [ ! -z "${LTTEST}" -o "${LTTEST2}" -o "${AXTEST}" ] ; then
echo "Running libtoolize..."
if ${libtoolize} -n --install >/dev/null 2>&1 ; then
$libtoolize --force --copy --install

1658
build/config/config.sub vendored

File diff suppressed because it is too large Load Diff

View File

@ -43,8 +43,8 @@ start() {
fi
cd $FS_HOME
daemon --user $FS_USER --pidfile $PID_FILE "$FS_FILE $FREESWITCH_ARGS $FREESWITCH_PARAMS >/dev/null 2>&1"
echo
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $LOCK_FILE;
echo
return $RETVAL

View File

@ -1,58 +1,46 @@
#!/bin/sh
bz="false"
BUNZIP=/usr/bin/bunzip2
TAR=@TAR@
ZCAT=@ZCAT@
BZIP=@BZIP@
XZ=@XZ@
WGET=@WGET@
CURL=@CURL@
if [ -f "$WGET" ] ; then
if [ -f "$WGET" ]; then
DOWNLOAD_CMD=$WGET
else
if [ -f "$CURL" ] ; then
DOWNLOAD_CMD="$CURL -O"
fi
elif [ -f "$CURL" ]; then
DOWNLOAD_CMD="$CURL -O"
fi
base=http://files.freeswitch.org/downloads/libs/
tarfile=$1
url=`echo $tarfile | grep "://"`
if [ `echo $tarfile | grep bz2` ] ; then
bz="true"
UNZIPPER=$BUNZIP
else
UNZIPPER=$ZCAT
fi
if [ ! -z $url ] ; then
base=$tarfile/
if [ -n "`echo $1 | grep '://'`" ]; then
base=$1/
tarfile=$2
else
base=http://files.freeswitch.org/downloads/libs/
tarfile=$1
fi
if [ ! -d $tarfile ] ; then
uncompressed=`echo $tarfile | sed 's/\(\(\.tar\.gz\|\.tar\.bz2\|\.tar\.xz\)\|\(\.tgz\|\.tbz2\)\)$//'`
if [ $bz = "true" ] ; then
uncompressed=`echo $tarfile | sed "s/\.tar\.bz2//g"`
else
uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
uncompressed=`echo $uncompressed | sed "s/\.tgz//g"`
fi
case `echo $tarfile | sed 's/.*\.\([^.]\+\)$/\1/'` in
bz2|tbz2) UNZIPPER=$BZIP ;;
xz) UNZIPPER=$XZ ;;
gz|tgz|*) UNZIPPER=$ZCAT ;;
esac
if [ ! -f $tarfile ] ; then
rm -fr $uncompressed
$DOWNLOAD_CMD $base$tarfile
if [ ! -f $tarfile ] ; then
echo cannot find $tarfile
exit 1
fi
if [ ! -d $tarfile ]; then
if [ ! -f $tarfile ]; then
rm -fr $uncompressed
$DOWNLOAD_CMD $base$tarfile
if [ ! -f $tarfile ]; then
echo cannot find $tarfile
exit 1
fi
fi
if [ ! -d $uncompressed ] ; then
$UNZIPPER -c -d $tarfile | $TAR xf -
if [ ! -d $uncompressed ]; then
$UNZIPPER -c -d $tarfile | $TAR -xf -
fi
fi
exit 0

View File

@ -80,20 +80,18 @@ TOUCH_TARGET=@TOUCH_TARGET@
MAKE_OPTS = `test -n "$(VERBOSE)" || echo -s`
RECURSE_MODNAME=`pwd | sed -e 's|^.*/||'`
RECURSE_SOURCEFILE=`if test -f "$$modname.cpp" -o -f "$(MODDIR)/$$modname.cpp"; then echo "$$modname.cpp"; else echo "$$modname.c"; fi`
RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi `
RECURSE_OUR_CFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS) ; $(LOCAL_INSERT_CFLAGS) `
RECURSE_OUR_LDFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL) ; $(LOCAL_INSERT_LDFLAGS) `
RECURSE_OUR_CFLAGS=` $(LOCAL_INSERT_CFLAGS) `
RECURSE_OUR_LDFLAGS=` $(LOCAL_INSERT_LDFLAGS) `
RECURSE_MODDIR=`if test -z $(MODDIR); then pwd | sed -e 's|$(switch_builddir)|$(switch_srcdir)|'; else echo $(MODDIR); fi`
RECURSE_MAKE=+modname="$(RECURSE_MODNAME)" ; \
sourcefile="$(RECURSE_SOURCEFILE)" ; \
osarch=`uname -s` ; \
ourdefs="$(RECURSE_OUR_DEPS)" ; \
ourcflags="$(RECURSE_OUR_CFLAGS)" ; \
ourldflags="$(RECURSE_OUR_LDFLAGS)" ; \
insertobjs="`$(LOCAL_INSERT_OBJS)`" ; \
moddir="$(RECURSE_MODDIR)" ; \
$(MAKE) $(MAKE_OPTS) MODNAME="$$modname" SOURCEFILE="$$sourcefile" MODDIR="$$moddir" \
OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" OUR_OBJS="$$insertobjs"
OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" OUR_OBJS="$$insertobjs"
all: Makefile
@$(RECURSE_MAKE) all-modules || exit 1
@ -136,7 +134,7 @@ LINK_OUTPUT_REDIR=> .libs/$(MODNAME).log || error="yes" ; \
exit 1 ;\
fi
$(MODNAME).$(LIBTOOL_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(OUR_OBJS) $(MODDIR)/$(SOURCEFILE) $(MODNAME).lo
$(MODNAME).$(LIBTOOL_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(LOCAL_OBJS) $(OUR_OBJS) $(MODDIR)/$(SOURCEFILE) $(MODNAME).lo
@echo Creating $@...
@test -d .libs || mkdir .libs
@error="";\

View File

@ -14,7 +14,7 @@
<script language="javascript" content-type="text/javascript">
var flashvars = {
rtmp_url: 'rtmp://deathstar.freeswitch.org/phone'
rtmp_url: 'rtmp://my.ip.address.here/phone'
};
var params = {
@ -228,7 +228,7 @@
function add_call(uuid, name, number, account) {
var c = [ {uuid: uuid, name: name, number: number, account: account } ];
var elm = $("#call_template").render(c);
var elm = $("#call_template").tmpl(c);
elm.data("uuid", uuid);
elm.data("name", name);
@ -251,7 +251,7 @@
var u = suser + "@" + domain;
var sid = u.replace("@", "_").replace(/\./g, "_");
var c = [ { id: sid, user: u} ];
var elm = $("#account_template").render(c);
var elm = $("#account_template").tmpl(c);
elm.data("user", u);
elm.appendTo("#account_container");
$("a", "#account_" + sid).button();

View File

@ -0,0 +1,11 @@
<configuration name="mod_blacklist.conf" description="Blacklist module">
<lists>
<!--
Example blacklist, the referenced file contains blacklisted items, one entry per line
NOTE: make sure the file exists and is readable by FreeSWITCH.
<list name="example" filename="/usr/local/freeswitch/conf/blacklists/example.list"/>
-->
</lists>
</configuration>

View File

@ -0,0 +1,13 @@
<configuration name="cdr_mongodb.conf" description="MongoDB CDR logger">
<settings>
<!-- Hostnames and IPv6 addrs not supported (yet) -->
<param name="host" value="127.0.0.1"/>
<param name="port" value="27017"/>
<!-- Namespace format is database.collection -->
<param name="namespace" value="test.cdr"/>
<!-- If true, create CDR for B-leg of call (default: true) -->
<param name="log-b-leg" value="false"/>
</settings>
</configuration>

View File

@ -29,6 +29,13 @@
<profiles>
<!--If no profile is specified it will default to "default"-->
<profile name="default">
<!-- Directory to drop CDR's
'auto' means $PREFIX/logs/conference_cdr/<confernece_uuid>.cdr.xml
a non-absolute path means $PREFIX/logs/<value>/<confernece_uuid>.cdr.xml
absolute path means <value>/<confernece_uuid>.cdr.xml
-->
<!-- <param name="cdr-log-dir" value="auto"/> -->
<!-- Domain (for presence) -->
<param name="domain" value="$${domain}"/>
<!-- Sample Rate-->
@ -45,6 +52,8 @@
<!-- Name of the caller control group to use for this profile -->
<!-- <param name="caller-controls" value="some name"/> -->
<!-- Name of the caller control group to use for the moderator in this profile -->
<!-- <param name="moderator-controls" value="some name"/> -->
<!-- TTS Engine to use -->
<!--<param name="tts-engine" value="cepstral"/>-->
<!-- TTS Voice to use -->
@ -87,6 +96,9 @@
<param name="bad-pin-sound" value="conference/conf-bad-pin.wav"/>
<!-- Conference pin -->
<!--<param name="pin" value="12345"/>-->
<!--<param name="moderator-pin" value="54321"/>-->
<!-- Max number of times the user can be prompted for PIN -->
<!--<param name="pin-retries" value="3"/>-->
<!-- Default Caller ID Name for outbound calls -->
<param name="caller-id-name" value="$${outbound_caller_name}"/>
<!-- Default Caller ID Number for outbound calls -->
@ -100,6 +112,12 @@
<!--
<param name="auto-record" value="$${recordings_dir}/${conference_name}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
-->
<!-- IVR digit machine timeouts -->
<!-- How much to wait between DTMF digits to match caller-controls -->
<!-- <param name="ivr-dtmf-timeout" value="500"/> -->
<!-- How much to wait for the first DTMF, 0 forever -->
<!-- <param name="ivr-input-timeout" value="0" /> -->
</profile>
<profile name="wideband">

View File

@ -4,6 +4,7 @@
<param name="port" value="4242"/>
<param name="bindings" value="all"/>
<param name="ttl" value="1"/>
<!-- <param name="loopback" value="no"/>-->
<!-- Uncomment this to enable pre-shared key encryption on the packets. -->
<!-- For this option to work, you'll need to have the openssl development -->
<!-- headers installed when you ran ./configure -->

View File

@ -0,0 +1,8 @@
<configuration name="http_cache.conf" description="HTTP GET cache">
<settings>
<param name="max-urls" value="10000"/>
<param name="location" value="$${base_dir}/http_cache"/>
<param name="default-max-age" value="86400"/>
</settings>
</configuration>

0
conf/autoload_configs/local_stream.conf.xml Executable file → Normal file
View File

View File

@ -97,6 +97,7 @@
<!-- Timers -->
<!-- <load module="mod_timerfd"/> -->
<!-- <load module="mod_posix_timer"/> -->
<!-- Languages -->
<load module="mod_spidermonkey"/>

View File

@ -1,7 +1,20 @@
<configuration name="mongo.conf">
<settings>
<param name="host" value="127.0.0.1:27017"/>
<!--
connection-string handles different ways to connect to mongo
samples:
server:port
foo/server:port,server:port SET
-->
<param name="connection-string" value="127.0.0.1:27017"/>
<param name="min-connections" value="10"/>
<param name="max-connections" value="100"/>
<!--
<param name="map" value="function() { emit(this.a, 1); }"/>
<param name="reduce" value="function(key, values) { return Array.sum(values); }"/>
<param name="finalize" value="function(key, value) { return value;}"/>
-->
</settings>
</configuration>

View File

@ -47,11 +47,7 @@
<!-- OSP service type, voice or npquery -->
<param name="service-type" value="voice"/>
<!-- Max number of destinations -->
<param name="max-destinations" value="5"/>
<!-- SIP features -->
<!-- Add "user=phone" URI parameter in outbound SIP messages -->
<param name="user-phone" value="disabled"/>
<param name="max-destinations" value="12"/>
</profile>
</profiles>
</configuration>

View File

@ -0,0 +1,7 @@
<configuration name="presence_map.conf" description="PRESENCE MAP">
<domains>
<domain name="$${domain}">
<exten regex="3\d+" proto="conf"/>
</domain>
</domains>
</configuration>

View File

@ -1,5 +1,40 @@
<configuration name="spandsp.conf" description="Tone detector descriptors">
<descriptors>
<configuration name="spandsp.conf" description="SpanDSP config">
<modem-settings>
<!--
total-modems set to N will create that many soft-modems.
If you use them with Hylafax you need the following for each one numbered 0..N:
1) A line like this in /etc/inittab:
f0:2345:respawn:/usr/lib/fax/faxgetty /dev/FS0
2) copy conf/config.FS0 to /var/spool/hylafax/etc (or wherver the appropriate dir is on your system)
Subsequent modem configs would incrment the 0 to 1 and so on.
-->
<param name="total-modems" value="0"/>
<!-- Default context and dialplan to use on inbound calls from the modems -->
<param name="context" value="default"/>
<param name="dialplan" value="XML"/>
<!-- Extra tracing for debugging -->
<param name="verbose" value="false"/>
</modem-settings>
<fax-settings>
<param name="use-ecm" value="true"/>
<param name="verbose" value="false"/>
<param name="disable-v17" value="false"/>
<param name="ident" value="SpanDSP Fax Ident"/>
<param name="header" value="SpanDSP Fax Header"/>
<param name="spool-dir" value="/tmp"/>
<param name="file-prefix" value="faxrx"/>
</fax-settings>
<descriptors>
<!-- These tones are defined in Annex to ITU Operational Bulletin No. 781 - 1.II.2003 -->
<!-- Various Tones Used in National Networks (According to ITU-T Recommendation E.180)(03/1998) -->

View File

@ -27,7 +27,7 @@
<!-- true or false if a leg files are prefixed "a_" -->
<param name="prefix-a-leg" value="true"/>
<!-- encode the post data may be 'true' for url encoding, 'false' for no encoding or 'base64' for base64 encoding -->
<!-- encode the post data may be 'true' for url encoding, 'false' for no encoding, 'base64' for base64 encoding or 'textxml' for text/xml -->
<param name="encode" value="true"/>
<!-- optional: set to true to disable Expect: 100-continue lighttpd requires this setting -->

14
conf/chatplan/default.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<include>
<context name="default">
<extension name="demo">
<condition field="to" expression="^(.*)$">
<!-- <action application="lua" data="test.lua"/> -->
<action application="reply" data="Hello, you said: ${_body}"/>
</condition>
</extension>
</context>
</include>

78
conf/config.FS0 Normal file
View File

@ -0,0 +1,78 @@
CountryCode: 1
AreaCode: 800
FAXNumber: +1.800.555.1212
LongDistancePrefix: 1
InternationalPrefix: 011
DialStringRules: etc/dialrules
ServerTracing: 0xFFF
SessionTracing: 0xFFF
RecvFileMode: 0600
LogFileMode: 0600
DeviceMode: 0600
RingsBeforeAnswer: 1
SpeakerVolume: off
GettyArgs: "-h %l dx_%s"
LocalIdentifier: "FS"
TagLineFont: etc/lutRS18.pcf
TagLineFormat: "From %%l|%c|Page %%P of %%T"
MaxRecvPages: 200
#
#
# Modem-related stuff: should reflect modem command interface
# and hardware connection/cabling (e.g. flow control).
#
ModemType: Class1 # use this to supply a hint
#
# Enabling this will use the hfaxd-protocol to set Caller*ID
#
#ModemSetOriginCmd: AT+VSID="%s","%d"
#
# If "glare" during initialization becomes a problem then take
# the modem off-hook during initialization, and then place it
# back on-hook when done.
#
#ModemResetCmds: "ATH1\nAT+VCID=1" # enables CallID display
#ModemReadyCmds: ATH0
Class1AdaptRecvCmd: AT+FAR=1
Class1TMConnectDelay: 400 # counteract quick CONNECT response
#
# If you have trouble with V.17 receiving or sending,
# you may want to enable one of these, respectively.
#
#Class1RMQueryCmd: "!24,48,72,96" # enable this to disable V.17 receiving
#Class1TMQueryCmd: "!24,48,72,96" # enable this to disable V.17 sending
#
# You'll likely want Caller*ID display (also displays DID) enabled.
#
ModemResetCmds: AT+VCID=1 # enables CallID display
#
# The pty does not support changing parity.
#
PagerTTYParity: none
#
# If you are "missing" Caller*ID data on some calls (but not all)
# and if you do not have adequate glare protection you may want to
# not answer based on RINGs, but rather enable the CallIDAnswerLength
# for NDID, disable AT+VCID=1 and do this:
#
#RingsBeforeAnswer: 0
#ModemRingResponse: AT+VRID=1
# Uncomment DATE and TIME if you really want them, but you probably don't.
#CallIDPattern: "DATE="
#CallIDPattern: "TIME="
CallIDPattern: "NMBR="
CallIDPattern: "NAME="
CallIDPattern: "ANID="
#CallIDPattern: "USER=" # username provided by call
#CallIDPattern: "PASS=" # password provided by call
#CallIDPattern: "CDID=" # DID context in call
CallIDPattern: "NDID="
#CallIDAnswerLength: 4

View File

@ -70,8 +70,8 @@
<!-- independence day -->
<action application="set" data="open=false"/>
</condition>
<condition wday="2" mweek="1" mon="9">
<!-- labor day is the 1st monday in september -->
<condition wday="2" mday="1-7" mon="9">
<!-- labor day is the 1st monday in september (the only monday between the 1st and the 7th) -->
<action application="set" data="open=false"/>
</condition>
<condition wday="2" mweek="2" mon="10">
@ -181,7 +181,7 @@
<extension name="eavesdrop">
<condition field="destination_number" expression="^88(\d{4})$|^\*0(.*)$">
<action application="answer"/>
<action application="eavesdrop" data="${hash(select/${domain_name}-spymap/$1)}"/>
<action application="eavesdrop" data="${hash(select/${domain_name}-spymap/$1$2)}"/>
</condition>
</extension>
@ -244,7 +244,6 @@
-->
<extension name="Local_Extension">
<condition field="destination_number" expression="^(10[01][0-9])$">
<action application="set" data="dialed_extension=$1"/>
<action application="export" data="dialed_extension=$1"/>
<!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
<action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
@ -260,9 +259,9 @@
<action application="set" data="continue_on_fail=true"/>
<action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
<action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/${called_party_callgroup}/${uuid}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/global/${uuid}"/>
<action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/>
<!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>-->
<action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>
<action application="bridge" data="user/${dialed_extension}@${domain_name}"/>

View File

@ -1,6 +1,8 @@
<include>
<extension name="Talking Clock Time" ><!--e.g. 10:56pm-->
<condition field="destination_number" expression="^9170$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="say" data="en CURRENT_TIME pronounced
${strepoch()}"/>
<action application="hangup"/>
@ -9,6 +11,8 @@
<extension name="Talking Clock Date" ><!--e.g. March 8, 2011-->
<condition field="destination_number" expression="^9171$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="say" data="en CURRENT_DATE pronounced
${strepoch()}"/>
<action application="hangup"/>
@ -18,6 +22,8 @@
<extension name="Talking Clock Date and Time" ><!--e.g. March 8, 2011
10:56pm-->
<condition field="destination_number" expression="^9172$">
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="say" data="en CURRENT_DATE_TIME pronounced
${strepoch()}"/>
<action application="hangup"/>

View File

@ -46,6 +46,10 @@
<X-PRE-PROCESS cmd="include" data="dialplan/*.xml"/>
</section>
<section name="chatplan" description="Regex/XML Chatplan">
<X-PRE-PROCESS cmd="include" data="chatplan/*.xml"/>
</section>
<!-- mod_dingaling is reliant on the vcard data in the "directory" section. -->
<!-- mod_sofia is reliant on the user data for authorization -->
<section name="directory" description="User Directory">

View File

@ -8,4 +8,99 @@
</match>
</input>
</macro>
<macro name="has_called_conf">
<input pattern="^(\d+)$">
<match>
<action function="play-file" data="$1"/>
<action function="sleep" data="100"/>
<action function="play-file" data="conference/conf-has_joined.wav"/>
</match>
</input>
</macro>
<macro name="has_left_conf">
<input pattern="^(\d+)$">
<match>
<action function="play-file" data="$1"/>
<action function="sleep" data="100"/>
<action function="play-file" data="conference/conf-has_left.wav"/>
</match>
</input>
</macro>
<macro name="enter_dest_number">
<input pattern="^(.*)$">
<match>
<action function="sleep" data="1000"/>
<action function="play-file" data="ivr/ivr-enter_destination_telephone_number.wav"/>
<action function="sleep" data="1000"/>
</match>
</input>
</macro>
<macro name="enter_src_number">
<input pattern="^(.*)$">
<match>
<action function="sleep" data="1000"/>
<action function="play-file" data="ivr/ivr-enter_source_telephone_number.wav"/>
<action function="sleep" data="1000"/>
</match>
</input>
</macro>
<macro name="call_forward_set">
<input pattern="^(\d+):(\d+)$">
<match>
<action function="sleep" data="1000"/>
<action function="play-file" data="ivr/ivr-extension_number.wav"/>
<action function="sleep" data="400"/>
<action function="say" data="$1" method="iterated" type="number"/>
<action function="sleep" data="400"/>
<action function="play-file" data="digits/2.wav"/>
<action function="sleep" data="1000"/>
<action function="play-file" data="ivr/ivr-extension_number.wav"/>
<action function="sleep" data="400"/>
<action function="say" data="$2" method="iterated" type="number"/>
<action function="sleep" data="1000"/>
<action function="play-file" data="ivr/ivr-call_forwarding_has_been_set.wav"/>
<action function="sleep" data="1500"/>
</match>
</input>
</macro>
<macro name="call_forward_cancel">
<input pattern="^(\d+)$">
<match>
<action function="sleep" data="1000"/>
<action function="play-file" data="ivr/ivr-extension_number.wav"/>
<action function="sleep" data="400"/>
<action function="say" data="$1" method="iterated" type="number"/>
<action function="play-file" data="ivr/ivr-call_forwarding_has_been_cancelled.wav"/>
<action function="sleep" data="1500"/>
</match>
</input>
</macro>
<macro name="screen_confirm">
<input pattern="^(.*)$">
<match>
<action function="sleep" data="500"/>
<action function="play-file" data="ivr/ivr-call_from.wav"/>
<action function="sleep" data="250"/>
<!-- Note, be sure to pass in the full path to the file or else!! -->
<action function="play-file" data="$1"/>
<action function="sleep" data="500"/>
<action function="play-file" data="ivr/ivr-accept_reject_voicemail.wav"/>
<action function="sleep" data="1500"/>
<action function="play-file" data="ivr/ivr-call_from.wav"/>
<action function="sleep" data="250"/>
<action function="play-file" data="$1"/>
<action function="sleep" data="500"/>
<action function="play-file" data="ivr/ivr-accept_reject_voicemail.wav"/>
<action function="sleep" data="1500"/>
</match>
</input>
</macro>
</include>

View File

@ -365,7 +365,7 @@
<macro name="voicemail_say_date">
<input pattern="^(.*)$">
<match>
<action function="say" data="$1" method="pronounced" type="current_date_time"/>
<action function="say" data="$1" method="pronounced" type="short_date_time"/>
</match>
</input>
</macro>

View File

@ -23,6 +23,8 @@
<param name="sip-trace" value="no"/>
<param name="sip-capture" value="no"/>
<param name="rfc2833-pt" value="101"/>
<!-- RFC 5626 : Send reg-id and sip.instance -->
<!--<param name="enable-rfc-5626" value="true"/> -->
<param name="sip-port" value="$${external_sip_port}"/>
<param name="dialplan" value="XML"/>
<param name="context" value="public"/>
@ -32,6 +34,7 @@
<param name="hold-music" value="$${hold_music}"/>
<param name="rtp-timer-name" value="soft"/>
<!--<param name="enable-100rel" value="true"/>-->
<!--<param name="disable-srv503" value="true"/>-->
<!-- This could be set to "passive" -->
<param name="local-network-acl" value="localnet.auto"/>
<param name="manage-presence" value="false"/>

View File

@ -31,4 +31,8 @@
<!--send an options ping every x seconds, failure will unregister and/or mark it down-->
<!--<param name="ping" value="25"/>-->
<!--</gateway>-->
<!--rfc5626 : Abilitazione rfc5626 ///-->
<!--<param name="rfc-5626" value="true"/>-->
<!--rfc5626 : extra sip params to send in the contact-->
<!--<param name="reg-id" value="1"/>-->
</include>

View File

@ -24,6 +24,7 @@
<param name="sip-ip" value="$${local_ip_v6}"/>
<param name="hold-music" value="$${hold_music}"/>
<!--<param name="enable-100rel" value="false"/>-->
<!--<param name="disable-srv503" value="true"/>-->
<param name="apply-inbound-acl" value="domains"/>
<!--<param name="apply-register-acl" value="domains"/>-->
<!--<param name="dtmf-type" value="info"/>-->

View File

@ -43,6 +43,9 @@
<!-- <param name="shutdown-on-fail" value="true"/> -->
<param name="sip-trace" value="no"/>
<param name="sip-capture" value="no"/>
<!-- Use presence_map.conf.xml to convert extension regex to presence protos for routing -->
<!-- <param name="presence-proto-lookup" value="true"/> -->
<!-- Don't be picky about negotiated DTMF just always offer 2833 and accept both 2833 and INFO -->
@ -70,7 +73,7 @@
<param name="watchdog-step-timeout" value="30000"/>
<param name="watchdog-event-timeout" value="30000"/>
<param name="log-auth-failures" value="true"/>
<param name="log-auth-failures" value="false"/>
<param name="forward-unsolicited-mwi-notify" value="false"/>
<param name="context" value="public"/>
@ -102,6 +105,11 @@
It is not recommended to enable 100rel at this time.
-->
<!--<param name="enable-100rel" value="true"/>-->
<!-- uncomment if you don't wish to try a next SRV destination on 503 response -->
<!-- RFC3263 Section 4.3 -->
<!--<param name="disable-srv503" value="true"/>-->
<!-- Enable Compact SIP headers. -->
<!--<param name="enable-compact-headers" value="true"/>-->
<!--
@ -149,6 +157,7 @@
<!-- Name of the db to use for this profile -->
<!--<param name="dbname" value="share_presence"/>-->
<param name="presence-hosts" value="$${domain},$${local_ip_v4}"/>
<param name="presence-privacy" value="$${presence_privacy}"/>
<!-- ************************************************* -->
<!-- This setting is for AAL2 bitpacking on G726 -->

View File

@ -199,6 +199,10 @@
<X-PRE-PROCESS cmd="set" data="default_areacode=918"/>
<X-PRE-PROCESS cmd="set" data="default_country=US"/>
<!-- if false or undefined, the destination number is included in presence NOTIFY dm:note.
if true, the destination number is not included -->
<X-PRE-PROCESS cmd="set" data="presence_privacy=false"/>
<X-PRE-PROCESS cmd="set" data="be-ring=%(1000,3000,425)"/>
<X-PRE-PROCESS cmd="set" data="ca-ring=%(2000,4000,440,480)"/>
<X-PRE-PROCESS cmd="set" data="cn-ring=%(1000,4000,450)"/>

View File

@ -40,10 +40,10 @@ AC_DEFINE_UNQUOTED([SWITCH_MOD_DIR],"${modulesdir}",[where to install the module
if test "$localstatedir" = "\${prefix}/var" ; then
rundir="$prefix/run"
logfiledir="${prefix}/log"
logdir="${prefix}/log"
else
rundir="$localstatedir/run/freeswitch"
logfiledir="$localstatedir/log/freeswitch"
logdir="$localstatedir/log/freeswitch"
fi
# Where to put pidfile
AC_ARG_WITH([rundir],
@ -51,30 +51,38 @@ AC_ARG_WITH([rundir],
AC_SUBST(runtimedir)
AC_DEFINE_UNQUOTED([SWITCH_RUN_DIR],"${runtimedir}",[where to put pidfile to])
AC_ARG_WITH([logfiledir],
[AS_HELP_STRING([--with-logfiledir=DIR], [Put logfiles into this location (default: $localstatedir/log)])], [logfiledir="$withval"], [logfiledir="$logdir"])
AC_SUBST(logfiledir)
AC_DEFINE_UNQUOTED([SWITCH_LOG_DIR],"${logfiledir}",[where to put log files])
dbdir="${prefix}/db"
AC_ARG_WITH([dbdir],
[AS_HELP_STRING([--with-dbdir=DIR], [Put database files into this location (default: $prefix/db)])], [dbdir="$withval"], [dbdir="$prefix/db"])
AC_SUBST(dbdir)
AC_DEFINE_UNQUOTED([SWITCH_DB_DIR],"${dbdir}",[where to put db files])
htdocsdir="${prefix}/htdocs"
AC_ARG_WITH([htdocsdir],
[AS_HELP_STRING([--with-htdocsdir=DIR], [Put html files into this location (default: $prefix/htdocs)])], [htdocsdir="$withval"], [htdocsdir="$prefix/htdocs"])
AC_SUBST(htdocsdir)
AC_DEFINE_UNQUOTED([SWITCH_HTDOCS_DIR],"${htdocsdir}",[where to put htdocs files])
soundsdir="${prefix}/sounds"
AC_ARG_WITH([soundsdir],
[AS_HELP_STRING([--with-soundsdir=DIR], [Put sound files into this location (default: $prefix/sounds)])], [soundsdir="$withval"], [soundsdir="$prefix/sounds"])
AC_SUBST(soundsdir)
AC_DEFINE_UNQUOTED([SWITCH_SOUNDS_DIR],"${soundsdir}",[where to put sounds files])
grammardir="${prefix}/grammar"
AC_ARG_WITH([grammardir],
[AS_HELP_STRING([--with-grammardir=DIR], [Put grammar files into this location (default: $prefix/grammar)])], [grammardir="$withval"], [grammardir="$prefix/grammar"])
AC_SUBST(grammardir)
AC_DEFINE_UNQUOTED([SWITCH_GRAMMAR_DIR],"${grammardir}",[where to put grammar files])
scriptdir="${prefix}/scripts"
AC_ARG_WITH([scriptdir],
[AS_HELP_STRING([--with-scriptdir=DIR], [Put script files into this location (default: $prefix/scripts)])], [scriptdir="$withval"], [scriptdir="$prefix/scripts"])
AC_SUBST(scriptdir)
AC_DEFINE_UNQUOTED([SWITCH_SCRIPT_DIR],"${scriptdir}",[where to put script files])
recordingsdir="${prefix}/recordings"
AC_ARG_WITH([recordingsdir],
[AS_HELP_STRING([--with-recordingsdir=DIR], [Put recordings files into this location (default: $prefix/recordings)])], [recordingsdir="$withval"], [recordingsdir="$prefix/recordings"])
AC_SUBST(recordingsdir)
AC_DEFINE_UNQUOTED([SWITCH_RECORDINGS_DIR],"${recordingsdir}",[where to put recording files])
@ -407,7 +415,8 @@ APR_ADDTO(SWITCH_AM_LDFLAGS, -lresolv)
fi
ESL_LDFLAGS=
PLATFORM_CORE_DEPLIBS=
PLATFORM_CORE_LDFLAGS=
PLATFORM_CORE_LIBS=
# tweak platform specific flags
case "$host" in
*darwin10.*)
@ -417,23 +426,30 @@ case "$host" in
APR_ADDTO(CXXFLAGS, -pipe)
APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
if test "x$enable_core_odbc_support" != "xno"; then
APR_ADDTO(PLATFORM_CORE_DEPLIBS, --framework CoreFoundation)
APR_ADDTO([PLATFORM_CORE_LDFLAGS], [--framework CoreFoundation])
fi
APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl])
;;
*darwin*)
APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX)
APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
if test "x$enable_core_odbc_support" != "xno"; then
APR_ADDTO(PLATFORM_CORE_DEPLIBS, --framework CoreFoundation)
APR_ADDTO([PLATFORM_CORE_LDFLAGS], [--framework CoreFoundation])
fi
APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl])
;;
*-solaris2*)
APR_ADDTO(SWITCH_AM_CFLAGS, -DPATH_MAX=2048)
APR_ADDTO(SWITCH_AM_CFLAGS, -DPATH_MAX=2048 -D__EXTENSIONS__)
APR_ADDTO(SWITCH_AM_LDFLAGS, -lsendfile -lresolv -lsocket -lnsl -luuid)
APR_ADDTO(ESL_LDFLAGS, -lnsl -lsocket)
APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl -lcrypt -lrt -lsendfile -lresolv -lsocket -lnsl -luuid])
;;
*bsd*)
APR_ADDTO(SWITCH_AM_CFLAGS, -I/usr/local/include)
APR_ADDTO([PLATFORM_CORE_LIBS], [-lcrypt -lrt])
;;
*linux*)
APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl -lcrypt -lrt])
;;
esac
@ -444,7 +460,8 @@ AC_SUBST(SWITCH_ANSI_CFLAGS)
AC_SUBST(SWITCH_AM_CXXFLAGS)
AC_SUBST(SWITCH_AM_LDFLAGS)
AC_SUBST(ESL_LDFLAGS)
AC_SUBST(PLATFORM_CORE_DEPLIBS)
AC_SUBST(PLATFORM_CORE_LDFLAGS)
AC_SUBST(PLATFORM_CORE_LIBS)
AC_SUBST(SOLINK)
AC_SUBST(DYNAMIC_LIB_EXTEN)
AC_SUBST(LIBTOOL_LIB_EXTEN)
@ -474,7 +491,7 @@ AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall usleep getifaddrs timerfd_create])
AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall usleep getifaddrs timerfd_create getdtablesize posix_openpt])
AC_CHECK_FUNCS([sched_setscheduler setpriority setrlimit setgroups initgroups])
AC_CHECK_FUNCS([wcsncmp setgroups asprintf setenv pselect gettimeofday localtime_r gmtime_r strcasecmp stricmp _stricmp])
@ -485,6 +502,9 @@ AC_CHECK_LIB(rt, clock_getres, [AC_DEFINE(HAVE_CLOCK_GETRES, 1, [Define if you h
AC_CHECK_LIB(rt, clock_nanosleep, [AC_DEFINE(HAVE_CLOCK_NANOSLEEP, 1, [Define if you have clock_nanosleep()])])
AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])])
AC_CHECK_LIB(util, openpty, [AC_DEFINE(HAVE_OPENPTY, 1, [Define if you have openpty()])])
AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[
#include <sys/types.h>
#include <time.h>])
@ -764,6 +784,8 @@ case $host in
;;
esac
AC_PATH_PROGS(BZIP, bzip2)
AC_PATH_PROGS(XZ, xz)
AC_PATH_PROGS(TAR, gtar tar)
AC_PATH_PROGS(WGET, wget)
AC_PATH_PROGS(CURL, curl)
@ -792,12 +814,29 @@ if test "$_libcurl_with" = "yes" ; then
ac_cv_use_system_curl=yes;
fi
if test "$ac_cv_use_system_curl" = "yes" ; then
AC_CACHE_CHECK([whether to use system libcurl library], [ac_cv_curl_usable], [
AC_CHECK_LIB(curl, Curl_setopt, [ac_cv_curl_usable="yes"], [ac_cv_curl_usable="no"])
])
fi
if test "$ac_cv_curl_usable" != "yes" ; then
ac_cv_use_system_curl=no;
fi
if test "$ac_cv_use_system_curl" != "yes" ; then
LIBCURL_DEPS='${switch_builddir}/libs/curl/lib/libcurl.la'
LIBCURL='${switch_builddir}/libs/curl/lib/libcurl.la'
LIBCURL_CPPFLAGS='-I${switch_srcdir}/libs/curl/include'
else
SWITCH_AM_LDFLAGS="$LIBCURL $SWITCH_AM_LDFLAGS"
fi
SWITCH_AM_CFLAGS="$LIBCURL_CPPFLAGS $SWITCH_AM_CFLAGS"
SWITCH_AM_CXXFLAGS="$LIBCURL_CPPFLAGS $SWITCH_AM_CXXFLAGS"
AM_CONDITIONAL([CURL_BUILTIN],[test "${ac_cv_use_system_curl}" != "yes"])
AC_SUBST(LIBCURL_DEPS)
@ -871,7 +910,7 @@ then
if test "$python_has_distutils" != "no" ; then
AC_MSG_CHECKING([location of site-packages])
PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`"
PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
if test -z "$PYTHON_SITE_DIR" ; then
AC_MSG_ERROR([Unable to detect python site-packages path])
@ -884,10 +923,10 @@ then
#
# python distutils found, get settings from python directly
#
PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`"
PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`"
PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`"
PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`"
PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));'`"
PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
# handle python being installed into /usr/local
AC_MSG_CHECKING([python libdir])
@ -1031,10 +1070,7 @@ AC_CONFIG_SUBDIRS([libs/pcre])
AC_CONFIG_SUBDIRS([libs/apr])
AC_CONFIG_SUBDIRS([libs/apr-util])
AC_CONFIG_SUBDIRS([libs/ilbc])
if test "$ac_cv_use_system_curl" != "yes" ; then
AC_CONFIG_SUBDIRS([libs/curl])
fi
AC_CONFIG_SUBDIRS([libs/curl])
AC_CONFIG_SUBDIRS([libs/iksemel])
AC_CONFIG_SUBDIRS([libs/js/nsprpub])
AC_CONFIG_SUBDIRS([libs/js])

View File

@ -26,6 +26,11 @@ freeswitch (1.0.7)
build: add support for bz2 to getlibs (r:b61fc396)
build: Bump callie sounds to 1.0.15 (r:c8eaef60)
build: always use our includes first so we use our srcdir headers over installed versions (r:15c79424)
build: pocketsphinx build for 0.7 windows vs2008 (r:a7613c06/FS-3348)
build: They no longer ship the wsj model in pocketsphinx... and seems the dictionary has moved a bit. (r:23571680)
build: unimrcp vs2010 build fixes for new version (r:2dcca5f4)
build: add sqlite to clean on make current or update-clean (r:2366f429)
build: Update windows to use Lame 3.98.4 (r:4349ec00)
codec2: working prototype, still for testing only (r:04ca0751)
config: move limit.conf to db.conf
config: Update VM phrase macros to voice option then action on main, config menus
@ -51,6 +56,7 @@ freeswitch (1.0.7)
config: Add ivr/ subdir to conf/lang/en/en.xml (r:42f10a48)
config: Fix mod_directory phrase file references to 'dir-press.wav' (correct: vm-press) (r:3ef2692f)
config: bump ru sounds version to 1.0.13 (r:2b1b19bf)
config: Fix eavesdrop so that *0 works as well as 88 as the access code (r:cbfe83cc)
core: Add RTCP support (FSRTP-14)
core: handle some errors on missing db handle conditions
core: add ... and shutdown as a fail-safe when no modules are loaded
@ -279,21 +285,80 @@ freeswitch (1.0.7)
core: Add the ability to issue a break to switch_ivr_sleep when media is not ready, allowing continuation of processing of the dialplan. (r:dfc30b2e/FS-3373)
core: parse events and messages in channel_ready (r:94148095)
core: add last_hold_time and hold_accum vars for cdr data (r:676ef808)
core: avoid recursion loop in parse_all_events vs channel_ready (r:22d89943)
core: auto populate global origination_caller_id_name/number from effective_caller_id_name/number in enterprise originate (r:f8c029a1)
core: add --enable-timerfd-wrapper to wrap timefd syscalls for platforms with the right kernel and wrong libc (r:306b332d)
core: don't parse events in channel_ready during hold (r:cad68d53)
core: only parse messages from channel_ready when its a session calling channel ready on itself not when another thread calls it (r:1d12519d)
core: Fix single quote stripping and add %y to turn ' into \' (r:3b5a0ae5/FS-3359)
core: push out signal data into its own queue system (r:f1ee225c)
core: When in a dialplan hunt and we have a custom caller_profile, ${destination_number} and other variable kept the previous value of the original dialplan parsing. This correct this so it take the custom created caller_profile for that hunt (r:b0e0dd22)
core: pause traffic if sql_queue gets to big (r:2939262e)
core: fix detection of tones in monitor_early_media_fail (r:3cbae3fb/FS-3413)
core: use rwlock for global vars to reduce contention (r:0521886d)
core: Fix separate_string_blank_delim to handle strings with '&' (r:f3a42258/FS-3099)
core: Fix setting display on wrong channel on eavesdrop (r:3dc4b530)
core: add new detailed_calls view a version of the channels table that shows only one legged calls or bridged calls (r:beecd937)
core: display update on flip_cid (r:0fc8050c)
core: make sql stmt more portable (r:6b948cf1)
core: print ip:port on rtp bind err (r:11d2cd1b)
core: display fixes and add 2 new cols to channels to store last sent display data (r:d364e9f2)
core: sanitize outbound caller id number on one-legged calls (r:dee0f540/FS-3483)
core: clean up originator/ee profile so the right one is prevelant in events (r:3e2c662a)
core: check for answer flag in bridge to do display update properly (r:0f459d4b)
core: add event subclasses in switch_event.c (r:3696ced7/FS-3497)
core: add max_sessions to heartbeat event (r:9c8437a1/FS-3415)
core: fix event firing for CHANNEL_PROGRESS_MEDIA event (r:e2a4fb11/FS-3396)
core: add emulation for asterisk DIALSTATUS magic var (r:9d98d49f)
core: the new code requires accurate timestamps, we were incrementing it by the interval (20) instead of the samples (160) (r:f10566af/FS-3181)
core: pass cancel_cause into enterprise_originate (r:2e9724d2)
core: add support for global namespace in chat interface to bind to unhandled messages (r:6dd1264d)
core: resolve Syntax Error when using MSSQL in core (r:40990c04/FS-3527)
core: add RTP_BUG_ACCEPT_ANY_PACKETS to disable dropping invalid packets for interop with Oracle CCA (r:aea22cd4)
core: yield when doing b64 encode to avoid stealing the cpu on single proc crappy hardware (r:7d612da4)
core: DTMF stands for Devil Took My Fone (r:0c066f06)
core: add callee_id name/number to xml_cdr (r:bcd1e147)
core: add new flag to frames to denote pass thru frames that are not audio (r:cb9abe02)
core: change -hp to -rp, add -lp and -np, no priority flags means auto which will do -rp if you have > 1 cpu (r:c1dd008b)
core: only reap sigchld when in fork mode for system (r:1e712c7e)
core: Add application flag zombie_exec so registered applications can apply to be executed on channels that are already hungup, like the inline exec this is only limited to a small family of apps that do not use the channel for audio. (r:637a5ed8)
core: do not escape strings inside single quotes unless we can find a closing quote too (r:b4b99c41)
core: convert chat interface to use events instead of a bunch of args (r:9125a96c)
core: make app to turn on new zombie exec instead of always doing it (r:3a2f8183)
core: fix inaccurate sample count in file handle, buffered samples were being double tallied (r:5fe3a22d)
core: prevent sql injection by using sqlite formatter on various code that generates sql stmts with switch_snprintf (r:256a6264)
core: add ivr_menu_terminator variable you can set to none or the dtmf chars you want to terminate input (r:0a3e5d2f)
core: delay_echo was double the length in milliseconds from what it should be (r:3317f5d3)
core: fix issue where clearing a single realm does not completely clear (r:d2710422)
core: add manual_rtp_bug gen_one_gen_all to prevent rtp passthru to break the *S* word.. (r:9e094835)
core: Add transfer_history to logs (r:1bf97fa7)
core: add fsctl sync_clock_when_idle so you can sync the clock but have it not do it till there are 0 calls (r:2094f2d3)
core: add getGlobalVariable and setGlobalVariable to swig stuff (r:2faaee0e)
core: Fix erroneous "module busy" messages on module unload (r:bad5964b/FS-3589)
core: move code from uuid_kill into core (r:3c9551ee)
docs: Major clean up of doxygen generated core API documentation (r:794246e1)
docs: Add libteletone back to core API documentation (r:c35c138d)
embedded languages: Provide core level support for conditional Set Global Variable (r:c017c24b/FSCORE-612)
embedded languages: add insertFile front end to switch_ivr_insert_file and reswig (r:c4e350ab)
flex client: check in basic flex demo as basis to develop a client application (r:25be760b)
flex client: the hotkeys js is broken, get rid of it (r:2f6f71d4)
fs_cli: block control-z from fs cli and print a warning how to exit properly (r:dc436b82)
fs_cli: skip blocking writes on fs_cli to avoid backing up event socket (r:2ec2a9b0)
fs_cli: let ctl-c work until you are connected (r:986f258d)
fs_cli: add -i --interrupt to fs_cli to allow control-c to exit the program (r:e7b3c3b1)
fs_cli: add timeout option to fs_cli (r:5fad26b4)
fs_cli: implement CLI prompt redrawing (r:a79f1f42) (many other minor changes by TC on 2011-09-22)
fs_cli: implement configurable prompt, input, and output coloring (r:c7ec19d6)
fs_cli: allow ;; seperated commands in fs_cli -x (r:cbc92936)
fs_cli: only enable new features on supported terminals (r:26cd927c)
lang: Improve French phrase files (FSCONFIG-23)
lang: Update langs - Add pt_PT, update es to have es_ES and es_MX, update mod_say_es and add mod_say_pt (FS-2937) (r:c81a9448/FS-2937)
libapr: Fix issue where after a bridge with a member, uuid of Agent is set to single quote character ' (r:3fee704d/FS-2738)
libdingaling: fix race on shutdown causing crash (FSMOD-47)
libdingaling: Fix crash in new GV interface when exceeding 24 calls (r:be00609a/FS-2171)
libdingaling: fix crash when GV call ends (r:687140b5/FS-3139)
libdingaling: fix small leak (r:d3ea42d8/FS-3334)
libdingaling: send keep alive packets to prevent NAT from munging connection (thanks Federico Beffa) (r:4bd305e5/FS-3612)
libesl: Fix potential race condition (ESL-36)
libesl: Add /uuid command to fs_cli to filter logs by uuid
libesl: Increase buffer in fs_cli for Win (r:d1d6be88/FSCORE-611)
@ -324,11 +389,15 @@ freeswitch (1.0.7)
libesl: use poll instead of select in ESL client lib because select is not your friend.... (r:ae595cd5)
libesl: Add digit_timeout to ESL::IVR's playAndGetDigits method (r:f564d383)
libesl: add array manipulation to the wraper code (r:ffa0a071)
libesl: fix mem leak - good catch, Jlenk! (r:e420e17f/FS-3386)
libesl: add sendmsg function to esl (r:2ae688a3)
libfreetdm: implemented freetdm config nodes and ss7 initial configuration
libfreetdm: fix codec for CAS signaling (r:b76e7f18)
libfreetdm: freetdm: ss7- added support for incoming group blocks, started adding support for ansi (r:c219a73c)
libfreetdm: receive side, update libteletone to track duration so it is less likely to double detect and push api changes down to freetdm (r:a65794fb/FS-3570)
libg7221: A bunch of tweaks to the G.722.1 codec (r:5d548570)
libgnutls: link to libgcrypt as well, please report any platforms this breaks, but it should be portable (r:c569fb0f/FS-1248)
libiksemel: making this the new default and patching libdingaling to use it exclusively with openssl, now we actually have single thread for gtalk an no gah noodlez (r:f506e19e/FS-3471)
libjs: non-portable comment syntax in .s files
libldns: select on FD > 1024 get this patch to ldns ppl (r:710fc7a7/FS-3110)
libopenzap: Add CLI tracing
@ -342,6 +411,11 @@ freeswitch (1.0.7)
libsofiasip: fix bad assert (r:56404641/FS-3133)
libsofiasip: lower stack and boost priority of sofia schedule thread (r:257bc9ff)
libsofiasip: Fix for issue reported on the mailing list with a Chinese locale and windows. This commit removes a hidden char that should not have been there anyway. (r:7adaceb8)
libsofiasip: resolve edge case in the 3rd party sofia sip stack library when dealing with a malformed contact and missing ack. Will push upstream to sofia devs (r:d68605f5/FS-3394)
libsofiasip: use individual pools instead of sub-pools for nua handles to avoid pool swell (r:f7612413)
libsofiasip: Fix segfault in sofia's stun code (r:7403db70)
libsofiasip: add homer capture hooks to libsofia (r:3e029f0d)
libsofiasip: Fix mem leak when homer capture server not available (r:bc177a4b/FS-3475)
libspandsp: Fixed a typo in spandsp's msvc/inttypes.h Updated sig_tone processing in spandsp to the latest, to allow moy to proceed with his signaling work.
libspandsp: removed a saturate16 from spandsp that was causing problems fixed a typo in the MSVC inttypes.h file for spandsp
libspandsp: Changes to the signaling tone detector to detect concurrent 2400Hz + 2600Hz tones. This passes voice immunity and other key tests, but it bounces a bit when transitions like 2400 -> 2400+2600 -> 2600 occur. Transitions between tone off and tone on are clean. (r:bc13e944)
@ -351,12 +425,23 @@ freeswitch (1.0.7)
libspandsp: Added missing error codes when an ECM FAX is abandoned with the T30_ERR message (r:ec57dc7a)
libspandsp: Fixed a vulnerability in T.4 and T.6 processing which is similar to http://bugzilla.maptools.org/show_bug.cgi?id=2297 in libtiff. A really screwed up 2D T.4 image, or a maliciously constructed T.4 2D or T.6 image should potential run off the end of an image decoder buffer. (r:c6f67322)
libspandsp: Changed T.38 terminal handling, so errors from the user's packet transmit routine properly filter up the chain, cause termination of the FAX session, and are reported to the caller. (r:c890fbfa)
libspandsp: Numerous little changes to spandsp that haven't been pushed to Freeswitch for a while. The only big changes are a majorly rewritten V.42 and V.42bis which are now basically functional. (r:d30e82e2)
libspandsp: Another round of tweaks for spandsp. There should be no functional changes, although quite a few things have changed in the test suite (r:4a7bbf4e)
libstfu: add param to jb to try to recapture latency (disabled by default) (r:d59d41d7)
libsqlite: fix issue on mailing list mod_crd_sqlite entry limit and sqlite segfaults on triggers (r:1badec17)
libsqlite: make strdup NULL return strdup("") in sqlite for mac bug (r:b6bed14f)
libsqlite: force an update on sqlite build (r:71dd3ca8)
libunimrcp: Update to latest UniMRCP version. MRCP requests can no timeout if there is no server response. (r:17099473)
libunimrcp: unimrcp lib does not notify mod_unimrcp of RTSP TEARDOWN timeouts (r:3484f338)
libunimrcp: fixed unimrcp to prevent double destroy of connection (r:493085bb)
mod_avmd: Initial check in - Advanced Voicemail Detect (r:10c6a30a) (by Eric Des Courtis)
mod_avmd: Add to windows build (r:df4bd935)
mod_avmd: Fix mem leak (r:cd951384/FS-2839)
mod_blacklist: Add mod_blacklist from contrib. (r:3a477c42)
mod_blacklist: Add example configuration file (r:d00f7464)
mod_blacklist: Resource leak fixes, config checks and add help output for api interface (r:41abb3e6)
mod_blacklist: add ability to dump a list back to it's text file (r:1d5f5ec7)
mod_blacklist: fix broken dump/save (r:abc5d7cd/FS-3617)
mod_callcenter: Initial commit of the mod_callcenter application. This module is in it early state of developpement. You can see documentation on the wiki at : <a href="http://wiki.freeswitch.org/wiki/Mod_callcenter">http://wiki.freeswitch.org/wiki/Mod_callcenter</a> For support/comments, please use <a href="http://jira.freeswitch.org/">http://jira.freeswitch.org/</a> and select the MOD CALLCENTER module. (r:ba09b96d)
mod_callcenter: Add ability to unload/reload/load a queue setting (You still need to reloadxml before). Note that joining a queue will check for it in the config and load it on the fly... I've used the same system as in mod_voicemail. Not sure if we should allow this, but just comment it out of the config before unload and it wont be available anymore (r:3eafca60)
mod_callcenter: Try to fix the ring-all, also add cli auto complete done in previous commit (r:1666783c)
@ -393,6 +478,7 @@ freeswitch (1.0.7)
mod_callcenter: New strategies: round-robin, random, and 'top-down' (r:2b4b23aa,r:bee247ca)
mod_callcenter: Display an warning when MOH is invalid and resume wait with silence. (r:37b14c9a/FS-2740)
mod_callcenter: Fix member been switch as abandoned when he was pickup by an agent (r:9ff8f53f/FS-3281)
mod_cdr_mongodb: add MongoDB CDR module (r:a9169199)
mod_cdr_sqlite: initial commit (r:f625fe3b)
mod_cdr_sqlite: config file for mod_cdr_sqlite (r:25bc8fe3)
mod_cdr_sqlite: Drop transaction BEGIN/END around INSERT. We're only executing one command, and autocommit will automatically rollback if the INSERT fails. Sync state_handlers with mod_cdr_csv. Minor libpq fixups. (r:0f95b870)
@ -425,6 +511,12 @@ freeswitch (1.0.7)
mod_commands: add moh by default to uuid_broadcast when only broadcasting to A leg use aleg arg to disable this (r:d164a797)
mod_commands: add API uuid_limit - thanks to Francois Delawarde (r:98a95016/FS-1792)
mod_commands: omit file_string:// prefix if input begins with ~ (r:f12ab59e)
mod_commands: fix crash when uuid_break all cannot find bonded uuid channel (r:69e61f76/FS-3468)
mod_commands: fix uuid_dual_transfer for inline dialplan (r:5d84efc3/FS-3403)
mod_commands: update show calls to show both 1 legged calls and bridged calls, also show bridged_calls for previous behaviour of show calls (r:c16c74d9)
mod_commands: Add 'presence_data' field to 'show channels like xxx' list of fields. This makes anthm's trick mentioned on the mailing list even more handy. (r:4872e6ff)
mod_commands: Update tab-complete for show cmd to include bridged_calls, detailed_calls, detailed_bridged_calls and removed distinct_channels (r:2fa8f110)
mod_commands: add threaded-system-exec param and fsctl (set it to false to use fork) (r:910f5364)
mod_conference: Fix reporting of volume up/down (MODAPP-419)
mod_conference: add last talking time per member to conference xml list
mod_conference: add terminate-on-silence conference param
@ -465,6 +557,11 @@ freeswitch (1.0.7)
mod_conference: wait for thread to start in mod conference to avoid one in a million race on heavy traffic (r:b1cf5bee)
mod_conference: add conference member flag nomoh (r:f35a6814)
mod_conference: add hup command to conference (kick without the kick sound) (r:492db906)
mod_conference: see H.264 iFrames (r:765be8c9/FS-3406)
mod_conference: add moderator PIN controls (thanks Moy) (r:1936c2b0/FS-3493)
mod_conference: remove waste flags from both conference and member and explicitly always send audio from conferences to avoid random interop issues and general discomfort these flags are now deprecated (r:5d77e789)
mod_conference: add conference cdrs to mod_conference (r:127be02d)
mod_conference: add custom kick sound to conference (r:8fde25cc)
mod_curl: use method=post when post requested (r:c6a4ddd0/FSMOD-69)
mod_db: fix stack corruption (MODAPP-407)
mod_dialplan_xml: Add in the INFO log the caller id number when processing a request (Currenly only show the caller name) (r:e1df5e13)
@ -475,7 +572,12 @@ freeswitch (1.0.7)
mod_dingaling: fix leak in chat_send (r:eb109a85)
mod_dingaling: use the login as message source when not in component mode. (chat_send) (r:58c28aab)
mod_dingaling: fix mod_dingaling/iksemel/gnutls link error when using newer autotools (r:294b0779/FS-3182)
mod_dingaling: fix segmentation fault on mod_dingaling when receiving a discovery from the server (r:2e651c8f/FS-3391)
mod_dingaling: Remove unused but set variables GCC-4.6 -Wunused-but-set-variable (r:0f45b8ba/GCC-4)
mod_dingaling: Add from_jid (r:f0b52ef7/FS-3611)
mod_dingaling: autoflush durning bridge in dingaling (r:bd9317f2)
mod_directory: Add variable directory_search_order to allow to search by first name by default is set to "first_name" (r:163ca31f)
mod_directory: let mod_directory use non-XML dialplans (r:8895de1b)
mod_distributor: Add mod_distributor to VS2010 - not built by default (r:bac79ba1)
mod_dptools: add eavesdrop_enable_dtmf chan var (r:596c0012)
mod_dptools: Make park app not send 183 session progress (r:76932995/FSCORE-567)
@ -493,6 +595,13 @@ freeswitch (1.0.7)
mod_dptools: Set the default lang if not supplied (mod_say_en) (r:5382972a/FS-3215)
mod_dptools: add capture dp app (r:860d2a6c)
mod_dptools: Allow redefinition of continue_on_fail and failure_causes during bridge execution. (r:01d0250e/FS-1986)
mod_dptools: Fix "dial 0" 3-way call on att x-fer (r:d4fe85ed/FS-3275)
mod_dptools: fix campon to play music even on first run and cancel faster (r:9cf44f3a)
mod_dptools: fix small leak in strftime (r:bbbd67ba)
mod_dptools: resolve Heap corruption in strftime_api_function -thanks (r:707bd05b/FS-3417)
mod_dptools: fix seg on user_recurse_variables reported on the mailing list (r:01b2bd04)
mod_dptools: add digit_action_set_target app that can set the target (direction of the dtmf flow and subsequent channel who gets the events) to self or peer (bridged channel when possible) (r:cf9859ea)
mod_dptools: get rid of digit_action_set target and add target,bind_target params to bind_digit_action (r:42b64ccd)
mod_easyroute: Fix possible segfaults and memory leak during unload, and add new setting odbc-retries (r:7fbc47f8/FS-2973)
mod_enum: switch mod_enum to use new portable in-tree version (r:2bbc37e3)
mod_enum: fix race condition between ldns configure creating ldns/util.h and mod_enum (r:87884c5c)
@ -506,14 +615,20 @@ freeswitch (1.0.7)
mod_erlang_event: Rewrite XML fetch conditional wait to be more sane (Reported by James Aimonetti) (r:6941c6eb/FS-2775)
mod_erlang_event: Don't urlencode events (and destroy an event after use) (r:4eccdfef)
mod_erlang_event Add proper locking for the list of XML bindings (r:9fe440b2)
mod_erlang_event: Fixed a memory leak, too short of connect times across data centers, a deadlock condition with the globals.bindings_rwlock not being released, a buffer overrun possibility or 4, and added the ability to send a body when injecting an event (r:994f9a8c)
mod_event_multicast: make multicast loopback configurable (r:97a7668c/FS-3416)
mod_event_socket: fix up other users of switch_event_xmlize() to use SWITCH_EVENT_NONE (r:d6eb7562)
mod_event_socket: Fix small mem leaks (r:e4f90584/MODEVENT-68)
mod_event_socket: Add "-ERR" to api cmd response when failure occurs (r:58759052/FS-2827)
mod_event_socket: clear unique headers on event_socket filters (r:436413e0)
mod_event_socket: Unlock mutex to prevent mortuus obfirmo (r:64bc1938/FS-3156/FS-3157)
mod_event_socket: (and mod_erlang_event) make empty apply-inbound-acl config line not deny all (r:8ae9ab5d/FS-3034)
mod_event_socket: allow duplicate headers to be parsed into events received on the wire (r:2b7a830d)
mod_event_socket: add optional format string after myevent (r:7ed7f539)
mod_event_socket: Allow ridiculously long commands over event socket (r:6bbde4e2/FS-3621)
mod_event_zmq: Intitial mod_event_zmq code (r:4d554067)
mod_event_zmq: Update download file from 2.1.3 to 2.1.4 (2.1.3 tar file is gone from zmq server) (r:0b780702)
mod_event_zmq: Bump to zeromq-2.1.9 (r:3a352e67)
mod_fifo: allow multiple dtmf to exit fifo, set fifo_caller_exit_key to specify which (MODAPP-420)
mod_fifo: cancel outbound call if customer hangs up (r:cadb4d94)
mod_fifo: add taking_calls param to fifo member add and config file (r:821488bf)
@ -526,7 +641,11 @@ freeswitch (1.0.7)
mod_fifo: Fix crash when using fifo_destroy_after_use (r:ee562c82/FS-2879)
mod_fifo: don't seg in edge case error conditions (r:9ee13b72)
mod_fifo: set tracking data before enabling hooks (r:34267869)
mod_fifo: Fix fifo orbit timeout when not using a chime tested with and without chime (r:7fee1fd1)
mod_fifo: Fix URI (r:26039c57/FS-3548)
mod_fifo: add _continue_ value for fifo orbit exten that just means exit back to the next dp instruction (r:4d6ee827)
mod_file_string: Fix segfault when using file string in conference (r:9c40e8e9/FS-3122)
mod_flite: Update to flite 1.5.1 it should sound better now too (r:ecbd1db8)
mod_freetdm: Fix for TON and NPI not passed through to channel variables on incoming calls
mod_freetdm: add pvt data to freetdm channels fix fxs features (r:9d456900)
mod_freetdm: export and import boost custom data (r:edb2d582)
@ -589,6 +708,8 @@ freeswitch (1.0.7)
mod_h323: move PTrace level set to FSH323EndPoint::Initialise. partially apply patch from from Peter Olsson, Remove UnLock() when TryLock() failed and DEBUG_RTP_PACKETS directiv e. (r:7b5803f7)
mod_h323: set network_addr of caller profile to signaling ip address. (requested by Steven Ayre) (r:072bf5ad)
mod_h323: fix race condition on destroying signaling thread in h323 library (r:c22aac0e)
mod_h323: move the switch_rtp_request_port() call from the contructor to FSH323Connection::CreateRealTimeLogicalChannel() - fix rtp port leak. tnx to Peter Olsson. (r:6f4c4ea0)
mod_http_cache: Initial commit of new module (thanks crienzo) (r:c51acfcc/FS-3597)
mod_java: fix eventConsumer issue and add flush() method (r:7fd3aff6)
mod_java: Allow user defined java methods to be called at startup and shutdown of JVM (r:1339e218/MODLANG-117)
mod_json_cdr: Fix segfault in mod_json_cdr.c (r:f347698a/MODEVENT-66)
@ -596,6 +717,7 @@ freeswitch (1.0.7)
mod_khomp: Removed alternative contexts / extensions - New struct for matchs - On calls originated from an FXS branch, the Endpoint searches for a valid extension (digits sent) after the DTMF '#' or after the timeout (option fxs-digit-timeout). That search is done in the context defined in section <fxs-options>, or if no context configured, the search is done in context defined in context-fxs. - Added "dialplan" configuration: Name of the dialplan module in use (default XML) - Group context enabled. If set, the search for a valid extension is done only in that context. - Updated documentation (r:1ef3fc9a)
mod_ladspa: Add mod_ladspa (Audio plugin framework for linux) (r:2d3d8f8d)
mod_ladspa: add string params to ladspa so you can connect files to audio ports (string params don't count towards number params) (r:b7891511)
mod_ladspa: putenv() breaks the process environment variables, use setenv() instead. (r:f6dadb58)
mod_lcr: Expand variables (MODAPP-418)
mod_lcr: add enable_sip_redir parameter (r:70bf7a0a/MODAPP-427)
mod_lcr: don't validate profiles with ${} vars since they are dynamic and we can't guess what the proper value should be (r:af33afaa)
@ -607,6 +729,7 @@ freeswitch (1.0.7)
mod_lcr: don't add routes that have no rate of the desired type (r:82e3ccf8)
mod_lcr: fix "as xml" for larger number of arguments (r:3dca2ebb/FS-3283)
mod_lcr: fix malformed XML when has embedded %s (r:5fa9619f/FS-3284)
mod_lcr: initial addition of very basic LRN (r:6d1d4a9c)
mod_loopback: add loopback_bowout_on_execute var to make 1 legged loopback calls bow out of the picture
mod_loopback: only execute app once in app mode (r:64f58f2d)
mod_loopback: fix bug in mod_loopback where bowout=false (r:e9ab5368)
@ -614,6 +737,7 @@ freeswitch (1.0.7)
mod_loopback: fix voicemail failure (r:1a1881e8/FS-2795)
mod_loopback: pass ring_ready like we do with pre_answer (r:9d087d45)
mod_loopback: refactor mod_loopback timeout handling (r:43442e4f)
mod_loopback: Fix loopback_bowout_on_execute failure when doing txfax calls (r:895b505f/FS-3494)
mod_lua: Add switch_core_sqldb functionality from inside Lua script (r:26f2e095/FS-1384)
mod_lua: Made 2nd arg to freeswitch.Dbh:query (cb func) optional (r:87db11af)
mod_lua: Added SAF_ROUTING_EXEC flag to lua app, so it can be run inline (r:7d5ca1c0)
@ -625,7 +749,10 @@ freeswitch (1.0.7)
mod_managed: Added wrapper for switch_event_bind for .net (r:a5f07a80/MODLANG-165)
mod_managed: add additional support (r:5be58aac)
mod_managed: add mono 2.8 patch file see FS-2774 (r:6a948bd9/FS-2774)
mod_managed: resolve Memory leak in mod_managed by EventBinding and swig delete_switch_event (r:c6048134/FS-3381)
mod_managed: upgrade mono to support 2.8 - MichaelGG (r:1dcac642/FS-2774)
mod_mongo: New mod, initial commit; module for MongoDB (http://www.mongodb.org/) (r:dc6ca6f8/FS-3278)
mod_mongo: add mapreduce API (r:7c5b5797/FS-3357)
mod_mp4v: MP4V-ES passthru for washibechi on IRC
mod_mp4: New module. Supports playback of MP4 files. Depends on libmp4v2 <http://code.google.com/p/mp4v2/> (originally compiled against v1.6.1)
mod_nibblebill: free allocated mem at shutdown; free properly if using custom_sql
@ -643,13 +770,18 @@ freeswitch (1.0.7)
mod_opus: Use libtool archives for linking, add dependencies to fix parallel builds (r:74bbd4be)
mod_osp: initial check (Open Settlement Protocol)
mod_osp:Changed OSP TCP port from 1080 to 5045. (r:03abefdf)
mod_perl: add chat app to perl (r:18897f9e)
mod_pocketsphinx: Update PocketSphinx to the latest builds... only had to make two changes (r:1a39d7fb)
mod_pocketsphinx: They no longer ship the wsj model in pocketsphinx... and seems the dictionary has moved a bit. (r:23571680)
mod_portaudio: Fix inbound state (CS_ROUTING not CS_INIT) (MODENDP-302)
mod_portaudio: mod_portaudio improvements and bug fixes (r:33b74ca8/FS-3006)
mod_portaudio: Add pa devlist to portaudio webapi (r:e8f10ea3)
mod_portaudio: fix crash on bad init (r:6f49e6ba/FS-3361)
mod_portaudio: move load_config a bit lower since it needs to use the hashtables (r:1529c0ec)
mod_portaudio: Fix Windows crash (r:94c9cbf6/FS-3498)
mod_portaudio_stream: update to specify the channel index (r:d1169d6e)
mod_protovm: This is a very early new prototype voicemail ivr system. You need to copy the sounds.xml and make it loadale in the language folder and protovm.conf.xml inside the autoload_configs folder. Configs file will most definitly change. Once stabilized, we make it install those file by default. (r:fb549777)
mod_python: add chat app to python (r:08917021)
mod_radius_cdr: Add 'Freeswitch-Direction' av pair (r:a5170df0)
mod_radius_cdr: Add 'Freeswitch-Other-Leg-Id' av pair (r:18d29b46)
mod_radius_cdr: log errors with the call's uuid (r:fee49b16)
@ -658,6 +790,16 @@ freeswitch (1.0.7)
mod_rtmp: Make all sockets non-blocking (r:affcdb0a)
mod_rtmp: mod_rtmp for windows (r:f8cda539/FS-3355)
mod_rtmp: flush buffer to avoid lag and enable plc (r:4bb76831)
mod_rtmp: add conf (r:4eaabd28)
mod_rtmp: set variables based on input hash (r:3815d188)
mod_rtmp: Remove duplicate output from rtmp status profile xxx API command (r:2e016541)
mod_rtmp: Make all sockets non-blocking (r:affcdb0a)
mod_rtmp: Lower default buffer size to 50ms (r:d52a254d)
mod_rtmp: CNG frames need to have codec set too (r:36f812d9)
mod_rtmp: remove superfluous hangup (r:50817655)
mod_rtmp: fix crash when call made from user not in domain (r:a5452174/FS-3353)
mod_rtmp: add params so xml curl can know who's calling the directory request (r:91b73d1f)
mod_rtmp: New feature: param disallow-multiple-registration on user directory logs out all other users on other sessions with the same user:domain pair. (r:624a2921)
mod_sangoma_codec: Add sample config file
mod_sangoma_codec: added load/noload options for the supported codecs
mod_sangoma_codec: rename load/noload to register/noregister
@ -685,6 +827,7 @@ freeswitch (1.0.7)
mod_shell_stream: Fix defunct processes being left behind (r:89666f44/FS-3316)
mod_shout: bump mod_shout to use mpg123-1.13.2 to hopefully address unwanted calls to exit() and inherit other upstream fixes (r:079f3f73)
mod_shout: add append flag to mod_shout, can append MP3's (r:0419c4e0)
mod_shout: add ability to set bitrate, samplerate, and encoder quality in config file (r:8ea3cbd5/FS-1231)
mod_silk: Fix mod_silk compliance and performance issues (r:2ddbc457/MODCODEC-20)
mod_skinny: Add the missing api files
mod_skinny: add example dialplan and directory config (r:1bfcc17e)
@ -714,6 +857,13 @@ freeswitch (1.0.7)
mod_skypopen: deleted osscuse subdir (r:4842a620)
mod_skypopen: adding installer and Skype client configuration directories (to be announced :) ) (r:25ebf715)
mod_skypopen: refining INTERACTIVE INSTALLER for Linux (to be announced :) ) (r:aa7f47ac)
mod_skypopen: refining oss driver, removing audio sync during call (was each 20 secs), audio sync at the tcp interfacing with the skype client (reading more than 20ms worth) (r:891015e6)
mod_skypopen: fixed a demented bug (incrementing a variable zeroed in the same loop) maybe responsible for moh sputtering under load on virtual machines (r:43eeeb82)
mod_skypopen: avoid accumulating delay on VMs, better debug logging (r:1b4c78bf)
mod_sms: add new chatplan concept and mod_sms. Apps for chat messages: copy new base freeswitch.xml and chatplan dir if you are upgrading on existing config base (r:7333d46d)
mod_sms: fix "format literal and no arguments" warning (r:a0e91001)
mod_sms: allow chatplan apps to have null args (r:4feb26d3)
mod_sms: only ignore events if you matched something on a cp (r:a14b20af)
mod_snapshot: fix bad codepaths in mod_snapshot (r:844ac220)
mod_sndfile: Add support for .alaw and .ulaw to mod_sndfile (r:facf09b8/MODFORM-41)
mod_sndfile: return break in mod_sndfile when seek returns failure (r:564dc7e4)
@ -897,6 +1047,54 @@ freeswitch (1.0.7)
mod_sofia: removed the vid refresh thing (r:49e52b4c/FS-3362)
mod_sofia: add sip_liberal_dtmf chanvar and liberal-dtmf profile param to use the maximum methods of DTMF avoiding sticking to the spec which leads to incompatability (r:bc7cb400)
mod_sofia: support final response in response header passing (r:acd0898e)
mod_sofia: Fix failure to fall back to g.711 when t.38 attempt fails (r:07a79752/FS-3214)
mod_sofia: pop ::<profile_name> off the domain name in mwi events to hint at the profile (r:e2ed8c08)
mod_sofia: dig into the database to figure out what profile to send mwi on when they are not willing to alais the domain to the profile =/ (r:b14340a5)
mod_sofia: Fix 3pcc codec negotiation issue with bypass_media (r:c5a2275f/FS-3340)
mod_sofia: re-add not-so-superfluous-after-all NUTAG_AUTOANSWER(0) (r:927fde18/FS-3349)
mod_sofia: add mutex around gateway access on per-profile basis and token based access to global profiles to prevent hanging on to the hash mutex while doing sql stmts which may cause issues/slowdowns (r:9df8169d)
mod_sofia: add parallelism to sofia by offsetting sip messages to the concerned sessions and using multiple queue threads for message handling (r:fb68746e)
mod_sofia: Fix sofia hang on shutdown (r:3be64cbf/FS-3354)
mod_sofia: remove vid refresh from SDP on declined video connection (r:49e52b4c/FS-3362)
mod_sofia: fix small mem leak in sofia (r:6f62f391/FS-3386)
mod_sofia: add proxy tag to UPDATE packets if it was set by INVITE (r:e6605139)
mod_sofia: resolve attended transfers, it fails to parse the Replaces when encoded (r:d9bbf129/FS-3304)
mod_sofia: if user has set presence_id, don't override it (r:7cdc8342)
mod_sofia: only list real profiles not aliases in presence code (r:f9969f38)
mod_sofia: Fix 200 OK not passed for Callee-Initiated ReInvite for T.38 (r:b2299035/FS-3421)
mod_sofia: destroy nh if SIP transaction terminated by a 488 (r:a0cec8ab/FS-3444)
mod_sofia: use register contact to determine proper contact in 200 ok response to register (r:f9612fec)
mod_sofia: add NDLB-allow-nondup-sdp to indicate you want to parse a differnt sdp in 200 ok from 1xx (previous default) this is a RFC violation so I decided not to support it by default anymore. Enable this if you want that broken behaviour (r:3f489a2a)
mod_sofia: add homer capture hooks to mod_sofia (r:98473085)
mod_sofia: sdp_m_per_ptime is now implied to be true, if you don't like this set it to false but its going to be undefined behaviour. This basically means if you call in with ptime 30 then you have a bunch of ptime 20 codecs in your outbound list that there will be one m= line with 30 and the original inbound codec and more m= lines for each discinct ptime in your list. This is, of course, will depend on disable_trancoding or absolute_codec_string as well (r:56d67ead)
mod_sofia: filter re-transmission of extra SIP headers (r:9e399c19/FS-3439)
mod_sofia: Fix RTP handling bug to allow goofy & undefined behavior (r:77413ba9/FS-3451)
mod_sofia: don't allow auto answer on an non-outbound call (r:61ee7fdc)
mod_sofia: use the call_id of the original register in the unsolicited notify for MWI (r:53b0ecce)
mod_sofia: Fix caller ID name on bridged appearance (r:7efa4fb2/FS-3532)
mod_sofia: speed up restart speed of profiles (r:fb5f29c2)
mod_sofia: this is actually compliant when mixing ptimes in the same sdp but since iLBC uses its own fmtp for ptime I will add this patch to make it beleive its 20 for the sake of arguement. If you have any other problems with this, set the channel or global variable sdp_m_per_ptime=false to completely disable the default correct behaviour (r:247537a9/FS-3545)
mod_sofia: I missed a few more spots to hack in the exception for iLBC, (thanks for marring my code iLBC ppl) it should work as expected now even with the m_per_ptime on (r:83a78fbf/FS-3545)
mod_sofia: don't turn X-FS- headers into variables, they are reserved for FS specific communication and should not be passed on (r:7d399cce)
mod_sofia: This patch will probably make it work but the bug is actually in the phone, the patch is simply tolerating the bad behaviour. You are correct about the a=sendonly missing, this was fixed in a later revision of the polycom firmware. I suggest that even if this patch works, that you update your phones to a newer firmware, preferably the most recent. (r:7acddfac/FS-3549)
mod_sofia: add auth username to unreg event (r:1b9b3456)
mod_sofia: fix wrong media ip in recover data issue (r:5154b881)
mod_sofia: fix missing ACK that causes Polycom failure (r:408adb8d/FS-3558)
mod_sofia: use bridge_to instead of signal_bond for recovering bridge (r:f4794620)
mod_sofia: save telephony event data for recovery (r:4d1a76ee)
mod_sofia: tighten up the parsing of these boolean vals issue in t38 sdp (r:626b5cb2/FS-3571,FS-3442,FS-957)
mod_sofia: resolve race condition caused by unresponsive host when unregistering the gateway. (r:607c112f/FS-3583)
mod_sofia: only require user and pass in gateway when register is true (r:9e4ca2c2)
mod_sofia: Remove arbitrary 100 ACL limit (r:dd5188f3/FS-3605)
mod_sofia: add t38_pass_broken_boolean to pass the broken boolean behaviour over to the other side of the call when detected (r:afd0e1fc)
mod_sofia: Update handling of sub/notify (fixes broken Snom BLF) (r:51c22811/FS-2877)
mod_sofia: Don't add Contact header to MESSAGE requests, per RFC3428 (libsofia still does it a bit) (r:1f6670e7/FS-3628)
mod_sofia: add presence_map (r:4ee1722f)
mod_sofia: add presence_map config (r:48416707)
mod_sofia: add lookup params to presence_map (r:ea7f6a18)
mod_sofia: add missing mod_sofia indexes (r:40df8d65)
mod_soundtouch: updated soundtouch to library 1.5.0 to fix gcc > 4.3 incompatibilities (r:dfb5c629)
mod_soundtouch: Update soundtouch to 1.6.0 to fix FS-3634 (r:d8ae59fd/FS-3634)
mod_spandsp: initial checkin of mod_fax/mod_voipcodecs merge into mod_spandsp (r:fa9a59a8)
mod_spandsp: rework of new mod_spandsp to have functions broken up into different c files (r:65400642)
mod_spandsp: improve duplicate digit detection and add 'min_dup_digit_spacing_ms' channel variable for use with the dtmf detector (r:eab4f246/FSMOD-45)
@ -916,6 +1114,11 @@ freeswitch (1.0.7)
mod_spandsp: add more fax event information (r:0555b702/FS-3345)
mod_spandsp: fix memory issue in spandsp_tone_detect (r:8793c2ed)
mod_spandsp: add proper tone detect stop (r:8beb10d2/FS-3367)
mod_spandsp: add more fax event information (r:0555b702/FS-3345)
mod_spandsp: fix memory issue in spandsp_tone_detect (r:8793c2ed)
mod_spandsp: Tweak link order of some libs to fix build on gcc platforms that have ld flag "--as-needed" as default. (r:0db88b59/FS-2873/FS-2874)
mod_spandsp: Fix spandsp_start_fax_detect timeout issue (r:90a6e78d/FS-3619)
mod_spandsp: Add tone_type param to start_fax_detect to handle outbound fax detection (r:d6d18748/FS-3624)
mod_spidermonkey: allow vars to be set containing vars from languages (r:5cd072a3)
mod_spidermonkey: fix seg in js hangup (r:7d554c11)
mod_spidermonkey: Fix mod_spidermonkey build on FreeBSD, (Undefined symbol PR_LocalTimeParameters). (r:3edb8419)
@ -935,6 +1138,11 @@ freeswitch (1.0.7)
mod_valet_parking: add event for Valet Parking action exit
mod_valet_parking: pass hold class on transfer (r:76a065ec)
mod_valet_parking: add valet_announce_slot variable (r:293d7254)
mod_valet_parking: make valet parking reserve a space for 10 seconds to allow time for an attended transfer switcharoo (r:308f44af)
mod_valet_parking: refactor timeout tracker for valet (r:3514c780)
mod_valet_parking: valet_info now returns uuid properly (r:34ddeb75/FS-3613)
mod_valet_parking: add presence to mod_valet_parking subscribe to the lot name for general stats or individual slots to monitor with park+ prefix *note* this used to be used in mod_fifo which now will use queue+ going forward (r:9daa42c1)
mod_valet_parking: lower token freq to 5, put it in a define and have more obvious warning about full lots (r:2f786a07)
mod_voicemail: Fix vm_prefs profile lock (MODAPP-417)
mod_voicemail: add 'vm-enabled' param (default true)
mod_voicemail: fix vm msg being deleted when pressing key to forward to email (MODAPP-403)
@ -952,12 +1160,20 @@ freeswitch (1.0.7)
mod_voicemail: vm-skip-instructions param in xml directory to disable instructions how to record a file (r:ed7e1f39)
mod_voicemail: Implement 10 new standard api function call that allow you to control fs voicemail storage system. The goal is to have a standard API set for any additional storage system we wish the voicemail to run off. Current list of added api name are : vm_fsdb_msg_count, vm_fsdb_msg_list, vm_fsdb_msg_get, vm_fsdb_msg_delete, vm_fsdb_msg_undelete, vm_fsdb_msg_purge, vm_fsdb_msg_save, vm_fsdb_pref_greeting_set, vm_fsdb_pref_recname_set, vm_fsdb_pref_password_set. (r:1f4cb488)
mod_voicemail: Adding a new voicemail fsdb api vm_fsdb_auth_login that does basic login authentication for a user (r:bfdfac5e)
mod_voicemail: Fix vm to email dial 8 option (r:8592b6d9/FS-3382)
mod_voicemail: Add 2 new profile settings, db-password-override and allow-empty-password-auth. By default, they have value of their previous behavior. If db-password-override=true, the db password will only be used if present, if not present fallback to the xml config file vm-password. If allow-empty-password-auth=false, it will disable login via a authentication method if there is no password set in the user account (This wont affect voicemail_authorize=true login). (r:a9db642a)
mod_voicemail: remove pointless update_mwi() in vm_list api command (r:b952b2b2)
mod_voicemail: add message_len to output of vm_list api command (r:77c5000d)
mod_voicemail: use vm_email as notification address if vm_notify_email isn't set (that behavior was in voicemail_leave_main but not in deliver_vm) (r:8974f9d6)
mod_voicemail: better fix for voicemail email key match (r:aff4bcbe/FS-3080)
mod_voicemail: Prevent rewind key from breaking out of message playback (r:923a104b/FS-3637)
mod_xml_cdr: add force_process_cdr var to process b leg cdr on a case by case basis when b leg cdr is disabled (XML-17)
mod_xml_cdr: add leg param to query string (XML-24)
mod_xml_cdr: fix locked sessions (XML-26)
mod_xml_cdr: fix minor memory leaks and config bug (r:19253d83/MODEVENT-62)
mod_xml_cdr: Fix prefix-a-leg not respected for url submission (r:ea9021a2/FS-2998)
mod_xml_cdr: Fix delay to 5 sec from 5000 sec (r:34a38009/FS-2815)
mod_xml_cdr: Accept all 2xx messages, not just "200" (r:d39b7c6b/FS-3593)
mod_xml_rpc: Fix crash if unauthorized XML RPC is attempted (r:9835395c/FS-184)
scripts: added honeypot.pl and blacklist.pl which add extra SIP security options (r:b6a81ba7)
scripts: do simple verification to make sure we are getting IP addresses from VoIP abuse blacklist (r:b0049160)

View File

@ -5,23 +5,23 @@
<prompt phrase="Pound" filename="35.wav"/>
<prompt phrase="Star" filename="42.wav"/>
<prompt phrase="Dot" filename="46.wav"/>
<prompt phrase="Hyphen" filename="45.wav"/>
<prompt phrase="Exclamation point" filename="33.wav"/>
<prompt phrase="At" filename="64.wav"/>
<prompt phrase="Dollar sign" filename="36.wav"/>
<prompt phrase="Percent" filename="37.wav"/>
<prompt phrase="Ampersand" filename="38.wav"/>
<prompt phrase="Double quote" filename="34.wav"/>
<prompt phrase="Single quote" filename="39.wav"/>
<prompt phrase="Forward slash" filename="47.wav"/>
<prompt phrase="Underscore" filename="95.wav"/>
<prompt phrase="Backslash" filename="92.wav"/>
<prompt phrase="Tilde" filename="126.wav"/>
<prompt phrase="Equal sign" filename="61.wav"/>
<prompt phrase="Colon" filename="58.wav"/>
<prompt phrase="Semicolon" filename="59.wav"/>
<prompt phrase="Caret" filename="94.wav"/>
<prompt phrase="Pipe" filename="124.wav"/>
<prompt phrase="Hyphen" filename="45.wav"/>
<prompt phrase="Exclamation point" filename="33.wav"/>
<prompt phrase="At" filename="64.wav"/>
<prompt phrase="Dollar sign" filename="36.wav"/>
<prompt phrase="Percent" filename="37.wav"/>
<prompt phrase="Ampersand" filename="38.wav"/>
<prompt phrase="Double quote" filename="34.wav"/>
<prompt phrase="Single quote" filename="39.wav"/>
<prompt phrase="Forward slash" filename="47.wav"/>
<prompt phrase="Underscore" filename="95.wav"/>
<prompt phrase="Backslash" filename="92.wav"/>
<prompt phrase="Tilde" filename="126.wav"/>
<prompt phrase="Equal sign" filename="61.wav"/>
<prompt phrase="Colon" filename="58.wav"/>
<prompt phrase="Semicolon" filename="59.wav"/>
<prompt phrase="Caret" filename="94.wav"/>
<prompt phrase="Pipe" filename="124.wav"/>
<prompt phrase="A" filename="97.wav"/>
<prompt phrase="B" filename="98.wav"/>
<prompt phrase="C" filename="99.wav"/>
@ -239,30 +239,30 @@
<prompt phrase="I need to record your first and last name. This recording is used throughout the system, including in the company directory." filename="vm-tutorial_record_name.wav"/>
<prompt phrase="Your personal identification number, or 'pin', is used to prevent others from accessing your voicemail messages. Would you like to change it now?" filename="vm-tutorial_change_pin.wav"/>
<prompt phrase="The person you are trying to reach is not available and does not have voicemail." filename="vm-not_available_no_voicemail.wav"/>
<prompt phrase="The PIN you entered is below the minimum length." filename="voicemail/vm-pin_below_minimum_length.wav"/>
<prompt phrase="The minimum PIN length is..." filename="voicemail/vm-minimum_pin_length_is.wav"/>
<prompt phrase="The PIN you entered is below the minimum length." filename="voicemail/vm-pin_below_minimum_length.wav"/>
<prompt phrase="The minimum PIN length is..." filename="voicemail/vm-minimum_pin_length_is.wav"/>
</voicemail>
<directory>
<prompt phrase="Please enter the first few letters of the persons" filename="dir-enter_person.wav"/>
<prompt phrase="...last name..." filename="dir-last_name.wav"/>
<prompt phrase="To search by..." filename="dir-to_search_by.wav"/>
<prompt phrase="...first name..." filename="dir-first_name.wav"/>
<prompt phrase="There were no matching results." filename="dir-no_matching_results.wav"/>
<prompt phrase="...results matched your search." filename="dir-result_match.wav"/>
<prompt phrase="Your search returned too many results." filename="dir-too_many_result.wav"/>
<prompt phrase="No more results." filename="dir-no_more_results.wav"/>
<prompt phrase="Result number..." filename="dir-result_number.wav"/>
<prompt phrase="...at extension..." filename="dir-at_extension.wav"/>
<prompt phrase="To select this entry..." filename="dir-to_select_entry.wav"/>
<prompt phrase="For the next entry..." filename="dir-for_next.wav"/>
<prompt phrase="For the previous entry..." filename="dir-for_prev.wav"/>
<prompt phrase="To start a new search..." filename="dir-start_new_search.wav"/>
<prompt phrase="You need to specify a minimum of..." filename="dir-specify_mininum.wav"/>
<prompt phrase="...letters of the person's name." filename="dir-letters_of_person_name.wav"/>
<prompt phrase="Please try again." filename="dir-please_try_again.wav"/>
<prompt phrase="press" filename="dir-press.wav" info="we can copy vm/vm-press.wav"/>
<prompt phrase="Please enter the first few letters of the persons" filename="dir-enter_person.wav"/>
<prompt phrase="...last name..." filename="dir-last_name.wav"/>
<prompt phrase="To search by..." filename="dir-to_search_by.wav"/>
<prompt phrase="...first name..." filename="dir-first_name.wav"/>
<prompt phrase="There were no matching results." filename="dir-no_matching_results.wav"/>
<prompt phrase="...results matched your search." filename="dir-result_match.wav"/>
<prompt phrase="Your search returned too many results." filename="dir-too_many_result.wav"/>
<prompt phrase="No more results." filename="dir-no_more_results.wav"/>
<prompt phrase="Result number..." filename="dir-result_number.wav"/>
<prompt phrase="...at extension..." filename="dir-at_extension.wav"/>
<prompt phrase="To select this entry..." filename="dir-to_select_entry.wav"/>
<prompt phrase="For the next entry..." filename="dir-for_next.wav"/>
<prompt phrase="For the previous entry..." filename="dir-for_prev.wav"/>
<prompt phrase="To start a new search..." filename="dir-start_new_search.wav"/>
<prompt phrase="You need to specify a minimum of..." filename="dir-specify_mininum.wav"/>
<prompt phrase="...letters of the person's name." filename="dir-letters_of_person_name.wav"/>
<prompt phrase="Please try again." filename="dir-please_try_again.wav"/>
<prompt phrase="press" filename="dir-press.wav" info="we can copy vm/vm-press.wav"/>
<prompt phrase="For the next entry..." filename="dir-for_next.wav" note="re-recorded because original was wrong"/>
<prompt phrase="Please enter the first few letters of the person's first or last name" filename="dir-enter_person_first_or_last.wav"/>
<prompt phrase="Please enter the first few letters of the person's first or last name" filename="dir-enter_person_first_or_last.wav"/>
</directory>
<conference>
<prompt phrase="NULL" filename="conf-ack.wav" type="tone"/>
@ -287,14 +287,14 @@
<prompt phrase="...has left the conference." filename="conf-has_left.wav"/>
<prompt phrase="You are already muted." filename="conf-you_are_already_muted.wav"/>
<prompt phrase="You are now bi-directionally muted." filename="conf-you_are_now_bidirectionally_muted.wav"/>
<prompt phrase="Enter the number of listeners at this location, then press pound." filename="conf-number_of_listeners.wav"/>
<prompt phrase="...listeners in this conference." filename="conf-listeners_in_conference.wav"/>
<prompt phrase="...listener in this conference." filename="conf-listener_in_conference.wav"/>
<prompt phrase="...members in this conference." filename="conf-members_in_conference.wav"/>
<prompt phrase="This conference is in Q and A mode." filename="conference/conf-conference_is_in_qna_mode.wav"/>
<prompt phrase="Q and A mode..." filename="conference/conf-qna_mode.wav"/>
<prompt phrase="Entry sound..." filename="conference/conf-entry_sound.wav"/>
<prompt phrase="Exit sound..." filename="conference/conf-exit_sound.wav"/>
<prompt phrase="Enter the number of listeners at this location, then press pound." filename="conf-number_of_listeners.wav"/>
<prompt phrase="...listeners in this conference." filename="conf-listeners_in_conference.wav"/>
<prompt phrase="...listener in this conference." filename="conf-listener_in_conference.wav"/>
<prompt phrase="...members in this conference." filename="conf-members_in_conference.wav"/>
<prompt phrase="This conference is in Q and A mode." filename="conference/conf-conference_is_in_qna_mode.wav"/>
<prompt phrase="Q and A mode..." filename="conference/conf-qna_mode.wav"/>
<prompt phrase="Entry sound..." filename="conference/conf-entry_sound.wav"/>
<prompt phrase="Exit sound..." filename="conference/conf-exit_sound.wav"/>
</conference>
<ivr>
<prompt phrase="Account number" filename="ivr-account_number.wav"/>
@ -398,21 +398,21 @@
<prompt phrase="Thank you for calling. If you know your party's extension, please enter it now. For a directory, press..." filename="ivr-generic_greeting.wav"/>
<prompt phrase="...file..." filename="ivr-file.wav"/>
<prompt phrase="...files..." filename="ivr-files-.wav"/>
<prompt phrase="For a wakeup call..." filename="ivr-for_a_wakeup_call.wav"/>
<prompt phrase="This is your wakeup call." filename="ivr-this_is_your_wakeup_call.wav"/>
<prompt phrase="To request a wakeup call..." filename="ivr-request_wakeup_call.wav"/>
<prompt phrase="To confirm a wakeup call..." filename="ivr-confirm_wakeup_call.wav"/>
<prompt phrase="To cancel a wakeup call..." filename="ivr-cancel_wakeup_call.wav"/>
<prompt phrase="You have requested a wakeup call for..." filename="ivr-requested_wakeup_call_for.wav"/>
<prompt phrase="You have not requested a wakeup call." filename="ivr-not_requested_wakeup_call.wav"/>
<prompt phrase="Your wakeup call has been cancelled." filename="ivr-wakeup_call_cancelled.wav"/>
<prompt phrase="For a daily wakeup call..." filename="ivr-for_daily_wakeup_call.wav"/>
<prompt phrase="Daily wakeup call..." filename="ivr-daily_wakeup_call.wav"/>
<prompt phrase="For daily wakeup calls..." filename="ivr-for_daily_wakeup_calls.wav"/>
<prompt phrase="For a one-time wakeup call..." filename="ivr-for_one_time_wakeup_call.wav"/>
<prompt phrase="One-time wakeup call..." filename="ivr-one_time_wakeup_call.wav"/>
<prompt phrase="...wakeup call..." filename="ivr-wakeup_call.wav"/>
<prompt phrase="Wakey wakey sunshine!" filename="ivr-wakey_wakey_sunshine.wav"/>
<prompt phrase="For a wakeup call..." filename="ivr-for_a_wakeup_call.wav"/>
<prompt phrase="This is your wakeup call." filename="ivr-this_is_your_wakeup_call.wav"/>
<prompt phrase="To request a wakeup call..." filename="ivr-request_wakeup_call.wav"/>
<prompt phrase="To confirm a wakeup call..." filename="ivr-confirm_wakeup_call.wav"/>
<prompt phrase="To cancel a wakeup call..." filename="ivr-cancel_wakeup_call.wav"/>
<prompt phrase="You have requested a wakeup call for..." filename="ivr-requested_wakeup_call_for.wav"/>
<prompt phrase="You have not requested a wakeup call." filename="ivr-not_requested_wakeup_call.wav"/>
<prompt phrase="Your wakeup call has been cancelled." filename="ivr-wakeup_call_cancelled.wav"/>
<prompt phrase="For a daily wakeup call..." filename="ivr-for_daily_wakeup_call.wav"/>
<prompt phrase="Daily wakeup call..." filename="ivr-daily_wakeup_call.wav"/>
<prompt phrase="For daily wakeup calls..." filename="ivr-for_daily_wakeup_calls.wav"/>
<prompt phrase="For a one-time wakeup call..." filename="ivr-for_one_time_wakeup_call.wav"/>
<prompt phrase="One-time wakeup call..." filename="ivr-one_time_wakeup_call.wav"/>
<prompt phrase="...wakeup call..." filename="ivr-wakeup_call.wav"/>
<prompt phrase="Wakey wakey sunshine!" filename="ivr-wakey_wakey_sunshine.wav"/>
<prompt phrase="Welcome." filename="ivr-welcome.wav"/>
<prompt phrase="Welcome to..." filename="ivr-welcome_to.wav"/>
<prompt phrase="Good morning." filename="ivr-good_morning.wav"/>
@ -439,67 +439,64 @@
<prompt phrase="Congratulations, you pressed star. This does not mean you ARE a star. It simply means that you can press buttons and probably have fingers." filename="ivr-congratulations_you_pressed_star.wav"/>
<prompt phrase="All of our engineers are busy assisting other sales guys with demonstrating how cool the CudaTel is." filename="ivr-engineers_busy_assisting_other_sales.wav"/>
<prompt phrase="This message will self-destruct in 5, 4, 3, 2, 1..." filename="ivr-message_self_destruct.wav"/>
<prompt phrase="All your call are belong to us." filename="ivr-all_your_call_are_belong_to_us.wav"/>
<prompt phrase="I just love the way you press those touch tones!" filename="ivr-love_those_touch_tones.wav"/>
<prompt phrase="Yes, we have no bananas." filename="ivr-yes_we_have_no_bananas.wav"/>
<prompt phrase="Dude, you suck!" filename="ivr-dude_you_suck.wav"/>
<prompt phrase="Your call is very important to us, but your sanity is not, so we will be happy to keep you on hold, forever torturing you with our annoying hold music." filename="ivr-on_hold_indefinitely.wav"/>
<prompt phrase="...has left the building." filename="ivr-has_left_the_building.wav"/>
<prompt phrase="This phone is unassigned and may not be used to make external calls." filename="ivr-phone_is_unassigned.wav"/>
<prompt phrase="This phone is not configured properly." filename="ivr-phone_not_configured.wav"/>
<prompt phrase="Congratulations! This phone is configured properly and may now be assigned to a user." filename="ivr-phone_is_configured_properly.wav"/>
<prompt phrase="Please contact the system administrator for assistance." filename="ivr-contact_system_administrator.wav"/>
<prompt phrase="Barracuda Networks" filename="ivr-barracuda_networks.wav"/>
<prompt phrase="CudaTel Communication Server" filename="ivr-cudatel_communication_server.wav"/>
<prompt phrase="There are no calls waiting in this queue." filename="ivr-no_calls_waiting_in_queue.wav"/>
<prompt phrase="You are caller number one. Of course, *every* caller is number one in our book so you may be waiting a while." filename="ivr-youre_number_one.wav"/>
<prompt phrase="...has called emergency services" filename="ivr-has_called_emergency_services.wav"/>
<prompt phrase="There are..." filename="ivr-there_are.wav"/>
<prompt phrase="Please enter the source telephone number, then press pound." filename="ivr-enter_source_telephone_number.wav"/>
<prompt phrase="Please enter the destination telephone number, then press pound." filename="ivr-enter_destination_telephone_number.wav"/>
<prompt phrase="Recording started." filename="ivr-recording_started.wav"/>
<prompt phrase="Recording stopped." filename="ivr-recording_stopped.wav"/>
<prompt phrase="Recording paused." filename="ivr-recording_paused.wav"/>
<prompt phrase="Recording deleted." filename="ivr-recording_deleted.wav"/>
<prompt phrase="You are no longer in queue." filename="ivr-no_longer_in_queue.wav"/>
<prompt phrase="...withdrawn." filename="ivr-withdrawn.wav"/>
<prompt phrase="question..." filename="ivr-question.wav"/>
<prompt phrase="...questions." filename="ivr-questions.wav"/>
<prompt phrase="...has been answered." filename="ivr-has_been_answered.wav"/>
<prompt phrase="...has been removed." filename="ivr-has_been_removed.wav"/>
<prompt phrase="No questions in queue." filename="ivr-no_questions_in_queue.wav"/>
<prompt phrase="...is now on." filename="ivr/ivr_is_now_on.wav"/>
<prompt phrase="...is now off." filename="ivr/ivr_is_now_off.wav"/>
<prompt phrase="This phone is not allowed to make external calls." filename="ivr-phone_not_make_external_calls.wav"/>
<prompt phrase="I.D. number..." filename="ivr-id_number.wav"/>
<prompt phrase="To skip these instructions..." filename="ivr-skip_instructions.wav"/>
<prompt phrase="Hang up the call without pressing a key to discard the recording." filename="ivr-hangup_to_discard.wav"/>
<prompt phrase="...or press..." filename="ivr-or_press.wav"/>
<prompt phrase="For English, press..." filename="ivr-for_english_press.wav"/>
<prompt phrase="Your call cannot be completed as dialed." filename="ivr-call_cannot_be_completed_as_dialed.wav"/>
<prompt phrase="Please check the number and try again." filename="ivr-please_check_number_try_again.wav"/>
<prompt phrase="Failure reason is..." filename="ivr-failure_reason_is.wav"/>
<prompt phrase="Unallocated number" filename="ivr-unallocated_number.wav"/>
<prompt phrase="No user response" filename="ivr-no_user_response.wav"/>
<prompt phrase="Invalid number format" filename="ivr-invalid_number_format.wav"/>
<prompt phrase="Gateway down" filename="ivr-gateway_down.wav"/>
<prompt phrase="No route to destination" filename="ivr-no_route_destination.wav"/>
<prompt phrase="User busy" filename="ivr-user_busy.wav"/>
<prompt phrase="Call rejected" filename="ivr-call_rejected.wav"/>
<prompt phrase="Normal unspecified" filename="ivr-normal_unspecified.wav"/>
<prompt phrase="Incompatible destination" filename="ivr-incompatible_destination.wav"/>
<prompt phrase="Normal clearing" filename="ivr-normal_clearing.wav"/>
<prompt phrase="All your call are belong to us." filename="ivr-all_your_call_are_belong_to_us.wav"/>
<prompt phrase="I just love the way you press those touch tones!" filename="ivr-love_those_touch_tones.wav"/>
<prompt phrase="Yes, we have no bananas." filename="ivr-yes_we_have_no_bananas.wav"/>
<prompt phrase="Dude, you suck!" filename="ivr-dude_you_suck.wav"/>
<prompt phrase="Your call is very important to us, but your sanity is not, so we will be happy to keep you on hold, forever torturing you with our annoying hold music." filename="ivr-on_hold_indefinitely.wav"/>
<prompt phrase="...has left the building." filename="ivr-has_left_the_building.wav"/>
<prompt phrase="This phone is unassigned and may not be used to make external calls." filename="ivr-phone_is_unassigned.wav"/>
<prompt phrase="This phone is not configured properly." filename="ivr-phone_not_configured.wav"/>
<prompt phrase="Congratulations! This phone is configured properly and may now be assigned to a user." filename="ivr-phone_is_configured_properly.wav"/>
<prompt phrase="Please contact the system administrator for assistance." filename="ivr-contact_system_administrator.wav"/>
<prompt phrase="Barracuda Networks" filename="ivr-barracuda_networks.wav"/>
<prompt phrase="CudaTel Communication Server" filename="ivr-cudatel_communication_server.wav"/>
<prompt phrase="There are no calls waiting in this queue." filename="ivr-no_calls_waiting_in_queue.wav"/>
<prompt phrase="You are caller number one. Of course, *every* caller is number one in our book so you may be waiting a while." filename="ivr-youre_number_one.wav"/>
<prompt phrase="...has called emergency services" filename="ivr-has_called_emergency_services.wav"/>
<prompt phrase="There are..." filename="ivr-there_are.wav"/>
<prompt phrase="Please enter the source telephone number, then press pound." filename="ivr-enter_source_telephone_number.wav"/>
<prompt phrase="Please enter the destination telephone number, then press pound." filename="ivr-enter_destination_telephone_number.wav"/>
<prompt phrase="Recording started." filename="ivr-recording_started.wav"/>
<prompt phrase="Recording stopped." filename="ivr-recording_stopped.wav"/>
<prompt phrase="Recording paused." filename="ivr-recording_paused.wav"/>
<prompt phrase="Recording deleted." filename="ivr-recording_deleted.wav"/>
<prompt phrase="You are no longer in queue." filename="ivr-no_longer_in_queue.wav"/>
<prompt phrase="...withdrawn." filename="ivr-withdrawn.wav"/>
<prompt phrase="question..." filename="ivr-question.wav"/>
<prompt phrase="...questions." filename="ivr-questions.wav"/>
<prompt phrase="...has been answered." filename="ivr-has_been_answered.wav"/>
<prompt phrase="...has been removed." filename="ivr-has_been_removed.wav"/>
<prompt phrase="No questions in queue." filename="ivr-no_questions_in_queue.wav"/>
<prompt phrase="...is now on." filename="ivr/ivr_is_now_on.wav"/>
<prompt phrase="...is now off." filename="ivr/ivr_is_now_off.wav"/>
<prompt phrase="This phone is not allowed to make external calls." filename="ivr-phone_not_make_external_calls.wav"/>
<prompt phrase="I.D. number..." filename="ivr-id_number.wav"/>
<prompt phrase="To skip these instructions..." filename="ivr-skip_instructions.wav"/>
<prompt phrase="Hang up the call without pressing a key to discard the recording." filename="ivr-hangup_to_discard.wav"/>
<prompt phrase="...or press..." filename="ivr-or_press.wav"/>
<prompt phrase="For English, press..." filename="ivr-for_english_press.wav"/>
<prompt phrase="Your call cannot be completed as dialed." filename="ivr-call_cannot_be_completed_as_dialed.wav"/>
<prompt phrase="Please check the number and try again." filename="ivr-please_check_number_try_again.wav"/>
<prompt phrase="Failure reason is..." filename="ivr-failure_reason_is.wav"/>
<prompt phrase="Unallocated number" filename="ivr-unallocated_number.wav"/>
<prompt phrase="No user response" filename="ivr-no_user_response.wav"/>
<prompt phrase="Invalid number format" filename="ivr-invalid_number_format.wav"/>
<prompt phrase="Gateway down" filename="ivr-gateway_down.wav"/>
<prompt phrase="No route to destination" filename="ivr-no_route_destination.wav"/>
<prompt phrase="User busy" filename="ivr-user_busy.wav"/>
<prompt phrase="Call rejected" filename="ivr-call_rejected.wav"/>
<prompt phrase="Normal unspecified" filename="ivr-normal_unspecified.wav"/>
<prompt phrase="Incompatible destination" filename="ivr-incompatible_destination.wav"/>
<prompt phrase="Normal clearing" filename="ivr-normal_clearing.wav"/>
<!-- The following phrases still need to be recorded -->
<prompt phrase="This conference is full. Please contact the conference moderator." filename="conf-conference_is_full.wav"/>
<prompt phrase="You do not have permission to perform this action." filename="ivr-not_have_permission.wav"/>
<prompt phrase="You're doing it wrong, but I'll try to connect you anyway. (Douchebag!)" filename="ivr-youre_doing_it_wrong.wav"/>
<prompt phrase="" filename=""/>
<prompt phrase="" filename=""/>
<prompt phrase="" filename=""/>
<prompt phrase="You do not have permission to perform this action." filename="ivr-not_have_permission.wav"/>
<prompt phrase="You're doing it wrong, but I'll try to connect you anyway. (Douchebag!)" filename="ivr-youre_doing_it_wrong.wav"/>
<prompt phrase="3... 2... 1... WE'RE ASTERISK FREE!!!" filename="ivr-were_asterisk_free"/>
<prompt phrase="" filename=""/>
<prompt phrase="" filename=""/>
</ivr>
<misc>
<prompt phrase="This call has been secured" filename="call_secured.wav"/>
<prompt phrase="Followed by pound" filename="followed.wav"/>
@ -1046,3 +1043,9 @@
</zrtp>
</en>
</language>
<!--
Local Variables:
mode:xml
indent-tabs-mode:nil
End:
-->

View File

@ -168,16 +168,20 @@
<prompt phrase="Gisteren" filename="yesterday.wav"/>
</time>
<voicemail>
<prompt phrase="De persoon op toestel" filename="vm-person.wav"/>
<prompt phrase="als dringend gemarkeerd" filename="vm-marked-urgent.wav"/>
<prompt phrase="geë-maild" filename="vm-emailed.wav"/>
<prompt phrase="u heeft" filename="vm-you_have.wav"/>
<prompt phrase="toets uw i d in en sluit af met een" filename="vm-enter_id.wav"/>
<prompt phrase="toets uw i d in en sluit af met een" filename="vm-enter_id.wav"/>
<prompt phrase="toets uw wachtwoord in en sluit af met een" filename="vm-enter_pass.wav"/>
<prompt phrase="login incorrect" filename="vm-fail_auth.wav"/>
<prompt phrase="welkom in uw voicemail" filename="vm-hello.wav"/>
<prompt phrase="tot ziens" filename="vm-goodbye.wav"/>
<prompt phrase="spreek uw naam in na de toon en druk op een toets of stop met praten om de opname te beëindigen." filename="vm-record_name1.wav"/>
<prompt phrase="kies een boodschap tussen 1 en 3" filename="vm-choose_greeting.wav"/>
<prompt phrase="ongeldig nummer" filename="vm-choose_greeting_fail.wav"/>
<prompt phrase="kies een boodschap tussen 1 en 9" filename="vm-choose_greeting.wav"/>
<prompt phrase="ongeldige waarde" filename="vm-choose_greeting_fail.wav"/>
<prompt phrase="te veel incorrecte pogingen" filename="vm-abort.wav"/>
<prompt phrase="om uw wachtwoord te wijzigen" filename="vm-change_password.wav"/>
<prompt phrase="spreek uw boodschap in na de toon en druk op een toets of stop met praten om de opname te beëindigen" filename="vm-record_greeting.wav"/>
<prompt phrase="spreek uw bericht in na de toon en druk op een toets of stop met praten om de opname te beëindigen" filename="vm-record_message.wav"/>
<prompt phrase="is niet bereikbaar" filename="vm-play_greeting.wav"/>
@ -192,9 +196,9 @@
<prompt phrase="om opgeslagen berichten af te spelen" filename="vm-listen_saved.wav"/>
<prompt phrase="voor speciale opties" filename="vm-advanced.wav"/>
<prompt phrase="om te beëindigen" filename="vm-to_exit.wav"/>
<prompt phrase="om een boodschap op te nemen" filename="vm-record_greeting.wav"/>
<prompt phrase="om een boodschap te kiezen" filename="vm-choose_greeting.wav"/>
<prompt phrase="op uw naam op te nemen" filename="vm-record_name2.wav"/>
<prompt phrase="om een welkomstboodschap op te nemen" filename="vm-record_greeting.wav"/>
<prompt phrase="om een welkomstboodschap te kiezen" filename="vm-choose_greeting.wav"/>
<prompt phrase="om uw naam op te nemen" filename="vm-record_name2.wav"/>
<prompt phrase="voor het hoofd menu" filename="vm-main_menu.wav"/>
<prompt phrase="om naar de opname te luisteren" filename="vm-listen_to_recording.wav"/>
<prompt phrase="om de opname op te slaan" filename="vm-save_recording.wav"/>
@ -204,11 +208,244 @@
<prompt phrase="om nogmaals naar de opname te luisteren" filename="vm-listen_to_recording_again.wav"/>
<prompt phrase="om de opname te wissen" filename="vm-delete_recording.wav"/>
<prompt phrase="om de opname door te sturen naar uw email" filename="vm-forward_to_email.wav"/>
<prompt phrase="boodschap" filename="vm-greeting.wav"/>
<prompt phrase="welkomstboodschap" filename="vm-greeting.wav"/>
<prompt phrase="gekozen" filename="vm-selected.wav"/>
<prompt phrase="is niet bereikbaar" filename="vm-not_avaliable.wav"/>
<prompt phrase="bericht nummer" filename="vm-message_number.wav"/>
<prompt phrase="verwijderd" filename="vm-deleted.wav"/>
<prompt phrase="Uw opname is korter dan de minimaal aanvaardbare lengte, probeer het opnieuw" filename="vm-too-small.wav"/>
<prompt phrase="in de map postvak in" filename="vm-in_folder.wav"/>
<prompt phrase="om nu terug te bellen" filename="vm-return_call.wav"/>
<prompt phrase="dringend" filename="vm-urgent.wav"/>
<prompt phrase="Deze mailbox is vol. Probeer uw oproep later opnieuw." filename="vm-mailbox_full.wav"/>
<prompt phrase="Welkom bij uw nieuwe voicemail. Om te luisteren naar een uitleg en het opzetten van uw voice mail box, druk op 1. Om dit over te slaan, druk op 2." filename="vm-tutorial_yes_no.wav"/>
<prompt phrase="Ik moet uw voor- en achternaam opnemen. Deze opname wordt gebruikt in het systeem zoals het bedrijfsmatige telefoonboek" filename="vm-tutorial_record_name.wav"/>
<prompt phrase="Uw persoonlijk identificatienummer, ofwel 'pin', wordt gebruikt om te voorkomen dat anderen toegang krijgen tot uw voicemailberichten. Wilt u deze nu wijzigen?" filename="vm-tutorial_change_pin.wav"/>
<prompt phrase="De persoon die u probeert te bereiken is niet beschikbaar en heeft geen voicemail." filename="vm-not_available_no_voicemail.wav"/>
</voicemail>
<directory>
<prompt phrase="Geef de eerste paar letters op van de persoons" filename="dir-enter_person.wav"/>
<prompt phrase="...achternaam..." filename="dir-last_name.wav"/>
<prompt phrase="Om te zoeken met..." filename="dir-to_search_by.wav"/>
<prompt phrase="...voornaam..." filename="dir-first_name.wav"/>
<prompt phrase="Er zijn geen resultaten gevonden" filename="dir-no_matching_results.wav"/>
<prompt phrase="...resultaten gevonden." filename="dir-result_match.wav"/>
<prompt phrase="Er zijn teveel resultaten gevonden." filename="dir-too_many_result.wav"/>
<prompt phrase="Geen andere resultaten gevonden." filename="dir-no_more_results.wav"/>
<prompt phrase="Resultaat nummer..." filename="dir-result_number.wav"/>
<prompt phrase="...bij toestel..." filename="dir-at_extension.wav"/>
<prompt phrase="Om deze te kiezen..." filename="dir-to_select_entry.wav"/>
<prompt phrase="Voor de volgende..." filename="dir-for_next.wav"/>
<prompt phrase="Voor de vorige..." filename="dir-for_prev.wav"/>
<prompt phrase="Om een nieuwe zoekopdracht te beginnen..." filename="dir-start_new_search.wav"/>
<prompt phrase="U moet een minimum van..." filename="dir-specify_mininum.wav"/>
<prompt phrase="...letters van de naam opgeven." filename="dir-letters_of_person_name.wav"/>
<prompt phrase="Probeer het opnieuw." filename="dir-please_try_again.wav"/>
<prompt phrase="toets" filename="dir-press.wav" info="we can copy vm/vm-press.wav"/>
<!-- <prompt phrase="For the next entry..." filename="dir-for_next.wav" note="re-recorded because original was wrong"/> -->
<prompt phrase="Geef de eerste paar letters op van de persoons voor- of achternaam" filename="dir-enter_person_first_or_last.wav"/>
</directory>
<conference>
<prompt phrase="NULL" filename="conf-ack.wav" type="tone"/>
<prompt phrase="NULL" filename="conf-nack.wav" type="tone"/>
<prompt phrase="U bent nu gedempt." filename="conf-muted.wav"/>
<prompt phrase="U bent niet gedempt." filename="conf-unmuted.wav"/>
<prompt phrase="U bent momenteel de enige persoon in deze conferentie." filename="conf-alone.wav"/>
<prompt phrase="NULL" filename="conf-perpetual.wav" type="music"/>
<prompt phrase="NULL" filename="conf-enter.wav" type="tone"/>
<prompt phrase="NULL" filename="conf-exit.wav" type="tone"/>
<prompt phrase="U bent verwijderd uit deze conferentie." filename="conf-kicked.wav"/>
<prompt phrase="Deze conferentie is vergrendeld." filename="conf-locked.wav"/>
<prompt phrase="Deze conferentie is nu vergrendeld." filename="conf-is-locked.wav"/>
<prompt phrase="Deze conferentie is nu ontgrendeld." filename="conf-is-unlocked.wav"/>
<prompt phrase="Geef de conferentie pincode op." filename="conf-pin.wav"/>
<prompt phrase="Incorrecte pin nummer, probeer het nogmaals." filename="conf-bad-pin.wav"/>
<prompt phrase="tot ziens" filename="conf-goodbye.wav"/>
<prompt phrase="Welkom op de conferentie." filename="conf-welcome.wav"/>
<prompt phrase="Geef het conferentie nummer op, gevolgd door een hekje." filename="conf-enter_conf_number.wav"/>
<prompt phrase="Geef het conferentie pin nummer op, gevolgd door een hekje." filename="conf-enter_conf_pin.wav"/>
<prompt phrase="...heeft zich aangesloten aan de conferentie." filename="conf-has_joined.wav"/>
<prompt phrase="...heeft conferentie verlaten." filename="conf-has_left.wav"/>
<prompt phrase="U bent al gedempt." filename="conf-you_are_already_muted.wav"/>
<prompt phrase="U bent nu bidirectioneel gedempt." filename="conf-you_are_now_bidirectionally_muted.wav"/>
</conference>
<ivr>
<prompt phrase="Account nummer" filename="ivr-account_number.wav"/>
<prompt phrase="Verbinden naar beller" filename="ivr-connect_to_caller.wav"/>
<prompt phrase="Als u het nummer weet van de persoon die u wilt bereiken, kunt u dat nu intoetsen" filename="ivr-enter_ext_pound.wav"/>
<prompt phrase="Toets een toestel nummer in, gevolgd door een hekje" filename="ivr-enter_ext.wav"/>
<prompt phrase="Voor deze persoon" filename="ivr-for_this_person.wav"/>
<prompt phrase="Een moment geduld alstublieft, uw gesprek wordt doorverbonden" filename="ivr-hold_connect_call.wav"/>
<prompt phrase="Pardon" filename="ivr-im_sorry.wav"/>
<prompt phrase="Alstublieft" filename="ivr-please.wav"/>
<prompt phrase="Bel ons aub terug op" filename="ivr-please_return_our_call_at.wav"/>
<prompt phrase="In verband met referentienummer" filename="ivr-regarding_reference_number.wav"/>
<prompt phrase="Dit is een voorbeeld van een IVR submenu..." filename="ivr-sample_submenu.wav"/>
<prompt phrase="Spreek u naam in na de toon" filename="ivr-say_name.wav"/>
<prompt phrase="Stuur deze beller naar de voicemail" filename="ivr-send_to_voicemail.wav"/>
<prompt phrase="Om te spreken met een medewerker van de klantenservice" filename="ivr-speak_to_a_customer_service_representative.wav"/>
<prompt phrase="Een bericht doorgeven" filename="ivr-take_a_message.wav"/>
<prompt phrase="Bedankt" filename="ivr-thank_you.wav"/>
<prompt phrase="Dat was een verkeerde invoer" filename="ivr-that_was_an_invalid_entry.wav"/>
<prompt phrase="Dit is een gesprek van" filename="ivr-this_is_a_call_from.wav"/>
<prompt phrase="Deze IVR stelt u instaat om een aantal functies te testen..." filename="ivr-this_ivr_will_let_you_test_features.wav"/>
<prompt phrase="Om de FreeSWITCH conferentie te bellen" filename="ivr-to_call_the_freeswitch_conference.wav"/>
<prompt phrase="Om een FreeSWITCH echo test uit te voeren" filename="ivr-to_do_a_freeswitch_echo_test.wav"/>
<prompt phrase="Om een Free World Dial Up echo test uit te voeren" filename="ivr-to_do_a_fwd_echo_test.wav"/>
<prompt phrase="Om een een voorbeeld IVR submenu te hoeren" filename="ivr-to_hear_sample_submenu.wav"/>
<prompt phrase="Om schreeuwende apen te horen" filename="ivr-to_hear_screaming_monkeys.wav"/>
<prompt phrase="Om naar wachtstand muziek te luisteren" filename="ivr-to_listen_to_moh.wav"/>
<prompt phrase="Om deze keuzes nog een keer te horen" filename="ivr-to_repeat_these_options.wav"/>
<prompt phrase="Om terug te keren naar het vorige menu" filename="ivr-to_return_to_previous_menu.wav"/>
<prompt phrase="Om met een mederwerker te spreken" filename="ivr-to_speak_with_an_operator.wav"/>
<prompt phrase="Welkom bij FreeSWITCH, de toekomst in telefonie" filename="ivr-welcome_to_freeswitch.wav"/>
<prompt phrase="U kunt op elk moment dit menu verlaten door op te hangen" filename="ivr-you_may_exit_by_hanging_up.wav"/>
<prompt phrase="of" filename ="ivr-or.wav"/>
<prompt phrase="niet" filename ="ivr-not.wav"/>
<prompt phrase="bel" filename ="ivr-call.wav"/>
<prompt phrase="U kunt" filename ="ivr-you_may.wav"/>
<prompt phrase="hallo" filename="ivr-hello.wav"/>
<prompt phrase="U kunt uw telefoon toetsten gebruiken..." filename="ivr-use_telephone_keypad.wav"/>
<prompt phrase="Spel de naam van de persoon die u probeert te bereiken." filename="ivr-spell_name.wav"/>
<prompt phrase="Achternaam eerst" filename="ivr-last_name_first.wav"/>
<prompt phrase="Voornaam eerst" filename="ivr-first_name_first.wav"/>
<prompt phrase="Toest 1 voor Q of Z." filename="ivr-press_one_q_or_z.wav"/>
<prompt phrase="Verkoop" filename="ivr-sales.wav"/>
<prompt phrase="Klanten service" filename="ivr-customer_service.wav"/>
<prompt phrase="Technische ondersteuning" filename="ivr-technical_support.wav"/>
<prompt phrase="telefonist" filename="ivr-operator.wav"/>
<prompt phrase="U heeft een ongeldige toestel nummer gebeld." filename="ivr-you_have_dialed_an_invalid_extension.wav"/>
<prompt phrase="Toets uw toestel nummer in, gevolgd door een hekje." filename="ivr-please_enter_extension_followed_by_pound.wav"/>
<prompt phrase="Toets uw pin in, gevolgd door een hekje." filename="ivr-please_enter_pin_followed_by_pound.wav"/>
<prompt phrase="Uw pin of toestel nummer is ongeldig." filename="ivr-pin_or_extension_is-invalid.wav"/>
<prompt phrase="U staat op het punt om dit toestel te koppelen aan uw account..." filename="ivr-you_are_about_to_provision_this_phone.wav"/>
<prompt phrase="Toets uw pin nogmaals in om te bevestigen." filename="ivr-please_reenter_your_pin.wav"/>
<prompt phrase="Om te registreten voor ClueCon, toets een..." filename="ivr-register_for_cluecon.wav"/>
<prompt phrase="om in te loggen" filename="ivr-to_log_in.wav"/>
<prompt phrase="om uit te loggen" filename="ivr-to_log_out.wav"/>
<prompt phrase="U bent nu ingelogd" filename="ivr-you_are_now_logged_in.wav"/>
<prompt phrase="U bent nu uitgelogd" filename="ivr-you_are_now_logged_out.wav"/>
<prompt phrase="Probeer het aub nogmaals." filename="ivr-please_try_again.wav"/>
<prompt phrase="U staat op het punt om dit toestel permanent te koppelen aan uw account nummer." filename="ivr-provision_phone_permanently_to_extension.wav"/>
<prompt phrase="Toets het toestel nummer in die uw wilt koppellen aan deze telefoon, gevolgd door een hekje." filename="ivr-extension_to_provision_this_phone.wav"/>
<prompt phrase="Bedankt, deze telefoon zal nu opnieuw opstarten." filename="ivr-this_phone_will_now_reboot.wav"/>
<prompt phrase="Bedankt, Uw opname wordt bewaard." filename="ivr-recording_saved.wav"/>
<prompt phrase="Toets 1 om uw opnamen op te slaan. Toets 2 om uw opanmen te beluisteren. Toets 3 om overnieuw op te nemen." filename="ivr-save_review_record.wav"/>
<prompt phrase="Het systeem is niet in staat om uw opanme op te slaan op dit moment, probeer het aub later nog een keer." filename="ivr-unable_save.wav"/>
<prompt phrase="U bent nummer..." filename="ivr-you_are_number.wav"/>
<prompt phrase="...in de wachtrij" filename="ivr-in_line.wav"/>
<prompt phrase="Bedankt voor het wachten." filename="ivr-thank_you_for_holding.wav"/>
<prompt phrase="De geschatte wachttijd is..." filename="ivr-estimated_hold_time.wav"/>
<prompt phrase="Meer dan..." filename="ivr-more_than.wav"/>
<prompt phrase="Minder dan..." filename="ivr-less_than.wav"/>
<prompt phrase="Begin met opnemen." filename="ivr-begin_recording.wav "/>
<prompt phrase="Doorschakelen is geannuleerd." filename="ivr-call_forwarding_has_been_cancelled.wav"/>
<prompt phrase="Doorschakelen is ingesteld." filename="ivr-call_forwarding_has_been_set.wav"/>
<prompt phrase="Toets uw telefoon nummer in." filename="ivr-please_enter_the_phone_number.wav"/>
<prompt phrase="Geef uw naam op en de reden waarom u belt." filename="ivr-please_state_your_name_and_reason_for_calling.wav"/>
<prompt phrase="Om te accepteren toets 1. Om te weigeren toets 2. Om een voicemail te sturen toets 3" filename="ivr-accept_reject_voicemail.wav"/>
<prompt phrase="Binnekomend gesprek." filename="ivr-incoming_call.wav"/>
<prompt phrase="Bedankt voor het bellen." filename="ivr-thank_you_for_calling.wav"/>
<prompt phrase="Blijft uw aan de lijn, uw wordt zo spoedig mogelijk te woord gestaan." filename="ivr-stay_on_line_call_answered_momentarily.wav"/>
<prompt phrase="U wordt doorgeschakeld." filename="ivr-call_being_transferred.wav"/>
<prompt phrase="Geniet van de muziek terwijl u wordt door geschakeld." filename="ivr-enjoy_music_while_transfer.wav"/>
<prompt phrase="U heeft een binnekomend gesprek van..." filename="ivr-call_from.wav"/>
<prompt phrase="Dit menu heeft geen keuzes. Neem aub contact op met de beheerder." filename="ivr-no_menu_items.wav"/>
<prompt phrase="Voor het telefoonboek toets..." filename="ivr-for_directory_press.wav"/>
<prompt phrase="Gebruik de toetsen van uw telefoon toestel..." filename="ivr-using_telephone_keypad.wav"/>
<prompt phrase="Geef de eerste paar letters op van de persoons achternaam." filename="ivr-enter_letters_last_name.wav"/>
<prompt phrase="Geef de eerste paar letters op van de persoons voornaam." filename="ivr-enter_letters_first_name.wav"/>
<prompt phrase="Geef de eerste paar letters op van de persoons voornaam of achternaam." filename="ivr-enter_letters_first_or_last_name.wav"/>
<prompt phrase="Als dit correct is, toest..." filename="ivr-if_correct_press.wav"/>
<prompt phrase="Zo niet, toets..." filename="ivr-if_not_press.wav"/>
<prompt phrase="Als u klaar bent druk op hekje" filename="ivr-finished_pound_hash_key.wav"/>
<prompt phrase="Niet storen is nu geactiveerd." filename="ivr-dnd_activated.wav"/>
<prompt phrase="Niet storen is nu gedactiveerd." filename="ivr-dnd_cancelled.wav"/>
<prompt phrase="Druk een op toets..." filename="ivr-any_other_digit.wav"/>
<prompt phrase="Druk 1 voor ja. Druk 2 voor nee." filename="ivr-one_yes_two_no.wav"/>
<prompt phrase="Toets het wachtrij nummer in, gevolgd door een hekje." filename="ivr-enter_queue_number.wav"/>
<prompt phrase="Geef aub de..." filename="ivr-please_enter_the.wav"/>
<prompt phrase="Nummer." filename="ivr-number.wav"/>
<prompt phrase="...gevolgd door een hekje." filename="ivr-followed_by_pound.wav"/>
<prompt phrase="Het saldo is..." filename="ivr-account_balance_is.wav"/>
<prompt phrase="Bedankt voor het bellen. Als u het toestel nummer weet van de persoon die u wilt bereiken, kunt u dat nu intoetsen. Voor het telefoonboek toets..." filename="ivr-generic_greeting.wav"/>
<prompt phrase="...bestand..." filename="ivr-file.wav"/>
<prompt phrase="...bestanden..." filename="ivr-files-.wav"/>
<prompt phrase="Om een wekdienst in te stellen..." filename="ivr-for_a_wakeup_call.wav"/>
<prompt phrase="Dit is uw wekdienst." filename="ivr-this_is_your_wakeup_call.wav"/>
<prompt phrase="Om een wekdienst aan te vragen..." filename="ivr-request_wakeup_call.wav"/>
<prompt phrase="Om de wekdienst te bevestigen..." filename="ivr-confirm_wakeup_call.wav"/>
<prompt phrase="Om de wekdienst te annuleren..." filename="ivr-cancel_wakeup_call.wav"/>
<prompt phrase="U heeft een wekdienst aangevraagd voor..." filename="ivr-requested_wakeup_call_for.wav"/>
<prompt phrase="U heeft geen wekdienst aangevraagd." filename="ivr-not_requested_wakeup_call.wav"/>
<prompt phrase="Uw wekdienst is geannuleerd." filename="ivr-wakeup_call_cancelled.wav"/>
<prompt phrase="Voor een dagelijkse wekdienst..." filename="ivr-for_daily_wakeup_call.wav"/>
<prompt phrase="Dagelijkse wekdienst..." filename="ivr-daily_wakeup_call.wav"/>
<prompt phrase="Voor dagelijkse wekdiensten..." filename="ivr-for_daily_wakeup_calls.wav"/>
<prompt phrase="Voor een eenmalig wekdienst..." filename="ivr-for_one_time_wakeup_call.wav"/>
<prompt phrase="Eenmalig wekdiesnt..." filename="ivr-one_time_wakeup_call.wav"/>
<prompt phrase="...wekdienst..." filename="ivr-wakeup_call.wav"/>
<prompt phrase="Wakker worden!" filename="ivr-wakey_wakey_sunshine.wav"/>
<prompt phrase="Welkom." filename="ivr-welcome.wav"/>
<prompt phrase="Welkom bij..." filename="ivr-welcome_to.wav"/>
<prompt phrase="Goedemorgen." filename="ivr-good_morning.wav"/>
<prompt phrase="Goedemiddag." filename="ivr-good_afternoon.wav"/>
<prompt phrase="Goedeavond." filename="ivr-good_evening.wav"/>
<prompt phrase="Bedankt." filename="ivr-Thank_you.wav"/>
<prompt phrase="Voor..." filename="ivr-for.wav"/>
<prompt phrase="Momenteel zijn de wachttijden langer dan normaal." filename="ivr-longer_than_usual_hold_times.wav"/>
<prompt phrase="U bent de..." filename="ivr-you_are_the.wav"/>
<prompt phrase="Een moment geduld alstublieft." filename="ivr-one_moment_please.wav"/>
<prompt phrase="Uw gesprek wordt beantwoord in de volgorde van binnekomst." filename="ivr-call_answered_order_received.wav"/>
<prompt phrase="U heeft ingevoerd..." filename="ivr-you_entered.wav"/>
<prompt phrase="Toestel nummer..." filename="ivr-extension_number.wav"/>
<prompt phrase="Een moment geduld alstublieft, Uw gesprekspartner wordt gecontacteerd." filename="ivr-please_hold_while_party_contacted.wav"/>
<prompt phrase="Geniet van de muziek terwijl uw gesrpeks partner gecontacteerd wordt." filename="ivr-please_enjoy_music_while_party_reached.wav"/>
<prompt phrase="Bedankt voor het bellen. Als u het toestel nummer weet van de persoon die u wilt bereiken, kunt u dat nu intoetsen of toets een 9 voor het telefoonboek." filename="ivr-generic_greeting.wav"/>
<prompt phrase="Als dit correct is toets een 1, is dit niet correct toets dan een 2." filename="ivr-if_correct_one_if_not_two.wav"/>
<prompt phrase="Om deze gegevens te herhalen..." filename="ivr-repeat_this_information.wav"/>
<prompt phrase="Nee nee nee!" filename="ivr-no_no_no.wav"/>
<prompt phrase="Was het de bedoeling dat u die toets indrukte?" filename="ivr-did_you_mean_to_press_key.wav"/>
<prompt phrase="Serieus. Was het ECHT de bedoeling dat u die toets indrukte?" filename="ivr-seriously_mean_to_press_key.wav"/>
<prompt phrase="Het zal wel!" filename="ivr-oh_whatever.wav"/>
<prompt phrase="Nu moet je oppassen! Nog één zo'n fout en ik verbreek de verbinding." filename="ivr-one_more_mistake.wav"/>
<prompt phrase="Gefeliciteerd, U heeft op de ster gedrukt. Dit betekent overigens niet dat u een ster bent. Dit betekent dat u op knopjes kunt drukken en naar alle waarschijnlijkheid vingers heeft." filename="ivr-congratulations_you_pressed_star.wav"/>
<prompt phrase="Al onze technische mederwerkers zijn bezig onze verkoop medewerkers te ondersteunen met het demonstreren hoe goed de CudaTel is." filename="ivr-engineers_busy_assisting_other_sales.wav"/>
<prompt phrase="Dit bericht zal zichzelf vernietigen in 5, 4, 3, 2, 1..." filename="ivr-message_self_destruct.wav"/>
<prompt phrase="Al u telefoongesprek zijn de onze." filename="ivr-all_your_call_are_belong_to_us.wav"/>
<prompt phrase="Ik hou ervan hoe je die knoppen indrukt!" filename="ivr-love_those_touch_tones.wav"/>
<prompt phrase="Correct, we hebben geen bananen." filename="ivr-yes_we_have_no_bananas.wav"/>
<prompt phrase="Kerel, je zuigt!" filename="ivr-dude_you_suck.wav"/>
<prompt phrase="Uw oproep is erg belangrijk voor ons, maar uw geestelijke welzijn niet, dus we zullen u graag in de wacht houden, voor eeuwig martelen met onze vervelende wachtstandmuziek." filename="ivr-on_hold_indefinitely.wav"/>
<prompt phrase="...heeft het pand verlaten." filename="ivr-has_left_the_building.wav"/>
<prompt phrase="Deze telefoon is niet toegekend en kan niet gebruikt worden voor externe oproepen." filename="ivr-phone_is_unassigned.wav"/>
<prompt phrase="Deze telefoon is niet correct geconfigureerd." filename="ivr-phone_not_configured.wav"/>
<prompt phrase="Gefeliciteerd! Deze telefoon is correct geconfigureerd en kan nu aan een gebruiker toegekend worden." filename="ivr-phone_is_configured_properly.wav"/>
<prompt phrase="Neem aub contact op met de systeem beheerder voor ondersteuning." filename="ivr-contact_system_administrator.wav"/>
<prompt phrase="Barracuda Networks" filename="ivr-barracuda_networks.wav"/>
<prompt phrase="CudaTel Communication Server" filename="ivr-cudatel_communication_server.wav"/>
<prompt phrase="Er zijn geen gesprekken aanwezig in deze wachtrij." filename="ivr-no_calls_waiting_in_queue.wav"/>
<prompt phrase="U bent beller nummer 1. Uiteraard is *elke* beller nummer 1 bij ons dus het kan best dat u nog een tijdje moet wachten." filename="ivr-youre_number_one.wav"/>
<prompt phrase="...heeft een nood oproep geplaatst" filename="ivr-has_called_emergency_services.wav"/>
<prompt phrase="Er zijn..." filename="ivr-there_are.wav"/>
<prompt phrase="Geef het aantal luisteraars op, gevolgd door een hekje." filename="conf-number_of_listeners.wav"/>
<prompt phrase="...luisteraars in deze conferentie." filename="conf-listeners_in_conference.wav"/>
<prompt phrase="...leden in deze conferentie." filename="conf-members_in_conference.wav"/>
<prompt phrase="Geef het bron telefoon nummer op, gevolgd door een hekje." filename="ivr-enter_source_telephone_number.wav"/>
<prompt phrase="Geef het bestemmings telefoon nummer op, gevolgd door een hekje." filename="ivr-enter_destination_telephone_number.wav"/>
</ivr>
<misc>
<prompt phrase="Dit telefoon gesprek is beveiligd" filename="call_secured.wav"/>
<prompt phrase="Gevolgd door een hekje" filename="followed.wav"/>
<prompt phrase="Als u deze persoon bent" filename="if_you_are_this_person.wav"/>
<prompt phrase="Als u wilt" filename="if_you_would_like_to.wav"/>
<prompt phrase="Geef een referentie nummer op" filename="provide_reference_number.wav"/>
<prompt phrase="Geef het toestel nummer op waar naar door verbonden wilt worden" filename="transfer1.wav"/>
<prompt phrase="Doorschakelen" filename="transfer2.wav"/>
<prompt phrase="We proberen te bereiken" filename="we_are_trying_to_reach.wav"/><!-- LANG CHECK, i dont think this posible to translate to dutch in this way, 'We proberen %name% te bereiken' is better but not posible in this way -->
<prompt phrase="Er heeft zich een fout voorgedaan, neem contact op met de systeem beheerder." filename="error.wav"/>
<prompt phrase="Uw gesprek wordt beëindigd in..." filename="misc-your_call_will_be_terminated_in.wav"/>
<prompt phrase="Uw gesprek is beëindigd." filename="misc-your_call_has_been_terminated.wav"/>
</misc>
</nl>
</language>

View File

@ -0,0 +1,126 @@
%define prefix /opt/freeswitch
%define _prefix %{prefix}
Summary: FreeSWITCH Music on Hold soundfiles
Name: freeswitch-sounds-music
Version: 1.0.8
Release: 1%{?dist}
License: MPL
Group: Productivity/Telephony/Servers
Packager: Joseph L. Casale <jcasale@activenetwerx.com>
URL: http://www.freeswitch.org
Source0: http://files.freeswitch.org/%{name}-8000-%{version}.tar.gz
Source1: http://files.freeswitch.org/%{name}-16000-%{version}.tar.gz
Source2: http://files.freeswitch.org/%{name}-32000-%{version}.tar.gz
Source3: http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz
BuildArch: noarch
BuildRequires: bash
Requires: freeswitch
Requires: freeswitch-sounds-music-8000 = %{version}
Requires: freeswitch-sounds-music-16000 = %{version}
Requires: freeswitch-sounds-music-32000 = %{version}
Requires: freeswitch-sounds-music-48000 = %{version}
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
FreeSWITCH Music On Hold soundfiles package that installs the 8KHz, 16KHz,
32KHz and 48KHz RPMs
%package -n freeswitch-sounds-music-8000
Summary: FreeSWITCH 8kHz Music On Hold soundfiles
Group: Productivity/Telephony/Servers
BuildArch: noarch
Requires: freeswitch
%description -n freeswitch-sounds-music-8000
FreeSWITCH 8kHz Music On Hold soundfiles
%package -n freeswitch-sounds-music-16000
Summary: FreeSWITCH 16kHz Music On Hold soundfiles
Group: Productivity/Telephony/Servers
BuildArch: noarch
Requires: freeswitch
%description -n freeswitch-sounds-music-16000
FreeSWITCH 16kHz Music On Hold soundfiles
%package -n freeswitch-sounds-music-32000
Summary: FreeSWITCH 32kHz Music On Hold soundfiles
Group: Productivity/Telephony/Servers
BuildArch: noarch
Requires: freeswitch
%description -n freeswitch-sounds-music-32000
FreeSWITCH 32kHz Music On Hold soundfiles
%package -n freeswitch-sounds-music-48000
Summary: FreeSWITCH 48kHz Music On Hold soundfiles
Group: Productivity/Telephony/Servers
BuildArch: noarch
Requires: freeswitch
%description -n freeswitch-sounds-music-48000
FreeSWITCH 48kHz Music On Hold soundfiles
%prep
%setup -n music
%setup -T -D -b 1 -n music
%setup -T -D -b 2 -n music
%setup -T -D -b 3 -n music
%build
%install
%{__rm} -rf %{buildroot}
%{__install} -d -m 0750 %{buildroot}/%{_prefix}/sounds/music/{8000,16000,32000,48000}
%{__cp} -prv ./{8000,16000,32000,48000} %{buildroot}%{_prefix}/sounds/music
%clean
%{__rm} -rf %{buildroot}
%post
%postun
%files
%files -n freeswitch-sounds-music-8000
%defattr(-,root,root,-)
%dir %{_prefix}/sounds/music/8000
%{_prefix}/sounds/music/8000/*.wav
%files -n freeswitch-sounds-music-16000
%defattr(-,root,root,-)
%dir %{_prefix}/sounds/music/16000
%{_prefix}/sounds/music/16000/*.wav
%files -n freeswitch-sounds-music-32000
%defattr(-,root,root,-)
%dir %{_prefix}/sounds/music/32000
%{_prefix}/sounds/music/32000/*.wav
%files -n freeswitch-sounds-music-48000
%defattr(-,root,root,-)
%dir %{_prefix}/sounds/music/48000
%{_prefix}/sounds/music/48000/*.wav
%changelog
* Sat Jul 16 2011 Joseph Casale <jcasale@activenetwerx.com> 1.0.8-1
- Initial release

View File

@ -344,6 +344,10 @@ Requires: wanpipe
Requires: libsng_ss7
BuildRequires: wanpipe
BuildRequires: libsng_ss7
%if 0%{?fedora_version} >= 8 || 0%{?rhel} >= 6
Requires: openssl098e
BuildRequires: openssl098e
%endif
%description freetdm-sng-ss7
Sangoma SMG-SS7 drivers for FreeTDM
@ -428,12 +432,12 @@ export QA_RPATHS=$[ 0x0001|0x0002 ]
APPLICATION_MODULES_AE="applications/mod_avmd applications/mod_callcenter applications/mod_cidlookup applications/mod_cluechoo \
applications/mod_commands applications/mod_conference applications/mod_curl applications/mod_db applications/mod_directory \
applications/mod_distributor applications/mod_dptools applications/mod_easyroute applications/mod_enum \
applications/mod_esf applications/mod_expr"
applications/mod_esf applications/mod_expr applications/mod_blacklist"
APPLICATION_MODULES_FM="applications/mod_fifo applications/mod_fsv applications/mod_hash applications/mod_lcr applications/mod_limit \
applications/mod_memcache"
applications/mod_memcache applications/mod_http_cache"
APPLICATION_MODULES_NY="applications/mod_nibblebill applications/mod_redis applications/mod_rss applications/mod_snom \
applications/mod_soundtouch applications/mod_spandsp applications/mod_spy applications/mod_stress \
applications/mod_valet_parking applications/mod_vmd applications/mod_voicemail"
applications/mod_valet_parking applications/mod_vmd applications/mod_voicemail applications/mod_sms"
APPLICATIONS_MODULES="$APPLICATION_MODULES_AE $APPLICATION_MODULES_FM $APPLICATION_MODULES_NY $APPLICATION_MODULES_VZ"
######################################################################################################################
@ -747,8 +751,10 @@ fi
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/mime.types
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/acl.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/alsa.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/blacklist.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/callcenter.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cdr_csv.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cdr_mongodb.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cdr_pg_csv.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cdr_sqlite.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/cepstral.conf.xml
@ -768,6 +774,7 @@ fi
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/fax.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/fifo.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/hash.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/http_cache.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/ivr.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/java.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/lcr.conf.xml
@ -782,6 +789,7 @@ fi
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/pocketsphinx.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/portaudio.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/post_load_modules.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/presence_map.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/redis.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/rss.conf.xml
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/rtmp.conf.xml
@ -803,6 +811,12 @@ fi
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/zeroconf.conf.xml
######################################################################################################################
#
# Chatplans
#
######################################################################################################################
%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/chatplan/default.xml
######################################################################################################################
#
# Dialplans
#
######################################################################################################################
@ -876,6 +890,7 @@ fi
######################################################################################################################
%{prefix}/mod/mod_amrwb.so*
%{prefix}/mod/mod_avmd.so*
%{prefix}/mod/mod_blacklist.so*
%{prefix}/mod/mod_bv.so*
%{prefix}/mod/mod_callcenter.so*
%{prefix}/mod/mod_cdr_csv.so*
@ -906,6 +921,7 @@ fi
%{prefix}/mod/mod_flite.so*
%{prefix}/mod/mod_fsv.so*
%{prefix}/mod/mod_hash.so*
%{prefix}/mod/mod_http_cache.so*
%{prefix}/mod/mod_h26x.so*
%{prefix}/mod/mod_ilbc.so*
%{prefix}/mod/mod_lcr.so*
@ -928,6 +944,7 @@ fi
%{prefix}/mod/mod_silk.so*
%{prefix}/mod/mod_siren.so*
%{prefix}/mod/mod_skinny.so*
%{prefix}/mod/mod_sms.so*
%{prefix}/mod/mod_sndfile.so*
%{prefix}/mod/mod_snom.so*
%{prefix}/mod/mod_sofia.so*
@ -1128,6 +1145,8 @@ fi
######################################################################################################################
%changelog
* Tue Jun 14 2011 - michal.bielicki@seventhsignal.de
- added mod_http_cache
* Tue Jun 14 2011 - michal.bielicki@seventhsignal.de
- added mod_rtmp
* Fri Apr 01 2011 - michal.bielicki@seventhsignal.de
- added hebrew language stuff

1072
libs/.gitignore vendored

File diff suppressed because it is too large Load Diff

View File

@ -304,7 +304,8 @@ typedef enum {
CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
CURLE_FAILED_INIT, /* 2 */
CURLE_URL_MALFORMAT, /* 3 */
CURLE_URL_MALFORMAT_USER, /* 4 - NOT USED */
CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for
7.17.0, reused in April 2011 for 7.21.5] */
CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
CURLE_COULDNT_RESOLVE_HOST, /* 6 */
CURLE_COULDNT_CONNECT, /* 7 */

View File

@ -1190,8 +1190,13 @@ Curl_ossl_connect_step1(struct connectdata *conn,
req_method = TLSv1_client_method();
break;
case CURL_SSLVERSION_SSLv2:
#ifdef OPENSSL_NO_SSL2
failf(data, "OpenSSL was built without SSLv2 support");
return CURLE_NOT_BUILT_IN;
#else
req_method = SSLv2_client_method();
break;
#endif
case CURL_SSLVERSION_SSLv3:
req_method = SSLv3_client_method();
break;

View File

@ -69,6 +69,10 @@ curl_easy_strerror(CURLcode error)
case CURLE_URL_MALFORMAT:
return "URL using bad/illegal format or missing URL";
case CURLE_NOT_BUILT_IN:
return "A requested feature, protocol or option was not found built-in in"
" this libcurl due to a build-time decision.";
case CURLE_COULDNT_RESOLVE_PROXY:
return "couldn't resolve proxy name";
@ -278,7 +282,6 @@ curl_easy_strerror(CURLcode error)
return "caller must register CURLOPT_CONV_ callback options";
/* error codes not used by current libcurl */
case CURLE_URL_MALFORMAT_USER:
case CURLE_FTP_USER_PASSWORD_INCORRECT:
case CURLE_MALFORMAT_USER:
case CURLE_BAD_CALLING_ORDER:

View File

@ -3,11 +3,11 @@ INCS=-I$(PWD)/src/include
LIBEDIT_DIR=../../libs/libedit
DEBUG=-g -ggdb
BASE_FLAGS=$(INCS) -DHAVE_EDITLINE $(DEBUG) -I$(LIBEDIT_DIR)/src/ -fPIC
PICKY=-O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
PICKY=-O2
CFLAGS=$(BASE_FLAGS) $(PICKY)
CXXFLAGS=$(BASE_FLAGS) -Wall -Werror -Wno-unused-variable
CXXFLAGS=$(BASE_FLAGS)
MYLIB=libesl.a
LIBS=-lncurses -lpthread -lesl -lm
LIBS=-lncurses -lesl -lpthread -lm
LDFLAGS=-L.
OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o src/esl_json.o src/esl_buffer.o
SRC=src/esl.c src/esl_json.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_oop.cpp src/esl_json.c src/esl_buffer.c
@ -32,7 +32,7 @@ testclient: $(MYLIB) testclient.c
$(CC) $(CC_CFLAGS) $(CFLAGS) testclient.c -o testclient $(LDFLAGS) $(LIBS)
fs_cli: $(MYLIB) fs_cli.c
$(CC) $(CC_CFLAGS) $(CFLAGS) fs_cli.c -o fs_cli $(LDFLAGS) -L$(LIBEDIT_DIR)/src/.libs $(LIBS) -ledit
$(CC) $(CC_CFLAGS) $(CFLAGS) fs_cli.c -o fs_cli $(LDFLAGS) -L$(LIBEDIT_DIR)/src/.libs -ledit $(LIBS)
%.o: %.c $(HEADERS)
$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@

File diff suppressed because it is too large Load Diff

View File

@ -42,11 +42,6 @@ static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struc
char path_buffer[1024] = { 0 };
const char *path;
if (fork()) {
close(client_sock);
return;
}
if (esl_attach_handle(&handle, client_sock, addr) != ESL_SUCCESS || !handle.info_event) {
esl_log(ESL_LOG_ERROR, "Socket Error\n");
exit(0);
@ -95,9 +90,7 @@ int main(int argc, char *argv[])
return -1;
}
signal(SIGCHLD, SIG_IGN);
esl_listen(ip, port, mycallback);
esl_listen(ip, port, mycallback, 100000);
return 0;
}

View File

@ -904,6 +904,31 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1sendEvent
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1sendMSG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3) {
jint jresult = 0 ;
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
char *arg3 = (char *) NULL ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
(void)jarg2_;
arg1 = *(ESLconnection **)&jarg1;
arg2 = *(ESLevent **)&jarg2;
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
jresult = (jint)result;
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1recvEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
ESLconnection *arg1 = (ESLconnection *) 0 ;

View File

@ -82,6 +82,10 @@ public class ESLconnection {
return (cPtr == 0) ? null : new ESLevent(cPtr, true);
}
public int sendMSG(ESLevent send_me, String uuid) {
return eslJNI.ESLconnection_sendMSG(swigCPtr, this, ESLevent.getCPtr(send_me), send_me, uuid);
}
public ESLevent recvEvent() {
long cPtr = eslJNI.ESLconnection_recvEvent(swigCPtr, this);
return (cPtr == 0) ? null : new ESLevent(cPtr, true);

View File

@ -43,6 +43,7 @@ class eslJNI {
public final static native long ESLconnection_api(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3);
public final static native long ESLconnection_bgapi(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3, String jarg4);
public final static native long ESLconnection_sendEvent(long jarg1, ESLconnection jarg1_, long jarg2, ESLevent jarg2_);
public final static native int ESLconnection_sendMSG(long jarg1, ESLconnection jarg1_, long jarg2, ESLevent jarg2_, String jarg3);
public final static native long ESLconnection_recvEvent(long jarg1, ESLconnection jarg1_);
public final static native long ESLconnection_recvEventTimed(long jarg1, ESLconnection jarg1_, int jarg2);
public final static native long ESLconnection_filter(long jarg1, ESLconnection jarg1_, String jarg2, String jarg3);

View File

@ -2632,6 +2632,43 @@ fail:
}
static int _wrap_ESLconnection_sendMSG(lua_State* L) {
int SWIG_arg = -1;
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
char *arg3 = (char *) NULL ;
int result;
SWIG_check_num_args("sendMSG",2,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("sendMSG",1,"ESLconnection *");
if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("sendMSG",2,"ESLevent *");
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("sendMSG",3,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
SWIG_fail_ptr("ESLconnection_sendMSG",1,SWIGTYPE_p_ESLconnection);
}
if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ESLevent,0))){
SWIG_fail_ptr("ESLconnection_sendMSG",2,SWIGTYPE_p_ESLevent);
}
if(lua_gettop(L)>=3){
arg3 = (char *)lua_tostring(L, 3);
}
result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
SWIG_arg=0;
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
fail:
lua_error(L);
return SWIG_arg;
}
static int _wrap_ESLconnection_recvEvent(lua_State* L) {
int SWIG_arg = -1;
ESLconnection *arg1 = (ESLconnection *) 0 ;
@ -2917,6 +2954,7 @@ static swig_lua_method swig_ESLconnection_methods[] = {
{"api", _wrap_ESLconnection_api},
{"bgapi", _wrap_ESLconnection_bgapi},
{"sendEvent", _wrap_ESLconnection_sendEvent},
{"sendMSG", _wrap_ESLconnection_sendMSG},
{"recvEvent", _wrap_ESLconnection_recvEvent},
{"recvEventTimed", _wrap_ESLconnection_recvEventTimed},
{"filter", _wrap_ESLconnection_filter},

View File

@ -286,6 +286,9 @@ class ESLPINVOKE {
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_SendEvent")]
public static extern IntPtr ESLconnection_SendEvent(HandleRef jarg1, HandleRef jarg2);
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_sendMSG")]
public static extern int ESLconnection_sendMSG(HandleRef jarg1, HandleRef jarg2, string jarg3);
[DllImport("ESL", EntryPoint="CSharp_ESLconnection_RecvEvent")]
public static extern IntPtr ESLconnection_RecvEvent(HandleRef jarg1);

View File

@ -92,6 +92,11 @@ public class ESLconnection : IDisposable {
return ret;
}
public int sendMSG(ESLevent send_me, string uuid) {
int ret = ESLPINVOKE.ESLconnection_sendMSG(swigCPtr, ESLevent.getCPtr(send_me), uuid);
return ret;
}
public ESLevent RecvEvent() {
IntPtr cPtr = ESLPINVOKE.ESLconnection_RecvEvent(swigCPtr);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);

View File

@ -743,6 +743,22 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_SendEvent(void * jarg1, void
}
SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_sendMSG(void * jarg1, void * jarg2, char * jarg3) {
int jresult ;
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
char *arg3 = (char *) NULL ;
int result;
arg1 = (ESLconnection *)jarg1;
arg2 = (ESLevent *)jarg2;
arg3 = (char *)jarg3;
result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
jresult = result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_RecvEvent(void * jarg1) {
void * jresult ;
ESLconnection *arg1 = (ESLconnection *) 0 ;

View File

@ -138,6 +138,7 @@ sub DESTROY {
*api = *ESLc::ESLconnection_api;
*bgapi = *ESLc::ESLconnection_bgapi;
*sendEvent = *ESLc::ESLconnection_sendEvent;
*sendMSG = *ESLc::ESLconnection_sendMSG;
*recvEvent = *ESLc::ESLconnection_recvEvent;
*recvEventTimed = *ESLc::ESLconnection_recvEventTimed;
*filter = *ESLc::ESLconnection_filter;

View File

@ -3282,6 +3282,57 @@ XS(_wrap_ESLconnection_sendEvent) {
}
XS(_wrap_ESLconnection_sendMSG) {
{
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
char *arg3 = (char *) NULL ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
int argvi = 0;
dXSARGS;
if ((items < 2) || (items > 3)) {
SWIG_croak("Usage: ESLconnection_sendMSG(self,send_me,uuid);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendMSG" "', argument " "1"" of type '" "ESLconnection *""'");
}
arg1 = reinterpret_cast< ESLconnection * >(argp1);
res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendMSG" "', argument " "2"" of type '" "ESLevent *""'");
}
arg2 = reinterpret_cast< ESLevent * >(argp2);
if (items > 2) {
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_sendMSG" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
}
result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
XSRETURN(argvi);
fail:
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_croak_null();
}
}
XS(_wrap_ESLconnection_recvEvent) {
{
ESLconnection *arg1 = (ESLconnection *) 0 ;
@ -3785,6 +3836,7 @@ static swig_command_info swig_commands[] = {
{"ESLc::ESLconnection_api", _wrap_ESLconnection_api},
{"ESLc::ESLconnection_bgapi", _wrap_ESLconnection_bgapi},
{"ESLc::ESLconnection_sendEvent", _wrap_ESLconnection_sendEvent},
{"ESLc::ESLconnection_sendMSG", _wrap_ESLconnection_sendMSG},
{"ESLc::ESLconnection_recvEvent", _wrap_ESLconnection_recvEvent},
{"ESLc::ESLconnection_recvEventTimed", _wrap_ESLconnection_recvEventTimed},
{"ESLc::ESLconnection_filter", _wrap_ESLconnection_filter},

View File

@ -174,6 +174,14 @@ class ESLconnection {
return is_resource($r) ? new ESLevent($r) : $r;
}
function sendMSG($send_me,$uuid=null) {
switch (func_num_args()) {
case 1: $r=ESLconnection_sendMSG($this->_cPtr,$send_me); break;
default: $r=ESLconnection_sendMSG($this->_cPtr,$send_me,$uuid);
}
return $r;
}
function recvEvent() {
$r=ESLconnection_recvEvent($this->_cPtr);
return is_resource($r) ? new ESLevent($r) : $r;

View File

@ -2244,6 +2244,48 @@ fail:
}
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_sendMSG) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
char *arg3 = (char *) NULL ;
int result;
zval **args[3];
int arg_count;
SWIG_ResetError();
arg_count = ZEND_NUM_ARGS();
if(arg_count<2 || arg_count>3 ||
zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
WRONG_PARAM_COUNT;
{
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLconnection, 0) < 0) {
SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESLconnection_sendMSG. Expected SWIGTYPE_p_ESLconnection");
}
}
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
{
if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_ESLevent, 0) < 0) {
SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ESLconnection_sendMSG. Expected SWIGTYPE_p_ESLevent");
}
}
if(arg_count > 2) {
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
convert_to_string_ex(args[2]);
arg3 = (char *) Z_STRVAL_PP(args[2]);
/*@SWIG@*/;
}
result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
{
ZVAL_LONG(return_value,result);
}
return;
fail:
zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
}
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_recvEvent) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *result = 0 ;
@ -2651,6 +2693,7 @@ static zend_function_entry ESL_functions[] = {
SWIG_ZEND_NAMED_FE(eslconnection_api,_wrap_ESLconnection_api,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_bgapi,_wrap_ESLconnection_bgapi,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_sendevent,_wrap_ESLconnection_sendEvent,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_sendmsg,_wrap_ESLconnection_sendMSG,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_recvevent,_wrap_ESLconnection_recvEvent,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_recveventtimed,_wrap_ESLconnection_recvEventTimed,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_filter,_wrap_ESLconnection_filter,NULL)

View File

@ -60,6 +60,7 @@ ZEND_NAMED_FUNCTION(_wrap_ESLconnection_sendRecv);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_api);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_bgapi);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_sendEvent);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_sendMSG);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_recvEvent);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_recvEventTimed);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_filter);

View File

@ -87,6 +87,7 @@ class ESLconnection:
def api(*args): return apply(_ESL.ESLconnection_api, args)
def bgapi(*args): return apply(_ESL.ESLconnection_bgapi, args)
def sendEvent(*args): return apply(_ESL.ESLconnection_sendEvent, args)
def sendMSG(*args): return apply(_ESL.ESLconnection_sendMSG, args)
def recvEvent(*args): return apply(_ESL.ESLconnection_recvEvent, args)
def recvEventTimed(*args): return apply(_ESL.ESLconnection_recvEventTimed, args)
def filter(*args): return apply(_ESL.ESLconnection_filter, args)

View File

@ -4370,6 +4370,58 @@ fail:
}
SWIGINTERN PyObject *_wrap_ESLconnection_sendMSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
char *arg3 = (char *) NULL ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLconnection_sendMSG",&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendMSG" "', argument " "1"" of type '" "ESLconnection *""'");
}
arg1 = reinterpret_cast< ESLconnection * >(argp1);
res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendMSG" "', argument " "2"" of type '" "ESLevent *""'");
}
arg2 = reinterpret_cast< ESLevent * >(argp2);
if (obj2) {
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_sendMSG" "', argument " "3"" of type '" "char const *""'");
}
arg3 = reinterpret_cast< char * >(buf3);
}
{
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
SWIG_PYTHON_THREAD_END_ALLOW;
}
resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_PYTHON_THREAD_END_BLOCK;
return resultobj;
fail:
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
SWIG_PYTHON_THREAD_END_BLOCK;
return NULL;
}
SWIGINTERN PyObject *_wrap_ESLconnection_recvEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ESLconnection *arg1 = (ESLconnection *) 0 ;
@ -4859,6 +4911,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ESLconnection_api", _wrap_ESLconnection_api, METH_VARARGS, NULL},
{ (char *)"ESLconnection_bgapi", _wrap_ESLconnection_bgapi, METH_VARARGS, NULL},
{ (char *)"ESLconnection_sendEvent", _wrap_ESLconnection_sendEvent, METH_VARARGS, NULL},
{ (char *)"ESLconnection_sendMSG", _wrap_ESLconnection_sendMSG, METH_VARARGS, NULL},
{ (char *)"ESLconnection_recvEvent", _wrap_ESLconnection_recvEvent, METH_VARARGS, NULL},
{ (char *)"ESLconnection_recvEventTimed", _wrap_ESLconnection_recvEventTimed, METH_VARARGS, NULL},
{ (char *)"ESLconnection_filter", _wrap_ESLconnection_filter, METH_VARARGS, NULL},

View File

@ -3245,6 +3245,51 @@ fail:
}
SWIGINTERN VALUE
_wrap_ESLconnection_sendMSG(int argc, VALUE *argv, VALUE self) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
char *arg3 = (char *) NULL ;
int result;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int res3 ;
char *buf3 = 0 ;
int alloc3 = 0 ;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLconnection *","sendMSG", 1, self ));
}
arg1 = reinterpret_cast< ESLconnection * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ESLevent *","sendMSG", 2, argv[0] ));
}
arg2 = reinterpret_cast< ESLevent * >(argp2);
if (argc > 1) {
res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","sendMSG", 3, argv[1] ));
}
arg3 = reinterpret_cast< char * >(buf3);
}
result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
vresult = SWIG_From_int(static_cast< int >(result));
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return vresult;
fail:
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
return Qnil;
}
SWIGINTERN VALUE
_wrap_ESLconnection_recvEvent(int argc, VALUE *argv, VALUE self) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
@ -3958,6 +4003,7 @@ SWIGEXPORT void Init_ESL(void) {
rb_define_method(cESLconnection.klass, "api", VALUEFUNC(_wrap_ESLconnection_api), -1);
rb_define_method(cESLconnection.klass, "bgapi", VALUEFUNC(_wrap_ESLconnection_bgapi), -1);
rb_define_method(cESLconnection.klass, "sendEvent", VALUEFUNC(_wrap_ESLconnection_sendEvent), -1);
rb_define_method(cESLconnection.klass, "sendMSG", VALUEFUNC(_wrap_ESLconnection_sendMSG), -1);
rb_define_method(cESLconnection.klass, "recvEvent", VALUEFUNC(_wrap_ESLconnection_recvEvent), -1);
rb_define_method(cESLconnection.klass, "recvEventTimed", VALUEFUNC(_wrap_ESLconnection_recvEventTimed), -1);
rb_define_method(cESLconnection.klass, "filter", VALUEFUNC(_wrap_ESLconnection_filter), -1);

View File

@ -53,10 +53,18 @@
#ifndef WIN32
#define closesocket(x) close(x)
#include <fcntl.h>
#include <errno.h>
#else
#pragma warning (disable:6386)
/* These warnings need to be ignored warning in sdk header */
#include <Ws2tcpip.h>
#include <windows.h>
#ifndef errno
#define errno WSAGetLastError()
#endif
#ifndef EINTR
#define EINTR WSAEINTR
#endif
#pragma warning (default:6386)
#endif
@ -534,6 +542,39 @@ ESL_DECLARE(esl_status_t) esl_execute(esl_handle_t *handle, const char *app, con
}
ESL_DECLARE(esl_status_t) esl_sendmsg(esl_handle_t *handle, esl_event_t *event, const char *uuid)
{
char cmd_buf[128] = "sendmsg\n";
char *txt;
if (!handle || !handle->connected || handle->sock == ESL_SOCK_INVALID) {
return ESL_FAIL;
}
if (uuid) {
snprintf(cmd_buf, sizeof(cmd_buf), "sendmsg %s\n", uuid);
}
esl_event_serialize(event, &txt, ESL_FALSE);
esl_log(ESL_LOG_DEBUG, "%s%s\n", cmd_buf, txt);
if (send(handle->sock, cmd_buf, strlen(cmd_buf), 0) <= 0) goto fail;
if (send(handle->sock, txt, strlen(txt), 0) <= 0) goto fail;
free(txt);
return esl_recv(handle);
fail:
handle->connected = 0;
free(txt);
return ESL_FAIL;
}
ESL_DECLARE(esl_status_t) esl_filter(esl_handle_t *handle, const char *header, const char *value)
{
char send_buf[1024] = "";
@ -579,12 +620,31 @@ static int esl_socket_reuseaddr(esl_socket_t socket)
#endif
}
ESL_DECLARE(esl_status_t) esl_listen(const char *host, esl_port_t port, esl_listen_callback_t callback)
struct thread_handler {
esl_listen_callback_t callback;
esl_socket_t server_sock;
esl_socket_t client_sock;
struct sockaddr_in addr;
};
static void *client_thread(esl_thread_t *me, void *obj)
{
struct thread_handler *handler = (struct thread_handler *) obj;
handler->callback(handler->server_sock, handler->client_sock, &handler->addr);
free(handler);
return NULL;
}
ESL_DECLARE(esl_status_t) esl_listen(const char *host, esl_port_t port, esl_listen_callback_t callback, int max)
{
esl_socket_t server_sock = ESL_SOCK_INVALID;
struct sockaddr_in addr;
esl_status_t status = ESL_SUCCESS;
struct thread_handler *handler = NULL;
if ((server_sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
return ESL_FAIL;
}
@ -601,7 +661,7 @@ ESL_DECLARE(esl_status_t) esl_listen(const char *host, esl_port_t port, esl_list
goto end;
}
if (listen(server_sock, 10000) < 0) {
if (listen(server_sock, max) < 0) {
status = ESL_FAIL;
goto end;
}
@ -622,7 +682,16 @@ ESL_DECLARE(esl_status_t) esl_listen(const char *host, esl_port_t port, esl_list
goto end;
}
callback(server_sock, client_sock, &echoClntAddr);
handler = malloc(sizeof(*handler));
esl_assert(handler);
memset(handler, 0, sizeof(*handler));
handler->callback = callback;
handler->server_sock = server_sock;
handler->client_sock = client_sock;
handler->addr = echoClntAddr;
esl_thread_create_detached(client_thread, handler);
}
end:
@ -1022,7 +1091,21 @@ ESL_DECLARE(esl_status_t) esl_recv_event_timed(esl_handle_t *handle, uint32_t ms
static esl_ssize_t handle_recv(esl_handle_t *handle, void *data, esl_size_t datalen)
{
return recv(handle->sock, data, datalen, 0);
int activity;
while (handle->connected) {
activity = esl_wait_sock(handle->sock, 1000, ESL_POLL_READ|ESL_POLL_ERROR);
if (activity > 0 && (activity & ESL_POLL_READ)) {
return recv(handle->sock, data, datalen, 0);
}
if (activity < 0) {
return errno == EINTR ? 0 : -1;
}
}
return -1;
}
ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_event_t **save_event)

View File

@ -270,8 +270,9 @@ ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *hea
}
return hp->value;
}
} else if (!strcmp(header_name, "_body")) {
return event->body;
}
return NULL;
}
@ -414,6 +415,10 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st
int index = 0;
char *real_header_name = NULL;
if (!strcmp(header_name, "_body")) {
esl_event_set_body(event, data);
}
if ((index_ptr = strchr(header_name, '['))) {
index_ptr++;
index = atoi(index_ptr);
@ -604,6 +609,17 @@ ESL_DECLARE(esl_status_t) esl_event_add_header_string(esl_event_t *event, esl_st
return ESL_FAIL;
}
ESL_DECLARE(esl_status_t) esl_event_set_body(esl_event_t *event, const char *body)
{
esl_safe_free(event->body);
if (body) {
event->body = DUP(body);
}
return ESL_SUCCESS;
}
ESL_DECLARE(esl_status_t) esl_event_add_body(esl_event_t *event, const char *fmt, ...)
{
int ret = 0;
@ -791,7 +807,7 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
if (encode) {
esl_url_encode(hp->value, encode_buf, encode_len);
} else {
esl_snprintf(encode_buf, encode_len, "[%s]", hp->value);
esl_snprintf(encode_buf, encode_len, "%s", hp->value);
}

View File

@ -205,6 +205,15 @@ ESLevent *ESLconnection::sendEvent(ESLevent *send_me)
return new ESLevent("server_disconnected");
}
int ESLconnection::sendMSG(ESLevent *send_me, const char *uuid)
{
if (esl_sendmsg(&handle, send_me->event, uuid) == ESL_SUCCESS) {
return 0;
}
return 1;
}
ESLevent *ESLconnection::recvEvent()
{
if (esl_recv_event(&handle, 1, NULL) == ESL_SUCCESS) {

View File

@ -61,12 +61,22 @@ typedef enum {
#ifdef WIN32
#define ESL_SEQ_FWHITE FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY
#define ESL_SEQ_BWHITE FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE
#define ESL_SEQ_FRED FOREGROUND_RED | FOREGROUND_INTENSITY
#define ESL_SEQ_FMAGEN FOREGROUND_BLUE | FOREGROUND_RED
#define ESL_SEQ_FCYAN FOREGROUND_GREEN | FOREGROUND_BLUE
#define ESL_SEQ_FGREEN FOREGROUND_GREEN
#define ESL_SEQ_BRED FOREGROUND_RED
#define ESL_SEQ_FMAGEN FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY
#define ESL_SEQ_BMAGEN FOREGROUND_BLUE | FOREGROUND_RED
#define ESL_SEQ_FCYAN FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY
#define ESL_SEQ_BCYAN FOREGROUND_GREEN | FOREGROUND_BLUE
#define ESL_SEQ_FGREEN FOREGROUND_GREEN | FOREGROUND_INTENSITY
#define ESL_SEQ_BGREEN FOREGROUND_GREEN
#define ESL_SEQ_FYELLOW FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY
#define ESL_SEQ_BYELLOW FOREGROUND_RED | FOREGROUND_GREEN
#define ESL_SEQ_DEFAULT_COLOR ESL_SEQ_FWHITE
#define ESL_SEQ_FBLUE FOREGROUND_BLUE | FOREGROUND_INTENSITY
#define ESL_SEQ_BBLUE FOREGROUND_BLUE
#define ESL_SEQ_FBLACK 0 | FOREGROUND_INTENSITY
#define ESL_SEQ_BBLACK 0
#else
#define ESL_SEQ_ESC "\033["
/* Ansi Control character suffixes */
@ -381,7 +391,7 @@ ESL_DECLARE(esl_status_t) esl_attach_handle(esl_handle_t *handle, esl_socket_t s
\param port Port to bind to
\param callback Callback that will be called upon data received
*/
ESL_DECLARE(esl_status_t) esl_listen(const char *host, esl_port_t port, esl_listen_callback_t callback);
ESL_DECLARE(esl_status_t) esl_listen(const char *host, esl_port_t port, esl_listen_callback_t callback, int max);
/*!
\brief Executes application with sendmsg to a specific UUID. Used for outbound socket.
\param handle Handle that the msg will be sent
@ -397,6 +407,14 @@ ESL_DECLARE(esl_status_t) esl_execute(esl_handle_t *handle, const char *app, con
*/
ESL_DECLARE(esl_status_t) esl_sendevent(esl_handle_t *handle, esl_event_t *event);
/*!
\brief Send an event as a message to be parsed
\param handle Handle to which the event should be sent
\param event Event to be sent
\param uuid a specific uuid if not the default
*/
ESL_DECLARE(esl_status_t) esl_sendmsg(esl_handle_t *handle, esl_event_t *event, const char *uuid);
/*!
\brief Connect a handle to a host/port with a specific password. This will also authenticate against the server
\param handle Handle to connect

View File

@ -298,6 +298,7 @@ ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char
\note the body parameter can be shadowed by the esl_event_reserve_subclass_detailed function
*/
ESL_DECLARE(esl_status_t) esl_event_add_body(esl_event_t *event, const char *fmt, ...);
ESL_DECLARE(esl_status_t) esl_event_set_body(esl_event_t *event, const char *body);
/*!
\brief Create a new event assuming it will not be custom event and therefore hiding the unused parameters

View File

@ -86,6 +86,7 @@ class ESLconnection {
ESLevent *api(const char *cmd, const char *arg = NULL);
ESLevent *bgapi(const char *cmd, const char *arg = NULL, const char *job_uuid = NULL);
ESLevent *sendEvent(ESLevent *send_me);
int sendMSG(ESLevent *send_me, const char *uuid = NULL);
ESLevent *recvEvent();
ESLevent *recvEventTimed(int ms);
ESLevent *filter(const char *header, const char *value);

View File

@ -9,11 +9,6 @@ static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struc
esl_status_t status;
time_t exp = 0;
if (fork()) {
close(client_sock);
return;
}
esl_attach_handle(&handle, client_sock, addr);
esl_log(ESL_LOG_INFO, "Connected! %d\n", handle.sock);
@ -53,7 +48,7 @@ static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struc
int main(void)
{
esl_global_set_default_logger(7);
esl_listen("localhost", 8084, mycallback);
esl_listen("localhost", 8084, mycallback, 100000);
return 0;
}

View File

@ -184,9 +184,9 @@ endif
if HAVE_LIBPRI
mod_LTLIBRARIES += ftmod_libpri.la
ftmod_libpri_la_SOURCES = $(SRC)/ftmod/ftmod_libpri/ftmod_libpri.c $(SRC)/ftmod/ftmod_libpri/lpwrap_pri.c
ftmod_libpri_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
ftmod_libpri_la_LDFLAGS = -shared -module -avoid-version -lpri
ftmod_libpri_la_LIBADD = libfreetdm.la
ftmod_libpri_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) $(LIBPRI_CPPFLAGS)
ftmod_libpri_la_LDFLAGS = -shared -module -avoid-version $(LIBPRI_LDFLAGS)
ftmod_libpri_la_LIBADD = libfreetdm.la $(LIBPRI_LIBS)
endif
if HAVE_PRITAP
@ -248,6 +248,14 @@ ftmod_r2_la_LDFLAGS = -shared -module -avoid-version -lopenr2
ftmod_r2_la_LIBADD = libfreetdm.la
endif
if HAVE_MISDN
mod_LTLIBRARIES += ftmod_misdn.la
ftmod_misdn_la_SOURCES = $(SRC)/ftmod/ftmod_misdn/ftmod_misdn.c
ftmod_misdn_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) $(MISDN_CFLAGS) -D_GNU_SOURCE
ftmod_misdn_la_LDFLAGS = -shared -module -avoid-version
ftmod_misdn_la_LIBADD = libfreetdm.la
endif
dox doxygen:
doxygen $(FT_SRCDIR)/docs/Doxygen.conf

View File

@ -1 +1,2 @@
m4_include([build/ax_compiler_vendor.m4])
m4_include([build/libpcap.m4])

View File

@ -75,6 +75,11 @@ with the signaling protocols that you can run on top of your I/O interfaces.
<param name="polarity-delay" value="600"/>
-->
<!-- Retrieve caller id on polarity reverse -->
<!--
<param name="polarity-callerid" value="true"/>
-->
<!-- regex to stop dialing when it matches -->
<!--<param name="dial-regex" value="5555"/>-->

View File

@ -1,5 +1,3 @@
; This file is used to generate telephony tones by FreeTDM
[us]
generate-dial => v=-7;%(1000,0,350,440)
detect-dial => 350,440
@ -47,19 +45,98 @@ detect-fail1 => 913.8
detect-fail2 => 1370.6
detect-fail3 => 1776.7
[ru]
generate-dial => v=-7;%(1000,425)
detect-dial => 0
generate-ring => v=-7;%(800,5000,425,0)
detect-ring => 425,0
generate-busy => v=-7;%(350,350,425,0)
detect-busy => 425,0
generate-attn => v=0;%(100,100,1400,2060,2450,2600)
detect-attn => 1400,2060,2450,2600
generate-callwaiting-sas => v=0;%(300,0,440)
detect-callwaiting-sas => 440,480
generate-callwaiting-cas => v=0;%(80,0,2750,2130)
detect-callwaiting-cas => 2750,2130
detect-fail1 => 913.8
detect-fail2 => 1370.6
detect-fail3 => 1776.7
[in]
generate-dial => v=-7;%(1000,0,375,425)
detect-dial => 375,425
generate-ring => v=-7;%(2000,4000,440,480)
detect-ring => 440,480
generate-busy => v=-7;%(500,500,480,620)
detect-busy => 480,620
generate-attn => v=0;%(100,100,1400,2060,2450,2600)
detect-attn => 1400,2060,2450,2600
generate-callwaiting-sas => v=0;%(300,0,440)
detect-callwaiting-sas => 440
generate-callwaiting-cas => v=0;%(80,0,2750,2130)
detect-callwaiting-cas => 2750,2130
detect-fail1 => 913.8
detect-fail2 => 1370.6
detect-fail3 => 776.7
[th]
generate-dial => v=-7;%(1000,0,400,400)
detect-dial => 400,400
generate-ring => v=-7;%(2000,4000,400,400)
detect-ring => 400,400
generate-busy => v=-7;%(500,500,480,620)
detect-busy => 480,620
generate-attn => v=0;%(100,100,1400,2060,2450,2600)
detect-attn => 1400,2060,2450,2600
generate-callwaiting-sas => v=0;%(300,0,440)
detect-callwaiting-sas => 440
generate-callwaiting-cas => v=0;%(80,0,2750,2130)
detect-callwaiting-cas => 2750,2130
detect-fail1 => 913.8
detect-fail2 => 1370.6
detect-fail3 => 1776.7
[au]
generate-dial => v=-7;%(1000,0,413,438)
detect-dial => 413,438
generate-ring => v=-7;%(400,200,413,438);%(400,2000,413,438)
detect-ring => 413,438
generate-busy => v=-7;%(375,375,425)
detect-busy => 425
generate-attn => v=0;%(100,100,1400,2060,2450,2600)
detect-attn => 1400,2060,2450,2600
generate-callwaiting-sas => v=0;%(300,0,440)
detect-callwaiting-sas => 440
generate-callwaiting-cas => v=0;%(80,0,2750,2130)
detect-callwaiting-cas => 2750,2130
detect-fail1 => 913.8
detect-fail2 => 1370.6
detect-fail3 => 776.7

View File

@ -54,6 +54,9 @@ fi
AC_SUBST([confdir])
DEFAULT_INCLUDES="-I. -I./src/include -I\$(srcdir)"
AC_SUBST([DEFAULT_INCLUDES])
# Where to install the modules
AC_ARG_WITH([modinstdir],
[AS_HELP_STRING([--with-modinstdir=DIR], [Install modules into this location (default: ${prefix}/mod)])],
@ -191,28 +194,46 @@ AM_CONDITIONAL([HAVE_OPENR2], [test "${HAVE_OPENR2}" = "yes"])
#
HAVE_LIBPRI="no"
AC_ARG_WITH([libpri],
[AS_HELP_STRING([--with-libpri], [Install ftmod_libpri])],
[AS_HELP_STRING([--with-libpri@<:@=PREFIX@:>@], [Install ftmod_libpri])],
[case "${withval}" in
no) enable_libpri="no" ;;
*) enable_libpri="yes" ;;
no|yes) with_libpri="${withval}" ;;
*) AS_IF([test -d "${withval}"],
[with_libpri="${withval}"],
[AC_MSG_ERROR([Invalid argument for --with-libpri, \"${withval}\" is not a directory])]
) ;;
esac],
[enable_libpri="no"]
[with_libpri="no"]
)
if test "${enable_libpri}" != "no"
if test "x${with_libpri}" != "xno"
then
save_LIBS="${LIBS}"
save_CPPFLAGS="${CPPFLAGS}"
save_LDFLAGS="${LDFLAGS}"
LIBPRI_CPPFLAGS=""
LIBPRI_LDFLAGS=""
AC_MSG_RESULT([${as_nl}<<>> Digium libpri])
save_LIBS="${LIBS}"
AS_IF([test "x${with_libpri}" != "xyes"],
[LIBPRI_CPPFLAGS="-I${with_libpri}/include"
LIBPRI_LDFLAGS="-L${with_libpri}/lib"],
)
LDFLAGS="${save_LDFLAGS} ${LIBPRI_LDFLAGS}"
CPPFLAGS="${save_CPPFLAGS} ${LIBPRI_CPPFLAGS}"
LIBS="${LIBS} -lpri"
AC_MSG_CHECKING([whether libpri is usable])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <libpri.h>],
[const char *version = pri_get_version();]
)],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([yes])
HAVE_LIBPRI="yes"],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([libpri is not installed or unusable (see config.log for details)])]
AC_MSG_ERROR([libpri not found or unusable (see config.log for details)])]
)
AC_MSG_CHECKING([whether libpri has BRI support])
@ -238,10 +259,17 @@ then
[AC_MSG_RESULT([no])
AC_MSG_NOTICE([You will need libpri-1.4.12_beta1 or newer for AOC event support])]
)
# libpri is available, set variables for Makefile(.am)
AC_SUBST([LIBPRI_LIBS], [-lpri])
AC_SUBST([LIBPRI_LDFLAGS])
AC_SUBST([LIBPRI_CPPFLAGS])
LIBS="${save_LIBS}"
LDFLAGS="${save_LDFLAGS}"
CPPFLAGS="${save_CPPFLAGS}"
fi
HAVE_LIBPRI="${enable_libpri}"
AM_CONDITIONAL([HAVE_LIBPRI],[test "${enable_libpri}" = "yes"])
AM_CONDITIONAL([HAVE_LIBPRI],[test "x${HAVE_LIBPRI}" = "xyes"])
##
# Sangoma Wanpipe
@ -364,6 +392,42 @@ then
fi
AM_CONDITIONAL([HAVE_LIBISDN], [test "${HAVE_LIBISDN}" = "yes"])
##
# mISDN dependencies
#
HAVE_MISDN="no"
AC_ARG_WITH([misdn],
[AS_HELP_STRING([--with-misdn], [Install ftmod_misdn (mISDN I/O plugin)])],
[case "${withval}" in
no|yes) with_misdn="${withval}" ;;
*) AC_MSG_ERROR([Invalid value \"${with_misdn}\" for --with-misdn option]) ;;
esac],
[with_misdn="auto"]
)
AS_IF([test "${with_misdn}" != "no"],
[AC_MSG_RESULT([${as_nl}<<>> ftmod_misdn (Linux mISDN I/O plugin)])
AC_CHECK_FUNCS([timerfd_create],,
[AS_IF([test "${with_misdn}" = "yes"],
[AC_MSG_ERROR([no timerfd support in libc])],
[AC_MSG_NOTICE([no timerfd support in libc])]
)]
)
AC_CHECK_HEADER([mISDN/mISDNif.h],,
[AS_IF([test "${with_misdn}" = "yes"],
[AC_MSG_ERROR([mISDN/mISDNif.h not found])],
[AC_MSG_NOTICE([mISDN/mISDNif.h not found])]
)],
[#include <sys/socket.h>]
)
AS_IF([test "${ac_cv_func_timerfd_create}" = "yes" -a "${ac_cv_header_mISDN_mISDNif_h}" = "yes"],
[HAVE_MISDN="yes"],
[AC_MSG_NOTICE([Some required dependencies are missing, module disabled])]
)]
)
AM_CONDITIONAL([HAVE_MISDN], [test "${HAVE_MISDN}" = "yes"])
AC_MSG_RESULT([${as_nl}<<>> Creating output files])
AC_CONFIG_FILES([
Makefile
@ -389,6 +453,7 @@ AC_MSG_RESULT([
ftmod_pritap....................... ${HAVE_PRITAP}
I/O:
ftmod_wanpipe...................... ${HAVE_LIBSANGOMA}
ftmod_misdn........................ ${HAVE_MISDN}
===============================================================================
])

View File

@ -0,0 +1,76 @@
== This is an email sent to stkn responding to his post http://stkn.techmage.de/archives/200 ==
1. FreeTDM open channels immediately.
Yes, this seems to come from the early days of OpenZAP where probably the analog modules were implemented first and was dragged incorrectly to ISDN.
The open API also sets the flag in use so others cannot use it. We should decouple this open and reserve operations. Does not seem very hard to do,
I'll take a look at it on my way back to Toronto this week or earlier if possible, I'll create a git branch for it and send you the url for peer review.
Feel free to do the opposite if you are in a hurry.
2. FreeTDM does not completely close the channel on hangup.
As long as the signaling module calls ftdm_channel_close() the fio->close API will be called where the IO module is responsible
for turning off ec or any other operations to leave the channel unused/idle (not really closed). There was indeed a bug where ftdm_zt module
was not properly closing the channel, if that is what you mean, then it means that was already fixed by you with your audio mode turn off patch.
Now, a more lengthy response ...
When we, Sangoma, took over openzap and renamed it to freetdm, it was not just a name change, many API cleanups were done so API users cannot access
the internal data structures and cannot explicitly move between channel states. Also, some order on the state transitions has been put into place.
We've tried to keep backwards compatibility though, so old modules may not follow all of the conventions. Some unwritten conventions are:
1. Signaling modules are responsible for calling ftdm_channel_close() when done with the channel. In fact, signaling modules should not
call ftdm_channel_done unless they really know what they're doing. ftdm_channel_close will call ftdm_channel_done anyways.
2. When remote end hangs up a call, signaling module should go to TERMINATING state and send SIGEVENT_STOP to the user. The signaling stack
should not acknowledge the hangup until the user implicitly moves us to HANGUP (via ftdm_channel_call_hangup()). There is a core timer
that will ensure we move from TERMINATING to HANGUP if the user does not moves us fast enough (arbitrarely 3000ms), although that is considered
a bug in the user application (at some point we saw that in FreeSWITCH) and we complain loudly when that happens.
3. Signaling modules should leave the channel with NO pending states once they unlock it. This means, whenever you have a message to process
you must lock the channel, check its current state (the user may have already changed the state to something else), process any pending
state set by the user, then process your message and if required move the channel to a new state and process that state before releasing the lock.
There is a chance of a deadlock due to the callbacks we use to notify users of messages if we call those callbacks with the channel lock held and
that is why new signaling modules should use the FTDM_SPAN_USE_SIGNALS_QUEUE to defer the notification to the user when the ftdm_channel_t is not
locked calling ftdm_span_trigger_signals() at the end of their processing loop which delivers the callback notifications to users.
Having said that, there is a major architectural change coming, probably early 2011, and I'd like to have your input.
== Decoupling calls from IO channels ==
We've also found that the concept of a channel and a call are unnecesarily coupled together in FreeTDM. I've never asked Anthony the reasoning
for this, but it seems the API was meant to be used with, or without calls. That is, a user should be able to just 'open' a channel and start
reading and writing raw data without ever launching one of the provided signaling stacks on top, may be just because the user is using their
own signaling stack and just needs freetdm/openzap as an I/O API. In fact, signaling modules work like this (but there are defects there).
The problem is, as you have noticed, the way ftdm_channel_open_xx APIs has been implemented is abusing this concept.
Problems with current implementation.
1. Exclusive channel is the only way we can request channels to the ISDN network. There is no room to change the channel later on easily.
2. Multi-rate calls cannot be done. We need to associate multiple B-channels to a single call.
3. Low-bit-rate calls (not sure what is the proper name for them) where a single B-channel can feed media to multiple calls with a low bit-rate
codec (I know of at least one request from a big company for this to support some Q.SIG stuff for Eurocontrol).
What do we need?
I think there should be only one open() API that wraps calls around fio->open(), the other current open_xx functions that do hunting, should
be eliminated and some extra arguments provided to ftdm_channel_call_place to provide information about the channel where we would like to
place the call or group hunting information and the API would return immediately providing a ftdm_call_t reference pointer that can be used
to further track the status of that call, or in the case where a channel exclusivity was requested and we know for a fact is not available,
just return failure. At that point there is no I/O channel involved yet. Eventually after the signaling stack hunts the channel and
negotiaties its availability with the network, an I/O channel can be attached to that call, or even attach multiple channels (for the case
of multi rate calls?).
This involves heavy changes. The state machine should be moved out of the ftdm_channel_t structure along with probably some other members
and stuffed into a new ftdm_call_t structure. Signaling modules would have to be updated to run their state machines with this call
structure and then at some point attach IO channels to the call. There would be 2 type of read/write APIs, one low level ftdm_channel_read
which receives an ftdm_channel_t as parameter and an ftdm_call_read() which receives an ftdm_call_t as parameter, for the case of multi-rate
calls or low-bit-rate multiplexed calls in the same B-channel this API would return just the media corresponding to that call already
demultiplexed or concatenated, or whatever needs to be done with the media from the multiple low-level IO channels.
This is fairly disruptive, but I believe should be done sooner or later.

View File

@ -45,7 +45,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../src/include;../src/include;../src/isdn/include"
AdditionalIncludeDirectories="../../../src/include;../src/include;../../curl/include;../src/isdn/include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -126,7 +126,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../src/include;../src/include;../src/isdn/include"
AdditionalIncludeDirectories="../../../src/include;../src/include;../../curl/include;../src/isdn/include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@ -210,7 +210,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../src/include;../src/include;../src/isdn/include"
AdditionalIncludeDirectories="../../../src/include;../src/include;../../curl/include;../src/isdn/include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@ -292,7 +292,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../src/include;../src/include;../src/isdn/include"
AdditionalIncludeDirectories="../../../src/include;../src/include;../../curl/include;../src/isdn/include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"

View File

@ -91,7 +91,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../../src/include;../src/include;../src/isdn/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../../../src/include;../src/include;../../curl/include;../src/isdn/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -117,7 +117,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../../../src/include;../src/include;../src/isdn/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../../../src/include;../src/include;../../curl/include;../src/isdn/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
@ -148,7 +148,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../../src/include;../src/include;../src/isdn/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../../../src/include;../src/include;../../curl/include;../src/isdn/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -177,7 +177,7 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>../../../src/include;../src/include;../src/isdn/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../../../src/include;../src/include;../../curl/include;../src/isdn/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>

View File

@ -34,6 +34,15 @@
#include <switch.h>
#include "freetdm.h"
//#define CUDATEL_DEBUG
#ifdef CUDATEL_DEBUG
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#include <execinfo.h>
#include <syscall.h>
#endif
#ifndef __FUNCTION__
#define __FUNCTION__ __SWITCH_FUNC__
#endif
@ -495,15 +504,14 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
switch_channel_t *channel = NULL;
private_t *tech_pvt = NULL;
ftdm_chan_type_t chantype;
uint32_t tokencnt;
char *uuid = NULL;
uint8_t uuid_found = 0;
uint32_t t = 0;
const char *token = NULL;
const char *name = NULL;
int span_id = 0;
int chan_id = 0;
const char *name = NULL;
uint32_t t = 0;
uint32_t tokencnt;
char *uuid = NULL;
const char *token = NULL;
uint8_t uuid_found = 0;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@ -511,13 +519,60 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
/* ignore any further I/O requests, we're hanging up already! */
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
/* ignore any further I/O requests, we're hanging up already! */
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
name = switch_channel_get_name(channel);
span_id = tech_pvt->ftdmchan ? ftdm_channel_get_span_id(tech_pvt->ftdmchan) : 0;
chan_id = tech_pvt->ftdmchan ? ftdm_channel_get_id(tech_pvt->ftdmchan) : 0;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[%d:%d] %s CHANNEL HANGUP ENTER\n", span_id, chan_id, name);
/* First verify this call has a device attached */
if (!tech_pvt->ftdmchan) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s does not have any ftdmchan attached\n", name);
goto end;
}
}
/* Now verify the device is still attached to this call :-)
* Sometimes the FS core takes too long (more than 3 seconds) in calling
* channel_on_hangup() and the FreeTDM core decides to take the brute
* force approach and hangup and detach themselves from the call. Later
* when FS finally comes around, we might end up hanging up the device
* attached to another call, this verification avoids that. */
uuid = switch_core_session_get_uuid(session);
tokencnt = ftdm_channel_get_token_count(tech_pvt->ftdmchan);
for (t = 0; t < tokencnt; t++) {
token = ftdm_channel_get_token(tech_pvt->ftdmchan, t);
if (!zstr(token) && !strcasecmp(uuid, token)) {
uuid_found = 1;
break;
}
}
if (!uuid_found) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Device [%d:%d] is no longer attached to %s. Nothing to do.\n", span_id, chan_id, name);
goto end;
}
#ifdef CUDATEL_DEBUG
{
pid_t tid = 0;
size_t size = 0;
char **symbols = NULL;
void *stacktrace[50];
int si = 0;
size = backtrace(stacktrace, ftdm_array_len(stacktrace));
symbols = backtrace_symbols(stacktrace, size);
tid = syscall(SYS_gettid);
for (si = 0; si < size; si++) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[%d:%d][tid:%d] %s -> %s\n",
span_id, chan_id, tid, name, symbols[si]);
}
free(symbols);
}
#endif
name = switch_channel_get_name(channel);
@ -549,7 +604,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
ftdm_channel_clear_token(tech_pvt->ftdmchan, switch_core_session_get_uuid(session));
chantype = ftdm_channel_get_type(tech_pvt->ftdmchan);
chantype = ftdm_channel_get_type(tech_pvt->ftdmchan);
switch (chantype) {
case FTDM_CHAN_TYPE_FXO:
case FTDM_CHAN_TYPE_EM:
@ -560,7 +615,6 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
case FTDM_CHAN_TYPE_FXS:
{
if (!ftdm_channel_call_check_busy(tech_pvt->ftdmchan) && !ftdm_channel_call_check_done(tech_pvt->ftdmchan)) {
tokencnt = ftdm_channel_get_token_count(tech_pvt->ftdmchan);
if (tokencnt) {
cycle_foreground(tech_pvt->ftdmchan, 0, NULL);
} else {
@ -588,9 +642,6 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
end:
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL HANGUP\n", switch_channel_get_name(channel));
switch_mutex_lock(globals.mutex);
globals.calls--;
if (globals.calls < 0) {
@ -598,6 +649,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
}
switch_mutex_unlock(globals.mutex);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[%d:%d] %s CHANNEL HANGUP EXIT\n", span_id, chan_id, name);
return SWITCH_STATUS_SUCCESS;
}
@ -669,6 +721,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
int total_to;
int chunk, do_break = 0;
uint32_t span_id, chan_id;
const char *name = NULL;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@ -676,17 +729,18 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
if (switch_test_flag(tech_pvt, TFLAG_DEAD)) {
ftdm_log(FTDM_LOG_DEBUG, "TFLAG_DEAD is set\n");
return SWITCH_STATUS_FALSE;
}
name = switch_channel_get_name(channel);
if (!tech_pvt->ftdmchan) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "no ftdmchan set in channel %s!\n", name);
return SWITCH_STATUS_FALSE;
}
span_id = ftdm_channel_get_span_id(tech_pvt->ftdmchan);
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
if (switch_test_flag(tech_pvt, TFLAG_DEAD)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TFLAG_DEAD is set in channel %s device %d:%d!\n", name, span_id, chan_id);
return SWITCH_STATUS_FALSE;
}
/* Digium Cards sometimes timeout several times in a row here.
Yes, we support digium cards, ain't we nice.......
@ -718,7 +772,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
}
if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
ftdm_log(FTDM_LOG_DEBUG, "TFLAG_IO is not set\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TFLAG_IO is not set in channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
@ -726,7 +780,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
status = ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, chunk);
if (status == FTDM_FAIL) {
ftdm_log(FTDM_LOG_ERROR, "Failed to wait for I/O\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to read from channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
@ -734,7 +788,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
if (!switch_test_flag(tech_pvt, TFLAG_HOLD)) {
total_to -= chunk;
if (total_to <= 0) {
ftdm_log(FTDM_LOG_WARNING, "Too many timeouts while waiting for I/O\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Too many timeouts while waiting I/O in channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
}
@ -747,9 +801,9 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
len = tech_pvt->read_frame.buflen;
if (ftdm_channel_read(tech_pvt->ftdmchan, tech_pvt->read_frame.data, &len) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_WARNING, "failed to read from device %d:%d\n", span_id, chan_id);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to read from channel %s device %d:%d!\n", name, span_id, chan_id);
if (++tech_pvt->read_error > FTDM_MAX_READ_WRITE_ERRORS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "too many I/O read errors on device %d:%d!\n", span_id, chan_id);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "too many I/O read errors on channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
} else {
@ -765,23 +819,23 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
}
while (ftdm_channel_dequeue_dtmf(tech_pvt->ftdmchan, dtmf, sizeof(dtmf))) {
switch_dtmf_t _dtmf = { 0, SWITCH_DEFAULT_DTMF_DURATION };
switch_dtmf_t _dtmf = { 0, switch_core_default_dtmf_duration(0) };
char *p;
for (p = dtmf; p && *p; p++) {
if (is_dtmf(*p)) {
_dtmf.digit = *p;
ftdm_log(FTDM_LOG_DEBUG, "Queuing DTMF [%c] in channel %s\n", *p, switch_channel_get_name(channel));
ftdm_log(FTDM_LOG_DEBUG, "Queuing DTMF [%c] in channel %s device %d:%d\n", *p, name, span_id, chan_id);
switch_channel_queue_dtmf(channel, &_dtmf);
}
}
}
return SWITCH_STATUS_SUCCESS;
fail:
fail:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "clearing IO in channel %s device %d:%d!\n", name, span_id, chan_id);
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
return SWITCH_STATUS_GENERR;
}
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)
@ -790,8 +844,9 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
private_t *tech_pvt = NULL;
ftdm_size_t len;
unsigned char data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};
const char *name = "(none)";
ftdm_wait_flag_t wflags = FTDM_WRITE;
uint32_t span_id, chan_id;
uint32_t span_id = 0, chan_id = 0;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@ -799,7 +854,17 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
name = switch_channel_get_name(channel);
if (!tech_pvt->ftdmchan) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "no ftdmchan set in channel %s!\n", name);
return SWITCH_STATUS_FALSE;
}
span_id = ftdm_channel_get_span_id(tech_pvt->ftdmchan);
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
if (switch_test_flag(tech_pvt, TFLAG_DEAD)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TFLAG_DEAD is set in channel %s device %d:%d!\n", name, span_id, chan_id);
return SWITCH_STATUS_FALSE;
}
@ -808,17 +873,10 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
}
if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TFLAG_IO is not set in channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
if (!tech_pvt->ftdmchan) {
return SWITCH_STATUS_FALSE;
}
span_id = ftdm_channel_get_span_id(tech_pvt->ftdmchan);
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
if (switch_test_flag(frame, SFF_CNG)) {
frame->data = data;
frame->buflen = sizeof(data);
@ -833,16 +891,16 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, ftdm_channel_get_io_interval(tech_pvt->ftdmchan) * 10);
if (!(wflags & FTDM_WRITE)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Dropping frame! (write not ready)\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Dropping frame! (write note ready) in channel %s device %d:%d!\n", name, span_id, chan_id);
return SWITCH_STATUS_SUCCESS;
}
len = frame->datalen;
if (ftdm_channel_write(tech_pvt->ftdmchan, frame->data, frame->buflen, &len) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_WARNING, "failed to write to device %d:%d\n", span_id, chan_id);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Failed to write to channel %s device %d:%d!\n", name, span_id, chan_id);
if (++tech_pvt->write_error > FTDM_MAX_READ_WRITE_ERRORS) {
switch_log_printf(SWITCH_CHANNEL_LOG,
SWITCH_LOG_ERROR, "too many I/O write errors on device %d:%d!\n", span_id, chan_id);
SWITCH_LOG_ERROR, "Too many I/O write errors on channel %s device %d:%d!\n", name, span_id, chan_id);
goto fail;
}
} else {
@ -852,7 +910,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
return SWITCH_STATUS_SUCCESS;
fail:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error writing to channel %s device %d:%d!\n", name, span_id, chan_id);
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
return SWITCH_STATUS_GENERR;
@ -1854,11 +1912,7 @@ ftdm_status_t ftdm_channel_from_event(ftdm_sigmsg_t *sigmsg, switch_core_session
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-Screen", "%d", channel_caller_data->screen);
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-Presentation", "%d", channel_caller_data->pres);
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_callref");
if (!ftdm_strlen_zero(var_value)) {
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-CallReference", "%s", var_value);
}
switch_channel_set_variable_printf(channel, "sip_h_X-FreeTDM-CallReference", "%d", channel_caller_data->call_reference);
var_value = ftdm_sigmsg_get_var(sigmsg, "ss7_opc");
if (!ftdm_strlen_zero(var_value)) {
@ -2361,7 +2415,6 @@ static FIO_SIGNAL_CB_FUNCTION(on_r2_signal)
switch_set_flag_locked(tech_pvt, TFLAG_DEAD);
channel = switch_core_session_get_channel(session);
switch_channel_hangup(channel, caller_data->hangup_cause);
ftdm_channel_clear_token(sigmsg->channel, switch_core_session_get_uuid(session));
switch_core_session_rwunlock(session);
}
}
@ -3149,6 +3202,7 @@ static switch_status_t load_config(void)
const char *enable_callerid = "true";
const char *answer_polarity = "false";
const char *hangup_polarity = "false";
const char *polarity_callerid = "false";
int polarity_delay = 600;
int callwaiting = 1;
int dialtone_timeout = 5000;
@ -3230,6 +3284,8 @@ static switch_status_t load_config(void)
hangup_polarity = val;
} else if (!strcasecmp(var, "polarity-delay")) {
polarity_delay = atoi(val);
} else if (!strcasecmp(var, "polarity-callerid")) {
polarity_callerid = val;
} else if (!strcasecmp(var, "fail-dial-regex")) {
fail_dial_regex = val;
} else if (!strcasecmp(var, "hold-music")) {
@ -3292,6 +3348,7 @@ static switch_status_t load_config(void)
"enable_callerid", enable_callerid,
"answer_polarity_reverse", answer_polarity,
"hangup_polarity_reverse", hangup_polarity,
"polarity_callerid", polarity_callerid,
"polarity_delay", &polarity_delay,
"callwaiting", &callwaiting,
"wait_dialtone_timeout", &dialtone_timeout,
@ -3918,16 +3975,151 @@ void dump_chan_xml(ftdm_span_t *span, uint32_t chan_id, switch_stream_handle_t *
switch_channel_cause2str(caller_data->hangup_cause));
}
typedef struct ftdm_cli_entry ftdm_cli_entry_t;
typedef switch_status_t (*ftdm_cli_function_t)(ftdm_cli_entry_t *cli, const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[]);
#define FTDM_CLI_DECLARE(name) static switch_status_t name(ftdm_cli_entry_t *cli, const char *cmd, \
switch_core_session_t *session, switch_stream_handle_t *stream, \
int argc, char *argv[])
static void print_usage(switch_stream_handle_t *stream, ftdm_cli_entry_t *cli);
static switch_status_t ftdm_cmd_voice_detect(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
typedef struct cmd_ioread_data {
int num_times;
uint32_t interval;
ftdm_span_t *span;
ftdm_channel_t *fchan;
switch_memory_pool_t *pool;
int already_open;
} cmd_ioread_data_t;
static void *SWITCH_THREAD_FUNC ioread_thread(switch_thread_t *thread, void *obj)
{
stream->write_function(stream, "IMPLEMENT ME!\n");
ftdm_wait_flag_t wflags = FTDM_READ;
ftdm_status_t status = FTDM_FAIL;
unsigned char iobuf[SWITCH_RECOMMENDED_BUFFER_SIZE];
cmd_ioread_data_t *data = obj;
int span_id = ftdm_span_get_id(data->span);
int chan_id = ftdm_channel_get_id(data->fchan);
ftdm_size_t len = ftdm_channel_get_io_packet_len(data->fchan);
ftdm_size_t origlen = len;
unsigned int pbuf[5];
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"Started ioread thread (times = %d, interval = %ums, len = %"FTDM_SIZE_FMT", span = %d, chan = %d\n",
data->num_times, data->interval, len, span_id, chan_id);
while (ftdm_running() && data->num_times > 0) {
data->num_times--;
wflags = FTDM_READ;
status = ftdm_channel_wait(data->fchan, &wflags, (data->interval * 10));
if (status == FTDM_FAIL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to wait for IO in device %d:%d!\n", span_id, chan_id);
continue;
}
if (status == FTDM_TIMEOUT) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Timed out while waiting I/O in device %d:%d!\n", span_id, chan_id);
continue;
}
len = origlen;
if (ftdm_channel_read(data->fchan, iobuf, &len) != FTDM_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to read from device %d:%d!\n", span_id, chan_id);
continue;
}
pbuf[0] = iobuf[0];
pbuf[1] = iobuf[1];
pbuf[2] = iobuf[2];
pbuf[3] = iobuf[3];
pbuf[4] = iobuf[4];
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Read 0x%1X 0x%1X 0x%1X 0x%1X 0x%1X\n",
pbuf[0], pbuf[1], pbuf[2], pbuf[3], pbuf[4]);
}
if (!data->already_open) {
ftdm_channel_close(&data->fchan);
}
switch_core_destroy_memory_pool(&data->pool);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"Done ioread thread (times = %d, interval = %ums, len = %"FTDM_SIZE_FMT", span = %d, chan = %d\n",
data->num_times, data->interval, origlen, span_id, chan_id);
return NULL;
}
FTDM_CLI_DECLARE(ftdm_cmd_ioread)
{
char *span_name = NULL;
int channo = 0;
ftdm_status_t status = FTDM_SUCCESS;
switch_threadattr_t *attr = NULL;
switch_thread_t *thread = NULL;
cmd_ioread_data_t *thdata;
cmd_ioread_data_t data;
memset(&data, 0, sizeof(data));
data.num_times = 1;
if (argc < 3) {
print_usage(stream, cli);
goto end;
}
span_name = argv[1];
ftdm_span_find_by_name(span_name, &data.span);
if (!data.span) {
stream->write_function(stream, "-ERR span %s not found\n", span_name);
goto end;
}
channo = atoi(argv[2]);
status = ftdm_channel_open(ftdm_span_get_id(data.span), channo, &data.fchan);
if (!data.fchan || (status != FTDM_SUCCESS && status != FTDM_EBUSY)) {
stream->write_function(stream, "-ERR Failed to open channel %d in span %s\n", channo, span_name);
goto end;
}
if (status == FTDM_EBUSY) {
data.already_open = 1;
}
if (argc > 3) {
data.num_times = atoi(argv[3]);
if (data.num_times < 1) {
data.num_times = 1;
}
}
if (argc > 4) {
data.interval = atoi(argv[4]);
}
if (data.interval <= 0 || data.interval > 10000) {
data.interval = ftdm_channel_get_io_interval(data.fchan);
}
switch_core_new_memory_pool(&data.pool);
thdata = switch_core_alloc(data.pool, sizeof(data));
memcpy(thdata, &data, sizeof(*thdata));
switch_threadattr_create(&attr, data.pool);
switch_threadattr_detach_set(attr, 1);
switch_threadattr_stacksize_set(attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&thread, attr, ioread_thread, thdata, data.pool);
end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_list(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_list)
{
int j;
for (j = 0 ; j < FTDM_MAX_SPANS_INTERFACE; j++) {
@ -4004,19 +4196,20 @@ static switch_status_t ftdm_cmd_list(const char *cmd, switch_core_session_t *ses
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_start_stop(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_start_stop)
{
char *span_name = argv[1];
ftdm_span_t *span = NULL;
ftdm_status_t status;
if (span_name) {
ftdm_span_find_by_name(span_name, &span);
if (argc < 2) {
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(span_name, &span);
if (!span) {
stream->write_function(stream, "-ERR no span\n");
stream->write_function(stream, "-ERR span %s not found\n", span_name);
goto end;
}
@ -4031,34 +4224,36 @@ end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_reset(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_reset)
{
uint32_t chan_id = 0;
uint32_t ccount = 0;
ftdm_channel_t *chan;
ftdm_span_t *span = NULL;
if (argc < 2) {
stream->write_function(stream, "-ERR Usage: ftdm reset <span_id> [<chan_id>]\n");
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[1], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
stream->write_function(stream, "-ERR span %s not found\n", argv[1]);
goto end;
}
if (argc > 2) {
chan_id = atoi(argv[2]);
if (chan_id > ftdm_span_get_chan_count(span)) {
stream->write_function(stream, "-ERR invalid chan\n");
stream->write_function(stream, "-ERR invalid channel %d\n", chan_id);
goto end;
}
}
if (chan_id) {
chan = ftdm_span_get_channel(span, chan_id);
if (!chan) {
stream->write_function(stream, "-ERR Could not find chan\n");
stream->write_function(stream, "-ERR Could not find channel %d\n", chan_id);
goto end;
}
stream->write_function(stream, "Resetting channel %s:%s\n", argv[1], argv[2]);
@ -4078,8 +4273,7 @@ end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_dump(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_dump)
{
ftdm_iterator_t *chaniter = NULL;
ftdm_iterator_t *curr = NULL;
@ -4088,12 +4282,11 @@ static switch_status_t ftdm_cmd_dump(const char *cmd, switch_core_session_t *ses
char *as = NULL;
if (argc < 2) {
stream->write_function(stream, "-ERR Usage: ftdm dump <span_id> [<chan_id>]\n");
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[1], &span);
if (argc > 2) {
if (argv[3] && !strcasecmp(argv[2], "as")) {
as = argv[3];
@ -4156,28 +4349,29 @@ end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_sigstatus(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_sigstatus)
{
ftdm_span_t *span = NULL;
ftdm_signaling_status_t sigstatus;
if (argc < 3) {
stream->write_function(stream, "-ERR Usage: ftdm sigstatus get|set [<span_id>] [<chan_id>] [<sigstatus>]\n");
print_usage(stream, cli);
goto end;
}
if (!strcasecmp(argv[1], "get") && argc < 3) {
stream->write_function(stream, "-ERR sigstatus get usage: get <span_id>\n");
print_usage(stream, cli);
goto end;
}
if (!strcasecmp(argv[1], "set") && argc != 5) {
stream->write_function(stream, "-ERR sigstatus set usage: set <span_id> <chan_id>|all <sigstatus>\n");
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[2], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
stream->write_function(stream, "-ERR invalid span %s\n", argv[2]);
goto end;
}
@ -4186,21 +4380,21 @@ static switch_status_t ftdm_cmd_sigstatus(const char *cmd, switch_core_session_t
uint32_t chan_id = atol(argv[3]);
ftdm_channel_t *fchan = ftdm_span_get_channel(span, chan_id);
if (!fchan) {
stream->write_function(stream, "-ERR failed to get channel id '%d'\n", chan_id);
stream->write_function(stream, "-ERR invalid channel id '%d'\n", chan_id);
goto end;
}
if ((FTDM_SUCCESS == ftdm_channel_get_sig_status(fchan, &sigstatus))) {
stream->write_function(stream, "channel %d signaling status: %s\n", chan_id, ftdm_signaling_status2str(sigstatus));
stream->write_function(stream, "Channel %d signaling status: %s\n", chan_id, ftdm_signaling_status2str(sigstatus));
} else {
stream->write_function(stream, "-ERR failed to get channel sigstatus\n");
stream->write_function(stream, "-ERR failed to get channel signaling status\n");
}
goto end;
} else {
if ((FTDM_SUCCESS == ftdm_span_get_sig_status(span, &sigstatus))) {
stream->write_function(stream, "signaling_status: %s\n", ftdm_signaling_status2str(sigstatus));
} else {
stream->write_function(stream, "-ERR failed to read span status: %s\n", ftdm_span_get_last_error(span));
stream->write_function(stream, "-ERR failed to read span signaling status: %s\n", ftdm_span_get_last_error(span));
}
}
goto end;
@ -4238,8 +4432,7 @@ end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_trace(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_trace)
{
char tracepath[255];
unsigned i = 0;
@ -4249,19 +4442,19 @@ static switch_status_t ftdm_cmd_trace(const char *cmd, switch_core_session_t *se
ftdm_span_t *span = NULL;
ftdm_channel_t *chan = NULL;
if (argc < 3) {
stream->write_function(stream, "-ERR Usage: ftdm trace <path> <span_id> [<chan_id>]\n");
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[2], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
stream->write_function(stream, "-ERR failed to find span %s\n", argv[2]);
goto end;
}
chan_count = ftdm_span_get_chan_count(span);
if (argc > 3) {
chan_id = atoi(argv[3]);
if (chan_id > chan_count) {
stream->write_function(stream, "-ERR invalid chan\n");
stream->write_function(stream, "-ERR invalid channel\n");
goto end;
}
}
@ -4286,31 +4479,33 @@ end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_notrace(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_notrace)
{
uint32_t i = 0;
uint32_t chan_id = 0;
uint32_t chan_count = 0;
ftdm_channel_t *fchan = NULL;
ftdm_span_t *span = NULL;
if (argc < 2) {
stream->write_function(stream, "-ERR Usage: ftdm notrace <span_id> [<chan_id>]\n");
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[1], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
stream->write_function(stream, "-ERR failed to find span %s\n", argv[1]);
goto end;
}
chan_count = ftdm_span_get_chan_count(span);
if (argc > 2) {
chan_id = atoi(argv[2]);
if (chan_id > chan_count) {
stream->write_function(stream, "-ERR invalid chan\n");
stream->write_function(stream, "-ERR invalid channel\n");
goto end;
}
}
if (chan_id) {
fchan = ftdm_span_get_channel(span, chan_id);
ftdm_channel_command(fchan, FTDM_COMMAND_TRACE_END_ALL, NULL);
@ -4321,12 +4516,12 @@ static switch_status_t ftdm_cmd_notrace(const char *cmd, switch_core_session_t *
}
}
stream->write_function(stream, "+OK trace disabled\n");
end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_gains(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_gains)
{
unsigned int i = 0;
float txgain = 0.0;
@ -4336,18 +4531,19 @@ static switch_status_t ftdm_cmd_gains(const char *cmd, switch_core_session_t *se
ftdm_channel_t *chan;
ftdm_span_t *span = NULL;
if (argc < 4) {
stream->write_function(stream, "-ERR Usage: ftdm gains <rxgain> <txgain> <span_id> [<chan_id>]\n");
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[3], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
stream->write_function(stream, "-ERR failed to find span %s\n", argv[3]);
goto end;
}
if (argc > 4) {
chan_id = atoi(argv[4]);
if (chan_id > ftdm_span_get_chan_count(span)) {
stream->write_function(stream, "-ERR invalid chan\n");
stream->write_function(stream, "-ERR invalid channel\n");
goto end;
}
}
@ -4375,8 +4571,7 @@ end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_dtmf(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_dtmf)
{
unsigned i = 0;
uint32_t chan_id = 0;
@ -4384,8 +4579,9 @@ static switch_status_t ftdm_cmd_dtmf(const char *cmd, switch_core_session_t *ses
ftdm_span_t *span = NULL;
ftdm_command_t fcmd = FTDM_COMMAND_ENABLE_DTMF_DETECT;
ftdm_channel_t *fchan;
if (argc < 3) {
stream->write_function(stream, "-ERR Usage: dtmf on|off <span_id> [<chan_id>]\n");
print_usage(stream, cli);
goto end;
}
@ -4397,14 +4593,15 @@ static switch_status_t ftdm_cmd_dtmf(const char *cmd, switch_core_session_t *ses
ftdm_span_find_by_name(argv[2], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
stream->write_function(stream, "-ERR failed to find span %s\n", argv[2]);
goto end;
}
schan_count = ftdm_span_get_chan_count(span);
if (argc > 3) {
chan_id = atoi(argv[3]);
if (chan_id > schan_count) {
stream->write_function(stream, "-ERR invalid chan\n");
stream->write_function(stream, "-ERR invalid channel\n");
goto end;
}
}
@ -4424,8 +4621,7 @@ end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t ftdm_cmd_queuesize(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_queuesize)
{
unsigned int i = 0;
uint32_t rxsize = 10;
@ -4435,21 +4631,24 @@ static switch_status_t ftdm_cmd_queuesize(const char *cmd, switch_core_session_t
ftdm_channel_t *chan;
ftdm_span_t *span = NULL;
if (argc < 4) {
stream->write_function(stream, "-ERR Usage: ftdm queuesize <rxsize> <txsize> <span_id> [<chan_id>]\n");
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[3], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
stream->write_function(stream, "-ERR failed to find span %s\n", argv[3]);
goto end;
}
if (argc > 4) {
chan_id = atoi(argv[4]);
if (chan_id > ftdm_span_get_chan_count(span)) {
stream->write_function(stream, "-ERR invalid chan\n");
stream->write_function(stream, "-ERR invalid channel\n");
goto end;
}
}
i = sscanf(argv[1], "%u", &rxsize);
i += sscanf(argv[2], "%u", &txsize);
if (i != 2) {
@ -4503,8 +4702,7 @@ static void exec_io_command(const char *cmd, switch_stream_handle_t *stream, ftd
}
}
static switch_status_t ftdm_cmd_iostats(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[])
FTDM_CLI_DECLARE(ftdm_cmd_iostats)
{
uint32_t chan_id = 0;
ftdm_channel_t *chan;
@ -4513,20 +4711,20 @@ static switch_status_t ftdm_cmd_iostats(const char *cmd, switch_core_session_t *
ftdm_span_t *span = NULL;
if (argc < 3) {
stream->write_function(stream, "-ERR Usage: ftdm iostats enable|disable|flush|print <span_id> [<chan_id>]\n");
print_usage(stream, cli);
goto end;
}
ftdm_span_find_by_name(argv[2], &span);
if (!span) {
stream->write_function(stream, "-ERR invalid span\n");
stream->write_function(stream, "-ERR failed to find span %s\n", argv[2]);
goto end;
}
if (argc > 3) {
chan_id = atoi(argv[3]);
if (chan_id > ftdm_span_get_chan_count(span)) {
stream->write_function(stream, "-ERR invalid chan\n");
stream->write_function(stream, "-ERR invalid channel\n");
goto end;
}
chan = ftdm_span_get_channel(span, chan_id);
@ -4544,14 +4742,12 @@ end:
return SWITCH_STATUS_SUCCESS;
}
typedef switch_status_t (*ftdm_cli_function_t)(const char *cmd, switch_core_session_t *session,
switch_stream_handle_t *stream, int argc, char *argv[]);
typedef struct ftdm_cli_entry {
struct ftdm_cli_entry {
const char *name;
const char *args;
const char *complete;
ftdm_cli_function_t execute;
} ftdm_cli_entry_t;
};
static ftdm_cli_entry_t ftdm_cli_options[] =
{
@ -4567,7 +4763,7 @@ static ftdm_cli_entry_t ftdm_cli_options[] =
{ "dtmf", "on|off <span_id|span_name> [<chan_id>]", "::[on:off", ftdm_cmd_dtmf },
{ "queuesize", "<rxsize> <txsize> <span_id|span_name> [<chan_id>]", "", ftdm_cmd_queuesize },
{ "iostats", "enable|disable|flush|print <span_id|span_name> <chan_id>", "::[enable:disable:flush:print", ftdm_cmd_iostats },
{ "voice_detect", "[on|off] <span_id|span_name> [<chan_id>]", "::[on:off", ftdm_cmd_voice_detect },
{ "ioread", "<span_id|span_name> <chan_id> [num_times] [interval]", "", ftdm_cmd_ioread },
/* Fake handlers as they are handled within freetdm library,
* we should provide a way inside freetdm to query for completions from signaling modules */
@ -4576,6 +4772,11 @@ static ftdm_cli_entry_t ftdm_cli_options[] =
{ "core calls", "", "", NULL },
};
static void print_usage(switch_stream_handle_t *stream, ftdm_cli_entry_t *cli)
{
stream->write_function(stream, "-ERR Usage: ftdm %s %s\n", cli->name, cli->args);
}
static void print_full_usage(switch_stream_handle_t *stream)
{
int i = 0;
@ -4608,7 +4809,7 @@ SWITCH_STANDARD_API(ft_function)
for (i = 0 ; i < ftdm_array_len(ftdm_cli_options); i++) {
entry = &ftdm_cli_options[i];
if (!strcasecmp(argv[0], entry->name) && entry->execute) {
entry->execute(cmd, session, stream, argc, argv);
entry->execute(entry, cmd, session, stream, argc, argv);
break;
}
}

View File

@ -6,7 +6,7 @@ int main(int argc, char *argv[])
int fd, b;
short sln[512] = {0};
teletone_dtmf_detect_state_t dtmf_detect = {0};
char digit_str[128] = "";
teletone_hit_type_t hit;
if (argc < 2) {
fprintf(stderr, "Arg Error!\n");
@ -21,10 +21,31 @@ int main(int argc, char *argv[])
}
while((b = read(fd, sln, 320)) > 0) {
char digit_char;
unsigned int dur;
teletone_dtmf_detect(&dtmf_detect, sln, b / 2);
teletone_dtmf_get(&dtmf_detect, digit_str, sizeof(digit_str));
if (*digit_str) {
printf("digit: %s\n", digit_str);
if ((hit = teletone_dtmf_get(&dtmf_detect, &digit_char, &dur))) {
const char *hs = NULL;
switch(hit) {
case TT_HIT_BEGIN:
hs = "begin";
break;
case TT_HIT_MIDDLE:
hs = "middle";
break;
case TT_HIT_END:
hs = "end";
break;
default:
break;
}
printf("%s digit: %c\n", hs, digit_char);
}
}
close(fd);

View File

@ -649,9 +649,6 @@ static ftdm_status_t ftdm_span_destroy(ftdm_span_t *span)
if (span->fio->span_destroy(span) != FTDM_SUCCESS) {
status = FTDM_FAIL;
}
ftdm_safe_free(span->type);
ftdm_safe_free(span->name);
ftdm_safe_free(span->dtmf_hangup);
}
/* destroy final basic resources of the span data structure */
@ -1858,7 +1855,14 @@ static ftdm_status_t _ftdm_channel_open(uint32_t span_id, uint32_t chan_id, ftdm
goto done;
}
ftdm_mutex_lock(check->mutex);
ftdm_channel_lock(check);
if (ftdm_test_flag(check, FTDM_CHANNEL_OPEN)) {
/* let them know is already open, but return the channel anyway */
status = FTDM_EBUSY;
*ftdmchan = check;
goto unlockchan;
}
/* The following if's and gotos replace a big if (this || this || this || this) else { nothing; } */
@ -1905,7 +1909,7 @@ openchan:
goto done;
unlockchan:
ftdm_mutex_unlock(check->mutex);
ftdm_channel_unlock(check);
done:
ftdm_mutex_unlock(globals.mutex);
@ -3855,7 +3859,6 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_process_media(ftdm_channel_t *ftdmchan, v
uint8_t sln_buf[1024] = {0};
int16_t *sln;
ftdm_size_t slen = 0;
char digit_str[80] = "";
if (ftdmchan->effective_codec == FTDM_CODEC_SLIN) {
sln = data;
@ -3956,13 +3959,20 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_process_media(ftdm_channel_t *ftdmchan, v
}
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_DTMF_DETECT) && !ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_DTMF_DETECT)) {
teletone_dtmf_detect(&ftdmchan->dtmf_detect, sln, (int)slen);
teletone_dtmf_get(&ftdmchan->dtmf_detect, digit_str, sizeof(digit_str));
teletone_hit_type_t hit;
char digit_char;
uint32_t dur;
if(*digit_str) {
if (ftdmchan->state == FTDM_CHANNEL_STATE_CALLWAITING && (*digit_str == 'D' || *digit_str == 'A')) {
if ((hit = teletone_dtmf_detect(&ftdmchan->dtmf_detect, sln, (int)slen)) == TT_HIT_END) {
teletone_dtmf_get(&ftdmchan->dtmf_detect, &digit_char, &dur);
if (ftdmchan->state == FTDM_CHANNEL_STATE_CALLWAITING && (digit_char == 'D' || digit_char == 'A')) {
ftdmchan->detected_tones[FTDM_TONEMAP_CALLWAITING_ACK]++;
} else {
char digit_str[2] = { 0 };
digit_str[0] = digit_char;
if (!ftdmchan->span->sig_dtmf || (ftdmchan->span->sig_dtmf(ftdmchan, (const char*)digit_str) != FTDM_BREAK)) {
ftdm_channel_queue_dtmf(ftdmchan, digit_str);
}
@ -4568,7 +4578,7 @@ FT_DECLARE(ftdm_status_t) ftdm_configure_span_channels(ftdm_span_t *span, const
*configured = 0;
*configured = span->fio->configure_span(span, str, chan_config->type, chan_config->name, chan_config->number);
if (!*configured) {
ftdm_log(FTDM_LOG_ERROR, "%d:Failed to configure span", span->span_id);
ftdm_log(FTDM_LOG_ERROR, "%d:Failed to configure span\n", span->span_id);
return FTDM_FAIL;
}
@ -5469,10 +5479,6 @@ FT_DECLARE(ftdm_status_t) ftdm_span_send_signal(ftdm_span_t *span, ftdm_sigmsg_t
if (sigmsg->channel) {
fchan = sigmsg->channel;
ftdm_channel_lock(fchan);
sigmsg->chan_id = fchan->chan_id;
sigmsg->span_id = fchan->span_id;
sigmsg->call_id = fchan->caller_data.call_id;
sigmsg->call_priv = fchan->caller_data.priv;
}
/* some core things to do on special events */
@ -5562,6 +5568,14 @@ FT_DECLARE(ftdm_status_t) ftdm_span_send_signal(ftdm_span_t *span, ftdm_sigmsg_t
}
if (fchan) {
/* set members of the sigmsg that must be present for all events */
sigmsg->chan_id = fchan->chan_id;
sigmsg->span_id = fchan->span_id;
sigmsg->call_id = fchan->caller_data.call_id;
sigmsg->call_priv = fchan->caller_data.priv;
}
/* if the signaling module uses a queue for signaling notifications, then enqueue it */
if (ftdm_test_flag(span, FTDM_SPAN_USE_SIGNALS_QUEUE)) {
ftdm_span_queue_signal(span, sigmsg);
@ -5783,6 +5797,7 @@ FT_DECLARE(ftdm_status_t) ftdm_global_destroy(void)
}
hashtable_remove(globals.span_hash, (void *)cur_span->name);
ftdm_safe_free(cur_span->dtmf_hangup);
ftdm_safe_free(cur_span->type);
ftdm_safe_free(cur_span->name);
ftdm_safe_free(cur_span);

View File

@ -39,7 +39,8 @@ typedef enum {
FTDM_ANALOG_RUNNING = (1 << 0),
FTDM_ANALOG_CALLERID = (1 << 1),
FTDM_ANALOG_ANSWER_POLARITY_REVERSE = (1 << 2),
FTDM_ANALOG_HANGUP_POLARITY_REVERSE = (1 << 3)
FTDM_ANALOG_HANGUP_POLARITY_REVERSE = (1 << 3),
FTDM_ANALOG_POLARITY_CALLERID = (1 << 4)
} ftdm_analog_flag_t;
#define FTDM_MAX_HOTLINE_STR 20

View File

@ -275,6 +275,15 @@ static FIO_SIG_CONFIGURE_FUNCTION(ftdm_analog_configure_span)
break;
}
hotline = val;
} else if (!strcasecmp(var, "polarity_callerid")) {
if (!(val = va_arg(ap, char *))) {
break;
}
if (ftdm_true(val)) {
flags |= FTDM_ANALOG_POLARITY_CALLERID;
} else {
flags &= ~FTDM_ANALOG_POLARITY_CALLERID;
}
} else {
ftdm_log(FTDM_LOG_ERROR, "Unknown parameter %s in span %s\n", var, span->name);
}
@ -1130,8 +1139,18 @@ static __inline__ ftdm_status_t process_event(ftdm_span_t *span, ftdm_event_t *e
break;
}
if (event->channel->state == FTDM_CHANNEL_STATE_DOWN) {
ftdm_log_chan_msg(event->channel, FTDM_LOG_DEBUG,
"Ignoring polarity reversal because this channel is down\n");
if (ftdm_test_flag(analog_data, FTDM_ANALOG_CALLERID)
&& ftdm_test_flag(analog_data, FTDM_ANALOG_POLARITY_CALLERID)) {
ftdm_log_chan_msg(event->channel, FTDM_LOG_DEBUG, "Polarity reversal detected while down, getting caller id now\n");
ftdm_set_state(event->channel, FTDM_CHANNEL_STATE_GET_CALLERID);
event->channel->ring_count = 1;
ftdm_mutex_unlock(event->channel->mutex);
locked = 0;
ftdm_thread_create_detached(ftdm_analog_channel_run, event->channel);
} else {
ftdm_log_chan_msg(event->channel, FTDM_LOG_DEBUG,
"Ignoring polarity reversal because this channel is down\n");
}
break;
}
/* we have a good channel, set the polarity flag and let the channel thread deal with it */

View File

@ -204,6 +204,32 @@ static int parse_debug(const char *in, uint32_t *flags)
return res;
}
/**
* \brief Parses a change status string to flags
* \param in change status string to parse for
* \return Flags
*/
static int parse_change_status(const char *in)
{
int flags = 0;
if (!in) {
return 0;
}
if (strstr(in, "in_service") || strstr(in, "in")) {
flags = SERVICE_CHANGE_STATUS_INSERVICE;
}
if (strstr(in, "maintenance") || strstr(in, "maint")) {
flags = SERVICE_CHANGE_STATUS_MAINTENANCE;
}
if (strstr(in, "out_of_service") || strstr(in, "out")) {
flags = SERVICE_CHANGE_STATUS_OUTOFSERVICE;
}
return flags;
}
static int print_debug(uint32_t flags, char *tmp, const int size)
{
int offset = 0;
@ -240,6 +266,9 @@ static ftdm_io_interface_t ftdm_libpri_interface;
static const char *ftdm_libpri_usage =
"Usage:\n"
"libpri kill <span>\n"
"libpri reset <span>\n"
"libpri restart <span> <channel/all>\n"
"libpri maintenance <span> <channel/all> <in/maint/out>\n"
"libpri debug <span> [all|none|flag,...flagN]\n"
"\n"
"Possible debug flags:\n"
@ -281,9 +310,7 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
stream->write_function(stream, ftdm_libpri_usage);
goto done;
}
}
if (argc == 2) {
} else if (argc == 2) {
if (!strcasecmp(argv[0], "kill")) {
int span_id = atoi(argv[1]);
ftdm_span_t *span = NULL;
@ -292,7 +319,8 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
ftdm_libpri_data_t *isdn_data = span->signal_data;
if (span->start != ftdm_libpri_start) {
stream->write_function(stream, "%s: -ERR invalid span.\n", __FILE__);
stream->write_function(stream, "%s: -ERR '%s' is not a libpri span.\n",
__FILE__, ftdm_span_get_name(span));
goto done;
}
@ -300,13 +328,12 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
stream->write_function(stream, "%s: +OK killed.\n", __FILE__);
goto done;
} else {
stream->write_function(stream, "%s: -ERR invalid span.\n", __FILE__);
stream->write_function(stream, "%s: -ERR span '%s' not found.\n",
__FILE__, argv[0]);
goto done;
}
}
}
if (argc >= 2) {
} else if (argc >= 2) {
if (!strcasecmp(argv[0], "debug")) {
ftdm_span_t *span = NULL;
@ -315,7 +342,8 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
uint32_t flags = 0;
if (span->start != ftdm_libpri_start) {
stream->write_function(stream, "%s: -ERR invalid span.\n", __FILE__);
stream->write_function(stream, "%s: -ERR '%s' is not a libpri span.\n",
__FILE__, ftdm_span_get_name(span));
goto done;
}
@ -335,12 +363,95 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
stream->write_function(stream, "%s: +OK debug %s.\n", __FILE__, (flags) ? "enabled" : "disabled");
goto done;
} else {
stream->write_function(stream, "%s: -ERR invalid span.\n", __FILE__);
stream->write_function(stream, "%s: -ERR span '%s' not found.\n",
__FILE__, argv[0]);
goto done;
}
}
if (!strcasecmp(argv[0], "reset")) {
ftdm_span_t *span = NULL;
if (ftdm_span_find_by_name(argv[1], &span) == FTDM_SUCCESS) {
ftdm_libpri_data_t *isdn_data = span->signal_data;
if (span->start != ftdm_libpri_start) {
stream->write_function(stream, "%s: -ERR '%s' is not a libpri span.\n",
__FILE__, ftdm_span_get_name(span));
goto done;
}
pri_restart(isdn_data->spri.pri);
stream->write_function(stream, "%s: +OK reset.\n", __FILE__);
goto done;
} else {
stream->write_function(stream, "%s: -ERR span '%s' not found.\n",
__FILE__, argv[0]);
goto done;
}
}
if (!strcasecmp(argv[0], "restart") && argc == 3) {
ftdm_span_t *span = NULL;
if (ftdm_span_find_by_name(argv[1], &span) == FTDM_SUCCESS) {
ftdm_libpri_data_t *isdn_data = span->signal_data;
if (span->start != ftdm_libpri_start) {
stream->write_function(stream, "%s: -ERR '%s' is not a libpri span.\n",
__FILE__, ftdm_span_get_name(span));
goto done;
}
if (!strcasecmp(argv[2], "all")) {
int j;
for(j = 1; j <= span->chan_count; j++) {
pri_reset(isdn_data->spri.pri, j);
ftdm_sleep(50);
}
} else {
pri_reset(isdn_data->spri.pri, atoi(argv[2]));
}
stream->write_function(stream, "%s: +OK restart set.\n", __FILE__);
goto done;
} else {
stream->write_function(stream, "%s: -ERR span '%s' not found.\n",
__FILE__, argv[0]);
goto done;
}
}
if (!strcasecmp(argv[0], "maintenance") && argc > 3) {
ftdm_span_t *span = NULL;
if (ftdm_span_find_by_name(argv[1], &span) == FTDM_SUCCESS) {
ftdm_libpri_data_t *isdn_data = span->signal_data;
if (span->start != ftdm_libpri_start) {
stream->write_function(stream, "%s: -ERR '%s' is not a libpri span.\n",
__FILE__, ftdm_span_get_name(span));
goto done;
}
if (!isdn_data->service_message_support) {
stream->write_function(stream, "%s: -ERR service message support is disabled\n", __FILE__);
goto done;
}
if (!strcasecmp(argv[2], "all")) {
int j;
for(j = 1; j <= span->chan_count; j++) {
pri_maintenance_service(isdn_data->spri.pri, atoi(argv[1]), j, parse_change_status(argv[3]));
ftdm_sleep(50);
}
} else {
pri_maintenance_service(isdn_data->spri.pri, atoi(argv[1]), atoi(argv[2]), parse_change_status(argv[3]));
}
stream->write_function(stream, "%s: +OK change status set.\n", __FILE__);
goto done;
} else {
stream->write_function(stream, "%s: -ERR span '%s' not found.\n",
__FILE__, argv[0]);
goto done;
}
}
} else {
/* zero args print usage */
stream->write_function(stream, ftdm_libpri_usage);
goto done;
}
stream->write_function(stream, "%s: -ERR invalid command.\n", __FILE__);
done:
@ -1066,7 +1177,7 @@ static int on_proceeding(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_
if (chan) {
/* Open channel if inband information is available */
if (pevent->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE) {
if (pevent->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE || pevent->proceeding.progressmask & PRI_PROG_CALL_NOT_E2E_ISDN) {
ftdm_log(FTDM_LOG_DEBUG, "-- In-band information available, B-Channel %d:%d\n",
ftdm_channel_get_span_id(chan),
ftdm_channel_get_id(chan));
@ -1108,7 +1219,7 @@ static int on_progress(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_ev
if (chan) {
/* Open channel if inband information is available */
if (pevent->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE) {
if (pevent->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE || pevent->proceeding.progressmask & PRI_PROG_CALL_NOT_E2E_ISDN) {
ftdm_log(FTDM_LOG_DEBUG, "-- In-band information available, B-Channel %d:%d\n",
ftdm_channel_get_span_id(chan),
ftdm_channel_get_id(chan));
@ -1780,6 +1891,10 @@ static void *ftdm_libpri_run(ftdm_thread_t *me, void *obj)
pri_facility_enable(isdn_data->spri.pri);
}
#endif
/* Support the different switch of service status */
if (isdn_data->service_message_support) {
pri_set_service_message_support(isdn_data->spri.pri, 1 /* True */);
}
if (res == 0) {
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_ANY, on_anything);
@ -1835,6 +1950,14 @@ static void *ftdm_libpri_run(ftdm_thread_t *me, void *obj)
ftdm_sleep(5000);
}
out:
/* close d-channel, if set */
if (isdn_data->dchan) {
if (ftdm_channel_close(&isdn_data->dchan) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_ERROR, "Failed to close D-Channel %d:%d\n",
ftdm_channel_get_span_id(isdn_data->dchan), ftdm_channel_get_id(isdn_data->dchan));
}
}
ftdm_log(FTDM_LOG_DEBUG, "PRI thread ended on span %d\n", ftdm_span_get_id(span));
ftdm_clear_flag(span, FTDM_SPAN_IN_THREAD);
@ -2159,6 +2282,11 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_libpri_configure_span)
isdn_data->debug_mask = 0;
}
}
else if (!strcasecmp(var, "service_message_support")) {
if (ftdm_true(val)) {
isdn_data->service_message_support = 1;
}
}
else {
ftdm_log(FTDM_LOG_ERROR, "Unknown parameter '%s', aborting configuration\n", var);
snprintf(span->last_error, sizeof(span->last_error), "Unknown parameter [%s]", var);

View File

@ -31,6 +31,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
typedef enum {
SERVICE_CHANGE_STATUS_INSERVICE = 0,
SERVICE_CHANGE_STATUS_MAINTENANCE = 1,
SERVICE_CHANGE_STATUS_OUTOFSERVICE = 2
} service_change_status_t;
#ifndef FTMOD_LIBPRI_H
#define FTMOD_LIBPRI_H
@ -69,6 +74,7 @@ struct ftdm_libpri_data {
int overlap; /*!< Overlap dial flags */
unsigned int layer1;
unsigned int ton;
unsigned int service_message_support;
lpwrap_pri_t spri;
};

File diff suppressed because it is too large Load Diff

View File

@ -547,7 +547,7 @@ static void handle_pri_passive_event(pritap_t *pritap, pri_event *e)
break;
case PRI_EVENT_PROGRESS:
crv = tap_pri_get_crv(pritap->pri, e->ring.call);
crv = tap_pri_get_crv(pritap->pri, e->proceeding.call);
ftdm_log(FTDM_LOG_DEBUG, "Progress on channel %s:%d:%d with callref %d\n",
pritap->span->name, PRI_SPAN(e->proceeding.channel), PRI_CHANNEL(e->proceeding.channel), crv);
break;

View File

@ -1155,6 +1155,77 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_sangoma_isdn_span_config)
return FTDM_FAIL;
}
if (span_data->cid_name_method == SNGISDN_CID_NAME_AUTO) {
switch (span_data->switchtype) {
case SNGISDN_SWITCH_EUROISDN:
if (FTDM_SPAN_IS_BRI(span)) {
span_data->cid_name_method = SNGISDN_CID_NAME_USR_USR_IE;
} else {
span_data->cid_name_method = SNGISDN_CID_NAME_DISPLAY_IE;
}
break;
case SNGISDN_SWITCH_DMS100:
span_data->cid_name_method = SNGISDN_CID_NAME_DISPLAY_IE;
break;
case SNGISDN_SWITCH_NI2:
case SNGISDN_SWITCH_5ESS:
case SNGISDN_SWITCH_4ESS:
span_data->cid_name_method = SNGISDN_CID_NAME_FACILITY_IE;
break;
default:
break;
}
}
if (span_data->send_cid_name == SNGISDN_OPT_DEFAULT) {
switch (span_data->switchtype) {
case SNGISDN_SWITCH_EUROISDN:
#ifdef SNGISDN_SUPPORT_CALLING_NAME_IN_FACILITY
case SNGISDN_SWITCH_NI2:
case SNGISDN_SWITCH_5ESS:
case SNGISDN_SWITCH_4ESS:
#endif
if (span_data->signalling == SNGISDN_SIGNALING_NET) {
span_data->send_cid_name = SNGISDN_OPT_TRUE;
} else {
span_data->send_cid_name = SNGISDN_OPT_FALSE;
}
break;
case SNGISDN_SWITCH_DMS100:
span_data->send_cid_name = SNGISDN_OPT_TRUE;
break;
#ifndef SNGISDN_SUPPORT_CALLING_NAME_IN_FACILITY
case SNGISDN_SWITCH_NI2:
case SNGISDN_SWITCH_5ESS:
case SNGISDN_SWITCH_4ESS:
span_data->send_cid_name = SNGISDN_OPT_FALSE;
break;
#endif
default:
span_data->send_cid_name = SNGISDN_OPT_FALSE;
break;
}
} else if (span_data->send_cid_name == SNGISDN_OPT_TRUE) {
switch (span_data->switchtype) {
case SNGISDN_SWITCH_NI2:
case SNGISDN_SWITCH_5ESS:
case SNGISDN_SWITCH_4ESS:
#ifndef SNGISDN_SUPPORT_CALLING_NAME_IN_FACILITY
ftdm_log(FTDM_LOG_WARNING, "Sending Calling Name in Facility IE not supported, please update your libsng_isdn library\n");
span_data->send_cid_name = SNGISDN_OPT_FALSE;
#endif
break;
case SNGISDN_SWITCH_INSNET: /* Don't know how to transmit caller ID name on INSNET */
case SNGISDN_SWITCH_QSIG: /* It seems like QSIG does not support Caller ID */
span_data->send_cid_name = SNGISDN_OPT_FALSE;
break;
case SNGISDN_SWITCH_EUROISDN:
break;
default:
span_data->send_cid_name = SNGISDN_OPT_FALSE;
break;
}
}
span->start = ftdm_sangoma_isdn_start;
span->stop = ftdm_sangoma_isdn_stop;

View File

@ -132,6 +132,13 @@ typedef enum {
SNGISDN_AVAIL_UP = 10,
} sngisdn_avail_t;
typedef enum {
SNGISDN_CID_NAME_AUTO,
SNGISDN_CID_NAME_DISPLAY_IE,
SNGISDN_CID_NAME_USR_USR_IE,
SNGISDN_CID_NAME_FACILITY_IE,
} sngisdn_cid_name_t;
typedef enum {
SNGISDN_EVENT_CON_IND = 1,
SNGISDN_EVENT_CON_CFM,
@ -264,6 +271,8 @@ typedef struct sngisdn_span_data {
uint8_t restart_opt;
uint8_t restart_timeout;
uint8_t force_sending_complete;
uint8_t cid_name_method;
uint8_t send_cid_name;
char* local_numbers[SNGISDN_NUM_LOCAL_NUMBERS];
ftdm_timer_id_t timers[SNGISDN_NUM_SPAN_TIMERS];
ftdm_sched_t *sched;

View File

@ -289,6 +289,9 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
signal_data->att_remove_dtmf = SNGISDN_OPT_DEFAULT;
signal_data->force_sending_complete = SNGISDN_OPT_DEFAULT;
signal_data->cid_name_method = SNGISDN_CID_NAME_AUTO;
signal_data->send_cid_name = SNGISDN_OPT_DEFAULT;
span->default_caller_data.dnis.plan = FTDM_NPI_INVALID;
span->default_caller_data.dnis.type = FTDM_TON_INVALID;
span->default_caller_data.cid_num.plan = FTDM_NPI_INVALID;
@ -361,7 +364,7 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
parse_yesno(var, val, &signal_data->restart_opt);
} else if (!strcasecmp(var, "channel-restart-timeout")) {
signal_data->restart_timeout = atoi(val);
} else if (!strcasecmp(var, "local-number")) {
} else if (!strcasecmp(var, "local-number")) {
if (add_local_number(val, span) != FTDM_SUCCESS) {
return FTDM_FAIL;
}
@ -401,6 +404,30 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
#else
ftdm_log(FTDM_LOG_WARNING, "chan-id-invert-extend-bit is not supported in your version of libsng_isdn\n");
#endif
} else if (!strcasecmp(var, "cid-name-transmit-method")) {
if (!strcasecmp(val, "display-ie")) {
signal_data->cid_name_method = SNGISDN_CID_NAME_DISPLAY_IE;
} else if (!strcasecmp(val, "user-user-ie")) {
signal_data->cid_name_method = SNGISDN_CID_NAME_USR_USR_IE;
} else if (!strcasecmp(val, "facility-ie")) {
signal_data->cid_name_method = SNGISDN_CID_NAME_FACILITY_IE;
} else if (!strcasecmp(val, "auto") || !strcasecmp(val, "automatic") || !strcasecmp(val, "default")) {
signal_data->cid_name_method = SNGISDN_CID_NAME_AUTO;
} else {
ftdm_log(FTDM_LOG_WARNING, "Invalid option %s for parameter %s\n", val, var);
signal_data->cid_name_method = SNGISDN_CID_NAME_AUTO;
}
} else if (!strcasecmp(var, "send-cid-name")) {
if (!strcasecmp(val, "yes")) {
signal_data->send_cid_name = SNGISDN_OPT_TRUE;
} else if (!strcasecmp(val, "no")) {
signal_data->send_cid_name = SNGISDN_OPT_FALSE;
} else if (!strcasecmp(val, "auto") || !strcasecmp(val, "automatic") || !strcasecmp(val, "default")) {
signal_data->send_cid_name = SNGISDN_OPT_DEFAULT;
} else {
ftdm_log(FTDM_LOG_WARNING, "Invalid option %s for parameter %s\n", val, var);
signal_data->send_cid_name = SNGISDN_OPT_DEFAULT;
}
} else {
ftdm_log(FTDM_LOG_WARNING, "Ignoring unknown parameter %s\n", ftdm_parameters[paramindex].var);
}

View File

@ -681,7 +681,11 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
cfg.t.cfg.s.inDLSAP.clrGlr = FALSE; /* in case of glare, do not clear local call */
cfg.t.cfg.s.inDLSAP.statEnqOpt = TRUE;
cfg.t.cfg.s.inDLSAP.rstOpt = TRUE;
if (signal_data->ftdm_span->trunk_type == FTDM_TRUNK_BRI_PTMP) {
cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;
} else {
cfg.t.cfg.s.inDLSAP.rstOpt = TRUE;
}
} else {
cfg.t.cfg.s.inDLSAP.ackOpt = FALSE;
cfg.t.cfg.s.inDLSAP.intType = USER;
@ -772,15 +776,13 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
cfg.t.cfg.s.inDLSAP.tmr.t307.val = 35;
cfg.t.cfg.s.inDLSAP.tmr.t308.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t308.val = 4;
cfg.t.cfg.s.inDLSAP.tmr.t310.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t310.val = 120;
if (signal_data->signalling == SNGISDN_SIGNALING_NET) {
cfg.t.cfg.s.inDLSAP.tmr.t310.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t310.val = 10;
cfg.t.cfg.s.inDLSAP.tmr.t312.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t312.val = cfg.t.cfg.s.inDLSAP.tmr.t303.val+2;
} else {
cfg.t.cfg.s.inDLSAP.tmr.t310.enb = TRUE;
cfg.t.cfg.s.inDLSAP.tmr.t310.val = 120;
cfg.t.cfg.s.inDLSAP.tmr.t312.enb = FALSE;
}
@ -846,7 +848,7 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
cfg.t.cfg.s.inDLSAP.dChannelNum = 0; /* Unused for BRI */
cfg.t.cfg.s.inDLSAP.nmbBearChan = NUM_BRI_CHANNELS_PER_SPAN;
cfg.t.cfg.s.inDLSAP.firstBChanNum = 1;
cfg.t.cfg.s.inDLSAP.callRefLen = 1;
cfg.t.cfg.s.inDLSAP.callRefLen = 1;
cfg.t.cfg.s.inDLSAP.teiAlloc = IN_STATIC;
cfg.t.cfg.s.inDLSAP.intCfg = IN_INTCFG_PTPT;
break;
@ -902,7 +904,14 @@ ftdm_status_t sngisdn_stack_cfg_q931_lce(ftdm_span_t *span)
cfg.t.cfg.s.inLCe.sapId = signal_data->dchan_id;
cfg.t.cfg.s.inLCe.lnkUpDwnInd = TRUE;
if (span->trunk_type == FTDM_TRUNK_BRI_PTMP) {
/* Stack will send Restart CFM's each time link is established (TEI negotiated),
and we do not want thi s event */
cfg.t.cfg.s.inLCe.lnkUpDwnInd = FALSE;
} else {
cfg.t.cfg.s.inLCe.lnkUpDwnInd = TRUE;
}
cfg.t.cfg.s.inLCe.tCon.enb = TRUE;
cfg.t.cfg.s.inLCe.tCon.val = 35;
cfg.t.cfg.s.inLCe.tDisc.enb = TRUE;

View File

@ -1178,7 +1178,16 @@ void sngisdn_process_rst_cfm (sngisdn_event_data_t *sngisdn_event)
ftdm_log(FTDM_LOG_CRIT, "Received RESTART CFM on unconfigured span (suId:%d)\n", suId);
return;
}
ftdm_log(FTDM_LOG_DEBUG, "%s: Processing RESTART CFM (suId:%u dChan:%d ces:%d %s(%d))\n",
signal_data->ftdm_span->name,
suId, dChan, ces,
(evntType == IN_LNK_DWN)?"LNK_DOWN":
(evntType == IN_LNK_UP)?"LNK_UP":
(evntType == IN_INDCHAN)?"b-channel":
(evntType == IN_LNK_DWN_DM_RLS)?"NFAS service procedures":
(evntType == IN_SWCHD_BU_DCHAN)?"NFAS switchover to backup":"Unknown", evntType);
if (rstEvnt->rstInd.eh.pres == PRSNT_NODEF && rstEvnt->rstInd.rstClass.pres == PRSNT_NODEF) {
switch(rstEvnt->rstInd.rstClass.val) {
case IN_CL_INDCHAN: /* Indicated b-channel */
@ -1212,19 +1221,29 @@ void sngisdn_process_rst_cfm (sngisdn_event_data_t *sngisdn_event)
}
if (chan_no) { /* For a single channel */
if (chan_no > ftdm_span_get_chan_count(signal_data->ftdm_span)) {
ftdm_log(FTDM_LOG_CRIT, "Received RESTART on invalid channel:%d\n", chan_no);
} else {
ftdm_channel_t *ftdmchan = ftdm_span_get_channel(signal_data->ftdm_span, chan_no);
sngisdn_bring_down(ftdmchan);
ftdm_iterator_t *chaniter = NULL;
ftdm_iterator_t *curr = NULL;
chaniter = ftdm_span_get_chan_iterator(signal_data->ftdm_span, NULL);
for (curr = chaniter; curr; curr = ftdm_iterator_next(curr)) {
ftdm_channel_t *ftdmchan = (ftdm_channel_t*)ftdm_iterator_current(curr);
sngisdn_chan_data_t *sngisdn_info = (sngisdn_chan_data_t*) ftdmchan->call_data;
if (sngisdn_info->ces == ces && ftdmchan->physical_chan_id == chan_no) {
sngisdn_bring_down(ftdmchan);
}
}
ftdm_iterator_free(chaniter);
} else { /* for all channels */
ftdm_iterator_t *chaniter = NULL;
ftdm_iterator_t *curr = NULL;
chaniter = ftdm_span_get_chan_iterator(signal_data->ftdm_span, NULL);
for (curr = chaniter; curr; curr = ftdm_iterator_next(curr)) {
sngisdn_bring_down((ftdm_channel_t*)ftdm_iterator_current(curr));
ftdm_channel_t *ftdmchan = (ftdm_channel_t*)ftdm_iterator_current(curr);
sngisdn_chan_data_t *sngisdn_info = (sngisdn_chan_data_t*) ftdmchan->call_data;
if (sngisdn_info->ces == ces) {
sngisdn_bring_down(ftdmchan);
}
}
ftdm_iterator_free(chaniter);
}
@ -1305,28 +1324,29 @@ void sngisdn_process_rst_ind (sngisdn_event_data_t *sngisdn_event)
}
if (chan_no) { /* For a single channel */
if (chan_no > ftdm_span_get_chan_count(signal_data->ftdm_span)) {
ftdm_log(FTDM_LOG_CRIT, "Received RESTART IND on invalid channel:%d\n", chan_no);
} else {
ftdm_iterator_t *chaniter = NULL;
ftdm_iterator_t *curr = NULL;
chaniter = ftdm_span_get_chan_iterator(signal_data->ftdm_span, NULL);
for (curr = chaniter; curr; curr = ftdm_iterator_next(curr)) {
ftdm_channel_t *ftdmchan = (ftdm_channel_t*)ftdm_iterator_current(curr);
if (ftdmchan->physical_chan_id == chan_no) {
sngisdn_bring_down(ftdmchan);
}
ftdm_iterator_t *chaniter = NULL;
ftdm_iterator_t *curr = NULL;
chaniter = ftdm_span_get_chan_iterator(signal_data->ftdm_span, NULL);
for (curr = chaniter; curr; curr = ftdm_iterator_next(curr)) {
ftdm_channel_t *ftdmchan = (ftdm_channel_t*)ftdm_iterator_current(curr);
sngisdn_chan_data_t *sngisdn_info = (sngisdn_chan_data_t*) ftdmchan->call_data;
if (sngisdn_info->ces == ces && ftdmchan->physical_chan_id == chan_no) {
sngisdn_bring_down(ftdmchan);
}
ftdm_iterator_free(chaniter);
}
ftdm_iterator_free(chaniter);
} else { /* for all channels */
ftdm_iterator_t *chaniter = NULL;
ftdm_iterator_t *curr = NULL;
chaniter = ftdm_span_get_chan_iterator(signal_data->ftdm_span, NULL);
for (curr = chaniter; curr; curr = ftdm_iterator_next(curr)) {
sngisdn_bring_down((ftdm_channel_t*)ftdm_iterator_current(curr));
ftdm_channel_t *ftdmchan = (ftdm_channel_t*)ftdm_iterator_current(curr);
sngisdn_chan_data_t *sngisdn_info = (sngisdn_chan_data_t*) ftdmchan->call_data;
if (sngisdn_info->ces == ces) {
sngisdn_bring_down(ftdmchan);
}
}
ftdm_iterator_free(chaniter);
}

View File

@ -69,6 +69,8 @@ void sngisdn_snd_setup(ftdm_channel_t *ftdmchan)
set_calling_subaddr(ftdmchan, &conEvnt.cgPtySad);
set_redir_num(ftdmchan, &conEvnt.redirNmb);
set_calling_name(ftdmchan, &conEvnt);
/* set_facility_ie will overwrite Calling Name for NI-2 if user specifies custom Facility IE */
set_facility_ie(ftdmchan, &conEvnt.facilityStr);
set_prog_ind_ie(ftdmchan, &conEvnt.progInd, prog_ind);

View File

@ -897,12 +897,19 @@ int16_t sngisdn_rcv_l1_data_req(uint16_t spId, sng_l1_frame_t *l1_frame)
do {
flags = FTDM_WRITE;
status = signal_data->dchan->fio->wait(signal_data->dchan, &flags, 1000);
if (status != FTDM_SUCCESS) {
ftdm_log_chan_msg(signal_data->dchan, FTDM_LOG_WARNING, "transmit timed-out\n");
return -1;
switch(status) {
case FTDM_SUCCESS:
break;
case FTDM_TIMEOUT:
continue;
case FTDM_FAIL:
default:
ftdm_log_chan_msg(signal_data->dchan, FTDM_LOG_WARNING, "failed to poll for channel\n");
return -1;
}
/* status = FTDM_SUCCESS */
if ((flags & FTDM_WRITE)) {
#if 0
int i;
@ -990,27 +997,29 @@ void sngisdn_rcv_sng_log(uint8_t level, char *fmt,...)
switch (level) {
case SNG_LOGLEVEL_DEBUG:
ftdm_log(FTDM_LOG_DEBUG, "sng_isdn->%s", data);
ftdm_log(FTDM_LOG_DEBUG, "sng_isdn->%s\n", data);
break;
case SNG_LOGLEVEL_WARN:
ftdm_log(FTDM_LOG_INFO, "sng_isdn->%s", data);
if ( strncmp(data, "Invalid Q.921/Q.931 frame", 25) ) {
ftdm_log(FTDM_LOG_INFO, "sng_isdn->%s", data);
}
break;
case SNG_LOGLEVEL_INFO:
ftdm_log(FTDM_LOG_INFO, "sng_isdn->%s", data);
ftdm_log(FTDM_LOG_INFO, "sng_isdn->%s\n", data);
break;
case SNG_LOGLEVEL_STATS:
ftdm_log(FTDM_LOG_INFO, "sng_isdn->%s", data);
ftdm_log(FTDM_LOG_INFO, "sng_isdn->%s\n", data);
break;
case SNG_LOGLEVEL_ERROR:
ftdm_log(FTDM_LOG_ERROR, "sng_isdn->%s", data);
ftdm_log(FTDM_LOG_ERROR, "sng_isdn->%s\n", data);
/*ftdm_assert(0, "Got an error from stack");*/
break;
case SNG_LOGLEVEL_CRIT:
ftdm_log(FTDM_LOG_CRIT, "sng_isdn->%s", data);
ftdm_log(FTDM_LOG_CRIT, "sng_isdn->%s\n", data);
/* ftdm_assert(0, "Got an error from stack"); */
break;
default:
ftdm_log(FTDM_LOG_INFO, "sng_isdn->%s", data);
ftdm_log(FTDM_LOG_INFO, "sng_isdn->%s\n", data);
break;
}
ftdm_safe_free(data);

View File

@ -567,7 +567,7 @@ ftdm_status_t set_calling_num2(ftdm_channel_t *ftdmchan, CgPtyNmb *cgPtyNmb)
ftdm_caller_data_t *caller_data = &ftdmchan->caller_data;
string = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.cg_pty2.digits");
if ((string == NULL) || !(*string)) {
if (ftdm_strlen_zero(string)) {
return FTDM_FAIL;
}
@ -696,63 +696,71 @@ ftdm_status_t set_redir_num(ftdm_channel_t *ftdmchan, RedirNmb *redirNmb)
ftdm_status_t set_calling_name(ftdm_channel_t *ftdmchan, ConEvnt *conEvnt)
{
uint8_t len;
ftdm_caller_data_t *caller_data = &ftdmchan->caller_data;
/* sngisdn_chan_data_t *sngisdn_info = ftdmchan->call_data; */
const char *string = NULL;
ftdm_caller_data_t *caller_data = &ftdmchan->caller_data;
sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) ftdmchan->span->signal_data;
ftdm_bool_t force_send_cid_name = FTDM_FALSE;
len = strlen(caller_data->cid_name);
if (!len) {
return FTDM_SUCCESS;
}
if (ftdmchan->span->trunk_type == FTDM_TRUNK_BRI ||
ftdmchan->span->trunk_type == FTDM_TRUNK_BRI_PTMP) {
conEvnt->usrUsr.eh.pres = PRSNT_NODEF;
conEvnt->usrUsr.protocolDisc.pres = PRSNT_NODEF;
conEvnt->usrUsr.protocolDisc.val = PD_IA5; /* IA5 chars */
conEvnt->usrUsr.usrInfo.pres = PRSNT_NODEF;
conEvnt->usrUsr.usrInfo.len = len;
/* in sangoma_brid we used to send usr-usr info as <cid_name>!<calling_number>,
change to previous style if current one does not work */
memcpy(conEvnt->usrUsr.usrInfo.val, caller_data->cid_name, len);
} else {
switch (signal_data->switchtype) {
case SNGISDN_SWITCH_NI2:
/* TODO: Need to send the caller ID as a facility IE */
break;
case SNGISDN_SWITCH_EUROISDN:
if (signal_data->signalling != SNGISDN_SIGNALING_NET) {
break;
}
/* follow through */
case SNGISDN_SWITCH_5ESS:
case SNGISDN_SWITCH_4ESS:
conEvnt->display.dispInfo.pres = PRSNT_NODEF;
conEvnt->display.dispInfo.len = len;
memcpy(conEvnt->display.dispInfo.val, caller_data->cid_name, len);
break;
case SNGISDN_SWITCH_DMS100:
conEvnt->ntDisplay[0].eh.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].dispTypeNt.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].dispTypeNt.val = 0x01; /* Calling Party Name */
conEvnt->ntDisplay[0].assocInfo.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].assocInfo.val = 0x03; /* Included */
conEvnt->ntDisplay[0].eh.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].eh.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].dispInfo.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].dispInfo.len = len;
memcpy(conEvnt->ntDisplay[0].dispInfo.val, caller_data->cid_name, len);
break;
case SNGISDN_SWITCH_QSIG:
/* It seems like QSIG does not support Caller ID Name */
break;
case SNGISDN_SWITCH_INSNET:
/* Don't know how to transmit caller ID name on INSNET */
break;
string = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.send_cid_name");
if (!ftdm_strlen_zero(string)) {
if (!strcasecmp(string, "no")) {
return FTDM_SUCCESS;
} else if (!strcasecmp(string, "yes")) {
force_send_cid_name = FTDM_TRUE;
}
}
if (force_send_cid_name == FTDM_FALSE && signal_data->send_cid_name == SNGISDN_OPT_FALSE) {
return FTDM_SUCCESS;
}
switch(signal_data->cid_name_method) {
case SNGISDN_CID_NAME_FACILITY_IE:
#ifdef SNGISDN_SUPPORT_CALLING_NAME_IN_FACILITY
/* Note: The Facility IE will be overwritten if user chose to transmit a Raw Facility IE */
sng_isdn_encode_facility_caller_name(caller_data->cid_name, conEvnt->facilityStr.facilityStr.val, &conEvnt->facilityStr.facilityStr.len);
conEvnt->facilityStr.eh.pres = PRSNT_NODEF;
conEvnt->facilityStr.facilityStr.pres = PRSNT_NODEF;
#endif
break;
case SNGISDN_CID_NAME_USR_USR_IE:
conEvnt->usrUsr.eh.pres = PRSNT_NODEF;
conEvnt->usrUsr.protocolDisc.pres = PRSNT_NODEF;
conEvnt->usrUsr.protocolDisc.val = PD_IA5; /* IA5 chars */
conEvnt->usrUsr.usrInfo.pres = PRSNT_NODEF;
conEvnt->usrUsr.usrInfo.len = len;
/* in sangoma_brid we used to send usr-usr info as <cid_name>!<calling_number>,
change to previous style if current one does not work */
memcpy(conEvnt->usrUsr.usrInfo.val, caller_data->cid_name, len);
break;
case SNGISDN_CID_NAME_DISPLAY_IE:
if (signal_data->switchtype == SNGISDN_SWITCH_DMS100) {
conEvnt->ntDisplay[0].eh.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].dispTypeNt.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].dispTypeNt.val = 0x01; /* Calling Party Name */
conEvnt->ntDisplay[0].assocInfo.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].assocInfo.val = 0x03; /* Included */
conEvnt->ntDisplay[0].eh.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].eh.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].dispInfo.pres = PRSNT_NODEF;
conEvnt->ntDisplay[0].dispInfo.len = len;
memcpy(conEvnt->ntDisplay[0].dispInfo.val, caller_data->cid_name, len);
} else {
conEvnt->display.eh.pres = PRSNT_NODEF;
conEvnt->display.dispInfo.pres = PRSNT_NODEF;
conEvnt->display.dispInfo.len = len;
memcpy(conEvnt->display.dispInfo.val, caller_data->cid_name, len);
}
break;
default:
break;
}
return FTDM_SUCCESS;
}
@ -760,7 +768,7 @@ ftdm_status_t set_calling_subaddr(ftdm_channel_t *ftdmchan, CgPtySad *cgPtySad)
{
const char* clg_subaddr = NULL;
clg_subaddr = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.calling_subaddr");
if ((clg_subaddr != NULL) && (*clg_subaddr)) {
if (!ftdm_strlen_zero(clg_subaddr)) {
unsigned len = strlen (clg_subaddr);
cgPtySad->eh.pres = PRSNT_NODEF;
cgPtySad->typeSad.pres = 1;

View File

@ -249,6 +249,34 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
SS7_DEBUG_CHAN(ftdmchan, "No Location Number information in IAM%s\n", " ");
}
/* Retrieve the Location Number if present (see ITU Q.763, 3.30) */
if (siConEvnt->cgPtyNum1.eh.pres) {
if (siConEvnt->cgPtyNum1.addrSig.pres) {
/* fill in the ss7 location address number */
copy_tknStr_from_sngss7(siConEvnt->cgPtyNum1.addrSig, var, siConEvnt->cgPtyNum1.oddEven);
sngss7_add_var(sngss7_info, "ss7_loc_digits", var);
}
if (siConEvnt->cgPtyNum1.scrnInd.pres) {
/* fill in the screening indication value */
sprintf(var, "%d", siConEvnt->cgPtyNum1.scrnInd.val);
sngss7_add_var(sngss7_info, "ss7_loc_screen_ind", var);
}
if (siConEvnt->cgPtyNum1.presRest.pres) {
/* fill in the presentation value */
sprintf(var, "%d", siConEvnt->cgPtyNum1.presRest.val);
sngss7_add_var(sngss7_info, "ss7_loc_pres_ind", var);
}
if (siConEvnt->cgPtyNum1.natAddrInd.pres) {
sprintf(var, "%d", siConEvnt->cgPtyNum1.natAddrInd.val);
sngss7_add_var(sngss7_info, "ss7_loc_nadi", var);
}
} else {
SS7_DEBUG_CHAN(ftdmchan, "No Location Number information in IAM%s\n", " ");
}
sprintf(var, "%d", sngss7_info->circuit->cic);
sngss7_add_var(sngss7_info, "ss7_cic", var);
@ -256,11 +284,10 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_add_var(sngss7_info, "ss7_opc", var);
if (siConEvnt->callRef.callId.pres) {
/* %x expect an unsigned int so as callId is a U32, casting to uint32_t
* is safe */
sprintf(var, "%x", (uint32_t)siConEvnt->callRef.callId.val);
sngss7_add_var(sngss7_info, "ss7_callref", var);
}
ftdmchan->caller_data.call_reference = (unsigned int)siConEvnt->callRef.callId.val;
} else {
ftdmchan->caller_data.call_reference = 0;
}
if (sngss7_info->circuit->transparent_iam) {
sngss7_save_iam(ftdmchan, siConEvnt);

View File

@ -39,6 +39,11 @@
*
*/
#ifdef WP_DEBUG_IO
#define _BSD_SOURCE
#include <syscall.h>
#endif
#ifdef __sun
#include <unistd.h>
#include <stropts.h>
@ -99,6 +104,17 @@ static struct {
uint32_t ring_off_ms;
} wp_globals;
typedef struct {
sangoma_wait_obj_t *waitobj;
#ifdef WP_DEBUG_IO
/* record the last reader threads */
pid_t readers[10];
int rindex;
ftdm_time_t last_read;
#endif
} wp_channel_t;
#define WP_GET_WAITABLE(fchan) ((wp_channel_t *)((fchan)->io_data))->waitobj
/* a bunch of this stuff should go into the wanpipe_tdm_api_iface.h */
FIO_SPAN_POLL_EVENT_FUNCTION(wanpipe_poll_event);
@ -123,7 +139,7 @@ static __inline__ int tdmv_api_wait_socket(ftdm_channel_t *ftdmchan, int timeout
int err;
uint32_t inflags = *flags;
uint32_t outflags = 0;
sangoma_wait_obj_t *sangoma_wait_obj = ftdmchan->io_data;
sangoma_wait_obj_t *sangoma_wait_obj = WP_GET_WAITABLE(ftdmchan);
if (timeout == -1) {
timeout = SANGOMA_WAIT_INFINITE;
@ -254,9 +270,13 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start
}
if (ftdm_span_add_channel(span, sockfd, type, &chan) == FTDM_SUCCESS) {
wp_channel_t *wpchan = NULL;
wanpipe_tdm_api_t tdm_api;
memset(&tdm_api, 0, sizeof(tdm_api));
#ifdef LIBSANGOMA_VERSION
wpchan = ftdm_calloc(1, sizeof(*wpchan));
ftdm_assert(wpchan != NULL, "wpchan alloc failed\n");
chan->io_data = wpchan;
/* we need SANGOMA_DEVICE_WAIT_OBJ_SIG and not SANGOMA_DEVICE_WAIT_OBJ alone because we need to call
* sangoma_wait_obj_sig to wake up any I/O waiters when closing the channel (typically on ftdm shutdown)
* this adds an extra pair of file descriptors to the waitable object
@ -266,7 +286,7 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start
ftdm_log(FTDM_LOG_ERROR, "failure create waitable object for s%dc%d\n", spanno, x);
continue;
}
chan->io_data = sangoma_wait_obj;
WP_GET_WAITABLE(chan) = sangoma_wait_obj;
#endif
chan->physical_span_id = spanno;
@ -580,9 +600,16 @@ static FIO_OPEN_FUNCTION(wanpipe_open)
static FIO_CLOSE_FUNCTION(wanpipe_close)
{
#ifdef LIBSANGOMA_VERSION
sangoma_wait_obj_t *waitobj = ftdmchan->io_data;
sangoma_wait_obj_t *waitobj = WP_GET_WAITABLE(ftdmchan);
/* kick any I/O waiters */
sangoma_wait_obj_signal(waitobj);
#ifdef WP_DEBUG_IO
{
wp_channel_t *wchan = ftdmchan->io_data;
memset(wchan->readers, 0, sizeof(wchan->readers));
wchan->rindex = 0;
}
#endif
#endif
return FTDM_SUCCESS;
}
@ -944,10 +971,44 @@ static void wanpipe_read_stats(ftdm_channel_t *ftdmchan, wp_tdm_api_rx_hdr_t *rx
static FIO_READ_FUNCTION(wanpipe_read)
{
int rx_len = 0;
int rq_len = (int)*datalen;
wp_tdm_api_rx_hdr_t hdrframe;
memset(&hdrframe, 0, sizeof(hdrframe));
#ifdef WP_DEBUG_IO
wp_channel_t *wchan = ftdmchan->io_data;
ftdm_time_t time_diff = 0;
pid_t previous_thread = 1;
pid_t current_thread = 0;
int previous_thread_index = 0;
previous_thread_index = wchan->rindex == 0 ? (ftdm_array_len(wchan->readers) - 1) : wchan->rindex - 1;
previous_thread = wchan->readers[previous_thread_index];
current_thread = syscall(SYS_gettid);
if (current_thread && current_thread != wchan->readers[wchan->rindex]) {
if (!wchan->readers[wchan->rindex]) {
wchan->readers[wchan->rindex] = current_thread;
/* first read */
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Initial reader thread is %d\n", current_thread);
previous_thread = current_thread;
} else {
previous_thread = wchan->readers[wchan->rindex];
ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Changed reader thread from %d to %d (rindex = %d)\n",
previous_thread, current_thread, wchan->rindex);
if (wchan->rindex == (ftdm_array_len(wchan->readers) - 1)) {
wchan->rindex = 0;
} else {
wchan->rindex++;
}
wchan->readers[wchan->rindex] = current_thread;
}
}
ftdm_time_t curr = ftdm_current_time_in_ms();
if (wchan->last_read) {
time_diff = curr - wchan->last_read;
}
#endif
memset(&hdrframe, 0, sizeof(hdrframe));
rx_len = sangoma_readmsg_tdm(ftdmchan->sockfd, &hdrframe, (int)sizeof(hdrframe), data, (int)*datalen, 0);
*datalen = rx_len;
@ -957,14 +1018,20 @@ static FIO_READ_FUNCTION(wanpipe_read)
}
if (rx_len < 0) {
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "%s", strerror(errno));
ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Failed to read from sangoma device: %s (%d)\n", strerror(errno), rx_len);
#ifdef WP_DEBUG_IO
ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Failed to read %d bytes from sangoma device: %s (%d) "
"(read time diff = %llums, prev thread = %d, curr thread = %d)\n", rq_len, strerror(errno), rx_len,
time_diff, previous_thread, current_thread);
#else
ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Failed to read %d bytes from sangoma device: %s (%d)\n", rq_len, strerror(errno), rx_len);
#endif
return FTDM_FAIL;
}
if (ftdm_channel_test_feature(ftdmchan, FTDM_CHANNEL_FEATURE_IO_STATS)) {
wanpipe_read_stats(ftdmchan, &hdrframe);
}
return FTDM_SUCCESS;
}
@ -1110,7 +1177,7 @@ FIO_SPAN_POLL_EVENT_FUNCTION(wanpipe_poll_event)
if (!ftdmchan->io_data) {
continue; /* should never happen but happens when shutting down */
}
pfds[j] = ftdmchan->io_data;
pfds[j] = WP_GET_WAITABLE(ftdmchan);
inflags[j] = chan_events;
#else
memset(&pfds[j], 0, sizeof(pfds[j]));
@ -1572,10 +1639,10 @@ static FIO_CHANNEL_DESTROY_FUNCTION(wanpipe_channel_destroy)
{
#ifdef LIBSANGOMA_VERSION
if (ftdmchan->io_data) {
sangoma_wait_obj_t *sangoma_wait_obj;
sangoma_wait_obj = ftdmchan->io_data;
ftdmchan->io_data = NULL;
sangoma_wait_obj_t *sangoma_wait_obj = WP_GET_WAITABLE(ftdmchan);
sangoma_wait_obj_delete(&sangoma_wait_obj);
ftdm_safe_free(ftdmchan->io_data);
ftdmchan->io_data = NULL;
}
#endif
@ -1606,7 +1673,8 @@ static FIO_CHANNEL_DESTROY_FUNCTION(wanpipe_channel_destroy)
*/
static FIO_IO_LOAD_FUNCTION(wanpipe_init)
{
assert(fio != NULL);
ftdm_assert(fio != NULL, "fio should not be null\n");
memset(&wanpipe_interface, 0, sizeof(wanpipe_interface));
wp_globals.codec_ms = 20;

View File

@ -29,6 +29,12 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Contributors:
*
* Moises Silva <moy@sangoma.com>
* W McRoberts <fs@whmcr.com>
*
*/
#include "private/ftdm_core.h"
@ -94,6 +100,7 @@ struct ioctl_codes {
ioctlcmd ECHOTRAIN;
ioctlcmd SETTXBITS;
ioctlcmd GETRXBITS;
ioctlcmd SETPOLARITY;
};
/**
@ -169,7 +176,8 @@ static struct ioctl_codes dahdi_ioctl_codes = {
.GETCONFMUTE = DAHDI_GETCONFMUTE,
.ECHOTRAIN = DAHDI_ECHOTRAIN,
.SETTXBITS = DAHDI_SETTXBITS,
.GETRXBITS = DAHDI_GETRXBITS
.GETRXBITS = DAHDI_GETRXBITS,
.SETPOLARITY = DAHDI_SETPOLARITY
};
#define ZT_INVALID_SOCKET -1
@ -248,7 +256,7 @@ static void zt_build_gains(struct zt_gains *g, float rxgain, float txgain, int c
}
/**
* \brief Initialises a range of ftdmtel channels
* \brief Initialises a range of Zaptel/DAHDI channels
* \param span FreeTDM span
* \param start Initial wanpipe channel number
* \param end Final wanpipe channel number
@ -341,7 +349,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f
}
if (ioctl(CONTROL_FD, codes.CHANCONFIG, &cc)) {
ftdm_log(FTDM_LOG_WARNING, "this ioctl fails on older ftdmtel but is harmless if you used ztcfg\n[device %s chan %d fd %d (%s)]\n", chanpath, x, CONTROL_FD, strerror(errno));
ftdm_log(FTDM_LOG_WARNING, "this ioctl fails in older zaptel but is harmless if you used ztcfg\n[device %s chan %d fd %d (%s)]\n", chanpath, x, CONTROL_FD, strerror(errno));
}
}
@ -445,7 +453,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f
}
/**
* \brief Initialises an freetdm ftdmtel span from a configuration string
* \brief Initialises a freetdm Zaptel/DAHDI span from a configuration string
* \param span FreeTDM span
* \param str Configuration string
* \param type FreeTDM span type
@ -515,7 +523,7 @@ static FIO_CONFIGURE_SPAN_FUNCTION(zt_configure_span)
}
/**
* \brief Process configuration variable for a ftdmtel profile
* \brief Process configuration variable for a Zaptel/DAHDI profile
* \param category Wanpipe profile name
* \param var Variable name
* \param val Variable value
@ -593,7 +601,7 @@ static FIO_CONFIGURE_FUNCTION(zt_configure)
}
/**
* \brief Opens a ftdmtel channel
* \brief Opens a Zaptel/DAHDI channel
* \param ftdmchan Channel to open
* \return Success or failure
*/
@ -663,7 +671,7 @@ static FIO_OPEN_FUNCTION(zt_open)
}
/**
* \brief Closes ftdmtel channel
* \brief Closes Zaptel/DAHDI channel
* \param ftdmchan Channel to close
* \return Success
*/
@ -681,7 +689,7 @@ static FIO_CLOSE_FUNCTION(zt_close)
}
/**
* \brief Executes an FreeTDM command on a ftdmtel channel
* \brief Executes a FreeTDM command on a Zaptel/DAHDI channel
* \param ftdmchan Channel to execute command on
* \param command FreeTDM command to execute
* \param obj Object (unused)
@ -826,6 +834,15 @@ static FIO_COMMAND_FUNCTION(zt_command)
err = ioctl(ftdmchan->sockfd, codes.FLUSH, &flushmode);
}
break;
case FTDM_COMMAND_SET_POLARITY:
{
ftdm_polarity_t polarity = FTDM_COMMAND_OBJ_INT;
err = ioctl(ftdmchan->sockfd, codes.SETPOLARITY, polarity);
if (!err) {
ftdmchan->polarity = polarity;
}
}
break;
case FTDM_COMMAND_FLUSH_RX_BUFFERS:
{
int flushmode = ZT_FLUSH_READ;
@ -853,7 +870,7 @@ static FIO_COMMAND_FUNCTION(zt_command)
}
/**
* \brief Gets alarms from a ftdmtel Channel
* \brief Gets alarms from a Zaptel/DAHDI channel
* \param ftdmchan Channel to get alarms from
* \return Success or failure
*/
@ -876,7 +893,7 @@ static FIO_GET_ALARMS_FUNCTION(zt_get_alarms)
}
/**
* \brief Waits for an event on a ftdmtel channel
* \brief Waits for an event on a Zaptel/DAHDI channel
* \param ftdmchan Channel to open
* \param flags Type of event to wait for
* \param to Time to wait (in ms)
@ -950,7 +967,7 @@ pollagain:
}
/**
* \brief Checks for events on a ftdmtel span
* \brief Checks for events on a Zaptel/DAHDI span
* \param span Span to check for events
* \param ms Time to wait for event
* \return Success if event is waiting or failure if not
@ -1088,6 +1105,12 @@ static __inline__ ftdm_status_t zt_channel_process_event(ftdm_channel_t *fchan,
*event_id = FTDM_OOB_NOOP; /* What else could we do? */
}
break;
case ZT_EVENT_POLARITY:
{
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "Got polarity reverse (ZT_EVENT_POLARITY)\n");
*event_id = FTDM_OOB_POLARITY_REVERSE;
}
break;
case ZT_EVENT_NONE:
{
ftdm_log_chan_msg(fchan, FTDM_LOG_DEBUG, "No event\n");
@ -1141,7 +1164,7 @@ FIO_CHANNEL_NEXT_EVENT_FUNCTION(zt_channel_next_event)
}
/**
* \brief Retrieves an event from a ftdmtel span
* \brief Retrieves an event from a Zaptel/DAHDI span
* \param span Span to retrieve event from
* \param event FreeTDM event to return
* \return Success or failure
@ -1181,7 +1204,7 @@ FIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event)
}
/**
* \brief Reads data from a ftdmtel channel
* \brief Reads data from a Zaptel/DAHDI channel
* \param ftdmchan Channel to read from
* \param data Data buffer
* \param datalen Size of data buffer
@ -1223,7 +1246,7 @@ static FIO_READ_FUNCTION(zt_read)
}
/**
* \brief Writes data to a ftdmtel channel
* \brief Writes data to a Zaptel/DAHDI channel
* \param ftdmchan Channel to write to
* \param data Data buffer
* \param datalen Size of data buffer
@ -1262,7 +1285,7 @@ tryagain:
}
/**
* \brief Destroys a ftdmtel Channel
* \brief Destroys a Zaptel/DAHDI Channel
* \param ftdmchan Channel to destroy
* \return Success
*/
@ -1275,12 +1298,12 @@ static FIO_CHANNEL_DESTROY_FUNCTION(zt_channel_destroy)
}
/**
* \brief Global FreeTDM IO interface for ftdmtel
* \brief Global FreeTDM IO interface for Zaptel/DAHDI
*/
static ftdm_io_interface_t zt_interface;
/**
* \brief Loads ftdmtel IO module
* \brief Loads Zaptel/DAHDI IO module
* \param fio FreeTDM IO interface
* \return Success or failure
*/
@ -1335,7 +1358,7 @@ static FIO_IO_LOAD_FUNCTION(zt_init)
}
/**
* \brief Unloads ftdmtel IO module
* \brief Unloads Zaptel/DAHDI IO module
* \return Success
*/
static FIO_IO_UNLOAD_FUNCTION(zt_destroy)
@ -1346,7 +1369,7 @@ static FIO_IO_UNLOAD_FUNCTION(zt_destroy)
}
/**
* \brief FreeTDM ftdmtel IO module definition
* \brief FreeTDM Zaptel/DAHDI IO module definition
*/
ftdm_module_t ftdm_module = {
"zt",

View File

@ -29,6 +29,12 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Contributors:
*
* Moises Silva <moy@sangoma.com>
* W McRoberts <fs@whmcr.com>
*
*/
#ifndef FTDM_ZT_H
@ -349,6 +355,7 @@ ZT_ABIT = 8
#define DAHDI_SETTXBITS _IOW (DAHDI_CODE, 43, int)
#define DAHDI_GETRXBITS _IOR (DAHDI_CODE, 43, int)
#define DAHDI_SETPOLARITY _IOW (DAHDI_CODE, 92, int) /* Polarity setting for FXO lines */
#endif

View File

@ -928,20 +928,20 @@ typedef enum {
/*! \brief IO statistics */
typedef struct {
struct {
uint64_t packets;
uint32_t errors;
uint16_t flags;
uint8_t queue_size; /*!< max queue size configured */
uint8_t queue_len; /*!< Current number of elements in queue */
uint64_t packets;
} rx;
struct {
uint64_t idle_packets;
uint64_t packets;
uint32_t errors;
uint16_t flags;
uint8_t idle_packets;
uint8_t queue_size; /*!< max queue size configured */
uint8_t queue_len; /*!< Current number of elements in queue */
uint64_t packets;
} tx;
} ftdm_channel_iostats_t;

View File

@ -4,10 +4,10 @@
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mftilla Public License Version
* 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.mftilla.org/MPL/
* 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
@ -33,8 +33,8 @@
* Exception:
* The author hereby grants the use of this source code under the
* following license if and only if the source code is distributed
* as part of the freetdm library. Any use or distribution of this
* source code outside the scope of the freetdm library will nullify the
* as part of the OpenZAP or FreeTDM library. Any use or distribution of this
* source code outside the scope of the OpenZAP or FreeTDM library will nullify the
* following license and reinact the MPL 1.1 as stated above.
*
* Copyright (c) 2007, Anthony Minessale II

Some files were not shown because too many files have changed in this diff Show More