Merge branch 'master' into netborder

Conflicts:
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cntrl.c
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c
	libs/freetdm/src/include/private/ftdm_core.h
This commit is contained in:
David Yat Sin 2010-11-10 19:22:27 -05:00
commit 086c397cdc
240 changed files with 58080 additions and 3564 deletions

View File

@ -2036,18 +2036,18 @@ Global
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.All|x64.Build.0 = Release|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Debug|Win32.ActiveCfg = Debug|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Debug|Win32.Build.0 = Debug|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Debug|x64.ActiveCfg = Debug|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Debug|x64.Build.0 = Debug|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Debug|x64.ActiveCfg = Debug|x64
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Debug|x64.Build.0 = Debug|x64
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Release|Win32.ActiveCfg = Release|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Release|Win32.Build.0 = Release|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Release|x64.ActiveCfg = Release|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Release|x64.Build.0 = Release|Win32
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Release|x64.ActiveCfg = Release|x64
{7A8D8174-B355-4114-AFC1-04777CB9DE0A}.Release|x64.Build.0 = Release|x64
{7EB71250-F002-4ED8-92CA-CA218114537A}.All|Win32.ActiveCfg = Release|Win32
{7EB71250-F002-4ED8-92CA-CA218114537A}.All|x64.ActiveCfg = Release|Win32
{7EB71250-F002-4ED8-92CA-CA218114537A}.Debug|Win32.ActiveCfg = Debug|Win32
{7EB71250-F002-4ED8-92CA-CA218114537A}.Debug|x64.ActiveCfg = Debug|Win32
{7EB71250-F002-4ED8-92CA-CA218114537A}.Debug|x64.ActiveCfg = Debug|x64
{7EB71250-F002-4ED8-92CA-CA218114537A}.Release|Win32.ActiveCfg = Release|Win32
{7EB71250-F002-4ED8-92CA-CA218114537A}.Release|x64.ActiveCfg = Release|Win32
{7EB71250-F002-4ED8-92CA-CA218114537A}.Release|x64.ActiveCfg = Release|x64
{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}.All|Win32.ActiveCfg = Release|Win32
{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}.All|x64.ActiveCfg = Release|Win32
{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}.Debug|Win32.ActiveCfg = Debug|Win32
@ -2057,9 +2057,9 @@ Global
{464AAB78-5489-4916-BE51-BF8D61822311}.All|Win32.ActiveCfg = Release|Win32
{464AAB78-5489-4916-BE51-BF8D61822311}.All|x64.ActiveCfg = Release|Win32
{464AAB78-5489-4916-BE51-BF8D61822311}.Debug|Win32.ActiveCfg = Debug|Win32
{464AAB78-5489-4916-BE51-BF8D61822311}.Debug|x64.ActiveCfg = Debug|Win32
{464AAB78-5489-4916-BE51-BF8D61822311}.Debug|x64.ActiveCfg = Debug|x64
{464AAB78-5489-4916-BE51-BF8D61822311}.Release|Win32.ActiveCfg = Release|Win32
{464AAB78-5489-4916-BE51-BF8D61822311}.Release|x64.ActiveCfg = Release|Win32
{464AAB78-5489-4916-BE51-BF8D61822311}.Release|x64.ActiveCfg = Release|x64
{0AD1177E-1FD8-4643-9391-431467A11084}.All|Win32.ActiveCfg = Release|x64
{0AD1177E-1FD8-4643-9391-431467A11084}.All|x64.ActiveCfg = Release|x64
{0AD1177E-1FD8-4643-9391-431467A11084}.All|x64.Build.0 = Release|x64
@ -2474,24 +2474,24 @@ Global
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.All|x64.Build.0 = Release|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Debug|Win32.ActiveCfg = Debug|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Debug|Win32.Build.0 = Debug|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Debug|x64.ActiveCfg = Debug|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Debug|x64.Build.0 = Debug|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Debug|x64.ActiveCfg = Debug|x64
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Debug|x64.Build.0 = Debug|x64
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Release|Win32.ActiveCfg = Release|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Release|Win32.Build.0 = Release|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Release|x64.ActiveCfg = Release|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Release|x64.Build.0 = Release|Win32
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Release|x64.ActiveCfg = Release|x64
{D1ABE208-6442-4FB4-9AAD-1677E41BC870}.Release|x64.Build.0 = Release|x64
{BA599D0A-4310-4505-91DA-6A6447B3E289}.All|Win32.ActiveCfg = Release|Win32
{BA599D0A-4310-4505-91DA-6A6447B3E289}.All|x64.ActiveCfg = Release|Win32
{BA599D0A-4310-4505-91DA-6A6447B3E289}.Debug|Win32.ActiveCfg = Debug|Win32
{BA599D0A-4310-4505-91DA-6A6447B3E289}.Debug|x64.ActiveCfg = Debug|Win32
{BA599D0A-4310-4505-91DA-6A6447B3E289}.Debug|x64.ActiveCfg = Debug|x64
{BA599D0A-4310-4505-91DA-6A6447B3E289}.Release|Win32.ActiveCfg = Release|Win32
{BA599D0A-4310-4505-91DA-6A6447B3E289}.Release|x64.ActiveCfg = Release|Win32
{BA599D0A-4310-4505-91DA-6A6447B3E289}.Release|x64.ActiveCfg = Release|x64
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.All|Win32.ActiveCfg = Release|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.All|x64.ActiveCfg = Release|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Debug|Win32.ActiveCfg = Debug|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Debug|x64.ActiveCfg = Debug|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Debug|x64.ActiveCfg = Debug|x64
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|Win32.ActiveCfg = Release|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|x64.ActiveCfg = Release|Win32
{EED13FC7-4F81-4E6F-93DB-CDB7DF5CF959}.Release|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|Win32.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64.ActiveCfg = Release|x64
{70564D74-199A-4452-9C60-19ED5F242F0D}.All|x64.Build.0 = Release|x64

File diff suppressed because it is too large Load Diff

View File

@ -267,7 +267,7 @@ src/include/switch_swigable_cpp.h: $(switch_srcdir)/src/include/switch_cpp.h
##
## Applications
##
bin_PROGRAMS = freeswitch fs_cli fs_ivrd tone2wav
bin_PROGRAMS = freeswitch fs_cli fs_ivrd tone2wav fs_encode
##
## fs_cli ()
@ -281,6 +281,14 @@ fs_cli_CFLAGS += -DHAVE_EDITLINE -I$(switch_srcdir)/libs/libedit/src
fs_cli_LDADD = libs/libedit/src/.libs/libedit.a
endif
##
## fs_encode ()
##
fs_encode_SOURCES = src/fs_encode.c
fs_encode_CFLAGS = $(AM_CFLAGS)
fs_encode_LDFLAGS = $(AM_LDFLAGS) $(CORE_LIBS)
fs_encode_LDADD = libfreeswitch.la
##
## tone2wav ()
##

View File

@ -148,7 +148,7 @@ if [ "x$libtoolize" = "x" ]; then
exit 1
fi
if [ ! -x "$libtoolize" ]; then
echo "$libtoolize does not exist or ist not executable"
echo "$libtoolize does not exist or is not executable"
exit 1
fi

View File

@ -105,5 +105,5 @@ say/mod_say_ru
#say/mod_say_th
## Experimental Modules (don't cry if they're broken)
#../../contrib/mod/endpoints/mod_khomp
#endpoints/mod_khomp
#../../contrib/mod/xml_int/mod_xml_odbc

View File

@ -13,6 +13,7 @@
<param name="time-base-score" value="system"/>
<param name="max-wait-time" value="0"/>
<param name="max-wait-time-with-no-agent" value="0"/>
<param name="max-wait-time-with-no-agent-time-reached" value="5"/>
<param name="tier-rules-apply" value="false"/>
<param name="tier-rule-wait-second" value="300"/>
<param name="tier-rule-wait-multiply-level" value="true"/>

View File

@ -2,7 +2,16 @@
<settings>
<param name="listen-ip" value="0.0.0.0"/>
<param name="listen-port" value="8031"/>
<!-- Specify the first part of the node name
(the host part after the @ will be autodetected)
OR pass a complete nodename to avoid autodetection
eg. freeswitch@example or freeswitch@example.com.
If you pass a complete node name, the 'shortname' parameter has no effect. -->
<param name="nodename" value="freeswitch"/>
<!-- Specify this OR 'cookie-file' or $HOME/.erlang.cookie will be read -->
<param name="cookie" value="ClueCon"/>
<!-- Read a cookie from an arbitary erlang cookie file instead -->
<!--<param name="cookie-file" value="/tmp/erlang.cookie"/>-->
<param name="shortname" value="true"/>
<!-- in additon to cookie, optionally restrict by ACL -->
<!--<param name="apply-inbound-acl" value="lan"/>-->

View File

@ -1,15 +1,113 @@
<configuration name="modules.conf" description="Modules">
<modules>
<!-- Loggers (I'd load these first) -->
<load module="mod_console"/>
<load module="mod_logfile"/>
<!-- <load module="mod_syslog"/> -->
<!--<load module="mod_yaml"/>-->
<!-- Multi-Faceted -->
<!-- mod_enum is a dialplan interface, an application interface and an api command interface -->
<load module="mod_enum"/>
<!-- XML Interfaces -->
<!-- <load module="mod_xml_rpc"/> -->
<!-- <load module="mod_xml_curl"/> -->
<!-- <load module="mod_xml_cdr"/> -->
<!-- Event Handlers -->
<load module="mod_cdr_csv"/>
<!-- <load module="mod_event_multicast"/> -->
<load module="mod_event_socket"/>
<!-- <load module="mod_zeroconf"/> -->
<!-- <load module="mod_erlang_event"/> -->
<!-- Directory Interfaces -->
<!-- <load module="mod_ldap"/> -->
<!-- Endpoints -->
<!-- <load module="mod_dingaling"/> -->
<!-- <load module="mod_portaudio"/> -->
<!-- <load module="mod_alsa"/> -->
<load module="mod_sofia"/>
<load module="mod_loopback"/>
<!-- <load module="mod_woomera"/> -->
<!-- <load module="mod_freetdm"/> -->
<!-- <load module="mod_openzap"/> -->
<!-- <load module="mod_unicall"/> -->
<!-- <load module="mod_skinny"/> -->
<!-- Applications -->
<load module="mod_commands"/>
<load module="mod_conference"/>
<load module="mod_db"/>
<load module="mod_dptools"/>
<load module="mod_expr"/>
<load module="mod_fifo"/>
<load module="mod_hash"/>
<load module="mod_voicemail"/>
<!--<load module="mod_directory"/>-->
<!--<load module="mod_lcr"/>-->
<load module="mod_esf"/>
<load module="mod_fsv"/>
<load module="mod_cluechoo"/>
<load module="mod_valet_parking"/>
<!--<load module="mod_spy"/>-->
<!-- SNOM Module -->
<!--<load module="mod_snom"/>-->
<!-- Dialplan Interfaces -->
<!-- <load module="mod_dialplan_directory"/> -->
<load module="mod_dialplan_xml"/>
<load module="mod_dialplan_asterisk"/>
<!-- Codec Interfaces -->
<load module="mod_spandsp"/>
<load module="mod_g723_1"/>
<load module="mod_g729"/>
<load module="mod_amr"/>
<load module="mod_ilbc"/>
<load module="mod_speex"/>
<load module="mod_h26x"/>
<load module="mod_siren"/>
<!--<load module="mod_celt"/>-->
<!-- File Format Interfaces -->
<load module="mod_sndfile"/>
<load module="mod_native_file"/>
<!--For icecast/mp3 streams/files-->
<!--<load module="mod_shout"/>-->
<!--For local streams (play all the files in a directory)-->
<load module="mod_local_stream"/>
<load module="mod_tone_stream"/>
<load module="mod_file_string"/>
<!-- Timers -->
<!-- Languages -->
<load module="mod_spidermonkey"/>
<!-- <load module="mod_perl"/> -->
<!-- <load module="mod_python"/> -->
<!-- <load module="mod_java"/> -->
<load module="mod_lua"/>
<!-- ASR /TTS -->
<!-- <load module="mod_flite"/> -->
<!-- <load module="mod_pocketsphinx"/> -->
<!-- <load module="mod_cepstral"/> -->
<!-- <load module="mod_tts_commandline"/> -->
<!-- <load module="mod_rss"/> -->
<!-- Say -->
<load module="mod_say_en"/>
<load module="mod_say_ru"/>
<!-- <load module="mod_say_zh"/> -->
<!-- Third party modules -->
<!--<load module="mod_nibblebill"/>-->
</modules>
</configuration>

View File

@ -86,6 +86,7 @@
<!-- <param name="core-db-dsn" value="dsn:username:password" /> -->
<!-- The system will create all the db schemas automatically, set this to false to avoid this behaviour-->
<!--<param name="auto-create-schemas" value="true"/>-->
<!-- <param name="core-dbtype" value="MSSQL"/> -->
</settings>
</configuration>

View File

@ -33,9 +33,10 @@
<param name="ff-key" value="6"/>
<param name="rew-key" value="4"/>
<param name="skip-greet-key" value="#"/>
<!--<param name="previous-message-key" value=""/>-->
<!--<param name="next-message-key" value=""/>-->
<!--<param name="skip-info-key" value=""/>-->
<param name="previous-message-key" value="1"/>-->
<param name="next-message-key" value="3"/>
<param name="skip-info-key" value="*"/>
<param name="repeat-message-key" value="0"/>
<param name="record-silence-threshold" value="200"/>
<param name="record-silence-hits" value="2"/>
<param name="web-template-file" value="web-vm.tpl"/>

View File

@ -95,7 +95,7 @@
<extension name="global-intercept">
<condition field="destination_number" expression="^886$">
<action application="answer"/>
<action application="intercept" data="${hash(select/${domain_name}-last_dial/global)}"/>
<action application="intercept" data="${hash(select/${domain_name}-last_dial_ext/global)}"/>
<action application="sleep" data="2000"/>
</condition>
</extension>
@ -103,7 +103,7 @@
<extension name="group-intercept">
<condition field="destination_number" expression="^\*8$">
<action application="answer"/>
<action application="intercept" data="${hash(select/${domain_name}-last_dial/${callgroup})}"/>
<action application="intercept" data="${hash(select/${domain_name}-last_dial_ext/${callgroup})}"/>
<action application="sleep" data="2000"/>
</condition>
</extension>
@ -260,6 +260,8 @@
<action application="set" data="continue_on_fail=true"/>
<action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/${called_party_callgroup}/${uuid}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/global/${uuid}"/>
<action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/>
<!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>-->
<action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>

View File

@ -0,0 +1,29 @@
Please do not change the maintainer (as found in the control file).
Please DO send me a note before changing anything here. Also, PLEASE DO MAKE A
JIRA FIRST !!!!
This request is the result of far too many sleepless nights and far too many
people breaking this far too often. So, HANDS OFF FOR NOW !!!!
Again, to be perfectly clear:
1. Do not make any changes before verifying that they are OK with the current
maintainer (yes, that is me*).
2. Before the mere idea of making a change crosses your mind, create a ticket in
Jira and assign it to the current maintainer.
3. As current maintainer, I have other obligations besides fixing things people
break in the Debian build. So, please be patient; it can sometimes take a
bit for me to respond.
4. Creating and maintaining this packages has been a lot of work. Please help
me maintain it by not fixing it to death.
5. The maintainer is always right.
6. If you believe the maintainer is wrong, please see item #5.
* Michal Bielicki <michal.bielicki@seventhsignal.de>

56
debian/changelog vendored
View File

@ -1,3 +1,53 @@
freeswitch (1.0.head~git.master.20101015.1-1) unstable; urgency=low
* reintroduced mod_flite
* disabled the patching stuff introduced by Julien ... needs an overwork
* reintroduced mod_tts_commandline
* cleaned up rules file and module make rules
* more trivial changes and updates :)
-- Michal Bielicki <michal.bielicki@seventhsignal.de> Fri, 15 Oct 2010 13:14:02 +0200
freeswitch (1.0.head~git.master.20101014.1-1) unstable; urgency=low
* replaced mod_openzap with mod_freetdm
* added mod_theora
* added mod_codec2
* added mod_amrwb
* added mod_portaudio_stream
* cleaned up rules file and module make rules
* added patches from Julien Duqene (FS-369)
* Various trivial changes and updates :)
-- Michal Bielicki <michal.bielicki@seventhsignal.de> Fri, 15 Oct 2010 05:05:02 +0200
freeswitch (1.0.head~git.master.20100601.2-1) unstable; urgency=low
* Various trivial changes and updates.
* Change upstream package version numbering scheme for unreleased versions:
new format is major.minor.micro~git.branch.date.commits-1
* Change source format to 3.0 (quilt).
* Upgrade debhelper compatibility to version 7.
* Update maintainer data and copyright file; now includes the full text
of the MPL since it is not (yet?) available in /usr/share/common-licenses/
* Build and install mod_file_string.so (FSBUILD-247)
* Work around build failure caused by clean rules for openzap.
* Remove several libraries from explicit dependencies, there were no special
version requirements and they should be picked up by dh_shlibdeps.
* Add dh_makeshlibs and make dh_shlibsdeps work again.
* Move openssl to Suggests: as it is not a required package to install or
run freeswitch.
* Add upstream-convert rule to apply patches, generate orig tarball
and set package version.
* Add check to ensure debian patches are applied before attempting build.
* Fix clean rule to avoid unwanted tree change before building orig.tar
archives with git-buildpackage.
-- Julien Plissonneau Duquene <exp-end-2010-06-88a41947@aqiii.org> Tue, 01 Jun 2010 09:53:44 -0400
freeswitch (1.0.6-1ubuntu1) maverick; urgency=low
[ Gabriel Gunderson ]
@ -15,7 +65,7 @@ freeswitch (1.0.4-1ubuntu2) karmic; urgency=low
* upgrade: Add more verbosity when building to make it easier to find build
errors.
* upgrade: Remove the requirement for EXACTLY automake1.9 and change it to
need atleast automake 1.9
need at least automake 1.9
* upgrade: Add the modules (directory, cluechoo, and valet_parking) to the
build files. These are in the standard build, so they should be here too.
@ -574,7 +624,7 @@ freeswitch (1.0.1-1) unstable; urgency=low
* ADD: reboot option for sip phones to flush_inboud_reg sofia profile api command
* FIX: add small padding to end of mp3 to avoid cut off mp3 recording
* FIX: patch multiple SDP connection lines in sdp for proxy media mode (MODENDP-109)
* FIX: don't parse ringback varable in proxy situations
* FIX: don't parse ringback variable in proxy situations
* ADD: per call vm recording ext with vm_message_ext variable
* ADD: sip_bye_h prefix to add headers to bye
* ENHANCEMENT: more interfaces available in show fsapi command
@ -596,7 +646,7 @@ freeswitch (1.0.1~trunk) unstable; urgency=low
- Added mod_say_es and mod_say_nl
- Updated descriptions
- Added mod_cdr_csv
* Fixed typos and some errors in the previus patch.
* Fixed typos and some errors in the previous patch.
* Modified monit script. Now it should work.
* The debian build system now bootstrap automagically if it's necessary and all scripts are in place.

2
debian/compat vendored
View File

@ -1 +1 @@
4
7

54
debian/control vendored
View File

@ -2,18 +2,22 @@ Source: freeswitch
Section: comm
Priority: extra
Maintainer: FreeSWITCH developers <freeswitch-dev@lists.freeswitch.org>
Uploaders: Michal Bielicki <michal.bielicki@voiceworks.pl>, Gabriel Gunderson <gabe@gundy.org>, William King <quentusrex@gmail.com>, Mathieu Parent <sathieu@debian.org>
Build-Depends: debhelper (>= 5), fakeroot, wget, automake (>=1.9), autoconf, libtool, unixodbc-dev, libasound2-dev, libcurl3-openssl-dev|libcurl4-openssl-dev, libssl-dev, ncurses-dev, libogg-dev, libvorbis-dev, libperl-dev, libgdbm-dev, libdb-dev, libgnutls-dev, libtiff4-dev, python-dev, libx11-dev, uuid-dev
Uploaders: Michal Bielicki <michal.bielicki@seventhsignal.pl>, Gabriel Gunderson <gabe@gundy.org>, William King <quentusrex@gmail.com>, Mathieu Parent <sathieu@debian.org>
Build-Depends: debhelper (>= 7), wget, automake (>=1.9), autoconf, libtool,
unixodbc-dev, libasound2-dev, libcurl3-openssl-dev|libcurl4-openssl-dev,
libssl-dev, ncurses-dev, libogg-dev, libvorbis-dev, libperl-dev, libgdbm-dev,
libdb-dev, libgnutls-dev, libtiff4-dev, python-dev, libx11-dev, uuid-dev
Homepage: http://freeswitch.org/
Standards-Version: 3.9.1
Vcs-Svn: http://svn.freeswitch.org/svn/freeswitch/trunk/
Vcs-Browser: http://fisheye.freeswitch.org/browse/FreeSWITCH
Vcs-Git: git://git.freeswitch.org/freeswitch.git
Vcs-Browser: http://fisheye.freeswitch.org/browse/freeswitch.git
Package: freeswitch
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, unixodbc, libasound2, libcurl3, openssl, libncurses5, libvorbis0a, libuuid1
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: freeswitch-lang-en
Suggests: freeswitch-spidermonkey, freeswitch-lua, freeswitch-perl, freeswitch-sounds-music-8000, monit
Suggests: freeswitch-spidermonkey, freeswitch-lua, freeswitch-perl,
freeswitch-sounds-music-8000, monit, openssl
Description: open source telephony platform
FreeSWITCH is an open source telephony platform designed to facilitate the
creation of voice and chat driven products scaling from a soft-phone up to a
@ -48,8 +52,8 @@ Description: development libraries and header files for FreeSWITCH
gateway or a media server to host IVR applications using simple scripts or XML
to control the callflow.
.
This package contains the include files used if you wish to compile a package which requires FreeSWITCH's
source file headers.
This package contains the include files used if you wish to compile a package
which require FreeSWITCH's source file headers.
Package: freeswitch-spidermonkey
Architecture: any
@ -123,6 +127,19 @@ Description: pass through AMR codec support for FreeSWITCH
.
This package contains the mod_amr codec module.
Package: freeswitch-codec-passthru-amrwb
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch
Description: pass through AMRWB codec support for FreeSWITCH
FreeSWITCH is an open source telephony platform designed to facilitate the
creation of voice and chat driven products scaling from a soft-phone up to a
soft-switch. It can be used as a simple switching engine, a PBX, a media
gateway or a media server to host IVR applications using simple scripts or XML
to control the callflow.
.
This package contains the mod_amrwb codec module.
Package: freeswitch-codec-passthru-g729
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch
@ -139,7 +156,8 @@ Package: freeswitch-lang-en
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch
Recommends: freeswitch-sounds-en-us-callie-8000
Suggests: freeswitch-sounds-en-us-callie-16000, freeswitch-sounds-en-us-callie-32000, freeswitch-sounds-en-us-callie-48000
Suggests: freeswitch-sounds-en-us-callie-16000, freeswitch-sounds-en-us-callie-32000,
freeswitch-sounds-en-us-callie-48000
Description: English language files for FreeSWITCH
FreeSWITCH is an open source telephony platform designed to facilitate the
creation of voice and chat driven products scaling from a soft-phone up to a
@ -219,7 +237,8 @@ Package: freeswitch-lang-ru
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch
Recommends: freeswitch-sounds-ru-ru-elena-8000
Suggests: freeswitch-sounds-ru-ru-elena-16000, freeswitch-sounds-ru-ru-elena-32000, freeswitch-sounds-ru-ru-elena-48000
Suggests: freeswitch-sounds-ru-ru-elena-16000, freeswitch-sounds-ru-ru-elena-32000,
freeswitch-sounds-ru-ru-elena-48000
Description: Russian language files for FreeSWITCH
FreeSWITCH is an open source telephony platform designed to facilitate the
creation of voice and chat driven products scaling from a soft-phone up to a
@ -229,3 +248,18 @@ Description: Russian language files for FreeSWITCH
.
This package contains the mod_say_ru module and available language
configuration files.
Package: freeswitch-freetdm
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, freeswitch
Description: FreeTDM is a signaling and board API abstraction used mainly by the
FreeSWITCH project to place calls in TDM and analog telephony circuits. The library
was previously named "OpenZAP". Sangoma has worked along with the FreeSWITCH
developers in this library so Sangoma's customers can also use it to do custom
development. The library is still under heavy development but the overall API
does not change often. The intention of the library is to present a consistent
API for different telephony signaling stacks and board I/O APIs. FreeTDM can
either be used as a standalone API or along with FreeSWITCH as an endpoint
(mod_freetdm). If you want to use it as a part of FreeSWITCH remember following
the FreeSWITCH configuration section.
This package contains all the freetdm modules and libs and submodules

559
debian/copyright vendored
View File

@ -1,51 +1,538 @@
This package was debianized by Michal Bielicki
<michal.bielicki@voiceworks.pl> on Now 25, 2007.
The current Debian maintainer is Nicholas Amorim <nicholas@montrealconsultoria.com.br>
<michal.bielicki@seventhsignal.de> on Nov 25, 2007.
The source was downloaded from http://www.freewitch.org/
Upstream authors:
Anthony Minessale II <anthmct@yahoo.com>
Portions created by the Initial Developer are Copyright (C) 2006-2009
the Initial Developer. All Rights Reserved.
Upstream maintainers:
Current: Michal Bielicki <michal.bielicki@seventhsignal.de>
Past: Nicholas Amorim <nicholas@montrealconsultoria.com.br>
See changelog.Debian.gz for a full list of contributors.
The PRIMARY AUTHORS are (and/or have been):
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.
Anthony Minessale II <anthmct@yahoo.com> - Primary developer of all core components
and many of the included modules. Much of freeswitch is based on his work.
Michael Jerris <mike@jerris.com> - Windows porter and responsible for the
windows\msvc build system.
The PRIMARY AUTHORS are (and/or have been):
Anthony Minessale II <anthm@freeswitch.org> - Primary developer of all core
components and many of the included modules. Much of freeswitch is based
on his work.
Michael Jerris <mike@jerris.com> - Windows porter and responsible for the
windows\msvc build system.
And here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --
people who have submitted patches, reported bugs, and generally made Freeswitch
that much better:
Brian K. West - For countless hours of work on BSD and Mac support, finding countless bugs, and moral support. Xcode project files.
Joshua Colp - For his help making mod_exosip possible (which we are now getting rid of but oh well),
and for just being a swell guy! (until he backstabbed us, c'est la vie)
Michal "cypromis" Bielicki (michal.bielicki AT voiceworks.pl) - Solaris porting, and autotools enhancements, debian, rpm and solaris packaging.
James Martelletti <james@nerdc0re.com> - All around cool guy (mod_syslog)
Johny Kadarisman <jkr888@gmail.com>
Yossi Neiman of Cartis Solutions, Inc. <freeswitch AT cartissolutions.com> - implementation of mod_cdr (perldd, mysql, csv)
Stefan Knoblich - Various patches and support. Thanks.
Justin Unger - <justinunger at gmail dot com> Lots of help with patches and SIP testing. Thanks!
Paul D. Tinsley - Various patches and support. <pdt at jackhammer.org>
Ken Rice - <krice AT suspicious.org> - xmlcdr, sofia improvements, load testing.
Neal Horman <neal at wanlink dot com> - conference improvements, switch_ivr menu additions and other tweaks.
Johny Kadarisman <jkr888 at gmail.com> - mod_python fixups.
Michael Murdock <mike at mmurdock dot org> - testing, documentation, bug finding and usability enhancements.
Matt Klein <mklein@nmedia.net>
Jonas Gauffin <jonas at gauffin dot org> - Bugfixes and additions in mod_spidermonkey_odbc
Damjan Jovanovic <moctodliamgtavojtodnajmad backwards> - mod_java
Brian K. West - For countless hours of work on BSD and Mac support, finding
countless bugs, and moral support. Xcode project files.
Joshua Colp - For his help making mod_exosip possible (which we are now
getting rid of but oh well), and for just being a swell guy!
Michal "cypromis" Bielicki (michal.bielicki AT voiceworks.pl) - Solaris
porting, and autotools enhancements, debian, rpm and solaris packaging.
James Martelletti <james@nerdc0re.com> - All around cool guy (mod_syslog)
Johny Kadarisman <jkr888@gmail.com>
Yossi Neiman of Cartis Solutions, Inc. <freeswitch AT cartissolutions.com> -
implementation of mod_cdr (perldd, mysql, csv)
Stefan Knoblich - Sofia TLS, various patches and support. Thanks.
Justin Unger - <justinunger at gmail dot com> Lots of help with patches and
SIP testing. Thanks!
Paul D. Tinsley - Various patches and support. <pdt at jackhammer.org>
Ken Rice - <krice AT suspicious.org> - xmlcdr, sofia improvements, load
testing, 1 liners here and there.
Neal Horman <neal at wanlink dot com> - conference improvements, switch_ivr
menu additions and other tweaks.
Johny Kadarisman <jkr888 at gmail.com> - mod_python fixups.
Michael Murdock <mike at mmurdock dot org> - testing, documentation, bug
finding and usability enhancements.
Matt Klein <mklein@nmedia.net>
Jonas Gauffin <jonas at gauffin dot org> - mod_cdr_odbc,
mod_spidermonkey_socket, Bugfixes and additions in mod_spidermonkey_odbc and
mod_spidermonkey, .net event socket library.
Damjan Jovanovic <moctodliamgtavojtodnajmad backwards> - mod_java
Juan Jose Comellas <juanjo@comellas.org> - Patch to switch_utils for arg
parsing.
Dale Thatcher <freeswitch at dalethatcher dot com> - Additions to
mod_conference.
Simon Perreault & Marc Blanchet from Viagenie.ca - IPv6 Support.
A big THANK YOU goes to:
Justin Cassidy - Build related cleanups and automatic build setup.
Bret McDanel - Javascript Documentation, constant feedback and input, many other things I am sure I am forgetting.
Justin Cassidy - Build related cleanups and automatic build setup.
Bret McDanel - Javascript Documentation, constant feedback and input, many
other things I am sure I am forgetting.
MOZILLA PUBLIC LICENSE
Version 1.1
---------------
1. Definitions.
1.0.1. "Commercial Use" means distribution or otherwise making the
Covered Code available to a third party.
1.1. "Contributor" means each entity that creates or contributes to
the creation of Modifications.
1.2. "Contributor Version" means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. "Covered Code" means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. "Electronic Distribution Mechanism" means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. "Executable" means Covered Code in any form other than Source
Code.
1.6. "Initial Developer" means the individual or entity identified
as the Initial Developer in the Source Code notice required by Exhibit
A.
1.7. "Larger Work" means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. "License" means this document.
1.8.1. "Licensable" means having the right to grant, to the maximum
extent possible, whether at the time of the initial grant or
subsequently acquired, any and all of the rights conveyed herein.
1.9. "Modifications" means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. "Original Code" means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this
License is not already Covered Code governed by this License.
1.10.1. "Patent Claims" means any patent claim(s), now owned or
hereafter acquired, including without limitation, method, process,
and apparatus claims, in any patent Licensable by grantor.
1.11. "Source Code" means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus
any associated interface definition files, scripts used to control
compilation and installation of an Executable, or source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. "You" (or "Your") means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this
License or a future version of this License issued under Section 6.1.
For legal entities, "You" includes any entity which controls, is
controlled by, or is under common control with You. For purposes of
this definition, "control" means (a) the power, direct or indirect,
to cause the direction or management of such entity, whether by
contract or otherwise, or (b) ownership of more than fifty percent
(50%) of the outstanding shares or beneficial ownership of such
entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer to use, reproduce,
modify, display, perform, sublicense and distribute the Original
Code (or portions thereof) with or without Modifications, and/or
as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or
selling of Original Code, to make, have made, use, practice,
sell, and offer for sale, and/or otherwise dispose of the
Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are
effective on the date Initial Developer first distributes
Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is
granted: 1) for code that You delete from the Original Code; 2)
separate from the Original Code; or 3) for infringements caused
by: i) the modification of the Original Code or ii) the
combination of the Original Code with other software or devices.
2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor
hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or
trademark) Licensable by Contributor, to use, reproduce, modify,
display, perform, sublicense and distribute the Modifications
created by such Contributor (or portions thereof) either on an
unmodified basis, with other Modifications, as Covered Code
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or
selling of Modifications made by that Contributor either alone
and/or in combination with its Contributor Version (or portions
of such combination), to make, use, sell, offer for sale, have
made, and/or otherwise dispose of: 1) Modifications made by that
Contributor (or portions thereof); and 2) the combination of
Modifications made by that Contributor with its Contributor
Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
effective on the date Contributor first makes Commercial Use of
the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is
granted: 1) for any code that Contributor has deleted from the
Contributor Version; 2) separate from the Contributor Version;
3) for infringements caused by: i) third party modifications of
Contributor Version or ii) the combination of Modifications made
by that Contributor with other software (except as part of the
Contributor Version) or other devices; or 4) under Patent Claims
infringed by Covered Code in the absence of Modifications made by
that Contributor.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be
distributed only under the terms of this License or a future version
of this License released under Section 6.1, and You must include a
copy of this License with every copy of the Source Code You
distribute. You may not offer or impose any terms on any Source Code
version that alters or restricts the applicable version of this
License or the recipients' rights hereunder. However, You may include
an additional document offering the additional rights described in
Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which You contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that
the Modification is derived, directly or indirectly, from Original
Code provided by the Initial Developer and including the name of the
Initial Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If Contributor has knowledge that a license under a third party's
intellectual property rights is required to exercise the rights
granted by such Contributor under Sections 2.1 or 2.2,
Contributor must include a text file with the Source Code
distribution titled "LEGAL" which describes the claim and the
party making the claim in sufficient detail that a recipient will
know whom to contact. If Contributor obtains such knowledge after
the Modification is made available as described in Section 3.2,
Contributor shall promptly modify the LEGAL file in all copies
Contributor makes available thereafter and shall take other steps
(such as notifying appropriate mailing lists or newsgroups)
reasonably calculated to inform those who received the Covered
Code that new knowledge has been obtained.
(b) Contributor APIs.
If Contributor's Modifications include an application programming
interface and Contributor has knowledge of patent licenses which
are reasonably necessary to implement that API, Contributor must
also include this information in the LEGAL file.
(c) Representations.
Contributor represents that, except as disclosed pursuant to
Section 3.4(a) above, Contributor believes that Contributor's
Modifications are Contributor's original creation(s) and/or
Contributor has sufficient rights to grant the rights conveyed by
this License.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code. If it is not possible to put such notice in a particular Source
Code file due to its structure, then You must include such notice in a
location (such as a relevant directory) where a user would be likely
to look for such a notice. If You created one or more Modification(s)
You may add your name as a Contributor to the notice described in
Exhibit A. You must also duplicate this License in any documentation
for the Source Code where You describe recipients' rights or ownership
rights relating to Covered Code. You may choose to offer, and to
charge a fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Code. However, You
may do so only on Your own behalf, and not on behalf of the Initial
Developer or any Contributor. You must make it absolutely clear than
any such warranty, support, indemnity or liability obligation is
offered by You alone, and You hereby agree to indemnify the Initial
Developer and every Contributor for any liability incurred by the
Initial Developer or such Contributor as a result of warranty,
support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of
the Covered Code is available under the terms of this License,
including a description of how and where You have fulfilled the
obligations of Section 3.2. The notice must be conspicuously included
in any notice in an Executable version, related documentation or
collateral in which You describe recipients' rights relating to the
Covered Code. You may distribute the Executable version of Covered
Code or ownership rights under a license of Your choice, which may
contain terms different from this License, provided that You are in
compliance with the terms of this License and that the license for the
Executable version does not attempt to limit or alter the recipient's
rights in the Source Code version from the rights set forth in this
License. If You distribute the Executable version under a different
license You must make it absolutely clear that any terms which differ
from this License are offered by You alone, not by the Initial
Developer or any Contributor. You hereby agree to indemnify the
Initial Developer and every Contributor for any liability incurred by
the Initial Developer or such Contributor as a result of any such
terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description
must be included in the LEGAL file described in Section 3.4 and must
be included with all distributions of the Source Code. Except to the
extent prohibited by statute or regulation, such description must be
sufficiently detailed for a recipient of ordinary skill to be able to
understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation ("Netscape") may publish revised
and/or new versions of the License from time to time. Each version
will be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If You create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), You must (a) rename Your license so that
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
"MPL", "NPL" or any confusingly similar phrase do not appear in your
license (except to note that your license differs from this License)
and (b) otherwise make it clear that Your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial
Developer, Original Code or Contributor in the notice described in
Exhibit A shall not of themselves be deemed to be modifications of
this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
8.2. If You initiate litigation by asserting a patent infringement
claim (excluding declatory judgment actions) against Initial Developer
or a Contributor (the Initial Developer or Contributor against whom
You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly
infringes any patent, then any and all rights granted by such
Participant to You under Sections 2.1 and/or 2.2 of this License
shall, upon 60 days notice from Participant terminate prospectively,
unless if within 60 days after receipt of notice You either: (i)
agree in writing to pay Participant a mutually agreeable reasonable
royalty for Your past and future use of Modifications made by such
Participant, or (ii) withdraw Your litigation claim with respect to
the Contributor Version against such Participant. If within 60 days
of notice, a reasonable royalty and payment arrangement are not
mutually agreed upon in writing by the parties or the litigation claim
is not withdrawn, the rights granted by Participant to You under
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's
Contributor Version, directly or indirectly infringes any patent, then
any rights granted to You by such Participant under Sections 2.1(b)
and 2.2(b) are revoked effective as of the date You first made, used,
sold, distributed, or had made, Modifications made by that
Participant.
8.3. If You assert a patent infringement claim against Participant
alleging that such Participant's Contributor Version directly or
indirectly infringes any patent where such claim is resolved (such as
by license or settlement) prior to the initiation of patent
infringement litigation, then the reasonable value of the licenses
granted by such Participant under Sections 2.1 or 2.2 shall be taken
into account in determining the amount or value of any payment or
license.
8.4. In the event of termination under Sections 8.1 or 8.2 above,
all end user license agreements (excluding distributors and resellers)
which have been validly granted by You or any distributor hereunder
prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a "commercial item," as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
software" and "commercial computer software documentation," as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if
any, provides otherwise), excluding its conflict-of-law provisions.
With respect to disputes in which at least one party is a citizen of,
or an entity chartered or registered to do business in the United
States of America, any litigation relating to this License shall be
subject to the jurisdiction of the Federal Courts of the Northern
District of California, with venue lying in Santa Clara County,
California, with the losing party responsible for costs, including
without limitation, court costs and reasonable attorneys' fees and
expenses. The application of the United Nations Convention on
Contracts for the International Sale of Goods is expressly excluded.
Any law or regulation which provides that the language of a contract
shall be construed against the drafter shall not apply to this
License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or indirectly,
out of its utilization of rights under this License and You agree to
work with Initial Developer and Contributors to distribute such
responsibility on an equitable basis. Nothing herein is intended or
shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
Developer permits you to utilize portions of the Covered Code under
Your choice of the NPL or the alternative licenses, if any, specified
by the Initial Developer in the file described in Exhibit A.
EXHIBIT A -Mozilla Public License.
``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 ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the terms
of the _____ license (the "[___] License"), in which case the
provisions of [______] License are applicable instead of those
above. If you wish to allow use of your version of this file only
under the terms of the [____] License and not to allow others to use
your version of this file under the MPL, indicate your decision by
deleting the provisions above and replace them with the notice and
other provisions required by the [___] License. If you do not delete
the provisions above, a recipient may use your version of this file
under either the MPL or the [___] License."
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. You should
use the text of this Exhibit A rather than the text found in the
Original Code Source Code for Your Modifications.]
You are free to distribute this software under the terms of
the MPL Mozilla Public License. On Debian systems, the complete
text of the GNU General Public License can be found in the file
'/usr/share/common-licenses/MPL'.

