diff --git a/.gitignore b/.gitignore
index 2923d395f4..2bdfb15d5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -227,3 +227,5 @@ libs/libsndfile/src/Symbols.gnu-binutils
libs/libsndfile/src/Symbols.static
libs/libsndfile/src/version-metadata.rc
libs/libsndfile/tests/pedantic-header-test.sh
+yum/RPMS
+yum/temp
diff --git a/build/moh_version.txt b/build/moh_version.txt
index 337a6a8f18..3e9c4a61ca 100644
--- a/build/moh_version.txt
+++ b/build/moh_version.txt
@@ -1 +1 @@
-1.0.8
\ No newline at end of file
+1.0.50
diff --git a/build/sounds_version.txt b/build/sounds_version.txt
index 68ecec5864..add0373413 100644
--- a/build/sounds_version.txt
+++ b/build/sounds_version.txt
@@ -1,4 +1,4 @@
-en-us-callie 1.0.25
-ru-RU-elena 1.0.13
+en-us-callie 1.0.50
+ru-RU-elena 1.0.50
fr-ca-june 1.0.18
diff --git a/conf/vanilla/autoload_configs/enum.conf.xml b/conf/vanilla/autoload_configs/enum.conf.xml
index b9813efa27..a8f6f52f85 100644
--- a/conf/vanilla/autoload_configs/enum.conf.xml
+++ b/conf/vanilla/autoload_configs/enum.conf.xml
@@ -14,8 +14,8 @@
-
-
-
+
+
+
diff --git a/conf/vanilla/dialplan/default.xml b/conf/vanilla/dialplan/default.xml
index 8971939ec2..1695159b36 100644
--- a/conf/vanilla/dialplan/default.xml
+++ b/conf/vanilla/dialplan/default.xml
@@ -508,7 +508,7 @@
After call is retrieved, park extension is free for another call.
-->
-
+
diff --git a/conf/vanilla/vars.xml b/conf/vanilla/vars.xml
index 28a6dc96fb..ff40fc7cfc 100644
--- a/conf/vanilla/vars.xml
+++ b/conf/vanilla/vars.xml
@@ -61,7 +61,7 @@
-
+
diff --git a/configure.ac b/configure.ac
index e698d4aa21..9a8c2191ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -601,6 +601,7 @@ if test x"$enable_core_pgsql_support" = x"yes" ; then
AC_MSG_RESULT([$POSTGRESQL_LIBDIR])
AC_DEFINE([SWITCH_HAVE_PGSQL], [1], [Define to 1 if PostgreSQL libraries are available])
+ AM_CONDITIONAL([HAVE_PGSQL],[true])
AC_DEFINE_UNQUOTED([POSTGRESQL_VERSION], "${POSTGRESQL_VERSION}", [Specifies the version of PostgreSQL we are linking against])
AC_DEFINE_UNQUOTED([POSTGRESQL_MAJOR_VERSION], ${POSTGRESQL_MAJOR_VERSION}, [Specifies the version of PostgreSQL we are linking against])
AC_DEFINE_UNQUOTED([POSTGRESQL_MINOR_VERSION], ${POSTGRESQL_MINOR_VERSION}, [Specifies the version of PostgreSQL we are linking against])
@@ -612,6 +613,8 @@ if test x"$enable_core_pgsql_support" = x"yes" ; then
SWITCH_AM_LDFLAGS="$POSTGRESQL_LDFLAGS $SWITCH_AM_LDFLAGS"
LIBS="$save_LIBS"
+else
+ AM_CONDITIONAL([HAVE_PGSQL],[false])
fi
AC_ARG_ENABLE(deprecated-core-db-events,
diff --git a/docs/SubmittingPatches b/docs/SubmittingPatches
index 16be7a2479..a7d2347aeb 100644
--- a/docs/SubmittingPatches
+++ b/docs/SubmittingPatches
@@ -7,6 +7,13 @@ Download the Source Code
git clone https://stash.freeswitch.org/scm/fs/freeswitch.git
cd freeswitch
+Ensure Git is Setup
+-------------------
+
+ # tell git your full name and email address; make sure to use your
+ # real name and not a username
+ ./scripts/setup-git.sh
+
Create Your Patch
-----------------
@@ -24,6 +31,9 @@ Create Your Patch
# logically separate change
#while true; do emacs .; git commit -va; done
+ # review changes; ensure your author name is correct
+ git log -p
+
# create patch files
git format-patch origin/master..HEAD
diff --git a/freeswitch-sounds-en-ca-june.spec b/freeswitch-sounds-en-ca-june.spec
new file mode 100644
index 0000000000..be7a76cb1e
--- /dev/null
+++ b/freeswitch-sounds-en-ca-june.spec
@@ -0,0 +1,318 @@
+##############################################################################
+# Copyright and license
+##############################################################################
+#
+# Spec file for package freeswitch-sounds-en-ca-june (version 1.0.50-1)
+#
+# Based on parts by Copyright (c) 2009 Patrick Laimbock
+# Copyright (c) 2014 FreeSWITCH.org
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+##############################################################################
+# Set variables
+##############################################################################
+
+%define version 1.0.50
+%define release 1
+
+%define fsname freeswitch
+# you could add a version number to be more strict
+
+%define PREFIX %{_prefix}
+%define EXECPREFIX %{_exec_prefix}
+%define BINDIR %{_bindir}
+%define SBINDIR %{_sbindir}
+%define LIBEXECDIR %{_libexecdir}/%{fsname}
+%define SYSCONFDIR %{_sysconfdir}/%{fsname}
+%define SHARESTATEDIR %{_sharedstatedir}/%{fsname}
+%define LOCALSTATEDIR %{_localstatedir}/lib/%{fsname}
+%define LIBDIR %{_libdir}
+%define INCLUDEDIR %{_includedir}
+%define _datarootdir %{_prefix}/share
+%define DATAROOTDIR %{_datarootdir}
+%define DATADIR %{_datadir}
+%define INFODIR %{_infodir}
+%define LOCALEDIR %{_datarootdir}/locale
+%define MANDIR %{_mandir}
+%define DOCDIR %{_defaultdocdir}/%{fsname}
+%define HTMLDIR %{_defaultdocdir}/%{fsname}/html
+%define DVIDIR %{_defaultdocdir}/%{fsname}/dvi
+%define PDFDIR %{_defaultdocdir}/%{fsname}/pdf
+%define PSDIR %{_defaultdocdir}/%{fsname}/ps
+%define LOGFILEDIR /var/log/%{fsname}
+%define MODINSTDIR %{_libdir}/%{fsname}/mod
+%define RUNDIR %{_localstatedir}/run/%{fsname}
+%define DBDIR %{LOCALSTATEDIR}/db
+%define HTDOCSDIR %{_datarootdir}/%{fsname}/htdocs
+%define SOUNDSDIR %{_datarootdir}/%{fsname}/sounds
+%define GRAMMARDIR %{_datarootdir}/%{fsname}/grammar
+%define SCRIPTDIR %{_datarootdir}/%{fsname}/scripts
+%define RECORDINGSDIR %{LOCALSTATEDIR}/recordings
+%define PKGCONFIGDIR %{_datarootdir}/%{fsname}/pkgconfig
+%define HOMEDIR %{LOCALSTATEDIR}
+
+
+
+
+
+##############################################################################
+# General
+##############################################################################
+
+Summary: FreeSWITCH fr-CA June prompts
+Name: freeswitch-sounds-en-ca-june
+Version: %{version}
+Release: %{release}%{?dist}
+License: MPL
+Group: Applications/Communications
+Packager: Ken Rice
+URL: http://www.freeswitch.org
+Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz
+Source1:http://files.freeswitch.org/%{name}-32000-%{version}.tar.gz
+Source2:http://files.freeswitch.org/%{name}-16000-%{version}.tar.gz
+Source3:http://files.freeswitch.org/%{name}-8000-%{version}.tar.gz
+BuildArch: noarch
+BuildRequires: sox
+Requires: freeswitch
+Requires: freeswitch-sounds-en-ca-june-48000
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%description
+FreeSWITCH 48kHz fr CA June prompts plus, during the installation,
+it will also install locally generated 8KHz, 16KHz and 32KHz prompts
+
+%package -n freeswitch-sounds-en-ca-june-8000
+Summary: FreeSWITCH 8kHz fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-en-ca-june-8000
+FreeSWITCH 8kHz fr CA June prompts
+
+%package -n freeswitch-sounds-en-ca-june-16000
+Summary: FreeSWITCH 16kHz fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-en-ca-june-16000
+FreeSWITCH 16kHz fr CA June prompts
+
+%package -n freeswitch-sounds-en-ca-june-32000
+Summary: FreeSWITCH 32kHz fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-en-ca-june-32000
+FreeSWITCH 32kHz fr CA June prompts
+
+%package -n freeswitch-sounds-en-ca-june-48000
+Summary: FreeSWITCH 48kHz fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-en-ca-june-48000
+FreeSWITCH 48kHz fr CA June prompts
+
+%package -n freeswitch-sounds-en-ca-june-all
+Summary: FreeSWITCH fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+Requires: freeswitch-sounds-en-ca-june-8000 = %{version}
+Requires: freeswitch-sounds-en-ca-june-16000 = %{version}
+Requires: freeswitch-sounds-en-ca-june-32000 = %{version}
+Requires: freeswitch-sounds-en-ca-june-48000 = %{version}
+
+%description -n freeswitch-sounds-en-ca-june-all
+FreeSWITCH Elena prompts package that pulls in the 8KHz, 16KHz, 32KHz and 48KHz RPMs
+
+##############################################################################
+# Prep
+##############################################################################
+
+%prep
+%setup -n en
+%setup -T -D -b 0 -n en
+%setup -T -D -b 1 -n en
+%setup -T -D -b 2 -n en
+%setup -T -D -b 3 -n en
+
+##############################################################################
+# Build
+##############################################################################
+
+%build
+# nothing to do here
+
+##############################################################################
+# Install
+##############################################################################
+
+%install
+[ "%{buildroot}" != '/' ] && rm -rf %{buildroot}
+
+# create the sounds directories
+%{__install} -d -m 0750 %{buildroot}%{SOUNDSDIR}/en/ca/june
+
+pushd ca/june
+# first install the 48KHz sounds
+%{__cp} -prv ./* %{buildroot}%{SOUNDSDIR}/en/ca/june
+popd
+
+##############################################################################
+# Clean
+##############################################################################
+
+%clean
+[ "%{buildroot}" != '/' ] && rm -rf %{buildroot}
+
+##############################################################################
+# Post
+##############################################################################
+
+%post
+
+##############################################################################
+# Postun
+##############################################################################
+
+%postun
+
+##############################################################################
+# Files
+##############################################################################
+
+%files
+%defattr(-,root,root)
+
+%files -n freeswitch-sounds-en-ca-june-8000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/ascii/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/base256/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/conference/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/currency/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/digits/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/directory/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/ivr/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/misc/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/phonetic-ascii/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/time/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/voicemail/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/zrtp/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/users/8000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/ascii/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/base256/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/conference/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/currency/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/digits/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/directory/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/ivr/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/misc/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/phonetic-ascii/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/time/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/voicemail/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/zrtp/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/users/8000/*.wav
+
+%files -n freeswitch-sounds-en-ca-june-16000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/ascii/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/base256/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/conference/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/currency/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/digits/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/directory/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/ivr/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/misc/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/phonetic-ascii/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/time/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/voicemail/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/zrtp/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/users/16000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/ascii/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/base256/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/conference/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/currency/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/digits/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/directory/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/ivr/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/misc/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/phonetic-ascii/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/time/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/voicemail/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/zrtp/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/users/16000/*.wav
+
+%files -n freeswitch-sounds-en-ca-june-32000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/ascii/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/base256/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/conference/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/currency/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/digits/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/directory/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/ivr/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/misc/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/phonetic-ascii/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/time/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/voicemail/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/zrtp/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/users/32000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/ascii/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/base256/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/conference/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/currency/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/digits/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/directory/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/ivr/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/misc/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/phonetic-ascii/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/time/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/voicemail/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/zrtp/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/users/32000/*.wav
+
+%files -n freeswitch-sounds-en-ca-june-48000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/ascii/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/base256/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/conference/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/currency/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/digits/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/directory/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/ivr/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/misc/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/phonetic-ascii/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/time/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/voicemail/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/zrtp/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/en/ca/june/users/48000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/ascii/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/base256/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/conference/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/currency/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/digits/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/directory/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/ivr/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/misc/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/phonetic-ascii/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/time/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/voicemail/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/zrtp/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/en/ca/june/users/48000/*.wav
+
+%files -n freeswitch-sounds-en-ca-june-all
+
+##############################################################################
+# Changelog
+##############################################################################
+
+%changelog
+* Fri Sep 12 2014 Ken Rice - 1.0.50-1
+- created out of the spec file for june
diff --git a/freeswitch-sounds-en-us-callie.spec b/freeswitch-sounds-en-us-callie.spec
index 68c79e42b6..9f81994a2c 100644
--- a/freeswitch-sounds-en-us-callie.spec
+++ b/freeswitch-sounds-en-us-callie.spec
@@ -20,8 +20,8 @@
# Set variables
##############################################################################
-%define version %{VERSION_NUMBER}
-%define release %{BUILD_NUMBER}
+%define version 1.0.50
+%define release 1
%define fsname freeswitch
# you could add a version number to be more strict
@@ -73,6 +73,9 @@ Group: Applications/Communications
Packager: Patrick Laimbock
URL: http://www.freeswitch.org
Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz
+Source1:http://files.freeswitch.org/%{name}-32000-%{version}.tar.gz
+Source2:http://files.freeswitch.org/%{name}-16000-%{version}.tar.gz
+Source3:http://files.freeswitch.org/%{name}-8000-%{version}.tar.gz
BuildArch: noarch
BuildRequires: sox
Requires: freeswitch
@@ -139,25 +142,11 @@ FreeSWITCH Callie prompts package that pulls in the 8KHz, 16KHz,
##############################################################################
%prep
-%setup -b0 -q -n en
-mkdir -p ./usr/callie
-# create buildsounds-callie.sh script in working dir
-echo '#!/bin/bash
-
-sounds_location=$1
-for rate in 32000 16000 8000
-do
- for i in ascii base256 conference currency digits directory ivr misc phonetic-ascii time voicemail zrtp
- do
- mkdir -p $sounds_location/$i/$rate
- for f in `find $sounds_location/$i/48000 -name \*.wav`
- do
- echo "generating" $sounds_location/$i/$rate/`basename $f`
- sox $f -r $rate $sounds_location/$i/$rate/`basename $f`
- done
- done
-done' > ./us/callie/buildsounds-callie.sh
-%{__chmod} 0750 ./us/callie/buildsounds-callie.sh
+%setup -n en
+%setup -T -D -b 0 -n en
+%setup -T -D -b 1 -n en
+%setup -T -D -b 2 -n en
+%setup -T -D -b 3 -n en
##############################################################################
# Build
@@ -180,7 +169,6 @@ pushd us/callie
# first install the 48KHz sounds
%{__cp} -prv ./* %{buildroot}%{SOUNDSDIR}/en/us/callie
# now resample the 48KHz ones to 8KHz, 16KHz and 32KHz
-./buildsounds-callie.sh %{buildroot}%{SOUNDSDIR}/en/us/callie
popd
##############################################################################
@@ -196,8 +184,6 @@ popd
%post
# generate the 8KHz, 16KHz and 32KHz prompts from the 48KHz ones
-cd %{SOUNDSDIR}/en/us/callie
-./buildsounds-callie.sh %{SOUNDSDIR}/en/us/callie
##############################################################################
# Postun
@@ -214,7 +200,6 @@ cd %{SOUNDSDIR}/en/us/callie
%files
%defattr(-,root,root)
-%attr(0750,freeswitch,daemon) %{SOUNDSDIR}/en/us/callie/buildsounds-callie.sh
%files -n freeswitch-sounds-en-us-callie-8000
%defattr(-,root,root,-)
diff --git a/freeswitch-sounds-fr-ca-june.spec b/freeswitch-sounds-fr-ca-june.spec
new file mode 100644
index 0000000000..6547c2d37a
--- /dev/null
+++ b/freeswitch-sounds-fr-ca-june.spec
@@ -0,0 +1,326 @@
+##############################################################################
+# Copyright and license
+##############################################################################
+#
+# Spec file for package freeswitch-sounds-fr-ca-june (version 1.0.50-1)
+#
+# Based on parts by Copyright (c) 2009 Patrick Laimbock
+# Copyright (c) 2014 FreeSWITCH.org
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+##############################################################################
+# Set variables
+##############################################################################
+
+%define version 1.0.50
+%define release 1
+
+%define fsname freeswitch
+# you could add a version number to be more strict
+
+%define PREFIX %{_prefix}
+%define EXECPREFIX %{_exec_prefix}
+%define BINDIR %{_bindir}
+%define SBINDIR %{_sbindir}
+%define LIBEXECDIR %{_libexecdir}/%{fsname}
+%define SYSCONFDIR %{_sysconfdir}/%{fsname}
+%define SHARESTATEDIR %{_sharedstatedir}/%{fsname}
+%define LOCALSTATEDIR %{_localstatedir}/lib/%{fsname}
+%define LIBDIR %{_libdir}
+%define INCLUDEDIR %{_includedir}
+%define _datarootdir %{_prefix}/share
+%define DATAROOTDIR %{_datarootdir}
+%define DATADIR %{_datadir}
+%define INFODIR %{_infodir}
+%define LOCALEDIR %{_datarootdir}/locale
+%define MANDIR %{_mandir}
+%define DOCDIR %{_defaultdocdir}/%{fsname}
+%define HTMLDIR %{_defaultdocdir}/%{fsname}/html
+%define DVIDIR %{_defaultdocdir}/%{fsname}/dvi
+%define PDFDIR %{_defaultdocdir}/%{fsname}/pdf
+%define PSDIR %{_defaultdocdir}/%{fsname}/ps
+%define LOGFILEDIR /var/log/%{fsname}
+%define MODINSTDIR %{_libdir}/%{fsname}/mod
+%define RUNDIR %{_localstatedir}/run/%{fsname}
+%define DBDIR %{LOCALSTATEDIR}/db
+%define HTDOCSDIR %{_datarootdir}/%{fsname}/htdocs
+%define SOUNDSDIR %{_datarootdir}/%{fsname}/sounds
+%define GRAMMARDIR %{_datarootdir}/%{fsname}/grammar
+%define SCRIPTDIR %{_datarootdir}/%{fsname}/scripts
+%define RECORDINGSDIR %{LOCALSTATEDIR}/recordings
+%define PKGCONFIGDIR %{_datarootdir}/%{fsname}/pkgconfig
+%define HOMEDIR %{LOCALSTATEDIR}
+
+
+
+
+
+##############################################################################
+# General
+##############################################################################
+
+Summary: FreeSWITCH fr-CA June prompts
+Name: freeswitch-sounds-fr-ca-june
+Version: %{version}
+Release: %{release}%{?dist}
+License: MPL
+Group: Applications/Communications
+Packager: Ken Rice
+URL: http://www.freeswitch.org
+Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz
+Source1:http://files.freeswitch.org/%{name}-32000-%{version}.tar.gz
+Source2:http://files.freeswitch.org/%{name}-16000-%{version}.tar.gz
+Source3:http://files.freeswitch.org/%{name}-8000-%{version}.tar.gz
+BuildArch: noarch
+BuildRequires: sox
+Requires: freeswitch
+Requires: freeswitch-sounds-fr-ca-june-48000
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%description
+FreeSWITCH 48kHz fr CA June prompts plus, during the installation,
+it will also install locally generated 8KHz, 16KHz and 32KHz prompts
+
+%package -n freeswitch-sounds-fr-ca-june-8000
+Summary: FreeSWITCH 8kHz fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-fr-ca-june-8000
+FreeSWITCH 8kHz fr CA June prompts
+
+%package -n freeswitch-sounds-fr-ca-june-16000
+Summary: FreeSWITCH 16kHz fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-fr-ca-june-16000
+FreeSWITCH 16kHz fr CA June prompts
+
+%package -n freeswitch-sounds-fr-ca-june-32000
+Summary: FreeSWITCH 32kHz fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-fr-ca-june-32000
+FreeSWITCH 32kHz fr CA June prompts
+
+%package -n freeswitch-sounds-fr-ca-june-48000
+Summary: FreeSWITCH 48kHz fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-fr-ca-june-48000
+FreeSWITCH 48kHz fr CA June prompts
+
+%package -n freeswitch-sounds-fr-ca-june-all
+Summary: FreeSWITCH fr CA June prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+Requires: freeswitch-sounds-fr-ca-june-8000 = %{version}
+Requires: freeswitch-sounds-fr-ca-june-16000 = %{version}
+Requires: freeswitch-sounds-fr-ca-june-32000 = %{version}
+Requires: freeswitch-sounds-fr-ca-june-48000 = %{version}
+
+%description -n freeswitch-sounds-fr-ca-june-all
+FreeSWITCH Elena prompts package that pulls in the 8KHz, 16KHz, 32KHz and 48KHz RPMs
+
+##############################################################################
+# Prep
+##############################################################################
+
+%prep
+%setup -n fr
+%setup -T -D -b 0 -n fr
+%setup -T -D -b 1 -n fr
+%setup -T -D -b 2 -n fr
+%setup -T -D -b 3 -n fr
+
+##############################################################################
+# Build
+##############################################################################
+
+%build
+# nothing to do here
+
+##############################################################################
+# Install
+##############################################################################
+
+%install
+[ "%{buildroot}" != '/' ] && rm -rf %{buildroot}
+
+# create the sounds directories
+%{__install} -d -m 0750 %{buildroot}%{SOUNDSDIR}/fr/ca/june
+
+pushd ca/june
+# first install the 48KHz sounds
+%{__cp} -prv ./* %{buildroot}%{SOUNDSDIR}/fr/ca/june
+popd
+
+##############################################################################
+# Clean
+##############################################################################
+
+%clean
+[ "%{buildroot}" != '/' ] && rm -rf %{buildroot}
+
+##############################################################################
+# Post
+##############################################################################
+
+%post
+
+##############################################################################
+# Postun
+##############################################################################
+
+%postun
+
+##############################################################################
+# Files
+##############################################################################
+
+%files
+%defattr(-,root,root)
+
+%files -n freeswitch-sounds-fr-ca-june-8000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/ascii/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/base256/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/conference/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/currency/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/digits/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/directory/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/extra-attempt-record/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/ivr/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/misc/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/phonetic-ascii/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/time/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/voicemail/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/zrtp/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/users/8000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/ascii/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/base256/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/conference/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/currency/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/digits/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/directory/8000/*.wav
+%attr(0750,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/extra-attempt-record/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/ivr/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/misc/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/phonetic-ascii/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/time/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/voicemail/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/zrtp/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/users/8000/*.wav
+
+%files -n freeswitch-sounds-fr-ca-june-16000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/ascii/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/base256/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/conference/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/currency/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/digits/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/directory/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/extra-attempt-record/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/ivr/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/misc/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/phonetic-ascii/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/time/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/voicemail/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/zrtp/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/users/16000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/ascii/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/base256/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/conference/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/currency/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/digits/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/directory/16000/*.wav
+%attr(0750,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/extra-attempt-record/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/ivr/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/misc/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/phonetic-ascii/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/time/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/voicemail/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/zrtp/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/users/16000/*.wav
+
+%files -n freeswitch-sounds-fr-ca-june-32000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/ascii/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/base256/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/conference/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/currency/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/digits/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/directory/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/extra-attempt-record/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/ivr/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/misc/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/phonetic-ascii/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/time/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/voicemail/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/zrtp/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/users/32000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/ascii/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/base256/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/conference/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/currency/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/digits/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/directory/32000/*.wav
+%attr(0750,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/extra-attempt-record/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/ivr/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/misc/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/phonetic-ascii/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/time/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/voicemail/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/zrtp/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/users/32000/*.wav
+
+%files -n freeswitch-sounds-fr-ca-june-48000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/ascii/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/base256/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/conference/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/currency/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/digits/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/directory/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/extra-attempt-record/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/ivr/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/misc/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/phonetic-ascii/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/time/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/voicemail/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/zrtp/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/fr/ca/june/users/48000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/ascii/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/base256/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/conference/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/currency/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/digits/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/directory/48000/*.wav
+%attr(0750,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/extra-attempt-record/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/ivr/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/misc/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/phonetic-ascii/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/time/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/voicemail/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/zrtp/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/fr/ca/june/users/48000/*.wav
+
+%files -n freeswitch-sounds-fr-ca-june-all
+
+##############################################################################
+# Changelog
+##############################################################################
+
+%changelog
+* Fri Sep 12 2014 Ken Rice - 1.0.50-1
+- created out of the spec file for june
diff --git a/freeswitch-sounds-music.spec b/freeswitch-sounds-music.spec
index 520a7dddfe..7e06e63883 100644
--- a/freeswitch-sounds-music.spec
+++ b/freeswitch-sounds-music.spec
@@ -35,7 +35,7 @@
Summary: FreeSWITCH Music on Hold soundfiles
Name: freeswitch-sounds-music
-Version: 1.0.8
+Version: 1.0.50
Release: 2%{?dist}
License: MPL
Group: Productivity/Telephony/Servers
diff --git a/freeswitch-sounds-pt-BR-karina.spec b/freeswitch-sounds-pt-BR-karina.spec
new file mode 100644
index 0000000000..81c85625b2
--- /dev/null
+++ b/freeswitch-sounds-pt-BR-karina.spec
@@ -0,0 +1,318 @@
+##############################################################################
+# Copyright and license
+##############################################################################
+#
+# Spec file for package freeswitch-sounds-pt-BR-karina (version 1.0.50-1)
+#
+# Based on parts by Copyright (c) 2009 Patrick Laimbock
+# Copyright (c) 2014 FreeSWITCH.org
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+##############################################################################
+# Set variables
+##############################################################################
+
+%define version 1.0.50
+%define release 1
+
+%define fsname freeswitch
+# you could add a version number to be more strict
+
+%define PREFIX %{_prefix}
+%define EXECPREFIX %{_exec_prefix}
+%define BINDIR %{_bindir}
+%define SBINDIR %{_sbindir}
+%define LIBEXECDIR %{_libexecdir}/%{fsname}
+%define SYSCONFDIR %{_sysconfdir}/%{fsname}
+%define SHARESTATEDIR %{_sharedstatedir}/%{fsname}
+%define LOCALSTATEDIR %{_localstatedir}/lib/%{fsname}
+%define LIBDIR %{_libdir}
+%define INCLUDEDIR %{_includedir}
+%define _datarootdir %{_prefix}/share
+%define DATAROOTDIR %{_datarootdir}
+%define DATADIR %{_datadir}
+%define INFODIR %{_infodir}
+%define LOCALEDIR %{_datarootdir}/locale
+%define MANDIR %{_mandir}
+%define DOCDIR %{_defaultdocdir}/%{fsname}
+%define HTMLDIR %{_defaultdocdir}/%{fsname}/html
+%define DVIDIR %{_defaultdocdir}/%{fsname}/dvi
+%define PDFDIR %{_defaultdocdir}/%{fsname}/pdf
+%define PSDIR %{_defaultdocdir}/%{fsname}/ps
+%define LOGFILEDIR /var/log/%{fsname}
+%define MODINSTDIR %{_libdir}/%{fsname}/mod
+%define RUNDIR %{_localstatedir}/run/%{fsname}
+%define DBDIR %{LOCALSTATEDIR}/db
+%define HTDOCSDIR %{_datarootdir}/%{fsname}/htdocs
+%define SOUNDSDIR %{_datarootdir}/%{fsname}/sounds
+%define GRAMMARDIR %{_datarootdir}/%{fsname}/grammar
+%define SCRIPTDIR %{_datarootdir}/%{fsname}/scripts
+%define RECORDINGSDIR %{LOCALSTATEDIR}/recordings
+%define PKGCONFIGDIR %{_datarootdir}/%{fsname}/pkgconfig
+%define HOMEDIR %{LOCALSTATEDIR}
+
+
+
+
+
+##############################################################################
+# General
+##############################################################################
+
+Summary: FreeSWITCH pt-BR Karina prompts
+Name: freeswitch-sounds-pt-BR-karina
+Version: %{version}
+Release: %{release}%{?dist}
+License: MPL
+Group: Applications/Communications
+Packager: Ken Rice
+URL: http://www.freeswitch.org
+Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz
+Source1:http://files.freeswitch.org/%{name}-32000-%{version}.tar.gz
+Source2:http://files.freeswitch.org/%{name}-16000-%{version}.tar.gz
+Source3:http://files.freeswitch.org/%{name}-8000-%{version}.tar.gz
+BuildArch: noarch
+BuildRequires: sox
+Requires: freeswitch
+Requires: freeswitch-sounds-pt-BR-karina-48000
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%description
+FreeSWITCH 48kHz fr BR Karina prompts plus, during the installation,
+it will also install locally generated 8KHz, 16KHz and 32KHz prompts
+
+%package -n freeswitch-sounds-pt-BR-karina-8000
+Summary: FreeSWITCH 8kHz fr BR Karina prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-pt-BR-karina-8000
+FreeSWITCH 8kHz fr BR Karina prompts
+
+%package -n freeswitch-sounds-pt-BR-karina-16000
+Summary: FreeSWITCH 16kHz fr BR Karina prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-pt-BR-karina-16000
+FreeSWITCH 16kHz fr BR Karina prompts
+
+%package -n freeswitch-sounds-pt-BR-karina-32000
+Summary: FreeSWITCH 32kHz fr BR Karina prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-pt-BR-karina-32000
+FreeSWITCH 32kHz fr BR Karina prompts
+
+%package -n freeswitch-sounds-pt-BR-karina-48000
+Summary: FreeSWITCH 48kHz fr BR Karina prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+
+%description -n freeswitch-sounds-pt-BR-karina-48000
+FreeSWITCH 48kHz fr BR Karina prompts
+
+%package -n freeswitch-sounds-pt-BR-karina-all
+Summary: FreeSWITCH fr BR Karina prompts
+Group: Applications/Communications
+BuildArch: noarch
+Requires: %{fsname}
+Requires: freeswitch-sounds-pt-BR-karina-8000 = %{version}
+Requires: freeswitch-sounds-pt-BR-karina-16000 = %{version}
+Requires: freeswitch-sounds-pt-BR-karina-32000 = %{version}
+Requires: freeswitch-sounds-pt-BR-karina-48000 = %{version}
+
+%description -n freeswitch-sounds-pt-BR-karina-all
+FreeSWITCH Elena prompts package that pulls in the 8KHz, 16KHz, 32KHz and 48KHz RPMs
+
+##############################################################################
+# Prep
+##############################################################################
+
+%prep
+%setup -n pt
+%setup -T -D -b 0 -n pt
+%setup -T -D -b 1 -n pt
+%setup -T -D -b 2 -n pt
+%setup -T -D -b 3 -n pt
+
+##############################################################################
+# Build
+##############################################################################
+
+%build
+# nothing to do here
+
+##############################################################################
+# Install
+##############################################################################
+
+%install
+[ "%{buildroot}" != '/' ] && rm -rf %{buildroot}
+
+# create the sounds directories
+%{__install} -d -m 0750 %{buildroot}%{SOUNDSDIR}/pt/BR/karina
+
+pushd BR/karina
+# first install the 48KHz sounds
+%{__cp} -prv ./* %{buildroot}%{SOUNDSDIR}/pt/BR/karina
+popd
+
+##############################################################################
+# Clean
+##############################################################################
+
+%clean
+[ "%{buildroot}" != '/' ] && rm -rf %{buildroot}
+
+##############################################################################
+# Post
+##############################################################################
+
+%post
+
+##############################################################################
+# Postun
+##############################################################################
+
+%postun
+
+##############################################################################
+# Files
+##############################################################################
+
+%files
+%defattr(-,root,root)
+
+%files -n freeswitch-sounds-pt-BR-karina-8000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/ascii/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/base256/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/conference/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/currency/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/digits/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/directory/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/ivr/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/misc/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/phonetic-ascii/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/time/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/voicemail/8000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/zrtp/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/users/8000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/ascii/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/base256/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/conference/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/currency/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/digits/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/directory/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/ivr/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/misc/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/phonetic-ascii/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/time/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/voicemail/8000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/zrtp/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/users/8000/*.wav
+
+%files -n freeswitch-sounds-pt-BR-karina-16000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/ascii/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/base256/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/conference/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/currency/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/digits/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/directory/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/ivr/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/misc/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/phonetic-ascii/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/time/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/voicemail/16000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/zrtp/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/users/16000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/ascii/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/base256/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/conference/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/currency/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/digits/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/directory/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/ivr/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/misc/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/phonetic-ascii/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/time/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/voicemail/16000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/zrtp/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/users/16000/*.wav
+
+%files -n freeswitch-sounds-pt-BR-karina-32000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/ascii/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/base256/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/conference/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/currency/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/digits/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/directory/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/ivr/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/misc/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/phonetic-ascii/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/time/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/voicemail/32000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/zrtp/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/users/32000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/ascii/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/base256/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/conference/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/currency/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/digits/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/directory/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/ivr/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/misc/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/phonetic-ascii/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/time/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/voicemail/32000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/zrtp/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/users/32000/*.wav
+
+%files -n freeswitch-sounds-pt-BR-karina-48000
+%defattr(-,root,root,-)
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/ascii/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/base256/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/conference/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/currency/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/digits/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/directory/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/ivr/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/misc/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/phonetic-ascii/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/time/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/voicemail/48000
+%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/zrtp/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/pt/BR/karina/users/48000
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/ascii/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/base256/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/conference/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/currency/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/digits/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/directory/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/ivr/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/misc/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/phonetic-ascii/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/time/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/voicemail/48000/*.wav
+%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/zrtp/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/pt/BR/karina/users/48000/*.wav
+
+%files -n freeswitch-sounds-pt-BR-karina-all
+
+##############################################################################
+# Changelog
+##############################################################################
+
+%changelog
+* Fri Sep 12 2014 Ken Rice - 1.0.50-1
+- created out of the spec file for june
diff --git a/freeswitch-sounds-ru-RU-elena.spec b/freeswitch-sounds-ru-RU-elena.spec
index 99e913b4d3..d3dffe197c 100644
--- a/freeswitch-sounds-ru-RU-elena.spec
+++ b/freeswitch-sounds-ru-RU-elena.spec
@@ -14,14 +14,14 @@
# Determine distribution
##############################################################################
-%define is_rhel5 %(test -f /etc/redhat-release && egrep -q 'release 5' /etc/redhat-release && echo 1 || echo 0)
+#%define is_rhel5 %(test -f /etc/redhat-release && egrep -q 'release 5' /etc/redhat-release && echo 1 || echo 0)
##############################################################################
# Set variables
##############################################################################
-%define version %{VERSION_NUMBER}
-%define release %{BUILD_NUMBER}
+%define version 1.0.50
+%define release 1
%define fsname freeswitch
# you could add a version number to be more strict
@@ -76,6 +76,9 @@ Group: Applications/Communications
Packager: Michal Bielicki
URL: http://www.freeswitch.org
Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz
+Source1:http://files.freeswitch.org/%{name}-32000-%{version}.tar.gz
+Source2:http://files.freeswitch.org/%{name}-16000-%{version}.tar.gz
+Source3:http://files.freeswitch.org/%{name}-8000-%{version}.tar.gz
BuildArch: noarch
BuildRequires: sox
Requires: freeswitch
@@ -140,25 +143,11 @@ FreeSWITCH Elena prompts package that pulls in the 8KHz, 16KHz, 32KHz and 48KHz
##############################################################################
%prep
-%setup -b0 -q -n ru
-mkdir -p ./RU/elena
-# create buildsounds-elena.sh script in working dir
-echo '#!/bin/bash
-
-sounds_location=$1
-for rate in 32000 16000 8000
-do
- for i in ascii base256 conference currency digits directory ivr misc phonetic-ascii time voicemail zrtp users
- do
- mkdir -p $sounds_location/$i/$rate
- for f in `find $sounds_location/$i/48000 -name \*.wav`
- do
- echo "generating" $sounds_location/$i/$rate/`basename $f`
- sox $f -r $rate $sounds_location/$i/$rate/`basename $f`
- done
- done
-done' > ./RU/elena/buildsounds-elena.sh
-%{__chmod} 0750 ./RU/elena/buildsounds-elena.sh
+%setup -n ru
+%setup -T -D -b 0 -n ru
+%setup -T -D -b 1 -n ru
+%setup -T -D -b 2 -n ru
+%setup -T -D -b 3 -n ru
##############################################################################
# Build
@@ -180,8 +169,6 @@ done' > ./RU/elena/buildsounds-elena.sh
pushd RU/elena
# first install the 48KHz sounds
%{__cp} -prv ./* %{buildroot}%{SOUNDSDIR}/ru/RU/elena
-# now resample the 48KHz ones to 8KHz, 16KHz and 32KHz
-./buildsounds-elena.sh %{buildroot}%{SOUNDSDIR}/ru/RU/elena
popd
##############################################################################
@@ -196,18 +183,12 @@ popd
##############################################################################
%post
-# generate the 8KHz, 16KHz and 32KHz prompts from the 48KHz ones
-cd %{SOUNDSDIR}/ru/RU/elena
-./buildsounds-elena.sh %{SOUNDSDIR}/ru/RU/elena
##############################################################################
# Postun
##############################################################################
%postun
-# you could check if there are sound files in 8000/ or
-# 16000/ or 32000/ and remove them *only* if the files
-# do not belong to an rpm
##############################################################################
# Files
@@ -215,7 +196,6 @@ cd %{SOUNDSDIR}/ru/RU/elena
%files
%defattr(-,root,root)
-%attr(0750,freeswitch,daemon) %{SOUNDSDIR}/ru/RU/elena/buildsounds-elena.sh
%files -n freeswitch-sounds-ru-RU-elena-8000
%defattr(-,root,root,-)
@@ -340,6 +320,8 @@ cd %{SOUNDSDIR}/ru/RU/elena
##############################################################################
%changelog
+* Fri Sep 12 2014 Ken Rice - 1.0.50-1
+- created out of the spec file for elena
* Mon Mar 06 2012 Ken Rice - 1.0.13-2
- created out of the spec file for elena
* Mon Jul 11 2011 Michal Bielicki - 1.0.13-1
diff --git a/freeswitch-sounds-sv-se-jakob.spec b/freeswitch-sounds-sv-se-jakob.spec
index 06f91becb7..16c4b45635 100644
--- a/freeswitch-sounds-sv-se-jakob.spec
+++ b/freeswitch-sounds-sv-se-jakob.spec
@@ -5,24 +5,18 @@
# Spec file for package freeswitch-sounds-sv-se-jakob (version 1.0.18-1)
#
# Copyright (c) 2009 Patrick Laimbock
-# Some fixes and additions (c) 2011 Michal Bielicki
# Copied and modified for mod_say_sv (c) 2013 Jakob Sundberg
+# Additional changes (c) 2014 Ken Rice
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-##############################################################################
-# Determine distribution
-##############################################################################
-
-# %define is_rhel5 %(test -f /etc/redhat-release && egrep -q 'release 5' /etc/redhat-release && echo 1 || echo 0)
-
##############################################################################
# Set variables
##############################################################################
-%define version %{VERSION_NUMBER}
-%define release %{BUILD_NUMBER}
+%define version 1.0.50
+%define release 1
%define fsname freeswitch
# you could add a version number to be more strict
@@ -71,9 +65,12 @@ Version: %{version}
Release: %{release}%{?dist}
License: MPL
Group: Applications/Communications
-Packager: Patrick Laimbock
+Packager: Ken Rice
URL: http://www.freeswitch.org
-Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.bz2
+Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz
+Source1:http://files.freeswitch.org/%{name}-32000-%{version}.tar.gz
+Source2:http://files.freeswitch.org/%{name}-16000-%{version}.tar.gz
+Source3:http://files.freeswitch.org/%{name}-8000-%{version}.tar.gz
BuildArch: noarch
BuildRequires: sox
Requires: freeswitch
@@ -140,25 +137,11 @@ FreeSWITCH jakob prompts package that pulls in the 8KHz, 16KHz,
##############################################################################
%prep
-%setup -b0 -q -n en
-mkdir -p ./usr/jakob
-# create buildsounds-jakob.sh script in working dir
-echo '#!/bin/bash
-
-sounds_location=$1
-for rate in 32000 16000 8000
-do
- for i in ascii base256 conference currency digits directory ivr misc phonetic-ascii time voicemail zrtp
- do
- mkdir -p $sounds_location/$i/$rate
- for f in `find $sounds_location/$i/48000 -name \*.wav`
- do
- echo "generating" $sounds_location/$i/$rate/`basename $f`
- sox $f -r $rate $sounds_location/$i/$rate/`basename $f`
- done
- done
-done' > ./sv/jakob/buildsounds-jakob.sh
-%{__chmod} 0750 ./sv/jakob/buildsounds-jakob.sh
+%setup -n sv
+%setup -T -D -b 0 -n sv
+%setup -T -D -b 1 -n sv
+%setup -T -D -b 2 -n sv
+%setup -T -D -b 3 -n sv
##############################################################################
# Build
@@ -177,11 +160,9 @@ done' > ./sv/jakob/buildsounds-jakob.sh
# create the sounds directories
%{__install} -d -m 0750 %{buildroot}%{SOUNDSDIR}/sv/se/jakob
-pushd sv/jakob
+pushd se/jakob
# first install the 48KHz sounds
%{__cp} -prv ./* %{buildroot}%{SOUNDSDIR}/sv/se/jakob
-# now resample the 48KHz ones to 8KHz, 16KHz and 32KHz
-./buildsounds-jakob.sh %{buildroot}%{SOUNDSDIR}/sv/se/jakob
popd
##############################################################################
@@ -196,9 +177,6 @@ popd
##############################################################################
%post
-# generate the 8KHz, 16KHz and 32KHz prompts from the 48KHz ones
-cd %{SOUNDSDIR}/sv/se/jakob
-./buildsounds-jakob.sh %{SOUNDSDIR}/sv/se/jakob
##############################################################################
# Postun
@@ -215,115 +193,114 @@ cd %{SOUNDSDIR}/sv/se/jakob
%files
%defattr(-,root,root)
-%attr(0750,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/buildsounds-jakob.sh
%files -n freeswitch-sounds-sv-se-jakob-8000
%defattr(-,root,root,-)
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ascii/8000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/base256/8000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/conference/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/base256/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/conference/8000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/currency/8000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/digits/8000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/directory/8000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ivr/8000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/misc/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/directory/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ivr/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/misc/8000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/phonetic-ascii/8000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/time/8000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/voicemail/8000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/zrtp/8000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/zrtp/8000
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ascii/8000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/base256/8000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/conference/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/base256/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/conference/8000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/currency/8000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/digits/8000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/directory/8000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ivr/8000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/misc/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/directory/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ivr/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/misc/8000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/phonetic-ascii/8000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/time/8000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/voicemail/8000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/zrtp/8000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/zrtp/8000/*.wav
%files -n freeswitch-sounds-sv-se-jakob-16000
%defattr(-,root,root,-)
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ascii/16000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/base256/16000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/conference/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/base256/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/conference/16000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/currency/16000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/digits/16000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/directory/16000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ivr/16000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/misc/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/directory/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ivr/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/misc/16000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/phonetic-ascii/16000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/time/16000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/voicemail/16000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/zrtp/16000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/zrtp/16000
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ascii/16000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/base256/16000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/conference/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/base256/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/conference/16000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/currency/16000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/digits/16000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/directory/16000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ivr/16000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/misc/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/directory/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ivr/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/misc/16000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/phonetic-ascii/16000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/time/16000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/voicemail/16000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/zrtp/16000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/zrtp/16000/*.wav
%files -n freeswitch-sounds-sv-se-jakob-32000
%defattr(-,root,root,-)
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ascii/32000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/base256/32000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/conference/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/base256/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/conference/32000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/currency/32000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/digits/32000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/directory/32000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ivr/32000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/misc/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/directory/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ivr/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/misc/32000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/phonetic-ascii/32000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/time/32000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/voicemail/32000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/zrtp/32000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/zrtp/32000
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ascii/32000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/base256/32000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/conference/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/base256/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/conference/32000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/currency/32000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/digits/32000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/directory/32000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ivr/32000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/misc/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/directory/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ivr/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/misc/32000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/phonetic-ascii/32000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/time/32000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/voicemail/32000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/zrtp/32000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/zrtp/32000/*.wav
%files -n freeswitch-sounds-sv-se-jakob-48000
%defattr(-,root,root,-)
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ascii/48000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/base256/48000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/conference/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/base256/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/conference/48000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/currency/48000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/digits/48000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/directory/48000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ivr/48000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/misc/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/directory/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/ivr/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/misc/48000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/phonetic-ascii/48000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/time/48000
%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/voicemail/48000
-%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/zrtp/48000
+#%attr(0750,freeswitch,daemon) %dir %{SOUNDSDIR}/sv/se/jakob/zrtp/48000
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ascii/48000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/base256/48000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/conference/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/base256/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/conference/48000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/currency/48000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/digits/48000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/directory/48000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ivr/48000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/misc/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/directory/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/ivr/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/misc/48000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/phonetic-ascii/48000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/time/48000/*.wav
%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/voicemail/48000/*.wav
-%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/zrtp/48000/*.wav
+#%attr(0640,freeswitch,daemon) %{SOUNDSDIR}/sv/se/jakob/zrtp/48000/*.wav
%files -n freeswitch-sounds-sv-se-jakob-all
@@ -332,46 +309,5 @@ cd %{SOUNDSDIR}/sv/se/jakob
##############################################################################
%changelog
-* Sun Mar 05 2012 Ken Rice - 1.0.18-1
-- update to FHS Layout for FreeSWITCH
-- bump up version
-* Sun May 22 2011 Michal Bielicki - 1.0.16-1
-- bump up version
-* Tue Jan 18 2011 Michal Bielicki - 1.0.14-1
-- bump up version
-- include script into freeswitch core
-- include specfile into freeswitch core
-- runtime does not require sox, only building
-
-* Thu Dec 17 2009 Patrick Laimbock - 1.0.12-8
-- update perms and user/group to sync with the old situation
-
-* Wed Dec 16 2009 Patrick Laimbock - 1.0.12-7
-- make main package require freeswitch-sounds-sv-se-jakob-48000 and
-- generate the 8KHz, 16KHz and 32KHz sounds from there
-- add license to spec file
-
-* Wed Dec 16 2009 Patrick Laimbock - 1.0.12-5
-- put 48KHz in a separate package and let the main package Require 48KHz
-- and then use the script to generate the 8KHz, 16KHz and 32KHz sounds
-
-* Wed Dec 16 2009 Patrick Laimbock - 1.0.12-4
-- add freeswitch-sounds-sv-se-jakob-all package that pulls in the 8KHz,
-- 16KHz, 32KHz and 48KHz RPM packages
-
-* Tue Dec 15 2009 Patrick Laimbock - 1.0.12-3
-- override subpackage name with -n so it no longer builds an empty main RPM
-- rework spec file
-- add sox as a requirement
-- run buildsounds-jakob.sh in post to generate 8KHz, 16KHz and 32KHz prompts
-
-* Tue Dec 15 2009 Patrick Laimbock - 1.0.12-2
-- can't override Name in subpackage so put all versions in RPM subpackages
-- with an empty main RPM package
-
-* Tue Dec 15 2009 Patrick Laimbock - 1.0.12-1
-- create spec file with the following requirement:
-- source only contains the 48KHz sound prompts
-- during build the 48KHz sound prompts are resampled to 8KHz, 16KHz and 32KHz
-- the 8KHz, 16KHz, 32KHz and 48KHz sound prompts are packaged separately
-
+* Mon Sep 15 2014 Ken Rice - 1.0.50-1
+- new spec file for jakob
diff --git a/freeswitch.spec b/freeswitch.spec
index bcf15a8b92..c993acf00c 100644
--- a/freeswitch.spec
+++ b/freeswitch.spec
@@ -121,13 +121,13 @@ Source3: http://files.freeswitch.org/downloads/libs/lame-3.98.4.tar.gz
Source4: http://files.freeswitch.org/downloads/libs/libshout-2.2.2.tar.gz
Source5: http://files.freeswitch.org/downloads/libs/mpg123-1.13.2.tar.gz
#Source6: http://files.freeswitch.org/downloads/libs/openldap-2.4.11.tar.gz
-Source6: http://files.freeswitch.org/downloads/libs/pocketsphinx-0.7.tar.gz
+Source6: http://files.freeswitch.org/downloads/libs/pocketsphinx-0.8.tar.gz
Source7: http://files.freeswitch.org/downloads/libs/soundtouch-1.7.1.tar.gz
-Source8: http://files.freeswitch.org/downloads/libs/sphinxbase-0.7.tar.gz
+Source8: http://files.freeswitch.org/downloads/libs/sphinxbase-0.8.tar.gz
Source9: http://files.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz
Source10: http://files.freeswitch.org/downloads/libs/libmemcached-0.32.tar.gz
Source11: http://files.freeswitch.org/downloads/libs/json-c-0.9.tar.gz
-Source12: http://files.freeswitch.org/downloads/libs/opus-1.1.tar.gz
+Source12: http://files.freeswitch.org/downloads/libs/opus-1.1-p2.tar.gz
Source13: http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2
Prefix: %{prefix}
@@ -146,6 +146,7 @@ BuildRequires: lzo-devel
%endif
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: bzip2
BuildRequires: curl-devel
BuildRequires: gcc-c++
BuildRequires: gnutls-devel
@@ -155,9 +156,10 @@ BuildRequires: openssl-devel >= 1.0.1e
BuildRequires: pcre-devel
BuildRequires: speex-devel
BuildRequires: sqlite-devel
+BuildRequires: ldns-devel
BuildRequires: libedit-devel
BuildRequires: perl
-%if 0%{?fedora_version} >= 8 || 0%{?rhel} >= 6
+%if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
BuildRequires: perl-ExtUtils-Embed
%endif
BuildRequires: pkgconfig
@@ -166,7 +168,11 @@ BuildRequires: termcap
%endif
BuildRequires: unixODBC-devel
BuildRequires: gdbm-devel
+%if 0%{?suse_version} > 100
+BuildRequires: db-devel
+%else
BuildRequires: db4-devel
+%endif
BuildRequires: python-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
@@ -179,6 +185,9 @@ BuildRequires: e2fsprogs-devel
BuildRequires: libtheora-devel
BuildRequires: libxml2-devel
BuildRequires: bison
+BuildRequires: net-snmp-devel
+BuildRequires: libmemcached-devel
+BuildRequires: portaudio-devel
%if %{build_py26_esl}
BuildRequires: python26-devel
Requires: python26
@@ -858,6 +867,22 @@ Requires: %{name} = %{version}-%{release}
%description endpoint-skinny
SCCP/Skinny support for FreeSWITCH open source telephony platform.
+%package endpoint-verto
+Summary: Verto endpoint support for FreeSWITCH open source telephony platform
+Group: System/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description endpoint-verto
+Verto protocol support for FreeSWITCH open source telephony platform.
+
+%package endpoint-rtc
+Summary: Verto endpoint support for FreeSWITCH open source telephony platform
+Group: System/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description endpoint-rtc
+Verto protocol support for FreeSWITCH open source telephony platform.
+
%package freetdm
Summary: Provides a unified interface to hardware TDM cards and ss7 stacks for FreeSWITCH
Group: System/Libraries
@@ -1396,7 +1421,7 @@ DIRECTORIES_MODULES=""
######################################################################################################################
ENDPOINTS_MODULES="endpoints/mod_dingaling ../../libs/freetdm/mod_freetdm \
endpoints/mod_loopback endpoints/mod_portaudio endpoints/mod_rtmp \
- endpoints/mod_skinny endpoints/mod_skypopen endpoints/mod_sofia"
+ endpoints/mod_skinny endpoints/mod_verto endpoints/mod_rtc endpoints/mod_skypopen endpoints/mod_sofia"
## DISABLED MODULES DUE TO BUILD ISSUES endpoints/mod_gsmopen endpoints/mod_h323 endpoints/mod_khomp
@@ -1518,6 +1543,7 @@ fi
--with-dbdir=%{DBDIR} \
--with-htdocsdir=%{HTDOCSDIR} \
--with-soundsdir=%{SOUNDSDIR} \
+--enable-core-pgsql-support \
--enable-core-odbc-support \
--enable-core-libedit-support \
--with-grammardir=%{GRAMMARDIR} \
@@ -2092,6 +2118,12 @@ fi
%files endpoint-skinny
%{MODINSTDIR}/mod_skinny.so*
+%files endpoint-verto
+%{MODINSTDIR}/mod_verto.so*
+
+%files endpoint-rtc
+%{MODINSTDIR}/mod_rtc.so*
+
%files endpoint-skypopen
%{MODINSTDIR}/mod_skypopen.so*
@@ -2339,9 +2371,11 @@ fi
#
######################################################################################################################
%changelog
+* Thu Sep 11 2014 - krice@freeswitch.org
+- add and fix mod_verto and mod_rtc
* Fri Jul 20 2014 - krice@freeswitch.org
- remove mod_cdr_pg_csv as its broken on centos
-* Fri Jun 02 2014 - krice@freeswitch.org
+* Mon Jun 02 2014 - krice@freeswitch.org
- remove mod_spidermoney as its been deprecated
* Fri Feb 21 2014 - crienzo@grasshopper.com
- change file owner to root
@@ -2354,11 +2388,11 @@ fi
* Mon Dec 09 2013 - crienzo@grasshopper.com
- Add mod_ssml, mod_rayo
- Fix build on master
-* Thu Jun 28 2013 - krice@freeswitch.org
+* Fri Jun 28 2013 - krice@freeswitch.org
- Add module for VP8
-* Thu Jun 19 2013 - krice@freeswitch.org
+* Wed Jun 19 2013 - krice@freeswitch.org
- tweak files included for vanilla configs
-* Thu Sep 19 2012 - krice@freeswitch.org
+* Wed Sep 19 2012 - krice@freeswitch.org
- Add support for Spanish and Portugese say language modules
* Thu Jan 26 2012 - krice@freeswitch.org
- complete rework of spec file
@@ -2440,10 +2474,10 @@ fi
- added directory files to russian language
* Sat Nov 21 2009 - michal.bielicki@seventhsignal.de
- added patch by Igor Neves : Added some checkup in %post and %postun to prevent upgrades from removing freeswitch user
-* Thu Nov 18 2009 - michal.bielicki@seventhsignal.de
+* Wed Nov 18 2009 - michal.bielicki@seventhsignal.de
- added new config files for diretory and distributor
- removed sangoma boost from openzap for builds that do not inherit wanpipe while building.
-* Tue Jul 24 2009 - mike@jerris.com
+* Fri Jul 24 2009 - mike@jerris.com
- removed mod_http
- removed ozmod_wanpipe
* Tue Jun 23 2009 - raulfragoso@gmail.com
@@ -2451,7 +2485,7 @@ fi
- Included new config and mod files to catch up with latest SVN
- Included new sound files for base256 and zrtp
- mod_unimrcp must be built after mod_sofia
-* Mon Feb 17 2009 - michal.bielicki@halokwadrat.de
+* Tue Feb 17 2009 - michal.bielicki@halokwadrat.de
- added mod_python
- added mod_fax
- added mod_amrwb.so
@@ -2488,7 +2522,7 @@ fi
- abstraction of mkdir, mv, rm, install etc into macros
* Fri Jan 18 2008 - michal.bielicki@voiceworks.pl
- fixes, fixes and more fixes in preparation for rc1
-* Thu Dec 5 2007 - michal.bielicki@voiceworks.pl
+* Wed Dec 5 2007 - michal.bielicki@voiceworks.pl
- put in detail configfiles in to split of spidermonkey configs
- created link from /opt/freesxwitch/conf to /etc%{prefix}
* Thu Nov 29 2007 - michal.bielicki@voiceworks.pl
diff --git a/scripts/ci/mk-sounds-rpms.sh b/scripts/ci/mk-sounds-rpms.sh
new file mode 100755
index 0000000000..607a58cf84
--- /dev/null
+++ b/scripts/ci/mk-sounds-rpms.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
+
+declare -a specfiles=('freeswitch-sounds-en-ca-june.spec' 'freeswitch-sounds-fr-ca-june.spec' 'freeswitch-sounds-ru-RU-elena.spec' 'freeswitch-sounds-en-us-callie.spec' 'freeswitch-sounds-sv-se-jakob.spec')
+
+sdir="."
+[ -n "${0%/*}" ] && sdir="${0%/*}"
+. $sdir/common.sh
+
+check_pwd
+
+basedir=$(pwd);
+
+(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
+
+if [ ! -d "$basedir/../freeswitch-sounds" ]; then
+ cd $basedir/..
+ git clone https://stash.freeswitch.org/scm/fs/freeswitch-sounds.git
+else
+ cd $basedir/../freeswitch-sounds
+ git clean -fdx
+ git pull
+fi
+
+for i in "${specfiles[@]}"
+do
+
+cd $basedir/../freeswitch-sounds/sounds/trunk
+
+./dist.pl `echo $i|sed -e 's/freeswitch-sounds-//g' -e 's/\.spec//g' -e 's/-/\//g'`
+
+mv `echo $i|sed -e's/\.spec//g'`*.tar.* $basedir/rpmbuild/SOURCES
+
+cd $basedir
+
+rpmbuild --define "_topdir %(pwd)/rpmbuild" \
+ --define "_rpmdir %{_topdir}" \
+ --define "_srcrpmdir %{_topdir}" \
+ -ba $i
+
+done
+
+mkdir $src_repo/RPMS
+mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
+
+cat 1>&2 <&2 <&2
exit 1;
fi
-ver="1.0.13"
+(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
-build="2"
+if [ ! -d "$basedir/../freeswitch-sounds" ]; then
+ cd $basedir/..
+ git clone https://stash.freeswitch.org/scm/fs/freeswitch-sounds.git
+else
+ cd $basedir/../freeswitch-sounds
+ git clean -fdx
+ git pull
+fi
-cd rpmbuild/SOURCES
+cd $basedir/../freeswitch-sounds/sounds/trunk
+./dist.pl ru/RU/elena
-wget http://files.freeswitch.org/freeswitch-sounds-ru-RU-elena-48000-$ver.tar.gz
+mv freeswitch-sounds-ru-RU-elena-*.tar.* $basedir/rpmbuild/SOURCES
-cd ../..
+cd $basedir
-rpmbuild --define "VERSION_NUMBER $ver" \
- --define "BUILD_NUMBER $build" \
- --define "_topdir %(pwd)/rpmbuild" \
+rpmbuild --define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba freeswitch-sounds-ru-RU-elena.spec
-mkdir $src_repo/RPMS
-mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
+mkdir $basedir/RPMS
+mv $basedir/rpmbuild/*/*.rpm $basedir/RPMS/.
cat 1>&2 </dev/null 2>&1; then
name=$(git config user.name)
[ -z "$name" ] \
&& [ -n "$NAME" ] && name="$NAME" || name=""
- echo -n "What is your name? [$name]: "
+ echo -n "What is your full real name? [$name]: "
read name_
[ -n "$name_" ] && name="$name_"
[ -z "$name" ] && err "Your name is required."
diff --git a/src/include/switch_types.h b/src/include/switch_types.h
index b29a6176fd..145d743274 100644
--- a/src/include/switch_types.h
+++ b/src/include/switch_types.h
@@ -627,11 +627,28 @@ typedef struct {
double mos;
} switch_rtp_numbers_t;
-
typedef struct {
- uint32_t packet_count;
- uint32_t octet_count;
+ uint32_t packet_count; /* sent packet count */
+ uint32_t octet_count;
uint32_t peer_ssrc;
+ uint32_t last_rpt_ts; /* RTP timestamp at which the last report was generated and sent */
+ uint32_t ssrc; /* identifier of the source */
+ uint32_t csrc; /* contributing source 0-15 32bit each */
+ uint32_t last_pkt_tsdiff; /* Jitter calculation, timestamp difference between the two last received packet */
+ double inter_jitter; /* Jitter calculation, Interarrival jitter */
+ uint32_t last_rpt_ext_seq; /* Packet loss calculation, extended sequence number at the begining of this RTCP report interval */
+ uint16_t last_rpt_cycle; /* Packet loss calculation, sequence number cycle at the begining of the current RTCP report interval */
+ uint16_t period_pkt_count; /* Packet loss calculation, packet count received during this RTCP report interval */
+ uint16_t pkt_count; /* Packet loss calculation, packet count received during this session */
+ uint32_t rtcp_rtp_count; /* RTCP report generated count */
+ uint32_t high_ext_seq_recv; /* Packet loss calculation, highest extended sequence number received and processed for stats */
+ uint16_t cycle; /* Packet loss calculation, sequence number cycle of the current RTCP report interval */
+ uint32_t bad_seq; /* Bad SEQ found, used to detect reset on the other side */
+ uint16_t base_seq; /* Packet loss calculation, first sequence number received */
+ uint32_t cum_lost; /* Packet loss calculation, cumulative number of packet lost */
+ uint32_t last_recv_lsr_local; /* RTT calculation, When receiving an SR we save our local timestamp in fraction of 65536 seconds */
+ uint32_t last_recv_lsr_peer; /* RTT calculation, When receiving an SR we extract the middle 32bits of the remote NTP timestamp to include it in the next SR LSR */
+ uint32_t init;
} switch_rtcp_numbers_t;
typedef struct {
@@ -884,7 +901,7 @@ typedef struct {
#endif
#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
-typedef struct {
+typedef struct switch_rtcp_hdr_s {
unsigned version:2; /* protocol version */
unsigned p:1; /* padding flag */
unsigned count:5; /* number of reception report blocks */
@@ -894,7 +911,7 @@ typedef struct {
#else /* BIG_ENDIAN */
-typedef struct {
+typedef struct switch_rtcp_hdr_s {
unsigned count:5; /* number of reception report blocks */
unsigned p:1; /* padding flag */
unsigned version:2; /* protocol version */
diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c
index 406aa14b95..c431f11286 100644
--- a/src/mod/applications/mod_conference/mod_conference.c
+++ b/src/mod/applications/mod_conference/mod_conference.c
@@ -2531,7 +2531,7 @@ static void conference_set_floor_holder(conference_obj_t *conference, conference
int old_id = 0;
if (!switch_test_flag(conference, CFLAG_VIDEO_BRIDGE) &&
- ((conference->video_floor_holder && !member) ||
+ ((conference->video_floor_holder && !member && !switch_test_flag(conference, CFLAG_VID_FLOOR_LOCK)) ||
(member && member->channel && switch_channel_test_flag(member->channel, CF_VIDEO)))) {
conference_set_video_floor_holder(conference, member, SWITCH_FALSE);
}
diff --git a/src/mod/applications/mod_hash/mod_hash.c b/src/mod/applications/mod_hash/mod_hash.c
index fdc12bee2b..2ab9e0ae7d 100644
--- a/src/mod/applications/mod_hash/mod_hash.c
+++ b/src/mod/applications/mod_hash/mod_hash.c
@@ -150,21 +150,15 @@ SWITCH_LIMIT_INCR(limit_incr_hash)
switch_core_hash_insert(globals.limit_hash, hashkey, item);
}
- /* Did we already run on this channel before? */
- if ((pvt = switch_channel_get_private(channel, "limit_hash"))) {
- /* Yes, but check if we did that realm+resource
- If we didnt, allow incrementing the counter.
- If we did, dont touch it but do the validation anyways
- */
- increment = !switch_core_hash_find(pvt->hash, hashkey);
- } else {
- /* This is the first limit check on this channel, create a hashtable, set our private data */
+ if (!(pvt = switch_channel_get_private(channel, "limit_hash"))) {
pvt = (limit_hash_private_t *) switch_core_session_alloc(session, sizeof(limit_hash_private_t));
memset(pvt, 0, sizeof(limit_hash_private_t));
- switch_core_hash_init(&pvt->hash);
switch_channel_set_private(channel, "limit_hash", pvt);
}
-
+ if (!(pvt->hash)) {
+ switch_core_hash_init(&pvt->hash);
+ }
+ increment = !switch_core_hash_find(pvt->hash, hashkey);
remote_usage = get_remote_usage(hashkey);
if (interval > 0) {
diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c
index f3b1a5997c..fede125ffb 100644
--- a/src/mod/applications/mod_httapi/mod_httapi.c
+++ b/src/mod/applications/mod_httapi/mod_httapi.c
@@ -1603,10 +1603,10 @@ static switch_status_t httapi_sync(client_t *client)
switch_curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *) client);
switch_curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER, (void *) client);
switch_curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, ua);
+ switch_curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
if (client->profile->timeout) {
switch_curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, client->profile->timeout);
- switch_curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
}
if (client->profile->ssl_cert_file) {
diff --git a/src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp b/src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp
index a92303351a..37e160c674 100644
--- a/src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp
+++ b/src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp
@@ -1486,8 +1486,6 @@ static switch_status_t load_config(int reload_type)
memset(&newconf, '\0', sizeof(newconf));
globals.GSMOPEN_INTERFACES[interface_id] = newconf;
- tech_pvt = &globals.GSMOPEN_INTERFACES[interface_id];
-
switch_mutex_init(&globals.GSMOPEN_INTERFACES[interface_id].controldev_lock, SWITCH_MUTEX_NESTED, gsmopen_module_pool);
switch_mutex_init(&globals.GSMOPEN_INTERFACES[interface_id].controldev_audio_lock, SWITCH_MUTEX_NESTED, gsmopen_module_pool);
@@ -1596,9 +1594,11 @@ static switch_status_t load_config(int reload_type)
for (i = 0; i < GSMOPEN_MAX_INTERFACES; i++) {
- switch_threadattr_t *gsmopen_api_thread_attr = NULL;
- int res = 0;
- int interface_id = i;
+ switch_threadattr_t *gsmopen_api_thread_attr = NULL;
+ int res = 0;
+ int interface_id = i;
+
+ tech_pvt = &globals.GSMOPEN_INTERFACES[interface_id];
if (strlen(globals.GSMOPEN_INTERFACES[i].name) && !globals.GSMOPEN_INTERFACES[i].active) {
diff --git a/src/mod/endpoints/mod_skinny/skinny_protocol.c b/src/mod/endpoints/mod_skinny/skinny_protocol.c
index 5f3a831345..fc4ee532a0 100644
--- a/src/mod/endpoints/mod_skinny/skinny_protocol.c
+++ b/src/mod/endpoints/mod_skinny/skinny_protocol.c
@@ -501,7 +501,7 @@ switch_status_t perform_send_register_ack(listener_t *listener,
skinny_create_message(message, REGISTER_ACK_MESSAGE, reg_ack);
message->data.reg_ack.keep_alive = keep_alive;
- switch_copy_string(message->data.reg_ack.date_format, date_format, 6);
+ memcpy(message->data.reg_ack.date_format, date_format, 6);
switch_copy_string(message->data.reg_ack.reserved, reserved, 2);
message->data.reg_ack.secondary_keep_alive = keep_alive;
switch_copy_string(message->data.reg_ack.reserved2, reserved2, 4);
@@ -871,7 +871,7 @@ switch_status_t perform_send_version(listener_t *listener,
skinny_create_message(message, VERSION_MESSAGE, version);
- switch_copy_string(message->data.version.version, version, 16);
+ memcpy(message->data.version.version, version, 16);
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
"Send Version with Version(%s)\n", version);
diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c
index f54224640f..64b6d16831 100644
--- a/src/mod/endpoints/mod_skinny/skinny_server.c
+++ b/src/mod/endpoints/mod_skinny/skinny_server.c
@@ -522,6 +522,8 @@ int skinny_session_set_variables_callback(void *pArg, int argc, char **argv, cha
"found user (id=%s) in channel var setup\n", uid);
if ((xvariables = switch_xml_child(xuser, "variables"))) {
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(helper->tech_pvt->session), SWITCH_LOG_DEBUG,
+ "found variables section in user xml");
for (xvariable = switch_xml_child(xvariables, "variable"); xvariable; xvariable = xvariable->next) {
char *name = (char *) switch_xml_attr_soft(xvariable, "name");
diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c
index c2fd9adb2f..6cf16e5912 100644
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -938,7 +938,12 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status,
switch_core_session_get_partner(session, &nsession);
if (nsession) {
- switch_ivr_transfer_variable(session, nsession, SOFIA_SIP_BYE_HEADER_PREFIX_T);
+ const char *vval;
+ switch_channel_t *nchannel = switch_core_session_get_channel(nsession);
+
+ if (!(vval = switch_channel_get_variable(nchannel, "sip_copy_custom_headers")) || switch_true(vval)) {
+ switch_ivr_transfer_variable(session, nsession, SOFIA_SIP_BYE_HEADER_PREFIX_T);
+ }
switch_core_session_rwunlock(nsession);
}
}
diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c
index fe522fdd4f..99caba5c2e 100644
--- a/src/mod/endpoints/mod_sofia/sofia_glue.c
+++ b/src/mod/endpoints/mod_sofia/sofia_glue.c
@@ -1075,7 +1075,9 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
if (switch_test_flag(caller_profile, SWITCH_CPF_HIDE_NUMBER)) {
tech_pvt->privacy = "id";
} else {
- tech_pvt->privacy = "none";
+ if (!(val = switch_channel_get_variable(channel, "sip_cid_suppress_privacy_none")) || !switch_true(val)) {
+ tech_pvt->privacy = "none";
+ }
}
break;
diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c
index f15f291ad9..ce5dcd0d4b 100644
--- a/src/mod/endpoints/mod_verto/mod_verto.c
+++ b/src/mod/endpoints/mod_verto/mod_verto.c
@@ -137,15 +137,36 @@ static void verto_deinit_ssl(verto_profile_t *profile)
}
}
+static void close_file(int *sock)
+{
+ if (*sock > -1) {
+ close(*sock);
+ *sock = -1;
+ }
+}
+
+static void close_socket(int *sock)
+{
+ if (*sock > -1) {
+ shutdown(*sock, 2);
+ close_file(sock);
+ }
+}
+
+
static int ssl_init = 0;
-static void verto_init_ssl(verto_profile_t *profile)
+static int verto_init_ssl(verto_profile_t *profile)
{
+ const char *err = "";
+ int i = 0;
+
if (!ssl_init) {
SSL_library_init();
ssl_init = 1;
}
+
profile->ssl_method = SSLv23_server_method(); /* create server instance */
profile->ssl_ctx = SSL_CTX_new(profile->ssl_method); /* create context */
profile->ssl_ready = 1;
@@ -162,21 +183,65 @@ static void verto_init_ssl(verto_profile_t *profile)
/* set the local certificate from CertFile */
if (!zstr(profile->chain)) {
- SSL_CTX_use_certificate_chain_file(profile->ssl_ctx, profile->chain);
+ if (switch_file_exists(profile->chain, NULL) != SWITCH_STATUS_SUCCESS) {
+ err = "SUPPLIED CHAIN FILE NOT FOUND\n";
+ goto fail;
+ }
+
+ if (!SSL_CTX_use_certificate_chain_file(profile->ssl_ctx, profile->chain)) {
+ err = "CERT CHAIN FILE ERROR";
+ goto fail;
+ }
}
- SSL_CTX_use_certificate_file(profile->ssl_ctx, profile->cert, SSL_FILETYPE_PEM);
+ if (switch_file_exists(profile->cert, NULL) != SWITCH_STATUS_SUCCESS) {
+ err = "SUPPLIED CERT FILE NOT FOUND\n";
+ goto fail;
+ }
+
+ if (!SSL_CTX_use_certificate_file(profile->ssl_ctx, profile->cert, SSL_FILETYPE_PEM)) {
+ err = "CERT FILE ERROR";
+ goto fail;
+ }
/* set the private key from KeyFile */
- SSL_CTX_use_PrivateKey_file(profile->ssl_ctx, profile->key, SSL_FILETYPE_PEM);
+
+ if (switch_file_exists(profile->key, NULL) != SWITCH_STATUS_SUCCESS) {
+ err = "SUPPLIED KEY FILE NOT FOUND\n";
+ goto fail;
+ }
+
+ if (!SSL_CTX_use_PrivateKey_file(profile->ssl_ctx, profile->key, SSL_FILETYPE_PEM)) {
+ err = "PRIVATE KEY FILE ERROR";
+ goto fail;
+ }
+
/* verify private key */
if ( !SSL_CTX_check_private_key(profile->ssl_ctx) ) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "SSL NOT AVAILABLE\n");
- profile->ssl_ready = 0;
- verto_deinit_ssl(profile);
- } else {
- SSL_CTX_set_cipher_list(profile->ssl_ctx, "HIGH:!DSS:!aNULL@STRENGTH");
+ err = "PRIVATE KEY FILE ERROR";
+ goto fail;
}
+
+ SSL_CTX_set_cipher_list(profile->ssl_ctx, "HIGH:!DSS:!aNULL@STRENGTH");
+
+ return 1;
+
+ fail:
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SSL ERR: %s\n", err);
+
+ profile->ssl_ready = 0;
+ verto_deinit_ssl(profile);
+
+ for (i = 0; i < profile->i; i++) {
+ if (profile->ip[i].secure) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SSL NOT ENABLED FOR LISTENER %s:%d. REVERTING TO WS\n",
+ profile->ip[i].local_ip, profile->ip[i].local_port);
+ profile->ip[i].secure = 0;
+ }
+ }
+
+ return 0;
+
}
@@ -385,22 +450,6 @@ static switch_status_t jsock_sub_channel(jsock_t *jsock, const char *event_chann
static uint32_t ID = 1;
-static void close_file(int *sock)
-{
- if (*sock > -1) {
- close(*sock);
- *sock = -1;
- }
-}
-
-static void close_socket(int *sock)
-{
- if (*sock > -1) {
- shutdown(*sock, 2);
- close_file(sock);
- }
-}
-
static void del_jsock(jsock_t *jsock)
{
jsock_t *p, *last = NULL;
@@ -1716,7 +1765,7 @@ static void client_run(jsock_t *jsock)
bytes = ws_read_frame(&jsock->ws, &oc, &data);
if (bytes < 0) {
- die("BAD READ %" SWITCH_SIZE_T_FMT "\n", bytes);
+ die("BAD READ %" SWITCH_SSIZE_T_FMT "\n", bytes);
break;
}
@@ -3764,7 +3813,7 @@ static int profile_one_loop(verto_profile_t *profile)
}
if (pfds[x].revents & SWITCH_POLL_READ) {
- if (pfds[x].sock == profile->mcast_sub.sock) {
+ if (profile->mcast_ip && pfds[x].sock == profile->mcast_sub.sock) {
handle_mcast_sub(profile);
} else {
start_jsock(profile, pfds[x].sock);
diff --git a/src/mod/event_handlers/mod_cdr_pg_csv/Makefile.am b/src/mod/event_handlers/mod_cdr_pg_csv/Makefile.am
index bcbfada1cf..7c37b89630 100644
--- a/src/mod/event_handlers/mod_cdr_pg_csv/Makefile.am
+++ b/src/mod/event_handlers/mod_cdr_pg_csv/Makefile.am
@@ -1,8 +1,17 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_cdr_pg_csv
+if HAVE_PGSQL
+
mod_LTLIBRARIES = mod_cdr_pg_csv.la
mod_cdr_pg_csv_la_SOURCES = mod_cdr_pg_csv.c
mod_cdr_pg_csv_la_CFLAGS = $(AM_CFLAGS) $(SWITCH_AM_CXXFLAGS)
mod_cdr_pg_csv_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_cdr_pg_csv_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lpq $(SWITCH_AM_LDFLAGS)
+
+else
+install: error
+all: error
+error:
+ $(error You must configure --enable-core-pgsql-support to build this module)
+endif
diff --git a/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c b/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c
index ff6b6431d1..f89a9a0644 100644
--- a/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c
+++ b/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c
@@ -37,7 +37,7 @@
#include
#include
-#include
+#include
SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_pg_csv_load);
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_cdr_pg_csv_shutdown);
diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c
index ae1ee83d38..6dfa0726ea 100644
--- a/src/mod/formats/mod_shout/mod_shout.c
+++ b/src/mod/formats/mod_shout/mod_shout.c
@@ -130,6 +130,7 @@ struct shout_context {
unsigned char *mp3buf;
switch_size_t mp3buflen;
switch_thread_rwlock_t *rwlock;
+ int buffer_seconds;
};
typedef struct shout_context shout_context_t;
@@ -477,27 +478,12 @@ static void launch_read_stream_thread(shout_context_t *context)
{
switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL;
- int sanity = 10;
- size_t used;
context->thread_running = 1;
switch_threadattr_create(&thd_attr, context->memory_pool);
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&thread, thd_attr, read_stream_thread, context, context->memory_pool);
-
- while (context->thread_running && --sanity) {
- /* at least 1s of audio and up to 5s initialize */
- switch_mutex_lock(context->audio_mutex);
- used = switch_buffer_inuse(context->audio_buffer);
- switch_mutex_unlock(context->audio_mutex);
-
- if (used >= (2 * context->samplerate)) {
- break;
- }
-
- switch_yield(500000);
- }
}
#define error_check() if (context->err) goto error;
@@ -628,6 +614,7 @@ static switch_status_t shout_file_open(switch_file_handle_t *handle, const char
long rate = 0;
int channels = 0;
int encoding = 0;
+ const char *var = NULL;
if ((context = switch_core_alloc(handle->memory_pool, sizeof(*context))) == 0) {
return SWITCH_STATUS_MEMERR;
@@ -640,6 +627,7 @@ static switch_status_t shout_file_open(switch_file_handle_t *handle, const char
context->memory_pool = handle->memory_pool;
context->samplerate = handle->samplerate;
context->handle = handle;
+ context->buffer_seconds = 1;
switch_thread_rwlock_create(&(context->rwlock), context->memory_pool);
@@ -647,6 +635,17 @@ static switch_status_t shout_file_open(switch_file_handle_t *handle, const char
switch_mutex_init(&context->audio_mutex, SWITCH_MUTEX_NESTED, context->memory_pool);
+ if (handle->params && (var = switch_event_get_header(handle->params, "buffer_seconds"))) {
+ int bs = atol(var);
+ if (bs < 1) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Buffer Seconds %d too low\n", bs);
+ } else if (bs > 60) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Buffer Seconds %d too high\n", bs);
+ } else {
+ context->buffer_seconds = bs;
+ }
+ }
+
if (switch_test_flag(handle, SWITCH_FILE_FLAG_READ)) {
if (switch_buffer_create_dynamic(&context->audio_buffer, TC_BUFFER_SIZE, TC_BUFFER_SIZE * 2, 0) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
@@ -944,12 +943,13 @@ static switch_status_t shout_file_read(switch_file_handle_t *handle, void *data,
if (rb) {
*len = rb / sizeof(int16_t) / handle->real_channels;
} else {
- /* no data, so insert 1 second of silence */
- newbytes = 2 * handle->samplerate;
+ /* no data, so insert N seconds of silence */
+ newbytes = (2 * handle->samplerate * handle->real_channels) * context->buffer_seconds;
if (newbytes < bytes) {
bytes = newbytes;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Padding mp3 stream with 1s of empty audio. (%s)\n", context->stream_url);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Padding mp3 stream with %ds of empty audio. (%s)\n",
+ context->buffer_seconds, context->stream_url);
memset(data, 255, bytes);
*len = bytes / sizeof(int16_t) / handle->real_channels;
diff --git a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
index 112b370af0..af0a87dd96 100644
--- a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
+++ b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
@@ -237,10 +237,10 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
switch_curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, file_callback);
switch_curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *) &config_data);
switch_curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "freeswitch-xml/1.0");
+ switch_curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
if (binding->timeout) {
switch_curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, binding->timeout);
- switch_curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
}
if (binding->disable100continue) {
diff --git a/src/switch_core_media.c b/src/switch_core_media.c
index e09b8108c9..2616237fbe 100644
--- a/src/switch_core_media.c
+++ b/src/switch_core_media.c
@@ -3480,7 +3480,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
match = (map->rm_pt == imp->ianacode) ? 1 : 0;
} else {
match = (!strcasecmp(rm_encoding, imp->iananame) &&
- ((map->rm_pt < 96 && imp->ianacode < 96) || (map->rm_pt > 96 && imp->ianacode > 96)) &&
+ ((map->rm_pt < 96 && imp->ianacode < 96) || (map->rm_pt > 95 && imp->ianacode > 95)) &&
(remote_codec_rate == codec_rate || fmtp_remote_codec_rate == imp->actual_samples_per_second)) ? 1 : 0;
if (fmtp_remote_codec_rate) {
remote_codec_rate = fmtp_remote_codec_rate;
@@ -8410,7 +8410,7 @@ static void switch_core_media_set_r_sdp_codec_string(switch_core_session_t *sess
} else {
if (map->rm_encoding) {
match = !strcasecmp(map->rm_encoding, imp->iananame) &&
- ((map->rm_pt < 96 && imp->ianacode < 96) || (map->rm_pt > 96 && imp->ianacode > 96));
+ ((map->rm_pt < 96 && imp->ianacode < 96) || (map->rm_pt > 95 && imp->ianacode > 95));
} else {
match = 0;
}
@@ -8440,7 +8440,7 @@ static void switch_core_media_set_r_sdp_codec_string(switch_core_session_t *sess
} else {
if (map->rm_encoding) {
match = !strcasecmp(map->rm_encoding, imp->iananame) &&
- ((map->rm_pt < 96 && imp->ianacode < 96) || (map->rm_pt > 96 && imp->ianacode > 96));
+ ((map->rm_pt < 96 && imp->ianacode < 96) || (map->rm_pt > 95 && imp->ianacode > 95));
} else {
match = 0;
}
@@ -8487,7 +8487,7 @@ static void switch_core_media_set_r_sdp_codec_string(switch_core_session_t *sess
} else {
if (map->rm_encoding) {
match = !strcasecmp(map->rm_encoding, imp->iananame) &&
- ((map->rm_pt < 96 && imp->ianacode < 96) || (map->rm_pt > 96 && imp->ianacode > 96));
+ ((map->rm_pt < 96 && imp->ianacode < 96) || (map->rm_pt > 95 && imp->ianacode > 95));
} else {
match = 0;
}
diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c
index f487fcec78..24a4ede9b1 100644
--- a/src/switch_ivr_play_say.c
+++ b/src/switch_ivr_play_say.c
@@ -1238,6 +1238,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
continue;
}
+ switch_channel_audio_sync(channel);
switch_core_session_io_write_lock(session);
switch_channel_set_private(channel, "__fh", fh);
switch_core_session_io_rwunlock(session);
diff --git a/src/switch_rtp.c b/src/switch_rtp.c
index eb9e7de49c..475f804675 100644
--- a/src/switch_rtp.c
+++ b/src/switch_rtp.c
@@ -34,6 +34,8 @@
//#define RTP_DEBUG_WRITE_DELTA
//#define DEBUG_MISSED_SEQ
//#define DEBUG_EXTRA
+//#define DEBUG_RTCP
+
#include
#ifndef _MSC_VER
#include
@@ -68,6 +70,7 @@
#define RTP_MAGIC_NUMBER 42
#define WARN_SRTP_ERRS 10
#define MAX_SRTP_ERRS 100
+#define NTP_TIME_OFFSET 2208988800UL
#define DTMF_SANITY (rtp_session->one_second * 30)
@@ -353,6 +356,7 @@ struct switch_rtp {
uint32_t samples_per_interval;
uint32_t samples_per_second;
uint32_t conf_samples_per_interval;
+ uint16_t rtcp_send_rate;
uint32_t rsamples_per_interval;
uint32_t ms_per_packet;
uint32_t one_second;
@@ -426,59 +430,32 @@ struct switch_rtcp_report_block {
uint32_t dlsr; /* The delay, expressed in units of 1/65536 seconds, between receiving the last SR packet from source SSRC_n and sending this reception report block */
};
-/* This was previously used, but a similar struct switch_rtcp_report_block existed and I merged them both. It also fixed the problem of lost being an integer and not a unsigned.
-struct switch_rtcp_source {
- unsigned ssrc1:32;
- unsigned fraction_lost:8;
- unsigned cumulative_lost:24;
- unsigned hi_seq_recieved:32;
- unsigned interarrival_jitter:32;
- unsigned lsr:32;
- unsigned lsr_delay:32;
-};
-*/
-
struct switch_rtcp_sr_head {
- unsigned ssrc:32;
- unsigned ntp_msw:32;
- unsigned ntp_lsw:32;
- unsigned ts:32;
- unsigned pc:32;
- unsigned oc:32;
+ uint32_t ssrc;
+ uint32_t ntp_msw;
+ uint32_t ntp_lsw;
+ uint32_t ts;
+ uint32_t pc;
+ uint32_t oc;
};
-#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
-struct switch_rtcp_s_desc_head {
- unsigned v:2;
- unsigned padding:1;
- unsigned sc:5;
- unsigned pt:8;
- unsigned length:16;
+struct switch_rtcp_sender_info {
+ uint32_t ntp_msw;
+ uint32_t ntp_lsw;
+ uint32_t ts;
+ uint32_t pc;
+ uint32_t oc;
};
-#else /* BIG_ENDIAN */
-struct switch_rtcp_s_desc_head {
- unsigned sc:5;
- unsigned padding:1;
- unsigned v:2;
- unsigned pt:8;
- unsigned length:16;
-};
-#endif
-
-struct switch_rtcp_s_desc_trunk {
- unsigned ssrc:32;
- unsigned cname:8;
- unsigned length:8;
- char text[1];
+struct switch_rtcp_sender_report {
+ uint32_t ssrc;
+ struct switch_rtcp_sender_info sender_info;
+ struct switch_rtcp_report_block report_block;
};
-/* This is limited to a single block with force description. Not to be used as reference of the rtcp packet*/
-struct switch_rtcp_senderinfo {
- struct switch_rtcp_sr_head sr_head;
- struct switch_rtcp_report_block sr_block;
- struct switch_rtcp_s_desc_head sr_desc_head;
- struct switch_rtcp_s_desc_trunk sr_desc_ssrc;
+struct switch_rtcp_receiver_report {
+ uint32_t ssrc;
+ struct switch_rtcp_report_block report_block;
};
typedef enum {
@@ -1441,6 +1418,10 @@ static void send_fir(switch_rtp_t *rtp_session)
rtp_session->remote_ssrc = rtp_session->stats.rtcp.peer_ssrc;
}
+ if (rtp_session->remote_ssrc == 0) {
+ rtp_session->remote_ssrc = ntohl(rtp_session->recv_msg.header.ssrc);
+ }
+
if (rtp_session->remote_ssrc == 0) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "Peer ssrc not known yet for FIR\n");
return;
@@ -1816,6 +1797,194 @@ static void check_jitter(switch_rtp_t *rtp_session)
}
}
+static void rtcp_generate_sender_info(switch_rtp_t *rtp_session, struct switch_rtcp_sender_info *sr){
+ switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session->pool, "__session");
+ switch_time_t now;
+ uint32_t sec, ntp_sec, ntp_usec;
+ switch_time_exp_t now_hr;
+ now = switch_time_now();
+ sec = now/1000000; /* convert to seconds */
+ ntp_sec = sec+NTP_TIME_OFFSET; /* convert to NTP seconds */
+ sr->ntp_msw = htonl(ntp_sec); /* store result in "most significant word" */
+ ntp_usec = now - (sec*1000000); /* remove seconds to keep only the microseconds */
+ sr->ntp_lsw = htonl(ntp_usec*(double)(((uint64_t)1)<<32)*1.0e-6); /* convert microseconds to fraction of 32bits and store result in "least significatn word" */
+
+ sr->ts = htonl(rtp_session->last_write_ts);
+ sr->pc = htonl(rtp_session->stats.outbound.packet_count);
+ sr->oc = htonl((rtp_session->stats.outbound.raw_bytes - rtp_session->stats.outbound.packet_count * sizeof(srtp_hdr_t)));
+
+ switch_time_exp_gmt(&now_hr,now);
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG10,"Sending an RTCP packet[%04d-%02d-%02d %02d:%02d:%02d.%d] lsr[%u] msw[%u] lsw[%u] stats_ssrc[%u]\n",
+ 1900 + now_hr.tm_year, now_hr.tm_mday, now_hr.tm_mon, now_hr.tm_hour, now_hr.tm_min, now_hr.tm_sec, now_hr.tm_usec,
+ (ntohl(sr->ntp_lsw)&0xffff0000)>>16 | (ntohl(sr->ntp_msw)&0x0000ffff)<<16,
+ ntohl(sr->ntp_msw),ntohl(sr->ntp_lsw), rtp_session->stats.rtcp.ssrc
+ );
+}
+
+
+static void rtcp_generate_report_block(switch_rtp_t *rtp_session, struct switch_rtcp_report_block *rtcp_report_block){
+#ifdef DEBUG_RTCP
+ switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session->pool, "__session");
+#endif
+ switch_rtcp_numbers_t * stats=&rtp_session->stats.rtcp;
+ switch_time_t now;
+ uint32_t expected_pkt, dlsr;
+ int32_t pkt_lost;
+ uint32_t ntp_sec, ntp_usec, lsr_now, sec;
+ now = switch_time_now();
+ sec = now/1000000; /* convert to seconds */
+ ntp_sec = sec+NTP_TIME_OFFSET; /* convert to NTP seconds */
+ ntp_usec = now - (sec*1000000); /* remove seconds to keep only the microseconds */
+
+ /* Packet loss */
+ if (stats->rtcp_rtp_count == 0) {
+ expected_pkt = stats->high_ext_seq_recv - stats->base_seq + 1;
+ } else {
+ expected_pkt = stats->high_ext_seq_recv - stats->last_rpt_ext_seq;
+ }
+
+ pkt_lost = expected_pkt - stats->period_pkt_count;
+ stats->cum_lost=stats->cum_lost+pkt_lost;
+ if (expected_pkt > 0 && pkt_lost > 0) {
+ rtcp_report_block->fraction = (uint8_t) (pkt_lost * 256 / expected_pkt);
+ } else {
+ rtcp_report_block->fraction = 0;
+ }
+#if SWITCH_BYTE_ORDER != __BIG_ENDIAN
+ /* Reversing byte order for 24bits */
+ rtcp_report_block->lost = (((stats->cum_lost&0x0000FF)<<16) | ((stats->cum_lost&0x00FF00)) | ((stats->cum_lost&0xFF0000)>>16));
+#endif
+
+#ifdef DEBUG_RTCP
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "rtcp_generate_sr: stats_ssrc[%u] received[%d] expected[%d] cum[%d]lost[%d|%d/256]pkt last_seq[%d]cyc[%d] last_rpt_seq[%d]cyc[%d] ssrc[%d]\n",
+ ntohl(rtp_session->recv_msg.header.ssrc), stats->period_pkt_count, expected_pkt,
+ stats->cum_lost, pkt_lost, rtcp_report_block->fraction, stats->high_ext_seq_recv&0x0000ffff,
+ stats->cycle, stats->last_rpt_ext_seq&0x0000ffff, stats->last_rpt_cycle, rtp_session->stats.rtcp.peer_ssrc
+ );
+#endif
+ rtcp_report_block->highest_sequence_number_received = htonl(stats->high_ext_seq_recv);
+
+ /* Jitter */
+ rtcp_report_block->jitter = htonl((uint32_t)stats->inter_jitter);
+
+ /* Delay since Last Sender Report (DLSR) : 32bits, 1/65536 seconds */
+ lsr_now = (uint32_t)(ntp_usec*0.065536) | (ntp_sec&0x0000ffff)<<16; /* 0.065536 is used for convertion from useconds to fraction of 65536 (x65536/1000000) */
+
+ if (stats->last_recv_lsr_local) {
+ dlsr = lsr_now - stats->last_recv_lsr_local;
+ } else {
+ dlsr = 0;
+ }
+ rtcp_report_block->lsr = stats->last_recv_lsr_peer;
+ rtcp_report_block->dlsr = htonl(dlsr);
+ rtcp_report_block->ssrc = htonl(rtp_session->stats.rtcp.peer_ssrc);
+ stats->rtcp_rtp_count++;
+}
+
+static void rtcp_stats_init(switch_rtp_t *rtp_session)
+{
+ switch_rtcp_numbers_t * stats = &rtp_session->stats.rtcp;
+ srtp_hdr_t * hdr = &rtp_session->recv_msg.header;
+ switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session->pool, "__session");
+ stats->ssrc = ntohl(hdr->ssrc);
+ stats->last_rpt_ts = rtp_session->timer.samplecount;
+ stats->init = 1;
+ stats->last_rpt_ext_seq = 0;
+ stats->last_rpt_cycle = 0;
+ stats->last_pkt_tsdiff = 0;
+ stats->inter_jitter = 0;
+ stats->cycle = 0;
+ stats->high_ext_seq_recv = ntohs((uint16_t)hdr->seq);
+ stats->base_seq = ntohs((uint16_t)hdr->seq);
+ stats->bad_seq = (1<<16) + 1; /* Make sure we wont missmatch 2 consecutive packets, so seq == bad_seq is false */
+ stats->cum_lost = 0;
+ stats->period_pkt_count = 0;
+ stats->pkt_count = 0;
+ stats->rtcp_rtp_count = 0;
+
+ if (!rtp_session->flags[SWITCH_RTP_FLAG_ENABLE_RTCP]) {
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "rtcp_stats_init: rtcp disabled\n");
+ } else if (!rtp_session->rtcp_sock_output) {
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "rtcp_stats_init: no rtcp socket\n");
+ } else if (rtp_session->flags[SWITCH_RTP_FLAG_RTCP_PASSTHRU]) {
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "rtcp_stats_init: rtcp passthru\n");
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "rtcp_stats_init: ssrc[%d] base_seq[%d]\n", stats->ssrc, stats->base_seq);
+ }
+}
+
+static int rtcp_stats(switch_rtp_t *rtp_session)
+{
+ switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session->pool, "__session");
+ srtp_hdr_t * hdr = &rtp_session->recv_msg.header;
+ switch_rtcp_numbers_t * stats = &rtp_session->stats.rtcp;
+ uint32_t packet_spacing_diff, pkt_tsdiff, pkt_extended_seq;
+ uint16_t pkt_seq, seq_diff, max_seq;
+ const int MAX_DROPOUT = 3000;
+ const int MAX_MISORDER = 100;
+ const int RTP_SEQ_MOD = (1<<16);
+
+ if(!rtp_session->rtcp_sock_output || !rtp_session->flags[SWITCH_RTP_FLAG_ENABLE_RTCP] || rtp_session->flags[SWITCH_RTP_FLAG_RTCP_PASSTHRU] || !rtp_session->rtcp_interval)
+ return 0; /* do not process RTCP in current state */
+
+ pkt_seq = (uint16_t) ntohs((uint16_t) rtp_session->recv_msg.header.seq);
+
+ /* Detect sequence number cycle change */
+ max_seq = stats->high_ext_seq_recv&0x0000ffff;
+ seq_diff = pkt_seq - max_seq;
+
+ if (seq_diff < MAX_DROPOUT) { /* in order, with permissible gap */
+ if (pkt_seq < max_seq) {
+ stats->cycle++;
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "rtcp_stats:[cycle change] pkt_seq[%d]cycle[%d] max_seq[%d] stats_ssrc[%u] local_ts[%u]\n",
+ pkt_seq, stats->cycle, max_seq, stats->ssrc, rtp_session->timer.samplecount);
+ }
+ pkt_extended_seq = stats->cycle << 16 | pkt_seq; /* getting the extended packet extended sequence ID */
+ if (pkt_extended_seq > stats->high_ext_seq_recv) {
+ stats->high_ext_seq_recv = pkt_extended_seq;
+ }
+ }
+ else if (seq_diff <= (RTP_SEQ_MOD - MAX_MISORDER)) { /* the sequence number made a very large jump */
+ if (pkt_seq == stats->bad_seq) {
+ rtcp_stats_init(rtp_session);
+ } else {
+ stats->bad_seq = (pkt_seq + 1) & (RTP_SEQ_MOD-1);
+ }
+ return 0; /* no stats, packet is out of sync and will be accounted as lost */
+ } else {
+ /* duplicate or reordered packet */
+ }
+
+ /* Verify that we are on the same stream source (we do not support multiple sources) */
+ if (ntohl(hdr->ssrc) != stats->ssrc || !stats->init) {
+ rtcp_stats_init(rtp_session);
+ }
+
+ stats->period_pkt_count++;
+ stats->pkt_count++;
+#ifdef DEBUG_RTCP
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG10, "rtcp_stats: period_pkt_count[%d]last_seq[%d]cycle[%d]stats_ssrc[%u]local_ts[%u]\n",
+ stats->period_pkt_count, pkt_seq, stats->cycle, stats->ssrc, rtp_session->timer.samplecount);
+#endif
+ /* Interarrival jitter calculation */
+ pkt_tsdiff = rtp_session->timer.samplecount - ntohl(hdr->ts) ; /* relative transit times for this packet */
+ if (stats->pkt_count < 2) { /* Can not compute Jitter with only one packet */
+ stats->last_pkt_tsdiff = pkt_tsdiff;
+ } else {
+ packet_spacing_diff = pkt_tsdiff - stats->last_pkt_tsdiff; /* Jitter : difference of relative transit times for the two packets */
+ stats->last_pkt_tsdiff = pkt_tsdiff;
+ /* Interarrival jitter estimation, "J(i) = J(i-1) + ( |D(i-1,i)| - J(i-1) )/16" */
+ stats->inter_jitter = (stats->inter_jitter + (((double)abs(packet_spacing_diff) - stats->inter_jitter) /16.));
+ }
+
+#ifdef DEBUG_RTCP
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG10, "rtcp_stats: pkt_ts[%d]local_ts[%d]diff[%d]pkt_spacing[%d]inter_jitter[%f]seq[%d]stats_ssrc[%d]",
+ ntohl(hdr->ts), rtp_session->timer.samplecount, pkt_tsdiff, packet_spacing_diff, stats->inter_jitter, ntohs(hdr->seq), stats->ssrc);
+#endif
+ return 1;
+}
+
+
static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
{
int ret = 0;
@@ -1865,86 +2034,48 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
rtcp_ok = 0;
}
- if (rtp_session->rtcp_sock_output && rtcp_ok && rtp_session->flags[SWITCH_RTP_FLAG_ENABLE_RTCP] && !rtp_session->flags[SWITCH_RTP_FLAG_RTCP_PASSTHRU]) {
- struct switch_rtcp_senderinfo *sr = (struct switch_rtcp_senderinfo*) rtp_session->rtcp_send_msg.body;
- //rtp_msg_t *send_msg = &rtp_session->send_msg;
- switch_size_t rtcp_bytes;
- switch_byte_t *ptr = (switch_byte_t *)rtp_session->rtcp_send_msg.body;
- switch_time_t when = 0;
+ if (rtp_session->rtcp_sock_output && rtp_session->flags[SWITCH_RTP_FLAG_ENABLE_RTCP] &&
+ !rtp_session->flags[SWITCH_RTP_FLAG_RTCP_PASSTHRU] &&
+ (rtp_session->timer.samplecount - rtp_session->stats.rtcp.last_rpt_ts >= rtp_session->samples_per_second * rtp_session->rtcp_send_rate) ) {
+
+ switch_rtcp_numbers_t * stats = &rtp_session->stats.rtcp;
+ struct switch_rtcp_receiver_report *rr;
+ struct switch_rtcp_sender_report *sr;
+ struct switch_rtcp_report_block *rtcp_report_block;
+
+ switch_size_t rtcp_bytes = sizeof(struct switch_rtcp_hdr_s)+sizeof(uint32_t); /* add size of the packet header and the ssrc */
rtp_session->rtcp_send_msg.header.version = 2;
rtp_session->rtcp_send_msg.header.p = 0;
rtp_session->rtcp_send_msg.header.count = 1;
- sr->sr_head.ssrc = htonl(rtp_session->ssrc);
-
- if (!rtp_session->stats.inbound.period_packet_count) {
- rtp_session->rtcp_send_msg.header.type = 201;
- rtcp_bytes = sizeof(switch_rtcp_hdr_t) + 4;
- ptr += 4;
+ if (!rtp_session->stats.outbound.packet_count) {
+ rtp_session->rtcp_send_msg.header.type = 201; /* Receiver report */
+ rr=(struct switch_rtcp_receiver_report*) rtp_session->rtcp_send_msg.body;
+ rr->ssrc = htonl(rtp_session->ssrc);
+ rtcp_report_block = &rr->report_block;
+ rtcp_bytes += sizeof(struct switch_rtcp_report_block);
} else {
- switch_time_t when;
- rtp_session->rtcp_send_msg.header.type = 200;
-
- if (rtp_session->send_time) {
- when = rtp_session->send_time;
- } else {
- when = switch_micro_time_now();
- }
-
- sr->sr_head.ntp_msw = htonl((u_long)(when / 1000000 + 2208988800UL));
- /*
- sr->ntp_lsw = htonl((u_long)(when % 1000000 * ((UINT_MAX * 1.0)/ 1000000.0)));
- */
- sr->sr_head.ntp_lsw = htonl((u_long)(rtp_session->send_time % 1000000 * 4294.967296));
- sr->sr_head.ts = htonl(rtp_session->last_write_ts);
- sr->sr_head.pc = htonl(rtp_session->stats.outbound.packet_count);
- sr->sr_head.oc = htonl((rtp_session->stats.outbound.raw_bytes - rtp_session->stats.outbound.packet_count * sizeof(srtp_hdr_t)));
-
+ struct switch_rtcp_sender_info *rtcp_sender_info;
+ rtp_session->rtcp_send_msg.header.type = 200; /* Sender report */
+ sr = (struct switch_rtcp_sender_report*) rtp_session->rtcp_send_msg.body;
+ sr->ssrc = htonl(rtp_session->ssrc);
+ rtcp_sender_info = &sr->sender_info;
+ rtcp_generate_sender_info(rtp_session, rtcp_sender_info);
+ rtcp_report_block = &sr->report_block;
+ rtcp_bytes += sizeof(struct switch_rtcp_sender_info) + sizeof(struct switch_rtcp_report_block);
}
+ rtcp_generate_report_block(rtp_session, rtcp_report_block);
- /* TBD need to put more accurate stats here. */
+ rtp_session->rtcp_send_msg.header.length = htons((uint16_t)(rtcp_bytes / 4) - 1);
- sr->sr_block.ssrc = htonl(rtp_session->stats.rtcp.peer_ssrc);
- sr->sr_block.fraction = 0;
- sr->sr_block.lost = htonl(rtp_session->stats.inbound.skip_packet_count);
- sr->sr_block.highest_sequence_number_received = htonl(rtp_session->recv_msg.header.seq);
- sr->sr_block.jitter = htonl(0);
- sr->sr_block.lsr = htonl(0);
- sr->sr_block.dlsr = htonl(0);
+ /* Prepare next report */
+ stats->last_rpt_cycle = stats->cycle;
+ stats->last_rpt_ext_seq = stats->high_ext_seq_recv;
+ stats->last_rpt_ts = rtp_session->timer.samplecount;
+ stats->period_pkt_count = 0;
+ rtp_session->rtcp_send_msg.header.length = htons((u_short)(rtcp_bytes / 4) - 1);
- sr->sr_desc_head.v = 0x02;
- sr->sr_desc_head.padding = 0;
- sr->sr_desc_head.sc = 1;
- sr->sr_desc_head.pt = 202;
-
- sr->sr_desc_ssrc.ssrc = htonl(rtp_session->ssrc);
- sr->sr_desc_ssrc.cname = 0x1;
- {
- char bufa[30];
- const char* str_cname = switch_get_addr(bufa, sizeof(bufa), rtp_session->rtcp_local_addr);
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, "Setting RTCP src-1 to %s\n", str_cname);
- sr->sr_desc_ssrc.length = (unsigned int)strlen(str_cname);
- memcpy ((char*)sr->sr_desc_ssrc.text, str_cname, strlen(str_cname));
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, "Setting RTCP src-1 LENGTH to %d (%d, %s)\n",
- sr->sr_desc_ssrc.length, sr->sr_desc_head.length, str_cname);
- }
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, "Setting msw = %d, lsw = %d \n", sr->sr_head.ntp_msw, sr->sr_head.ntp_lsw);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, "now = %"SWITCH_TIME_T_FMT", now lo = %d, now hi = %d\n",
- when, (int32_t)(when&0xFFFFFFFF), (int32_t)((when>>32&0xFFFFFFFF)));
-
- {
- size_t sr_length = sizeof(switch_rtcp_hdr_t) + sizeof(struct switch_rtcp_sr_head) + (1 * sizeof(struct switch_rtcp_report_block));
- size_t sr_desc_length = sizeof(struct switch_rtcp_s_desc_head) + sizeof(struct switch_rtcp_s_desc_trunk) + sr->sr_desc_ssrc.length;
-
- rtp_session->rtcp_send_msg.header.length = htons((u_short)(sr_length / 4) - 1);
- sr->sr_desc_head.length = htons((u_short)(sr_desc_length / 4) - 1);
-
- rtcp_bytes = sr_length + sr_desc_length;
- }
-
#ifdef ENABLE_SRTP
if (rtp_session->flags[SWITCH_RTP_FLAG_SECURE_SEND]) {
@@ -3734,6 +3865,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_activate_rtcp(switch_rtp_t *rtp_sessi
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "RTCP send rate is: %d and packet rate is: %d Remote Port: %d\n", send_rate, rtp_session->ms_per_packet, rtp_session->remote_rtcp_port);
rtp_session->rtcp_interval = send_rate;
+ rtp_session->rtcp_send_rate = send_rate/1000;
rtp_session->next_rtcp_send = switch_time_now() + (rtp_session->rtcp_interval * 1000);
}
@@ -4773,6 +4905,7 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
}
rtp_session->stats.inbound.packet_count++;
+ rtcp_stats(rtp_session);
if (!rtp_session->flags[SWITCH_RTP_FLAG_PROXY_MEDIA] && !rtp_session->flags[SWITCH_RTP_FLAG_UDPTL]) {
@@ -4942,37 +5075,71 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
static switch_status_t process_rtcp_packet(switch_rtp_t *rtp_session, switch_size_t *bytes)
{
switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session->pool, "__session");
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG10,"Received an RTCP packet of length %" SWITCH_SIZE_T_FMT " bytes\n", *bytes);
+ if (rtp_session->rtcp_recv_msg.header.version == 2) {
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG10,"RTCP packet type is %d\n", rtp_session->rtcp_recv_msg.header.type);
+
+ if (rtp_session->rtcp_recv_msg.header.type == 200 || rtp_session->rtcp_recv_msg.header.type == 201) {
+ struct switch_rtcp_report_block *report_block;
+ switch_time_t now;
+ switch_time_exp_t now_hr;
+ uint32_t sec, ntp_sec, ntp_usec, lsr_now;
+ uint32_t lsr;
+ uint32_t packet_ssrc;
+ now = switch_time_now(); /* number of microseconds since 00:00:00 january 1, 1970 UTC */
+ sec = now/1000000; /* converted to second (NTP most significant bits) */
+ ntp_sec = sec+NTP_TIME_OFFSET; /* 32bits most significant */
+ ntp_usec = now - (sec*1000000); /* micro seconds */
+ lsr_now = (uint32_t)(ntp_usec*0.065536) | (ntp_sec&0x0000ffff)<<16; // 0.065536 is used for convertion from useconds
+
+ if (rtp_session->rtcp_recv_msg.header.type == 200) { /* Sender report */
+ struct switch_rtcp_sender_report* sr = (struct switch_rtcp_sender_report*)rtp_session->rtcp_recv_msg.body;
+ report_block = &sr->report_block;
+ rtp_session->stats.rtcp.packet_count += ntohl(sr->sender_info.pc);
+ rtp_session->stats.rtcp.octet_count += ntohl(sr->sender_info.oc);
+ packet_ssrc = sr->ssrc;
+ /* Extracting LSR from NTP timestamp and save it */
+ lsr = (ntohl(sr->sender_info.ntp_lsw)&0xffff0000)>>16 | (ntohl(sr->sender_info.ntp_msw)&0x0000ffff)<<16; /* The middle 32 bits out of 64 in the NTP timestamp */
+ rtp_session->stats.rtcp.last_recv_lsr_peer = htonl(lsr); /* Save it include it in the next SR */
+ rtp_session->stats.rtcp.last_recv_lsr_local = lsr_now; /* Save it to calculate DLSR when generating next SR */
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG10,"Received a SR with %d report blocks, " \
+ "length in words = %d, " \
+ "SSRC = 0x%X, " \
+ "NTP MSW = %u, " \
+ "NTP LSW = %u, " \
+ "RTP timestamp = %u, " \
+ "Sender Packet Count = %u, " \
+ "Sender Octet Count = %u\n",
+ rtp_session->rtcp_recv_msg.header.count,
+ ntohs((uint16_t)rtp_session->rtcp_recv_msg.header.length),
+ ntohl(sr->ssrc),
+ ntohl(sr->sender_info.ntp_msw),
+ ntohl(sr->sender_info.ntp_lsw),
+ ntohl(sr->sender_info.ts),
+ ntohl(sr->sender_info.pc),
+ ntohl(sr->sender_info.oc));
+ } else { /* Receiver report */
+ struct switch_rtcp_receiver_report* rr = (struct switch_rtcp_receiver_report*)rtp_session->rtcp_recv_msg.body;
+ report_block = &rr->report_block;
+ packet_ssrc = rr->ssrc;
+ }
+
+ /* Currently in passthru mode RTT will not be accurate, some work as to be done (something like mapping the NTP timestamp with a local one) to have RTT from both legs */
+ if (report_block->lsr && !rtp_session->flags[SWITCH_RTP_FLAG_RTCP_PASSTHRU]) {
+ switch_time_exp_gmt(&now_hr,now);
+ /* Calculating RTT = A - DLSR - LSR */
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE,
+ "Receiving an RTCP packet[%04d-%02d-%02d %02d:%02d:%02d.%d] SSRC[%u]"
+ "RTT[%f] A[%u] - DLSR[%u] - LSR[%u]\n",
+ 1900 + now_hr.tm_year, now_hr.tm_mday, now_hr.tm_mon, now_hr.tm_hour, now_hr.tm_min, now_hr.tm_sec, now_hr.tm_usec,
+ ntohl(packet_ssrc), (double)(lsr_now - ntohl(report_block->dlsr) - ntohl(report_block->lsr))/65536,
+ lsr_now, ntohl(report_block->dlsr), ntohl(report_block->lsr));
+ }
-
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG10,"Received an RTCP packet of length %" SWITCH_SIZE_T_FMT " bytes\n", *bytes);
- if (rtp_session->rtcp_recv_msg_p->header.version == 2) {
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG10,"RTCP packet type is %d\n", rtp_session->rtcp_recv_msg_p->header.type);
- if (rtp_session->rtcp_recv_msg_p->header.type == 200) {
- struct switch_rtcp_senderinfo* sr = (struct switch_rtcp_senderinfo*)rtp_session->rtcp_recv_msg_p->body;
-
rtp_session->rtcp_fresh_frame = 1;
-
- rtp_session->stats.rtcp.packet_count += ntohl(sr->sr_head.pc);
- rtp_session->stats.rtcp.octet_count += ntohl(sr->sr_head.oc);
- rtp_session->stats.rtcp.peer_ssrc = ntohl(sr->sr_head.ssrc);
-
- /* sender report */
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG10,"Received a SR with %d report blocks, " \
- "length in words = %d, " \
- "SSRC = 0x%X, " \
- "NTP MSW = %u, " \
- "NTP LSW = %u, " \
- "RTP timestamp = %u, " \
- "Sender Packet Count = %u, " \
- "Sender Octet Count = %u\n",
- rtp_session->rtcp_recv_msg_p->header.count,
- ntohs((uint16_t)rtp_session->rtcp_recv_msg_p->header.length),
- ntohl(sr->sr_head.ssrc),
- ntohl(sr->sr_head.ntp_msw),
- ntohl(sr->sr_head.ntp_lsw),
- ntohl(sr->sr_head.ts),
- ntohl(sr->sr_head.pc),
- ntohl(sr->sr_head.oc));
+ rtp_session->stats.rtcp.peer_ssrc = ntohl(packet_ssrc);
+ status = SWITCH_STATUS_SUCCESS;
}
} else {
if (rtp_session->rtcp_recv_msg_p->header.version != 2) {
@@ -4982,8 +5149,8 @@ static switch_status_t process_rtcp_packet(switch_rtp_t *rtp_session, switch_siz
}
} else {
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session),
- SWITCH_LOG_DEBUG, "Received an unsupported RTCP packet version %d\nn", rtp_session->rtcp_recv_msg_p->header.version);
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session),
+ SWITCH_LOG_DEBUG, "Received an unsupported RTCP packet version %d\nn", rtp_session->rtcp_recv_msg_p->header.version);
}
}
@@ -5958,19 +6125,19 @@ SWITCH_DECLARE(switch_status_t) switch_rtcp_zerocopy_read_frame(switch_rtp_t *rt
/* A fresh frame has been found! */
if (rtp_session->rtcp_fresh_frame) {
- struct switch_rtcp_senderinfo* sr = (struct switch_rtcp_senderinfo*)rtp_session->rtcp_recv_msg_p->body;
+ struct switch_rtcp_sender_report* sr = (struct switch_rtcp_sender_report*)rtp_session->rtcp_recv_msg.body;
int i = 0;
/* turn the flag off! */
rtp_session->rtcp_fresh_frame = 0;
- frame->ssrc = ntohl(sr->sr_head.ssrc);
- frame->packet_type = (uint16_t)rtp_session->rtcp_recv_msg_p->header.type;
- frame->ntp_msw = ntohl(sr->sr_head.ntp_msw);
- frame->ntp_lsw = ntohl(sr->sr_head.ntp_lsw);
- frame->timestamp = ntohl(sr->sr_head.ts);
- frame->packet_count = ntohl(sr->sr_head.pc);
- frame->octect_count = ntohl(sr->sr_head.oc);
+ frame->ssrc = ntohl(sr->ssrc);
+ frame->packet_type = (uint16_t)rtp_session->rtcp_recv_msg.header.type;
+ frame->ntp_msw = ntohl(sr->sender_info.ntp_msw);
+ frame->ntp_lsw = ntohl(sr->sender_info.ntp_lsw);
+ frame->timestamp = ntohl(sr->sender_info.ts);
+ frame->packet_count = ntohl(sr->sender_info.pc);
+ frame->octect_count = ntohl(sr->sender_info.oc);
for (i = 0; i < (int)rtp_session->rtcp_recv_msg_p->header.count && i < MAX_REPORT_BLOCKS ; i++) {
struct switch_rtcp_report_block* report = (struct switch_rtcp_report_block*) (rtp_session->rtcp_recv_msg_p->body + (sizeof(struct switch_rtcp_sr_head) + (i * sizeof(struct switch_rtcp_report_block))));
diff --git a/src/switch_utils.c b/src/switch_utils.c
index 399442be71..f57ea00c4e 100644
--- a/src/switch_utils.c
+++ b/src/switch_utils.c
@@ -808,11 +808,18 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
goto end;
}
}
- switch_snprintf(buf, B64BUFFLEN, "MIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=\"%s\"\n", bound);
- if (!write_buf(fd, buf)) {
- rval = SWITCH_FALSE;
- err = "write error.";
- goto end;
+
+ if (!file && (!body || !switch_stristr("content-type", body))) {
+ bound = NULL;
+ }
+
+ if (bound) {
+ switch_snprintf(buf, B64BUFFLEN, "MIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=\"%s\"\n", bound);
+ if (!write_buf(fd, buf)) {
+ rval = SWITCH_FALSE;
+ err = "write error.";
+ goto end;
+ }
}
if (headers && !write_buf(fd, headers)) {
@@ -827,15 +834,17 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
goto end;
}
- if (body && switch_stristr("content-type", body)) {
- switch_snprintf(buf, B64BUFFLEN, "--%s\n", bound);
- } else {
- switch_snprintf(buf, B64BUFFLEN, "--%s\nContent-Type: text/plain\n\n", bound);
- }
- if (!write_buf(fd, buf)) {
- rval = SWITCH_FALSE;
- err = "write error.";
- goto end;
+ if (bound) {
+ if (body && switch_stristr("content-type", body)) {
+ switch_snprintf(buf, B64BUFFLEN, "--%s\n", bound);
+ } else {
+ switch_snprintf(buf, B64BUFFLEN, "--%s\nContent-Type: text/plain\n\n", bound);
+ }
+ if (!write_buf(fd, buf)) {
+ rval = SWITCH_FALSE;
+ err = "write error.";
+ goto end;
+ }
}
if (body) {
@@ -846,7 +855,7 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
}
}
- if (file) {
+ if (file && bound) {
const char *stipped_file = switch_cut_path(file);
const char *new_type;
char *ext;
@@ -904,12 +913,14 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
}
- switch_snprintf(buf, B64BUFFLEN, "\n\n--%s--\n.\n", bound);
+ if (bound) {
+ switch_snprintf(buf, B64BUFFLEN, "\n\n--%s--\n.\n", bound);
- if (!write_buf(fd, buf)) {
- rval = SWITCH_FALSE;
- err = "write error.";
- goto end;
+ if (!write_buf(fd, buf)) {
+ rval = SWITCH_FALSE;
+ err = "write error.";
+ goto end;
+ }
}
}
diff --git a/yum/GPL b/yum/GPL
new file mode 100644
index 0000000000..fd8bee7b02
--- /dev/null
+++ b/yum/GPL
@@ -0,0 +1,347 @@
+*****************************************************************************
+The following copyright applies to the Red Hat Linux compilation and any
+portions of Red Hat Linux it does not conflict with. Whenever this
+policy does conflict with the copyright of any individual portion of Red Hat
+Linux, it does not apply.
+
+*****************************************************************************
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C) 19yy
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/yum/RPM-GPG-KEY-FREESWITCH b/yum/RPM-GPG-KEY-FREESWITCH
new file mode 100644
index 0000000000..5d0ee845c4
--- /dev/null
+++ b/yum/RPM-GPG-KEY-FREESWITCH
@@ -0,0 +1,25 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+mQGiBE8jEfIRBAC+Cca0fPQxhyhn0NMsPaMQJgTvqhWb5/f4Mel++kosmUQQ4fJq
+4U9NFvpfNyLp5MoHpnlDfAb+e57B2sr47NOJLTh83yQIAnvU+8O0Q4kvMaiiesX5
+CisApLBs6Vx28y7VWmLsY3vWu8mC7M+PORKfpBV8DWy/7569wQPx2SCsIwCgzv2T
+8YsnYsSVRrrmh46J1o4/ngsD/13ETX4ws/wNN+82RdqUxu7fjc0fNbUAb6XYddAb
+1hrw5npQulgUNWkpnVmIDRHDXLNMeT8nZDkxsA8AsT+u7ACfPFa2o3R8w9zOPSO+
+oSO0+Puhop2+z1gm6lmfMKq9HpeXG3yt/8zsEVUmOYT9m+vYEVghfpXtACVYheDq
+LzUuA/9E9HBiNPVhJ/mEpOk9bZ1gpwr3mjlpUbvX5aGwTJJ+YoTfZOCL7go3uQHn
+/sT35WoJ23wJCRlW0SYTFJqCoris9AhI+qw7xRTw9wb+txSI96uhafUUMCn6GLkN
++yAixqDwNHKkdax3GSGJtLB0t67QoBDIpcGog7ZfRMvWP3QLNLQ4RnJlZVNXSVRD
+SCBQYWNrYWdlIFNpZ25pbmcgS2V5IDxwYWNrYWdlc0BmcmVlc3dpdGNoLm9yZz6I
+YgQTEQIAIgUCTyMR8gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ127c
+dyXgEM879ACffY0HFi+mACtfFYmX/Uk/qGELSP4An1B8D5L4dLFFr1zV9YawQUbz
+O9/MuQENBE8jEfIQBAC7vnn855YDuz1gTsUMYDxfIRH5KPmDDEAf1WXoD3QG4qOQ
+xVW5nhp/bolh2CacAxdOjZePdhGkkdNOBpcu9NlTNRru0myGN8etbnzP3O5dq0io
+VMf23C5u9KPbxwRWS+WFtC4CRFn6DafDI1qa3Gv3CkiBWtKR0Wid2SQLzl3mVwAF
+EQP9HlwGjhBfFA26LlSMPhSo0Ll+sdcOJupJ21zmGeg7c0GpBnzDzyyJg04gbahs
+xWtW3Y/+B4LGM97o6lnu0OQI7MX5gY1G4Jgu6pgYv8tQd5XyU/CAJUA5VWTxUMIi
+JP6qlzm1bz4AAPmGw4mkS1u4N+vai21Zl4iyFIQFeiuU/K2ISQQYEQIACQUCTyMR
+8gIbDAAKCRDXbtx3JeAQzxReAJ4if8mss7CU2PBB7ycyqmQ94pfa5gCaArUwapxO
+y3VNFe8aDajIULY7X3A=
+=McFP
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/yum/freeswitch-release.spec b/yum/freeswitch-release.spec
new file mode 100644
index 0000000000..b1c995163b
--- /dev/null
+++ b/yum/freeswitch-release.spec
@@ -0,0 +1,58 @@
+Name: freeswitch-release
+Version: 1
+Release: 0
+Summary: FreeSWITCH Packages for Enterprise Linux repository configuration
+
+Group: System Environment/Base
+License: GPL
+URL: http://www.freeswitch.org
+
+Source0: http://files.freeswitch.org/yum/RPM-GPG-KEY-FREESWITCH
+Source1: GPL
+Source2: freeswitch.repo
+Source3: freeswitch-testing.repo
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch: noarch
+Requires: redhat-release >= %{version}
+
+%description
+This package contains the FreeSWITCH Yum repository
+GPG key as well as configuration for yum.
+
+%prep
+%setup -q -c -T
+install -pm 644 %{SOURCE0} .
+install -pm 644 %{SOURCE1} .
+
+%build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+#GPG Key
+install -Dpm 644 %{SOURCE0} \
+ $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-FREESWITCH
+
+# yum
+install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
+install -pm 644 %{SOURCE2} %{SOURCE3} \
+ $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc GPL
+%config(noreplace) /etc/yum.repos.d/*
+/etc/pki/rpm-gpg/*
+
+
+%changelog
+* Fri Jan 27 2012 Ken Rice - 5-0
+- Replace GPG key with correct key, and update primary URLs
+* Wed Dec 21 2011 Ken Rice - 5-0
+- Initial Version - Thanks to the EPEL Guys I had something to Rip Off. Hense this package is GPL
diff --git a/yum/freeswitch-testing.repo b/yum/freeswitch-testing.repo
new file mode 100644
index 0000000000..4205c302da
--- /dev/null
+++ b/yum/freeswitch-testing.repo
@@ -0,0 +1,26 @@
+[freeswitch-testing]
+name=FreeSwitch Packages for Enterprise Linux $releasever - Testing - $basearch
+baseurl=http://files.freeswitch.org/yum/testing/$releasever/$basearch
+#mirrorlist=http://mirrors.freeswitch.org/mirrorlist?repo=testing-freeswitch$releasever&arch=$basearch
+#failovermethod=priority
+enabled=0
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-FREESWITCH
+
+[freeswitch-testing-debuginfo]
+name=FreeSwitch Packages for Enterprise Linux $releasever - Testing - $basearch - Debug
+baseurl=http://files.freeswitch.org/yum/testing/$releasever/$basearch/debug
+#mirrorlist=http://mirrors.freeswitch.org/mirrorlist?repo=testing-debug-freeswitch$releasever&arch=$basearch
+#failovermethod=priority
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-FREESWITCH
+gpgcheck=1
+
+[freeswitch-testing-source]
+name=FreeSwitch Packages for Enterprise Linux $releasever - Testing - $basearch - Source
+baseurl=http://files.freeswitch.org/yum/testing/$releasever/SRPMS
+#mirrorlist=http://mirrors.freeswitch.org/mirrorlist?repo=testing-source-freeswitch$releasever&arch=$basearch
+failovermethod=priority
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-FREESWITCH
+gpgcheck=1
diff --git a/yum/freeswitch.repo b/yum/freeswitch.repo
new file mode 100644
index 0000000000..f9722e2c82
--- /dev/null
+++ b/yum/freeswitch.repo
@@ -0,0 +1,26 @@
+[freeswitch]
+name=FreeSWITCH Packages for Enterprise Linux $releasever - $basearch
+baseurl=http://files.freeswitch.org/yum/$releasever/$basearch
+#mirrorlist=http://mirrors.freeswitch.org/mirrorlist?repo=freeswitch-5&arch=$basearch
+#failovermethod=priority
+enabled=1
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-FREESWITCH
+
+[freeswitch-debuginfo]
+name=FreeSWITCH Packages for Enterprise Linux $releasever - $basearch - Debug
+baseurl=http://files.freeswitch.org/yum/$releasever/$basearch/debug
+#mirrorlist=http://mirrors.freeswitch.org/mirrorlist?repo=freeswitch-debug-5&arch=$basearch
+#failovermethod=priority
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-FREESWITCH
+gpgcheck=1
+
+[freeswitch-source]
+name=FreeSWITCH Packages for Enterprise Linux $releasever - $basearch - Source
+baseurl=http://files.freeswitch.org/yum/$releasever/SRPMS
+#mirrorlist=http://mirrors.freeswitch.org/mirrorlist?repo=freeswitch-source-5&arch=$basearch
+#failovermethod=priority
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-FREESWITCH
+gpgcheck=1
diff --git a/yum/rpmbuilder.sh b/yum/rpmbuilder.sh
new file mode 100755
index 0000000000..050dc0fbd1
--- /dev/null
+++ b/yum/rpmbuilder.sh
@@ -0,0 +1,28 @@
+dst_parent="/tmp/"
+dst_dir="/tmp/$dst_name"
+#!/bin/sh
+##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
+
+sdir="."
+[ -n "${0%/*}" ] && sdir="${0%/*}"
+
+dst_name="freeswitch-release"
+
+(mkdir -p temp && cd temp && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
+
+cp -a * temp/SOURCES/ || true
+
+rpmbuild --define "_topdir %(pwd)/temp" \
+ --define "_rpmdir %{_topdir}" \
+ --define "_srcrpmdir %{_topdir}" \
+ -ba freeswitch-release.spec
+
+mkdir ./RPMS
+mv ./temp/*/*.rpm ./RPMS/.
+
+cat 1>&2 <