forked from Mirrors/freeswitch
Merge remote-tracking branch 'fsorig/master'
Conflicts: src/mod/endpoints/mod_sofia/mod_sofia.c src/mod/endpoints/mod_sofia/sofia_glue.c
This commit is contained in:
commit
b004bcfc6d
@ -300,7 +300,7 @@ endif
|
||||
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_LDADD = libfreeswitch.la -lcrypt -lrt
|
||||
|
||||
##
|
||||
## tone2wav ()
|
||||
@ -308,7 +308,7 @@ fs_encode_LDADD = libfreeswitch.la
|
||||
tone2wav_SOURCES = src/tone2wav.c
|
||||
tone2wav_CFLAGS = $(AM_CFLAGS)
|
||||
tone2wav_LDFLAGS = $(AM_LDFLAGS) $(CORE_LIBS)
|
||||
tone2wav_LDADD = libfreeswitch.la
|
||||
tone2wav_LDADD = libfreeswitch.la -lcrypt -lrt
|
||||
|
||||
##
|
||||
## fs_ivrd ()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -2,6 +2,7 @@ loggers/mod_console
|
||||
loggers/mod_logfile
|
||||
loggers/mod_syslog
|
||||
#applications/mod_cidlookup
|
||||
#applications/mod_blacklist
|
||||
applications/mod_commands
|
||||
applications/mod_conference
|
||||
applications/mod_dptools
|
||||
@ -38,6 +39,7 @@ applications/mod_valet_parking
|
||||
#applications/mod_fsk
|
||||
#applications/mod_ladspa
|
||||
#applications/mod_mongo
|
||||
applications/mod_sms
|
||||
codecs/mod_g723_1
|
||||
codecs/mod_amr
|
||||
#codecs/mod_amrwb
|
||||
@ -81,6 +83,7 @@ event_handlers/mod_event_socket
|
||||
#event_handlers/mod_event_zmq
|
||||
event_handlers/mod_cdr_csv
|
||||
event_handlers/mod_cdr_sqlite
|
||||
#event_handlers/mod_cdr_mongodb
|
||||
#event_handlers/mod_cdr_pg_csv
|
||||
#event_handlers/mod_radius_cdr
|
||||
#event_handlers/mod_erlang_event
|
||||
|
@ -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();
|
||||
|
11
conf/autoload_configs/blacklist.conf.xml
Normal file
11
conf/autoload_configs/blacklist.conf.xml
Normal 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>
|
13
conf/autoload_configs/cdr_mongodb.conf.xml
Normal file
13
conf/autoload_configs/cdr_mongodb.conf.xml
Normal 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>
|
@ -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 -->
|
||||
|
0
conf/autoload_configs/local_stream.conf.xml
Executable file → Normal file
0
conf/autoload_configs/local_stream.conf.xml
Executable file → Normal 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>
|
||||
|
14
conf/chatplan/default.xml
Normal file
14
conf/chatplan/default.xml
Normal 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>
|
@ -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">
|
||||
|
@ -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"/>
|
||||
|
@ -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">
|
||||
|
@ -8,4 +8,78 @@
|
||||
</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>
|
||||
|
||||
</include>
|
||||
|
@ -32,6 +32,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"/>
|
||||
|
@ -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"/>-->
|
||||
|
@ -102,6 +102,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"/>-->
|
||||
<!--
|
||||
|
14
configure.in
14
configure.in
@ -428,7 +428,7 @@ case "$host" in
|
||||
fi
|
||||
;;
|
||||
*-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)
|
||||
;;
|
||||
@ -474,7 +474,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])
|
||||
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])
|
||||
|
||||
@ -871,7 +871,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 +884,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])
|
||||
|
110
docs/ChangeLog
110
docs/ChangeLog
@ -26,6 +26,10 @@ 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)
|
||||
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
|
||||
@ -279,10 +283,38 @@ 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)
|
||||
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)
|
||||
@ -294,6 +326,7 @@ freeswitch (1.0.7)
|
||||
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)
|
||||
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,6 +357,7 @@ 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)
|
||||
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)
|
||||
@ -342,6 +376,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,9 +390,15 @@ 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)
|
||||
@ -425,6 +470,9 @@ 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_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 +513,7 @@ 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_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 +524,9 @@ 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_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 +544,11 @@ 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_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,6 +562,7 @@ 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_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)
|
||||
@ -526,6 +583,7 @@ 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_file_string: Fix segfault when using file string in conference (r:9c40e8e9/FS-3122)
|
||||
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)
|
||||
@ -596,6 +654,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 +666,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 +674,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 +686,9 @@ 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_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
|
||||
@ -648,6 +711,9 @@ freeswitch (1.0.7)
|
||||
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_radius_cdr: Add 'Freeswitch-Direction' av pair (r:a5170df0)
|
||||
@ -658,6 +724,14 @@ 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_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 +759,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 +789,9 @@ 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_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 +975,31 @@ 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_soundtouch: updated soundtouch to library 1.5.0 to fix gcc > 4.3 incompatibilities (r:dfb5c629)
|
||||
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 +1019,8 @@ 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_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 +1040,7 @@ 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_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,6 +1058,10 @@ 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_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)
|
||||
|
@ -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="" filename=""/>
|
||||
<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:
|
||||
-->
|
||||
|
@ -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>
|
||||
|
126
freeswitch-sounds-music.spec
Normal file
126
freeswitch-sounds-music.spec
Normal 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
|
@ -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"
|
||||
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
|
||||
@ -803,6 +809,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 +888,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*
|
||||
@ -928,6 +941,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*
|
||||
|
927
libs/.gitignore
vendored
927
libs/.gitignore
vendored
File diff suppressed because it is too large
Load Diff
@ -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 $@
|
||||
|
1032
libs/esl/fs_cli.c
1032
libs/esl/fs_cli.c
File diff suppressed because it is too large
Load Diff
@ -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 ;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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},
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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 ;
|
||||
|
@ -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;
|
||||
|
@ -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},
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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},
|
||||
|
@ -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);
|
||||
|
@ -534,6 +534,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] = "";
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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 */
|
||||
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
ftmod_misdn_la_LDFLAGS = -shared -module -avoid-version
|
||||
ftmod_misdn_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
|
||||
dox doxygen:
|
||||
doxygen $(FT_SRCDIR)/docs/Doxygen.conf
|
||||
|
||||
|
@ -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"/>-->
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)])],
|
||||
@ -364,6 +367,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 +428,7 @@ AC_MSG_RESULT([
|
||||
ftmod_pritap....................... ${HAVE_PRITAP}
|
||||
I/O:
|
||||
ftmod_wanpipe...................... ${HAVE_LIBSANGOMA}
|
||||
ftmod_misdn........................ ${HAVE_MISDN}
|
||||
|
||||
===============================================================================
|
||||
])
|
||||
|
76
libs/freetdm/docs/ftdm-open-issues.txt
Normal file
76
libs/freetdm/docs/ftdm-open-issues.txt
Normal 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.
|
||||
|
||||
|
@ -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,7 +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;
|
||||
const char *name = NULL;
|
||||
int span_id = 0;
|
||||
int chan_id = 0;
|
||||
int 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);
|
||||
@ -503,13 +519,64 @@ 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);
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
@ -520,7 +587,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 {
|
||||
@ -548,9 +614,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) {
|
||||
@ -558,6 +621,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;
|
||||
}
|
||||
|
||||
@ -629,6 +693,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);
|
||||
@ -636,17 +701,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.......
|
||||
@ -678,7 +744,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;
|
||||
}
|
||||
|
||||
@ -686,7 +752,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;
|
||||
}
|
||||
|
||||
@ -694,7 +760,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;
|
||||
}
|
||||
}
|
||||
@ -707,9 +773,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 {
|
||||
@ -725,23 +791,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)
|
||||
@ -750,8 +816,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);
|
||||
@ -759,7 +826,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;
|
||||
}
|
||||
|
||||
@ -768,17 +845,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);
|
||||
@ -793,16 +863,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 {
|
||||
@ -812,7 +882,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;
|
||||
|
||||
@ -2374,7 +2444,6 @@ static FIO_SIGNAL_CB_FUNCTION(on_clear_channel_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);
|
||||
}
|
||||
}
|
||||
@ -3025,6 +3094,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;
|
||||
@ -3106,6 +3176,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")) {
|
||||
@ -3168,6 +3240,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,
|
||||
@ -3794,16 +3867,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++) {
|
||||
@ -3880,19 +4088,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;
|
||||
}
|
||||
|
||||
@ -3907,34 +4116,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]);
|
||||
@ -3954,8 +4165,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;
|
||||
@ -3964,12 +4174,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];
|
||||
@ -4032,28 +4241,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;
|
||||
}
|
||||
|
||||
@ -4062,21 +4272,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;
|
||||
@ -4114,8 +4324,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;
|
||||
@ -4125,19 +4334,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;
|
||||
}
|
||||
}
|
||||
@ -4162,31 +4371,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);
|
||||
@ -4197,12 +4408,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;
|
||||
@ -4212,18 +4423,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;
|
||||
}
|
||||
}
|
||||
@ -4251,8 +4463,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;
|
||||
@ -4260,8 +4471,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;
|
||||
}
|
||||
|
||||
@ -4273,14 +4485,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;
|
||||
}
|
||||
}
|
||||
@ -4300,8 +4513,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;
|
||||
@ -4311,21 +4523,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) {
|
||||
@ -4379,8 +4594,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;
|
||||
@ -4389,20 +4603,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);
|
||||
@ -4420,14 +4634,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[] =
|
||||
{
|
||||
@ -4443,7 +4655,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 */
|
||||
@ -4452,6 +4664,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;
|
||||
@ -4484,7 +4701,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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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,18 @@ 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] = { digit_char, 0};
|
||||
|
||||
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 +4576,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;
|
||||
}
|
||||
|
||||
@ -5468,10 +5476,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 */
|
||||
@ -5561,6 +5565,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);
|
||||
@ -5774,6 +5786,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);
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -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"
|
||||
@ -339,8 +368,78 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
|
||||
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 invalid span.\n", __FILE__);
|
||||
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 invalid span.\n", __FILE__);
|
||||
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 invalid span.\n", __FILE__);
|
||||
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 invalid span.\n", __FILE__);
|
||||
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 invalid span.\n", __FILE__);
|
||||
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 invalid span.\n", __FILE__);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
stream->write_function(stream, "%s: -ERR invalid command.\n", __FILE__);
|
||||
|
||||
done:
|
||||
@ -1780,6 +1879,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 +1938,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 +2270,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);
|
||||
|
@ -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;
|
||||
};
|
||||
|
1807
libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c
Normal file
1807
libs/freetdm/src/ftmod/ftmod_misdn/ftmod_misdn.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -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);
|
||||
|
||||
|
@ -719,12 +719,19 @@ ftdm_status_t set_calling_name(ftdm_channel_t *ftdmchan, ConEvnt *conEvnt)
|
||||
} else {
|
||||
switch (signal_data->switchtype) {
|
||||
case SNGISDN_SWITCH_NI2:
|
||||
/* TODO: Need to send the caller ID as a facility IE */
|
||||
|
||||
#ifdef SNGISDN_SUPPORT_CALLING_NAME_IN_FACILITY
|
||||
{
|
||||
if (signal_data->signalling == SNGISDN_SIGNALING_NET) {
|
||||
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_SWITCH_EUROISDN:
|
||||
if (signal_data->signalling != SNGISDN_SIGNALING_NET) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
/* follow through */
|
||||
case SNGISDN_SWITCH_5ESS:
|
||||
|
@ -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;
|
||||
}
|
||||
@ -950,10 +977,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;
|
||||
|
||||
@ -963,14 +1024,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;
|
||||
}
|
||||
|
||||
@ -1116,7 +1183,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]));
|
||||
@ -1578,10 +1645,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
|
||||
|
||||
@ -1612,7 +1679,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;
|
||||
|
@ -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
|
||||
@ -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;
|
||||
@ -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");
|
||||
|
@ -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
|
||||
|
||||
|
@ -926,20 +926,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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -2,13 +2,60 @@
|
||||
* libteletone
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is tone_detect.c - General telephony tone detection, and specific detection of DTMF.
|
||||
*
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Stephen Underwood <steveu@coppice.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* The the original interface designed by Steve Underwood was preserved to retain
|
||||
*the optimizations when considering DTMF tones though the names were changed in the interest
|
||||
* of namespace.
|
||||
*
|
||||
* Much less efficient expansion interface was added to allow for the detection of
|
||||
* a single arbitrary tone combination which may also exceed 2 simultaneous tones.
|
||||
* (controlled by compile time constant TELETONE_MAX_TONES)
|
||||
*
|
||||
* Copyright (C) 2006 Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
*
|
||||
* libteletone_detect.c Tone Detection Code
|
||||
*
|
||||
*
|
||||
*********************************************************************************
|
||||
*
|
||||
* Derived from tone_detect.h - General telephony tone detection, and specific
|
||||
* detection of DTMF.
|
||||
*
|
||||
* Copyright (C) 2001 Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Despite my general liking of the GPL, I place this code in the
|
||||
* public domain for the benefit of all mankind - even the slimy
|
||||
* ones who might try to proprietize my work and use it to my
|
||||
* detriment.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
@ -41,20 +88,6 @@
|
||||
* 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.
|
||||
*
|
||||
*********************************************************************************
|
||||
*
|
||||
* Derived from tone_detect.h - General telephony tone detection, and specific
|
||||
* detection of DTMF.
|
||||
*
|
||||
* Copyright (C) 2001 Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Despite my general liking of the GPL, I place this code in the
|
||||
* public domain for the benefit of all mankind - even the slimy
|
||||
* ones who might try to proprietize my work and use it to my
|
||||
* detriment.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBTELETONE_DETECT_H
|
||||
@ -101,6 +134,14 @@ extern "C" {
|
||||
#define BLOCK_LEN 102
|
||||
#define M_TWO_PI 2.0*M_PI
|
||||
|
||||
typedef enum {
|
||||
TT_HIT_NONE = 0,
|
||||
TT_HIT_BEGIN = 1,
|
||||
TT_HIT_MIDDLE = 2,
|
||||
TT_HIT_END = 3
|
||||
} teletone_hit_type_t;
|
||||
|
||||
|
||||
/*! \brief A continer for the elements of a Goertzel Algorithm (The names are from his formula) */
|
||||
typedef struct {
|
||||
float v2;
|
||||
@ -114,16 +155,19 @@ extern "C" {
|
||||
int hit2;
|
||||
int hit3;
|
||||
int hit4;
|
||||
int mhit;
|
||||
int dur;
|
||||
int zc;
|
||||
|
||||
|
||||
teletone_goertzel_state_t row_out[GRID_FACTOR];
|
||||
teletone_goertzel_state_t col_out[GRID_FACTOR];
|
||||
teletone_goertzel_state_t row_out2nd[GRID_FACTOR];
|
||||
teletone_goertzel_state_t col_out2nd[GRID_FACTOR];
|
||||
float energy;
|
||||
float lenergy;
|
||||
|
||||
int current_sample;
|
||||
char digits[TELETONE_MAX_DTMF_DIGITS + 1];
|
||||
char digit;
|
||||
int current_digits;
|
||||
int detected_digits;
|
||||
int lost_digits;
|
||||
@ -196,7 +240,7 @@ TELETONE_API(void) teletone_dtmf_detect_init (teletone_dtmf_detect_state_t *dtmf
|
||||
\param samples the number of samples present in sample_buffer
|
||||
\return true when DTMF was detected or false when it is not
|
||||
*/
|
||||
TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
TELETONE_API(teletone_hit_type_t) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
int16_t sample_buffer[],
|
||||
int samples);
|
||||
/*!
|
||||
@ -206,9 +250,7 @@ TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detec
|
||||
\param max the maximum length of buf
|
||||
\return the number of characters written to buf
|
||||
*/
|
||||
TELETONE_API(int) teletone_dtmf_get (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
char *buf,
|
||||
int max);
|
||||
TELETONE_API(int) teletone_dtmf_get (teletone_dtmf_detect_state_t *dtmf_detect_state, char *buf, unsigned int *dur);
|
||||
|
||||
/*!
|
||||
\brief Step through the Goertzel Algorithm for each sample in a buffer
|
||||
|
@ -2,6 +2,41 @@
|
||||
* libteletone
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is libteletone
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
*
|
||||
* libteletone.h -- Tone Generator
|
||||
*
|
||||
*
|
||||
*
|
||||
* 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 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
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -2,14 +2,62 @@
|
||||
* libteletone
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is tone_detect.c - General telephony tone detection, and specific detection of DTMF.
|
||||
*
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Stephen Underwood <steveu@coppice.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* The the original interface designed by Steve Underwood was preserved to retain
|
||||
*the optimizations when considering DTMF tones though the names were changed in the interest
|
||||
* of namespace.
|
||||
*
|
||||
* Much less efficient expansion interface was added to allow for the detection of
|
||||
* a single arbitrary tone combination which may also exceed 2 simultaneous tones.
|
||||
* (controlled by compile time constant TELETONE_MAX_TONES)
|
||||
*
|
||||
* Copyright (C) 2006 Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
*
|
||||
* libteletone_detect.c Tone Detection Code
|
||||
*
|
||||
*
|
||||
*********************************************************************************
|
||||
*
|
||||
* Derived from tone_detect.c - General telephony tone detection, and specific
|
||||
* detection of DTMF.
|
||||
*
|
||||
* Copyright (C) 2001 Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Despite my general liking of the GPL, I place this code in the
|
||||
* public domain for the benefit of all mankind - even the slimy
|
||||
* ones who might try to proprietize my work and use it to my
|
||||
* detriment.
|
||||
*
|
||||
*
|
||||
* 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 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
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -40,21 +88,6 @@
|
||||
* 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.
|
||||
*
|
||||
*********************************************************************************
|
||||
*
|
||||
* Derived from tone_detect.c - General telephony tone detection, and specific
|
||||
* detection of DTMF.
|
||||
*
|
||||
* Copyright (C) 2001 Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Despite my general liking of the GPL, I place this code in the
|
||||
* public domain for the benefit of all mankind - even the slimy
|
||||
* ones who might try to proprietize my work and use it to my
|
||||
* detriment.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include <libteletone_detect.h>
|
||||
@ -67,7 +100,8 @@
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
#define LOW_ENG 10000000
|
||||
#define ZC 2
|
||||
static teletone_detection_descriptor_t dtmf_detect_row[GRID_FACTOR];
|
||||
static teletone_detection_descriptor_t dtmf_detect_col[GRID_FACTOR];
|
||||
static teletone_detection_descriptor_t dtmf_detect_row_2nd[GRID_FACTOR];
|
||||
@ -132,8 +166,8 @@ TELETONE_API(void) teletone_dtmf_detect_init (teletone_dtmf_detect_state_t *dtmf
|
||||
dtmf_detect_state->current_sample = 0;
|
||||
dtmf_detect_state->detected_digits = 0;
|
||||
dtmf_detect_state->lost_digits = 0;
|
||||
dtmf_detect_state->digits[0] = '\0';
|
||||
dtmf_detect_state->mhit = 0;
|
||||
dtmf_detect_state->digit = 0;
|
||||
dtmf_detect_state->dur = 0;
|
||||
}
|
||||
|
||||
TELETONE_API(void) teletone_multi_tone_init(teletone_multi_tone_t *mt, teletone_tone_map_t *map)
|
||||
@ -266,7 +300,7 @@ TELETONE_API(int) teletone_multi_tone_detect (teletone_multi_tone_t *mt,
|
||||
}
|
||||
|
||||
|
||||
TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
TELETONE_API(teletone_hit_type_t) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
int16_t sample_buffer[],
|
||||
int samples)
|
||||
{
|
||||
@ -281,6 +315,7 @@ TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detec
|
||||
int best_col;
|
||||
char hit;
|
||||
int limit;
|
||||
teletone_hit_type_t r = 0;
|
||||
|
||||
hit = 0;
|
||||
for (sample = 0; sample < samples; sample = limit) {
|
||||
@ -317,6 +352,32 @@ TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detec
|
||||
|
||||
}
|
||||
|
||||
if (dtmf_detect_state->zc > 0) {
|
||||
if (dtmf_detect_state->energy < LOW_ENG && dtmf_detect_state->lenergy < LOW_ENG) {
|
||||
if (!--dtmf_detect_state->zc) {
|
||||
/* Reinitialise the detector for the next block */
|
||||
dtmf_detect_state->hit1 = dtmf_detect_state->hit2 = 0;
|
||||
for (i = 0; i < GRID_FACTOR; i++) {
|
||||
goertzel_init (&dtmf_detect_state->row_out[i], &dtmf_detect_row[i]);
|
||||
goertzel_init (&dtmf_detect_state->col_out[i], &dtmf_detect_col[i]);
|
||||
goertzel_init (&dtmf_detect_state->row_out2nd[i], &dtmf_detect_row_2nd[i]);
|
||||
goertzel_init (&dtmf_detect_state->col_out2nd[i], &dtmf_detect_col_2nd[i]);
|
||||
}
|
||||
dtmf_detect_state->dur -= samples;
|
||||
return TT_HIT_END;
|
||||
}
|
||||
}
|
||||
|
||||
dtmf_detect_state->dur += samples;
|
||||
dtmf_detect_state->lenergy = dtmf_detect_state->energy;
|
||||
dtmf_detect_state->energy = 0.0;
|
||||
dtmf_detect_state->current_sample = 0;
|
||||
return TT_HIT_MIDDLE;
|
||||
} else if (dtmf_detect_state->digit) {
|
||||
return TT_HIT_END;
|
||||
}
|
||||
|
||||
|
||||
dtmf_detect_state->current_sample += (limit - sample);
|
||||
if (dtmf_detect_state->current_sample < BLOCK_LEN) {
|
||||
continue;
|
||||
@ -361,58 +422,55 @@ TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detec
|
||||
back to back differing digits. More importantly, it
|
||||
can work with nasty phones that give a very wobbly start
|
||||
to a digit. */
|
||||
if (hit == dtmf_detect_state->hit3 && dtmf_detect_state->hit3 != dtmf_detect_state->hit2) {
|
||||
dtmf_detect_state->mhit = hit;
|
||||
if (! r && hit == dtmf_detect_state->hit3 && dtmf_detect_state->hit3 != dtmf_detect_state->hit2) {
|
||||
dtmf_detect_state->digit_hits[(best_row << 2) + best_col]++;
|
||||
dtmf_detect_state->detected_digits++;
|
||||
if (dtmf_detect_state->current_digits < TELETONE_MAX_DTMF_DIGITS) {
|
||||
dtmf_detect_state->digits[dtmf_detect_state->current_digits++] = hit;
|
||||
dtmf_detect_state->digits[dtmf_detect_state->current_digits] = '\0';
|
||||
dtmf_detect_state->digit = hit;
|
||||
} else {
|
||||
dtmf_detect_state->lost_digits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dtmf_detect_state->lost_digits++;
|
||||
}
|
||||
|
||||
if (!dtmf_detect_state->zc) {
|
||||
dtmf_detect_state->zc = ZC;
|
||||
dtmf_detect_state->dur = 0;
|
||||
r = TT_HIT_BEGIN;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dtmf_detect_state->hit1 = dtmf_detect_state->hit2;
|
||||
dtmf_detect_state->hit2 = dtmf_detect_state->hit3;
|
||||
dtmf_detect_state->hit3 = hit;
|
||||
/* Reinitialise the detector for the next block */
|
||||
for (i = 0; i < GRID_FACTOR; i++) {
|
||||
goertzel_init (&dtmf_detect_state->row_out[i], &dtmf_detect_row[i]);
|
||||
goertzel_init (&dtmf_detect_state->col_out[i], &dtmf_detect_col[i]);
|
||||
goertzel_init (&dtmf_detect_state->row_out2nd[i], &dtmf_detect_row_2nd[i]);
|
||||
goertzel_init (&dtmf_detect_state->col_out2nd[i], &dtmf_detect_col_2nd[i]);
|
||||
}
|
||||
|
||||
dtmf_detect_state->energy = 0.0;
|
||||
dtmf_detect_state->current_sample = 0;
|
||||
|
||||
}
|
||||
if ((!dtmf_detect_state->mhit) || (dtmf_detect_state->mhit != hit)) {
|
||||
dtmf_detect_state->mhit = 0;
|
||||
return(0);
|
||||
}
|
||||
return (hit);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
TELETONE_API(int) teletone_dtmf_get (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
char *buf,
|
||||
int max)
|
||||
TELETONE_API(int) teletone_dtmf_get (teletone_dtmf_detect_state_t *dtmf_detect_state, char *buf, unsigned int *dur)
|
||||
{
|
||||
teletone_assert(dtmf_detect_state->current_digits <= TELETONE_MAX_DTMF_DIGITS);
|
||||
if (!dtmf_detect_state->digit) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (max > dtmf_detect_state->current_digits) {
|
||||
max = dtmf_detect_state->current_digits;
|
||||
*buf = dtmf_detect_state->digit;
|
||||
|
||||
*dur = dtmf_detect_state->dur;
|
||||
|
||||
if (!dtmf_detect_state->zc) {
|
||||
dtmf_detect_state->dur = 0;
|
||||
dtmf_detect_state->digit = 0;
|
||||
}
|
||||
if (max > 0) {
|
||||
memcpy (buf, dtmf_detect_state->digits, max);
|
||||
memmove (dtmf_detect_state->digits, dtmf_detect_state->digits + max, dtmf_detect_state->current_digits - max);
|
||||
dtmf_detect_state->current_digits -= max;
|
||||
}
|
||||
buf[max] = '\0';
|
||||
return max;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
|
@ -1,5 +1,41 @@
|
||||
/*
|
||||
* libteletone_generate.c -- Tone Generator
|
||||
* libteletone
|
||||
* Copyright (C) 2005-2011, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is libteletone
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
*
|
||||
* libteletone.c -- Tone Generator
|
||||
*
|
||||
*
|
||||
*
|
||||
* 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 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
|
||||
* All rights reserved.
|
||||
@ -34,7 +70,6 @@
|
||||
*/
|
||||
|
||||
#include <libteletone.h>
|
||||
#include "private/ftdm_core.h"
|
||||
|
||||
#define SMAX 32767
|
||||
#define SMIN -32768
|
||||
@ -111,7 +146,7 @@ TELETONE_API(int) teletone_init_session(teletone_generation_session_t *ts, int b
|
||||
ts->decay_step = 0;
|
||||
ts->decay_factor = 1;
|
||||
if (buflen) {
|
||||
if ((ts->buffer = ftdm_calloc(buflen, sizeof(teletone_audio_t))) == 0) {
|
||||
if ((ts->buffer = calloc(buflen, sizeof(teletone_audio_t))) == 0) {
|
||||
return -1;
|
||||
}
|
||||
ts->datalen = buflen;
|
||||
@ -142,7 +177,7 @@ TELETONE_API(int) teletone_init_session(teletone_generation_session_t *ts, int b
|
||||
TELETONE_API(int) teletone_destroy_session(teletone_generation_session_t *ts)
|
||||
{
|
||||
if (ts->buffer) {
|
||||
ftdm_safe_free(ts->buffer);
|
||||
free(ts->buffer);
|
||||
ts->buffer = NULL;
|
||||
ts->samples = 0;
|
||||
}
|
||||
@ -270,6 +305,19 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
|
||||
return ts->samples / ts->channels;
|
||||
}
|
||||
|
||||
/* don't ask */
|
||||
static char *my_strdup (const char *s)
|
||||
{
|
||||
size_t len = strlen (s) + 1;
|
||||
void *new = malloc (len);
|
||||
|
||||
if (new == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (char *) memcpy (new, s, len);
|
||||
}
|
||||
|
||||
TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cmd)
|
||||
{
|
||||
char *data = NULL, *cur = NULL, *end = NULL;
|
||||
@ -280,7 +328,7 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
|
||||
}
|
||||
|
||||
do {
|
||||
if (!(data = ftdm_strdup(cmd))) {
|
||||
if (!(data = my_strdup(cmd))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -363,6 +411,9 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
|
||||
*e++ = '\0';
|
||||
}
|
||||
do {
|
||||
if (!p) {
|
||||
break;
|
||||
}
|
||||
if ((next = strchr(p, ',')) != 0) {
|
||||
*next++ = '\0';
|
||||
}
|
||||
@ -427,7 +478,7 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
|
||||
}
|
||||
}
|
||||
bottom:
|
||||
ftdm_safe_free(data);
|
||||
free(data);
|
||||
data = NULL;
|
||||
if (ts->LOOPS > 0) {
|
||||
ts->LOOPS--;
|
||||
|
1407
libs/ldns/config.guess
vendored
1407
libs/ldns/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1504
libs/ldns/config.sub
vendored
1504
libs/ldns/config.sub
vendored
File diff suppressed because it is too large
Load Diff
17354
libs/ldns/configure
vendored
17354
libs/ldns/configure
vendored
File diff suppressed because it is too large
Load Diff
7
libs/ldns/drill/configure
vendored
7
libs/ldns/drill/configure
vendored
@ -673,12 +673,7 @@ CFLAGS
|
||||
LDFLAGS
|
||||
LIBS
|
||||
CPPFLAGS
|
||||
CPP
|
||||
CPPFLAGS
|
||||
CC
|
||||
LDFLAGS
|
||||
LIBS
|
||||
CPPFLAGS'
|
||||
CPP'
|
||||
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -467,4 +467,10 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#ifndef HAVE_STRTOUL
|
||||
#define strtoul (unsigned long)strtol
|
||||
#endif
|
||||
#ifdef HAVE_B64_PTON
|
||||
#define ldns_b64_pton b64_pton
|
||||
#endif
|
||||
#ifdef HAVE_B64_NTOP
|
||||
#define ldns_b64_ntop b64_ntop
|
||||
#endif
|
||||
|
||||
|
9687
libs/ldns/ltmain.sh
9687
libs/ldns/ltmain.sh
File diff suppressed because it is too large
Load Diff
@ -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 openzap library. Any use or distribution of this
|
||||
* source code outside the scope of the openzap 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
|
||||
|
@ -54,8 +54,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 openzap library. Any use or distribution of this
|
||||
* source code outside the scope of the openzap 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
|
||||
@ -100,7 +100,8 @@
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
#define LOW_ENG 10000000
|
||||
#define ZC 2
|
||||
static teletone_detection_descriptor_t dtmf_detect_row[GRID_FACTOR];
|
||||
static teletone_detection_descriptor_t dtmf_detect_col[GRID_FACTOR];
|
||||
static teletone_detection_descriptor_t dtmf_detect_row_2nd[GRID_FACTOR];
|
||||
@ -165,8 +166,8 @@ TELETONE_API(void) teletone_dtmf_detect_init (teletone_dtmf_detect_state_t *dtmf
|
||||
dtmf_detect_state->current_sample = 0;
|
||||
dtmf_detect_state->detected_digits = 0;
|
||||
dtmf_detect_state->lost_digits = 0;
|
||||
dtmf_detect_state->digits[0] = '\0';
|
||||
dtmf_detect_state->mhit = 0;
|
||||
dtmf_detect_state->digit = 0;
|
||||
dtmf_detect_state->dur = 0;
|
||||
}
|
||||
|
||||
TELETONE_API(void) teletone_multi_tone_init(teletone_multi_tone_t *mt, teletone_tone_map_t *map)
|
||||
@ -299,7 +300,7 @@ TELETONE_API(int) teletone_multi_tone_detect (teletone_multi_tone_t *mt,
|
||||
}
|
||||
|
||||
|
||||
TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
TELETONE_API(teletone_hit_type_t) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
int16_t sample_buffer[],
|
||||
int samples)
|
||||
{
|
||||
@ -314,6 +315,7 @@ TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detec
|
||||
int best_col;
|
||||
char hit;
|
||||
int limit;
|
||||
teletone_hit_type_t r = 0;
|
||||
|
||||
hit = 0;
|
||||
for (sample = 0; sample < samples; sample = limit) {
|
||||
@ -350,6 +352,32 @@ TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detec
|
||||
|
||||
}
|
||||
|
||||
if (dtmf_detect_state->zc > 0) {
|
||||
if (dtmf_detect_state->energy < LOW_ENG && dtmf_detect_state->lenergy < LOW_ENG) {
|
||||
if (!--dtmf_detect_state->zc) {
|
||||
/* Reinitialise the detector for the next block */
|
||||
dtmf_detect_state->hit1 = dtmf_detect_state->hit2 = 0;
|
||||
for (i = 0; i < GRID_FACTOR; i++) {
|
||||
goertzel_init (&dtmf_detect_state->row_out[i], &dtmf_detect_row[i]);
|
||||
goertzel_init (&dtmf_detect_state->col_out[i], &dtmf_detect_col[i]);
|
||||
goertzel_init (&dtmf_detect_state->row_out2nd[i], &dtmf_detect_row_2nd[i]);
|
||||
goertzel_init (&dtmf_detect_state->col_out2nd[i], &dtmf_detect_col_2nd[i]);
|
||||
}
|
||||
dtmf_detect_state->dur -= samples;
|
||||
return TT_HIT_END;
|
||||
}
|
||||
}
|
||||
|
||||
dtmf_detect_state->dur += samples;
|
||||
dtmf_detect_state->lenergy = dtmf_detect_state->energy;
|
||||
dtmf_detect_state->energy = 0.0;
|
||||
dtmf_detect_state->current_sample = 0;
|
||||
return TT_HIT_MIDDLE;
|
||||
} else if (dtmf_detect_state->digit) {
|
||||
return TT_HIT_END;
|
||||
}
|
||||
|
||||
|
||||
dtmf_detect_state->current_sample += (limit - sample);
|
||||
if (dtmf_detect_state->current_sample < BLOCK_LEN) {
|
||||
continue;
|
||||
@ -394,58 +422,55 @@ TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detec
|
||||
back to back differing digits. More importantly, it
|
||||
can work with nasty phones that give a very wobbly start
|
||||
to a digit. */
|
||||
if (hit == dtmf_detect_state->hit3 && dtmf_detect_state->hit3 != dtmf_detect_state->hit2) {
|
||||
dtmf_detect_state->mhit = hit;
|
||||
if (! r && hit == dtmf_detect_state->hit3 && dtmf_detect_state->hit3 != dtmf_detect_state->hit2) {
|
||||
dtmf_detect_state->digit_hits[(best_row << 2) + best_col]++;
|
||||
dtmf_detect_state->detected_digits++;
|
||||
if (dtmf_detect_state->current_digits < TELETONE_MAX_DTMF_DIGITS) {
|
||||
dtmf_detect_state->digits[dtmf_detect_state->current_digits++] = hit;
|
||||
dtmf_detect_state->digits[dtmf_detect_state->current_digits] = '\0';
|
||||
dtmf_detect_state->digit = hit;
|
||||
} else {
|
||||
dtmf_detect_state->lost_digits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dtmf_detect_state->lost_digits++;
|
||||
}
|
||||
|
||||
if (!dtmf_detect_state->zc) {
|
||||
dtmf_detect_state->zc = ZC;
|
||||
dtmf_detect_state->dur = 0;
|
||||
r = TT_HIT_BEGIN;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dtmf_detect_state->hit1 = dtmf_detect_state->hit2;
|
||||
dtmf_detect_state->hit2 = dtmf_detect_state->hit3;
|
||||
dtmf_detect_state->hit3 = hit;
|
||||
/* Reinitialise the detector for the next block */
|
||||
for (i = 0; i < GRID_FACTOR; i++) {
|
||||
goertzel_init (&dtmf_detect_state->row_out[i], &dtmf_detect_row[i]);
|
||||
goertzel_init (&dtmf_detect_state->col_out[i], &dtmf_detect_col[i]);
|
||||
goertzel_init (&dtmf_detect_state->row_out2nd[i], &dtmf_detect_row_2nd[i]);
|
||||
goertzel_init (&dtmf_detect_state->col_out2nd[i], &dtmf_detect_col_2nd[i]);
|
||||
}
|
||||
|
||||
dtmf_detect_state->energy = 0.0;
|
||||
dtmf_detect_state->current_sample = 0;
|
||||
|
||||
}
|
||||
if ((!dtmf_detect_state->mhit) || (dtmf_detect_state->mhit != hit)) {
|
||||
dtmf_detect_state->mhit = 0;
|
||||
return(0);
|
||||
}
|
||||
return (hit);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
TELETONE_API(int) teletone_dtmf_get (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
char *buf,
|
||||
int max)
|
||||
TELETONE_API(int) teletone_dtmf_get (teletone_dtmf_detect_state_t *dtmf_detect_state, char *buf, unsigned int *dur)
|
||||
{
|
||||
teletone_assert(dtmf_detect_state->current_digits <= TELETONE_MAX_DTMF_DIGITS);
|
||||
if (!dtmf_detect_state->digit) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (max > dtmf_detect_state->current_digits) {
|
||||
max = dtmf_detect_state->current_digits;
|
||||
*buf = dtmf_detect_state->digit;
|
||||
|
||||
*dur = dtmf_detect_state->dur;
|
||||
|
||||
if (!dtmf_detect_state->zc) {
|
||||
dtmf_detect_state->dur = 0;
|
||||
dtmf_detect_state->digit = 0;
|
||||
}
|
||||
if (max > 0) {
|
||||
memcpy (buf, dtmf_detect_state->digits, max);
|
||||
memmove (dtmf_detect_state->digits, dtmf_detect_state->digits + max, dtmf_detect_state->current_digits - max);
|
||||
dtmf_detect_state->current_digits -= max;
|
||||
}
|
||||
buf[max] = '\0';
|
||||
return max;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
|
@ -54,8 +54,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 openzap library. Any use or distribution of this
|
||||
* source code outside the scope of the openzap 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
|
||||
@ -134,6 +134,14 @@ extern "C" {
|
||||
#define BLOCK_LEN 102
|
||||
#define M_TWO_PI 2.0*M_PI
|
||||
|
||||
typedef enum {
|
||||
TT_HIT_NONE = 0,
|
||||
TT_HIT_BEGIN = 1,
|
||||
TT_HIT_MIDDLE = 2,
|
||||
TT_HIT_END = 3
|
||||
} teletone_hit_type_t;
|
||||
|
||||
|
||||
/*! \brief A continer for the elements of a Goertzel Algorithm (The names are from his formula) */
|
||||
typedef struct {
|
||||
float v2;
|
||||
@ -147,16 +155,19 @@ extern "C" {
|
||||
int hit2;
|
||||
int hit3;
|
||||
int hit4;
|
||||
int mhit;
|
||||
int dur;
|
||||
int zc;
|
||||
|
||||
|
||||
teletone_goertzel_state_t row_out[GRID_FACTOR];
|
||||
teletone_goertzel_state_t col_out[GRID_FACTOR];
|
||||
teletone_goertzel_state_t row_out2nd[GRID_FACTOR];
|
||||
teletone_goertzel_state_t col_out2nd[GRID_FACTOR];
|
||||
float energy;
|
||||
float lenergy;
|
||||
|
||||
int current_sample;
|
||||
char digits[TELETONE_MAX_DTMF_DIGITS + 1];
|
||||
char digit;
|
||||
int current_digits;
|
||||
int detected_digits;
|
||||
int lost_digits;
|
||||
@ -229,7 +240,7 @@ TELETONE_API(void) teletone_dtmf_detect_init (teletone_dtmf_detect_state_t *dtmf
|
||||
\param samples the number of samples present in sample_buffer
|
||||
\return true when DTMF was detected or false when it is not
|
||||
*/
|
||||
TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
TELETONE_API(teletone_hit_type_t) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
int16_t sample_buffer[],
|
||||
int samples);
|
||||
/*!
|
||||
@ -239,9 +250,7 @@ TELETONE_API(int) teletone_dtmf_detect (teletone_dtmf_detect_state_t *dtmf_detec
|
||||
\param max the maximum length of buf
|
||||
\return the number of characters written to buf
|
||||
*/
|
||||
TELETONE_API(int) teletone_dtmf_get (teletone_dtmf_detect_state_t *dtmf_detect_state,
|
||||
char *buf,
|
||||
int max);
|
||||
TELETONE_API(int) teletone_dtmf_get (teletone_dtmf_detect_state_t *dtmf_detect_state, char *buf, unsigned int *dur);
|
||||
|
||||
/*!
|
||||
\brief Step through the Goertzel Algorithm for each sample in a buffer
|
||||
|
@ -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 openzap library. Any use or distribution of this
|
||||
* source code outside the scope of the openzap 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
|
||||
|
@ -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 openzap library. Any use or distribution of this
|
||||
* source code outside the scope of the openzap 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
|
||||
|
@ -107,7 +107,10 @@ case "$host" in
|
||||
;;
|
||||
esac
|
||||
|
||||
DEFAULT_INCLUDES="-I. -I./src/include -I$(srcdir)"
|
||||
|
||||
AC_SUBST(SOLINK)
|
||||
AC_SUBST(DEFAULT_INCLUDES)
|
||||
AC_SUBST(DYNAMIC_LIB_EXTEN)
|
||||
|
||||
AC_CHECK_LIB([dl], [dlopen])
|
||||
|
@ -1,5 +1,4 @@
|
||||
|
||||
AM_CFLAGS = -Isrc -Iinterface -fPIC -Wall -O3
|
||||
AM_CFLAGS = -Isrc -Iinterface -fPIC -O3
|
||||
AUTOMAKE_OPTS = gnu
|
||||
NAME = libSKP_SILK_SDK
|
||||
AM_CPPFLAGS = $(AM_CFLAGS)
|
||||
@ -15,34 +14,32 @@ test/SignalCompare.vcproj
|
||||
|
||||
lib_LTLIBRARIES = libSKP_SILK_SDK.la
|
||||
libSKP_SILK_SDK_la_SOURCES = src/SKP_Silk_A2NLSF.c \
|
||||
src/SKP_Silk_allpass_int.c \
|
||||
src/SKP_Silk_ana_filt_bank_1.c \
|
||||
src/SKP_Silk_apply_sine_window.c \
|
||||
src/SKP_Silk_apply_sine_window_new.c \
|
||||
src/SKP_Silk_array_maxabs.c \
|
||||
src/SKP_Silk_autocorr.c \
|
||||
src/SKP_Silk_biquad_alt.c \
|
||||
src/SKP_Silk_biquad.c \
|
||||
src/SKP_Silk_biquad_alt.c \
|
||||
src/SKP_Silk_burg_modified.c \
|
||||
src/SKP_Silk_bwexpander_32.c \
|
||||
src/SKP_Silk_bwexpander.c \
|
||||
src/SKP_Silk_bwexpander_32.c \
|
||||
src/SKP_Silk_CNG.c \
|
||||
src/SKP_Silk_code_signs.c \
|
||||
src/SKP_Silk_control_audio_bandwidth.c \
|
||||
src/SKP_Silk_control_codec_FIX.c \
|
||||
src/SKP_Silk_corrMatrix_FIX.c \
|
||||
src/SKP_Silk_create_init_destroy.c \
|
||||
src/SKP_Silk_dec_API.c \
|
||||
src/SKP_Silk_decode_core.c \
|
||||
src/SKP_Silk_decode_frame.c \
|
||||
src/SKP_Silk_decode_indices_v4.c \
|
||||
src/SKP_Silk_decode_parameters.c \
|
||||
src/SKP_Silk_decode_parameters_v4.c \
|
||||
src/SKP_Silk_decode_pitch.c \
|
||||
src/SKP_Silk_decode_pulses.c \
|
||||
src/SKP_Silk_decoder_set_fs.c \
|
||||
src/SKP_Silk_detect_SWB_input.c \
|
||||
src/SKP_Silk_enc_API.c \
|
||||
src/SKP_Silk_encode_frame_FIX.c \
|
||||
src/SKP_Silk_encode_parameters.c \
|
||||
src/SKP_Silk_encode_parameters_v4.c \
|
||||
src/SKP_Silk_encode_pulses.c \
|
||||
src/SKP_Silk_find_LPC_FIX.c \
|
||||
src/SKP_Silk_find_LTP_FIX.c \
|
||||
@ -56,78 +53,75 @@ src/SKP_Silk_interpolate.c \
|
||||
src/SKP_Silk_k2a.c \
|
||||
src/SKP_Silk_k2a_Q16.c \
|
||||
src/SKP_Silk_LBRR_reset.c \
|
||||
src/SKP_Silk_lin2log.c \
|
||||
src/SKP_Silk_log2lin.c \
|
||||
src/SKP_Silk_lowpass_int.c \
|
||||
src/SKP_Silk_lowpass_short.c \
|
||||
src/SKP_Silk_LPC_inv_pred_gain.c \
|
||||
src/SKP_Silk_LPC_stabilize.c \
|
||||
src/SKP_Silk_LPC_synthesis_filter.c \
|
||||
src/SKP_Silk_LPC_synthesis_order16.c \
|
||||
src/SKP_Silk_LP_variable_cutoff.c \
|
||||
src/SKP_Silk_LSF_cos_table.c \
|
||||
src/SKP_Silk_LTP_analysis_filter_FIX.c \
|
||||
src/SKP_Silk_LTP_scale_ctrl_FIX.c \
|
||||
src/SKP_Silk_lin2log.c \
|
||||
src/SKP_Silk_log2lin.c \
|
||||
src/SKP_Silk_MA.c \
|
||||
src/SKP_Silk_NLSF2A.c \
|
||||
src/SKP_Silk_NLSF2A_stable.c \
|
||||
src/SKP_Silk_NLSF_MSVQ_decode.c \
|
||||
src/SKP_Silk_NLSF_MSVQ_encode_FIX.c \
|
||||
src/SKP_Silk_NLSF_stabilize.c \
|
||||
src/SKP_Silk_NLSF_VQ_rate_distortion_FIX.c \
|
||||
src/SKP_Silk_NLSF_VQ_sum_error_FIX.c \
|
||||
src/SKP_Silk_NLSF_VQ_weights_laroia.c \
|
||||
src/SKP_Silk_noise_shape_analysis_FIX.c \
|
||||
src/SKP_Silk_NLSF_stabilize.c \
|
||||
src/SKP_Silk_NSQ.c \
|
||||
src/SKP_Silk_NSQ_del_dec.c \
|
||||
src/SKP_Silk_noise_shape_analysis_FIX.c \
|
||||
src/SKP_Silk_PLC.c \
|
||||
src/SKP_Silk_pitch_analysis_core.c \
|
||||
src/SKP_Silk_pitch_est_tables.c \
|
||||
src/SKP_Silk_PLC.c \
|
||||
src/SKP_Silk_prefilter_FIX.c \
|
||||
src/SKP_Silk_process_gains_FIX.c \
|
||||
src/SKP_Silk_process_NLSFs_FIX.c \
|
||||
src/SKP_Silk_pulses_to_bytes.c \
|
||||
src/SKP_Silk_process_gains_FIX.c \
|
||||
src/SKP_Silk_quant_LTP_gains_FIX.c \
|
||||
src/SKP_Silk_range_coder.c \
|
||||
src/SKP_Silk_regularize_correlations_FIX.c \
|
||||
src/SKP_Silk_resample_1_2.c \
|
||||
src/SKP_Silk_resample_1_2_coarse.c \
|
||||
src/SKP_Silk_resample_1_2_coarsest.c \
|
||||
src/SKP_Silk_resample_1_3.c \
|
||||
src/SKP_Silk_resample_2_1_coarse.c \
|
||||
src/SKP_Silk_resample_2_3.c \
|
||||
src/SKP_Silk_resample_2_3_coarse.c \
|
||||
src/SKP_Silk_resample_2_3_coarsest.c \
|
||||
src/SKP_Silk_resample_2_3_rom.c \
|
||||
src/SKP_Silk_resample_3_1.c \
|
||||
src/SKP_Silk_resample_3_2.c \
|
||||
src/SKP_Silk_resample_3_2_rom.c \
|
||||
src/SKP_Silk_resample_3_4.c \
|
||||
src/SKP_Silk_resample_4_3.c \
|
||||
src/SKP_Silk_resampler.c \
|
||||
src/SKP_Silk_resampler_down2.c \
|
||||
src/SKP_Silk_resampler_down2_3.c \
|
||||
src/SKP_Silk_resampler_down3.c \
|
||||
src/SKP_Silk_resampler_private_AR2.c \
|
||||
src/SKP_Silk_resampler_private_ARMA4.c \
|
||||
src/SKP_Silk_resampler_private_IIR_FIR.c \
|
||||
src/SKP_Silk_resampler_private_copy.c \
|
||||
src/SKP_Silk_resampler_private_down4.c \
|
||||
src/SKP_Silk_resampler_private_down_FIR.c \
|
||||
src/SKP_Silk_resampler_private_up2_HQ.c \
|
||||
src/SKP_Silk_resampler_private_up4.c \
|
||||
src/SKP_Silk_resampler_rom.c \
|
||||
src/SKP_Silk_resampler_up2.c \
|
||||
src/SKP_Silk_residual_energy16_FIX.c \
|
||||
src/SKP_Silk_residual_energy_FIX.c \
|
||||
src/SKP_Silk_scale_copy_vector16.c \
|
||||
src/SKP_Silk_scale_vector.c \
|
||||
src/SKP_Silk_schur64.c \
|
||||
src/SKP_Silk_schur.c \
|
||||
src/SKP_Silk_schur64.c \
|
||||
src/SKP_Silk_shell_coder.c \
|
||||
src/SKP_Silk_sigm_Q15.c \
|
||||
src/SKP_Silk_solve_LS_FIX.c \
|
||||
src/SKP_Silk_sort.c \
|
||||
src/SKP_Silk_sum_sqr_shift.c \
|
||||
src/SKP_Silk_tables_gain.c \
|
||||
src/SKP_Silk_tables_LTP.c \
|
||||
src/SKP_Silk_tables_NLSF_CB0_10.c \
|
||||
src/SKP_Silk_tables_NLSF_CB0_16.c \
|
||||
src/SKP_Silk_tables_NLSF_CB1_10.c \
|
||||
src/SKP_Silk_tables_NLSF_CB1_16.c \
|
||||
src/SKP_Silk_tables_gain.c \
|
||||
src/SKP_Silk_tables_other.c \
|
||||
src/SKP_Silk_tables_pitch_lag.c \
|
||||
src/SKP_Silk_tables_pulses_per_block.c \
|
||||
src/SKP_Silk_tables_sign.c \
|
||||
src/SKP_Silk_tables_type_offset.c \
|
||||
src/SKP_Silk_VAD.c \
|
||||
src/SKP_Silk_VQ_nearest_neighbor_FIX.c
|
||||
src/SKP_Silk_VQ_nearest_neighbor_FIX.c \
|
||||
src/SKP_Silk_warped_autocorrelation_FIX.c
|
||||
|
||||
|
||||
libSKP_SILK_SDK_la_CFLAGS = $(AM_CFLAGS)
|
||||
@ -135,24 +129,26 @@ libSKP_SILK_SDK_la_LDFLAGS = $(LIBS)
|
||||
|
||||
library_includedir = $(prefix)/include/silk
|
||||
library_include_HEADERS = src/SKP_Silk_common_pitch_est_defines.h \
|
||||
src/SKP_Silk_define_FIX.h \
|
||||
src/SKP_Silk_define.h \
|
||||
src/SKP_Silk_Inlines.h \
|
||||
src/SKP_Silk_macros.h \
|
||||
src/SKP_Silk_main_FIX.h \
|
||||
src/SKP_Silk_main.h \
|
||||
src/SKP_Silk_perceptual_parameters_FIX.h \
|
||||
src/SKP_Silk_main_FIX.h \
|
||||
src/SKP_Silk_pitch_est_defines.h \
|
||||
src/SKP_Silk_PLC.h \
|
||||
src/SKP_Silk_resample_rom.h \
|
||||
src/SKP_Silk_resampler_private.h \
|
||||
src/SKP_Silk_resampler_rom.h \
|
||||
src/SKP_Silk_resampler_structs.h \
|
||||
src/SKP_Silk_SigProc_FIX.h \
|
||||
src/SKP_Silk_structs_FIX.h \
|
||||
src/SKP_Silk_setup_complexity.h \
|
||||
src/SKP_Silk_structs.h \
|
||||
src/SKP_Silk_structs_FIX.h \
|
||||
src/SKP_Silk_tables.h \
|
||||
src/SKP_Silk_tables_NLSF_CB0_10.h \
|
||||
src/SKP_Silk_tables_NLSF_CB0_16.h \
|
||||
src/SKP_Silk_tables_NLSF_CB1_10.h \
|
||||
src/SKP_Silk_tables_NLSF_CB1_16.h \
|
||||
src/SKP_Silk_tuning_parameters.h \
|
||||
interface/SKP_Silk_control.h \
|
||||
interface/SKP_Silk_errors.h \
|
||||
interface/SKP_Silk_SDK_API.h \
|
||||
|
@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.59])
|
||||
AC_INIT(libSKP_SILK_SDK, 1.0.2, brian@freeswitch.org, libSKP_SILK_SDK)
|
||||
AM_INIT_AUTOMAKE(libSKP_SILK_SDK,1.0.2)
|
||||
AC_INIT(libSKP_SILK_SDK, 1.0.8, brian@freeswitch.org, libSKP_SILK_SDK)
|
||||
AM_INIT_AUTOMAKE(libSKP_SILK_SDK,1.0.8)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -39,7 +39,7 @@ extern "C"
|
||||
|
||||
#define SILK_MAX_FRAMES_PER_PACKET 5
|
||||
|
||||
/* Struct for TOC (Table Of Contents) */
|
||||
/* Struct for TOC (Table of Contents) */
|
||||
typedef struct {
|
||||
SKP_int framesInPacket; /* Number of 20 ms frames in packet */
|
||||
SKP_int fs_kHz; /* Sampling frequency in packet */
|
||||
@ -85,7 +85,7 @@ SKP_int SKP_Silk_SDK_Encode(
|
||||
const SKP_int16 *samplesIn, /* I: Speech sample input vector */
|
||||
SKP_int nSamplesIn, /* I: Number of samples in input vector */
|
||||
SKP_uint8 *outData, /* O: Encoded output vector */
|
||||
SKP_int16 *nBytesOut /* I/O: Number of Bytes in outData (input: Max Bytes) */
|
||||
SKP_int16 *nBytesOut /* I/O: Number of bytes in outData (input: Max bytes) */
|
||||
);
|
||||
|
||||
/****************************************/
|
||||
@ -114,7 +114,7 @@ SKP_int SKP_Silk_SDK_Decode(
|
||||
SKP_SILK_SDK_DecControlStruct* decControl, /* I/O: Control Structure */
|
||||
SKP_int lostFlag, /* I: 0: no loss, 1 loss */
|
||||
const SKP_uint8 *inData, /* I: Encoded input vector */
|
||||
const SKP_int nBytesIn, /* I: Number of input Bytes */
|
||||
const SKP_int nBytesIn, /* I: Number of input bytes */
|
||||
SKP_int16 *samplesOut, /* O: Decoded output speech vector */
|
||||
SKP_int16 *nSamplesOut /* I/O: Number of samples (vector/decoded) */
|
||||
);
|
||||
@ -123,22 +123,20 @@ SKP_int SKP_Silk_SDK_Decode(
|
||||
/* Find Low Bit Rate Redundancy (LBRR) information in a packet */
|
||||
/***************************************************************/
|
||||
void SKP_Silk_SDK_search_for_LBRR(
|
||||
void *decState, /* I: Decoder state, to select bitstream version only */
|
||||
const SKP_uint8 *inData, /* I: Encoded input vector */
|
||||
const SKP_int16 nBytesIn, /* I: Number of input Bytes */
|
||||
const SKP_int nBytesIn, /* I: Number of input Bytes */
|
||||
SKP_int lost_offset, /* I: Offset from lost packet */
|
||||
SKP_uint8 *LBRRData, /* O: LBRR payload */
|
||||
SKP_int16 *nLBRRBytes /* O: Number of LBRR Bytes */
|
||||
);
|
||||
|
||||
/************************************/
|
||||
/* Get type of content for a packet */
|
||||
/************************************/
|
||||
/**************************************/
|
||||
/* Get table of contents for a packet */
|
||||
/**************************************/
|
||||
void SKP_Silk_SDK_get_TOC(
|
||||
void *decState, /* I: Decoder state, to select bitstream version only */
|
||||
const SKP_uint8 *inData, /* I: Encoded input vector */
|
||||
const SKP_int16 nBytesIn, /* I: Number of input bytes */
|
||||
SKP_Silk_TOC_struct *Silk_TOC /* O: Type of content */
|
||||
const SKP_int nBytesIn, /* I: Number of input bytes */
|
||||
SKP_Silk_TOC_struct *Silk_TOC /* O: Table of contents */
|
||||
);
|
||||
|
||||
/**************************/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -39,8 +39,11 @@ extern "C"
|
||||
/* Structure for controlling encoder operation */
|
||||
/***********************************************/
|
||||
typedef struct {
|
||||
/* I: Sampling rate in Hertz; 8000/12000/16000/24000 */
|
||||
SKP_int32 sampleRate;
|
||||
/* I: Input signal sampling rate in Hertz; 8000/12000/16000/24000 */
|
||||
SKP_int32 API_sampleRate;
|
||||
|
||||
/* I: Maximum internal sampling rate in Hertz; 8000/12000/16000/24000 */
|
||||
SKP_int32 maxInternalSampleRate;
|
||||
|
||||
/* I: Number of samples per packet; must be equivalent of 20, 40, 60, 80 or 100 ms */
|
||||
SKP_int packetSize;
|
||||
@ -48,7 +51,7 @@ typedef struct {
|
||||
/* I: Bitrate during active speech in bits/second; internally limited */
|
||||
SKP_int32 bitRate;
|
||||
|
||||
/* I: Uplink Packet loss in pct (0...100) */
|
||||
/* I: Uplink packet loss in percent (0-100) */
|
||||
SKP_int packetLossPercentage;
|
||||
|
||||
/* I: Complexity mode; 0 is lowest; 1 is medium and 2 is highest complexity */
|
||||
@ -57,7 +60,7 @@ typedef struct {
|
||||
/* I: Flag to enable in-band Forward Error Correction (FEC); 0/1 */
|
||||
SKP_int useInBandFEC;
|
||||
|
||||
/* I: Flag to enable Discontinous Transmission; 0/1 */
|
||||
/* I: Flag to enable discontinuous transmission (DTX); 0/1 */
|
||||
SKP_int useDTX;
|
||||
} SKP_SILK_SDK_EncControlStruct;
|
||||
|
||||
@ -65,8 +68,8 @@ typedef struct {
|
||||
/* Structure for controlling decoder operation and reading decoder status */
|
||||
/**************************************************************************/
|
||||
typedef struct {
|
||||
/* I: Sampling rate in Hertz; 8000/12000/16000/24000 */
|
||||
SKP_int32 sampleRate;
|
||||
/* I: Output signal sampling rate in Hertz; 8000/12000/16000/24000 */
|
||||
SKP_int32 API_sampleRate;
|
||||
|
||||
/* O: Number of samples per frame */
|
||||
SKP_int frameSize;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -36,48 +36,45 @@ extern "C"
|
||||
/******************/
|
||||
/* Error messages */
|
||||
/******************/
|
||||
#define SKP_SILK_NO_ERROR 0
|
||||
#define SKP_SILK_NO_ERROR 0
|
||||
|
||||
/**************************/
|
||||
/* Encoder error messages */
|
||||
/**************************/
|
||||
|
||||
/* Input length is not a multiplum of 10 ms,
|
||||
or length is longer than the packet length */
|
||||
#define SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES -1
|
||||
/* Input length is not a multiplum of 10 ms, or length is longer than the packet length */
|
||||
#define SKP_SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES -1
|
||||
|
||||
/* Sampling frequency not 8000, 12000, 16000
|
||||
or 24000 Hertz */
|
||||
#define SKP_SILK_ENC_FS_NOT_SUPPORTED -2
|
||||
/* Sampling frequency not 8000, 12000, 16000 or 24000 Hertz */
|
||||
#define SKP_SILK_ENC_FS_NOT_SUPPORTED -2
|
||||
|
||||
/* Packet size not 20, 40, 60, 80 or 100 ms */
|
||||
#define SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED -3
|
||||
#define SKP_SILK_ENC_PACKET_SIZE_NOT_SUPPORTED -3
|
||||
|
||||
/* Allocated payload buffer too short */
|
||||
#define SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT -4
|
||||
#define SKP_SILK_ENC_PAYLOAD_BUF_TOO_SHORT -4
|
||||
|
||||
/* Loss rate not between 0 and 100 percent */
|
||||
#define SKP_SILK_ENC_WRONG_LOSS_RATE -5
|
||||
#define SKP_SILK_ENC_INVALID_LOSS_RATE -5
|
||||
|
||||
/* Complexity setting not valid, use 0, 1 or 2 */
|
||||
#define SKP_SILK_ENC_WRONG_COMPLEXITY_SETTING -6
|
||||
#define SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING -6
|
||||
|
||||
/* Inband FEC setting not valid, use 0 or 1 */
|
||||
#define SKP_SILK_ENC_WRONG_INBAND_FEC_SETTING -7
|
||||
#define SKP_SILK_ENC_INVALID_INBAND_FEC_SETTING -7
|
||||
|
||||
/* DTX setting not valid, use 0 or 1 */
|
||||
#define SKP_SILK_ENC_WRONG_DTX_SETTING -8
|
||||
#define SKP_SILK_ENC_INVALID_DTX_SETTING -8
|
||||
|
||||
/* Internal encoder error */
|
||||
#define SKP_SILK_ENC_INTERNAL_ERROR -9
|
||||
#define SKP_SILK_ENC_INTERNAL_ERROR -9
|
||||
|
||||
/**************************/
|
||||
/* Decoder error messages */
|
||||
/**************************/
|
||||
|
||||
/* Output sampling frequency lower than internal
|
||||
decoded sampling frequency */
|
||||
#define SKP_SILK_DEC_WRONG_SAMPLING_FREQUENCY -10
|
||||
/* Output sampling frequency lower than internal decoded sampling frequency */
|
||||
#define SKP_SILK_DEC_INVALID_SAMPLING_FREQUENCY -10
|
||||
|
||||
/* Payload size exceeded the maximum allowed 1024 bytes */
|
||||
#define SKP_SILK_DEC_PAYLOAD_TOO_LARGE -11
|
||||
@ -85,7 +82,6 @@ extern "C"
|
||||
/* Payload has bit errors */
|
||||
#define SKP_SILK_DEC_PAYLOAD_ERROR -12
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
|
@ -1,14 +1,14 @@
|
||||
************************************************************************
|
||||
Fixed Point SILK SDK 1.0.2 beta source code package
|
||||
Fixed Point SILK SDK 1.0.8 beta source code package
|
||||
Copyright 2010 (c), Skype Limited
|
||||
https://developer.skype.com/silk/
|
||||
************************************************************************
|
||||
|
||||
Date: 09/03/2010 (Format: DD/MM/YYYY)
|
||||
Date: 15/06/2011 (Format: DD/MM/YYYY)
|
||||
|
||||
I. Description
|
||||
|
||||
This package contains files for compiling and testing the fixed
|
||||
This package contains files for compilation and evaluation of the fixed
|
||||
point SILK SDK library. The following is included in this package:
|
||||
|
||||
o Source code for the fixed point SILK SDK library
|
||||
@ -51,22 +51,38 @@ III. How to use the Makefile
|
||||
|
||||
make clean all
|
||||
|
||||
6. How to use the comparison tool:
|
||||
|
||||
6. How to build for big endian CPU's
|
||||
|
||||
Make clean all ADDED_DEFINES+=_SYSTEM_IS_BIG_ENDIAN
|
||||
To be able to use the test vectors with big endian CPU's the test programs
|
||||
need to be compiled in a different way. Note that the 16 bit input and output
|
||||
from the test programs will have the upper and lower bytes swapped with this setting.
|
||||
|
||||
7. How to use the comparison tool:
|
||||
|
||||
See 'How to use the test vectors.txt' in the test_vectors folder.
|
||||
|
||||
IV. History
|
||||
|
||||
Version 1.0.8 - Improved noise shaping, various other improvements, and various bugfixes. Added a MIPS version
|
||||
Version 1.0.7 - Updated with bugfixes for LBRR and pitch estimator. SignalCompare updated
|
||||
Version 1.0.6 - Updated with bugfixes for ARM builds
|
||||
Version 1.0.5 - Updated with bugfixes for ARM builds
|
||||
Version 1.0.4 - Updated with various bugfixes and improvements, including some API changes
|
||||
Added support for big endian platforms
|
||||
Added resampler support for additional API sample rates
|
||||
Version 1.0.3 - Updated with various bugfixes and improvements
|
||||
Version 1.0.2 - Updated with various bugfixes and improvements
|
||||
Version 1.0.1 - First beta source code release
|
||||
|
||||
V. Compatibility
|
||||
|
||||
This package has been tested under the following platforms:
|
||||
This package has been tested on the following platforms:
|
||||
|
||||
Windows XP Home and Professional
|
||||
Windows Vista, 32-bit version
|
||||
Mac OS X Version 10.5.8
|
||||
Mac OSX intel
|
||||
Mac OSX ppc
|
||||
Ubuntu Linux 9.10, 64-bit version
|
||||
|
||||
VI. Known Issues
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -33,10 +33,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "SKP_Silk_SigProc_FIX.h"
|
||||
|
||||
/* Number of binary divisions, when not in low complexity mode */
|
||||
#define BIN_DIV_STEPS_A2NLSF_FIX 2 /* must be no higher than 16 - log2( LSF_COS_TAB_SZ_FIX ) */
|
||||
/* Number of binary divisions */
|
||||
#define BIN_DIV_STEPS_A2NLSF_FIX 3 /* must be no higher than 16 - log2( LSF_COS_TAB_SZ_FIX ) */
|
||||
#define QPoly 16
|
||||
#define MAX_ITERATIONS_A2NLSF_FIX 50
|
||||
#define MAX_ITERATIONS_A2NLSF_FIX 30
|
||||
|
||||
/* Flag for using 2x as many cosine sampling points, reduces the risk of missing a root */
|
||||
#define OVERSAMPLE_COSINE_TABLE 0
|
||||
@ -57,12 +57,11 @@ SKP_INLINE void SKP_Silk_A2NLSF_trans_poly(
|
||||
p[ k - 2 ] -= SKP_LSHIFT( p[ k ], 1 );
|
||||
}
|
||||
}
|
||||
|
||||
/* Helper function for A2NLSF(..) */
|
||||
/* Polynomial evaluation */
|
||||
SKP_INLINE SKP_int32 SKP_Silk_A2NLSF_eval_poly( /* return the polynomial evaluation, in QPoly */
|
||||
SKP_int32 *p, /* I Polynomial, QPoly */
|
||||
const SKP_int32 x, /* I Evaluation point, Q12 */
|
||||
const SKP_int32 x, /* I Evaluation point, Q12 */
|
||||
const SKP_int dd /* I Order */
|
||||
)
|
||||
{
|
||||
@ -79,9 +78,9 @@ SKP_INLINE SKP_int32 SKP_Silk_A2NLSF_eval_poly( /* return the polynomial eval
|
||||
|
||||
SKP_INLINE void SKP_Silk_A2NLSF_init(
|
||||
const SKP_int32 *a_Q16,
|
||||
SKP_int32 *P,
|
||||
SKP_int32 *Q,
|
||||
const SKP_int dd
|
||||
SKP_int32 *P,
|
||||
SKP_int32 *Q,
|
||||
const SKP_int dd
|
||||
)
|
||||
{
|
||||
SKP_int k;
|
||||
@ -127,8 +126,8 @@ void SKP_Silk_A2NLSF(
|
||||
SKP_int32 xlo, xhi, xmid;
|
||||
SKP_int32 ylo, yhi, ymid;
|
||||
SKP_int32 nom, den;
|
||||
SKP_int32 P[ SigProc_MAX_ORDER_LPC / 2 + 1 ];
|
||||
SKP_int32 Q[ SigProc_MAX_ORDER_LPC / 2 + 1 ];
|
||||
SKP_int32 P[ SKP_Silk_MAX_ORDER_LPC / 2 + 1 ];
|
||||
SKP_int32 Q[ SKP_Silk_MAX_ORDER_LPC / 2 + 1 ];
|
||||
SKP_int32 *PQ[ 2 ];
|
||||
SKP_int32 *p;
|
||||
|
||||
@ -258,7 +257,7 @@ void SKP_Silk_A2NLSF(
|
||||
}
|
||||
|
||||
/* Error: Apply progressively more bandwidth expansion and run again */
|
||||
SKP_Silk_bwexpander_32( a_Q16, d, 65536 - SKP_SMULBB( 66, i ) ); // 66_Q16 = 0.001
|
||||
SKP_Silk_bwexpander_32( a_Q16, d, 65536 - SKP_SMULBB( 10 + i, i ) ); // 10_Q16 = 0.00015
|
||||
|
||||
SKP_Silk_A2NLSF_init( a_Q16, P, Q, dd );
|
||||
p = P; /* Pointer to polynomial */
|
||||
@ -269,9 +268,9 @@ void SKP_Silk_A2NLSF(
|
||||
NLSF[ 0 ] = 0;
|
||||
p = Q; /* Pointer to polynomial */
|
||||
ylo = SKP_Silk_A2NLSF_eval_poly( p, xlo, dd );
|
||||
root_ix = 1; /* Index of current root */
|
||||
root_ix = 1; /* Index of current root */
|
||||
} else {
|
||||
root_ix = 0; /* Index of current root */
|
||||
root_ix = 0; /* Index of current root */
|
||||
}
|
||||
k = 1; /* Reset loop counter */
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -25,7 +25,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
***********************************************************************/
|
||||
|
||||
#include "SKP_Silk_main_FIX.h"
|
||||
#include "SKP_Silk_main.h"
|
||||
|
||||
/* Generates excitation for CNG LPC synthesis */
|
||||
SKP_INLINE void SKP_Silk_CNG_exc(
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -26,6 +26,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
***********************************************************************/
|
||||
|
||||
#include "SKP_Silk_main_FIX.h"
|
||||
#include "SKP_Silk_tuning_parameters.h"
|
||||
|
||||
#if HIGH_PASS_INPUT
|
||||
|
||||
@ -57,7 +58,7 @@ void SKP_Silk_HP_variable_cutoff_FIX(
|
||||
quality_Q15 = psEncCtrl->input_quality_bands_Q15[ 0 ];
|
||||
pitch_freq_log_Q7 = SKP_SUB32( pitch_freq_log_Q7, SKP_SMULWB( SKP_SMULWB( SKP_LSHIFT( quality_Q15, 2 ), quality_Q15 ),
|
||||
pitch_freq_log_Q7 - SKP_LOG2_VARIABLE_HP_MIN_FREQ_Q7 ) );
|
||||
pitch_freq_log_Q7 = SKP_ADD32( pitch_freq_log_Q7, SKP_RSHIFT( 19661 - quality_Q15, 9 ) ); // 19661_Q15 = 0.6_Q0
|
||||
pitch_freq_log_Q7 = SKP_ADD32( pitch_freq_log_Q7, SKP_RSHIFT( SKP_FIX_CONST( 0.6, 15 ) - quality_Q15, 9 ) );
|
||||
|
||||
//delta_freq = pitch_freq_log - psEnc->variable_HP_smth1;
|
||||
delta_freq_Q7 = pitch_freq_log_Q7 - SKP_RSHIFT( psEnc->variable_HP_smth1_Q15, 8 );
|
||||
@ -67,21 +68,22 @@ void SKP_Silk_HP_variable_cutoff_FIX(
|
||||
}
|
||||
|
||||
/* limit delta, to reduce impact of outliers */
|
||||
delta_freq_Q7 = SKP_LIMIT( delta_freq_Q7, -VARIABLE_HP_MAX_DELTA_FREQ_Q7, VARIABLE_HP_MAX_DELTA_FREQ_Q7 );
|
||||
delta_freq_Q7 = SKP_LIMIT_32( delta_freq_Q7, -SKP_FIX_CONST( VARIABLE_HP_MAX_DELTA_FREQ, 7 ), SKP_FIX_CONST( VARIABLE_HP_MAX_DELTA_FREQ, 7 ) );
|
||||
|
||||
/* update smoother */
|
||||
psEnc->variable_HP_smth1_Q15 = SKP_SMLAWB( psEnc->variable_HP_smth1_Q15,
|
||||
SKP_MUL( SKP_LSHIFT( psEnc->speech_activity_Q8, 1 ), delta_freq_Q7 ), VARIABLE_HP_SMTH_COEF1_Q16 );
|
||||
SKP_MUL( SKP_LSHIFT( psEnc->speech_activity_Q8, 1 ), delta_freq_Q7 ), SKP_FIX_CONST( VARIABLE_HP_SMTH_COEF1, 16 ) );
|
||||
}
|
||||
/* second smoother */
|
||||
psEnc->variable_HP_smth2_Q15 = SKP_SMLAWB( psEnc->variable_HP_smth2_Q15,
|
||||
psEnc->variable_HP_smth1_Q15 - psEnc->variable_HP_smth2_Q15, VARIABLE_HP_SMTH_COEF2_Q16 );
|
||||
psEnc->variable_HP_smth1_Q15 - psEnc->variable_HP_smth2_Q15, SKP_FIX_CONST( VARIABLE_HP_SMTH_COEF2, 16 ) );
|
||||
|
||||
/* convert from log scale to Hertz */
|
||||
psEncCtrl->pitch_freq_low_Hz = SKP_Silk_log2lin( SKP_RSHIFT( psEnc->variable_HP_smth2_Q15, 8 ) ); //pow( 2.0, psEnc->variable_HP_smth2 );
|
||||
psEncCtrl->pitch_freq_low_Hz = SKP_Silk_log2lin( SKP_RSHIFT( psEnc->variable_HP_smth2_Q15, 8 ) );
|
||||
|
||||
/* limit frequency range */
|
||||
psEncCtrl->pitch_freq_low_Hz = SKP_LIMIT( psEncCtrl->pitch_freq_low_Hz, VARIABLE_HP_MIN_FREQ_Q0, VARIABLE_HP_MAX_FREQ_Q0 );
|
||||
psEncCtrl->pitch_freq_low_Hz = SKP_LIMIT_32( psEncCtrl->pitch_freq_low_Hz,
|
||||
SKP_FIX_CONST( VARIABLE_HP_MIN_FREQ, 0 ), SKP_FIX_CONST( VARIABLE_HP_MAX_FREQ, 0 ) );
|
||||
|
||||
/********************************/
|
||||
/* Compute Filter Coefficients */
|
||||
@ -94,7 +96,7 @@ void SKP_Silk_HP_variable_cutoff_FIX(
|
||||
SKP_assert( Fc_Q19 >= 3704 );
|
||||
SKP_assert( Fc_Q19 <= 27787 );
|
||||
|
||||
r_Q28 = ( 1 << 28 ) - SKP_MUL( 471, Fc_Q19 ); // 471_Q9 = 0.92_Q0, range: 255347779 to 266690872, 27-28 bits
|
||||
r_Q28 = SKP_FIX_CONST( 1.0, 28 ) - SKP_MUL( SKP_FIX_CONST( 0.92, 9 ), Fc_Q19 );
|
||||
SKP_assert( r_Q28 >= 255347779 );
|
||||
SKP_assert( r_Q28 <= 266690872 );
|
||||
|
||||
@ -106,7 +108,7 @@ void SKP_Silk_HP_variable_cutoff_FIX(
|
||||
|
||||
// -r * ( 2 - Fc * Fc );
|
||||
r_Q22 = SKP_RSHIFT( r_Q28, 6 );
|
||||
A_Q28[ 0 ] = SKP_SMULWW( r_Q22, SKP_SMULWW( Fc_Q19, Fc_Q19 ) - ( 2 << 22 ) );
|
||||
A_Q28[ 0 ] = SKP_SMULWW( r_Q22, SKP_SMULWW( Fc_Q19, Fc_Q19 ) - SKP_FIX_CONST( 2.0, 22 ) );
|
||||
A_Q28[ 1 ] = SKP_SMULWW( r_Q22, r_Q22 );
|
||||
|
||||
/********************************/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -57,20 +57,15 @@ SKP_INLINE void SKP_Silk_CLZ_FRAC(SKP_int32 in, /* I: input */
|
||||
SKP_int32 *lz, /* O: number of leading zeros */
|
||||
SKP_int32 *frac_Q7) /* O: the 7 bits right after the leading one */
|
||||
{
|
||||
SKP_int32 leadingZeros;
|
||||
SKP_int32 lzeros = SKP_Silk_CLZ32(in);
|
||||
|
||||
leadingZeros = SKP_Silk_CLZ32(in);
|
||||
*lz = leadingZeros;
|
||||
if( leadingZeros < 24 ) {
|
||||
*frac_Q7 = SKP_RSHIFT(in, 24 - leadingZeros) & 0x7F;
|
||||
} else {
|
||||
*frac_Q7 = SKP_LSHIFT(in, leadingZeros - 24) & 0x7F;
|
||||
}
|
||||
* lz = lzeros;
|
||||
* frac_Q7 = SKP_ROR32(in, 24 - lzeros) & 0x7f;
|
||||
}
|
||||
|
||||
/* Approximation of square root */
|
||||
/* Accuracy: < +/- 10% for output values > 15 */
|
||||
/* < +/- 2.5% for output values > 120 */
|
||||
/* Accuracy: < +/- 10% for output values > 15 */
|
||||
/* < +/- 2.5% for output values > 120 */
|
||||
SKP_INLINE SKP_int32 SKP_Silk_SQRT_APPROX(SKP_int32 x)
|
||||
{
|
||||
SKP_int32 y, lz, frac_Q7;
|
||||
@ -125,9 +120,9 @@ SKP_INLINE SKP_int32 SKP_Silk_norm32(SKP_int32 a) {
|
||||
|
||||
/* Divide two int32 values and return result as int32 in a given Q-domain */
|
||||
SKP_INLINE SKP_int32 SKP_DIV32_varQ( /* O returns a good approximation of "(a32 << Qres) / b32" */
|
||||
const SKP_int32 a32, /* I numerator (Q0) */
|
||||
const SKP_int32 b32, /* I denominator (Q0) */
|
||||
const SKP_int Qres /* I Q-domain of result (>= 0) */
|
||||
const SKP_int32 a32, /* I numerator (Q0) */
|
||||
const SKP_int32 b32, /* I denominator (Q0) */
|
||||
const SKP_int Qres /* I Q-domain of result (>= 0) */
|
||||
)
|
||||
{
|
||||
SKP_int a_headrm, b_headrm, lshift;
|
||||
@ -170,14 +165,15 @@ SKP_INLINE SKP_int32 SKP_DIV32_varQ( /* O returns a good approximation of
|
||||
|
||||
/* Invert int32 value and return result as int32 in a given Q-domain */
|
||||
SKP_INLINE SKP_int32 SKP_INVERSE32_varQ( /* O returns a good approximation of "(1 << Qres) / b32" */
|
||||
const SKP_int32 b32, /* I denominator (Q0) */
|
||||
const SKP_int Qres /* I Q-domain of result (> 0) */
|
||||
const SKP_int32 b32, /* I denominator (Q0) */
|
||||
const SKP_int Qres /* I Q-domain of result (> 0) */
|
||||
)
|
||||
{
|
||||
SKP_int b_headrm, lshift;
|
||||
SKP_int32 b32_inv, b32_nrm, err_Q32, result;
|
||||
|
||||
SKP_assert( b32 != 0 );
|
||||
SKP_assert( b32 != SKP_int32_MIN ); /* SKP_int32_MIN is not handled by SKP_abs */
|
||||
SKP_assert( Qres > 0 );
|
||||
|
||||
/* Compute number of bits head room and normalize input */
|
||||
@ -277,4 +273,4 @@ SKP_INLINE SKP_int32 SKP_Silk_COS_APPROX_Q24( /* O returns approximate
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //_SKP_SILK_FIX_INLINES_H_
|
||||
#endif /*_SKP_SILK_FIX_INLINES_H_*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -31,30 +31,27 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* Compute inverse of LPC prediction gain, and *
|
||||
* test if LPC coefficients are stable (all poles within unit circle) *
|
||||
* *
|
||||
* Copyright 2008 (c), Skype Limited *
|
||||
* Copyright 2008 (c), Skype Limited *
|
||||
* */
|
||||
#include "SKP_Silk_SigProc_FIX.h"
|
||||
|
||||
#define QA 16
|
||||
#define A_LIMIT 65520
|
||||
#define A_LIMIT SKP_FIX_CONST( 0.99975, QA )
|
||||
|
||||
/* Compute inverse of LPC prediction gain, and */
|
||||
/* test if LPC coefficients are stable (all poles within unit circle) */
|
||||
SKP_int SKP_Silk_LPC_inverse_pred_gain( /* O: Returns 1 if unstable, otherwise 0 */
|
||||
static SKP_int LPC_inverse_pred_gain_QA( /* O: Returns 1 if unstable, otherwise 0 */
|
||||
SKP_int32 *invGain_Q30, /* O: Inverse prediction gain, Q30 energy domain */
|
||||
const SKP_int16 *A_Q12, /* I: Prediction coefficients, Q12 [order] */
|
||||
SKP_int32 A_QA[ 2 ][ SKP_Silk_MAX_ORDER_LPC ],
|
||||
/* I: Prediction coefficients */
|
||||
const SKP_int order /* I: Prediction order */
|
||||
)
|
||||
{
|
||||
SKP_int k, n, headrm;
|
||||
SKP_int32 rc_Q31, rc_mult1_Q30, rc_mult2_Q16;
|
||||
SKP_int32 Atmp_QA[ 2 ][ SigProc_MAX_ORDER_LPC ], tmp_QA;
|
||||
SKP_int32 rc_Q31, rc_mult1_Q30, rc_mult2_Q16, tmp_QA;
|
||||
SKP_int32 *Aold_QA, *Anew_QA;
|
||||
|
||||
Anew_QA = Atmp_QA[ order & 1 ];
|
||||
/* Increase Q domain of the AR coefficients */
|
||||
for( k = 0; k < order; k++ ) {
|
||||
Anew_QA[ k ] = SKP_LSHIFT( (SKP_int32)A_Q12[ k ], QA - 12 );
|
||||
}
|
||||
Anew_QA = A_QA[ order & 1 ];
|
||||
|
||||
*invGain_Q30 = ( 1 << 30 );
|
||||
for( k = order - 1; k > 0; k-- ) {
|
||||
@ -82,7 +79,7 @@ SKP_int SKP_Silk_LPC_inverse_pred_gain( /* O: Returns 1 if unstable, oth
|
||||
|
||||
/* Swap pointers */
|
||||
Aold_QA = Anew_QA;
|
||||
Anew_QA = Atmp_QA[ k & 1 ];
|
||||
Anew_QA = A_QA[ k & 1 ];
|
||||
|
||||
/* Update AR coefficient */
|
||||
headrm = SKP_Silk_CLZ32( rc_mult2_Q16 ) - 1;
|
||||
@ -112,78 +109,45 @@ SKP_int SKP_Silk_LPC_inverse_pred_gain( /* O: Returns 1 if unstable, oth
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* For input in Q13 domain */
|
||||
SKP_int SKP_Silk_LPC_inverse_pred_gain_Q13( /* O: Returns 1 if unstable, otherwise 0 */
|
||||
/* For input in Q12 domain */
|
||||
SKP_int SKP_Silk_LPC_inverse_pred_gain( /* O: Returns 1 if unstable, otherwise 0 */
|
||||
SKP_int32 *invGain_Q30, /* O: Inverse prediction gain, Q30 energy domain */
|
||||
const SKP_int16 *A_Q13, /* I: Prediction coefficients, Q13 [order] */
|
||||
const SKP_int16 *A_Q12, /* I: Prediction coefficients, Q12 [order] */
|
||||
const SKP_int order /* I: Prediction order */
|
||||
)
|
||||
{
|
||||
SKP_int k, n, headrm;
|
||||
SKP_int32 rc_Q31, rc_mult1_Q30, rc_mult2_Q16;
|
||||
SKP_int32 Atmp_QA[ 2 ][ SigProc_MAX_ORDER_LPC ], tmp_QA;
|
||||
SKP_int32 *Aold_QA, *Anew_QA;
|
||||
SKP_int k;
|
||||
SKP_int32 Atmp_QA[ 2 ][ SKP_Silk_MAX_ORDER_LPC ];
|
||||
SKP_int32 *Anew_QA;
|
||||
|
||||
Anew_QA = Atmp_QA[ order & 1 ];
|
||||
|
||||
/* Increase Q domain of the AR coefficients */
|
||||
for( k = 0; k < order; k++ ) {
|
||||
Anew_QA[ k ] = SKP_LSHIFT( (SKP_int32)A_Q13[ k ], QA - 13 );
|
||||
Anew_QA[ k ] = SKP_LSHIFT( (SKP_int32)A_Q12[ k ], QA - 12 );
|
||||
}
|
||||
|
||||
*invGain_Q30 = ( 1 << 30 );
|
||||
for( k = order - 1; k > 0; k-- ) {
|
||||
/* Check for stability */
|
||||
if( ( Anew_QA[ k ] > A_LIMIT ) || ( Anew_QA[ k ] < -A_LIMIT ) ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Set RC equal to negated AR coef */
|
||||
rc_Q31 = -SKP_LSHIFT( Anew_QA[ k ], 31 - QA );
|
||||
|
||||
/* rc_mult1_Q30 range: [ 1 : 2^30-1 ] */
|
||||
rc_mult1_Q30 = ( SKP_int32_MAX >> 1 ) - SKP_SMMUL( rc_Q31, rc_Q31 );
|
||||
SKP_assert( rc_mult1_Q30 > ( 1 << 15 ) ); /* reduce A_LIMIT if fails */
|
||||
SKP_assert( rc_mult1_Q30 < ( 1 << 30 ) );
|
||||
|
||||
/* rc_mult2_Q16 range: [ 2^16 : SKP_int32_MAX ] */
|
||||
rc_mult2_Q16 = SKP_INVERSE32_varQ( rc_mult1_Q30, 46 ); /* 16 = 46 - 30 */
|
||||
|
||||
/* Update inverse gain */
|
||||
/* invGain_Q30 range: [ 0 : 2^30 ] */
|
||||
*invGain_Q30 = SKP_LSHIFT( SKP_SMMUL( *invGain_Q30, rc_mult1_Q30 ), 2 );
|
||||
SKP_assert( *invGain_Q30 >= 0 );
|
||||
SKP_assert( *invGain_Q30 <= 1<<30 );
|
||||
|
||||
/* Swap pointers */
|
||||
Aold_QA = Anew_QA;
|
||||
Anew_QA = Atmp_QA[ k & 1 ];
|
||||
|
||||
/* Update AR coefficient */
|
||||
headrm = SKP_Silk_CLZ32( rc_mult2_Q16 ) - 1;
|
||||
rc_mult2_Q16 = SKP_LSHIFT( rc_mult2_Q16, headrm ); /* Q: 16 + headrm */
|
||||
for( n = 0; n < k; n++ ) {
|
||||
tmp_QA = Aold_QA[ n ] - SKP_LSHIFT( SKP_SMMUL( Aold_QA[ k - n - 1 ], rc_Q31 ), 1 );
|
||||
Anew_QA[ n ] = SKP_LSHIFT( SKP_SMMUL( tmp_QA, rc_mult2_Q16 ), 16 - headrm );
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for stability */
|
||||
if( ( Anew_QA[ 0 ] > A_LIMIT ) || ( Anew_QA[ 0 ] < -A_LIMIT ) ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Set RC equal to negated AR coef */
|
||||
rc_Q31 = -SKP_LSHIFT( Anew_QA[ 0 ], 31 - QA );
|
||||
|
||||
/* Range: [ 1 : 2^30 ] */
|
||||
rc_mult1_Q30 = ( SKP_int32_MAX >> 1 ) - SKP_SMMUL( rc_Q31, rc_Q31 );
|
||||
|
||||
/* Update inverse gain */
|
||||
/* Range: [ 0 : 2^30 ] */
|
||||
*invGain_Q30 = SKP_LSHIFT( SKP_SMMUL( *invGain_Q30, rc_mult1_Q30 ), 2 );
|
||||
SKP_assert( *invGain_Q30 >= 0 );
|
||||
SKP_assert( *invGain_Q30 <= 1<<30 );
|
||||
|
||||
return 0;
|
||||
return LPC_inverse_pred_gain_QA( invGain_Q30, Atmp_QA, order );
|
||||
}
|
||||
|
||||
/* For input in Q24 domain */
|
||||
SKP_int SKP_Silk_LPC_inverse_pred_gain_Q24( /* O: Returns 1 if unstable, otherwise 0 */
|
||||
SKP_int32 *invGain_Q30, /* O: Inverse prediction gain, Q30 energy domain */
|
||||
const SKP_int32 *A_Q24, /* I: Prediction coefficients, Q24 [order] */
|
||||
const SKP_int order /* I: Prediction order */
|
||||
)
|
||||
{
|
||||
SKP_int k;
|
||||
SKP_int32 Atmp_QA[ 2 ][ SKP_Silk_MAX_ORDER_LPC ];
|
||||
SKP_int32 *Anew_QA;
|
||||
|
||||
Anew_QA = Atmp_QA[ order & 1 ];
|
||||
|
||||
/* Increase Q domain of the AR coefficients */
|
||||
for( k = 0; k < order; k++ ) {
|
||||
Anew_QA[ k ] = SKP_RSHIFT_ROUND( A_Q24[ k ], 24 - QA );
|
||||
}
|
||||
|
||||
return LPC_inverse_pred_gain_QA( invGain_Q30, Atmp_QA, order );
|
||||
}
|
||||
|
||||
|
@ -1,132 +0,0 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of Skype Limited, nor the names of specific
|
||||
contributors, may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED
|
||||
BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF 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.
|
||||
***********************************************************************/
|
||||
|
||||
#include "SKP_Silk_typedef.h"
|
||||
#include "SKP_Silk_SigProc_FIX.h"
|
||||
|
||||
#define LPC_STABILIZE_LPC_MAX_ABS_VALUE_Q16 ( ( (SKP_int32)SKP_int16_MAX ) << 4 )
|
||||
|
||||
/* LPC stabilizer, for a single input data vector */
|
||||
void SKP_Silk_LPC_stabilize(
|
||||
SKP_int16 *a_Q12, /* O stabilized LPC vector [L] */
|
||||
SKP_int32 *a_Q16, /* I LPC vector [L] */
|
||||
const SKP_int32 bwe_Q16, /* I Bandwidth expansion factor */
|
||||
const SKP_int L /* I Number of LPC parameters in the input vector */
|
||||
)
|
||||
{
|
||||
SKP_int32 maxabs, absval, sc_Q16;
|
||||
SKP_int i, idx = 0;
|
||||
SKP_int32 invGain_Q30;
|
||||
|
||||
SKP_Silk_bwexpander_32( a_Q16, L, bwe_Q16 );
|
||||
|
||||
/***************************/
|
||||
/* Limit range of the LPCs */
|
||||
/***************************/
|
||||
/* Limit the maximum absolute value of the prediction coefficients */
|
||||
while( SKP_TRUE ) {
|
||||
/* Find maximum absolute value and its index */
|
||||
maxabs = SKP_int32_MIN;
|
||||
for( i = 0; i < L; i++ ) {
|
||||
absval = SKP_abs( a_Q16[ i ] );
|
||||
if( absval > maxabs ) {
|
||||
maxabs = absval;
|
||||
idx = i;
|
||||
}
|
||||
}
|
||||
|
||||
if( maxabs >= LPC_STABILIZE_LPC_MAX_ABS_VALUE_Q16 ) {
|
||||
/* Reduce magnitude of prediction coefficients */
|
||||
sc_Q16 = SKP_DIV32( SKP_int32_MAX, SKP_RSHIFT( maxabs, 4 ) );
|
||||
sc_Q16 = 65536 - sc_Q16;
|
||||
sc_Q16 = SKP_DIV32( sc_Q16, idx + 1 );
|
||||
sc_Q16 = 65536 - sc_Q16;
|
||||
sc_Q16 = SKP_LSHIFT( SKP_SMULWB( sc_Q16, 32604 ), 1 ); // 0.995 in Q16
|
||||
SKP_Silk_bwexpander_32( a_Q16, L, sc_Q16 );
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert to 16 bit Q12 */
|
||||
for( i = 0; i < L; i++ ) {
|
||||
a_Q12[ i ] = (SKP_int16)SKP_RSHIFT_ROUND( a_Q16[ i ], 4 );
|
||||
}
|
||||
|
||||
/**********************/
|
||||
/* Ensure stable LPCs */
|
||||
/**********************/
|
||||
while( SKP_Silk_LPC_inverse_pred_gain( &invGain_Q30, a_Q12, L ) == 1 ) {
|
||||
SKP_Silk_bwexpander( a_Q12, L, 65339 ); // 0.997 in Q16
|
||||
}
|
||||
}
|
||||
|
||||
void SKP_Silk_LPC_fit(
|
||||
SKP_int16 *a_QQ, /* O Stabilized LPC vector, Q(24-rshift) [L] */
|
||||
SKP_int32 *a_Q24, /* I LPC vector [L] */
|
||||
const SKP_int QQ, /* I Q domain of output LPC vector */
|
||||
const SKP_int L /* I Number of LPC parameters in the input vector */
|
||||
)
|
||||
{
|
||||
SKP_int i, rshift, idx = 0;
|
||||
SKP_int32 maxabs, absval, sc_Q16;
|
||||
|
||||
rshift = 24 - QQ;
|
||||
|
||||
/***************************/
|
||||
/* Limit range of the LPCs */
|
||||
/***************************/
|
||||
/* Limit the maximum absolute value of the prediction coefficients */
|
||||
while( SKP_TRUE ) {
|
||||
/* Find maximum absolute value and its index */
|
||||
maxabs = SKP_int32_MIN;
|
||||
for( i = 0; i < L; i++ ) {
|
||||
absval = SKP_abs( a_Q24[ i ] );
|
||||
if( absval > maxabs ) {
|
||||
maxabs = absval;
|
||||
idx = i;
|
||||
}
|
||||
}
|
||||
|
||||
maxabs = SKP_RSHIFT( maxabs, rshift );
|
||||
if( maxabs >= SKP_int16_MAX ) {
|
||||
/* Reduce magnitude of prediction coefficients */
|
||||
sc_Q16 = 65470 - SKP_DIV32( SKP_MUL( 65470 >> 2, maxabs - SKP_int16_MAX ),
|
||||
SKP_RSHIFT32( SKP_MUL( maxabs, idx + 1), 2 ) );
|
||||
SKP_Silk_bwexpander_32( a_Q24, L, sc_Q16 );
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert to 16 bit Q(24-rshift) */
|
||||
SKP_assert( rshift > 0 );
|
||||
SKP_assert( rshift < 31 );
|
||||
for( i = 0; i < L; i++ ) {
|
||||
a_QQ[ i ] = (SKP_int16)SKP_RSHIFT_ROUND( a_Q24[ i ], rshift );
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -45,54 +45,40 @@ void SKP_Silk_LPC_synthesis_filter(
|
||||
)
|
||||
{
|
||||
SKP_int k, j, idx, Order_half = SKP_RSHIFT( Order, 1 );
|
||||
SKP_int32 SA, SB, Atmp, A_align_Q12[SigProc_MAX_ORDER_LPC >> 1], out32_Q10, out32;
|
||||
SKP_int32 SA, SB, out32_Q10, out32;
|
||||
|
||||
/* Order must be even */
|
||||
SKP_assert( 2*Order_half == Order );
|
||||
|
||||
/* combine two A_Q12 values and ensure 32-bit alignment */
|
||||
for( k = 0; k < Order_half; k++ ) {
|
||||
idx = SKP_SMULBB( 2, k );
|
||||
A_align_Q12[k] = (((SKP_int32)A_Q12[idx]) & 0x0000ffff) | SKP_LSHIFT( (SKP_int32)A_Q12[idx+1], 16 );
|
||||
}
|
||||
SKP_assert( 2 * Order_half == Order );
|
||||
|
||||
/* S[] values are in Q14 */
|
||||
for( k = 0; k < len; k++ ) {
|
||||
SA = S[Order-1];
|
||||
SA = S[ Order - 1 ];
|
||||
out32_Q10 = 0;
|
||||
for( j=0;j<(Order_half-1); j++ ) {
|
||||
for( j = 0; j < ( Order_half - 1 ); j++ ) {
|
||||
idx = SKP_SMULBB( 2, j ) + 1;
|
||||
/* multiply-add two prediction coefficients for each loop */
|
||||
/* NOTE: the code below loads two int16 values in an int32, and multiplies each using the */
|
||||
/* SMLAWB and SMLAWT instructions. On a big-endian CPU the two int16 variables would be */
|
||||
/* loaded in reverse order and the code will give the wrong result. In that case swapping */
|
||||
/* the SMLAWB and SMLAWT instructions should solve the problem. */
|
||||
Atmp = A_align_Q12[j];
|
||||
SB = S[Order - 1 - idx];
|
||||
S[Order - 1 - idx] = SA;
|
||||
out32_Q10 = SKP_SMLAWB( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT( out32_Q10, SB, Atmp );
|
||||
SA = S[Order - 2 - idx];
|
||||
S[Order - 2 - idx] = SB;
|
||||
SB = S[ Order - 1 - idx ];
|
||||
S[ Order - 1 - idx ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB( out32_Q10, SA, A_Q12[ ( j << 1 ) ] );
|
||||
out32_Q10 = SKP_SMLAWB( out32_Q10, SB, A_Q12[ ( j << 1 ) + 1 ] );
|
||||
SA = S[ Order - 2 - idx ];
|
||||
S[ Order - 2 - idx ] = SB;
|
||||
}
|
||||
|
||||
/* unrolled loop: epilog */
|
||||
Atmp = A_align_Q12[Order_half-1];
|
||||
SB = S[0];
|
||||
S[0] = SA;
|
||||
out32_Q10 = SKP_SMLAWB( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT( out32_Q10, SB, Atmp );
|
||||
|
||||
SB = S[ 0 ];
|
||||
S[ 0 ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB( out32_Q10, SA, A_Q12[ Order - 2 ] );
|
||||
out32_Q10 = SKP_SMLAWB( out32_Q10, SB, A_Q12[ Order - 1 ] );
|
||||
/* apply gain to excitation signal and add to prediction */
|
||||
out32_Q10 = SKP_ADD_SAT32( out32_Q10, SKP_SMULWB( Gain_Q26, in[k] ) );
|
||||
out32_Q10 = SKP_ADD_SAT32( out32_Q10, SKP_SMULWB( Gain_Q26, in[ k ] ) );
|
||||
|
||||
/* scale to Q0 */
|
||||
out32 = SKP_RSHIFT_ROUND( out32_Q10, 10 );
|
||||
|
||||
/* saturate output */
|
||||
out[k] = (SKP_int16)SKP_SAT16( out32 );
|
||||
out[ k ] = ( SKP_int16 )SKP_SAT16( out32 );
|
||||
|
||||
/* move result into delay line */
|
||||
S[Order - 1] = SKP_LSHIFT_SAT32( out32_Q10, 4 );
|
||||
S[ Order - 1 ] = SKP_LSHIFT_SAT32( out32_Q10, 4 );
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@ -43,98 +43,79 @@ void SKP_Silk_LPC_synthesis_order16(const SKP_int16 *in, /* I: excita
|
||||
)
|
||||
{
|
||||
SKP_int k;
|
||||
SKP_int32 SA, SB, Atmp, A_align_Q12[8], out32_Q10, out32;
|
||||
|
||||
/* combine two A_Q12 values and ensure 32-bit alignment */
|
||||
for( k = 0; k < 8; k++ ) {
|
||||
A_align_Q12[k] = (((SKP_int32)A_Q12[ 2*k ]) & 0x0000ffff) | SKP_LSHIFT( (SKP_int32)A_Q12[ 2*k + 1 ], 16 );
|
||||
}
|
||||
|
||||
/* S[] values are in Q14 */
|
||||
/* NOTE: the code below loads two int16 values in an int32, and multiplies each using the */
|
||||
/* SMLAWB and SMLAWT instructions. On a big-endian CPU the two int16 variables would be */
|
||||
/* loaded in reverse order and the code will give the wrong result. In that case swapping */
|
||||
/* the SMLAWB and SMLAWT instructions should solve the problem. */
|
||||
SKP_int32 SA, SB, out32_Q10, out32;
|
||||
for( k = 0; k < len; k++ ) {
|
||||
/* unrolled loop: prolog */
|
||||
/* multiply-add two prediction coefficients per iteration */
|
||||
SA = S[15];
|
||||
Atmp = A_align_Q12[0];
|
||||
SB = S[14];
|
||||
S[14] = SA;
|
||||
out32_Q10 = SKP_SMULWB( SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT_ovflw( out32_Q10, SB, Atmp );
|
||||
SA = S[13];
|
||||
S[13] = SB;
|
||||
SA = S[ 15 ];
|
||||
SB = S[ 14 ];
|
||||
S[ 14 ] = SA;
|
||||
out32_Q10 = SKP_SMULWB( SA, A_Q12[ 0 ] );
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SB, A_Q12[ 1 ] );
|
||||
SA = S[ 13 ];
|
||||
S[ 13 ] = SB;
|
||||
|
||||
/* unrolled loop: main loop */
|
||||
Atmp = A_align_Q12[1];
|
||||
SB = S[12];
|
||||
S[12] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT_ovflw( out32_Q10, SB, Atmp );
|
||||
SA = S[11];
|
||||
S[11] = SB;
|
||||
SB = S[ 12 ];
|
||||
S[ 12 ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, A_Q12[ 2 ] );
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SB, A_Q12[ 3 ] );
|
||||
SA = S[ 11 ];
|
||||
S[ 11 ] = SB;
|
||||
|
||||
Atmp = A_align_Q12[2];
|
||||
SB = S[10];
|
||||
S[10] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT_ovflw( out32_Q10, SB, Atmp );
|
||||
SA = S[9];
|
||||
S[9] = SB;
|
||||
SB = S[ 10 ];
|
||||
S[ 10 ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, A_Q12[ 4 ] );
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SB, A_Q12[ 5 ] );
|
||||
SA = S[ 9 ];
|
||||
S[ 9 ] = SB;
|
||||
|
||||
Atmp = A_align_Q12[3];
|
||||
SB = S[8];
|
||||
S[8] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT_ovflw( out32_Q10, SB, Atmp );
|
||||
SA = S[7];
|
||||
S[7] = SB;
|
||||
SB = S[ 8 ];
|
||||
S[ 8 ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, A_Q12[ 6 ] );
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SB, A_Q12[ 7 ] );
|
||||
SA = S[ 7 ];
|
||||
S[ 7 ] = SB;
|
||||
|
||||
Atmp = A_align_Q12[4];
|
||||
SB = S[6];
|
||||
S[6] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT_ovflw( out32_Q10, SB, Atmp );
|
||||
SA = S[5];
|
||||
S[5] = SB;
|
||||
SB = S[ 6 ];
|
||||
S[ 6 ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, A_Q12[ 8 ] );
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SB, A_Q12[ 9 ] );
|
||||
SA = S[ 5 ];
|
||||
S[ 5 ] = SB;
|
||||
|
||||
Atmp = A_align_Q12[5];
|
||||
SB = S[4];
|
||||
S[4] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT_ovflw( out32_Q10, SB, Atmp );
|
||||
SA = S[3];
|
||||
S[3] = SB;
|
||||
SB = S[ 4 ];
|
||||
S[ 4 ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, A_Q12[ 10 ] );
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SB, A_Q12[ 11 ] );
|
||||
SA = S[ 3 ];
|
||||
S[ 3 ] = SB;
|
||||
|
||||
Atmp = A_align_Q12[6];
|
||||
SB = S[2];
|
||||
S[2] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT_ovflw( out32_Q10, SB, Atmp );
|
||||
SA = S[1];
|
||||
S[1] = SB;
|
||||
SB = S[ 2 ];
|
||||
S[ 2 ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, A_Q12[ 12 ] );
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SB, A_Q12[ 13 ] );
|
||||
SA = S[ 1 ];
|
||||
S[ 1 ] = SB;
|
||||
|
||||
/* unrolled loop: epilog */
|
||||
Atmp = A_align_Q12[7];
|
||||
SB = S[0];
|
||||
S[0] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, Atmp );
|
||||
out32_Q10 = SKP_SMLAWT_ovflw( out32_Q10, SB, Atmp );
|
||||
SB = S[ 0 ];
|
||||
S[ 0 ] = SA;
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SA, A_Q12[ 14 ] );
|
||||
out32_Q10 = SKP_SMLAWB_ovflw( out32_Q10, SB, A_Q12[ 15 ] );
|
||||
|
||||
/* unrolled loop: end */
|
||||
/* apply gain to excitation signal and add to prediction */
|
||||
out32_Q10 = SKP_ADD_SAT32( out32_Q10, SKP_SMULWB( Gain_Q26, in[k] ) );
|
||||
out32_Q10 = SKP_ADD_SAT32( out32_Q10, SKP_SMULWB( Gain_Q26, in[ k ] ) );
|
||||
|
||||
/* scale to Q0 */
|
||||
out32 = SKP_RSHIFT_ROUND( out32_Q10, 10 );
|
||||
|
||||
/* saturate output */
|
||||
out[k] = (SKP_int16)SKP_SAT16( out32 );
|
||||
out[ k ] = ( SKP_int16 )SKP_SAT16( out32 );
|
||||
|
||||
/* move result into delay line */
|
||||
S[15] = SKP_LSHIFT_SAT32( out32_Q10, 4 );
|
||||
S[ 15 ] = SKP_LSHIFT_SAT32( out32_Q10, 4 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user