View File

@ -0,0 +1 @@
opt/freeswitch/mod/mod_amrwb.so*

6
debian/freeswitch-freetdm.conffiles vendored Normal file
View File

@ -0,0 +1,6 @@
opt/freeswitch/conf/tones.conf
opt/freeswitch/conf/autoload_configs/freetdm.conf.xml
opt/freeswitch/conf/pika.conf
opt/freeswitch/conf/freetdm.conf
opt/freeswitch/conf/wanpipe.conf
opt/freeswitch/conf/zt.conf

10
debian/freeswitch-freetdm.install vendored Normal file
View File

@ -0,0 +1,10 @@
opt/freeswitch/conf/tones.conf
opt/freeswitch/conf/autoload_configs/freetdm.conf.xml
opt/freeswitch/conf/pika.conf
opt/freeswitch/conf/freetdm.conf
opt/freeswitch/conf/wanpipe.conf
opt/freeswitch/conf/zt.conf
opt/freeswitch/lib/libfreetdm.so*
opt/freeswitch/mod/mod_freetdm.so*
opt/freeswitch/mod/ftm*.so*

1
debian/freeswitch-python.config vendored Normal file
View File

@ -0,0 +1 @@
opt/freeswitch/conf/autoload_configs/python.conf.xml

3
debian/freeswitch-python.install vendored Normal file
View File

@ -0,0 +1,3 @@
opt/freeswitch/conf/autoload_configs/python.conf.xml
opt/freeswitch/mod/mod_python.so*
usr/lib/python2.*/*-packages/freeswitch.py*

View File

@ -83,10 +83,8 @@
/opt/freeswitch/conf/ivr_menus/demo_ivr.xml
/opt/freeswitch/conf/jingle_profiles/client.xml
/opt/freeswitch/conf/jingle_profiles/server.xml
/opt/freeswitch/conf/m3ua.conf
/opt/freeswitch/conf/mime.types
/opt/freeswitch/conf/notify-voicemail.tpl
/opt/freeswitch/conf/pika.conf
/opt/freeswitch/conf/sip_profiles/external/example.xml
/opt/freeswitch/conf/sip_profiles/external.xml
/opt/freeswitch/conf/sip_profiles/internal/example.xml
@ -94,8 +92,6 @@
/opt/freeswitch/conf/sip_profiles/internal.xml
/opt/freeswitch/conf/skinny_profiles/internal.xml
/opt/freeswitch/conf/tetris.ttml
/opt/freeswitch/conf/tones.conf
/opt/freeswitch/conf/vars.xml
/opt/freeswitch/conf/voicemail.tpl
/opt/freeswitch/conf/web-vm.tpl
/opt/freeswitch/conf/zt.conf

View File

@ -5,7 +5,7 @@
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The FreeSwitch Voice Switching System
# Short-Description: The FreeSWITCH Voice Switching System
# Description: An advanced platform for voice services
### END INIT INFO
@ -16,7 +16,7 @@
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/opt/freeswitch/bin
DESC="FreeSwitch Voice Switching System"
DESC="FreeSWITCH Voice Switching System"
NAME=freeswitch
DAEMON=/opt/freeswitch/bin/$NAME
USER=freeswitch

View File

@ -1,9 +1,9 @@
opt/freeswitch/bin/freeswitch
opt/freeswitch/bin/fs_cli
opt/freeswitch/bin/fs_encode
opt/freeswitch/bin/fs_ivrd
opt/freeswitch/bin/fsxs
opt/freeswitch/bin/gentls_cert
opt/freeswitch/bin/scripts/*
opt/freeswitch/conf/autoload_configs/acl.conf.xml
opt/freeswitch/conf/autoload_configs/alsa.conf.xml
opt/freeswitch/conf/autoload_configs/callcenter.conf.xml
@ -31,7 +31,6 @@ opt/freeswitch/conf/autoload_configs/memcache.conf.xml
opt/freeswitch/conf/autoload_configs/modules.conf.xml
opt/freeswitch/conf/autoload_configs/nibblebill.conf.xml
opt/freeswitch/conf/autoload_configs/opal.conf.xml
opt/freeswitch/conf/autoload_configs/openzap.conf.xml
opt/freeswitch/conf/autoload_configs/pocketsphinx.conf.xml
opt/freeswitch/conf/autoload_configs/portaudio.conf.xml
opt/freeswitch/conf/autoload_configs/post_load_modules.conf.xml
@ -91,11 +90,8 @@ opt/freeswitch/conf/fur_elise.ttml
opt/freeswitch/conf/ivr_menus/demo_ivr.xml
opt/freeswitch/conf/jingle_profiles/client.xml
opt/freeswitch/conf/jingle_profiles/server.xml
opt/freeswitch/conf/m3ua.conf
opt/freeswitch/conf/mime.types
opt/freeswitch/conf/notify-voicemail.tpl
opt/freeswitch/conf/openzap.conf
opt/freeswitch/conf/pika.conf
opt/freeswitch/conf/sip_profiles/external/example.xml
opt/freeswitch/conf/sip_profiles/external.xml
opt/freeswitch/conf/sip_profiles/internal/example.xml
@ -103,69 +99,71 @@ opt/freeswitch/conf/sip_profiles/internal-ipv6.xml
opt/freeswitch/conf/sip_profiles/internal.xml
opt/freeswitch/conf/skinny_profiles/internal.xml
opt/freeswitch/conf/tetris.ttml
opt/freeswitch/conf/tones.conf
opt/freeswitch/conf/vars.xml
opt/freeswitch/conf/voicemail.tpl
opt/freeswitch/conf/wanpipe.conf
opt/freeswitch/conf/web-vm.tpl
opt/freeswitch/conf/zt.conf
opt/freeswitch/htdocs/*
opt/freeswitch/lib/libfreeswitch*.so*
opt/freeswitch/lib/libopenzap*.so*
opt/freeswitch/mod/mod_avmd.so*
opt/freeswitch/mod/mod_bv.so*
opt/freeswitch/mod/mod_callcenter.so*
opt/freeswitch/mod/mod_cdr_csv.so*
opt/freeswitch/mod/mod_celt.so*
opt/freeswitch/mod/mod_cidlookup.so*
opt/freeswitch/mod/mod_cluechoo.so*
opt/freeswitch/mod/mod_console.so*
opt/freeswitch/mod/mod_codec2.so*
opt/freeswitch/mod/mod_commands.so*
opt/freeswitch/mod/mod_conference.so*
opt/freeswitch/mod/mod_console.so*
opt/freeswitch/mod/mod_curl.so*
opt/freeswitch/mod/mod_db.so*
opt/freeswitch/mod/mod_dialplan*.so*
opt/freeswitch/mod/mod_dingaling.so*
opt/freeswitch/mod/mod_directory.so*
opt/freeswitch/mod/mod_distributor.so*
opt/freeswitch/mod/mod_dptools.so*
opt/freeswitch/mod/mod_easyroute.so*
opt/freeswitch/mod/mod_enum.so*
opt/freeswitch/mod/mod_esf.so*
opt/freeswitch/mod/mod_event_*.so*
opt/freeswitch/mod/mod_expr.so*
opt/freeswitch/mod/mod_spandsp.so*
opt/freeswitch/mod/mod_fifo.so*
opt/freeswitch/mod/mod_file_string.so*
opt/freeswitch/mod/mod_flite.so*
opt/freeswitch/mod/mod_fsv.so*
opt/freeswitch/mod/mod_hash.so*
opt/freeswitch/mod/mod_h26x.so*
opt/freeswitch/mod/mod_ilbc.so*
opt/freeswitch/mod/mod_lcr.so*
opt/freeswitch/mod/mod_db.so*
opt/freeswitch/mod/mod_hash.so*
opt/freeswitch/mod/mod_limit.so*
opt/freeswitch/mod/mod_local_stream.so*
opt/freeswitch/mod/mod_logfile.so*
opt/freeswitch/mod/mod_loopback.so*
opt/freeswitch/mod/mod_memcache.so*
opt/freeswitch/mod/mod_mp4v.so*
opt/freeswitch/mod/mod_native_file.so*
opt/freeswitch/mod/mod_nibblebill.so*
opt/freeswitch/mod/mod_openzap.so
opt/freeswitch/mod/mod_portaudio.so*
opt/freeswitch/mod/mod_portaudio_stream.so*
opt/freeswitch/mod/mod_redis.so*
opt/freeswitch/mod/mod_rss.so*
opt/freeswitch/mod/mod_shout.so*
opt/freeswitch/mod/mod_silk.so*
opt/freeswitch/mod/mod_siren.so*
opt/freeswitch/mod/mod_skinny.so*
opt/freeswitch/mod/mod_skypopen.so*
opt/freeswitch/mod/mod_sndfile.so*
opt/freeswitch/mod/mod_snom.so*
opt/freeswitch/mod/mod_sofia.so*
opt/freeswitch/mod/mod_spandsp.so*
opt/freeswitch/mod/mod_speex.so*
opt/freeswitch/mod/mod_spy.so*
opt/freeswitch/mod/mod_syslog.so*
opt/freeswitch/mod/mod_theora.so*
opt/freeswitch/mod/mod_tone_stream.so*
opt/freeswitch/mod/mod_tts_commandline.so*
opt/freeswitch/mod/mod_valet_parking.so*
opt/freeswitch/mod/mod_vmd.so*
opt/freeswitch/mod/mod_voicemail.so*
opt/freeswitch/mod/mod_xml_*.so*
opt/freeswitch/mod/ozmod_analog_em.so*
opt/freeswitch/mod/ozmod_analog.so*
opt/freeswitch/mod/ozmod_isdn.so*
opt/freeswitch/mod/ozmod_skel.so*
opt/freeswitch/mod/ozmod_ss7_boost.so*
opt/freeswitch/mod/ozmod_wanpipe.so*
opt/freeswitch/mod/ozmod_zt.so*

9
debian/postinst vendored
View File

@ -24,9 +24,16 @@ case "$1" in
if ! getent passwd freeswitch >/dev/null; then
adduser --disabled-password --quiet --system \
--home /opt/freeswitch \
--gecos "FreeSwitch Voice Platform" --ingroup daemon \
--gecos "FreeSWITCH Voice Platform" --ingroup daemon \
freeswitch
adduser freeswitch audio
else
if [ "$(getent passwd freeswitch | cut -d : -f 6)" != "/opt/freeswitch" ]; then
echo "Error: pre-existing freeswitch user with non-standard home directory." >&2
exit 1
fi
usermod -d /opt/freeswitch -c "FreeSWITCH daemon,,," \
-g daemon -G audio freeswitch
fi
mkdir -p /opt/freeswitch

2
debian/postrm vendored
View File

@ -1,5 +1,5 @@
#!/bin/sh
# postrm script for openfire
# postrm script for freeswitch
#
# see: dh_installdeb(1)

190
debian/rules vendored
View File

@ -1,40 +1,40 @@
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS
export DEB_DH_INSTALL_SOURCEDIR=debian/tmp
export PASSTHRU_CODEC_MODULES=codecs/mod_g729 codecs/mod_g723_1 codecs/mod_amr
export PASSTHRU_CODEC_MODULES=codecs/mod_g729 codecs/mod_g723_1 codecs/mod_amr codecs/mod_amrwb
# Modules listed by those built by default, then those that are added in this package
export APPLICATIONS_MODULES=applications/mod_cluechoo applications/mod_commands applications/mod_conference applications/mod_dptools \
applications/mod_enum applications/mod_esf applications/mod_expr applications/mod_fifo applications/mod_fsv \
applications/mod_hash applications/mod_db applications/mod_valet_parking applications/mod_voicemail applications/mod_rss \
applications/mod_spandsp applications/mod_cidlookup applications/mod_curl applications/mod_easyroute \
applications/mod_lcr applications/mod_nibblebill applications/mod_snom \
applications/mod_spy applications/mod_vmd applications/mod_directory applications/mod_callcenter
export ASR_TTS_MODULES=asr_tts/mod_tts_commandline
export CODECS_MODULES=codecs/mod_ilbc codecs/mod_h26x codecs/mod_speex codecs/mod_siren codecs/mod_celt
export DIALPLANS_MODULES=dialplans/mod_dialplan_asterisk dialplans/mod_dialplan_directory dialplans/mod_dialplan_xml
export DIRECTORIES_MODULES=
export DOTNET_MODULES=
export ENDPOINTS_MODULES=endpoints/mod_dingaling endpoints/mod_portaudio endpoints/mod_sofia \
endpoints/mod_loopback ../../libs/openzap/mod_openzap endpoints/mod_skypopen \
endpoints/mod_skinny
export 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
export APPLICATION_MODULES_FM= applications/mod_fifo applications/mod_fsv applications/mod_hash applications/mod_lcr applications/mod_limit \
applications/mod_memcache
export APPLICATION_MODULES_NY= applications/mod_nibblebill applications/mod_redis applications/mod_rss applications/mod_snom \
applications/mod_spandsp applications/mod_spy applications/mod_stress \
applications/mod_valet_parking applications/mod_vmd applications/mod_voicemail
export APPLICATIONS_MODULES= $(APPLICATION_MODULES_AE) $(APPLICATION_MODULES_FM) $(APPLICATION_MODULES_NY) $(APPLICATION_MODULES_VZ)
export ASR_TTS_MODULES= asr_tts/mod_pocketsphinx asr_tts/mod_flite asr_tts/mod_tts_commandline
export CODECS_MODULES= codecs/mod_bv codecs/mod_h26x codecs/mod_speex codecs/mod_celt codecs/mod_codec2 codecs/mod_ilbc codecs/mod_mp4v \
codecs/mod_silk codecs/mod_siren codecs/mod_theora
export DIALPLANS_MODULES= dialplans/mod_dialplan_asterisk dialplans/mod_dialplan_directory dialplans/mod_dialplan_xml
export ENDPOINTS_MODULES= endpoints/mod_dingaling endpoints/mod_portaudio endpoints/mod_sofia endpoints/mod_loopback \
../../libs/freetdm/mod_freetdm endpoints/mod_skypopen endpoints/mod_skinny
export EVENT_HANDLERS_MODULES=event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv
export FORMATS_MODULES=formats/mod_local_stream formats/mod_native_file formats/mod_sndfile formats/mod_tone_stream formats/mod_shout
export FORMATS_MODULES= formats/mod_file_string formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \
formats/mod_shout formats/mod_sndfile formats/mod_tone_stream
export LANGUAGES_MODULES=languages/mod_spidermonkey languages/mod_perl languages/mod_lua languages/mod_python
export LOGGERS_MODULES=loggers/mod_console loggers/mod_logfile loggers/mod_syslog
export SAY_MODULES=say/mod_say_en say/mod_say_it say/mod_say_de say/mod_say_fr say/mod_say_es say/mod_say_nl say/mod_say_ru
export TIMERS_MODULES=
export DISABLED_MODULES=applications/mod_memcache applications/mod_soundtouch directories/mod_ldap languages/mod_java \
asr_tts/mod_cepstral asr_tts/mod_lumenvox endpoints/mod_wanpipe \
event_handlers/mod_event_test event_handlers/mod_radius_cdr event_handlers/mod_zeroconf
export XML_INT_MODULES=xml_int/mod_xml_rpc xml_int/mod_xml_curl xml_int/mod_xml_cdr
export MYMODULES=$(PASSTHRU_CODEC_MODULES) $(APPLICATIONS_MODULES) $(ASR_TTS_MODULES) $(CODECS_MODULES) $(DIALPLANS_MODULES) $(DIRECTORIES_MODULES) $(DOTNET_MODULES) $(ENDPOINTS_MODULES) $(EVENT_HANDLERS_MODULES) $(FORMATS_MODULES) $(LANGUAGES_MODULES) $(LOGGERS_MODULES) $(SAY_MODULES) $(TIMERS_MODULES) $(XML_INT_MODULES)
export MYMODULES= $(PASSTHRU_CODEC_MODULES) $(APPLICATIONS_MODULES) $(ASR_TTS_MODULES) $(CODECS_MODULES) $(DIALPLANS_MODULES) $(ENDPOINTS_MODULES) $(EVENT_HANDLERS_MODULES) $(FORMATS_MODULES) $(LANGUAGES_MODULES) $(LOGGERS_MODULES) $(SAY_MODULES) $(XML_INT_MODULES)
export MODULES=$(MYMODULES)
ifndef AUTOCONF
AUTOCONFS := $(wildcard /usr/bin/autoconf*)
AUTOCONF = $(shell which autoconf)
@ -57,6 +57,116 @@ ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
FEATURES += --disable-optimization
endif
.pc/applied-patches:
@echo
@echo \ \ Sorry, currently this package cannot be built directly from upstream
@echo \ \ source git/tarball: patches are needed for policy compliance, and the
@echo \ \ "new 3.0 (quilt) source format requires patches to be already applied."
@echo
@echo \ \ Please first convert this tree by running:
@echo -e \\t./debian/rules upstream-convert
@echo
@echo \ \ Note that this will insert an entry in debian/changelog, rename the
@echo \ \ current directory to the version number there, create a .orig.tar.bz2
@echo \ \ archive and apply all the patches in debian/patches/series.
@echo
@echo \ \ Using git-buildpackage is not recommended for now.
@echo
@exit 1
upstream-convert:
@dh_testdir
@test -s .pc/applied-patches && \
echo "Aborted: patches are already applied." && \
exit 1 || exit 0
# update (or not) version number in debian/changelog
@set -e ; \
echo Checking version number ; \
v1="$$(dpkg-parsechangelog | sed -e '/^Version: / ! d' -e 's/^Version: //')" ; \
v2="$${v1}" ; \
echo " Current version: $${v1}" ; \
if [ "$$(which git)" = "" -o ! -d .git ] ; then \
echo Git not available. Keeping current version number. ; \
exit 0 ; \
fi ; \
if [ "$$(which debchange)" = "" ] ; then \
echo debchange not available. Keeping current version number. ; \
exit 0 ; \
fi ; \
if echo -n "$${v1}" | grep -q '~git\.[a-z0-9]\+\.20[0-9]\{6\}\.[0-9]\+-[^-]\+$$' ; then \
maj1="$$(echo -n "$${v1}" | sed -e 's/^\([^.]\+\)\..*$$/\1/')" ; \
min1="$$(echo -n "$${v1}" | sed -e 's/^[^.]\+\.\([^.]\+\)\..*$$/\1/')" ; \
mic1="$$(echo -n "$${v1}" | sed -e 's/^[^.]\+\.[^.]\+\.\([a-zA-Z0-9]\+\).*$$/\1/')" ; \
b1="$$(echo -n "$${v1}" | sed -e 's/^.*~git\.\([a-z0-9]\+\)\.\(20[0-9]\{6\}\)\.[0-9]\+-[^-]\+$$/\1/')" ; \
d1="$$(echo -n "$${v1}" | sed -e 's/^.*\.\(20[0-9]\{6\}\)\.[0-9]\+-[^-]\+$$/\1/')" ; \
n1="$$(echo -n "$${v1}" | sed -e 's/^.*\.20[0-9]\{6\}\.\([0-9]\+\)-[^-]\+$$/\1/')" ; \
maj2="$$(sed -e '/^AC_SUBST(SWITCH_VERSION_MAJOR/ ! d' -e 's/^.*\[\([^\[]\+\)\][^\]]*$$/\1/' configure.in)" ; \
min2="$$(sed -e '/^AC_SUBST(SWITCH_VERSION_MINOR/ ! d' -e 's/^.*\[\([^\[]\+\)\][^\]]*$$/\1/' configure.in)" ; \
mic2="$$(sed -e '/^AC_SUBST(SWITCH_VERSION_MICRO/ ! d' -e 's/^.*\[\([^\[]\+\)\][^\]]*$$/\1/' configure.in)" ; \
b2="$$(git branch | sed -e '/^[^*]/ d' -e 's/* \(.*\)/\1/')" ; \
d2="$$(TZ=UTC git log --date=local -1 --format='%ai' | sed -e 's/^\(....\).\(..\).\(..\).*$$/\1\2\3/')" ; \
n2="$$(TZ=UTC git log --date=local --format=oneline --since="$${d2::4}-$${d2:4:2}-$${d2:6:2} 00:00" | wc -l)" ; \
if [ "$${b2}" != "$$(echo "$${b2}" | tr -dc a-z0-9)" ] ; then \
echo Invalid branch name "'$${b2}'". Aborted. ; \
exit 1; \
fi ; \
if [ "$${b1}.$${d1}.$${n1}" != "$${b2}.$${d2}.$${n2}" \
-o "$${maj1}.$${min1}.$${mic1}" != "$${maj2}.$${min2}.$${mic2}" ] ; then \
v2="$$(echo -n "$${maj2}.$${min2}.$${mic2}")" ; \
v2="$${v2}$$(echo -n "$${v1}" | sed -e 's/^[^.]\+\.[^.]\+\.[^.]\+\(.*\)~git\..*$$/\1/')" ; \
v2="$${v2}~git.$${b2}.$${d2}.$${n2}-1" ; \
echo " New version: $${v2}" ; \
echo Updating debian/changelog with new version number ; \
debchange -v "$${v2}" "New upstream release" ; \
else \
echo Version number already correct, no change. ; \
fi ; \
else \
echo 'Not a ~git. version number. Keeping current version number.' ; \
fi
# rename (or not) current directory to match packagename-version.number
@set -e ; \
echo Checking directory name ; \
d1="$$(basename "$$(cd . && echo "$$PWD")")" ; \
d2="$$(dpkg-parsechangelog | sed -e '/^Source: / ! d' -e 's/^Source: //')" ; \
d2="$${d2}-$$(dpkg-parsechangelog | sed -e '/^Version: / ! d' -e 's/^Version: \(.*\)-[^-]\+$$/\1/')" ; \
if [ "$${d1}" != "$${d2}" ] ; then \
if [ -e "../$${d2}" ] ; then \
test . -ef "../$${d2}" && exit 0 ; \
echo Aborted: directory "../$${d2}" already exists. ; \
exit 1 ; \
fi ; \
echo Renaming current directory to "$${d2}" ; \
mv ../$${d1} ../$${d2} ; \
fi
# create .orig.tar.bz2
@set -e ; \
n="$$(dpkg-parsechangelog | sed -e '/^Source: / ! d' -e 's/^Source: //')" ; \
d="$${n}-$$(dpkg-parsechangelog | sed -e '/^Version: / ! d' -e 's/^Version: \(.*\)-[^-]\+$$/\1/')" ; \
n="$${n}_$$(dpkg-parsechangelog | sed -e '/^Version: / ! d' -e 's/^Version: \(.*\)-[^-]\+$$/\1/').orig.tar.bz2" ; \
echo "Creating source archive $${n}" ; \
cd .. && tar cjf "$${n}" --exclude='.git*' "$${d}"
# apply patches
@set -e ; \
echo "Applying patches in debian/patches/series" ; \
QUILT_PATCHES=debian/patches ; \
export QUILT_PATCHES ; \
while quilt next ; do \
quilt push -v ; \
quilt refresh ; \
done
# remind user to change dir
@echo Done.
@echo
@if [ "$(CURDIR)" != "$$PWD" ] ; then \
echo \ \ You should now tell your shell to update its current working directory: ; \
echo -e \\t'cd $$(pwd)' ; \
echo \ \ or ; \
echo -e "\\tcd $$PWD" ; \
echo ; \
fi
config.status: configure
dh_testdir
rm -f modules.conf
@ -65,15 +175,12 @@ config.status: configure
for i in $(MODULES); do echo $$i >> modules.conf; done
./configure --prefix=/opt/freeswitch --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) ${FEATURES}
configure:
if test ! -f Makefile.in ; then \
if test -f ./bootstrap.sh ; then \
AUTOCONF=${AUTOCONF} ./bootstrap.sh ; \
else \
echo "No Makefile.in and no known way to bootstrap." ; \
exit 1; \
fi; \
fi;
configure: bootstrap.sh # .pc/applied-patches
dh_testdir
test -e /usr/share/misc/config.sub && cp -f /usr/share/misc/config.sub build/config/config.sub
test -e /usr/share/misc/config.guess && cp -f /usr/share/misc/config.guess build/config/config.guess
AUTOCONF=${AUTOCONF} ./bootstrap.sh
build: build-stamp
build-stamp: config.status
@ -83,19 +190,13 @@ build-stamp: config.status
touch $@
clean:
clean: # .pc/applied-patches
dh_testdir
dh_testroot
rm -f build-stamp
-$(MAKE) update-clean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub build/config/config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess build/config/config.guess
endif
rm -f config.status
rm -f configure config.status
rm -f */*/config.status
rm -f */*/*/config.status
dh_clean
@ -103,8 +204,8 @@ endif
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -A --sourcedir=debian/tmp
dh_prep
dh_installdirs -A
VERBOSE=1 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
@ -123,11 +224,12 @@ binary-arch: build install
cp debian/monit/freeswitch.monitrc debian/freeswitch/etc/monit/freeswitch.monitrc
dh_install --sourcedir=debian/tmp
dh_link
dh_strip --dbg-package=freeswitch
dh_strip --dbg-package=freeswitch-dbg
dh_compress
dh_fixperms --exclude /opt/freeswitch/conf
dh_makeshlibs
dh_shlibdeps
dh_installdeb
dh_shlibdeps --exclude=/opt/freeswitch
dh_gencontrol
dh_md5sums
dh_builddeb

View File

@ -1,3 +1,12 @@
freeswitch-sounds-en-us-callie (1.0.head-git.master,20101014.1-1) unstable; urgency=low
* Change upstream package version numbering scheme for unreleased versions:
new format is major.minor.micro~git.branch.date.commits-1
* Change source format to 3.0 (quilt).
* Upgrade debhelper compatibility to version 7.
-- Michal Bielicki <michal.bielicki@seventhsignal.de> Fr, 14 Oct 2010 05:05:02 +0200
freeswitch-sounds-en-us-callie (1.0.12-0ubuntu1) jaunty; urgency=low
* Initial: This is the initial working build of the en-us-callie sounds

View File

@ -2,8 +2,9 @@ Source: freeswitch-sounds-en-us-callie
Maintainer: Freeswitch Debian Team <debian@freeswitch.org>
Section: net
Priority: extra
Build-Depends: debhelper (>= 5), fakeroot, sox
Standards-Version: 3.7.3
Build-Depends: debhelper (>= 7), sox
Homepage: http://www.freeswitch.org/
Standards-Version: 3.8.4
Package: freeswitch-sounds-en-us-callie-8000
Architecture: all
@ -47,14 +48,18 @@ Description: English language sounds for the FreeSWITCH(TM) (48000)
Package: freeswitch-sounds-en-us-callie
Architecture: all
Depends: sox, freeswitch-sounds-en-us-callie-48000
Conflicts: freeswitch-sounds-en-us-callie-omega, freeswitch-sounds-en-us-callie-8000, freeswitch-sounds-en-us-callie-16000, freeswitch-sounds-en-us-callie-32000
Conflicts: freeswitch-sounds-en-us-callie-omega,
freeswitch-sounds-en-us-callie-8000, freeswitch-sounds-en-us-callie-16000,
freeswitch-sounds-en-us-callie-32000
Description: English language files for FreeSWITCH(TM)
This package generates the 8k, 16k, and 32k from the installed 48k
sounds. You can select which ones you want.
Package: freeswitch-sounds-en-us-callie-omega
Architecture: all
Depends: freeswitch-sounds-en-us-callie-48000, freeswitch-sounds-en-us-callie-32000, freeswitch-sounds-en-us-callie-16000, freeswitch-sounds-en-us-callie-8000
Depends: freeswitch-sounds-en-us-callie-48000,
freeswitch-sounds-en-us-callie-32000, freeswitch-sounds-en-us-callie-16000,
freeswitch-sounds-en-us-callie-8000
Conflicts: freeswitch-sounds-en-us-callie
Description: English language files for FreeSWITCH(TM)
This package depends on the pregenerated 8khz, 16khz, 32khz, and 48khz sounds

View File

@ -1,3 +1,12 @@
freeswitch-sounds-music (1.0.head-git.master,20101014.1-1) unstable; urgency=low
* Change upstream package version numbering scheme for unreleased versions:
new format is major.minor.micro~git.branch.date.commits-1
* Change source format to 3.0 (quilt).
* Upgrade debhelper compatibility to version 7.
-- Michal Bielicki <michal.bielicki@seventhsignal.de> Fr, 14 Oct 2010 05:05:02 +0200
freeswitch-sounds-music (1.0.8-0ubuntu3) jaunty; urgency=low
* Fixed: empty binary files for some packages

View File

@ -1,9 +1,10 @@
Source: freeswitch-sounds-music
Maintainer: Freeswitch Debian Team <debian@freeswitch.org>
Maintainer: Freeswitch development Team <freeswitch-dev@freeswitch.org>
Section: net
Priority: extra
Build-Depends: debhelper (>= 5), fakeroot, sox
Standards-Version: 3.7.3
Build-Depends: debhelper (>= 7), sox
Homepage: http://www.freeswitch.org/
Standards-Version: 3.8.4
Package: freeswitch-sounds-music-8000
Architecture: all
@ -47,14 +48,18 @@ Description: music for FreeSWITCH(TM) (48000)
Package: freeswitch-sounds-music
Architecture: all
Depends: sox, freeswitch-sounds-music-48000
Conflicts: freeswitch-sounds-music-omega, freeswitch-sounds-music-8000, freeswitch-sounds-music-16000, freeswitch-sounds-music-32000
Conflicts: freeswitch-sounds-music-omega,
freeswitch-sounds-music-8000, freeswitch-sounds-music-16000,
freeswitch-sounds-music-32000
Description: Music for FreeSWITCH(TM)
This package generates the 8k, 16k, and 32k from the installed 48k
sounds. You can select which ones you want.
Package: freeswitch-sounds-music-omega
Architecture: all
Depends: freeswitch-sounds-music-48000, freeswitch-sounds-music-32000, freeswitch-sounds-music-16000, freeswitch-sounds-music-8000
Depends: freeswitch-sounds-music-48000,
freeswitch-sounds-music-32000, freeswitch-sounds-music-16000,
freeswitch-sounds-music-8000
Conflicts: freeswitch-sounds-music
Description: Music for FreeSWITCH(TM)
This package depends on the pregenerated 8khz, 16khz, 32khz, and 48khz sounds

View File

@ -1,3 +1,12 @@
freeswitch-sounds-ru-ru-elena (1.0.head-git.master,20101014.1-1) unstable; urgency=low
* Change upstream package version numbering scheme for unreleased versions:
new format is major.minor.micro~git.branch.date.commits-1
* Change source format to 3.0 (quilt).
* Upgrade debhelper compatibility to version 7.
-- Michal Bielicki <michal.bielicki@seventhsignal.de> Fr, 14 Oct 2010 05:05:02 +0200
freeswitch-sounds-ru-ru-elena (1.0.12-0ubuntu3) jaunty; urgency=low
* Fixed: Empty binary package bug caused by the second ru folder being

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

1
debian/substvars vendored
View File

@ -1 +0,0 @@
shlibs:Depends=libc6 (>= 2.3.6-6), libdb4.4, libgcc1 (>= 1:4.1.1-12), libsasl2-2, libssl0.9.8 (>= 0.9.8c-1), libstdc++6 (>= 4.1.1-12), libuuid1, zlib1g (>= 1:1.2.1)

View File

@ -384,14 +384,14 @@
<prompt phrase="Good morning." filename="ivr-good_morning.wav"/>
<prompt phrase="Good afternoon." filename="ivr-good_afternoon.wav"/>
<prompt phrase="Good evening." filename="ivr-good_evening.wav"/>
<prompt phrase="Thank you." filename="ivr-Thank you.wav"/>
<prompt phrase="Thank you." filename="ivr-Thank_you.wav"/>
<prompt phrase="For..." filename="ivr-for.wav"/>
<prompt phrase="We are experiencing longer than usual hold times." filename="ivr-longer_than_usual_hold_times.wav"/>
<prompt phrase="You are the..." filename="ivr-you_are_the.wav"/>
<prompt phrase="One moment please." filename="ivr-one_moment_please.wav"/>
<prompt phrase="Your call will be answered in the order it was received." filename="ivr-call_answered_order_received.wav"/>
<prompt phrase="Please enter the conference number, followed by the pound key" filename="conf-enter_conf_number.wav"/>
<prompt phrase="Enter the conference PIN number, followed by the pound key." filename="ivr-enter_conf_pin.wav"/>
<prompt phrase="Enter the conference PIN number, followed by the pound key." filename="conf-enter_conf_pin.wav"/>
<prompt phrase="...has entered the conference." filename="conf-has_joined.wav"/>
<prompt phrase="...has left the conference." filename="conf-has_left.wav"/>
<prompt phrase="You entered..." filename="ivr-you_entered.wav"/>
@ -403,27 +403,30 @@
<prompt phrase="If this is correct, press 1. If not, press 2." filename="ivr-if_correct_one_if_not_two.wav"/>
<prompt phrase="To repeat this information..." filename="ivr-repeat_this_information.wav"/>
<prompt phrase="No no no!" filename="ivr-no_no_no.wav"/>
<prompt phrase="Do you mean to press that key?" filename="ivr-did_you_mean_to_press_key.wav"/>
<prompt phrase="Did you mean to press that key?" filename="ivr-did_you_mean_to_press_key.wav"/>
<prompt phrase="Seriously. Did you REALLY mean to press that key?" filename="ivr-seriously_mean_to_press_key.wav"/>
<prompt phrase="Oh what-EVER." filename="ivr-oh_whatever.wav"/>
<prompt phrase="That's it! One more mistake and I WILL hang up on your ass." filename="ivr-one_more_mistake.wav"/>
<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. Please stay on the line and your call will be answered in the order it was received." filename="ivr-engineers_busy_assisting_other_sales.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="The person you are trying to reach is not available and does not have voicemail." filename="vm-not_available_no_voicemail.wav"/>
<prompt phrase="This message will self-destruct in 5, 4, 3, 2, 1..." filename="ivr-message_self_destruct.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="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="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="Please enter the first few letters of the person's first or last name" filename="dir-enter_person_first_or_last.wav"/>
<prompt phrase="There are no calls waiting in this queue." filename="ivr-no_calls_waiting_in_queue.wav"/>
<prompt phrase="Brian West" filename="misc-Brian_West.wav"/>
<prompt phrase="Anthony Minessale" filename="misc-Anthony_Minessale.wav"/>
<prompt phrase="Michael Jerris" filename="misc-Michael_Jerris.wav"/>
@ -435,7 +438,7 @@
<prompt phrase="Andrew Thompson" filename="misc-Andrew_Thompson.wav"/>
<prompt phrase="Graham Saathoff" filename="misc-Graham_Saathoff.wav"/>
<prompt phrase="Nicholaus Belluni" filename="misc-Nicholaus_Belluni.wav"/>
<prompt phrase="Sean Heiney" filename="misc-Sean_Heiney.wav">
<prompt phrase="Sean Heiney" filename="misc-Sean_Heiney.wav"/>
</ivr>
<misc>
<prompt phrase="This call has been secured" filename="call_secured.wav"/>

View File

@ -331,7 +331,7 @@ 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_db applications/mod_directory \
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"
APPLICATION_MODULES_FM="applications/mod_fifo applications/mod_fsv applications/mod_hash applications/mod_lcr applications/mod_limit \
@ -753,6 +753,7 @@ fi
%{prefix}/mod/mod_console.so*
%{prefix}/mod/mod_commands.so*
%{prefix}/mod/mod_conference.so*
%{prefix}/mod/mod_curl.so*
%{prefix}/mod/mod_db.so*
%{prefix}/mod/mod_dialplan_asterisk.so*
%{prefix}/mod/mod_dialplan_directory.so*
@ -949,6 +950,8 @@ fi
#
######################################################################################################################
%changelog
* Fri Oct 15 2010 - michal.bielicki@seventhsignal.de
- added mod_curl
* Sat Oct 09 2010 - michal.bielicki@seventhsignal.de
- added mod_silk
- added mod_codec2

View File

@ -1,4 +1,4 @@
LOCAL_CFLAGS=-I../src/include -I/usr/java/jdk1.6.0_14/include -I/usr/java/jdk1.6.0_14/include/linux
LOCAL_CFLAGS=-I../src/include -I/usr/java/jdk1.6.0_14/include -I/usr/java/jdk1.6.0_14/include/linux -I/usr/lib/jvm/java-6-openjdk/include/
GCC_WARNING_JUNK=-w
CLASSES=org/freeswitch/esl/*

View File

@ -11,6 +11,20 @@ config.*
configure
libtool
aclocal.m4
build/libtool.m4
build/ltoptions.m4
build/ltsugar.m4
build/ltversion.m4
build/lt~obsolete.m4
testanalog
testapp
testboost
testcid
testpri
testr2
testsangomaboost
testtones
!/sample/boost/Makefile
!/sample/dso/Makefile

View File

@ -29,29 +29,34 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PREFIX = $(prefix)
SRC = src
ACLOCAL_AMFLAGS = -I build
AUTOMAKE_OPTIONS = foreign
SRC = src
moddir = @modinstdir@
libdir = @libdir@
library_includedir = $(PREFIX)/include
library_includedir = $(prefix)/include
INCS = -I$(FT_SRCDIR)/$(SRC)/include -I$(FT_SRCDIR)/$(SRC)/isdn/include -I$(FT_SRCDIR)/$(SRC)/include/private
INCS += -I$(FT_SRCDIR)/$(SRC)/ftmod/ftmod_sangoma_boost
if SNGSS7
INCS += -I/usr/include/sng_ss7/
endif
if SNGISDN
INCS += -I/usr/include/sng_isdn/
INCS = -I$(FT_SRCDIR)/$(SRC)/include -I$(FT_SRCDIR)/$(SRC)/include/private
INCS += -I$(FT_SRCDIR)/$(SRC)/ftmod/ftmod_sangoma_boost
if HAVE_SNG_SS7
INCS += -I/usr/include/sng_ss7
endif
MY_CFLAGS = $(INCS) $(FTDM_CFLAGS) -DFTDM_CONFIG_DIR=\"@confdir@\" -DFTDM_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_CFLAGS@ @DEFS@
COMPILE = $(CC) $(MY_CFLAGS) $(INCS)
if HAVE_SNG_ISDN
INCS += -I/usr/include/sng_isdn
endif
FTDM_COMPAT_CFLAGS = $(INCS) -DFTDM_CONFIG_DIR=\"@confdir@\" -DFTDM_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_COMPAT_CFLAGS@ @DEFS@
FTDM_CFLAGS = $(INCS) -DFTDM_CONFIG_DIR=\"@confdir@\" -DFTDM_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_CFLAGS@ @DEFS@
COMPILE = $(CC) $(FTDM_CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE)
LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(MY_CFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(FTDM_CFLAGS) $(LDFLAGS) -o $@
if DEBUGDTMF
MY_CFLAGS += -DFTDM_DEBUG_DTMF
if WANT_DEBUGDTMF
FTDM_CFLAGS += -DFTDM_DEBUG_DTMF
endif
@ -68,265 +73,226 @@ pkgconfig_DATA = freetdm.pc
# libfreetdm
#
libfreetdm_la_SOURCES = \
$(SRC)/hashtable.c \
$(SRC)/hashtable_itr.c \
$(SRC)/ftdm_io.c \
$(SRC)/ftdm_queue.c \
$(SRC)/ftdm_sched.c \
$(SRC)/ftdm_call_utils.c \
$(SRC)/ftdm_config.c \
$(SRC)/ftdm_callerid.c \
$(SRC)/fsk.c \
$(SRC)/uart.c \
$(SRC)/g711.c \
$(SRC)/libteletone_detect.c \
$(SRC)/libteletone_generate.c \
$(SRC)/ftdm_buffer.c \
$(SRC)/ftdm_threadmutex.c \
$(SRC)/ftdm_dso.c \
$(SRC)/ftdm_cpu_monitor.c
$(SRC)/hashtable.c \
$(SRC)/hashtable_itr.c \
$(SRC)/ftdm_io.c \
$(SRC)/ftdm_queue.c \
$(SRC)/ftdm_sched.c \
$(SRC)/ftdm_call_utils.c \
$(SRC)/ftdm_config.c \
$(SRC)/ftdm_callerid.c \
$(SRC)/fsk.c \
$(SRC)/uart.c \
$(SRC)/g711.c \
$(SRC)/libteletone_detect.c \
$(SRC)/libteletone_generate.c \
$(SRC)/ftdm_buffer.c \
$(SRC)/ftdm_threadmutex.c \
$(SRC)/ftdm_dso.c \
$(SRC)/ftdm_cpu_monitor.c
library_include_HEADERS = \
$(SRC)/include/freetdm.h \
$(SRC)/include/ftdm_declare.h \
$(SRC)/include/ftdm_threadmutex.h \
$(SRC)/include/ftdm_os.h \
$(SRC)/include/ftdm_dso.h
$(SRC)/include/freetdm.h \
$(SRC)/include/ftdm_declare.h \
$(SRC)/include/ftdm_threadmutex.h \
$(SRC)/include/ftdm_os.h \
$(SRC)/include/ftdm_dso.h
lib_LTLIBRARIES = libfreetdm.la
libfreetdm_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
libfreetdm_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
libfreetdm_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS)
libfreetdm_la_LIBADD = $(LIBS)
MYLIB = libfreetdm.la
core: libfreetdm.la
core-install: install-libLTLIBRARIES
#
# tools & test programs
#
noinst_PROGRAMS = testtones detect_tones detect_dtmf testpri testr2 testanalog testapp testcid #testisdn
if HAVE_SCTP
noinst_PROGRAMS += testboost
endif
noinst_PROGRAMS = testtones detect_tones detect_dtmf testpri testr2 testanalog testapp testcid
noinst_PROGRAMS += testsangomaboost
testapp_SOURCES = $(SRC)/testapp.c
testapp_LDADD = libfreetdm.la
testapp_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
testapp_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
testcid_SOURCES = $(SRC)/testcid.c
testcid_LDADD = libfreetdm.la
testcid_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
testcid_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
testtones_SOURCES = $(SRC)/testtones.c
testtones_LDADD = libfreetdm.la
testtones_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
testtones_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
detect_tones_SOURCES = $(SRC)/detect_tones.c
detect_tones_LDADD = libfreetdm.la
detect_tones_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
detect_tones_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
detect_dtmf_SOURCES = $(SRC)/detect_dtmf.c
detect_dtmf_LDADD = libfreetdm.la
detect_dtmf_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
detect_dtmf_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
#testisdn_SOURCES = $(SRC)/testisdn.c
#testisdn_LDADD = libfreetdm.la
#testisdn_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
#testisdn_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
testpri_SOURCES = $(SRC)/testpri.c
testpri_LDADD = libfreetdm.la
testpri_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
testpri_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
testr2_SOURCES = $(SRC)/testr2.c
testr2_LDADD = libfreetdm.la
testr2_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
testr2_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
if HAVE_SCTP
noinst_PROGRAMS += testboost
testboost_SOURCES = $(SRC)/testboost.c
testboost_LDADD = libfreetdm.la
testboost_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
testboost_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
endif
testsangomaboost_SOURCES = $(SRC)/testsangomaboost.c
testsangomaboost_LDADD = libfreetdm.la
testsangomaboost_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
testsangomaboost_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
testanalog_SOURCES = $(SRC)/testanalog.c
testanalog_LDADD = libfreetdm.la
testanalog_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
testanalog_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
#
# ftmod modules
#
mod_LTLIBRARIES = ftmod_zt.la ftmod_skel.la ftmod_analog.la ftmod_analog_em.la #ftmod_isdn.la
if HAVE_SCTP
mod_LTLIBRARIES += ftmod_sangoma_boost.la
endif
if LIBSANGOMA
mod_LTLIBRARIES += ftmod_wanpipe.la
endif
if LIBPRI
mod_LTLIBRARIES += ftmod_libpri.la
endif
if PRITAP
mod_LTLIBRARIES += ftmod_pritap.la
endif
if SNGSS7
mod_LTLIBRARIES += ftmod_sangoma_ss7.la
endif
if SNGISDN
mod_LTLIBRARIES += ftmod_sangoma_isdn.la
endif
if OPENR2
mod_LTLIBRARIES += ftmod_r2.la
endif
mod_LTLIBRARIES = ftmod_zt.la ftmod_skel.la ftmod_analog.la ftmod_analog_em.la
ftmod_zt_la_SOURCES = $(SRC)/ftmod/ftmod_zt/ftmod_zt.c
ftmod_zt_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
ftmod_zt_la_LDFLAGS = -module -avoid-version
ftmod_zt_la_LIBADD = $(MYLIB)
ftmod_zt_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
ftmod_zt_la_LDFLAGS = -shared -module -avoid-version
ftmod_zt_la_LIBADD = libfreetdm.la
ftmod_skel_la_SOURCES = $(SRC)/ftmod/ftmod_skel/ftmod_skel.c
ftmod_skel_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
ftmod_skel_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
ftmod_skel_la_LDFLAGS = -module -avoid-version
ftmod_skel_la_LIBADD = $(MYLIB)
if LIBSANGOMA
ftmod_wanpipe_la_SOURCES = $(SRC)/ftmod/ftmod_wanpipe/ftmod_wanpipe.c
ftmod_wanpipe_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe
ftmod_wanpipe_la_LDFLAGS = -module -avoid-version -lsangoma
ftmod_wanpipe_la_LIBADD = $(MYLIB)
endif
#ftmod_isdn_la_SOURCES = \
#$(SRC)/isdn/EuroISDNStateNT.c \
#$(SRC)/isdn/EuroISDNStateTE.c \
#$(SRC)/isdn/mfifo.c \
#$(SRC)/isdn/Q921.c \
#$(SRC)/isdn/Q931api.c \
#$(SRC)/isdn/Q931.c \
#$(SRC)/isdn/Q931ie.c \
#$(SRC)/isdn/Q931mes.c \
#$(SRC)/isdn/Q931StateNT.c \
#$(SRC)/isdn/Q931StateTE.c \
#$(SRC)/isdn/nationalmes.c \
#$(SRC)/isdn/nationalStateNT.c \
#$(SRC)/isdn/nationalStateTE.c \
#$(SRC)/isdn/DMSmes.c \
#$(SRC)/isdn/DMSStateNT.c \
#$(SRC)/isdn/DMSStateTE.c \
#$(SRC)/isdn/5ESSmes.c \
#$(SRC)/isdn/5ESSStateNT.c \
#$(SRC)/isdn/5ESSStateTE.c \
#$(SRC)/isdn/Q932mes.c \
#$(SRC)/ftmod/ftmod_isdn/ftmod_isdn.c
#ftmod_isdn_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS) -D_GNU_SOURCE
#ftmod_isdn_la_LDFLAGS = $(PCAP_LIB_FLAGS) -module -avoid-version
#ftmod_isdn_la_LIBADD = $(MYLIB)
ftmod_skel_la_LIBADD = libfreetdm.la
ftmod_analog_la_SOURCES = $(SRC)/ftmod/ftmod_analog/ftmod_analog.c
ftmod_analog_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
ftmod_analog_la_LDFLAGS = -module -avoid-version
ftmod_analog_la_LIBADD = $(MYLIB)
ftmod_analog_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
ftmod_analog_la_LDFLAGS = -shared -module -avoid-version
ftmod_analog_la_LIBADD = libfreetdm.la
ftmod_analog_em_la_SOURCES = $(SRC)/ftmod/ftmod_analog_em/ftmod_analog_em.c
ftmod_analog_em_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
ftmod_analog_em_la_LDFLAGS = -module -avoid-version
ftmod_analog_em_la_LIBADD = $(MYLIB)
ftmod_analog_em_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
ftmod_analog_em_la_LDFLAGS = -shared -module -avoid-version
ftmod_analog_em_la_LIBADD = libfreetdm.la
if HAVE_LIBSANGOMA
mod_LTLIBRARIES += ftmod_wanpipe.la
ftmod_wanpipe_la_SOURCES = $(SRC)/ftmod/ftmod_wanpipe/ftmod_wanpipe.c
#some structures within Wanpipe drivers are not c99 compatible, so we need to compile ftmod_wanpipe
#without c99 flags
ftmod_wanpipe_la_CFLAGS = $(AM_CFLAGS) $(FTDM_COMPAT_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe
ftmod_wanpipe_la_LDFLAGS = -shared -module -avoid-version -lsangoma
ftmod_wanpipe_la_LIBADD = libfreetdm.la
endif
if HAVE_LIBISDN
mod_LTLIBRARIES += ftmod_isdn.la
ftmod_isdn_la_SOURCES = $(SRC)/ftmod/ftmod_isdn/ftmod_isdn.c
ftmod_isdn_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE $(LIBISDN_CPPFLAGS) $(PCAP_CPPFLAGS)
ftmod_isdn_la_LDFLAGS = -shared -module -avoid-version $(LIBISDN_LDFLAGS) $(PCAP_LDFLAGS)
ftmod_isdn_la_LIBADD = libfreetdm.la $(LIBISDN_LIBS) $(PCAP_LIBS)
endif
if HAVE_SCTP
mod_LTLIBRARIES += ftmod_sangoma_boost.la
ftmod_sangoma_boost_la_SOURCES = $(SRC)/ftmod/ftmod_sangoma_boost/sangoma_boost_client.c $(SRC)/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c
ftmod_sangoma_boost_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
ftmod_sangoma_boost_la_LDFLAGS = -module -avoid-version
ftmod_sangoma_boost_la_LIBADD = $(MYLIB)
ftmod_sangoma_boost_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
ftmod_sangoma_boost_la_LDFLAGS = -shared -module -avoid-version
ftmod_sangoma_boost_la_LIBADD = libfreetdm.la
endif
if LIBPRI
if HAVE_LIBPRI
mod_LTLIBRARIES += ftmod_libpri.la
ftmod_libpri_la_SOURCES = $(SRC)/ftmod/ftmod_libpri/ftmod_libpri.c $(SRC)/ftmod/ftmod_libpri/lpwrap_pri.c
ftmod_libpri_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
ftmod_libpri_la_LDFLAGS = -module -avoid-version -lpri
ftmod_libpri_la_LIBADD = $(MYLIB)
ftmod_libpri_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
ftmod_libpri_la_LDFLAGS = -shared -module -avoid-version -lpri
ftmod_libpri_la_LIBADD = libfreetdm.la
endif
if PRITAP
if HAVE_PRITAP
mod_LTLIBRARIES += ftmod_pritap.la
ftmod_pritap_la_SOURCES = $(SRC)/ftmod/ftmod_pritap/ftmod_pritap.c
ftmod_pritap_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
ftmod_pritap_la_LDFLAGS = -module -avoid-version -lpri
ftmod_pritap_la_LIBADD = $(MYLIB)
ftmod_pritap_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
ftmod_pritap_la_LDFLAGS = -shared -module -avoid-version -lpri
ftmod_pritap_la_LIBADD = libfreetdm.la
endif
if SNGSS7
ftmod_sangoma_ss7_la_SOURCES = $(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_in.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cntrl.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_timers.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_sta.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_sts.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c
ftmod_sangoma_ss7_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS) -D_GNU_SOURCE
ftmod_sangoma_ss7_la_LDFLAGS = -module -avoid-version -lsng_ss7
ftmod_sangoma_ss7_la_LIBADD = $(MYLIB)
if HAVE_SNG_SS7
mod_LTLIBRARIES += ftmod_sangoma_ss7.la
ftmod_sangoma_ss7_la_SOURCES = \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_in.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cntrl.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_timers.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_sta.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_sts.c \
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c
ftmod_sangoma_ss7_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE
ftmod_sangoma_ss7_la_LDFLAGS = -shared -module -avoid-version -lsng_ss7
ftmod_sangoma_ss7_la_LIBADD = libfreetdm.la
endif
if SNGISDN
ftmod_sangoma_isdn_la_SOURCES = $(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cntrl.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cntrl.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_rcv.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c
if HAVE_SNG_ISDN
mod_LTLIBRARIES += ftmod_sangoma_isdn.la
ftmod_sangoma_isdn_la_SOURCES = \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cntrl.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cntrl.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_rcv.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c \
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c
ftmod_sangoma_isdn_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS) -D_GNU_SOURCE
ftmod_sangoma_isdn_la_LDFLAGS = -module -avoid-version -lsng_isdn
ftmod_sangoma_isdn_la_LIBADD = $(MYLIB)
ftmod_sangoma_isdn_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE
ftmod_sangoma_isdn_la_LDFLAGS = -shared -module -avoid-version -lsng_isdn
ftmod_sangoma_isdn_la_LIBADD = libfreetdm.la
endif
if OPENR2
if HAVE_OPENR2
mod_LTLIBRARIES += ftmod_r2.la
ftmod_r2_la_SOURCES = $(SRC)/ftmod/ftmod_r2/ftmod_r2.c
ftmod_r2_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS)
ftmod_r2_la_LDFLAGS = -module -avoid-version -lopenr2
ftmod_r2_la_LIBADD = $(MYLIB)
ftmod_r2_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
ftmod_r2_la_LDFLAGS = -shared -module -avoid-version -lopenr2
ftmod_r2_la_LIBADD = libfreetdm.la
endif
dox doxygen:
doxygen $(FT_SRCDIR)/docs/Doxygen.conf
mod_freetdm/mod_freetdm.$(DYNAMIC_LIB_EXTEN): $(MYLIB) mod_freetdm/mod_freetdm.c
cd mod_freetdm && make
mod_freetdm/mod_freetdm.$(DYNAMIC_LIB_EXTEN): libfreetdm.la mod_freetdm/mod_freetdm.c
$(MAKE) -C mod_freetdm
mod_freetdm: mod_freetdm/mod_freetdm.$(DYNAMIC_LIB_EXTEN)
mod_freetdm-install: mod_freetdm
cd mod_freetdm && make install
$(MAKE) -C mod_freetdm install
mod_freetdm-clean:
@if [ -f mod_freetdm/mod_freetdm.$(DYNAMIC_LIB_EXTEN) ] ; then cd mod_freetdm && make clean ; fi
@if [ -f mod_freetdm/mod_freetdm.$(DYNAMIC_LIB_EXTEN) ] ; then \
$(MAKE) -C mod_freetdm clean ; \
fi
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(PREFIX)
$(mkinstalldirs) $(DESTDIR)$(prefix)
$(mkinstalldirs) $(DESTDIR)@confdir@
@[ -f "$(DESTDIR)@confdir@/freetdm.conf" ] || ( cp conf/*.conf $(DESTDIR)@confdir@)
@echo FreeTDM Installed

View File

@ -0,0 +1,15 @@
AC_DEFUN([AX_COMPILER_VENDOR],
[
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
# note: don't check for gcc first since some other compilers define __GNUC__
for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
#if !($vencpp)
thisisanerror;
#endif
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
done
])
])

View File

@ -2,6 +2,10 @@ dnl libpcap.m4--PCAP libraries and includes
dnl Derrick Brashear
dnl from KTH krb and Arla
dnl $Id: libpcap.m4,v 1.4 2006/01/20 20:21:09 snsimon Exp $
dnl 2010/10/31 (stkn):
dnl rename: PCAP_INC_FLAGS -> PCAP_CPPFLAGS
dnl rename: PCAP_LIB_FLAGS -> PCAP_LDFLAGS (-L flags only)
dnl add: PCAP_LIBS (libs only)
AC_DEFUN([PCAP_INC_WHERE1], [
ac_cv_found_pcap_inc=no
@ -129,12 +133,14 @@ AC_ARG_WITH(pcap-include,
AC_MSG_RESULT(yes)
PCAP_INC_DIR=$ac_cv_pcap_where_inc
PCAP_LIB_DIR=$ac_cv_pcap_where_lib
PCAP_INC_FLAGS="-I${PCAP_INC_DIR}"
PCAP_LIB_FLAGS="-L${PCAP_LIB_DIR} -lpcap"
PCAP_CPPFLAGS="-I${PCAP_INC_DIR}"
PCAP_LDFLAGS="-L${PCAP_LIB_DIR}"
PCAP_LIBS="-lpcap"
AC_SUBST(PCAP_INC_DIR)
AC_SUBST(PCAP_LIB_DIR)
AC_SUBST(PCAP_INC_FLAGS)
AC_SUBST(PCAP_LIB_FLAGS)
AC_SUBST(PCAP_CPPFLAGS)
AC_SUBST(PCAP_LDFLAGS)
AC_SUBST(PCAP_LIBS)
AC_DEFINE([HAVE_LIBPCAP],[1],[libpcap])
else
ac_cv_found_pcap=no

View File

@ -1,119 +1,120 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([freetdm],[pre-alpha],[bugs@freeswitch.org])
AC_PREREQ([2.59])
AC_INIT([freetdm], [pre-alpha], [bugs@freeswitch.org])
AC_CONFIG_SRCDIR([src/ftdm_io.c])
AC_CONFIG_AUX_DIR(build)
AM_INIT_AUTOMAKE(libfreetdm,0.1)
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build])
AM_INIT_AUTOMAKE([libfreetdm], [0.1])
# >=automake-1.11
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# override some default libtool behavior and invoke AC_PROG_LIBTOOL
# (see http://lists.gnu.org/archive/html/libtool/2007-03/msg00000.html)
m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
m4_defun([_LT_AC_LANG_GCJ_CONFIG], [:])
m4_defun([_LT_AC_LANG_RC_CONFIG], [:])
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_PROG_INSTALL
PKG_PROG_PKG_CONFIG
AC_PREFIX_DEFAULT(/usr/local/freetdm)
# AC_PREFIX_DEFAULT does not get expanded until too late so we need to do this to use prefix in this script
if test "x$prefix" = "xNONE" ; then
prefix='/usr/local/freetdm'
AX_COMPILER_VENDOR
# AC_PREFIX_DEFAULT does not get expanded until too late so we need
# to do this to use prefix in this script
AC_PREFIX_DEFAULT([/usr/local/freetdm])
if test "x${prefix}" = "xNONE" ; then
prefix='/usr/local/freetdm'
fi
# Absolute source/build directory
FT_SRCDIR=`(cd $srcdir && pwd)`
ft_builddir=`pwd`
AC_SUBST(FT_SRCDIR)
AC_SUBST(ft_builddir)
AC_SUBST([FT_SRCDIR])
AC_SUBST([ft_builddir])
if test "$sysconfdir" = "\${prefix}/etc" ; then
confdir="$prefix/conf"
confdir="$prefix/conf"
else
confdir="$sysconfdir"
confdir="$sysconfdir"
fi
AC_SUBST(confdir)
AC_SUBST([confdir])
#override some default libtool behavior and invoke AC_PROG_LIBTOOL (see http://lists.gnu.org/archive/html/libtool/2007-03/msg00000.html)
m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
m4_defun([_LT_AC_LANG_GCJ_CONFIG], [:])
m4_defun([_LT_AC_LANG_RC_CONFIG], [:])
#AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_PROG_INSTALL
# Where to install the modules
AC_ARG_WITH([modinstdir],
[AS_HELP_STRING([--with-modinstdir=DIR], [Install modules into this location (default: ${prefix}/mod)])],
[case "${withval}" in
no|yes) AC_MSG_ERROR([Invalid value \"${withval}\", option requires a valid path]) ;;
*) modinstdir="${withval}" ;;
esac],
[modinstdir="${prefix}/mod"]
)
AC_SUBST([modinstdir])
# Check for com;iler type
AC_DEFUN([AX_COMPILER_VENDOR],
[
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
# note: don't check for GCC first, since some other compilers define __GNUC__
for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
#if !($vencpp)
thisisanerror;
#endif
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
done
])
])
AC_ARG_ENABLE([enable_64], [AS_HELP_STRING([--enable-64], [Enable 64bit compilation])], [enable_64="$enableval"], [enable_64="no"])
AX_COMPILER_VENDOR
AC_ARG_ENABLE([enable_64],
[AS_HELP_STRING([--enable-64], [Enable 64bit compilation])],
[enable_64="${enableval}"],
[enable_64="no"]
)
case "${ax_cv_c_compiler_vendor}" in
gnu)
COMP_VENDOR_CFLAGS="-ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0"
;;
COMP_VENDOR_CFLAGS="-ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0"
;;
sun)
COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -D__FUNCTION__=__func__ -xvpara"
if test "$enable_64" = "yes" ; then
COMP_VENDOR_CFLAGS="-m64 $COMP_VENDOR_CFLAGS"
fi
;;
COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -D__FUNCTION__=__func__ -xvpara"
if test "$enable_64" != "no" ; then
COMP_VENDOR_CFLAGS="-m64 $COMP_VENDOR_CFLAGS"
fi
;;
*)
COMP_VENDOR_CFLAGS="-std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
;;
COMP_VENDOR_COMPAT_CFLAGS="-Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
COMP_VENDOR_CFLAGS="-std=c99 $COMP_VENDOR_COMPAT_CFLAGS"
;;
esac
AC_SUBST([COMP_VENDOR_COMPAT_CFLAGS])
AC_SUBST([COMP_VENDOR_CFLAGS])
#set SOLINK variable based on compiler and host
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
case "$host" in
*darwin*)
SOLINK="-dynamic -bundle -force-flat-namespace"
;;
*-solaris2*)
SOLINK="-shared -Xlinker"
;;
*)
SOLINK="-shared -Xlinker -x"
;;
esac
else
AC_ERROR([Please update configure.in with SOLINK values for your compiler])
# Enable debugging
AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--enable-debug], [build with debug information])],
[enable_debug="${enableval}"],
[enable_debug="yes"]
)
if test "${enable_debug}" != "no"; then
AC_DEFINE([DEBUG], [], [Enable extra debugging.])
if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
COMP_VENDOR_CFLAGS="$COMP_VENDOR_CFLAGS -g -ggdb"
fi
fi
AC_SUBST([COMP_VENDOR_CFLAGS])
# set DYNAMIC_LIB_EXTEN
# we should really be using libtool so we don't need to do this
case "$host" in
*cygwin* | *mingw*)
DYNAMIC_LIB_EXTEN="dll"
;;
*)
DYNAMIC_LIB_EXTEN="so"
;;
*cygwin* | *mingw*)
DYNAMIC_LIB_EXTEN="dll"
;;
*)
DYNAMIC_LIB_EXTEN="so"
;;
esac
AC_SUBST(SOLINK)
AC_SUBST(DYNAMIC_LIB_EXTEN)
AC_SUBST([DYNAMIC_LIB_EXTEN])
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([m], [cos])
AX_LIB_PCAP
AC_CHECK_HEADERS([netinet/sctp.h netdb.h sys/select.h])
AM_CONDITIONAL([HAVE_SCTP],[test "${ac_cv_header_netinet_sctp_h}" = "yes"])
@ -121,105 +122,252 @@ AM_CONDITIONAL([HAVE_SCTP],[test "${ac_cv_header_netinet_sctp_h}" = "yes"])
AC_CHECK_FUNC([gethostbyname_r],
[], [AC_CHECK_LIB([nsl], [gethostbyname_r])]
)
if test "$ac_cv_func_gethostbyname_r" = "yes" -o "$ac_cv_lib_nsl_gethostbyname_r" = "yes" ; then
if test "$ac_cv_func_gethostbyname_r" = "yes" -o "$ac_cv_lib_nsl_gethostbyname_r" = "yes"
then
AC_MSG_CHECKING([whether gethostbyname_r requires five arguments])
AC_MSG_CHECKING([whether gethostbyname_r requires five arguments])
ac_cv_func_gethostbyname_r_five_args="no"
ac_cv_func_gethostbyname_r_five_args="no"
AC_TRY_COMPILE([#include <netdb.h>],
[char *name;
struct hostent *he, *res;
char buffer[2048];
int buflen = 2048;
(void)gethostbyname_r(name, he, buffer, buflen, &res)],
[ac_cv_func_gethostbyname_r_five_args="yes"
AC_DEFINE([HAVE_GETHOSTBYNAME_R_FIVE], [1], [gethostbyname_r has five arguments])]
)
AC_TRY_COMPILE([#include <netdb.h>],
[char *name;
struct hostent *he, *res;
char buffer[2048];
int buflen = 2048;
(void)gethostbyname_r(name, he, buffer, buflen, &res)],
[ac_cv_func_gethostbyname_r_five_args="yes"
AC_DEFINE([HAVE_GETHOSTBYNAME_R_FIVE], [1], [gethostbyname_r has five arguments])]
)
AC_MSG_RESULT([$ac_cv_func_gethostbyname_r_five_args])
AC_DEFINE([HAVE_GETHOSTBYNAME_R],[1],[threadsafe gethostbyname])
AC_MSG_RESULT([$ac_cv_func_gethostbyname_r_five_args])
AC_DEFINE([HAVE_GETHOSTBYNAME_R], [1], [threadsafe gethostbyname])
fi
# Enable debugging
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug],[build with debug information])],[enable_debug="$enableval"],[enable_debug="yes"])
##
## Modules and optional features
##
AC_MSG_RESULT([${as_nl}<<>> Modules and optional features])
if test "${enable_debug}" = "yes"; then
AC_DEFINE([DEBUG],[],[Enable extra debugging.])
if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
COMP_VENDOR_CFLAGS="$COMP_VENDOR_CFLAGS -g -ggdb"
fi
fi
# Where to install the modules
AC_ARG_WITH([modinstdir],
[AS_HELP_STRING([--with-modinstdir=DIR], [Install modules into this location (default: $prefix/mod)])], [modinstdir="$withval"], [modinstdir="${prefix}/mod"])
AC_SUBST(modinstdir)
# libpri?
AC_ARG_WITH([libpri],
[AS_HELP_STRING([--with-libpri], [Install ftmod_libpri])], [enable_libpri="yes"], [enable_libpri="no"])
AC_SUBST(enable_libpri)
# pritap?
##
# pritap (TODO: add checks)
#
HAVE_PRITAP="no"
AC_ARG_WITH([pritap],
[AS_HELP_STRING([--with-pritap], [Install ftmod_pritap])], [enable_pritap="yes"], [enable_pritap="no"])
AC_SUBST(enable_pritap)
[AS_HELP_STRING([--with-pritap], [Install ftmod_pritap])],
[case "${withval}" in
no) enable_pritap="no" ;;
*) enable_pritab="yes" ;;
esac],
[enable_pritap="no"]
)
HAVE_PRITAP="${enable_pritap}"
AM_CONDITIONAL([HAVE_PRITAP],[test "${enable_pritap}" = "yes"])
# debug dtmf?
AC_ARG_WITH([debugdtmf],
[AS_HELP_STRING([--with-debugdtmf], [Debug DTMF])], [enable_debugdtmf="yes"], [enable_debugdtmf="no"])
AC_SUBST(enable_debugdtmf)
[AS_HELP_STRING([--with-debugdtmf], [Debug DTMF])],
[case "${withval}" in
no) enable_debugdtmf="no" ;;
*) enable_debugdtmf="yes" ;;
esac],
[enable_debugdtmf="no"]
)
AM_CONDITIONAL([WANT_DEBUGDTMF], [test "${enable_debugdtmf}" = "yes"])
AC_CHECK_LIB([sangoma], [sangoma_span_chan_toif], [have_libsangoma="yes"])
AM_CONDITIONAL([LIBSANGOMA],[test "${have_libsangoma}" = "yes"])
##
# OpenR2 stack
#
HAVE_OPENR2="no"
AC_CHECK_LIB([openr2], [openr2_context_set_io_type], [HAVE_OPENR2="yes"])
AC_MSG_RESULT([checking whether to build ftmod_r2... ${HAVE_OPENR2}])
AM_CONDITIONAL([HAVE_OPENR2], [test "${HAVE_OPENR2}" = "yes"])
AM_CONDITIONAL([LIBPRI],[test "${enable_libpri}" = "yes"])
##
# Digium libpri (TODO: add checks)
#
HAVE_LIBPRI="no"
AC_ARG_WITH([libpri],
[AS_HELP_STRING([--with-libpri], [Install ftmod_libpri])],
[case "${withval}" in
no) enable_libpri="no" ;;
*) enable_libpri="yes" ;;
esac],
[enable_libpri="no"]
)
if test "${enable_libpri}" != "no"
then
AC_MSG_RESULT([${as_nl}<<>> Digium libpri])
AM_CONDITIONAL([PRITAP],[test "${enable_pritap}" = "yes"])
save_LIBS="${LIBS}"
LIBS="${LIBS} -lpri"
AC_MSG_CHECKING([whether libpri is usable])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <libpri.h>],
[const char *version = pri_get_version();]
)],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([libpri is not installed or unusable (see config.log for details)])]
)
AM_CONDITIONAL([DEBUGDTMF],[test "${enable_debugdtmf}" = "yes"])
AC_MSG_CHECKING([whether libpri has BRI support])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[extern void pri_new_bri_cb(void);],
[pri_new_bri_cb();]
)],
[AC_DEFINE([HAVE_LIBPRI_BRI], [1], [libpri has BRI support])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_NOTICE([You will need libpri-1.4.12_beta1 or newer for BRI support])]
)
AC_CHECK_LIB([sng_ss7], [sng_isup_init], [have_sng_ss7="yes"])
AM_CONDITIONAL([SNGSS7],[test "${have_sng_ss7}" = "yes"])
AC_MSG_CHECKING([whether libpri has AOC event support])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[extern void pri_aoc_events_enable(void);],
[pri_aoc_events_enable();]
)],
[AC_DEFINE([HAVE_LIBPRI_AOC], [1], [libpri has AOC event support])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_NOTICE([You will need libpri-1.4.12_beta1 or newer for AOC event support])]
)
LIBS="${save_LIBS}"
fi
HAVE_LIBPRI="${enable_libpri}"
AM_CONDITIONAL([HAVE_LIBPRI],[test "${enable_libpri}" = "yes"])
AC_CHECK_LIB([sng_isdn], [sng_isdn_init], [have_sng_isdn="yes"])
AM_CONDITIONAL([SNGISDN],[test "${have_sng_isdn}" = "yes"])
##
# Sangoma Wanpipe
#
HAVE_LIBSANGOMA="no"
AC_MSG_RESULT([${as_nl}<<>> Sangoma Wanpipe])
AC_CHECK_LIB([sangoma], [sangoma_span_chan_toif], [HAVE_LIBSANGOMA="yes"])
AC_MSG_RESULT([checking whether to build ftmod_wanpipe... ${HAVE_LIBSANGOMA}])
AM_CONDITIONAL([HAVE_LIBSANGOMA], [test "${HAVE_LIBSANGOMA}" = "yes"])
AC_CHECK_LIB([openr2], [openr2_context_set_io_type], [have_openr2="yes"])
AM_CONDITIONAL([OPENR2],[test "${have_openr2}" = "yes"])
##
# Sangoma ISDN stack
#
HAVE_SNG_ISDN="no"
AC_MSG_RESULT([${as_nl}<<>> Sangoma ISDN stack])
AC_CHECK_LIB([sng_isdn], [sng_isdn_init], [HAVE_SNG_ISDN="yes"])
AC_MSG_RESULT([checking whether to build ftmod_sangoma_isdn... ${HAVE_SNG_ISDN}])
AM_CONDITIONAL([HAVE_SNG_ISDN], [test "${HAVE_SNG_ISDN}" = "yes"])
if test "${have_sng_isdn}" = "yes"; then
if test "${HAVE_SNG_ISDN}" = "yes"; then
if test "${build}" == "${host}"
then
case "${host}" in
x86_64-*)
# X86_64 machines need additional flags when compiling against libsng_isdn
CFLAGS="$CFLAGS -DBIT_64 -DALIGN_64BIT"
;;
# X86_64 machines need additional flags when compiling against libsng_isdn
CFLAGS="$CFLAGS -DBIT_64 -DALIGN_64BIT"
;;
esac
fi
fi
if test "${have_sng_ss7}" = "yes"; then
##
# Sangoma SS7 stack
#
HAVE_SNG_SS7="no"
AC_MSG_RESULT([${as_nl}<<>> Sangoma SS7 stack])
AC_CHECK_LIB([sng_ss7], [sng_isup_init], [HAVE_SNG_SS7="yes"])
AC_MSG_RESULT([checking whether to build ftmod_sangoma_ss7... ${HAVE_SNG_SS7}])
AM_CONDITIONAL([HAVE_SNG_SS7], [test "${HAVE_SNG_SS7}" = "yes"])
if test "${HAVE_SNG_SS7}" = "yes"; then
if test "${build}" == "${host}"
then
case "${host}" in
x86_64-*)
# X86_64 machines need additional flags when compiling against libsng_isdn
CFLAGS="$CFLAGS -DBIT_64 -DALIGN_64BIT"
;;
# X86_64 machines need additional flags when compiling against libsng_isdn
CFLAGS="$CFLAGS -DBIT_64 -DALIGN_64BIT"
;;
esac
fi
fi
COMP_VENDOR_CFLAGS="$COMP_VENDOR_CFLAGS"
AC_SUBST(COMP_VENDOR_CFLAGS)
AC_CONFIG_FILES([Makefile
freetdm.pc
mod_freetdm/Makefile])
##
# libisdn
#
HAVE_LIBISDN="no"
AC_ARG_WITH([libisdn],
[AS_HELP_STRING([--with-libisdn], [Install ftmod_isdn (libisdn stack)])],
[case "${withval}" in
no) with_libisdn="no" ;;
*) with_libisdn="yes" ;;
esac
],
[with_libisdn="no"]
)
if test "${with_libisdn}" != "no"
then
AC_MSG_RESULT([${as_nl}<<>> ftmod_isdn (libisdn stack)])
PKG_CHECK_MODULES([libisdn],
[libisdn >= 0.0.1],
[AC_MSG_CHECKING([libisdn version])
LIBISDN_VERSION="`${PKG_CONFIG} --modversion libisdn`"
if test -z "${LIBISDN_VERSION}"; then
AC_MSG_ERROR([Failed to retrieve libisdn version])
fi
AC_MSG_RESULT([${LIBISDN_VERSION}])
# check features
AC_MSG_CHECKING([for new experimental API])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[#include <libisdn/version.h>
#if !LIBISDN_FEATURE(API2)
#error "libisdn API v2 not available"
#endif
],
[;]
)],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])]
)
HAVE_LIBISDN="yes"
AC_DEFINE([HAVE_LIBISDN], [1], [libisdn support])
AC_SUBST([LIBISDN_CFLAGS], [${libisdn_CFLAGS}])
AC_SUBST([LIBISDN_CPPFLAGS],[${libisdn_CPPFLAGS}])
AC_SUBST([LIBISDN_LDFLAGS], [${libisdn_LDFLAGS}])
AC_SUBST([LIBISDN_LIBS], [${libisdn_LIBS}])
AC_SUBST([LIBISDN_VERSION])
],
[AC_MSG_ERROR([Need libisdn-0.0.1 or higher])]
)
AX_LIB_PCAP
fi
AM_CONDITIONAL([HAVE_LIBISDN], [test "${HAVE_LIBISDN}" = "yes"])
AC_MSG_RESULT([${as_nl}<<>> Creating output files])
AC_CONFIG_FILES([
Makefile
freetdm.pc
mod_freetdm/Makefile
])
AC_OUTPUT
#
# summary screen
#
AC_MSG_RESULT([
============================ FreeTDM configuration ============================
+ Modules
Signalling:
ftmod_isdn......................... ${HAVE_LIBISDN}
ftmod_libpri....................... ${HAVE_LIBPRI}
ftmod_sangoma_isdn................. ${HAVE_SNG_ISDN}
ftmod_sangoma_ss7.................. ${HAVE_SNG_SS7}
ftmod_r2........................... ${HAVE_OPENR2}
ftmod_pritap....................... ${HAVE_PRITAP}
I/O:
ftmod_wanpipe...................... ${HAVE_LIBSANGOMA}
===============================================================================
])

View File

@ -657,7 +657,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_WARNING, "failed to wait for I/O\n");
ftdm_log(FTDM_LOG_ERROR, "Failed to wait for I/O\n");
goto fail;
}
@ -3088,85 +3088,44 @@ static switch_status_t load_config(void)
if ((spans = switch_xml_child(cfg, "libpri_spans"))) {
for (myspan = switch_xml_child(spans, "span"); myspan; myspan = myspan->next) {
char *id = (char *) switch_xml_attr(myspan, "id");
char *name = (char *) switch_xml_attr(myspan, "name");
ftdm_conf_parameter_t spanparameters[10];
ftdm_status_t zstatus = FTDM_FAIL;
const char *context = "default";
const char *context = "default";
const char *dialplan = "XML";
const char *o_node = "cpe";
const char *o_switch = "dms100";
const char *o_dp = "unknown";
const char *o_l1 = "ulaw";
const char *o_debug = "none";
const char* opts = "none";
uint32_t span_id = 0;
unsigned paramindex = 0;
ftdm_span_t *span = NULL;
uint32_t span_id = 0;
for (param = switch_xml_child(myspan, "param"); param; param = param->next) {
if (!name) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "span missing required attribute 'name'\n");
continue;
}
for (param = switch_xml_child(myspan, "param"); param && paramindex < 10; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
char *val = (char *) switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "node")) {
o_node = val;
} else if (!strcasecmp(var, "switch")) {
o_switch = val;
} else if (!strcasecmp(var, "dp")) {
o_dp = val;
} else if (!strcasecmp(var, "l1")) {
o_l1 = val;
} else if (!strcasecmp(var, "debug")) {
o_debug = val;
} else if (!strcasecmp(var, "context")) {
if (!strcasecmp(var, "context")) {
context = val;
} else if (!strcasecmp(var, "opts")) {
opts = val;
} else if (!strcasecmp(var, "dialplan")) {
dialplan = val;
}
}
if (!id && !name) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "span missing required param 'id'\n");
continue;
}
if (name) {
zstatus = ftdm_span_find_by_name(name, &span);
} else {
if (switch_is_number(id)) {
span_id = atoi(id);
zstatus = ftdm_span_find(span_id, &span);
}
if (zstatus != FTDM_SUCCESS) {
zstatus = ftdm_span_find_by_name(id, &span);
} else {
spanparameters[paramindex].var = var;
spanparameters[paramindex].val = val;
paramindex++;
}
}
zstatus = ftdm_span_find_by_name(name, &span);
if (zstatus != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span id:%s name:%s\n", switch_str_nil(id), switch_str_nil(name));
ftdm_log(FTDM_LOG_ERROR, "Error finding FreeTDM span %s\n", name);
continue;
}
if (!span_id) {
span_id = ftdm_span_get_id(span);
}
if (ftdm_configure_span(span, "libpri", on_clear_channel_signal,
"node", o_node,
"switch", o_switch,
"dp", o_dp,
"l1", o_l1,
"debug", o_debug,
"opts", opts,
FTDM_TAG_END) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_ERROR, "Error starting FreeTDM span %d node: %s switch: %s dp: %s l1: %s debug: %s error: %s\n",
span_id, switch_str_nil(o_node), switch_str_nil(o_switch), switch_str_nil(o_dp), switch_str_nil(o_l1), switch_str_nil(o_debug),
ftdm_span_get_last_error(span));
span_id = ftdm_span_get_id(span);
if (ftdm_configure_span_signaling(span, "libpri", on_clear_channel_signal, spanparameters) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_ERROR, "Error configuring FreeTDM span %s\n", name);
continue;
}

View File

@ -1751,7 +1751,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_open_chan(ftdm_channel_t *ftdmchan)
goto done;
}
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_IN_ALARM)) {
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_IN_ALARM) && !ftdm_test_flag(ftdmchan->span, FTDM_SPAN_PWR_SAVING)) {
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "%s", "Channel is alarmed\n");
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_WARNING, "Cannot open channel when is alarmed\n");
goto done;
@ -3927,6 +3927,11 @@ static ftdm_status_t ftdm_set_channels_alarms(ftdm_span_t *span, int currindex)
ftdm_log(FTDM_LOG_ERROR, "%d:%d: Failed to get alarms\n", span->channels[chan_index]->physical_span_id, span->channels[chan_index]->physical_chan_id);
return FTDM_FAIL;
}
if (span->channels[chan_index]->alarm_flags) {
ftdm_set_flag_locked(span->channels[chan_index], FTDM_CHANNEL_IN_ALARM);
} else {
ftdm_clear_flag_locked(span->channels[chan_index], FTDM_CHANNEL_IN_ALARM);
}
}
return FTDM_SUCCESS;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,23 @@
/*
* Copyright (c) 2007, Anthony Minessale II
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, 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 the original author; nor the names of any contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
*
*
* 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
@ -33,7 +33,6 @@
#ifndef FTDM_ISDN_H
#define FTDM_ISDN_H
#include "freetdm.h"
#define DEFAULT_DIGIT_TIMEOUT 10000 /* default overlap timeout: 10 seconds */
@ -42,17 +41,23 @@ typedef enum {
FTDM_ISDN_OPT_NONE = 0,
FTDM_ISDN_OPT_SUGGEST_CHANNEL = (1 << 0),
FTDM_ISDN_OPT_OMIT_DISPLAY_IE = (1 << 1), /*!< Do not send Caller name in outgoing SETUP message (= Display IE) */
FTDM_ISDN_OPT_DISABLE_TONES = (1 << 2), /*!< Disable tone generating thread (NT mode) */
FTDM_ISDN_OPT_DISABLE_TONES = (1 << 2), /*!< Disable tone generating thread (NT mode) */
FTDM_ISDN_OPT_MAX = (2 << 0)
} ftdm_isdn_opts_t;
typedef enum {
FTDM_ISDN_RUNNING = (1 << 0),
FTDM_ISDN_TONES_RUNNING = (1 << 1),
FTDM_ISDN_STOP = (1 << 2)
FTDM_ISDN_RUNNING = (1 << 0),
FTDM_ISDN_TONES_RUNNING = (1 << 1),
FTDM_ISDN_STOP = (1 << 2),
FTDM_ISDN_CAPTURE = (1 << 3),
FTDM_ISDN_CAPTURE_L3ONLY = (1 << 4)
} ftdm_isdn_flag_t;
#ifdef HAVE_PCAP
struct pcap_context;
#endif
struct ftdm_isdn_data {
Q921Data_t q921;
@ -60,6 +65,7 @@ struct ftdm_isdn_data {
ftdm_channel_t *dchan;
ftdm_channel_t *dchans[2];
struct ftdm_sigmsg sigmsg;
fio_signal_cb_t sig_cb;
uint32_t flags;
int32_t mode;
int32_t digit_timeout;
@ -67,6 +73,9 @@ struct ftdm_isdn_data {
ftdm_caller_data_t *outbound_crv[32768];
ftdm_channel_t *channels_local_crv[32768];
ftdm_channel_t *channels_remote_crv[32768];
#ifdef HAVE_PCAP
struct pcap_context *pcap;
#endif
};
typedef struct ftdm_isdn_data ftdm_isdn_data_t;
@ -75,7 +84,7 @@ typedef struct ftdm_isdn_data ftdm_isdn_data_t;
/* b-channel private data */
struct ftdm_isdn_bchan_data
{
L2ULONG digit_timeout;
int32_t digit_timeout;
};
typedef struct ftdm_isdn_bchan_data ftdm_isdn_bchan_data_t;
@ -91,6 +100,6 @@ typedef struct ftdm_isdn_bchan_data ftdm_isdn_bchan_data_t;
* c-basic-offset:4
* End:
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
*/

View File

@ -1,316 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="ftmod_isdn"
ProjectGUID="{729344A5-D5E9-434D-8EE8-AF8C6C795D15}"
RootNamespace="ftmod_isdn"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\isdn\include;..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FTMOD_ISDN_EXPORTS;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\isdn\include;..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FTMOD_ISDN_EXPORTS;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\isdn\5ESSmes.c"
>
</File>
<File
RelativePath="..\..\isdn\5ESSStateNT.c"
>
</File>
<File
RelativePath="..\..\isdn\5ESSStateTE.c"
>
</File>
<File
RelativePath="..\..\isdn\DMSmes.c"
>
</File>
<File
RelativePath="..\..\isdn\DMSStateNT.c"
>
</File>
<File
RelativePath="..\..\isdn\DMSStateTE.c"
>
</File>
<File
RelativePath="..\..\isdn\EuroISDNStateNT.c"
>
</File>
<File
RelativePath="..\..\isdn\EuroISDNStateTE.c"
>
</File>
<File
RelativePath="..\..\isdn\mfifo.c"
>
</File>
<File
RelativePath="..\..\isdn\nationalmes.c"
>
</File>
<File
RelativePath="..\..\isdn\nationalStateNT.c"
>
</File>
<File
RelativePath="..\..\isdn\nationalStateTE.c"
>
</File>
<File
RelativePath="ftmod_isdn.c"
>
</File>
<File
RelativePath="..\..\isdn\Q921.c"
>
</File>
<File
RelativePath="..\..\isdn\Q931.c"
>
</File>
<File
RelativePath="..\..\isdn\Q931api.c"
>
</File>
<File
RelativePath="..\..\isdn\Q931ie.c"
>
</File>
<File
RelativePath="..\..\isdn\Q931mes.c"
>
</File>
<File
RelativePath="..\..\isdn\Q931StateNT.c"
>
</File>
<File
RelativePath="..\..\isdn\Q931StateTE.c"
>
</File>
<File
RelativePath="..\..\isdn\Q932mes.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\isdn\include\5ESS.h"
>
</File>
<File
RelativePath="..\..\isdn\include\DMS.h"
>
</File>
<File
RelativePath="..\..\isdn\include\mfifo.h"
>
</File>
<File
RelativePath="..\..\isdn\include\national.h"
>
</File>
<File
RelativePath="..\..\isdn\include\Q921.h"
>
</File>
<File
RelativePath="..\..\isdn\include\Q921priv.h"
>
</File>
<File
RelativePath="..\..\isdn\include\Q931.h"
>
</File>
<File
RelativePath="..\..\isdn\include\Q931ie.h"
>
</File>
<File
RelativePath="..\..\isdn\include\Q932.h"
>
</File>
<File
RelativePath="ftdm_isdn.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

File diff suppressed because it is too large Load Diff

View File

@ -42,8 +42,9 @@ typedef enum {
FTMOD_LIBPRI_OPT_SUGGEST_CHANNEL = (1 << 0),
FTMOD_LIBPRI_OPT_OMIT_DISPLAY_IE = (1 << 1),
FTMOD_LIBPRI_OPT_OMIT_REDIRECTING_NUMBER_IE = (1 << 2),
FTMOD_LIBPRI_OPT_MAX = (1 << 3)
FTMOD_LIBPRI_OPT_FACILITY_AOC = (1 << 3),
FTMOD_LIBPRI_OPT_MAX = (1 << 4)
} ftdm_isdn_opts_t;
typedef enum {

View File

@ -1,23 +1,23 @@
/*
* Copyright (c) 2009, Anthony Minessale II
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, 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 the original author; nor the names of any contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
*
*
* 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
@ -35,8 +35,8 @@
#include "private/ftdm_core.h"
#include "lpwrap_pri.h"
#ifndef HAVE_GETTIMEOFDAY
#ifndef HAVE_GETTIMEOFDAY
#ifdef WIN32
#include <mmsystem.h>
@ -92,7 +92,7 @@ static struct lpwrap_pri_event_list LPWRAP_PRI_EVENT_LIST[] = {
{8, LPWRAP_PRI_EVENT_ANSWER, "ANSWER"},
{9, LPWRAP_PRI_EVENT_HANGUP_ACK, "HANGUP_ACK"},
{10, LPWRAP_PRI_EVENT_RESTART_ACK, "RESTART_ACK"},
{11, LPWRAP_PRI_EVENT_FACNAME, "FACNAME"},
{11, LPWRAP_PRI_EVENT_FACILITY, "FACILITY"},
{12, LPWRAP_PRI_EVENT_INFO_RECEIVED, "INFO_RECEIVED"},
{13, LPWRAP_PRI_EVENT_PROCEEDING, "PROCEEDING"},
{14, LPWRAP_PRI_EVENT_SETUP_ACK, "SETUP_ACK"},
@ -106,7 +106,10 @@ static struct lpwrap_pri_event_list LPWRAP_PRI_EVENT_LIST[] = {
#define LINE "--------------------------------------------------------------------------------"
const char *lpwrap_pri_event_str(lpwrap_pri_event_t event_id)
{
{
if (event_id < 0 || event_id >= LPWRAP_PRI_EVENT_MAX)
return "";
return LPWRAP_PRI_EVENT_LIST[event_id].name;
}
@ -114,8 +117,8 @@ static int __pri_lpwrap_read(struct pri *pri, void *buf, int buflen)
{
struct lpwrap_pri *spri = (struct lpwrap_pri *) pri_get_userdata(pri);
ftdm_size_t len = buflen;
int res;
ftdm_status_t zst;
int res;
if ((zst = ftdm_channel_read(spri->dchan, buf, &len)) != FTDM_SUCCESS) {
if (zst == FTDM_FAIL) {
@ -124,31 +127,31 @@ static int __pri_lpwrap_read(struct pri *pri, void *buf, int buflen)
} else {
ftdm_log(FTDM_LOG_CRIT, "span %d D-READ TIMEOUT\n", spri->span->span_id);
}
ftdm_clear_flag(spri, LPWRAP_PRI_READY);
return -1;
}
spri->errs = 0;
res = (int)len;
memset(&((unsigned char*)buf)[res],0,2);
res+=2;
memset(&((unsigned char*)buf)[res], 0, 2);
res += 2;
#ifdef IODEBUG
{
char bb[2048] = { 0 };
print_hex_bytes(buf, res - 2, bb, sizeof(bb));
ftdm_log(FTDM_LOG_DEBUG, "READ %d\n", res-2);
ftdm_log(FTDM_LOG_DEBUG, "READ %d\n", res - 2);
}
#endif
return res;
}
static int __pri_lpwrap_write(struct pri *pri, void *buf, int buflen)
{
struct lpwrap_pri *spri = (struct lpwrap_pri *) pri_get_userdata(pri);
ftdm_size_t len = buflen -2;
ftdm_size_t len = buflen - 2;
if (ftdm_channel_write(spri->dchan, buf, buflen, &len) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_CRIT, "span %d D-WRITE FAIL! [%s]\n", spri->span->span_id, spri->dchan->last_error);
@ -161,11 +164,10 @@ static int __pri_lpwrap_write(struct pri *pri, void *buf, int buflen)
char bb[2048] = { 0 };
print_hex_bytes(buf, buflen - 2, bb, sizeof(bb));
ftdm_log(FTDM_LOG_DEBUG, "WRITE %d\n", (int)buflen-2);
ftdm_log(FTDM_LOG_DEBUG, "WRITE %d\n", (int)buflen - 2);
}
#endif
return (int) buflen;
return (int)buflen;
}
int lpwrap_init_pri(struct lpwrap_pri *spri, ftdm_span_t *span, ftdm_channel_t *dchan, int swtype, int node, int debug)
@ -173,21 +175,63 @@ int lpwrap_init_pri(struct lpwrap_pri *spri, ftdm_span_t *span, ftdm_channel_t *
int ret = -1;
memset(spri, 0, sizeof(struct lpwrap_pri));
spri->dchan = dchan;
spri->span = span;
spri->span = span;
if (spri->dchan && (spri->pri = pri_new_cb(spri->dchan->sockfd, node, swtype, __pri_lpwrap_read, __pri_lpwrap_write, spri))){
unsigned char buf[4] = { 0 };
size_t buflen = sizeof(buf), len = 0;
pri_set_debug(spri->pri, debug);
ret = 0;
ftdm_channel_write(spri->dchan, buf, buflen, &len);
} else {
fprintf(stderr, "Unable to create PRI\n");
if (!spri->dchan) {
ftdm_log(FTDM_LOG_ERROR, "No D-Channel available, unable to create PRI\n");
return ret;
}
if ((spri->pri = pri_new_cb(spri->dchan->sockfd, node, swtype, __pri_lpwrap_read, __pri_lpwrap_write, spri))) {
unsigned char buf[4] = { 0 };
size_t buflen = sizeof(buf), len = 0;
pri_set_debug(spri->pri, debug);
#ifdef HAVE_LIBPRI_AOC
pri_aoc_events_enable(spri->pri, 1);
#endif
ftdm_channel_write(spri->dchan, buf, buflen, &len);
ret = 0;
} else {
ftdm_log(FTDM_LOG_ERROR, "Unable to create PRI\n");
}
return ret;
}
int lpwrap_init_bri(struct lpwrap_pri *spri, ftdm_span_t *span, ftdm_channel_t *dchan, int swtype, int node, int ptp, int debug)
{
int ret = -1;
#ifdef HAVE_LIBPRI_BRI
memset(spri, 0, sizeof(struct lpwrap_pri));
spri->dchan = dchan;
spri->span = span;
if (!spri->dchan) {
ftdm_log(FTDM_LOG_ERROR, "No D-Channel available, unable to create BRI\n");
return ret;
}
if ((spri->pri = pri_new_bri_cb(spri->dchan->sockfd, ptp, node, swtype, __pri_lpwrap_read, __pri_lpwrap_write, spri))) {
unsigned char buf[4] = { 0 };
size_t buflen = sizeof(buf), len = 0;
pri_set_debug(spri->pri, debug);
#ifdef HAVE_LIBPRI_AOC
pri_aoc_events_enable(spri->pri, 1);
#endif
ftdm_channel_write(spri->dchan, buf, buflen, &len);
ret = 0;
} else {
ftdm_log(FTDM_LOG_ERROR, "Unable to create BRI\n");
}
#else
ftdm_log(FTDM_LOG_ERROR, "Installed libpri version (%s) has no BRI support\n",
pri_get_version());
#endif
return ret;
}
@ -195,11 +239,11 @@ int lpwrap_init_pri(struct lpwrap_pri *spri, ftdm_span_t *span, ftdm_channel_t *
int lpwrap_one_loop(struct lpwrap_pri *spri)
{
fd_set rfds, efds;
struct timeval now = {0,0}, *next;
pri_event *event;
struct timeval now = {0,0}, *next = NULL;
pri_event *event = NULL;
event_handler handler;
int sel;
int sel;
if (spri->on_loop) {
if ((sel = spri->on_loop(spri)) < 0) {
return sel;
@ -231,9 +275,6 @@ int lpwrap_one_loop(struct lpwrap_pri *spri)
now.tv_usec = 100000;
sel = select(pri_fd(spri->pri) + 1, &rfds, NULL, &efds, &now);
event = NULL;
if (!sel) {
if ((next = pri_schedule_next(spri->pri))) {
gettimeofday(&now, NULL);
@ -248,46 +289,40 @@ int lpwrap_one_loop(struct lpwrap_pri *spri)
if (event) {
/* 0 is catchall event handler */
if ((handler = spri->eventmap[event->e] ? spri->eventmap[event->e] : spri->eventmap[0] ? spri->eventmap[0] : NULL)) {
if (event->e < 0 || event->e >= LPWRAP_PRI_EVENT_MAX) {
handler = spri->eventmap[0];
} else if (spri->eventmap[event->e]) {
handler = spri->eventmap[event->e];
} else {
handler = spri->eventmap[0];
}
if (handler) {
handler(spri, event->e, event);
} else {
ftdm_log(FTDM_LOG_CRIT, "No event handler found for event %d.\n", event->e);
}
}
return sel;
if ((handler = spri->eventmap[LPWRAP_PRI_EVENT_IO_FAIL] ? spri->eventmap[LPWRAP_PRI_EVENT_IO_FAIL] : spri->eventmap[0] ? spri->eventmap[0] : NULL)) {
handler(spri, LPWRAP_PRI_EVENT_IO_FAIL, NULL);
}
return -1;
}
int lpwrap_run_pri(struct lpwrap_pri *spri)
{
int ret = 0;
for (;;){
ret = lpwrap_one_loop(spri);
if (ret < 0) {
for (;;) {
if ((ret = lpwrap_one_loop(spri)) < 0) {
#ifndef WIN32 //This needs to be adressed fror WIN32 still
if (errno == EINTR){
/* Igonore an interrupted system call */
continue;
}
#endif
#endif
ftdm_log(FTDM_LOG_CRIT, "Error = %i [%s]\n", ret, strerror(errno));
break;
}
}
return ret;
}
/* For Emacs:
@ -300,4 +335,3 @@ int lpwrap_run_pri(struct lpwrap_pri *spri)
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
*/

View File

@ -51,7 +51,11 @@ typedef enum {
LPWRAP_PRI_EVENT_ANSWER = PRI_EVENT_ANSWER,
LPWRAP_PRI_EVENT_HANGUP_ACK = PRI_EVENT_HANGUP_ACK,
LPWRAP_PRI_EVENT_RESTART_ACK = PRI_EVENT_RESTART_ACK,
LPWRAP_PRI_EVENT_FACNAME = PRI_EVENT_FACNAME,
#ifdef PRI_EVENT_FACILITY
LPWRAP_PRI_EVENT_FACILITY = PRI_EVENT_FACILITY,
#else
LPWRAP_PRI_EVENT_FACILITY = PRI_EVENT_FACNAME,
#endif
LPWRAP_PRI_EVENT_INFO_RECEIVED = PRI_EVENT_INFO_RECEIVED,
LPWRAP_PRI_EVENT_PROCEEDING = PRI_EVENT_PROCEEDING,
LPWRAP_PRI_EVENT_SETUP_ACK = PRI_EVENT_SETUP_ACK,
@ -121,6 +125,8 @@ struct lpwrap_pri_event_list {
const char *lpwrap_pri_event_str(lpwrap_pri_event_t event_id);
int lpwrap_one_loop(struct lpwrap_pri *spri);
int lpwrap_init_pri(struct lpwrap_pri *spri, ftdm_span_t *span, ftdm_channel_t *dchan, int swtype, int node, int debug);
int lpwrap_init_bri(struct lpwrap_pri *spri, ftdm_span_t *span, ftdm_channel_t *dchan, int swtype, int node, int ptp, int debug);
int lpwrap_run_pri(struct lpwrap_pri *spri);
#define lpwrap_run_bri(x) lpwrap_run_pri(x)
#endif

View File

@ -403,6 +403,7 @@ static void ftdm_r2_on_call_init(openr2_chan_t *r2chan)
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_INUSE)) {
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Cannot start call when channel is in use (state = %s)\n", ftdm_channel_state2str(ftdmchan->state));
ftdm_mutex_unlock(ftdmchan->mutex);
return;
}
if (ftdmchan->state != FTDM_CHANNEL_STATE_DOWN) {
@ -436,9 +437,6 @@ static void ftdm_r2_on_call_init(openr2_chan_t *r2chan)
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_COLLECT);
ftdm_mutex_unlock(ftdmchan->mutex);
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Span is not threaded, not launching thread for this call\n");
return;
}
/* only called for incoming calls when the ANI, DNIS etc is complete and the user has to decide either to accept or reject the call */
@ -447,9 +445,7 @@ static void ftdm_r2_on_call_offered(openr2_chan_t *r2chan, const char *ani, cons
ftdm_channel_t *ftdmchan = openr2_chan_get_client_data(r2chan);
ftdm_log_chan(ftdmchan, FTDM_LOG_NOTICE, "Call offered with ANI = %s, DNIS = %s, Priority = (%d)\n", ani, dnis, category);
//ftdmchan->caller_data.priority = category;
ftdm_set_state_locked(ftdmchan, FTDM_CHANNEL_STATE_RING);
}
static void ftdm_r2_on_call_accepted(openr2_chan_t *r2chan, openr2_call_mode_t mode)
@ -602,8 +598,8 @@ static void ftdm_r2_on_line_idle(openr2_chan_t *r2chan)
ftdm_log_chan(ftdmchan, FTDM_LOG_NOTICE, "Far end unblocked in state %s\n", ftdm_channel_state2str(ftdmchan->state));
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_SUSPENDED);
/* XXX when should we set/unset this flag? XXX */
ftdm_set_flag(ftdmchan, FTDM_CHANNEL_SIG_UP);
/* XXX when should we set/unset this flag? XXX */
ftdm_set_flag(ftdmchan, FTDM_CHANNEL_SIG_UP);
}
static void ftdm_r2_write_log(openr2_log_level_t level, const char *file, const char *function, int line, const char *message)
@ -1116,7 +1112,7 @@ static FIO_SIG_CONFIGURE_FUNCTION(ftdm_r2_configure_span)
memset(r2call, 0, sizeof(*r2call));
openr2_chan_set_logging_func(r2chan, ftdm_r2_on_chan_log);
openr2_chan_set_client_data(r2chan, span->channels[i]);
r2call->r2chan = r2chan;
r2call->r2chan = r2chan;
span->channels[i]->call_data = r2call;
/* value and key are the same so just free one of them */
snprintf(r2call->name, sizeof(r2call->name), "chancall%d", i);
@ -1331,8 +1327,8 @@ static int ftdm_r2_state_advance(ftdm_channel_t *ftdmchan)
static void *ftdm_r2_run(ftdm_thread_t *me, void *obj)
{
openr2_chan_t *r2chan;
ftdm_r2_call_t *r2call = NULL;
ftdm_channel_t *ftdmchan = NULL;
ftdm_r2_call_t *r2call = NULL;
ftdm_channel_t *ftdmchan = NULL;
ftdm_status_t status;
ftdm_span_t *span = (ftdm_span_t *) obj;
ftdm_r2_data_t *r2data = span->signal_data;
@ -1368,16 +1364,14 @@ static void *ftdm_r2_run(ftdm_thread_t *me, void *obj)
}
#ifndef WIN32
/* figure out what event to poll each channel for. POLLPRI when the channel is down,
* POLLPRI|POLLIN|POLLOUT otherwise.
*/
memset(poll_events, 0, sizeof(short)*span->chan_count);
for (i = 0; i < span->chan_count; i++) {
r2chan = R2CALL(span->channels[(i+1)])->r2chan;
ftdmchan = openr2_chan_get_client_data(r2chan);
poll_events[i] = ftdmchan->state == FTDM_CHANNEL_STATE_DOWN ? POLLPRI : (POLLPRI | POLLIN | POLLOUT);
}
/* figure out what event to poll each channel for. POLLPRI when the channel is down,
* POLLPRI|POLLIN|POLLOUT otherwise */
memset(poll_events, 0, sizeof(short)*span->chan_count);
for (i = 0; i < span->chan_count; i++) {
r2chan = R2CALL(span->channels[(i+1)])->r2chan;
ftdmchan = openr2_chan_get_client_data(r2chan);
poll_events[i] = ftdmchan->state == FTDM_CHANNEL_STATE_DOWN ? POLLPRI : (POLLPRI | POLLIN | POLLOUT);
}
status = ftdm_span_poll_event(span, waitms, poll_events);
#else
@ -1394,62 +1388,61 @@ static void *ftdm_r2_run(ftdm_thread_t *me, void *obj)
continue;
}
if (FTDM_SUCCESS == status) {
if (FTDM_SUCCESS == status) {
ftdm_event_t *event;
while (ftdm_span_next_event(span, &event) == FTDM_SUCCESS) {
if (event->enum_id == FTDM_OOB_CAS_BITS_CHANGE) {
r2call = R2CALL(event->channel);
r2chan = r2call->r2chan;
r2call = R2CALL(event->channel);
r2chan = r2call->r2chan;
ftdm_log(FTDM_LOG_DEBUG, "Handling CAS on channel %d.\n", openr2_chan_get_number(r2chan));
// we only expect CAS and other OOB events on this thread/loop, once a call is started
// the MF events (in-band signaling) are handled in the call thread
openr2_chan_process_cas_signaling(r2chan);
} else {
ftdm_log(FTDM_LOG_DEBUG, "Ignoring event %d on channel %d.\n", event->enum_id, openr2_chan_get_number(r2chan));
// XXX TODO: handle alarms here XXX
}
}
/* XXX
* when ftdm_span_poll_event() returns FTDM_SUCCESS, means there are events pending on the span.
* is it possible to know on which channels those events are pending, without trasvering the span?
* XXX
*/
for (i = 1; i <= span->chan_count; i++) {
r2chan = R2CALL(span->channels[i])->r2chan;
ftdmchan = openr2_chan_get_client_data(r2chan);
r2call = R2CALL(ftdmchan);
/* XXX
* when ftdm_span_poll_event() returns FTDM_SUCCESS, means there are events pending on the span.
* is it possible to know on which channels those events are pending, without traversing the span?
* XXX */
for (i = 1; i <= span->chan_count; i++) {
r2chan = R2CALL(span->channels[i])->r2chan;
ftdmchan = openr2_chan_get_client_data(r2chan);
r2call = R2CALL(ftdmchan);
ftdm_mutex_lock(ftdmchan->mutex);
ftdm_set_flag(r2call, FTDM_R2_PROCESSING);
ftdm_mutex_lock(ftdmchan->mutex);
ftdm_set_flag(r2call, FTDM_R2_PROCESSING);
if (ftdm_r2_state_advance(ftdmchan)) {
ftdm_clear_flag(r2call, FTDM_R2_PROCESSING);
ftdm_mutex_unlock(ftdmchan->mutex);
continue;
}
if (ftdm_r2_state_advance(ftdmchan)) {
ftdm_clear_flag(r2call, FTDM_R2_PROCESSING);
ftdm_mutex_unlock(ftdmchan->mutex);
continue;
}
/* handle timeout events first if any */
openr2_chan_run_schedule(r2chan);
/* handle timeout events first if any */
openr2_chan_run_schedule(r2chan);
/* process mf tones, if any */
if (openr2_chan_get_read_enabled(r2chan))
openr2_chan_process_mf_signaling(r2chan);
/* process mf tones, if any */
if (openr2_chan_get_read_enabled(r2chan)) {
openr2_chan_process_mf_signaling(r2chan);
}
if (ftdm_r2_state_advance(ftdmchan)) {
ftdm_clear_flag(r2call, FTDM_R2_PROCESSING);
ftdm_mutex_unlock(ftdmchan->mutex);
continue;
}
if (ftdm_r2_state_advance(ftdmchan)) {
ftdm_clear_flag(r2call, FTDM_R2_PROCESSING);
ftdm_mutex_unlock(ftdmchan->mutex);
continue;
}
ftdm_clear_flag(r2call, FTDM_R2_PROCESSING);
ftdm_mutex_unlock(ftdmchan->mutex);
}
ftdm_clear_flag(r2call, FTDM_R2_PROCESSING);
ftdm_mutex_unlock(ftdmchan->mutex);
}
} else if (status != FTDM_TIMEOUT) {
ftdm_log(FTDM_LOG_ERROR, "ftdm_span_poll_event returned %d.\n", status);
}
}
ftdm_sleep(20);
}

View File

@ -49,7 +49,6 @@ ftdm_channel_t* ftdm_sangoma_isdn_process_event_states(ftdm_span_t *span, sngisd
static void ftdm_sangoma_isdn_advance_chan_states(ftdm_channel_t *ftdmchan);
static void ftdm_sangoma_isdn_poll_events(ftdm_span_t *span);
static void ftdm_sangoma_isdn_process_phy_events(ftdm_span_t *span, ftdm_oob_event_t event);
static void ftdm_sangoma_isdn_process_state_change(ftdm_channel_t *ftdmchan);
static void ftdm_sangoma_isdn_process_stack_event (ftdm_span_t *span, sngisdn_event_data_t *sngisdn_event);
@ -279,6 +278,10 @@ static void ftdm_sangoma_isdn_process_phy_events(ftdm_span_t *span, ftdm_oob_eve
static void ftdm_sangoma_isdn_poll_events(ftdm_span_t *span)
{
ftdm_status_t ret_status;
ftdm_channel_t *ftdmchan;
ftdm_iterator_t *chaniter = NULL;
ftdm_iterator_t *curr = NULL;
ret_status = ftdm_span_poll_event(span, 0, NULL);
switch(ret_status) {
case FTDM_SUCCESS:

View File

@ -100,6 +100,8 @@ ftdm_status_t parse_switchtype(const char* switch_name, ftdm_span_t *span)
ftdm_log(FTDM_LOG_ERROR, "%s:Unsupported switchtype %s for trunktype:%s\n", span->name, switch_name, ftdm_trunk_type2str(span->trunk_type));
return FTDM_FAIL;
}
ftdm_set_flag(span, FTDM_SPAN_USE_AV_RATE);
ftdm_set_flag(span, FTDM_SPAN_PWR_SAVING);
/* can be > 1 for some BRI variants */
break;
default:
@ -188,6 +190,7 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
signal_data->min_digits = 8;
signal_data->overlap_dial = SNGISDN_OPT_DEFAULT;
signal_data->setup_arb = SNGISDN_OPT_DEFAULT;
signal_data->timer_t3 = 8;
signal_data->link_id = span->span_id;
span->default_caller_data.bearer_capability = IN_ITC_SPEECH;
@ -198,6 +201,7 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
if (span->trunk_type == FTDM_TRUNK_BRI ||
span->trunk_type == FTDM_TRUNK_BRI_PTMP) {
ftdm_span_set_npi("unknown", &span->default_caller_data.dnis.plan);
ftdm_span_set_ton("unknown", &span->default_caller_data.dnis.type);
ftdm_span_set_npi("unknown", &span->default_caller_data.cid_num.plan);

View File

@ -113,6 +113,40 @@ ftdm_status_t sngisdn_stack_stop(ftdm_span_t *span)
}
ftdm_status_t sngisdn_wake_up_phy(ftdm_span_t *span)
{
L1Mngmt cntrl;
Pst pst;
sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*)span->signal_data;
/* initalize the post structure */
stack_pst_init(&pst);
/* insert the destination Entity */
pst.dstEnt = ENTL1;
/* initalize the control structure */
memset(&cntrl, 0, sizeof(cntrl));
/* initalize the control header */
stack_hdr_init(&cntrl.hdr);
cntrl.hdr.msgType = TCNTRL; /* configuration */
cntrl.hdr.entId.ent = ENTL1; /* entity */
cntrl.hdr.entId.inst = S_INST; /* instance */
cntrl.hdr.elmId.elmnt = STTSAP; /* SAP Specific cntrl */
cntrl.t.cntrl.action = AENA;
cntrl.t.cntrl.subAction = SAELMNT;
cntrl.t.cntrl.sapId = signal_data->link_id;
if (sng_isdn_phy_cntrl(&pst, &cntrl)) {
return FTDM_FAIL;
}
return FTDM_SUCCESS;
}
ftdm_status_t sngisdn_activate_phy(ftdm_span_t *span)
{

View File

@ -135,6 +135,7 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event)
cpy_calling_num_from_stack(&ftdmchan->caller_data, &conEvnt->cgPtyNmb);
cpy_called_num_from_stack(&ftdmchan->caller_data, &conEvnt->cdPtyNmb);
cpy_calling_name_from_stack(&ftdmchan->caller_data, &conEvnt->display);
cpy_redir_num_from_stack(&ftdmchan->caller_data, &conEvnt->redirNmb);
ftdm_log_chan(sngisdn_info->ftdmchan, FTDM_LOG_INFO, "Incoming call: Called No:[%s] Calling No:[%s]\n", ftdmchan->caller_data.dnis.digits, ftdmchan->caller_data.cid_num.digits);
if (conEvnt->bearCap[0].eh.pres) {

View File

@ -38,13 +38,6 @@ extern ftdm_status_t cpy_calling_num_from_user(CgPtyNmb *cgPtyNmb, ftdm_caller_d
extern ftdm_status_t cpy_called_num_from_user(CdPtyNmb *cdPtyNmb, ftdm_caller_data_t *ftdm);
extern ftdm_status_t cpy_calling_name_from_user(ConEvnt *conEvnt, ftdm_channel_t *ftdmchan);
void sngisdn_snd_setup(ftdm_channel_t *ftdmchan);
void sngisdn_snd_proceed(ftdm_channel_t *ftdmchan);
void sngisdn_snd_progress(ftdm_channel_t *ftdmchan);
void sngisdn_snd_connect(ftdm_channel_t *ftdmchan);
void sngisdn_snd_disconnect(ftdm_channel_t *ftdmchan);
void sngisdn_snd_release(ftdm_channel_t *ftdmchan, uint8_t glare);
void sngisdn_snd_setup(ftdm_channel_t *ftdmchan)
{
@ -147,6 +140,7 @@ void sngisdn_snd_setup(ftdm_channel_t *ftdmchan)
cpy_called_num_from_user(&conEvnt.cdPtyNmb, &ftdmchan->caller_data);
cpy_calling_num_from_user(&conEvnt.cgPtyNmb, &ftdmchan->caller_data);
cpy_redir_num_from_user(&conEvnt.redirNmb, &ftdmchan->caller_data);
cpy_calling_name_from_user(&conEvnt, ftdmchan);
ftdm_log_chan(ftdmchan, FTDM_LOG_INFO, "Sending SETUP (suId:%d suInstId:%u spInstId:%u dchan:%d ces:%d)\n", signal_data->cc_id, sngisdn_info->suInstId, sngisdn_info->spInstId, signal_data->dchan_id, sngisdn_info->ces);

View File

@ -1011,13 +1011,15 @@ static FIO_GET_ALARMS_FUNCTION(wanpipe_get_alarms)
}
alarms = tdm_api.wp_tdm_cmd.fe_alarms;
#endif
#if 1
/* DAVIDY - Temporary fix: in the current trunk of libsangoma, for BRI,
#ifdef WIN32
/* Temporary fix: in the current trunk of libsangoma, for BRI,
WAN_TE_BIT_ALARM_RED bit is set if the card is in disconnected state, but this has
not been ported to Windows-libsangoma yet */
if (alarms) {
ftdmchan->alarm_flags |= FTDM_ALARM_RED;
alarms = 0;
if (FTDM_SPAN_IS_BRI(ftdmchan->span)) {
if (alarms) {
ftdmchan->alarm_flags |= FTDM_ALARM_RED;
alarms = 0;
}
}
#endif
@ -1027,6 +1029,7 @@ static FIO_GET_ALARMS_FUNCTION(wanpipe_get_alarms)
ftdmchan->alarm_flags |= FTDM_ALARM_RED;
alarms &= ~WAN_TE_BIT_ALARM_RED;
}
if (alarms & WAN_TE_BIT_ALARM_AIS) {
ftdmchan->alarm_flags |= FTDM_ALARM_BLUE;
@ -1176,6 +1179,11 @@ FIO_SPAN_NEXT_EVENT_FUNCTION(wanpipe_next_event)
char tmp_dtmf[2] = { tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_dtmf_digit, 0 };
event_id = FTDM_OOB_NOOP;
if (tmp_dtmf[0] == 'f') {
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Ignoring wanpipe DTMF: %c, fax tones will be passed through!\n", tmp_dtmf[0]);
break;
}
if (tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_dtmf_type == WAN_EC_TONE_PRESENT) {
ftdm_set_flag_locked(ftdmchan, FTDM_CHANNEL_MUTE);
}

View File

@ -867,7 +867,7 @@ static FIO_WAIT_FUNCTION(zt_wait)
{
int32_t inflags = 0;
int result;
struct pollfd pfds[1];
struct pollfd pfds[1];
if (*flags & FTDM_READ) {
inflags |= POLLIN;
@ -882,13 +882,14 @@ static FIO_WAIT_FUNCTION(zt_wait)
}
memset(&pfds[0], 0, sizeof(pfds[0]));
pfds[0].fd = ftdmchan->sockfd;
pfds[0].events = inflags;
result = poll(pfds, 1, to);
memset(&pfds[0], 0, sizeof(pfds[0]));
pfds[0].fd = ftdmchan->sockfd;
pfds[0].events = inflags;
result = poll(pfds, 1, to);
*flags = 0;
if (pfds[0].revents & POLLERR) {
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "DAHDI device got POLLERR\n");
result = -1;
}
@ -900,6 +901,7 @@ static FIO_WAIT_FUNCTION(zt_wait)
if (result < 0){
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "Poll failed");
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Failed to poll DAHDI device: %s\n", strerror(errno));
return FTDM_FAIL;
}

View File

@ -223,7 +223,6 @@ extern "C" {
#define ftdm_is_dtmf(key) ((key > 47 && key < 58) || (key > 64 && key < 69) || (key > 96 && key < 101) || key == 35 || key == 42 || key == 87 || key == 119)
#define FTDM_SPAN_IS_BRI(x) ((x)->trunk_type == FTDM_TRUNK_BRI || (x)->trunk_type == FTDM_TRUNK_BRI_PTMP)
/*!
\brief Copy flags from one arbitrary object to another
\command dest the object to copy the flags to

View File

@ -1,13 +1,13 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 4 lt~obsolete.m4
# serial 5 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
@ -77,7 +77,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
@ -90,3 +89,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])

View File

@ -898,7 +898,7 @@ tryagain:
static void handle_call_loop_start(zap_span_t *span, sangomabc_connection_t *mcon, sangomabc_short_event_t *event)
{
zap_status_t res = ZAP_FAIL;
zap_state_change_result_t res = ZAP_FAIL;
zap_channel_t *zchan;
if (!(zchan = find_zchan(span, (sangomabc_short_event_t*)event, 0))) {
@ -923,7 +923,7 @@ static void handle_call_loop_start(zap_span_t *span, sangomabc_connection_t *mco
static __inline__ void stop_loop(zap_channel_t *zchan)
{
zap_status_t res = ZAP_FAIL;
zap_state_change_result_t res = ZAP_STATE_CHANGE_FAIL;
zap_channel_command(zchan, ZAP_COMMAND_DISABLE_LOOP, NULL);
/* even when we did not sent a msg we set this flag to avoid sending call stop in the DOWN state handler */
zap_set_flag(zchan, SFLAG_SENT_FINAL_MSG);

View File

@ -1119,7 +1119,14 @@ ZIO_SPAN_NEXT_EVENT_FUNCTION(wanpipe_next_event)
event_id = ZAP_OOB_NOOP;
//zap_log(ZAP_LOG_WARNING, "%d:%d queue hardware dtmf %s %s\n", zchan->span_id, zchan->chan_id, tmp_dtmf,
//tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_dtmf_type == WAN_EC_TONE_PRESENT ? "on" : "off");
//tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_dtmf_type == WAN_EC_TONE_PRESENT ? "on" : "off");
if (tmp_dtmf[0] == 'f') {
if (zap_test_flag(zchan, ZAP_CHANNEL_INUSE)) {
zap_channel_queue_dtmf(zchan, tmp_dtmf);
}
break;
}
if (tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_dtmf_type == WAN_EC_TONE_PRESENT) {
zap_set_flag_locked(zchan, ZAP_CHANNEL_MUTE);
}

View File

@ -1 +1 @@
Mon May 31 09:47:08 EDT 2010
Wed Nov 3 13:53:34 EDT 2010

View File

@ -1674,7 +1674,7 @@ int agent_set_params(nta_agent_t *agent, tagi_t *tags)
progress = 60 * 1000;
agent->sa_progress = progress;
if (server_rport > 2)
if (server_rport > 3)
server_rport = 1;
else if (server_rport < 0)
server_rport = 1;
@ -3084,7 +3084,9 @@ int agent_check_request_via(nta_agent_t *agent,
rport = su_sprintf(msg_home(msg), "rport=%u", ntohs(from->su_port));
msg_header_replace_param(msg_home(msg), v->v_common, rport);
}
else if (agent->sa_server_rport == 2) {
else if (agent->sa_server_rport == 2 ||
(agent->sa_server_rport == 3 && sip && sip->sip_user_agent &&
sip->sip_user_agent->g_string && !strncasecmp(sip->sip_user_agent->g_string, "Polycom", 7))) {
rport = su_sprintf(msg_home(msg), "rport=%u", ntohs(from->su_port));
msg_header_replace_param(msg_home(msg), v->v_common, rport);
}
@ -8174,9 +8176,12 @@ outgoing_send(nta_outgoing_t *orq, int retransmit)
if (orq->orq_method == sip_method_ack)
;
else if (!orq->orq_reliable)
outgoing_set_timer(orq, agent->sa_t1); /* Timer A/E */
else if (orq->orq_try_tcp_instead && !tport_is_connected(tp))
else if (!orq->orq_reliable) {
/* race condition on initial t1 timer timeout, set minimum initial timeout to 1000ms */
unsigned t1_timer = agent->sa_t1;
if (t1_timer < 1000) t1_timer = 1000;
outgoing_set_timer(orq, t1_timer); /* Timer A/E */
} else if (orq->orq_try_tcp_instead && !tport_is_connected(tp))
outgoing_set_timer(orq, agent->sa_t4); /* Timer N3 */
}
@ -8660,6 +8665,10 @@ void outgoing_destroy(nta_outgoing_t *orq)
orq->orq_destroyed = 1;
orq->orq_callback = outgoing_default_cb;
orq->orq_magic = NULL;
if (orq->orq_method != sip_method_invite &&
orq->orq_method != sip_method_ack)
outgoing_terminate(orq);
}
/** @internal Outgoing transaction timer routine.

View File

@ -280,7 +280,8 @@ stfu_frame_t *stfu_n_read_a_frame(stfu_instance_t *i)
i->miss_count++;
if (i->miss_count > 10 || (i->in_queue->array_len == i->in_queue->array_size) || tried >= i->in_queue->array_size) {
if (i->miss_count > 10 || (i->in_queue->array_len == i->in_queue->array_size) ||
tried >= (i->in_queue->array_size + i->out_queue->array_size)) {
i->running = 0;
i->interval = 0;
i->out_queue->wr_len = i->out_queue->array_size;

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -33,7 +36,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\16000&quot; /C /D /Y /S /I"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@ -55,7 +58,52 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\16000&quot; /C /D /Y /S /I"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\16000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -58,6 +61,51 @@
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\16000\*.*&quot; &quot;$(OutDir)\sounds\music\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\16000\*.*&quot; &quot;$(OutDir)\sounds\music\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\16000\*.*&quot; &quot;$(OutDir)\sounds\music\16000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -33,7 +36,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\32000&quot; /C /D /Y /S /I"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@ -55,7 +58,52 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\32000&quot; /C /D /Y /S /I"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\32000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\32000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -58,6 +61,51 @@
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\32000\*.*&quot; &quot;$(OutDir)\sounds\music\32000&quot; /C /D /Y /S /I"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\32000\*.*&quot; &quot;$(OutDir)\sounds\music\32000&quot; /C /D /Y /S /I"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\32000\*.*&quot; &quot;$(OutDir)\sounds\music\32000&quot; /C /D /Y /S /I"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -33,7 +36,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\8000&quot; /C /D /Y /S /I"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@ -55,7 +58,52 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\8000&quot; /C /D /Y /S /I"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\voicemail\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\voicemail\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ivr\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ivr\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\conference\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\conference\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\time\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\time\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\digits\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\digits\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\misc\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\misc\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\currency\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\currency\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\phonetic-ascii\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\phonetic-ascii\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;xcopy &quot;$(SolutionDir)libs\sounds\en\us\callie\directory\8000\*.*&quot; &quot;$(OutDir)\sounds\en\us\callie\directory\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -58,6 +61,51 @@
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\8000\*.*&quot; &quot;$(OutDir)\sounds\music\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\8000\*.*&quot; &quot;$(OutDir)\sounds\music\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="xcopy &quot;$(SolutionDir)libs\sounds\music\8000\*.*&quot; &quot;$(OutDir)\sounds\music\8000&quot; /C /D /Y /S /I&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -172,7 +172,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="."
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;HAVE_STDARG_H;STDC_HEADERS"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;HAVE_STDARG_H;STDC_HEADERS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
@ -236,7 +236,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="."
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;HAVE_STDARG_H;STDC_HEADERS"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;HAVE_STDARG_H;STDC_HEADERS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"

View File

@ -96,7 +96,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;HAVE_STDARG_H;STDC_HEADERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;HAVE_STDARG_H;STDC_HEADERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
@ -110,7 +110,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;HAVE_STDARG_H;STDC_HEADERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;HAVE_STDARG_H;STDC_HEADERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>

View File

@ -32,7 +32,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="copy /Y $(ProjectDir)opensslconf.h $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h&#x0D;&#x0A;copy /Y $(ProjectDir)applink.c $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c&#x0D;&#x0A;copy /Y $(ProjectDir)buildinf.h $(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h&#x0D;&#x0A;copy /Y $(ProjectDir)libeay32.def $(ProjectDir)..\..\openssl-1.0.0a\libeay32.def&#x0D;&#x0A;if not exist &quot; $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h&quot; xcopy &quot;$(ProjectDir)\include\*.*&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\&quot; /C /Y /S&#x0D;&#x0A;"
CommandLine="copy /Y &quot;$(ProjectDir)opensslconf.h&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)applink.c&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)buildinf.h&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)libeay32.def&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\libeay32.def&quot;&#x0D;&#x0A;if not exist &quot; $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h&quot; xcopy &quot;$(ProjectDir)\include\*.*&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\&quot; /C /Y /S&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@ -116,7 +116,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="copy /Y $(ProjectDir)opensslconf.h $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h&#x0D;&#x0A;copy /Y $(ProjectDir)applink.c $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c&#x0D;&#x0A;copy /Y $(ProjectDir)buildinf.h $(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h&#x0D;&#x0A;copy /Y $(ProjectDir)libeay32.def $(ProjectDir)..\..\openssl-1.0.0a\libeay32.def&#x0D;&#x0A;if not exist &quot; $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h&quot; xcopy &quot;$(ProjectDir)\include\*.*&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\&quot; /C /Y /S&#x0D;&#x0A;"
CommandLine="copy /Y &quot;$(ProjectDir)opensslconf.h&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)applink.c&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)buildinf.h&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)libeay32.def&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\libeay32.def&quot;&#x0D;&#x0A;if not exist &quot; $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h&quot; xcopy &quot;$(ProjectDir)\include\*.*&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\&quot; /C /Y /S&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@ -201,7 +201,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="copy /Y $(ProjectDir)opensslconf.h $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h&#x0D;&#x0A;copy /Y $(ProjectDir)applink.c $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c&#x0D;&#x0A;copy /Y $(ProjectDir)buildinf.h $(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h&#x0D;&#x0A;copy /Y $(ProjectDir)libeay32.def $(ProjectDir)..\..\openssl-1.0.0a\libeay32.def&#x0D;&#x0A;if not exist &quot; $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h&quot; xcopy &quot;$(ProjectDir)\include\*.*&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\&quot; /C /Y /S&#x0D;&#x0A;"
CommandLine="copy /Y &quot;$(ProjectDir)opensslconf.h&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)applink.c&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)buildinf.h&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)libeay32.def&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\libeay32.def&quot;&#x0D;&#x0A;if not exist &quot; $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h&quot; xcopy &quot;$(ProjectDir)\include\*.*&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\&quot; /C /Y /S&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@ -286,7 +286,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="copy /Y $(ProjectDir)opensslconf.h $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h&#x0D;&#x0A;copy /Y $(ProjectDir)applink.c $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c&#x0D;&#x0A;copy /Y $(ProjectDir)buildinf.h $(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h&#x0D;&#x0A;copy /Y $(ProjectDir)libeay32.def $(ProjectDir)..\..\openssl-1.0.0a\libeay32.def&#x0D;&#x0A;if not exist &quot; $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h&quot; xcopy &quot;$(ProjectDir)\include\*.*&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\&quot; /C /Y /S&#x0D;&#x0A;"
CommandLine="copy /Y &quot;$(ProjectDir)opensslconf.h&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)applink.c&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)buildinf.h&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h&quot;&#x0D;&#x0A;copy /Y &quot;$(ProjectDir)libeay32.def&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\libeay32.def&quot;&#x0D;&#x0A;if not exist &quot; $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h&quot; xcopy &quot;$(ProjectDir)\include\*.*&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\&quot; /C /Y /S&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"

View File

@ -81,10 +81,10 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>copy /Y $(ProjectDir)opensslconf.h $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h
copy /Y $(ProjectDir)applink.c $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c
copy /Y $(ProjectDir)buildinf.h $(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h
copy /Y $(ProjectDir)libeay32.def $(ProjectDir)..\..\openssl-1.0.0a\libeay32.def
<Command>copy /Y "$(ProjectDir)opensslconf.h" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h"
copy /Y "$(ProjectDir)applink.c" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c"
copy /Y "$(ProjectDir)buildinf.h" "$(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h"
copy /Y "$(ProjectDir)libeay32.def" "$(ProjectDir)..\..\openssl-1.0.0a\libeay32.def"
if not exist "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h" xcopy "$(ProjectDir)\include\*.*" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\" /C /Y /S
</Command>
</PreBuildEvent>
@ -115,10 +115,10 @@ if not exist "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h" xcopy "$
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent>
<Command>copy /Y $(ProjectDir)opensslconf.h $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h
copy /Y $(ProjectDir)applink.c $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c
copy /Y $(ProjectDir)buildinf.h $(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h
copy /Y $(ProjectDir)libeay32.def $(ProjectDir)..\..\openssl-1.0.0a\libeay32.def
<Command>copy /Y "$(ProjectDir)opensslconf.h" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h"
copy /Y "$(ProjectDir)applink.c" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c"
copy /Y "$(ProjectDir)buildinf.h" "$(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h"
copy /Y "$(ProjectDir)libeay32.def" "$(ProjectDir)..\..\openssl-1.0.0a\libeay32.def"
if not exist "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h" xcopy "$(ProjectDir)\include\*.*" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\" /C /Y /S
</Command>
</PreBuildEvent>
@ -151,10 +151,10 @@ if not exist "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h" xcopy "$
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>copy /Y $(ProjectDir)opensslconf.h $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h
copy /Y $(ProjectDir)applink.c $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c
copy /Y $(ProjectDir)buildinf.h $(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h
copy /Y $(ProjectDir)libeay32.def $(ProjectDir)..\..\openssl-1.0.0a\libeay32.def
<Command>copy /Y "$(ProjectDir)opensslconf.h" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h"
copy /Y "$(ProjectDir)applink.c" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c"
copy /Y "$(ProjectDir)buildinf.h" "$(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h"
copy /Y "$(ProjectDir)libeay32.def" "$(ProjectDir)..\..\openssl-1.0.0a\libeay32.def"
if not exist "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h" xcopy "$(ProjectDir)\include\*.*" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\" /C /Y /S
</Command>
</PreBuildEvent>
@ -185,10 +185,10 @@ if not exist "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h" xcopy "$
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>copy /Y $(ProjectDir)opensslconf.h $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h
copy /Y $(ProjectDir)applink.c $(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c
copy /Y $(ProjectDir)buildinf.h $(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h
copy /Y $(ProjectDir)libeay32.def $(ProjectDir)..\..\openssl-1.0.0a\libeay32.def
<Command>copy /Y "$(ProjectDir)opensslconf.h" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\opensslconf.h"
copy /Y "$(ProjectDir)applink.c" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\applink.c"
copy /Y "$(ProjectDir)buildinf.h" "$(ProjectDir)..\..\openssl-1.0.0a\crypto\buildinf.h"
copy /Y "$(ProjectDir)libeay32.def" "$(ProjectDir)..\..\openssl-1.0.0a\libeay32.def"
if not exist "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\e_os.h" xcopy "$(ProjectDir)\include\*.*" "$(ProjectDir)..\..\openssl-1.0.0a\include\openssl\" /C /Y /S
</Command>
</PreBuildEvent>

View File

@ -29,7 +29,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="copy /Y $(ProjectDir)ssleay32.def $(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def"
CommandLine="copy /Y &quot;$(ProjectDir)ssleay32.def&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -108,7 +108,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="copy /Y $(ProjectDir)ssleay32.def $(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def"
CommandLine="copy /Y &quot;$(ProjectDir)ssleay32.def&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -188,7 +188,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="copy /Y $(ProjectDir)ssleay32.def $(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def"
CommandLine="copy /Y &quot;$(ProjectDir)ssleay32.def&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -268,7 +268,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="copy /Y $(ProjectDir)ssleay32.def $(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def"
CommandLine="copy /Y &quot;$(ProjectDir)ssleay32.def&quot; &quot;$(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def&quot;"
/>
<Tool
Name="VCCustomBuildTool"

View File

@ -80,7 +80,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>copy /Y $(ProjectDir)ssleay32.def $(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def</Command>
<Command>copy /Y "$(ProjectDir)ssleay32.def" "$(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def"</Command>
</PreBuildEvent>
<ClCompile>
<AdditionalOptions>/Gs0 %(AdditionalOptions)</AdditionalOptions>
@ -107,7 +107,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>copy /Y $(ProjectDir)ssleay32.def $(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def</Command>
<Command>copy /Y "$(ProjectDir)ssleay32.def" "$(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def"</Command>
</PreBuildEvent>
<ClCompile>
<AdditionalOptions>/Gs0 %(AdditionalOptions)</AdditionalOptions>
@ -134,7 +134,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent>
<Command>copy /Y $(ProjectDir)ssleay32.def $(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def</Command>
<Command>copy /Y "$(ProjectDir)ssleay32.def" "$(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def"</Command>
</PreBuildEvent>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
@ -164,7 +164,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>copy /Y $(ProjectDir)ssleay32.def $(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def</Command>
<Command>copy /Y "$(ProjectDir)ssleay32.def" "$(ProjectDir)..\..\openssl-1.0.0a\ssleay32.def"</Command>
</PreBuildEvent>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>

246
src/fs_encode.c Normal file
View File

@ -0,0 +1,246 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2010, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* The Initial Developer of the Original Code is
* Anthony Minessale II <anthm@freeswitch.org>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Mathieu Rene <mrene@avgs.ca>
*
* fs_encode.c -- Encode a native file
*
*/
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
#ifndef WIN32
#ifdef HAVE_SETRLIMIT
#include <sys/resource.h>
#endif
#endif
#include <switch.h>
#include <switch_version.h>
/* Picky compiler */
#ifdef __ICC
#pragma warning (disable:167)
#endif
int main(int argc, char *argv[])
{
int r = 1;
switch_bool_t verbose = SWITCH_FALSE;
const char *err = NULL;
int i;
char *extra_modules[100] = { 0 };
int extra_modules_count = 0;
int cmd_fail = 0;
const char *fmtp = "";
int ptime = 20;
const char *input, *output, *format = NULL;
int channels = 1;
int rate = 8000;
switch_file_handle_t fh_input = { 0 }, fh_output = { 0 };
switch_codec_t codec = { 0 };
char buf[2048];
switch_size_t len = sizeof(buf)/2;
switch_memory_pool_t *pool;
int bitrate = 0;
int blocksize;
for (i = 1; i < argc; i++) {
if (argv[i][0] == '-') {
switch(argv[i][1]) {
case 'l':
i++;
/* Load extra modules */
if (strchr(argv[i], ',')) {
extra_modules_count = switch_split(argv[i], ',', extra_modules);
} else {
extra_modules_count = 1;
extra_modules[0] = argv[i];
}
break;
case 'f':
fmtp = argv[++i];
break;
case 'p':
ptime = atoi(argv[++i]);
break;
case 'r':
rate = atoi(argv[++i]);
break;
case 'b':
bitrate = atoi(argv[++i]);
break;
case 'v':
verbose = SWITCH_TRUE;
break;
default:
printf("Command line option not recognized: %s\n", argv[i]);
cmd_fail = 1;
}
} else {
break;
}
}
if (argc - i < 2 || cmd_fail) {
goto usage;
}
input = argv[i++];
output = argv[i++];
if (zstr(input) || zstr(output) || !(format = strchr(output, '.'))) {
goto usage;
}
format++;
if (switch_core_init(SCF_MINIMAL, verbose, &err) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Cannot init core [%s]\n", err);
goto end;
}
switch_loadable_module_init(SWITCH_FALSE);
for (i = 0; i < extra_modules_count; i++) {
if (switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) extra_modules[i], SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Cannot init %s [%s]\n", extra_modules[i], err);
goto end;
}
}
if (switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) "mod_sndfile", SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Cannot init mod_sndfile [%s]\n", err);
goto end;
}
if (switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) "mod_native_file", SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Cannot init mod_native_file [%s]\n", err);
goto end;
}
switch_core_new_memory_pool(&pool);
if (verbose) {
fprintf(stderr, "Opening file %s\n", input);
}
if (switch_core_file_open(&fh_input, input, channels, rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Couldn't open %s\n", input);
goto end;
}
if (verbose) {
fprintf(stderr, "Opening file %s\n", output);
}
if (switch_core_file_open(&fh_output, output, channels, rate, SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_NATIVE, NULL) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Couldn't open %s\n", output);
goto end;
}
if (switch_test_flag(&fh_input, SWITCH_FILE_NATIVE)) {
fprintf(stderr, "Input as native file is not implemented\n");
goto end;
}
if (switch_core_codec_init_with_bitrate(&codec, format, fmtp, rate, ptime, channels, bitrate, SWITCH_CODEC_FLAG_ENCODE, NULL, pool) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Couldn't initialize codec for %s@%dh@%di\n", format, rate, ptime);
goto end;
}
blocksize = len = (rate*ptime)/1000;
switch_assert(sizeof(buf) >= len * 2);
if (verbose) {
fprintf(stderr, "Frame size is %d\n", blocksize);
}
while (switch_core_file_read(&fh_input, buf, &len) == SWITCH_STATUS_SUCCESS) {
char encode_buf[2048];
uint32_t encoded_len = sizeof(buf);
uint32_t encoded_rate = rate;
unsigned int flags = 0;
if (switch_core_codec_encode(&codec, NULL, buf, len*2, rate, encode_buf, &encoded_len, &encoded_rate, &flags) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Codec encoder error\n");
goto end;
}
len = encoded_len;
if (switch_core_file_write(&fh_output, encode_buf, &len) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Write error\n");
goto end;
}
if (len != encoded_len) {
printf("Short write: wrote %"SWITCH_SIZE_T_FMT"/%d bytes\n", len, encoded_len);
}
len = blocksize;
}
r = 0;
end:
switch_core_codec_destroy(&codec);
if (fh_input.file_interface) {
switch_core_file_close(&fh_input);
}
if (fh_output.file_interface) {
switch_core_file_close(&fh_output);
}
if (pool) {
switch_core_destroy_memory_pool(&pool);
}
switch_core_destroy();
return r;
usage:
printf("Usage: %s [options] input output\n\n", argv[0]);
printf("The output must end in the format, e.g., myfile.SPEEX\n");
printf("\t\t -l module[,module]\t Load additional modules (comma-separated)\n");
printf("\t\t -f format\t\t fmtp to pass to the codec\n");
printf("\t\t -p ptime\t\t ptime to use while encoding\n");
printf("\t\t -r rate\t\t sampling rate\n");
printf("\t\t -b bitrate\t\t codec bitrate (if supported)\n");
printf("\t\t -v\t\t\t verbose\n");
return 1;
}
/* For Emacs:
* Local Variables:
* mode:c
* indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
*/

View File

@ -193,6 +193,11 @@ struct switch_media_bug {
struct switch_media_bug *next;
};
typedef enum {
DBTYPE_DEFAULT = 0,
DBTYPE_MSSQL = 1,
} switch_dbtype_t;
struct switch_runtime {
switch_time_t initiated;
switch_time_t reference;
@ -237,6 +242,7 @@ struct switch_runtime {
double min_idle_time;
int sql_buffer_len;
int max_sql_buffer_len;
switch_dbtype_t odbc_dbtype;
};
extern struct switch_runtime runtime;

View File

@ -45,6 +45,7 @@ typedef struct switch_io_event_hook_kill_channel switch_io_event_hook_kill_chann
typedef struct switch_io_event_hook_send_dtmf switch_io_event_hook_send_dtmf_t;
typedef struct switch_io_event_hook_recv_dtmf switch_io_event_hook_recv_dtmf_t;
typedef struct switch_io_event_hook_state_change switch_io_event_hook_state_change_t;
typedef struct switch_io_event_hook_state_run switch_io_event_hook_state_run_t;
typedef struct switch_io_event_hook_resurrect_session switch_io_event_hook_resurrect_session_t;
typedef switch_status_t (*switch_outgoing_channel_hook_t)
(switch_core_session_t *, switch_event_t *, switch_caller_profile_t *, switch_core_session_t *, switch_originate_flag_t);
@ -58,6 +59,7 @@ typedef switch_status_t (*switch_kill_channel_hook_t) (switch_core_session_t *,
typedef switch_status_t (*switch_send_dtmf_hook_t) (switch_core_session_t *, const switch_dtmf_t *, switch_dtmf_direction_t direction);
typedef switch_status_t (*switch_recv_dtmf_hook_t) (switch_core_session_t *, const switch_dtmf_t *, switch_dtmf_direction_t direction);
typedef switch_status_t (*switch_state_change_hook_t) (switch_core_session_t *);
typedef switch_status_t (*switch_state_run_hook_t) (switch_core_session_t *);
typedef switch_call_cause_t (*switch_resurrect_session_hook_t) (switch_core_session_t **, switch_memory_pool_t **, void *);
/*! \brief Node in which to store custom receive message callback hooks */
@ -136,6 +138,13 @@ struct switch_io_event_hook_state_change {
struct switch_io_event_hook_state_change *next;
};
/*! \brief Node in which to store state run callback hooks */
struct switch_io_event_hook_state_run {
/*! the state run channel callback hook */
switch_state_run_hook_t state_run;
struct switch_io_event_hook_state_run *next;
};
struct switch_io_event_hook_resurrect_session {
switch_resurrect_session_hook_t resurrect_session;
@ -166,6 +175,7 @@ struct switch_io_event_hooks {
switch_io_event_hook_recv_dtmf_t *recv_dtmf;
/*! a list of state change hooks */
switch_io_event_hook_state_change_t *state_change;
switch_io_event_hook_state_run_t *state_run;
switch_io_event_hook_resurrect_session_t *resurrect_session;
};
@ -218,6 +228,7 @@ NEW_HOOK_DECL_ADD_P(outgoing_channel);
NEW_HOOK_DECL_ADD_P(receive_message);
NEW_HOOK_DECL_ADD_P(receive_event);
NEW_HOOK_DECL_ADD_P(state_change);
NEW_HOOK_DECL_ADD_P(state_run);
NEW_HOOK_DECL_ADD_P(read_frame);
NEW_HOOK_DECL_ADD_P(write_frame);
NEW_HOOK_DECL_ADD_P(video_read_frame);
@ -231,6 +242,7 @@ NEW_HOOK_DECL_REM_P(outgoing_channel);
NEW_HOOK_DECL_REM_P(receive_message);
NEW_HOOK_DECL_REM_P(receive_event);
NEW_HOOK_DECL_REM_P(state_change);
NEW_HOOK_DECL_REM_P(state_run);
NEW_HOOK_DECL_REM_P(read_frame);
NEW_HOOK_DECL_REM_P(write_frame);
NEW_HOOK_DECL_REM_P(video_read_frame);

View File

@ -345,11 +345,15 @@ SWITCH_DECLARE(switch_status_t) switch_event_create_pres_in_detailed(_In_z_ char
*/
#define switch_event_create(event, id) switch_event_create_subclass(event, id, SWITCH_EVENT_SUBCLASS_ANY)
static inline switch_status_t switch_event_create_plain(switch_event_t **event, switch_event_types_t event_id)
static inline switch_status_t switch_event_create_plain(switch_event_t **event, switch_event_types_t event_id)
{
switch_status_t status = switch_event_create(event, SWITCH_EVENT_CLONE);
if (status == SWITCH_STATUS_SUCCESS) {
(*event)->event_id = event_id;
if (event_id == SWITCH_EVENT_REQUEST_PARAMS || event_id == SWITCH_EVENT_CHANNEL_DATA) {
(*event)->flags |= EF_UNIQ_HEADERS;
}
}
return status;

View File

@ -840,11 +840,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_say_ip(switch_core_session_t *session
SWITCH_DECLARE(switch_status_t) switch_ivr_set_user(switch_core_session_t *session, const char *data);
SWITCH_DECLARE(switch_status_t) switch_ivr_sound_test(switch_core_session_t *session);
SWITCH_DECLARE(void) switch_process_import(switch_core_session_t *session, switch_channel_t *peer_channel, const char *varname);
SWITCH_DECLARE(void) switch_process_import(switch_core_session_t *session, switch_channel_t *peer_channel, const char *varname, const char *prefix);
SWITCH_DECLARE(switch_bool_t) switch_ivr_uuid_exists(const char *uuid);
SWITCH_DECLARE(void) switch_ivr_dmachine_set_match_callback(switch_ivr_dmachine_t *dmachine, switch_ivr_dmachine_callback_t match_callback);
SWITCH_DECLARE(void) switch_ivr_dmachine_set_nonmatch_callback(switch_ivr_dmachine_t *dmachine, switch_ivr_dmachine_callback_t nonmatch_callback);
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_create(switch_ivr_dmachine_t **dmachine_p,
const char *name,
switch_memory_pool_t *pool,

View File

@ -134,6 +134,7 @@ typedef switch_status_t (*switch_io_send_dtmf_t) (switch_core_session_t *, const
typedef switch_status_t (*switch_io_receive_message_t) (switch_core_session_t *, switch_core_session_message_t *);
typedef switch_status_t (*switch_io_receive_event_t) (switch_core_session_t *, switch_event_t *);
typedef switch_status_t (*switch_io_state_change_t) (switch_core_session_t *);
typedef switch_status_t (*switch_io_state_run_t) (switch_core_session_t *);
typedef switch_status_t (*switch_io_read_video_frame_t) (switch_core_session_t *, switch_frame_t **, switch_io_flag_t, int);
typedef switch_status_t (*switch_io_write_video_frame_t) (switch_core_session_t *, switch_frame_t *, switch_io_flag_t, int);
typedef switch_call_cause_t (*switch_io_resurrect_session_t) (switch_core_session_t **, switch_memory_pool_t **, void *);
@ -174,6 +175,8 @@ struct switch_io_routines {
switch_io_read_video_frame_t read_video_frame;
/*! write a video frame to a session */
switch_io_write_video_frame_t write_video_frame;
/*! change a sessions channel run state */
switch_io_state_run_t state_run;
/*! resurrect a session */
switch_io_resurrect_session_t resurrect_session;
void *padding[10];

View File

@ -58,6 +58,8 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_exec(switch_odbc_handle_
char **err);
SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_exec_string(switch_odbc_handle_t *handle, const char *sql, char *resbuf, size_t len, char **err);
SWITCH_DECLARE(switch_bool_t) switch_odbc_available(void);
SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_SQLSetAutoCommitAttr(switch_odbc_handle_t *handle, switch_bool_t on);
SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_SQLEndTran(switch_odbc_handle_t *handle, switch_bool_t commit);
SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_statement_handle_free(switch_odbc_statement_handle_t *stmt);
/*!

View File

@ -840,6 +840,7 @@ typedef enum {
SWITCH_STATUS_IGNORE,
SWITCH_STATUS_TOO_SMALL,
SWITCH_STATUS_FOUND,
SWITCH_STATUS_CONTINUE,
SWITCH_STATUS_NOT_INITALIZED
} switch_status_t;
@ -1063,6 +1064,7 @@ typedef enum {
CF_CONSUME_ON_ORIGINATE,
CF_PASSTHRU_PTIME_MISMATCH,
CF_BRIDGE_NOWRITE,
CF_RECOVERED,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
CF_FLAG_MAX
} switch_channel_flag_t;
@ -1266,7 +1268,8 @@ typedef enum {
SMBF_STEREO = (1 << 5),
SMBF_ANSWER_REQ = (1 << 6),
SMBF_THREAD_LOCK = (1 << 7),
SMBF_PRUNE = (1 << 8)
SMBF_PRUNE = (1 << 8),
SMBF_NO_PAUSE = (1 << 9)
} switch_media_bug_flag_enum_t;
typedef uint32_t switch_media_bug_flag_t;
@ -1304,7 +1307,8 @@ typedef enum {
SWITCH_FILE_CALLBACK = (1 << 12),
SWITCH_FILE_DONE = (1 << 13),
SWITCH_FILE_BUFFER_DONE = (1 << 14),
SWITCH_FILE_WRITE_APPEND = (1 << 15)
SWITCH_FILE_WRITE_APPEND = (1 << 15),
SWITCH_FILE_WRITE_OVER = (1 << 16)
} switch_file_flag_enum_t;
typedef uint32_t switch_file_flag_t;

View File

@ -322,7 +322,7 @@ SWITCH_DECLARE(unsigned char) switch_char_to_rfc2833(char key);
\param key the key to test
\return TRUE or FALSE
*/
#define is_dtmf(key) ((key > 47 && key < 58) || (key > 64 && key < 69) || (key > 96 && key < 101) || key == 35 || key == 42 || key == 87 || key == 119 || key == 70)
#define is_dtmf(key) ((key > 47 && key < 58) || (key > 64 && key < 69) || (key > 96 && key < 101) || key == 35 || key == 42 || key == 87 || key == 119 || key == 70 || key == 102)
#define end_of(_s) *(*_s == '\0' ? _s : _s + strlen(_s) - 1)
#define end_of_p(_s) (*_s == '\0' ? _s : _s + strlen(_s) - 1)
@ -711,7 +711,7 @@ SWITCH_DECLARE(int) switch_inet_pton(int af, const char *src, void *dst);
SWITCH_DECLARE(const char *) switch_dow_int2str(int val);
SWITCH_DECLARE(int) switch_dow_str2int(const char *exp);
SWITCH_DECLARE(int) switch_dow_cmp(const char *exp, int val);
SWITCH_DECLARE(switch_bool_t) switch_dow_cmp(const char *exp, int val);
SWITCH_DECLARE(int) switch_number_cmp(const char *exp, int val);
SWITCH_DECLARE(int) switch_tod_cmp(const char *exp, int val);

View File

@ -37,7 +37,6 @@
#define CC_AGENT_TYPE_UUID_STANDBY "uuid-standby"
#define CC_SQLITE_DB_NAME "callcenter"
#define CC_MAX_TIME_DIFF_CHECK 5
/* TODO
drop caller if no agent login
dont allow new caller
@ -429,6 +428,7 @@ struct cc_queue {
uint32_t max_wait_time;
uint32_t max_wait_time_with_no_agent;
uint32_t max_wait_time_with_no_agent_time_reached;
switch_mutex_t *mutex;
@ -540,6 +540,7 @@ cc_queue_t *queue_set_config(cc_queue_t *queue)
SWITCH_CONFIG_SET_ITEM(queue->config[i++], "max-wait-time", SWITCH_CONFIG_INT, 0, &queue->max_wait_time, 0, &config_int_0_86400, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(queue->config[i++], "max-wait-time-with-no-agent", SWITCH_CONFIG_INT, 0, &queue->max_wait_time_with_no_agent, 0, &config_int_0_86400, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(queue->config[i++], "max-wait-time-with-no-agent-time-reached", SWITCH_CONFIG_INT, 0, &queue->max_wait_time_with_no_agent_time_reached, 5, &config_int_0_86400, NULL, NULL);
switch_assert(i < CC_QUEUE_CONFIGITEM_COUNT);
@ -850,7 +851,7 @@ cc_status_t cc_agent_del(const char *agent)
return result;
}
cc_agent_status_t cc_agent_get(const char *key, const char *agent, char *ret_result, size_t ret_result_size)
cc_status_t cc_agent_get(const char *key, const char *agent, char *ret_result, size_t ret_result_size)
{
cc_status_t result = CC_STATUS_SUCCESS;
char *sql;
@ -890,7 +891,7 @@ cc_agent_status_t cc_agent_get(const char *key, const char *agent, char *ret_res
done:
if (result == CC_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Get Info Agent %s set %s = %s\n", agent, key, res);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Get Info Agent %s %s = %s\n", agent, key, res);
}
return result;
@ -2023,7 +2024,7 @@ void *SWITCH_THREAD_FUNC cc_member_thread_run(switch_thread_t *thread, void *obj
}
/* Will drop the caller if no agent was found for more than X secondes */
if (queue->max_wait_time_with_no_agent > 0 && m->t_member_called < queue->last_agent_exist_check - CC_MAX_TIME_DIFF_CHECK &&
if (queue->max_wait_time_with_no_agent > 0 && m->t_member_called < queue->last_agent_exist_check - queue->max_wait_time_with_no_agent_time_reached &&
queue->last_agent_exist_check - queue->last_agent_exist >= queue->max_wait_time_with_no_agent) {
m->member_cancel_reason = CC_MEMBER_CANCEL_REASON_NO_AGENT_TIMEOUT;
switch_channel_set_flag_value(member_channel, CF_BREAK, 2);
@ -2465,9 +2466,10 @@ SWITCH_STANDARD_API(cc_config_api_function)
} else {
const char *key = argv[0 + initial_argc];
const char *agent = argv[1 + initial_argc];
switch (cc_agent_get(key, agent, NULL, 0)) {
char ret[64];
switch (cc_agent_get(key, agent, ret, sizeof(ret))) {
case CC_STATUS_SUCCESS:
stream->write_function(stream, "%s", "+OK\n");
stream->write_function(stream, "%s", ret);
break;
case CC_STATUS_INVALID_KEY:
stream->write_function(stream, "%s", "-ERR Invalid Agent Update KEY!\n");
@ -2631,7 +2633,21 @@ SWITCH_STANDARD_API(cc_config_api_function)
}
} else if (action && !strcasecmp(action, "list")) {
if (argc-initial_argc < 1) {
stream->write_function(stream, "%s", "-ERR Invalid!\n");
switch_hash_index_t *hi;
stream->write_function(stream, "%s", "name|strategy|moh_sound|time_base_score|tier_rules_apply|tier_rule_wait_second|tier_rule_wait_multiply_level|tier_rule_no_agent_no_wait|discard_abandoned_after|abandoned_resume_allowed|max_wait_time|max_wait_time_with_no_agent|max_wait_time_with_no_agent_time_reached|record_template\n");
switch_mutex_lock(globals.mutex);
for (hi = switch_hash_first(NULL, globals.queue_hash); hi; hi = switch_hash_next(hi)) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
cc_queue_t *queue;
switch_hash_this(hi, &key, &keylen, &val);
queue = (cc_queue_t *) val;
stream->write_function(stream, "%s|%s|%s|%s|%s|%d|%s|%s|%d|%s|%d|%d|%d|%s\n", queue->name, queue->strategy, queue->moh, queue->time_base_score, (queue->tier_rules_apply?"true":"false"), queue->tier_rule_wait_second, (queue->tier_rule_wait_multiply_level?"true":"false"), (queue->tier_rule_no_agent_no_wait?"true":"false"), queue->discard_abandoned_after, (queue->abandoned_resume_allowed?"true":"false"), queue->max_wait_time, queue->max_wait_time_with_no_agent, queue->max_wait_time_with_no_agent_time_reached, queue->record_template);
queue = NULL;
}
switch_mutex_unlock(globals.mutex);
stream->write_function(stream, "%s", "+OK\n");
goto done;
} else {
const char *queue_name = argv[0 + initial_argc];

View File

@ -2019,6 +2019,66 @@ SWITCH_STANDARD_API(transfer_function)
return SWITCH_STATUS_SUCCESS;
}
#define DUAL_TRANSFER_SYNTAX "<uuid> <A-dest-exten>[/<A-dialplan>][/<A-context>] <B-dest-exten>[/<B-dialplan>][/<B-context>]"
SWITCH_STANDARD_API(dual_transfer_function)
{
switch_core_session_t *tsession = NULL, *other_session = NULL;
char *mycmd = NULL, *argv[5] = { 0 };
int argc = 0;
char *tuuid, *dest1, *dest2, *dp1 = NULL, *dp2 = NULL, *context1 = NULL, *context2 = NULL;
if (zstr(cmd) || !(mycmd = strdup(cmd))) {
stream->write_function(stream, "-USAGE: %s\n", DUAL_TRANSFER_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
if (argc != 3) {
stream->write_function(stream, "-USAGE: %s\n", DUAL_TRANSFER_SYNTAX);
goto done;
}
tuuid = argv[0];
dest1 = argv[1];
dest2= argv[2];
if ((dp1 = strchr(dest1, '/'))) {
*dp1++ = '\0';
if ((context1 = strchr(dp1, '/'))) {
*context1++ = '\0';
}
}
if ((dp2 = strchr(dest2, '/'))) {
*dp2++ = '\0';
if ((context2 = strchr(dp2, '/'))) {
*context2++ = '\0';
}
}
if (zstr(tuuid) || !(tsession = switch_core_session_locate(tuuid))) {
stream->write_function(stream, "-ERR No Such Channel!\n");
goto done;
}
if (switch_core_session_get_partner(tsession, &other_session) == SWITCH_STATUS_SUCCESS) {
switch_ivr_session_transfer(other_session, dest2, dp2, context2);
switch_core_session_rwunlock(other_session);
}
switch_ivr_session_transfer(tsession, dest1, dp1, context1);
stream->write_function(stream, "+OK\n");
switch_core_session_rwunlock(tsession);
done:
switch_safe_free(mycmd);
return SWITCH_STATUS_SUCCESS;
}
#define TONE_DETECT_SYNTAX "<uuid> <key> <tone_spec> [<flags> <timeout> <app> <args> <hits>]"
SWITCH_STANDARD_API(tone_detect_session_function)
{
@ -3423,6 +3483,12 @@ SWITCH_STANDARD_API(show_function)
char hostname[256] = "";
gethostname(hostname, sizeof(hostname));
if (!(cflags & SCF_USE_SQL)) {
stream->write_function(stream, "-ERR SQL DISABLED NO DATA AVAILABLE!\n");
return SWITCH_STATUS_SUCCESS;
}
if (switch_core_db_handle(&db) != SWITCH_STATUS_SUCCESS) {
stream->write_function(stream, "%s", "-ERR Databse Error!\n");
return SWITCH_STATUS_SUCCESS;
@ -3455,11 +3521,6 @@ SWITCH_STANDARD_API(show_function)
holder.print_title = 1;
if (!(cflags & SCF_USE_SQL) && command && !strcasecmp(command, "channels")) {
stream->write_function(stream, "-ERR SQL DISABLED NO CHANNEL DATA AVAILABLE!\n");
goto end;
}
/* If you change the field qty or order of any of these select */
/* statements, you must also change show_callback and friends to match! */
if (!command) {
@ -4630,6 +4691,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
SWITCH_ADD_API(commands_api_interface, "uuid_setvar_multi", "uuid_setvar_multi", uuid_setvar_multi_function, SETVAR_MULTI_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_setvar", "uuid_setvar", uuid_setvar_function, SETVAR_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_transfer", "Transfer a session", transfer_function, TRANSFER_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_dual_transfer", "Transfer a session and its partner", dual_transfer_function, DUAL_TRANSFER_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "uuid_simplify", "Try to cut out of a call path / attended xfer", uuid_simplify_function, SIMPLIFY_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "xml_locate", "find some xml", xml_locate_function, "[root | <section> <tag> <tag_attr_name> <tag_attr_val>]");
SWITCH_ADD_API(commands_api_interface, "xml_wrap", "Wrap another api command in xml", xml_wrap_api_function, "<command> <args>");
@ -4749,6 +4811,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
switch_console_set_complete("add uuid_setvar_multi ::console::list_uuid");
switch_console_set_complete("add uuid_setvar ::console::list_uuid");
switch_console_set_complete("add uuid_transfer ::console::list_uuid");
switch_console_set_complete("add uuid_dual_transfer ::console::list_uuid");
switch_console_set_complete("add version");
switch_console_set_complete("add uuid_warning ::console::list_uuid");
switch_console_set_complete("add ...");

View File

@ -40,6 +40,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_conference_load);
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_conference_shutdown);
SWITCH_MODULE_DEFINITION(mod_conference, mod_conference_load, mod_conference_shutdown, NULL);
typedef enum {
CONF_SILENT_REQ = (1 << 0),
CONF_SILENT_DONE = (1 << 1)
} conf_app_flag_t;
static const char global_app_name[] = "conference";
static char *global_cf_name = "conference.conf";
static char *cf_pin_url_param_name = "X-ConfPin=";
@ -92,29 +97,6 @@ static struct {
switch_event_node_t *node;
} globals;
typedef enum {
CALLER_CONTROL_MUTE,
CALLER_CONTROL_MUTE_ON,
CALLER_CONTROL_MUTE_OFF,
CALLER_CONTROL_DEAF_MUTE,
CALLER_CONTROL_ENERGY_UP,
CALLER_CONTROL_ENERGY_EQU_CONF,
CALLER_CONTROL_ENERGY_DN,
CALLER_CONTROL_VOL_TALK_UP,
CALLER_CONTROL_VOL_TALK_ZERO,
CALLER_CONTROL_VOL_TALK_DN,
CALLER_CONTROL_VOL_LISTEN_UP,
CALLER_CONTROL_VOL_LISTEN_ZERO,
CALLER_CONTROL_VOL_LISTEN_DN,
CALLER_CONTROL_HANGUP,
CALLER_CONTROL_MENU,
CALLER_CONTROL_DIAL,
CALLER_CONTROL_EVENT,
CALLER_CONTROL_LOCK,
CALLER_CONTROL_TRANSFER,
CALLER_CONTROL_EXEC_APP
} caller_control_t;
/* forward declaration for conference_obj and caller_control */
struct conference_member;
typedef struct conference_member conference_member_t;
@ -128,17 +110,10 @@ typedef struct call_list call_list_t;
struct caller_control_actions;
typedef struct caller_control_fn_table {
char *key;
char *digits;
caller_control_t action;
void (*handler) (conference_member_t *, struct caller_control_actions *);
} caller_control_fn_table_t;
typedef struct caller_control_actions {
caller_control_fn_table_t *fndesc;
char *binded_dtmf;
void *data;
char *data;
char *expanded_data;
} caller_control_action_t;
typedef struct caller_control_menu_info {
@ -266,12 +241,12 @@ typedef struct conference_obj {
uint32_t max_members;
char *maxmember_sound;
uint32_t announce_count;
switch_ivr_digit_stream_parser_t *dtmf_parser;
char *pin;
char *pin_sound;
char *bad_pin_sound;
char *profile_name;
char *domain;
char *caller_controls;
uint32_t flags;
member_flag_t mflags;
switch_call_cause_t bridge_hangup_cause;
@ -357,8 +332,6 @@ struct conference_member {
uint32_t resample_out_len;
conference_file_node_t *fnode;
conference_relationship_t *relationships;
switch_ivr_digit_stream_parser_t *dtmf_parser;
switch_ivr_digit_stream_t *digit_stream;
switch_speech_handle_t lsh;
switch_speech_handle_t *sh;
uint32_t verbose_events;
@ -366,6 +339,7 @@ struct conference_member {
uint32_t avg_itt;
uint32_t avg_tally;
struct conference_member *next;
switch_ivr_dmachine_t *dmachine;
};
/* Record Node */
@ -409,6 +383,7 @@ static void conference_send_all_dtmf(conference_member_t *member, conference_obj
static switch_status_t conference_say(conference_obj_t *conference, const char *text, uint32_t leadin);
static void conference_list(conference_obj_t *conference, switch_stream_handle_t *stream, char *delim);
static conference_obj_t *conference_find(char *name);
static void member_bind_controls(conference_member_t *member, const char *controls);
SWITCH_STANDARD_API(conf_api_main);
@ -651,6 +626,7 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
char msg[512]; /* conference count announcement */
call_list_t *call_list = NULL;
switch_channel_t *channel;
const char *controls = NULL;
switch_assert(conference != NULL);
switch_assert(member != NULL);
@ -698,20 +674,21 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
switch_clear_flag(conference, CFLAG_WAIT_MOD);
}
channel = switch_core_session_get_channel(member->session);
switch_channel_set_variable_printf(channel, "conference_member_id", "%d", member->id);
if (conference->count > 1) {
if (conference->moh_sound && !switch_test_flag(conference, CFLAG_WAIT_MOD)) {
/* stop MoH if any */
conference_stop_file(conference, FILE_STOP_ASYNC);
}
if (conference->enter_sound) {
if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ) && !zstr(conference->enter_sound)) {
conference_play_file(conference, conference->enter_sound, CONF_DEFAULT_LEADIN, switch_core_session_get_channel(member->session),
switch_test_flag(conference, CFLAG_WAIT_MOD) ? 0 : 1);
}
}
channel = switch_core_session_get_channel(member->session);
switch_channel_set_variable_printf(channel, "conference_member_id", "%d", member->id);
call_list = (call_list_t *) switch_channel_get_private(channel, "_conference_autocall_list_");
@ -720,7 +697,8 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
switch_snprintf(saymsg, sizeof(saymsg), "Auto Calling %d parties", call_list->iteration);
conference_member_say(member, saymsg, 0);
} else {
if (zstr(conference->special_announce)) {
if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ)) {
/* announce the total number of members in the conference */
if (conference->count >= conference->announce_count && conference->announce_count > 1) {
switch_snprintf(msg, sizeof(msg), "There are %d callers", conference->count);
@ -750,13 +728,32 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
switch_set_flag(conference, CFLAG_ENFORCE_MIN);
}
if (test_eflag(conference, EFLAG_ADD_MEMBER) &&
if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "add-member");
switch_event_fire(&event);
}
switch_channel_clear_app_flag_key("conf_silent", channel, CONF_SILENT_REQ);
switch_ivr_dmachine_create(&member->dmachine, "mod_conference", NULL, 500, 0, NULL, NULL, NULL);
controls = switch_channel_get_variable(channel, "conference_controls");
if (zstr(controls)) {
controls = conference->caller_controls;
}
if (zstr(controls)) {
controls = "default";
}
if (strcasecmp(controls, "none")) {
member_bind_controls(member, controls);
}
}
unlock_member(member);
switch_mutex_unlock(member->audio_out_mutex);
@ -787,6 +784,8 @@ static switch_status_t conference_del_member(conference_obj_t *conference, confe
member->sh = NULL;
unlock_member(member);
switch_ivr_dmachine_destroy(&member->dmachine);
switch_mutex_lock(conference->mutex);
switch_mutex_lock(conference->member_mutex);
switch_mutex_lock(member->audio_in_mutex);
@ -1454,8 +1453,6 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
switch_thread_rwlock_unlock(conference->rwlock);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Lock OFF\n");
switch_ivr_digit_stream_parser_destroy(conference->dtmf_parser);
if (conference->sh) {
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_NONE;
switch_core_speech_close(&conference->lsh, &flags);
@ -1685,6 +1682,7 @@ static void conference_loop_fn_volume_talk_zero(conference_member_t *member, cal
switch_snprintf(msg, sizeof(msg), "Volume level %d", member->volume_out_level);
conference_member_say(member, msg, 0);
}
static void conference_loop_fn_volume_talk_dn(conference_member_t *member, caller_control_action_t *action)
@ -1793,7 +1791,7 @@ static void conference_loop_fn_event(conference_member_t *member, caller_control
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "dtmf");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "DTMF-Key", action->binded_dtmf);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Data", action->data);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Data", action->expanded_data);
switch_event_fire(&event);
}
}
@ -1812,12 +1810,12 @@ static void conference_loop_fn_transfer(conference_member_t *member, caller_cont
if (test_eflag(member->conference, EFLAG_DTMF) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "transfer");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Dialplan", action->data);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Dialplan", action->expanded_data);
switch_event_fire(&event);
}
switch_clear_flag_locked(member, MFLAG_RUNNING);
if ((mydata = switch_core_session_strdup(member->session, action->data))) {
if ((mydata = switch_core_session_strdup(member->session, action->expanded_data))) {
if ((argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0]))))) {
if (argc > 0) {
exten = argv[0];
@ -1830,7 +1828,7 @@ static void conference_loop_fn_transfer(conference_member_t *member, caller_cont
}
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Empty transfer string [%s]\n", (char *) action->data);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Empty transfer string [%s]\n", (char *) action->expanded_data);
goto done;
}
} else {
@ -1856,14 +1854,16 @@ static void conference_loop_fn_exec_app(conference_member_t *member, caller_cont
switch_event_t *event = NULL;
switch_channel_t *channel = NULL;
if (!action->expanded_data) return;
if (test_eflag(member->conference, EFLAG_DTMF) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "execute_app");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", action->data);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", action->expanded_data);
switch_event_fire(&event);
}
if ((mydata = switch_core_session_strdup(member->session, action->data))) {
if ((mydata = switch_core_session_strdup(member->session, action->expanded_data))) {
if ((argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0]))))) {
if (argc > 0) {
app = argv[0];
@ -1873,7 +1873,8 @@ static void conference_loop_fn_exec_app(conference_member_t *member, caller_cont
}
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Empty execute app string [%s]\n", (char *) action->data);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Empty execute app string [%s]\n",
(char *) action->expanded_data);
goto done;
}
} else {
@ -1885,6 +1886,7 @@ static void conference_loop_fn_exec_app(conference_member_t *member, caller_cont
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR, "Unable to find application.\n");
goto done;
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Execute app: %s, %s\n", app, arg);
channel = switch_core_session_get_channel(member->session);
@ -1895,6 +1897,7 @@ static void conference_loop_fn_exec_app(conference_member_t *member, caller_cont
switch_core_session_set_read_codec(member->session, &member->read_codec);
switch_channel_clear_app_flag(channel, CF_APP_TAGGED);
done:
return;
}
@ -2299,29 +2302,6 @@ static void launch_conference_loop_input(conference_member_t *member, switch_mem
switch_thread_create(&thread, thd_attr, conference_loop_input, member, pool);
}
static caller_control_fn_table_t ccfntbl[] = {
{"mute", "0", CALLER_CONTROL_MUTE, conference_loop_fn_mute_toggle},
{"mute on", NULL, CALLER_CONTROL_MUTE_ON, conference_loop_fn_mute_on},
{"mute off", NULL, CALLER_CONTROL_MUTE_OFF, conference_loop_fn_mute_off},
{"deaf mute", "*", CALLER_CONTROL_DEAF_MUTE, conference_loop_fn_deafmute_toggle},
{"energy up", "9", CALLER_CONTROL_ENERGY_UP, conference_loop_fn_energy_up},
{"energy equ", "8", CALLER_CONTROL_ENERGY_EQU_CONF, conference_loop_fn_energy_equ_conf},
{"energy dn", "7", CALLER_CONTROL_ENERGY_DN, conference_loop_fn_energy_dn},
{"vol talk up", "3", CALLER_CONTROL_VOL_TALK_UP, conference_loop_fn_volume_talk_up},
{"vol talk zero", "2", CALLER_CONTROL_VOL_TALK_ZERO, conference_loop_fn_volume_talk_zero},
{"vol talk dn", "1", CALLER_CONTROL_VOL_TALK_DN, conference_loop_fn_volume_talk_dn},
{"vol listen up", "6", CALLER_CONTROL_VOL_LISTEN_UP, conference_loop_fn_volume_listen_up},
{"vol listen zero", "5", CALLER_CONTROL_VOL_LISTEN_ZERO, conference_loop_fn_volume_listen_zero},
{"vol listen dn", "4", CALLER_CONTROL_VOL_LISTEN_DN, conference_loop_fn_volume_listen_dn},
{"hangup", "#", CALLER_CONTROL_HANGUP, conference_loop_fn_hangup},
{"event", NULL, CALLER_CONTROL_EVENT, conference_loop_fn_event},
{"lock", NULL, CALLER_CONTROL_LOCK, conference_loop_fn_lock_toggle},
{"transfer", NULL, CALLER_CONTROL_TRANSFER, conference_loop_fn_transfer},
{"execute_application", NULL, CALLER_CONTROL_EXEC_APP, conference_loop_fn_exec_app}
};
#define CCFNTBL_QTY (sizeof(ccfntbl)/sizeof(ccfntbl[0]))
/* marshall frames from the conference (or file or tts output) to the call leg */
/* NB. this starts the input thread after some initial setup for the call leg */
static void conference_loop_output(conference_member_t *member)
@ -2392,13 +2372,6 @@ static void conference_loop_output(conference_member_t *member)
/* Start the input thread */
launch_conference_loop_input(member, switch_core_session_get_pool(member->session));
/* build a digit stream object */
if (member->conference->dtmf_parser != NULL
&& switch_ivr_digit_stream_new(member->conference->dtmf_parser, &member->digit_stream) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_ERROR,
"Danger Will Robinson, there is no digit parser stream object\n");
}
if ((call_list = switch_channel_get_private(channel, "_conference_autocall_list_"))) {
const char *cid_name = switch_channel_get_variable(channel, "conference_auto_outcall_caller_id_name");
const char *cid_num = switch_channel_get_variable(channel, "conference_auto_outcall_caller_id_number");
@ -2408,7 +2381,7 @@ static void conference_loop_output(conference_member_t *member)
const char *prefix = switch_channel_get_variable(channel, "conference_auto_outcall_prefix");
int to = 60;
if (ann) {
if (ann && !switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ)) {
member->conference->special_announce = switch_core_strdup(member->conference->pool, ann);
}
@ -2449,9 +2422,7 @@ static void conference_loop_output(conference_member_t *member)
while (switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(member, MFLAG_ITHREAD)
&& switch_channel_ready(channel)) {
char dtmf[128] = "";
char *digit;
switch_event_t *event;
caller_control_action_t *caller_action = NULL;
int use_timer = 0;
switch_buffer_t *use_buffer = NULL;
uint32_t mux_used = 0;
@ -2505,40 +2476,13 @@ static void conference_loop_output(conference_member_t *member)
if (switch_test_flag(member, MFLAG_DIST_DTMF)) {
conference_send_all_dtmf(member, member->conference, dtmf);
} else {
if (member->conference->dtmf_parser != NULL) {
for (digit = dtmf; *digit && caller_action == NULL; digit++) {
caller_action = (caller_control_action_t *)
switch_ivr_digit_stream_parser_feed(member->conference->dtmf_parser, member->digit_stream, *digit);
}
}
} else if (member->dmachine) {
switch_ivr_dmachine_feed(member->dmachine, dtmf, NULL);
}
/* otherwise, clock the parser so that it can handle digit timeout detection */
} else if (member->conference->dtmf_parser != NULL) {
caller_action = (caller_control_action_t *) switch_ivr_digit_stream_parser_feed(member->conference->dtmf_parser, member->digit_stream, '\0');
} else if (member->dmachine) {
switch_ivr_dmachine_ping(member->dmachine, NULL);
}
/* if a caller action has been detected, handle it */
if (caller_action != NULL && caller_action->fndesc != NULL && caller_action->fndesc->handler != NULL) {
char *param = NULL;
if (caller_action->fndesc->action != CALLER_CONTROL_MENU) {
param = caller_action->data;
}
#ifdef INTENSE_DEBUG
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session),
SWITCH_LOG_INFO,
"executing caller control '%s' param '%s' on call '%u, %s\n",
caller_action->fndesc->key, param ? param : "none", member->id, switch_channel_get_name(channel));
#endif
caller_action->fndesc->handler(member, caller_action);
/* set up for next pass */
caller_action = NULL;
}
use_buffer = NULL;
mux_used = (uint32_t) switch_buffer_inuse(member->mux_buffer);
@ -2582,6 +2526,7 @@ static void conference_loop_output(conference_member_t *member)
}
if (switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
switch_mutex_unlock(member->audio_out_mutex);
break;
}
}
@ -2647,10 +2592,6 @@ static void conference_loop_output(conference_member_t *member)
} /* Rinse ... Repeat */
if (member->digit_stream != NULL) {
switch_ivr_digit_stream_destroy(&member->digit_stream);
}
switch_clear_flag_locked(member, MFLAG_RUNNING);
switch_core_timer_destroy(&timer);
@ -2933,6 +2874,10 @@ static switch_status_t conference_play_file(conference_obj_t *conference, char *
switch_assert(conference != NULL);
if (zstr(file)) {
return SWITCH_STATUS_NOTFOUND;
}
switch_mutex_lock(conference->mutex);
switch_mutex_lock(conference->member_mutex);
count = conference->count;
@ -4366,8 +4311,9 @@ static switch_status_t conf_api_sub_transfer(conference_obj_t *conference, switc
if ((profiles = switch_xml_child(cfg, "profiles"))) {
xml_cfg.profile = switch_xml_find_child(profiles, "profile", "name", profile_name);
}
xml_cfg.controls = switch_xml_child(cfg, "caller-controls");
/* Create the conference object. */
new_conference = conference_new(conf_name, xml_cfg, pool);
/* Release the config registry handle */
if (cxml) {
@ -4375,9 +4321,6 @@ static switch_status_t conf_api_sub_transfer(conference_obj_t *conference, switc
cxml = NULL;
}
/* Create the conference object. */
new_conference = conference_new(conf_name, xml_cfg, pool);
if (!new_conference) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
if (pool != NULL) {
@ -5328,7 +5271,6 @@ static int setup_media(conference_member_t *member, conference_obj_t *conference
}
/* Application interface function that is called from the dialplan to join the channel to a conference */
SWITCH_STANDARD_APP(conference_function)
{
@ -5353,7 +5295,10 @@ SWITCH_STANDARD_APP(conference_function)
switch_event_t *params = NULL;
int locked = 0;
if (!switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_DONE) &&
(switch_channel_test_flag(channel, CF_RECOVERED) || switch_true(switch_channel_get_variable(channel, "conference_silent_entry")))) {
switch_channel_set_app_flag_key("conf_silent", channel, CONF_SILENT_REQ);
}
if (switch_channel_answer(channel) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Channel answer failed.\n");
@ -5444,8 +5389,6 @@ SWITCH_STANDARD_APP(conference_function)
xml_cfg.profile = switch_xml_find_child(profiles, "profile", "name", profile_name);
}
xml_cfg.controls = switch_xml_child(cfg, "caller-controls");
/* if this is a bridging call, and it's not a duplicate, build a */
/* conference object, and skip pin handling, and locked checking */
@ -5656,7 +5599,7 @@ SWITCH_STANDARD_APP(conference_function)
}
}
if (conference->special_announce) {
if (conference->special_announce && !switch_channel_test_app_flag_key("conf_silent", channel, CONF_SILENT_REQ)) {
conference_local_play_file(conference, session, conference->special_announce, CONF_DEFAULT_LEADIN, NULL, 0);
}
@ -5777,9 +5720,6 @@ SWITCH_STANDARD_APP(conference_function)
switch_buffer_destroy(&member.resample_buffer);
switch_buffer_destroy(&member.audio_buffer);
switch_buffer_destroy(&member.mux_buffer);
if (conference && member.dtmf_parser != conference->dtmf_parser) {
switch_ivr_digit_stream_parser_destroy(member.dtmf_parser);
}
if (conference) {
switch_mutex_lock(conference->mutex);
@ -5928,88 +5868,6 @@ static switch_status_t chat_send(const char *proto, const char *from, const char
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t conf_default_controls(conference_obj_t *conference)
{
switch_status_t status = SWITCH_STATUS_FALSE;
uint32_t i;
caller_control_action_t *action;
switch_assert(conference != NULL);
for (i = 0, status = SWITCH_STATUS_SUCCESS; status == SWITCH_STATUS_SUCCESS && i < CCFNTBL_QTY; i++) {
if (!zstr(ccfntbl[i].digits)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"Installing default caller control action '%s' bound to '%s'.\n", ccfntbl[i].key, ccfntbl[i].digits);
action = (caller_control_action_t *) switch_core_alloc(conference->pool, sizeof(caller_control_action_t));
if (action != NULL) {
action->fndesc = &ccfntbl[i];
action->data = NULL;
status = switch_ivr_digit_stream_parser_set_event(conference->dtmf_parser, ccfntbl[i].digits, action);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"unable to alloc memory for caller control binding '%s' to '%s'\n", ccfntbl[i].key, ccfntbl[i].digits);
status = SWITCH_STATUS_MEMERR;
}
}
}
return status;
}
static switch_status_t conference_new_install_caller_controls_custom(conference_obj_t *conference, switch_xml_t xml_controls, switch_xml_t xml_menus)
{
switch_status_t status = SWITCH_STATUS_FALSE;
switch_xml_t xml_kvp;
switch_assert(conference != NULL);
if (!xml_controls) {
return status;
}
/* parse the controls tree for caller control digit strings */
for (xml_kvp = switch_xml_child(xml_controls, "control"); xml_kvp; xml_kvp = xml_kvp->next) {
char *key = (char *) switch_xml_attr(xml_kvp, "action");
char *val = (char *) switch_xml_attr(xml_kvp, "digits");
char *data = (char *) switch_xml_attr_soft(xml_kvp, "data");
if (!zstr(key) && !zstr(val)) {
uint32_t i;
/* scan through all of the valid actions, and if found, */
/* set the new caller control action digit string, then */
/* stop scanning the table, and go to the next xml kvp. */
for (i = 0, status = SWITCH_STATUS_NOOP; i < CCFNTBL_QTY && status == SWITCH_STATUS_NOOP; i++) {
if (strcasecmp(ccfntbl[i].key, key) == 0) {
caller_control_action_t *action;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Installing caller control action '%s' bound to '%s'.\n", key, val);
action = (caller_control_action_t *) switch_core_alloc(conference->pool, sizeof(caller_control_action_t));
if (action != NULL) {
action->fndesc = &ccfntbl[i];
action->data = (void *) switch_core_strdup(conference->pool, data);
action->binded_dtmf = switch_core_strdup(conference->pool, val);
status = switch_ivr_digit_stream_parser_set_event(conference->dtmf_parser, val, action);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"unable to alloc memory for caller control binding '%s' to '%s'\n", ccfntbl[i].key, ccfntbl[i].digits);
status = SWITCH_STATUS_MEMERR;
}
}
}
if (status == SWITCH_STATUS_NOOP) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid caller control action name '%s'.\n", key);
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid caller control config entry pair action = '%s' digits = '%s'\n", key, val);
}
}
return status;
}
static conference_obj_t *conference_find(char *name)
{
conference_obj_t *conference;
@ -6252,7 +6110,8 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_m
conference->comfort_noise_level = comfort_noise_level;
conference->caller_id_name = switch_core_strdup(conference->pool, caller_id_name);
conference->caller_id_number = switch_core_strdup(conference->pool, caller_id_number);
conference->caller_controls = switch_core_strdup(conference->pool, caller_controls);
if (!zstr(perpetual_sound)) {
conference->perpetual_sound = switch_core_strdup(conference->pool, perpetual_sound);
@ -6376,7 +6235,6 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_m
}
conference->rate = rate;
conference->interval = interval;
conference->dtmf_parser = NULL;
conference->eflags = 0xFFFFFFFF;
if (!zstr(suppress_events)) {
@ -6394,27 +6252,6 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_m
conference->verbose_events = 1;
}
/* caller control configuration chores */
if (switch_ivr_digit_stream_parser_new(conference->pool, &conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
/* if no controls, or default controls specified, install default */
if (caller_controls == NULL || *caller_controls == '\0' || strcasecmp(caller_controls, "default") == 0) {
status = conf_default_controls(conference);
} else if (strcasecmp(caller_controls, "none") != 0) {
/* try to build caller control if the group has been specified and != "none" */
switch_xml_t xml_controls = switch_xml_find_child(cfg.controls, "group", "name", caller_controls);
status = conference_new_install_caller_controls_custom(conference, xml_controls, NULL);
if (status != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to install caller controls group '%s'\n", caller_controls);
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "No caller controls installed.\n");
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to allocate caller control digit parser.\n");
}
/* Activate the conference mutex for exclusivity */
switch_mutex_init(&conference->mutex, SWITCH_MUTEX_NESTED, conference->pool);
switch_mutex_init(&conference->flag_mutex, SWITCH_MUTEX_NESTED, conference->pool);
@ -6529,6 +6366,145 @@ static void send_presence(switch_event_types_t id)
}
}
typedef void (*conf_key_callback_t) (conference_member_t *, struct caller_control_actions *);
typedef struct {
conference_member_t *member;
caller_control_action_t action;
conf_key_callback_t handler;
} key_binding_t;
static switch_status_t dmachine_dispatcher(switch_ivr_dmachine_match_t *match)
{
key_binding_t *binding = match->user_data;
switch_channel_t *channel;
if (!binding) return SWITCH_STATUS_FALSE;
channel = switch_core_session_get_channel(binding->member->session);
switch_channel_set_variable(channel, "conference_last_matching_digits", match->match_digits);
if (binding->action.data) {
binding->action.expanded_data = switch_channel_expand_variables(channel, binding->action.data);
}
binding->handler(binding->member, &binding->action);
if (binding->action.expanded_data != binding->action.data) {
free(binding->action.expanded_data);
binding->action.expanded_data = NULL;
}
switch_set_flag_locked(binding->member, MFLAG_FLUSH_BUFFER);
return SWITCH_STATUS_SUCCESS;
}
static void do_binding(conference_member_t *member, conf_key_callback_t handler, const char *digits, const char *data)
{
key_binding_t *binding;
binding = switch_core_alloc(member->pool, sizeof(*binding));
binding->member = member;
binding->action.binded_dtmf = switch_core_strdup(member->pool, digits);
if (data) {
binding->action.data = switch_core_strdup(member->pool, data);
}
binding->handler = handler;
switch_ivr_dmachine_bind(member->dmachine, "conf", digits, 0, dmachine_dispatcher, binding);
}
struct _mapping {
const char *name;
conf_key_callback_t handler;
};
static struct _mapping control_mappings[] = {
{"mute", conference_loop_fn_mute_toggle},
{"mute on", conference_loop_fn_mute_on},
{"mute off", conference_loop_fn_mute_off},
{"deaf mute", conference_loop_fn_deafmute_toggle},
{"energy up", conference_loop_fn_energy_up},
{"energy equ", conference_loop_fn_energy_equ_conf},
{"energy dn", conference_loop_fn_energy_dn},
{"vol talk up", conference_loop_fn_volume_talk_up},
{"vol talk zero", conference_loop_fn_volume_talk_zero},
{"vol talk dn", conference_loop_fn_volume_talk_dn},
{"vol listen up", conference_loop_fn_volume_listen_up},
{"vol listen zero", conference_loop_fn_volume_listen_zero},
{"vol listen dn", conference_loop_fn_volume_listen_dn},
{"hangup", conference_loop_fn_hangup},
{"event", conference_loop_fn_event},
{"lock", conference_loop_fn_lock_toggle},
{"transfer", conference_loop_fn_transfer},
{"execute_application", conference_loop_fn_exec_app}
};
#define MAPPING_LEN (sizeof(control_mappings)/sizeof(control_mappings[0]))
static void member_bind_controls(conference_member_t *member, const char *controls)
{
switch_xml_t cxml, cfg, xgroups, xcontrol;
switch_event_t *params;
int i;
switch_event_create(&params, SWITCH_EVENT_REQUEST_PARAMS);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "Conf-Name", member->conference->name);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "Action", "request-controls");
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "Controls", controls);
if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, params))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf_name);
goto end;
}
if (!(xgroups = switch_xml_child(cfg, "caller-controls"))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find caller-controls in %s\n", global_cf_name);
goto end;
}
if (!(xgroups = switch_xml_find_child(xgroups, "group", "name", controls))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find caller-controls in %s\n", global_cf_name);
goto end;
}
for (xcontrol = switch_xml_child(xgroups, "control"); xcontrol; xcontrol = xcontrol->next) {
const char *key = switch_xml_attr(xcontrol, "action");
const char *digits = switch_xml_attr(xcontrol, "digits");
const char *data = switch_xml_attr_soft(xcontrol, "data");
if (zstr(key) || zstr(digits)) continue;
for(i = 0; i < MAPPING_LEN; i++) {
if (!strcasecmp(key, control_mappings[i].name)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s binding '%s' to '%s'\n",
switch_core_session_get_name(member->session), digits, key);
do_binding(member, control_mappings[i].handler, digits, data);
}
}
}
end:
/* Release the config registry handle */
if (cxml) {
switch_xml_free(cxml);
cxml = NULL;
}
if (params) switch_event_destroy(&params);
}
/* Called by FreeSWITCH when the module loads */
SWITCH_MODULE_LOAD_FUNCTION(mod_conference_load)
{

View File

@ -111,6 +111,8 @@ static switch_status_t digit_nomatch_action_callback(switch_ivr_dmachine_match_t
switch_event_t *event;
switch_status_t status;
switch_channel_set_variable(channel, "last_non_matching_digits", match->match_digits);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s Digit NOT match binding [%s]\n",
switch_channel_get_name(channel), match->match_digits);
@ -141,6 +143,8 @@ static switch_status_t digit_action_callback(switch_ivr_dmachine_match_t *match)
char *string = act->string;
switch_channel_t *channel = switch_core_session_get_channel(act->session);
switch_channel_set_variable(channel, "last_matching_digits", match->match_digits);
if (switch_event_create_plain(&event, SWITCH_EVENT_CHANNEL_DATA) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(act->session), SWITCH_LOG_DEBUG, "%s Digit match binding [%s][%s]\n",
switch_channel_get_name(channel), act->string, act->value);

View File

@ -29,6 +29,7 @@
*
*/
#include <switch.h>
#define FIFO_APP_KEY "mod_fifo"
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_fifo_shutdown);
SWITCH_MODULE_LOAD_FUNCTION(mod_fifo_load);
@ -60,7 +61,8 @@ typedef struct {
typedef enum {
FIFO_APP_BRIDGE_TAG = (1 << 0),
FIFO_APP_TRACKING = (1 << 1)
FIFO_APP_TRACKING = (1 << 1),
FIFO_APP_DID_HOOK = (1 << 2)
} fifo_app_flag_t;
@ -306,6 +308,8 @@ struct fifo_node {
int outbound_per_cycle;
char *outbound_name;
outbound_strategy_t outbound_strategy;
int ring_timeout;
int default_lag;
};
typedef struct fifo_node fifo_node_t;
@ -864,7 +868,7 @@ static void do_unbridge(switch_core_session_t *consumer_session, switch_core_ses
caller_channel = switch_core_session_get_channel(caller_session);
}
if (switch_channel_test_app_flag(consumer_channel, FIFO_APP_BRIDGE_TAG)) {
if (switch_channel_test_app_flag_key(FIFO_APP_KEY, consumer_channel, FIFO_APP_BRIDGE_TAG)) {
char date[80] = "";
switch_time_exp_t tm;
switch_time_t ts = switch_micro_time_now();
@ -874,7 +878,7 @@ static void do_unbridge(switch_core_session_t *consumer_session, switch_core_ses
char *sql;
switch_event_t *event;
switch_channel_clear_app_flag_key(__FILE__, consumer_channel, FIFO_APP_BRIDGE_TAG);
switch_channel_clear_app_flag_key(FIFO_APP_KEY, consumer_channel, FIFO_APP_BRIDGE_TAG);
switch_channel_set_variable(consumer_channel, "fifo_bridged", NULL);
ts = switch_micro_time_now();
@ -984,11 +988,11 @@ static switch_status_t messagehook (switch_core_session_t *session, switch_core_
switch_size_t retsize;
const char *ced_name, *ced_number, *cid_name, *cid_number;
if (switch_channel_test_app_flag(consumer_channel, FIFO_APP_BRIDGE_TAG)) {
if (switch_channel_test_app_flag_key(FIFO_APP_KEY, consumer_channel, FIFO_APP_BRIDGE_TAG)) {
goto end;
}
switch_channel_set_app_flag_key(__FILE__, consumer_channel, FIFO_APP_BRIDGE_TAG);
switch_channel_set_app_flag_key(FIFO_APP_KEY, consumer_channel, FIFO_APP_BRIDGE_TAG);
switch_channel_set_variable(consumer_channel, "fifo_bridged", "true");
switch_channel_set_variable(consumer_channel, "fifo_manual_bridge", "true");
@ -996,8 +1000,10 @@ static switch_status_t messagehook (switch_core_session_t *session, switch_core_
if (caller_channel) {
switch_channel_set_variable(caller_channel, "fifo_role", "caller");
switch_process_import(consumer_session, caller_channel, "fifo_caller_consumer_import");
switch_process_import(caller_session, consumer_channel, "fifo_consumer_caller_import");
switch_process_import(consumer_session, caller_channel, "fifo_caller_consumer_import",
switch_channel_get_variable(consumer_channel, "fifo_import_prefix"));
switch_process_import(caller_session, consumer_channel, "fifo_consumer_caller_import",
switch_channel_get_variable(caller_channel, "fifo_import_prefix"));
}
@ -1209,10 +1215,11 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
switch_event_create_brackets(h->originate_string, '{', '}', ',', &ovars, &parsed);
switch_event_del_header(ovars, "fifo_outbound_uuid");
if (!h->timeout) h->timeout = 60;
if (!h->timeout) h->timeout = node->ring_timeout;
if (timeout < h->timeout) timeout = h->timeout;
stream.write_function(&stream, "[leg_timeout=%d,fifo_outbound_uuid=%s]%s,", h->timeout, h->uuid, parsed ? parsed : h->originate_string);
stream.write_function(&stream, "[leg_timeout=%d,fifo_outbound_uuid=%s,fifo_name=%s]%s,",
h->timeout, h->uuid, node->name, parsed ? parsed : h->originate_string);
stream2.write_function(&stream2, "%s,", h->uuid);
switch_safe_free(parsed);
@ -1505,17 +1512,17 @@ static void *SWITCH_THREAD_FUNC o_thread_run(switch_thread_t *thread, void *obj)
switch_event_add_header(ovars, SWITCH_STACK_BOTTOM, "originate_timeout", "%d", h->timeout);
if (switch_stristr("origination_caller", h->originate_string)) {
originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_hangup_check='%q'}%s",
node->name, h->originate_string);
originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_name='%q',fifo_hangup_check='%q'}%s",
node->name, node->name, h->originate_string);
} else {
if (!zstr(node->outbound_name)) {
originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_hangup_check='%q',"
originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_name='%q',fifo_hangup_check='%q',"
"origination_caller_id_name=Queue,origination_caller_id_number='Queue: %q'}%s",
node->name, node->outbound_name, h->originate_string);
node->name, node->name, node->outbound_name, h->originate_string);
} else {
originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_hangup_check='%q',"
originate_string = switch_mprintf("{execute_on_answer='unset fifo_hangup_check',fifo_name='%q',fifo_hangup_check='%q',"
"origination_caller_id_name=Queue,origination_caller_id_number='Queue: %q'}%s",
node->name, node->name, h->originate_string);
node->name, node->name, node->name, h->originate_string);
}
}
@ -2017,9 +2024,10 @@ static switch_status_t hanguphook(switch_core_session_t *session)
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_channel_state_t state = switch_channel_get_state(channel);
if (state == CS_HANGUP) {
if (state >= CS_HANGUP && !switch_channel_test_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_DID_HOOK)) {
dec_use_count(session, SWITCH_TRUE);
switch_core_event_hook_remove_state_change(session, hanguphook);
switch_channel_set_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_DID_HOOK);
}
return SWITCH_STATUS_SUCCESS;
@ -2037,17 +2045,19 @@ SWITCH_STANDARD_APP(fifo_track_call_function)
return;
}
if (switch_channel_test_app_flag(channel, FIFO_APP_TRACKING)) {
if (switch_channel_test_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_TRACKING)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s trying to double-track call!\n", switch_channel_get_name(channel));
return;
}
switch_core_event_hook_add_receive_message(session, messagehook);
switch_core_event_hook_add_state_run(session, hanguphook);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s tracking call on uuid %s!\n", switch_channel_get_name(channel), data);
add_bridge_call(data);
switch_channel_set_app_flag_key(__FILE__, channel, FIFO_APP_TRACKING);
switch_channel_set_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_TRACKING);
switch_channel_set_variable(channel, "fifo_outbound_uuid", data);
switch_channel_set_variable(channel, "fifo_track_call", "true");
@ -2083,9 +2093,6 @@ SWITCH_STANDARD_APP(fifo_track_call_function)
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-CID-Number", cid_number);
switch_event_fire(&event);
}
switch_core_event_hook_add_receive_message(session, messagehook);
switch_core_event_hook_add_state_change(session, hanguphook);
}
@ -2346,7 +2353,7 @@ SWITCH_STANDARD_APP(fifo_function)
switch_channel_set_variable(channel, "fifo_timestamp", date);
switch_channel_set_variable(channel, "fifo_serviced_uuid", NULL);
switch_channel_set_app_flag_key(__FILE__, channel, FIFO_APP_BRIDGE_TAG);
switch_channel_set_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_BRIDGE_TAG);
if (chime_list) {
char *list_dup = switch_core_session_strdup(session, chime_list);
@ -2421,7 +2428,7 @@ SWITCH_STANDARD_APP(fifo_function)
abort:
switch_channel_clear_app_flag_key(__FILE__, channel, FIFO_APP_BRIDGE_TAG);
switch_channel_clear_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_BRIDGE_TAG);
fifo_caller_del(switch_core_session_get_uuid(session));
@ -2491,6 +2498,7 @@ SWITCH_STANDARD_APP(fifo_function)
if (switch_core_event_hook_remove_receive_message(session, messagehook) == SWITCH_STATUS_SUCCESS) {
dec_use_count(session, SWITCH_FALSE);
switch_core_event_hook_remove_state_change(session, hanguphook);
switch_channel_clear_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_TRACKING);
}
if (!zstr(strat_str)) {
@ -2778,7 +2786,7 @@ SWITCH_STANDARD_APP(fifo_function)
switch_channel_set_flag(other_channel, CF_BREAK);
while (switch_channel_ready(channel) && switch_channel_ready(other_channel) &&
switch_channel_test_app_flag(other_channel, FIFO_APP_BRIDGE_TAG)) {
switch_channel_test_app_flag_key(FIFO_APP_KEY, other_channel, FIFO_APP_BRIDGE_TAG)) {
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
@ -2842,8 +2850,8 @@ SWITCH_STANDARD_APP(fifo_function)
switch_core_media_bug_resume(session);
switch_core_media_bug_resume(other_session);
switch_process_import(session, other_channel, "fifo_caller_consumer_import");
switch_process_import(other_session, channel, "fifo_consumer_caller_import");
switch_process_import(session, other_channel, "fifo_caller_consumer_import", switch_channel_get_variable(channel, "fifo_import_prefix"));
switch_process_import(other_session, channel, "fifo_consumer_caller_import", switch_channel_get_variable(other_channel, "fifo_import_prefix"));
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_data(channel, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]);
@ -3082,7 +3090,7 @@ SWITCH_STANDARD_APP(fifo_function)
switch_mutex_unlock(globals.mutex);
switch_channel_clear_app_flag_key(__FILE__, channel, FIFO_APP_BRIDGE_TAG);
switch_channel_clear_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_BRIDGE_TAG);
switch_core_media_bug_resume(session);
@ -3512,6 +3520,12 @@ static void list_node(fifo_node_t *node, switch_xml_t x_report, int *off, int ve
switch_snprintf(tmp, sizeof(buffer), "%u", node->outbound_per_cycle);
switch_xml_set_attr_d(x_fifo, "outbound_per_cycle", tmp);
switch_snprintf(tmp, sizeof(buffer), "%u", node->ring_timeout);
switch_xml_set_attr_d(x_fifo, "ring_timeout", tmp);
switch_snprintf(tmp, sizeof(buffer), "%u", node->default_lag);
switch_xml_set_attr_d(x_fifo, "default_lag", tmp);
switch_snprintf(tmp, sizeof(buffer), "%u", node->outbound_priority);
switch_xml_set_attr_d(x_fifo, "outbound_priority", tmp);
@ -3922,6 +3936,8 @@ static switch_status_t load_config(int reload, int del_all)
int taking_calls_i = 1;
int timeout_i = 60;
int lag_i = 10;
int ring_timeout = 60;
int default_lag = 30;
name = switch_xml_attr(fifo, "name");
@ -3975,11 +3991,29 @@ static switch_status_t load_config(int reload, int del_all)
node->has_outbound = 1;
}
if ((val = switch_xml_attr(fifo, "outbound_ring_timeout"))) {
int tmp = atoi(val);
if (tmp > 10) {
ring_timeout = tmp;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid ring_timeout: must be > 10 for queue %s\n", node->name);
}
}
if ((val = switch_xml_attr(fifo, "outbound_default_lag"))) {
int tmp = atoi(val);
if (tmp > 10) {
default_lag = tmp;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid default_lag: must be > 10 for queue %s\n", node->name);
}
}
node->ring_timeout = ring_timeout;
node->outbound_per_cycle = outbound_per_cycle;
node->outbound_priority = outbound_priority;
node->default_lag = default_lag;
if (outbound_strategy) {
node->outbound_strategy = parse_strat(outbound_strategy);
node->has_outbound = 1;
@ -4011,14 +4045,14 @@ static switch_status_t load_config(int reload, int del_all)
if (timeout) {
if ((timeout_i = atoi(timeout)) < 10) {
timeout_i = 60;
timeout_i = ring_timeout;
}
}
if (lag) {
if ((lag_i = atoi(lag)) < 0) {
lag_i = 10;
lag_i = default_lag;
}
}

View File

@ -140,7 +140,7 @@ switch_status_t spandsp_inband_dtmf_session(switch_core_session_t *session)
}
if ((status = switch_core_media_bug_add(session, "spandsp_dtmf_detect", NULL,
inband_dtmf_callback, pvt, 0, SMBF_READ_REPLACE, &bug)) != SWITCH_STATUS_SUCCESS) {
inband_dtmf_callback, pvt, 0, SMBF_READ_REPLACE | SMBF_NO_PAUSE, &bug)) != SWITCH_STATUS_SUCCESS) {
return status;
}

View File

@ -69,7 +69,8 @@ typedef enum {
typedef enum {
VM_MOVE_NEXT,
VM_MOVE_PREV
VM_MOVE_PREV,
VM_MOVE_SAME
} msg_move_t;
#define VM_PROFILE_CONFIGITEM_COUNT 100
@ -107,6 +108,7 @@ struct vm_profile {
char rew_key[2];
char prev_msg_key[2];
char next_msg_key[2];
char repeat_msg_key[2];
char urgent_key[2];
char operator_key[2];
char vmain_key[2];
@ -480,7 +482,7 @@ vm_profile_t *profile_set_config(vm_profile_t *profile)
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "skip-greet-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->skip_greet_key, "#", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "skip-info-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->skip_info_key, "", &config_dtmf, NULL, NULL);
&profile->skip_info_key, "*", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "config-menu-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->config_menu_key, "5", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "record-greeting-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
@ -510,9 +512,11 @@ vm_profile_t *profile_set_config(vm_profile_t *profile)
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "ff-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE, &profile->ff_key, "6", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "rew-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE, &profile->rew_key, "4", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "previous-message-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->prev_msg_key, "", &config_dtmf, NULL, NULL);
&profile->prev_msg_key, "1", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "next-message-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->next_msg_key, "", &config_dtmf, NULL, NULL);
&profile->next_msg_key, "3", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "repeat-message-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->repeat_msg_key, "0", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "urgent-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
&profile->urgent_key, "*", &config_dtmf, NULL, NULL);
SWITCH_CONFIG_SET_ITEM(profile->config[i++], "operator-key", SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
@ -823,7 +827,8 @@ static switch_status_t control_playback(switch_core_session_t *session, void *in
if (!cc->noexit
&& (dtmf->digit == *cc->profile->delete_file_key || dtmf->digit == *cc->profile->save_file_key
|| dtmf->digit == *cc->profile->prev_msg_key || dtmf->digit == *cc->profile->next_msg_key
|| dtmf->digit == *cc->profile->prev_msg_key || dtmf->digit == *cc->profile->next_msg_key
|| dtmf->digit == *cc->profile->repeat_msg_key
|| dtmf->digit == *cc->profile->terminator_key || dtmf->digit == *cc->profile->skip_info_key
|| dtmf->digit == *cc->profile->email_key || dtmf->digit == *cc->profile->forward_key)) {
*cc->buf = dtmf->digit;
@ -1483,6 +1488,8 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
}
if (!strcmp(input, profile->prev_msg_key)) {
cbt->move = VM_MOVE_PREV;
} else if (!strcmp(input, profile->repeat_msg_key)) {
cbt->move = VM_MOVE_SAME;
} else if (!strcmp(input, profile->next_msg_key)) {
cbt->move = VM_MOVE_NEXT;
} else if (!strcmp(input, profile->listen_file_key)) {
@ -1538,6 +1545,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
if (voicemail_inject(cmd, session) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Sent Carbon Copy to %s\n", vm_cc);
TRY_CODE(switch_ivr_phrase_macro(session, VM_ACK_MACRO, "saved", NULL, NULL));
cbt->move = VM_MOVE_SAME;
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Failed to Carbon Copy to %s\n", vm_cc);
TRY_CODE(switch_ivr_phrase_macro(session, VM_INVALID_EXTENSION_MACRO, vm_cc, NULL, NULL));
@ -1884,7 +1892,10 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
} else {
cur_message -= 2;
}
} else if (cbt.move == VM_MOVE_SAME) {
cur_message -= 1;
}
if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_BREAK) {
break;
}
@ -2893,6 +2904,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
char *read_flags = NORMAL_FLAG_STRING;
int priority = 3;
int email_attach = 1;
char *operator_ext = NULL;
char buf[2];
char key_buf[80];
char *greet_path = NULL;
@ -2973,6 +2985,8 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
vm_enabled = !switch_false(val);
} else if (!strcasecmp(var, "vm-message-ext")) {
vm_ext = switch_core_session_strdup(session, val);
} else if (!strcasecmp(var, "vm-operator-extension")) {
operator_ext = switch_core_session_strdup(session, val);
}
}
}
@ -3089,12 +3103,13 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
greet_key_press:
if (switch_stristr(buf, profile->login_keys)) {
voicemail_check_main(session, profile, domain_name, id, 0);
} else if (!zstr(profile->operator_ext) && !zstr(profile->operator_key) && !strcasecmp(buf, profile->operator_key) ) {
} else if ((!zstr(profile->operator_ext) || !zstr(operator_ext)) && !zstr(profile->operator_key) && !strcasecmp(buf, profile->operator_key) ) {
int argc;
char *argv[4];
char *mycmd;
if (!zstr(profile->operator_ext) && (mycmd = switch_core_session_strdup(session, profile->operator_ext))) {
if ((!zstr(operator_ext) && (mycmd = switch_core_session_strdup(session, operator_ext))) ||
(!zstr(profile->operator_ext) && (mycmd = switch_core_session_strdup(session, profile->operator_ext)))) {
argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
if (argc >= 1 && argc <= 4) {
switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]);

View File

@ -189,6 +189,9 @@
<ProjectReference Include="..\..\..\..\libs\win32\openssl\ssleay32.2010.vcxproj">
<Project>{b4b62169-5ad4-4559-8707-3d933ac5db39}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\..\libs\win32\pthread\pthread.2010.vcxproj">
<Project>{df018947-0fff-4eb3-bdee-441dc81da7a4}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\..\libs\win32\sofia\libsofia_sip_ua_static.2010.vcxproj">
<Project>{70a49bc2-7500-41d0-b75d-edcc5be987a0}</Project>
</ProjectReference>

View File

@ -33,7 +33,6 @@
*/
#include "switch.h"
#include "g711.h"
#include <sng_tc/sngtc_node.h>
@ -41,7 +40,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load);
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sangoma_codec_shutdown);
SWITCH_MODULE_DEFINITION(mod_sangoma_codec, mod_sangoma_codec_load, mod_sangoma_codec_shutdown, NULL);
#define IANA_ULAW 0
#define IANA_LINEAR 10
#define SANGOMA_SESS_HASH_KEY_FORMAT "sngtc%lu"
/* it seemed we need higher PTIME than the calling parties, so we assume nobody will use higher ptime than 40 */
@ -82,6 +81,8 @@ typedef struct vocallo_codec_s {
int autoinit; /* initialize on start loop or manually */
} vocallo_codec_t;
#define ILBC_133_PAYLOAD 97
#define ILBC_152_PAYLOAD 98
vocallo_codec_t g_codec_map[] =
{
{ SNGTC_CODEC_PCMU, 0, "PCMU", "Sangoma PCMU", 40, 64000, 10000, 80, 160, 80, 1 },
@ -90,9 +91,10 @@ vocallo_codec_t g_codec_map[] =
{ SNGTC_CODEC_G729AB, 18, "G729", "Sangoma G729", 40, 8000, 10000, 80, 160, 10, 1 },
{ SNGTC_CODEC_G726_32, 122, "G726-32", "Sangoma G.726 32k", 40, 32000, 10000, 80, 160, 40, 1 },
{ SNGTC_CODEC_GSM_FR, 3, "GSM", "Sangoma GSM", 20, 13200, 20000, 160, 320, 33, 0 },
{ SNGTC_CODEC_ILBC_133, ILBC_133_PAYLOAD, "iLBC", "Sangoma iLBC", -1, -1, -1, -1, -1, -1, 0 },
{ SNGTC_CODEC_ILBC_152, ILBC_152_PAYLOAD, "iLBC", "Sangoma iLBC", -1, -1, -1, -1, -1, -1, 0 },
{ SNGTC_CODEC_G723_1_63, 4, "G723", "Sangoma G723", 90, 6300, 30000, 240, 480, 24, 0},
#if 0
/* FIXME: grandstream crashes with iLBC implementation */
{ SNGTC_CODEC_ILBC, 97, "iLBC", "Sangoma ILBC", -1, -1, -1, -1, -1, -1, 0 },
/* FIXME: sampling rate seems wrong with this, audioooo soooundssssss sloooooow ... */
{ SNGTC_CODEC_G722, 9, "G722", "Sangoma G722", 20, 64000, 20000, 160, 640, 160, 0 },
#endif
@ -103,11 +105,17 @@ vocallo_codec_t g_codec_map[] =
#define IANACODE_CN 13
/* default codec list to load, users may override, special codec 'all' registers everything available unless listed in noregister */
static char g_codec_register_list[1024] = "all";
static char g_codec_register_list[1024] = "G729";
/* default codec list to NOT load, users may override */
static char g_codec_noregister_list[1024] = "";
#define SANGOMA_RTP_QUEUE_SIZE 4
struct sangoma_rtp_payload {
uint8_t data[SWITCH_RECOMMENDED_BUFFER_SIZE];
int32_t datalen;
};
struct codec_data {
/* sngtc request and reply */
sngtc_codec_request_t request;
@ -131,7 +139,15 @@ struct codec_data {
/* avg Rx time */
switch_time_t avgrxus;
switch_time_t last_rx_time;
switch_time_t last_func_call_time;
/* RTP queue. The bigger the queue, the bigger the possible delay */
struct sangoma_rtp_payload rtp_queue[SANGOMA_RTP_QUEUE_SIZE];
uint8_t queue_windex;
uint8_t queue_rindex;
uint8_t queue_size;
uint8_t queue_max_ever;
unsigned debug_timing:1;
};
struct sangoma_transcoding_session {
@ -172,6 +188,17 @@ static vocallo_codec_t *get_codec_from_iana(int iana)
return NULL;
}
static vocallo_codec_t *get_codec_from_id(int id)
{
int i;
for (i = 0; g_codec_map[i].codec_id != -1; i++) {
if (id == g_codec_map[i].codec_id) {
return &g_codec_map[i];
}
}
return NULL;
}
static int sangoma_create_rtp_port(void *usr_priv, uint32_t host_ip, uint32_t *p_rtp_port, void **rtp_fd)
{
struct in_addr local_ip_addr = { 0 };
@ -229,8 +256,8 @@ static int sangoma_create_rtp(void *usr_priv, sngtc_codec_request_leg_t *codec_r
sngtc_codec_ipv4_hex_to_str(codec_reply_leg->codec_ip, codec_ip);
iana = codec_id_to_iana(codec_req_leg->codec_id);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Creating RTP session for host (%s/%d) vocallo(%s/%d) Iana=%d ms=%d idx=%lu\n",
local_ip, rtp_port, codec_ip, codec_reply_leg->codec_udp_port, iana,
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Creating RTP session for host (%s/%d) vocallo(%s/%d) Iana=%d CodecId=%d ms=%d idx=%lu\n",
local_ip, rtp_port, codec_ip, codec_reply_leg->codec_udp_port, iana, codec_req_leg->codec_id,
codec_req_leg->ms*1000, sess->sessid);
/* create the RTP socket */
@ -268,11 +295,11 @@ static switch_status_t switch_sangoma_init(switch_codec_t *codec, switch_codec_f
struct sangoma_transcoding_session *sess = NULL;
vocallo_codec_t *vcodec;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sangoma init called.\n");
encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sangoma init called (encoding = %d, decoding = %d, iana = %d)\n", encoding ? 1 : 0, decoding ? 1 : 0, codec->implementation->ianacode);
if (!(encoding || decoding)) {
return SWITCH_STATUS_FALSE;
}
@ -295,7 +322,7 @@ static switch_status_t switch_sangoma_init(switch_codec_t *codec, switch_codec_f
if (encoding) {
sess->encoder.request.usr_priv = sess;
sess->encoder.request.a.host_ip = g_rtpip;
sess->encoder.request.a.codec_id = SNGTC_CODEC_PCMU;
sess->encoder.request.a.codec_id = SNGTC_CODEC_L16_1;
sess->encoder.request.a.ms = codec->implementation->microseconds_per_packet/1000;
sess->encoder.request.b.host_ip = g_rtpip;
@ -310,7 +337,7 @@ static switch_status_t switch_sangoma_init(switch_codec_t *codec, switch_codec_f
sess->decoder.request.a.ms = codec->implementation->microseconds_per_packet/1000;
sess->decoder.request.b.host_ip = g_rtpip;
sess->decoder.request.b.codec_id = SNGTC_CODEC_PCMU;
sess->decoder.request.b.codec_id = SNGTC_CODEC_L16_1;
sess->decoder.request.b.ms = codec->implementation->microseconds_per_packet/1000;
}
@ -319,6 +346,7 @@ static switch_status_t switch_sangoma_init(switch_codec_t *codec, switch_codec_f
switch_snprintf(sess->hashkey, sizeof(sess->hashkey), SANGOMA_SESS_HASH_KEY_FORMAT, sess->sessid);
switch_core_hash_insert(g_sessions_hash, sess->hashkey, sess);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sangoma init done for codec %s/%s, iana = %d\n", codec->implementation->iananame, vcodec->fs_name, codec->implementation->ianacode);
switch_mutex_unlock(g_sessions_lock);
codec->private_info = sess;
@ -352,6 +380,35 @@ static switch_status_t switch_sangoma_init_ilbc(switch_codec_t *codec, switch_co
return switch_sangoma_init(codec, flags, codec_settings);
}
static void flush_rtp(switch_rtp_t *rtp)
{
switch_status_t sres;
switch_frame_t read_frame;
int flushed = 0;
int sanity = 1000;
while (sanity--) {
sres = switch_rtp_zerocopy_read_frame(rtp, &read_frame, SWITCH_IO_FLAG_NOBLOCK);
if (sres == SWITCH_STATUS_GENERR) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to read on Sangoma encoder RTP session while flushing: %d\n", sres);
return;
}
if (!read_frame.datalen) {
break;
}
flushed++;
}
if (!sanity) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Insanely big UDP queue!\n");
}
}
#define SAFE_INDEX_INC(array, index) \
(index)++; \
if ((index) == switch_arraylen((array))) { \
(index) = 0; \
}
static switch_status_t switch_sangoma_encode(switch_codec_t *codec, switch_codec_t *other_codec, /* codec that was used by the other side */
void *decoded_data, /* decoded data that we must encode */
uint32_t decoded_data_len /* decoded data length */ ,
@ -363,16 +420,21 @@ static switch_status_t switch_sangoma_encode(switch_codec_t *codec, switch_codec
{
/* FS core checks the actual samples per second and microseconds per packet to determine the buffer size in the worst case scenario, no need to check
* whether the buffer passed in by the core (encoded_data) will be big enough */
switch_frame_t ulaw_frame;
switch_frame_t linear_frame;
switch_frame_t encoded_frame;
switch_status_t sres;
switch_time_t now_time, difftime;
unsigned char ebuf_ulaw[decoded_data_len / 2];
short *dbuf_linear;
switch_status_t sres = SWITCH_STATUS_FALSE;
uint16_t decoded_byteswapped_data[SWITCH_RECOMMENDED_BUFFER_SIZE];
uint16_t *decoded_data_linear = decoded_data;
switch_time_t now_time = 0, difftime = 0;
switch_time_t func_start_time = 0, func_end_time = 0;
int i = 0;
int res = 0;
struct sangoma_transcoding_session *sess = codec->private_info;
if (sess->encoder.debug_timing) {
func_start_time = switch_micro_time_now();
}
/* start assuming we will not encode anything */
*encoded_data_len = 0;
@ -390,23 +452,30 @@ static switch_status_t switch_sangoma_encode(switch_codec_t *codec, switch_codec
sess->encoder.txrtp = sess->encoder.reply.tx_fd;
sess->encoder.rxrtp = sess->encoder.reply.rx_fd;
switch_mutex_unlock(g_sessions_lock);
flush_rtp(sess->encoder.rxrtp);
}
/* transcode to ulaw first */
dbuf_linear = decoded_data;
for (i = 0; i < decoded_data_len / sizeof(short); i++) {
ebuf_ulaw[i] = linear_to_ulaw(dbuf_linear[i]);
if (sess->encoder.debug_timing && sess->encoder.last_func_call_time) {
difftime = func_start_time - sess->encoder.last_func_call_time;
if (difftime > 25000 || difftime < 15000) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "%ldus since last read on encoding session %lu\n", (long)difftime, sess->sessid);
}
}
/* do the writing */
memset(&ulaw_frame, 0, sizeof(ulaw_frame));
ulaw_frame.source = __FUNCTION__;
ulaw_frame.data = ebuf_ulaw;
ulaw_frame.datalen = i;
ulaw_frame.payload = IANA_ULAW;
memset(&linear_frame, 0, sizeof(linear_frame));
linear_frame.source = __FUNCTION__;
linear_frame.data = decoded_byteswapped_data;
linear_frame.datalen = decoded_data_len;
linear_frame.payload = IANA_LINEAR;
res = switch_rtp_write_frame(sess->encoder.txrtp, &ulaw_frame);
/* copy and byte-swap */
for (i = 0; i < decoded_data_len/2; i++) {
decoded_byteswapped_data[i] = (decoded_data_linear[i] << 8) | (decoded_data_linear[i] >> 8);
}
res = switch_rtp_write_frame(sess->encoder.txrtp, &linear_frame);
if (-1 == res) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to write to Sangoma encoder RTP session.\n");
return SWITCH_STATUS_FALSE;
@ -420,38 +489,80 @@ static switch_status_t switch_sangoma_encode(switch_codec_t *codec, switch_codec
sess->encoder.tx++;
/* do the reading */
memset(&encoded_frame, 0, sizeof(encoded_frame));
for ( ; ; ) {
#if 0
prevread_time = switch_micro_time_now();
#endif
sres = switch_rtp_zerocopy_read_frame(sess->encoder.rxrtp, &encoded_frame, SWITCH_IO_FLAG_NOBLOCK);
if (sres == SWITCH_STATUS_GENERR) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to read on Sangoma encoder RTP session: %d\n", sres);
return SWITCH_STATUS_FALSE;
}
#if 0
afterread_time = switch_micro_time_now();
difftime = afterread_time - prevread_time;
if (difftime > 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%ldus to read on encoding session %lu.\n", (long)difftime, sess->sessid);
}
#endif
if (0 == encoded_frame.datalen) {
break;
}
if (encoded_frame.payload != codec->implementation->ianacode
&& encoded_frame.payload != IANACODE_CN) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Read unexpected payload %d in Sangoma encoder RTP session, expecting %d\n",
encoded_frame.payload, codec->implementation->ianacode);
break;
if (encoded_frame.payload == IANACODE_CN) {
/* confort noise is treated as silence by us */
continue;
}
if (*encoded_data_len) {
sess->encoder.rxdiscarded++;
if (encoded_frame.datalen != codec->implementation->encoded_bytes_per_packet) {
/* seen when silence suppression is enabled */
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Ignoring encoded frame of %d bytes intead of %d bytes\n", encoded_frame.datalen, codec->implementation->encoded_bytes_per_packet);
continue;
}
memcpy(encoded_data, encoded_frame.data, encoded_frame.datalen);
*encoded_data_len = encoded_frame.datalen;
if (encoded_frame.payload != codec->implementation->ianacode) {
if (sess->encoder.request.b.codec_id == SNGTC_CODEC_ILBC_152 || sess->encoder.request.b.codec_id == SNGTC_CODEC_ILBC_133) {
/* since we moved to SOAP based communications, the mapping between vocallo IANA and our IANA does not work,
* some codecs checks cannot be completely done, like iLBC */
if (encoded_frame.payload != ILBC_152_PAYLOAD && encoded_frame.payload != ILBC_133_PAYLOAD) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Read unexpected payload %d in Sangoma encoder RTP session, expecting either %d or %d\n",
encoded_frame.payload, ILBC_152_PAYLOAD, ILBC_133_PAYLOAD);
break;
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Read unexpected payload %d in Sangoma encoder RTP session, expecting %d\n",
encoded_frame.payload, codec->implementation->ianacode);
break;
}
}
if (sess->encoder.queue_windex == sess->encoder.queue_rindex) {
if (sess->encoder.rtp_queue[sess->encoder.queue_rindex].datalen) {
/* if there is something where we want to write, we're dropping it */
sess->encoder.rxdiscarded++;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Discarding encoded frame of %d bytes from RTP session %lu, windex = %d, rindex = %d\n",
sess->encoder.rtp_queue[sess->encoder.queue_rindex].datalen, sess->sessid, sess->encoder.queue_windex, sess->encoder.queue_rindex);
SAFE_INDEX_INC(sess->encoder.rtp_queue, sess->encoder.queue_rindex);
sess->encoder.queue_size--;
}
}
memcpy(sess->encoder.rtp_queue[sess->encoder.queue_windex].data, encoded_frame.data, encoded_frame.datalen);
sess->encoder.rtp_queue[sess->encoder.queue_windex].datalen = encoded_frame.datalen;
SAFE_INDEX_INC(sess->encoder.rtp_queue, sess->encoder.queue_windex);
/* monitor the queue size */
sess->encoder.queue_size++;
if (sess->encoder.queue_size > sess->encoder.queue_max_ever) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Encoder Rx queue for RTP session %lu is now %d, windex = %d, rindex = %d\n", sess->sessid, sess->encoder.queue_size,
sess->encoder.queue_windex, sess->encoder.queue_rindex);
sess->encoder.queue_max_ever = sess->encoder.queue_size;
}
}
/* update encoding stats if we received a frame */
if (*encoded_data_len) {
if (*encoded_data_len != codec->implementation->encoded_bytes_per_packet) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Returning odd encoded frame of %d bytes intead of %d bytes\n", *encoded_data_len, codec->implementation->encoded_bytes_per_packet);
}
/* update encoding stats if we have a frame to give */
if (sess->encoder.rtp_queue[sess->encoder.queue_rindex].datalen) {
sess->encoder.rx++;
now_time = switch_micro_time_now();
if (!sess->encoder.last_rx_time) {
@ -469,10 +580,28 @@ static switch_status_t switch_sangoma_encode(switch_codec_t *codec, switch_codec
}
}
sess->encoder.lastrxseqno = encoded_frame.seq;
/* pop the data from the queue */
*encoded_data_len = sess->encoder.rtp_queue[sess->encoder.queue_rindex].datalen;
memcpy(encoded_data, sess->encoder.rtp_queue[sess->encoder.queue_rindex].data, *encoded_data_len);
sess->encoder.rtp_queue[sess->encoder.queue_rindex].datalen = 0;
SAFE_INDEX_INC(sess->encoder.rtp_queue, sess->encoder.queue_rindex);
sess->encoder.queue_size--;
if (*encoded_data_len != codec->implementation->encoded_bytes_per_packet) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Returning odd encoded frame of %d bytes intead of %d bytes\n", *encoded_data_len, codec->implementation->encoded_bytes_per_packet);
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No output from sangoma encoder\n");
}
if (sess->encoder.debug_timing) {
func_end_time = switch_micro_time_now();
difftime = func_end_time - func_start_time;
if (difftime > 5000) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "%ldus to execute encoding function in session %lu.\n", (long)difftime, sess->sessid);
}
sess->encoder.last_func_call_time = func_end_time;
}
return SWITCH_STATUS_SUCCESS;
}
@ -489,14 +618,21 @@ static switch_status_t switch_sangoma_decode(switch_codec_t *codec, /* codec ses
/* FS core checks the actual samples per second and microseconds per packet to determine the buffer size in the worst case scenario, no need to check
* whether the buffer passed in by the core will be enough */
switch_frame_t encoded_frame;
switch_frame_t ulaw_frame;
switch_status_t sres;
switch_time_t now_time, difftime;
short *dbuf_linear;
int i = 0;
switch_frame_t linear_frame;
switch_status_t sres = SWITCH_STATUS_FALSE;
switch_time_t now_time = 0, difftime = 0;
switch_time_t func_start_time = 0, func_end_time = 0;
uint16_t *dbuf_linear;
uint16_t *linear_frame_data;
uint16_t *rtp_data_linear;
int res = 0;
int i = 0;
struct sangoma_transcoding_session *sess = codec->private_info;
if (sess->decoder.debug_timing) {
func_start_time = switch_micro_time_now();
}
dbuf_linear = decoded_data;
/* start assuming we will not decode anything */
@ -522,6 +658,14 @@ static switch_status_t switch_sangoma_decode(switch_codec_t *codec, /* codec ses
sess->decoder.txrtp = sess->decoder.reply.tx_fd;
sess->decoder.rxrtp = sess->decoder.reply.rx_fd;
switch_mutex_unlock(g_sessions_lock);
flush_rtp(sess->decoder.rxrtp);
}
if (sess->decoder.debug_timing && sess->decoder.last_func_call_time) {
difftime = func_start_time - sess->decoder.last_func_call_time;
if (difftime > 25000 || difftime < 15000) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%ldms since last read on decoding session %lu.\n", (long)difftime, sess->sessid);
}
}
/* do the writing */
@ -546,40 +690,70 @@ static switch_status_t switch_sangoma_decode(switch_codec_t *codec, /* codec ses
sess->decoder.tx++;
/* do the reading */
memset(&ulaw_frame, 0, sizeof(ulaw_frame));
for ( ; ; ) {
sres = switch_rtp_zerocopy_read_frame(sess->decoder.rxrtp, &ulaw_frame, SWITCH_IO_FLAG_NOBLOCK);
#if 0
prevread_time = switch_micro_time_now();
#endif
sres = switch_rtp_zerocopy_read_frame(sess->decoder.rxrtp, &linear_frame, SWITCH_IO_FLAG_NOBLOCK);
if (sres == SWITCH_STATUS_GENERR) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to read on Sangoma decoder RTP session: %d\n", sres);
return SWITCH_STATUS_FALSE;
}
if (0 == ulaw_frame.datalen) {
#if 0
afterread_time = switch_micro_time_now();
difftime = afterread_time - prevread_time;
if (difftime > 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%ldus to read on decoding session %lu.\n", (long)difftime, sess->sessid);
}
#endif
if (0 == linear_frame.datalen) {
break;
}
if (ulaw_frame.payload != IANA_ULAW
&& ulaw_frame.payload != IANACODE_CN) {
if (linear_frame.payload == IANACODE_CN) {
/* confort noise is treated as silence by us */
continue;
}
if (linear_frame.payload != IANA_LINEAR) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Read unexpected payload %d in Sangoma decoder RTP session, expecting %d\n",
ulaw_frame.payload, IANA_ULAW);
linear_frame.payload, IANA_LINEAR);
break;
}
if (*decoded_data_len) {
sess->decoder.rxdiscarded++;
if (sess->decoder.queue_windex == sess->decoder.queue_rindex) {
if (sess->decoder.rtp_queue[sess->decoder.queue_rindex].datalen) {
/* if there is something where we want to write, we're dropping it */
sess->decoder.rxdiscarded++;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Discarding decoded frame of %d bytes from RTP session %lu, windex = %d, rindex = %d\n",
sess->decoder.rtp_queue[sess->decoder.queue_rindex].datalen, sess->sessid, sess->decoder.queue_windex, sess->decoder.queue_rindex);
SAFE_INDEX_INC(sess->decoder.rtp_queue, sess->decoder.queue_rindex);
sess->decoder.queue_size--;
}
}
/* transcode to linear */
for (i = 0; i < ulaw_frame.datalen; i++) {
dbuf_linear[i] = ulaw_to_linear(((char *)ulaw_frame.data)[i]);
/* byteswap the received data */
rtp_data_linear = (unsigned short *)sess->decoder.rtp_queue[sess->decoder.queue_windex].data;
linear_frame_data = linear_frame.data;
for (i = 0; i < linear_frame.datalen/2; i++) {
rtp_data_linear[i] = (linear_frame_data[i] << 8) | (linear_frame_data[i] >> 8);
}
sess->decoder.rtp_queue[sess->decoder.queue_windex].datalen = linear_frame.datalen;
SAFE_INDEX_INC(sess->decoder.rtp_queue, sess->decoder.queue_windex);
/* monitor the queue size */
sess->decoder.queue_size++;
if (sess->decoder.queue_size > sess->decoder.queue_max_ever) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Encoder Rx queue for RTP session %lu is now %d, windex = %d, rindex = %d\n", sess->sessid, sess->decoder.queue_size,
sess->decoder.queue_windex, sess->decoder.queue_rindex);
sess->decoder.queue_max_ever = sess->decoder.queue_size;
}
*decoded_data_len = i * 2;
}
if (*decoded_data_len) {
if (*decoded_data_len != codec->implementation->decoded_bytes_per_packet) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Returning odd decoded frame of %d bytes intead of %d bytes\n", *decoded_data_len, codec->implementation->decoded_bytes_per_packet);
}
if (sess->decoder.rtp_queue[sess->decoder.queue_rindex].datalen) {
/* update decoding stats */
sess->decoder.rx++;
@ -594,17 +768,37 @@ static switch_status_t switch_sangoma_decode(switch_codec_t *codec, /* codec ses
/* check sequence and bump lost rx packets count if needed */
if (sess->decoder.lastrxseqno >= 0) {
if (ulaw_frame.seq > (sess->decoder.lastrxseqno + 2) ) {
sess->decoder.rxlost += ulaw_frame.seq - sess->decoder.lastrxseqno - 1;
if (linear_frame.seq > (sess->decoder.lastrxseqno + 2) ) {
sess->decoder.rxlost += linear_frame.seq - sess->decoder.lastrxseqno - 1;
}
}
sess->decoder.lastrxseqno = ulaw_frame.seq;
sess->decoder.lastrxseqno = linear_frame.seq;
/* pop the data from the queue */
memcpy(dbuf_linear, sess->decoder.rtp_queue[sess->decoder.queue_rindex].data, sess->decoder.rtp_queue[sess->decoder.queue_rindex].datalen);
*decoded_data_len = sess->decoder.rtp_queue[sess->decoder.queue_rindex].datalen;
sess->decoder.rtp_queue[sess->decoder.queue_rindex].datalen = 0;
SAFE_INDEX_INC(sess->decoder.rtp_queue, sess->decoder.queue_rindex);
sess->decoder.queue_size--;
if (*decoded_data_len != codec->implementation->decoded_bytes_per_packet) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Returning odd decoded frame of %d bytes intead of %d bytes\n", *decoded_data_len, codec->implementation->decoded_bytes_per_packet);
}
} else {
*decoded_data_len = codec->implementation->decoded_bytes_per_packet;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No output from sangoma decoder, returning silent frame of %d bytes\n", *decoded_data_len);
memset(dbuf_linear, 0, *decoded_data_len);
}
if (sess->decoder.debug_timing) {
func_end_time = switch_micro_time_now();
difftime = func_end_time - func_start_time;
if (difftime > 5000) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%ldus to execute decoding function in session %lu.\n", (long)difftime, sess->sessid);
}
sess->decoder.last_func_call_time = func_end_time;
}
return SWITCH_STATUS_SUCCESS;
}
@ -652,7 +846,7 @@ static void sangoma_print_stats(switch_stream_handle_t *stream, switch_rtp_numbe
stream->write_function(stream, "Flush packet count: %lu\n\n\n", stats->flush_packet_count);
}
#define SANGOMA_SYNTAX "settings|sessions|stats <session>"
#define SANGOMA_SYNTAX "settings|sessions|stats <session>|debug <session>|nodebug <session>"
SWITCH_STANDARD_API(sangoma_function)
{
char *argv[10] = { 0 };
@ -756,38 +950,83 @@ SWITCH_STANDARD_API(sangoma_function)
if (sess->encoder.rxrtp) {
stats = switch_rtp_get_stats(sess->encoder.rxrtp, NULL);
stream->write_function(stream, "=== Encoder ===\n");
stream->write_function(stream, "=== %s Encoder ===\n", sess->impl->iananame);
stream->write_function(stream, "Remote address: %s:%d\n\n", switch_rtp_get_remote_host(sess->encoder.rxrtp), switch_rtp_get_remote_port(sess->encoder.rxrtp));
stream->write_function(stream, "Tx L16 from %d.%d.%d.%d:%d to %d.%d.%d.%d:%d\n\n", SNGTC_NIPV4(sess->encoder.reply.a.host_ip), sess->encoder.reply.a.host_udp_port,
SNGTC_NIPV4(sess->encoder.reply.a.codec_ip), sess->encoder.reply.a.codec_udp_port);
stream->write_function(stream, "Rx %s at %d.%d.%d.%d:%d from %d.%d.%d.%d:%d\n\n", sess->impl->iananame, SNGTC_NIPV4(sess->encoder.reply.b.host_ip), sess->encoder.reply.b.host_udp_port,
SNGTC_NIPV4(sess->encoder.reply.b.codec_ip), sess->encoder.reply.b.codec_udp_port);
stream->write_function(stream, "-- Encoder Inbound Stats --\n");
stream->write_function(stream, "-- Inbound Stats --\n");
stream->write_function(stream, "Rx Discarded: %lu\n", sess->encoder.rxdiscarded);
sangoma_print_stats(stream, &stats->inbound);
stats = switch_rtp_get_stats(sess->encoder.txrtp, NULL);
stream->write_function(stream, "-- Encoder Outbound Stats --\n");
stream->write_function(stream, "-- Outbound Stats --\n");
sangoma_print_stats(stream, &stats->outbound);
} else {
stream->write_function(stream, "\n=== No Encoder ===\n\n");
}
if (sess->decoder.rxrtp) {
stats = switch_rtp_get_stats(sess->decoder.rxrtp, NULL);
stream->write_function(stream, "=== Decoder ===\n");
stream->write_function(stream, "Remote address: %s:%d\n\n", switch_rtp_get_remote_host(sess->decoder.rxrtp), switch_rtp_get_remote_port(sess->decoder.rxrtp));
stream->write_function(stream, "=== %s Decoder ===\n", sess->impl->iananame);
stream->write_function(stream, "Tx %s from %d.%d.%d.%d:%d to %d.%d.%d.%d:%d\n\n", sess->impl->iananame, SNGTC_NIPV4(sess->decoder.reply.a.host_ip), sess->decoder.reply.a.host_udp_port,
SNGTC_NIPV4(sess->decoder.reply.a.codec_ip), sess->decoder.reply.a.codec_udp_port);
stream->write_function(stream, "Rx L16 at %d.%d.%d.%d:%d from %d.%d.%d.%d:%d\n\n", SNGTC_NIPV4(sess->decoder.reply.b.host_ip), sess->decoder.reply.b.host_udp_port,
SNGTC_NIPV4(sess->decoder.reply.b.codec_ip), sess->decoder.reply.b.codec_udp_port);
stream->write_function(stream, "-- Decoder Inbound Stats --\n");
stream->write_function(stream, "-- Inbound Stats --\n");
stream->write_function(stream, "Rx Discarded: %lu\n", sess->decoder.rxdiscarded);
sangoma_print_stats(stream, &stats->inbound);
stats = switch_rtp_get_stats(sess->decoder.txrtp, NULL);
stream->write_function(stream, "-- Decoder Outbound Stats --\n");
stream->write_function(stream, "-- Outbound Stats --\n");
sangoma_print_stats(stream, &stats->outbound);
} else {
stream->write_function(stream, "\n=== No Decoder ===\n\n");
}
} else if (!strcasecmp(argv[0], "debug")) {
struct sangoma_transcoding_session *sess;
unsigned long sessid = 0;
int ret = 0;
if (argc < 2) {
stream->write_function(stream, "%s", SANGOMA_SYNTAX);
goto done;
}
ret = sscanf(argv[1], "%lu", &sessid);
if (ret != 1) {
stream->write_function(stream, "%s", SANGOMA_SYNTAX);
goto done;
}
sess = sangoma_find_session(sessid);
if (!sess) {
stream->write_function(stream, "Failed to find session %lu\n", sessid);
goto done;
}
sess->encoder.debug_timing = 1;
sess->decoder.debug_timing = 1;
stream->write_function(stream, "Debug enabled for transcoding session: %lu\n", sessid);
} else if (!strcasecmp(argv[0], "nodebug")) {
struct sangoma_transcoding_session *sess;
unsigned long sessid = 0;
int ret = 0;
if (argc < 2) {
stream->write_function(stream, "%s", SANGOMA_SYNTAX);
goto done;
}
ret = sscanf(argv[1], "%lu", &sessid);
if (ret != 1) {
stream->write_function(stream, "%s", SANGOMA_SYNTAX);
goto done;
}
sess = sangoma_find_session(sessid);
if (!sess) {
stream->write_function(stream, "Failed to find session %lu\n", sessid);
goto done;
}
sess->encoder.debug_timing = 0;
sess->decoder.debug_timing = 0;
stream->write_function(stream, "Debug disabled for transcoding session: %lu\n", sessid);
} else {
stream->write_function(stream, "Unknown Command [%s]\n", argv[0]);
}
@ -911,6 +1150,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load)
switch_codec_interface_t *codec_interface = NULL;
switch_api_interface_t *api_interface = NULL;
int i = 0, c = 0;
int ilbc_done = 0;
vocallo_codec_t *ilbc_codec = NULL;
int detected = 0, activated = 0;
/* make sure we have valid configuration */
@ -949,6 +1190,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Loading codecs, register='%s', noregister='%s'\n", g_codec_register_list, g_codec_noregister_list);
for (c = 0; g_codec_map[c].codec_id != -1; c++) {
if (g_codec_map[c].codec_id == SNGTC_CODEC_L16_1) {
/* registering L16 does not make any sense */
continue;
}
/* check if the codec is in the load list, otherwise skip it */
if (strcasecmp(g_codec_register_list, "all") && !strcasestr(g_codec_register_list, g_codec_map[c].iana_name)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Not loading codec %s because was not found in the load list\n",
@ -969,6 +1215,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load)
sngtc_set_iana_code_based_on_codec_id(g_codec_map[c].codec_id, g_codec_map[c].iana);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Mapped codec %d to IANA %d\n", g_codec_map[c].codec_id, g_codec_map[c].iana);
/* special check for iLBC to add a single codec interface for both ILBC bitrate versions */
if ((g_codec_map[c].codec_id == SNGTC_CODEC_ILBC_152 || g_codec_map[c].codec_id == SNGTC_CODEC_ILBC_133) && ilbc_done) {
continue;
}
/* SWITCH_ADD_CODEC allocates a codec interface structure from the pool the core gave us and adds it to the internal interface
* list the core keeps, gets a codec id and set the given codec name to it.
* At this point there is an empty shell codec interface registered, but not yet implementations */
@ -1028,11 +1279,13 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load)
switch_sangoma_destroy); /* deinitalize a codec handle using this implementation */
break;
case SNGTC_CODEC_ILBC:
case SNGTC_CODEC_ILBC_133:
case SNGTC_CODEC_ILBC_152:
ilbc_codec = get_codec_from_id(SNGTC_CODEC_ILBC_152);
switch_core_codec_add_implementation(pool, codec_interface, /* the codec interface we allocated and we want to register with the core */
SWITCH_CODEC_TYPE_AUDIO, /* enumeration defining the type of the codec */
g_codec_map[c].iana, /* the IANA code number, ie http://www.iana.org/assignments/rtp-parameters */
g_codec_map[c].iana_name, /* the IANA code name */
ilbc_codec->iana, /* the IANA code number, ie http://www.iana.org/assignments/rtp-parameters */
ilbc_codec->iana_name, /* the IANA code name */
"mode=20", /* default fmtp to send (can be overridden by the init function), fmtp is used in SDP for format specific parameters */
8000, /* samples transferred per second */
8000, /* actual samples transferred per second */
@ -1048,11 +1301,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load)
switch_sangoma_decode, /* function to decode encoded data into slinear data */
switch_sangoma_destroy); /* deinitalize a codec handle using this implementation */
#if 0
ilbc_codec = get_codec_from_id(SNGTC_CODEC_ILBC_133);
switch_core_codec_add_implementation(pool, codec_interface, /* the codec interface we allocated and we want to register with the core */
SWITCH_CODEC_TYPE_AUDIO, /* enumeration defining the type of the codec */
g_codec_map[c].iana, /* 97, the IANA code number */
g_codec_map[c].iana_name, /* the IANA code name */
ilbc_codec->iana, /* the IANA code number, ie http://www.iana.org/assignments/rtp-parameters */
ilbc_codec->iana_name, /* the IANA code name */
"mode=30", /* default fmtp to send (can be overridden by the init function), fmtp is used in SDP for format specific parameters */
8000, /* samples transferred per second */
8000, /* actual samples transferred per second */
@ -1067,7 +1320,32 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load)
switch_sangoma_encode, /* function to encode slinear data into encoded data */
switch_sangoma_decode, /* function to decode encoded data into slinear data */
switch_sangoma_destroy); /* deinitalize a codec handle using this implementation */
#endif
ilbc_done = 1;
break;
case SNGTC_CODEC_G723_1_63:
for (i = 1; i <= 3; i++) {
switch_core_codec_add_implementation(pool, codec_interface, /* the codec interface we allocated and we want to register with the core */
SWITCH_CODEC_TYPE_AUDIO, /* enumeration defining the type of the codec */
g_codec_map[c].iana, /* the IANA code number, ie http://www.iana.org/assignments/rtp-parameters */
g_codec_map[c].iana_name, /* the IANA code name */
NULL, /* default fmtp to send (can be overridden by the init function), fmtp is used in SDP for format specific parameters */
8000, /* samples transferred per second */
8000, /* actual samples transferred per second */
g_codec_map[c].bps, /* bits transferred per second */
g_codec_map[c].mpf * i, /* microseconds per frame */
g_codec_map[c].spf * i, /* samples per frame */
g_codec_map[c].bpfd * i, /* number of bytes per frame decompressed */
g_codec_map[c].bpfc * i, /* number of bytes per frame compressed */
1, /* number of channels represented */
g_codec_map[c].spf * i, /* number of frames per network packet (I dont think this is used at all) */
switch_sangoma_init, /* function to initialize a codec session using this implementation */
switch_sangoma_encode, /* function to encode slinear data into encoded data */
switch_sangoma_decode, /* function to decode encoded data into slinear data */
switch_sangoma_destroy); /* deinitalize a codec handle using this implementation */
}
break;
case SNGTC_CODEC_G722:
@ -1103,6 +1381,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sangoma_codec_load)
switch_console_set_complete("add sangoma_codec settings");
switch_console_set_complete("add sangoma_codec sessions");
switch_console_set_complete("add sangoma_codec stats");
switch_console_set_complete("add sangoma_codec debug");
switch_console_set_complete("add sangoma_codec nodebug");
return SWITCH_STATUS_SUCCESS;
}

View File

@ -1,6 +1,7 @@
MODNAME=mod_gsmopen
SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
LOCAL_CFLAGS += $(SVNDEF) -Wno-error=address -DNO_GSMLIB -I../../../../../../libs/spandsp/src -I../../../../../..//libs/tiff-3.8.2/libtiff
#LOCAL_CFLAGS += $(SVNDEF) -Wno-error=address -DNO_GSMLIB -I../../../../../../libs/spandsp/src -I../../../../../..//libs/tiff-3.8.2/libtiff
LOCAL_CFLAGS += $(SVNDEF) -DNO_GSMLIB -I../../../../../../libs/spandsp/src -I../../../../../..//libs/tiff-3.8.2/libtiff
LOCAL_LDFLAGS=-lasound -L../../../../../../libs/spandsp/src -lspandsp
LOCAL_OBJS=gsmopen_protocol.o
include ../../../../../../build/modmake.rules

View File

@ -1209,7 +1209,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_call_cause_t *cancel_cause)
{
private_t *tech_pvt = NULL;
if ((*new_session = switch_core_session_request(gsmopen_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
if ((*new_session = switch_core_session_request(gsmopen_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool)) != 0) {
switch_channel_t *channel = NULL;
switch_caller_profile_t *caller_profile;
char *rdest;

View File

@ -0,0 +1,536 @@
<configuration name="khomp.conf" description="Khomp Configuration">
<!-- Config for all boards -->
<settings>
<!--
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;; This is the configuration file for the Khomp ;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Endpoint 1.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-->
<channels>
<!-- Section for main configurations about channels. -->
<!--
Name of the dialplan module in use.
(default = XML)
<param name="dialplan" value="XML"/>
-->
<!--
Enable/disable generalized echo cancellation in the channel, for calls
passing inside FreeSWITCH (disabled for bridged calls).
(default = yes)
<param name="echo-canceller" value="yes"/>
-->
<!--
Enable/disable AGC (auto gain control). Should be used carefully, as it
can make line noise really loud.
(default = yes)
<param name="auto-gain-control" value="yes"/>
-->
<!--
Enable/disable sending DTMFs out-band as a way to pass detected DTMFs to
FreeSWITCH. Needed if FreeSWITCH generates digits for us in bridge application
or is being used for IVR ("URA", in pt_BR).
(default = yes)
<param name="out-of-band-dtmfs" value="yes"/>
-->
<!--
Enable/disable DTMF suppression delay. WARNING: if you disable this, DTMFs
will not be suppressed anymore! You should only use this option if
"out-of-band-dtmfs" is "no".
(default = yes)
<param name="suppression-delay" value="yes"/>
-->
<!--
Adjust connection automagically if a FAX tone is detected.
(default = yes)
<param name="auto-fax-adjustment" value="yes"/>
-->
<!--
Time (is seconds) since connection, when we may detect FAX tone and perform
automagical adjustment. After this, FAX tone detection is ignored.
Possible values: 0 - 9999
(default = 30).
<param name="fax-adjustment-timeout" value="30"/>
-->
<!--
Enable/disable pulse detection (reported as DTMF digits).
(default = yes)
<param name="pulse-forwarding" value="yes"/>
-->
<!--
Enable correct standard following for R2/MFC protocol. Disabled by default,
as using FreeSWITCH behind a PBX may timeout all outgoing calls without this.
However, you can set this to "yes" if FreeSWITCH is directly connected to a
CO (central office) or to a fast signaling PBX, and have a correct
behaviour for condition obtaining/reporting.
(default = no)
<param name="r2-strict-behaviour" value="no"/>
-->
<!--
Set the delay (in ms) after sending ringback condition where audio stream
should be opened for the channel. Limited to 25ms min, 500ms max.
(default = 250)
<param name="r2-preconnect-wait" value="250"/>
-->
<!--
Enable/disable native bridge mode (known in pt_BR as "trombone") for calls
in the Khomp channel, passing the audio inside the board when both channels
(incoming and outgoing) are of type Khomp. This reduces the echo and the
audio delay, and frees the host from most audio processing.
(default = yes)
<param name="native-bridge" value="yes"/>
-->
<!--
Defines the incoming context for calls on E1 channels. Some wildcards are
accepted, and described in the bottom of this file.
(default = khomp-DD-LL)
<param name="context-digital" value="khomp-DD-LL"/>
-->
<!--
Defines the incoming context for calls on FXS channels. Some wildcards are
accepted, and described in the bottom of this file.
(default = khomp-DD-CC)
<param name="context-fxs" value="khomp-DD-CC"/>
-->
<!--
Defines the incoming context for calls on FXO channels. Some wildcards are
accepted, and described in the bottom of this file.
(default = khomp-DD-CC)
<param name="context-fxo" value="khomp-DD-CC"/>
-->
<!--
Defines the incoming context for calls on GSM channels. Some wildcards are
accepted, and described in the bottom of this file.
(default = khomp-DD-CC)
<param name="context-gsm-call" value="khomp-DD-CC"/>
-->
<!--
Defines the incoming context for messages on GSM channels. Some wildcards are
accepted, and described in the bottom of this file.
(default = khomp-sms-DD-CC)
<param name="context-gsm-sms" value="khomp-sms-DD-CC"/>
-->
<!--
Defines the incoming context for calls on Passive Record boards (KPR). Some
wildcards are accepted, and described in the bottom of this file.
(default = khomp-DD-CC)
<param name="context-pr" value="khomp-DD-CC"/>
-->
<!--
Set the logging of messages to console. Possible values (to set more than one,
separate the values with comma):
errors - Error messages, when something goes really wrong.
warnings - Warnings, used when something might not be going as expected.
messages - Generic messages, used to indicate some information.
events - Show received K3L events as console messages.
commands - Show sent K3L commands as console messages.
audio - Enable messages for K3L audio events (very verbose!).
modem - Enable messages for data received from KGSM modems.
link - Enable logging of link status changes.
standard - Special, enable default messages (RECOMMENDED).
all - Special, enable ALL messages (should not be used naively).
(default = standard)
<param name="log-to-console" value="standard"/>
-->
<!--
Set the logging of messages to disk. Possible values (to set more than one,
separate the values with comma):
errors - Error messages, when something goes really wrong.
warnings - Warnings, used when something might not be going as expected.
messages - Generic messages, used to indicate some information.
events - Record received K3L events as log messages.
commands - Record sent K3L commands as log messages.
audio - Enable messages for K3L audio events (very verbose!).
modem - Enable messages for data received from KGSM modems.
link - Enable logging of link status changes.
functions - Enable debugging for functions. Should not be used naively!).
threads - Enable debugging for threads. Should not be used naively!).
locks - Enable debugging for locks. Should not be used naively!).
streams - Enable debugging for streams. Should not be used naively!).
standard - Special, enable default messages (RECOMMENDED).
debugging - Special, enable debug messages (should not be used naively).
all - Special, enable ALL messages (DO NOT USE THIS!).
(default = standard)
<param name="log-to-disk" value="standard"/>
-->
<!--
Set the low level tracing. DO NOT USE THIS UNLESS YOU WERE ADVISED TO DO SO.
Possible values (to set more than one, separate the values with comma):
k3l - Enable the low level tracing of board's API.
If you are using 'kserver', this option will take no effect. For
the k3l tracing to proceed, you will need to (re)start kserver
with 'debug' option. E.g. '#> kserver start -debug'.
rdsi - Enable ISDN low level debugging.
r2 - Enable r2 protocol low level debugging.
(default = <empty>)
<param name="trace" value=""/>
-->
<!--
Set output volume level. Possible values:
* '+ N' = increase N times;
* '- N' = decrease N times.
* '0' = leave default.
(default = 0)
<param name="output-volume" value="0"/>
-->
<!--
Set input volume level. Can only be used if AGC (and not pulse detection)
is enabled on the board configuration. Possible values:
* '+ N' = increase N times;
* '- N' = decrease N times.
* '0' = leave default.
(default = 0)
<param name="input-volume" value="0"/>
-->
<!--
Sets the default AMA flags, affecting the categorization of entries in
the call detail records.
(default = default)
<param name="amaflags" value="default"/>
-->
<!--
Sets the account code for calls placed on the channel. The account code may
be any alphanumeric string
(default = KhompBoard)
<param name="accountcode" value="KhompBoard"/>
-->
<!--
Set the language of the channel (useful for selecting audio messages of a
specific language on answer).
(default = <empty>)
<param name="language" value="pt_BR"/>
-->
<!--
Set the music on hold class of the channel (useful for selecting a group of
songs to play on hold).
(default = default)
<param name="mohclass" value="default"/>
-->
<!--
Sets the global orig (CALLERID) base for FXS boards. This number is added
to a sequencial number, which is incremented for each FXS board and FXS
channel in the system.
For more example of how to use this option, see channel README file,
section 'Opcoes do application Bridge', item '<action application="bridge" data="Khomp/r304" />'.
(default = 0)
<param name="fxs-global-orig" value="0200"/>
-->
<!--
Sets the numbers (separated by comma) in which the 'pbx-dialtone' from
FXS boards will be changed to 'co-dialtone' (public tone), when they are
pressed.
(default = <empty>)
<param name="fxs-co-dialtone" value="0,90"/>
-->
<!--
Enable or disable sending number of A throught BINA DTMF signalization to
a FXS branch.
(default = yes)
<param name="fxs-bina" value="yes"/>
-->
<!--
Enable/disable using CTbus for Khomp CTI boards in native bridge.
(WARNING: just used for internal testings!)
(default = no)
<param name="has-ctbus" value="no"/>
-->
<!--
This is the delay time to really disconnect a channel after the disconnect
event arrive. If a connect event comes up in this interval, then the
disconnection is ignored and the call keeps going on. Values in ms.
(default = 0)
<param name="disconnect-delay" value="0"/>
-->
<!--
This timer controls the delay associated with ringback generation in the
Khomp channel, when the other side *does not send audio* - in other words,
this is used when calling peers located at VoIP channels.
Values are in milliseconds.
(default = 1500)
<param name="delay-ringback-co" value="1500"/>
-->
<!--
This timer controls the delay associated with ringback generation in the
Khomp channel when the other side report a continuous stream of audio in
silence - in other words, this is used when the audio is present but does
not have any tone. Values are in milliseconds.
(default = 2500)
<param name="delay-ringback-pbx" value="2500"/>
-->
<!--
Defines if the channel should optimize audio delay by droping longstanding
packets from audio buffer. This guarantees the minimal audio delay for the
user, and avoid delays associated with miscoded SIP clients. However,
depending on the system's scheduling policy (some 2.6 kernel releases),
this may result on excessive drop of packets, and audible audio skipping.
This should not be changed naively.
(default = no)
<param name="optimize-audio-path" value="no"/>
-->
<!--
Defines if the channel should ignore some uncommon DTMF digits detected by
the board (A, B, C and D). This reduces the number of false positives which
may happen sometimes, without affecting correctness on traditional
scenarios. However, if you need to pass those digits througth the board,
you may need to set this option to 'no'.
(default = yes)
<param name="ignore-letter-dtmfs" value="yes"/>
-->
<!--
For KFXO series boards, defines if audio will be allowed being sent into
outgoing calls before it has been connected.
(default = yes)
<param name="fxo-send-pre-audio" value="yes"/>
-->
<!--
Defines the timeout, in seconds, between digits of a FXS board's extension.
(default = 7)
<param name="fxs-digit-timeout" value="7"/>
-->
<!--
Enables/Disables the action of dropping collect calls. If enabled, all
collect calls will be dropped no matter what KDropCollectCall is set to.
(default = no)
<param name="drop-collect-call" value="no"/>
-->
<!--
Defines if the activation and deactivation of Kommuter is done automatically by the channel,
or manually by the user. Possible values:
auto - Khomp channel driver starts all kommuter devices at initialization and stops them if the module is unloaded.
manual - The user must explicity call the CLI command < khomp kommuter on/off >, that starts or stops the kommuter devices connected to this machine.
(default = auto)
<param name="kommuter-activation" value="auto"/>
-->
<!--
Defines the default value for the Kommuter watchdog in seconds.
All kommuters conected to this machine will be initialized with this value,
and will commute the links after reaching this time with no response of the channel.
The minimum is 0 (will never commute the links), and maximum value is 255 seconds.
(default = 10)
<param name="kommuter-timeout" value="10"/>
-->
<!--
When adjusted to some DTMF digit sequence, it will define those as the digits
to be used to initialize a call transfer using PBX-to-PBX signaling.
(default = empty)
<param name="user-transfer-digits" value="#2"/>
-->
<!--
Defines the digits to be sent when the flash is detected.
<param name="flash-to-digits" value="*1"/>
-->
<!--
;;;;;;;;;;;;;;;;;;;; CONTEXTS WILDCARDS ;;;;;;;;;;;;;;;;;;;;;;
For incoming contexts, you can use the following wildcards:
'DD' (device number): the sequence number of the board on the
system (can be checked using "khomp summary", valid for all
board models);
'LL' (link number): the sequence number of link where the call
has arrived on the board. valid only for E1 boards.
'SSSS' (serial number): the serial number of the board (can
be checked using "khomp summary", and it's valid for all
board models);
'CC' (channel number): the channel number on which the call
or message has arrived (valid for FXO, FXS and GSM boards);
'CCC' (channel number): same as above, but valid only for E1
channels;
-->
</channels>
<!-- Section for configuring allocation groups. -->
<groups>
<!--
In this section, you should define options using the following syntax:
<groupname> = <allocation-string>[:<context>]
<param name="pstn" value="b0l0 + b1c38"/>
<param name="pstn" value="b0l0 + b1c38:from-pstn"/>
You may define your own groups. In the example above, the group
called pstn can be used in the bridge string as <action application="brigde" data="Khomp/Gpstn/..." />
or <action application="brigde" data="Khomp/Gpstn/..." />. As a result, the allocation string will be
replaced with the one associated with the group "pstn". This is the same
of doing <action application="brigde" data="Khomp/b0l0 + b1c38/... />.
In the second example, a context is also defined which can be used in
extensions.conf for inbound calls on that allocation string's range.
-->
</groups>
<!--
Section for configuring cadences used on FXS boards and the whole
channel (fast busy, ringback tones, etc).
-->
<cadences>
<!--
Default value for cadences. You may define your own cadences, and
also use them in the bridge arguments as "cadence=your_cadence_name".
"0,0" means a continuous dialtone.
(default as defined below)
<param name="fast-busy" value="100,100" />
<param name="ringback" value="1000,4000" />
<param name="pbx-dialtone" value="1000,100" />
<param name="vm-dialtone " value="1000,100,100,100" />
<param name="co-dialtone " value="0,0" />
-->
</cadences>
<!-- Section for configuring CALLERID's associated with FXS boards. -->
<fxs-branches>
<!--
In this section, you should define options using the following syntax:
'orig_prefix = serial number 0, serial number 1, ...'
ex: <param name="880" value="111,222"/>
In the example above (assuming KFXS-SPX boards 1234 and 4535), the
branches will be numbered from 800 to 829 in board 1234, and from
830 to 859 in board 4535.
-->
</fxs-branches>
<!-- Section for configuring FXS hotlines. -->
<fxs-hotlines>
<!--
In this section, you should define options using the following syntax:
'orig_prefix = destination_number'
ex: <param name="804" value="32332933" />
In the example above, the branch numbered 804 will call the number
3233-2933 (Khomp support number) every time the FXS branch goes off hook.
-->
</fxs-hotlines>
<!-- Section for configuring specific options for FXS branches. -->
<fxs-options>
<!--
In this section, you should define options using the following syntax:
orig_prefix = option1:value | option2:value | option3:value ...
ex: <param name="804" value="output-volume:+2" />
In the example above, the branch numbered 804 will have specific
configuration for default output volume set to +2.
Possible values to options is:
context, input-volume, output-volume language,
mohclass, amaflags, accountcode, calleridnum,
calleridname, mailbox, flash-to-digits.
-->
</fxs-options>
</settings>
</configuration>

View File

@ -0,0 +1,41 @@
MODNAME := mod_khomp
VERBOSE := 1
ifeq ($(strip $(FREESWITCH_PATH)),)
BASE := ../../../../
else
BASE := $(FREESWITCH_PATH)
endif
curr_dir := $(shell pwd)
versions := -DFS_VERSION_MAJOR=$(shell bash $(curr_dir)/tools/getversion.sh "SWITCH_VERSION_MAJOR" $(BASE)) -DFS_VERSION_MINOR=$(shell bash $(curr_dir)/tools/getversion.sh "SWITCH_VERSION_MINOR" $(BASE)) -DFS_VERSION_MICRO=$(shell bash $(curr_dir)/tools/getversion.sh "SWITCH_VERSION_MICRO" $(BASE))
LOCAL_CFLAGS = -I./ -I./include -I./commons -I./support -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DK3L_HOSTSYSTEM -DCOMMONS_LIBRARY_USING_FREESWITCH -g -ggdb #-DDEBUG_FLAGS
LOCAL_CFLAGS += $(versions)
LOCAL_LDFLAGS = -lk3l
LOCAL_OBJS = ./commons/k3lapi.o ./commons/k3lutil.o ./commons/config_options.o ./commons/format.o ./commons/strings.o ./commons/ringbuffer.o ./commons/verbose.o ./commons/saved_condition.o ./commons/regex.o ./commons/timer.o ./commons/configurator/configfile.o ./commons/configurator/option.o ./commons/configurator/section.o ./commons/configurator/restriction.o
LOCAL_OBJS += ./support/klog-config.o ./support/klog-options.o ./support/config_defaults.o
LOCAL_OBJS += ./src/globals.o ./src/opt.o ./src/frame.o ./src/utils.o ./src/lock.o ./src/spec.o ./src/applications.o ./src/khomp_pvt_fxo.o ./src/khomp_pvt_gsm.o ./src/khomp_pvt_kxe1.o ./src/khomp_pvt_passive.o ./src/khomp_pvt.o ./src/logger.o ./src/cli.o
conf_file_name := khomp.conf.xml
conf_file_dir := $(curr_dir)/Install/files
conf_file_dir_alt := $(curr_dir)/conf
conf_file_install = $(sysconfdir)/autoload_configs
include $(BASE)/build/modmake.rules
depend_install:
@echo "Copy $(conf_file_name)"
@if test -d $(conf_file_install) ; then \
if test -f $(conf_file_dir)/$(conf_file_name) ; then \
cp $(conf_file_dir)/$(conf_file_name) $(conf_file_install)/$(conf_file_name).new ;\
else \
cp $(conf_file_dir_alt)/$(conf_file_name) $(conf_file_install)/$(conf_file_name).new ;\
fi; \
if test ! -f "$(conf_file_install)/$(conf_file_name)" ; then \
mv $(conf_file_install)/$(conf_file_name).new $(conf_file_install)/$(conf_file_name) ;\
fi; \
fi;

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