Blob Blame Raw
Summary:	SIP Express Media Server, an extensible SIP media server
Name:		sems
Version:	1.4.3
Release:	4%{?dist}
URL:		http://www.iptel.org/sems
Source0:	http://ftp.iptel.org/pub/%{name}/%{name}-%{version}.tar.gz
%if 0%{?fedora} > 14
BuildRequires:	systemd-units
%endif
License:	GPLv2+
Group:		Applications/Communications
# Will be proposed for inclusion in upstream
Patch1:		sems-0001-Force-to-use-system-wide-GSM-includes.patch
# Fedora-specific
Patch2:		sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch
# Fedora-specific
Patch3:		sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch
# Disable MySQL++ in conference and early_announce until good docs and failover to
# existing file-based configuration will be provided
Patch4:		sems-0004-Disable-mysql-in-conference-and-early_announce-modul.patch
# Fedora-specific
Patch5:		sems-0005-Add-sw_prepaid_sip-plugin-to-default-exclude-list-du.patch
# Fedora-specific
Patch6:		sems-0006-Don-t-start-py_sems-by-default.patch
# Will be proposed for inclusion in upstream
Patch7:		sems-0007-Change-default-msg_storage-path.patch
# Already fixed upstream in 1.5.x
Patch8:		sems-0008-Fix-building-with-IPv6-support.patch
# Fixed upstream
Patch9:		sems-0009-Correct-version-number-in-CMake-files.patch
# Fixed upstream
Patch10:	sems-0010-Added-missing-etc-sysconfig-sems-file-to-the-pkg-rpm.patch
# Fixed upstream
Patch11:	sems-0011-init-script-Fix-directory-for-storing-pid-file.patch
# Fixed upstream
Patch12:	sems-0012-systemd-Restart-in-case-of-failure.patch
# Fixed upstream
Patch13:	sems-0013-Search-for-possibly-missing-res_search.patch
# Fixed upstream
Patch14:	sems-0014-Allow-build-against-external-iLBC.patch
# Fixed upstream
Patch15:	sems-0015-Add-check-for-mysql_version.h-header.patch
# Fixed upstream
Patch16:	sems-0016-Drop-unused-variables.patch
# Fixed upstream
Patch17:	sems-0017-Allow-building-against-external-iLBC-copy.patch
# Disabled for now.
Patch18:	sems-0018-Use-bcg729-as-a-underlying-library-for-g.729-plugin.patch

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	python >= 2.3
BuildRequires: sip-devel
%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
BuildRequires:	libsamplerate-devel
BuildRequires:	gsm-devel
BuildRequires:	ilbc-devel
BuildRequires:	spandsp-devel
BuildRequires:	flite-devel
BuildRequires:	speex-devel
BuildRequires:	mISDN-devel
BuildRequires:	openssl-devel
BuildRequires:	mysql++-devel
BuildRequires:	cmake >= 2.4
Requires(pre):  /usr/sbin/useradd
#Initscripts
%if 0%{?fedora} > 14
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%else
Requires(post): chkconfig
Requires(preun):chkconfig
Requires(preun):initscripts
%endif
# Disable gateway module
Obsoletes: sems-gateway =< 1.3.1
Provides: sems-gateway = %{version}-%{release}

%description
SEMS (SIP Express Media Server) is very extensible and programmable
SIP media server for SER or OpenSER. The plug-in based SDK enables
you to extend SEMS and write your own applications and integrate new
codec. Voice-mail, announcement and echo plug-ins are already included.
SEMS supports g711u, g711a, GSM06.10 and wav file.

%package	conf_auth
Summary:	Conference with authorization
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-ivr = %{version}-%{release}

%description	conf_auth
Conference with authorization by PIN-numbers.

%package	conference
Summary:	Conferencing application
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}
Obsoletes:	%{name} < 1.2.0

%description	conference
Conferencing application for SEMS.

%package	diameter_client
Summary:	A simple DIAMETER client implementation
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}

%description	diameter_client
This is a very simple DIAMETER client implementation. it does
implement only parts of the base protocol, and is not a complete
DIAMETER implementation.

It is used from other modules with the DI API - i.e. other modules
can execute DI functions to add a server connection, or send a
DIAMETER request.

%package	dsm
Summary:	The state machine interpreter for SEMS
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}
Obsoletes:	%{name} < 1.2.0

%description	dsm
DonkeySM is a state machine interpreter for SEMS. Application
or service logic can comfortably and accurately be defined
as state machine, in a simple textual state machine definition
language, and executed by the dsm module as application in SEMS.

%package	early_announce
Summary:	Early announce application
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}
Obsoletes:	%{name} < 1.2.0

%description	early_announce
Early annonce application for SEMS.

%package	g722
Summary:	G.722 support for SEMS
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}

%description	g722
This is a wrapper around the g722 codec from the spandsp library.


%if 0%{?_with_bcg729}
%package	g729
Summary:	G.729 support for SEMS
Group:		Applications/Communications
BuildRequires:	bcg729-devel
Requires:	%{name} = %{version}-%{release}

%description	g729
This is a wrapper around the g729 codec from the bcg729 library.
%endif

#%package	gateway
#Summary:	ISDN gateway for SEMS
#Group:		Applications/Communications
#Requires:	%{name} = %{version}-%{release}

#%description	gateway
#ISDN gateway for SEMS.

%package	gsm
Summary:	GSM support for SEMS
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}

%description	gsm
GSM support for SEMS.

%package	ilbc
Summary:	iLBC support for SEMS
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}

%description	ilbc
iLBC support for SEMS.

%package	ivr
Summary:	IVR functionality for SEMS
Group:		Applications/Communications
Requires:	python >= 2.3
Requires:	%{name} = %{version}-%{release}

%description	ivr
IVR functionality for SEMS.

%package	mailbox
Summary:	Mailbox application
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-ivr = %{version}-%{release}

%description	mailbox
The mailbox application is a mailbox where callers can leave messages
for offline or unavailable users and the users can dial in to check their
messages. It uses an IMAP server as back-end to store the voice messages.

%package	pin_collect
Summary:	Collects a PIN
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-ivr = %{version}-%{release}

%description	pin_collect
This application collects a PIN and then transfers using a
(proprietary) REFER the call.

%package	python
Summary:	Python bindings for SEMS
Group:		Applications/Communications
Requires:	python >= 2.3
Requires:	%{name} = %{version}-%{release}

%description	python
Python bindings for SEMS.

%package	speex
Summary:	Speex support for SEMS
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}

%description	speex
Speex support for SEMS.

%package	xmlrpc2di
Summary:	XMLRPC interface for SEMS
Group:		Applications/Communications
Requires:	%{name} = %{version}-%{release}

%description	xmlrpc2di
This module makes the Dynamic Invocation (DI) Interfaces exported
by component modules accessible from XMLRPC. Additionally the built-in
methods calls, get_loglevel and set_loglevel are implemented (like in the
stats UDP server). Additionally, it can be used as client to access
XMLRPC servers.

%prep
%setup -q
rm -rf core/plug-in/gsm/gsm-1.0-pl10/
rm -rf core/plug-in/ilbc/iLBC_rfc3951
%patch1 -p1 -b .use_system_wide_gsm
%patch2 -p1 -b .allow_rewrite_of_makefiles
%patch3 -p1 -b .cfg_prefix_to_empty_string
%patch4 -p1 -b .disable_mysqlpp_in_conf_and_ea
%patch5 -p1 -b .exclude_sw_prepaid_sip
%patch6 -p1 -b .dont_start_py_sems
%patch7 -p1 -b .fix_defauls_msg_storage_path
%patch8 -p1 -b .ipv6
%patch9 -p1 -b .ver_typo
%patch10 -p1 -b .sysconfig
%patch11 -p1 -b .fix_init
%patch12 -p1 -b .systemd_restart
%patch13 -p1 -b .check_for_res_search
%patch14 -p1 -b .ext_ilbc
%patch15 -p1 -b .check_for_mysql_version_h
%patch16 -p1 -b .drop_unused_vars
%patch17 -p1 -b .ext_ilbc2
%patch18 -p1 -b .bcg729_disabled_by_default


iconv -f iso8859-1 -t UTF-8 doc/Readme.diameter_client.txt > doc/Readme.diameter_client.utf8 && mv doc/Readme.diameter_client.{utf8,txt}
iconv -f iso8859-1 -t UTF-8 doc/Readme.voicebox.txt > doc/Readme.voicebox.utf8 && mv doc/Readme.voicebox.{utf8,txt}
mv ./apps/dsm/fsmc/readme.txt  ./apps/dsm/fsmc/Readme.fsmc.txt

%build
%{cmake} \
	-DSEMS_USE_SPANDSP=yes \
	-DSEMS_USE_LIBSAMPLERATE=yes \
	-DSEMS_USE_ZRTP=NO \
	-DSEMS_USE_MP3=NO \
	-DSEMS_USE_ILBC=yes \
	%{?_with_bcg729:-DSEMS_USE_G729=yes} \
	-DSEMS_USE_TTS=yes \
	-DSEMS_USE_OPENSSL=yes \
	-DSEMS_USE_MONITORING=yes \
	-DSEMS_USE_IPV6=yes \
	-DSEMS_CFG_PREFIX= \
	-DSEMS_AUDIO_PREFIX=%{_datadir} \
	-DSEMS_EXEC_PREFIX=%{_prefix} \
	-DSEMS_LIBDIR=%{_lib} \
	-DSEMS_DOC_PREFIX=%{_docdir}

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

install -D -m 0644 -p pkg/rpm/sems.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}

%if 0%{?fedora} > 14
# install systemd files
install -D -m 0644 -p pkg/rpm/sems.systemd.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
install -D -m 0644 -p pkg/rpm/sems.systemd.tmpfiles.d.conf $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/%{name}.conf
%else
# install init-script
install -D -p -m755 pkg/rpm/sems.init $RPM_BUILD_ROOT%{_initrddir}/%{name}
%endif
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/%{name}/voicebox

# Remove installed docs
#rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
#rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default.template.sample
#rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/sems.conf.default

# remove currently empty conf-file
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/etc/conf_auth.conf

# add empty directories for audiofiles
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/audio/ann_b2b
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/audio/announcement
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/audio/announce_transfer

%clean
rm -rf $RPM_BUILD_ROOT


%pre
getent passwd %{name} >/dev/null || \
/usr/sbin/useradd -r -c "SIP Media Server"  -d %{_localstatedir}/spool/%{name} -s /sbin/nologin %{name} 2>/dev/null || :


%post
%if 0%{?fedora} > 14
if [ $1 -eq 1 ] ; then
    # Initial installation
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%else
if [ $1 -eq 1 ]; then
	/sbin/chkconfig --add sems || :
fi
%endif


%preun
%if 0%{?fedora} > 14
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
    /bin/systemctl --no-reload disable sems.service > /dev/null 2>&1 || :
    /bin/systemctl stop sems.service > /dev/null 2>&1 || :
fi
%else
if [ $1 -eq 0 ]; then
	/sbin/service sems stop >/dev/null 2>&1 || :
	/sbin/chkconfig --del sems || :
fi
%endif


%files
%dir %{_sysconfdir}/%{name}/
%dir %{_sysconfdir}/%{name}/etc/
%dir %{_libdir}/%{name}/
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/audio/
%dir %{_datadir}/%{name}/audio/ann_b2b/
%dir %{_datadir}/%{name}/audio/announcement/
%dir %{_datadir}/%{name}/audio/announce_transfer/
%dir %{_datadir}/%{name}/audio/annrecorder/
%dir %{_datadir}/%{name}/audio/precoded_announce/
%dir %{_datadir}/%{name}/audio/voicebox/
%dir %{_datadir}/%{name}/audio/voicemail/
%dir %{_datadir}/%{name}/audio/webconference/
%dir %{_libdir}/%{name}/plug-in/
%dir %attr(0755, %{name}, %{name}) %{_localstatedir}/spool/%{name}/
%dir %attr(0750, %{name}, %{name}) %{_localstatedir}/spool/%{name}/voicebox/

%config(noreplace) %{_sysconfdir}/sysconfig/%{name}

%if 0%{?fedora} > 14
%{_unitdir}/%{name}.service
%{_sysconfdir}/tmpfiles.d/%{name}.conf
%else
%{_initrddir}/%{name}
%endif
%dir %attr(0755, %{name}, %{name}) %{_localstatedir}/run/%{name}/

%config(noreplace) %{_sysconfdir}/%{name}/default.template
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/ann_b2b.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/announce_transfer.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/announcement.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/annrecorder.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/app_mapping.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/callback.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/click2dial.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/echo.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/monitoring.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/msg_storage.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/precoded_announce.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/reg_agent.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/stats.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/voicebox.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/voicemail.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/webconference.conf

%config(noreplace) %{_sysconfdir}/%{name}/etc/auth_b2b.sbcprofile.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/call_timer.sbcprofile.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/codecfilter.sbcprofile.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/prepaid.sbcprofile.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/refuse.sbcprofile.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/replytranslate.sbcprofile.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/sbc.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/src_ipmap.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/sst_b2b.sbcprofile.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/symmetricrtp.sbcprofile.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/transparent.sbcprofile.conf

%doc README
%doc core/plug-in/adpcm/README_G711
%doc core/plug-in/stats/README.stats
%doc doc/figures
%doc doc/Howtostart_noproxy.txt
%doc doc/Howtostart_simpleproxy.txt
%doc doc/Howtostart_voicemail.txt
%doc doc/CHANGELOG
%doc doc/COPYING
%doc doc/Readme.ann_b2b.txt
%doc doc/Readme.announce_transfer.txt
%doc doc/Readme.announcement.txt
%doc doc/Readme.annrecorder.txt
%doc doc/Readme.auth_b2b.txt
%doc doc/Readme.call_timer.txt
%doc doc/Readme.callback.txt
%doc doc/Readme.click2dial.txt
%doc doc/Readme.conf_auth.txt
%doc doc/Readme.echo.txt
%doc doc/Readme.monitoring.txt
%if 0%{?with_mp3}
%doc doc/Readme.mp3plugin.txt
%endif
%doc doc/Readme.msg_storage.txt
%doc doc/Readme.py_sems.txt
%doc doc/Readme.reg_agent.txt
%doc doc/Readme.registrar_client.txt
%doc doc/Readme.sst_b2b.txt
%doc doc/Readme.sw_prepaid_sip.txt
#%doc doc/Readme.twit.txt
%doc doc/Readme.uac_auth.txt
%doc doc/Readme.voicebox.txt
%doc doc/Readme.voicemail.txt
%doc doc/Readme.webconference.txt
%doc doc/Tuning.txt
#%doc doc/ZRTP.txt

%{_sbindir}/%{name}
%{_sbindir}/%{name}-logfile-callextract
%{_sbindir}/%{name}-sbc-get-activeprofile
%{_sbindir}/%{name}-sbc-get-regex-map-names
%{_sbindir}/%{name}-sbc-list-profiles
%{_sbindir}/%{name}-sbc-load-profile
%{_sbindir}/%{name}-sbc-reload-profile
%{_sbindir}/%{name}-sbc-reload-profiles
%{_sbindir}/%{name}-sbc-set-activeprofile
%{_sbindir}/%{name}-sbc-set-regex-map
%{_sbindir}/%{name}-stats

%{_datadir}/%{name}/audio/beep.wav
%{_datadir}/%{name}/audio/default_en.wav
%{_datadir}/%{name}/audio/annrecorder/beep.wav
%{_datadir}/%{name}/audio/annrecorder/bye.wav
%{_datadir}/%{name}/audio/annrecorder/confirm.wav
%{_datadir}/%{name}/audio/annrecorder/greeting_set.wav
%{_datadir}/%{name}/audio/annrecorder/to_record.wav
%{_datadir}/%{name}/audio/annrecorder/welcome.wav
%{_datadir}/%{name}/audio/annrecorder/your_prompt.wav
%{_datadir}/%{name}/audio/precoded_announce/test.predef
%{_datadir}/%{name}/audio/voicebox/0.wav
%{_datadir}/%{name}/audio/voicebox/1.wav
%{_datadir}/%{name}/audio/voicebox/10.wav
%{_datadir}/%{name}/audio/voicebox/11.wav
%{_datadir}/%{name}/audio/voicebox/12.wav
%{_datadir}/%{name}/audio/voicebox/13.wav
%{_datadir}/%{name}/audio/voicebox/14.wav
%{_datadir}/%{name}/audio/voicebox/15.wav
%{_datadir}/%{name}/audio/voicebox/16.wav
%{_datadir}/%{name}/audio/voicebox/17.wav
%{_datadir}/%{name}/audio/voicebox/18.wav
%{_datadir}/%{name}/audio/voicebox/19.wav
%{_datadir}/%{name}/audio/voicebox/2.wav
%{_datadir}/%{name}/audio/voicebox/20.wav
%{_datadir}/%{name}/audio/voicebox/3.wav
%{_datadir}/%{name}/audio/voicebox/30.wav
%{_datadir}/%{name}/audio/voicebox/4.wav
%{_datadir}/%{name}/audio/voicebox/40.wav
%{_datadir}/%{name}/audio/voicebox/5.wav
%{_datadir}/%{name}/audio/voicebox/50.wav
%{_datadir}/%{name}/audio/voicebox/6.wav
%{_datadir}/%{name}/audio/voicebox/60.wav
%{_datadir}/%{name}/audio/voicebox/7.wav
%{_datadir}/%{name}/audio/voicebox/70.wav
%{_datadir}/%{name}/audio/voicebox/8.wav
%{_datadir}/%{name}/audio/voicebox/80.wav
%{_datadir}/%{name}/audio/voicebox/9.wav
%{_datadir}/%{name}/audio/voicebox/90.wav
%{_datadir}/%{name}/audio/voicebox/and.wav
%{_datadir}/%{name}/audio/voicebox/bye.wav
%{_datadir}/%{name}/audio/voicebox/first_new_msg.wav
%{_datadir}/%{name}/audio/voicebox/first_saved_msg.wav
%{_datadir}/%{name}/audio/voicebox/in_your_voicebox.wav
%{_datadir}/%{name}/audio/voicebox/msg_deleted.wav
%{_datadir}/%{name}/audio/voicebox/msg_end_menu.wav
%{_datadir}/%{name}/audio/voicebox/msg_menu.wav
%{_datadir}/%{name}/audio/voicebox/msg_saved.wav
%{_datadir}/%{name}/audio/voicebox/new_msg.wav
%{_datadir}/%{name}/audio/voicebox/new_msgs.wav
%{_datadir}/%{name}/audio/voicebox/next_new_msg.wav
%{_datadir}/%{name}/audio/voicebox/next_saved_msg.wav
%{_datadir}/%{name}/audio/voicebox/no_more_msg.wav
%{_datadir}/%{name}/audio/voicebox/no_msg.wav
%{_datadir}/%{name}/audio/voicebox/pin_prompt.wav
%{_datadir}/%{name}/audio/voicebox/saved_msg.wav
%{_datadir}/%{name}/audio/voicebox/saved_msgs.wav
%{_datadir}/%{name}/audio/voicebox/x1.wav
%{_datadir}/%{name}/audio/voicebox/x2.wav
%{_datadir}/%{name}/audio/voicebox/x3.wav
%{_datadir}/%{name}/audio/voicebox/x4.wav
%{_datadir}/%{name}/audio/voicebox/x5.wav
%{_datadir}/%{name}/audio/voicebox/x6.wav
%{_datadir}/%{name}/audio/voicebox/x7.wav
%{_datadir}/%{name}/audio/voicebox/x8.wav
%{_datadir}/%{name}/audio/voicebox/x9.wav
%{_datadir}/%{name}/audio/voicebox/you_have.wav
%{_datadir}/%{name}/audio/voicemail/default_en.wav
%{_datadir}/%{name}/audio/voicemail/beep.wav
%{_datadir}/%{name}/audio/webconference/0.wav
%{_datadir}/%{name}/audio/webconference/1.wav
%{_datadir}/%{name}/audio/webconference/2.wav
%{_datadir}/%{name}/audio/webconference/3.wav
%{_datadir}/%{name}/audio/webconference/4.wav
%{_datadir}/%{name}/audio/webconference/5.wav
%{_datadir}/%{name}/audio/webconference/6.wav
%{_datadir}/%{name}/audio/webconference/7.wav
%{_datadir}/%{name}/audio/webconference/8.wav
%{_datadir}/%{name}/audio/webconference/9.wav
%{_datadir}/%{name}/audio/webconference/beep.wav
%{_datadir}/%{name}/audio/webconference/entering_conference.wav
%{_datadir}/%{name}/audio/webconference/first_participant.wav
%{_datadir}/%{name}/audio/webconference/pin_prompt.wav
%{_datadir}/%{name}/audio/webconference/wrong_pin.wav

%{_libdir}/%{name}/plug-in/adpcm.so
%{_libdir}/%{name}/plug-in/ann_b2b.so
%{_libdir}/%{name}/plug-in/announce_transfer.so
%{_libdir}/%{name}/plug-in/announcement.so
%{_libdir}/%{name}/plug-in/annrecorder.so
%{_libdir}/%{name}/plug-in/callback.so
%{_libdir}/%{name}/plug-in/click2dial.so
%{_libdir}/%{name}/plug-in/echo.so
%{_libdir}/%{name}/plug-in/l16.so
%{_libdir}/%{name}/plug-in/monitoring.so
%{_libdir}/%{name}/plug-in/msg_storage.so
%{_libdir}/%{name}/plug-in/precoded_announce.so
%{_libdir}/%{name}/plug-in/reg_agent.so
%{_libdir}/%{name}/plug-in/registrar_client.so
%{_libdir}/%{name}/plug-in/sbc.so
%{_libdir}/%{name}/plug-in/session_timer.so
%{_libdir}/%{name}/plug-in/stats.so
%{_libdir}/%{name}/plug-in/uac_auth.so
%{_libdir}/%{name}/plug-in/voicebox.so
%{_libdir}/%{name}/plug-in/voicemail.so
%{_libdir}/%{name}/plug-in/wav.so
%{_libdir}/%{name}/plug-in/webconference.so

%files conf_auth
# currently empty
#%config(noreplace) %{_sysconfdir}/%{name}/etc/conf_auth.conf
%doc doc/Readme.conf_auth.txt
%{_libdir}/%{name}/ivr/conf_auth.py
%{_libdir}/%{name}/ivr/conf_auth.pyc
%{_libdir}/%{name}/ivr/conf_auth.pyo

%files conference
%config(noreplace) %{_sysconfdir}/%{name}/etc/conference.conf
%doc doc/Readme.conference.txt
%dir %{_datadir}/%{name}/audio/conference/
%{_libdir}/%{name}/plug-in/conference.so
%{_datadir}/%{name}/audio/conference/beep.wav
%{_datadir}/%{name}/audio/conference/first_participant.wav

%files diameter_client
%doc doc/Readme.diameter_client.txt
%{_libdir}/%{name}/plug-in/diameter_client.so

%files dsm
%config(noreplace) %{_sysconfdir}/%{name}/etc/dsm.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/dsm_in_prompts.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/dsm_out_prompts.conf
%doc doc/dsm
%dir %{_libdir}/%{name}/dsm/
%{_libdir}/%{name}/dsm/mod_dlg.so
%{_libdir}/%{name}/dsm/mod_conference.so
%{_libdir}/%{name}/dsm/mod_monitoring.so
%{_libdir}/%{name}/dsm/mod_mysql.so
%{_libdir}/%{name}/dsm/mod_py.so
%{_libdir}/%{name}/dsm/mod_sys.so
%{_libdir}/%{name}/dsm/mod_uri.so
%{_libdir}/%{name}/dsm/mod_utils.so
%{_libdir}/%{name}/dsm/inbound_call.dsm
%{_libdir}/%{name}/dsm/outbound_call.dsm
%{_libdir}/%{name}/plug-in/dsm.so


%files early_announce
%config(noreplace) %{_sysconfdir}/%{name}/etc/early_announce.conf
%doc doc/Readme.early_announce.txt
%{_libdir}/%{name}/plug-in/early_announce.so

%files g722
%doc core/plug-in/g722/Readme.g722codec
%{_libdir}/%{name}/plug-in/g722.so


%if 0%{?_with_bcg729}
%files g729
%doc core/plug-in/g729/Readme.g729.txt
%{_libdir}/%{name}/plug-in/g729.so
%endif

#%files gateway
#%config(noreplace) %{_sysconfdir}/%{name}/etc/gateway.conf
#%{_libdir}/%{name}/plug-in/gateway.so

%files gsm
%{_libdir}/%{name}/plug-in/gsm.so

%files ilbc
%doc doc/Readme.iLBC.txt
%{_libdir}/%{name}/plug-in/ilbc.so

%files ivr
%config(noreplace) %{_sysconfdir}/%{name}/etc/ivr.conf
%doc doc/Readme.ivr.txt
%dir %{_libdir}/%{name}/ivr/
%{_libdir}/%{name}/plug-in/ivr.so
%{_libdir}/%{name}/ivr/log.py
%{_libdir}/%{name}/ivr/log.pyc
%{_libdir}/%{name}/ivr/log.pyo

%files mailbox
%config(noreplace) %{_sysconfdir}/%{name}/etc/mailbox.conf
%config(noreplace) %{_sysconfdir}/%{name}/etc/mailbox_query.conf
%doc doc/Readme.mailbox.txt
%dir %{_datadir}/%{name}/audio/mailbox/
%dir %{_libdir}/%{name}/ivr/imap_mailbox/
%{_datadir}/%{name}/audio/mailbox/and.wav
%{_datadir}/%{name}/audio/mailbox/beep.wav
%{_datadir}/%{name}/audio/mailbox/bye.wav
%{_datadir}/%{name}/audio/mailbox/default_en.wav
%{_datadir}/%{name}/audio/mailbox/first_msg.wav
%{_datadir}/%{name}/audio/mailbox/msg_deleted.wav
%{_datadir}/%{name}/audio/mailbox/msg_menu.wav
%{_datadir}/%{name}/audio/mailbox/msg_saved.wav
%{_datadir}/%{name}/audio/mailbox/new_msg.wav
%{_datadir}/%{name}/audio/mailbox/next_msg.wav
%{_datadir}/%{name}/audio/mailbox/no_msg.wav
%{_datadir}/%{name}/audio/mailbox/saved_msg.wav
%{_datadir}/%{name}/audio/mailbox/you_have.wav
%{_libdir}/%{name}/ivr/mailbox.py
%{_libdir}/%{name}/ivr/mailbox.pyc
%{_libdir}/%{name}/ivr/mailbox.pyo
%{_libdir}/%{name}/ivr/mailbox_query.py
%{_libdir}/%{name}/ivr/mailbox_query.pyc
%{_libdir}/%{name}/ivr/mailbox_query.pyo
%{_libdir}/%{name}/ivr/imap_mailbox/MailboxURL.py
%{_libdir}/%{name}/ivr/imap_mailbox/MailboxURL.pyc
%{_libdir}/%{name}/ivr/imap_mailbox/MailboxURL.pyo
%{_libdir}/%{name}/ivr/imap_mailbox/__init__.py
%{_libdir}/%{name}/ivr/imap_mailbox/__init__.pyc
%{_libdir}/%{name}/ivr/imap_mailbox/__init__.pyo
%{_libdir}/%{name}/ivr/imap_mailbox/imap4ext.py
%{_libdir}/%{name}/ivr/imap_mailbox/imap4ext.pyc
%{_libdir}/%{name}/ivr/imap_mailbox/imap4ext.pyo

%files pin_collect
%config(noreplace) %{_sysconfdir}/%{name}/etc/pin_collect.conf
%doc doc/Readme.pin_collect.txt
%dir %{_datadir}/%{name}/audio/pin_collect/
%{_datadir}/%{name}/audio/pin_collect/enter_pin.wav
%{_datadir}/%{name}/audio/pin_collect/welcome.wav
%{_libdir}/%{name}/ivr/pin_collect.py
%{_libdir}/%{name}/ivr/pin_collect.pyc
%{_libdir}/%{name}/ivr/pin_collect.pyo

%files python
%config(noreplace) %{_sysconfdir}/%{name}/etc/py_sems.conf
%doc doc/Readme.py_sems.txt
%{_libdir}/%{name}/plug-in/py_sems.so
%{_libdir}/%{name}/plug-in/py_sems_log.py
%{_libdir}/%{name}/plug-in/py_sems_log.pyc
%{_libdir}/%{name}/plug-in/py_sems_log.pyo

%files speex
%{_libdir}/%{name}/plug-in/speex.so

%files xmlrpc2di
%config(noreplace) %{_sysconfdir}/%{name}/etc/xmlrpc2di.conf
%doc doc/Readme.xmlrpc2di.txt
%{_libdir}/%{name}/plug-in/xmlrpc2di.so


%changelog
* Tue Nov 20 2012 Peter Lemenkov <lemenkov@gmail.com> - 1.4.3-4
- Build against external iLBC
- Allow conditional build with bcg729

* Mon Oct 01 2012 Rex Dieter <rdieter@fedoraproject.org> 1.4.3-3
- rebuild (sip)

* Thu Jul 19 2012 Peter Lemenkov <lemenkov@gmail.com> - 1.4.3-2
- Fixed init-script

* Sat May 05 2012 Peter Lemenkov <lemenkov@gmail.com> - 1.4.3-1
- Ver. 1.4.3 (bugfix release in 1.4.x branch)
- Dropped upstreamed patches

* Fri Apr 27 2012 Peter Lemenkov <lemenkov@gmail.com> - 1.4.2-6
- Fixed systemd installation
- Enabled IPv6 (see rhbz #814229)

* Thu Apr 19 2012 Peter Lemenkov <lemenkov@gmail.com> - 1.4.2-5
- Enabled iLBC ( https://bugzilla.redhat.com/728302#c26 )

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-4
- Rebuilt for c++ ABI breakage

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Nov 24 2011 Peter Lemenkov <lemenkov@gmail.com> - 1.4.2-2
- Works with systemd
- Fix startup failure if sbc module is enabled

* Fri Aug 26 2011 Peter Lemenkov <lemenkov@gmail.com> - 1.4.2-1
- Ver. 1.4.2 (bugfix release in 1.4.x branch)

* Thu Jul 21 2011 Peter Lemenkov <lemenkov@gmail.com> - 1.4.1-1
- Ver. 1.4.1
- Removed obsolete b2b apps: auth_b2b, call_timer, sst_b2b, sw_prepaid_sip
- Disabled gateway module

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Jan  4 2011 Peter Lemenkov <lemenkov@gmail.com> 1.3.1-4
- Disallow usage of Glibc private functions

* Mon Jan  3 2011 Peter Lemenkov <lemenkov@gmail.com> 1.3.1-3
- Fixed linking issues

* Wed Dec 29 2010 Peter Lemenkov <lemenkov@gmail.com> 1.3.1-2
- Fixed segfault in gateway module
- Properly install email template for voicemail module
- Don't start py_sems by default (causes issues with python2.7)

* Mon Dec 27 2010 Peter Lemenkov <lemenkov@gmail.com> 1.3.1-1
- Ver. 1.3.1 (Bugfix release)

* Wed Sep 29 2010 Peter Lemenkov <lemenkov@gmail.com> 1.3.0-2
- Workaround for missing atomic built-ins in EPEL5 old gcc

* Mon Sep 27 2010 Peter Lemenkov <lemenkov@gmail.com> 1.3.0-1
- Ver. 1.3.0
- Dropped half of all patches
- Dropped binrpcctrl plugin
- Merged into core sipctrl plugin

* Thu Sep 09 2010 Rex Dieter <rdieter@fedoraproject.org> 1.2.1-7
- rebuild (sip)

* Fri Aug 20 2010 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-6
- Fixed severe issue in early_announce module (see %%patch12)

* Sat Jul 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> 1.2.1-5
- rebuild for python 2.7

* Fri Jun 25 2010 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-4
- Fixed escaping variables strategy for  new CMake (and only for new CMake)
- Disable mysql++ in early_announce and conference modules

* Tue Jun  1 2010 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-3
- Fixed config-file generation for EPEL (old CMake)
- Fixed MOD_NAME parameter passing
- Fixed few typos

* Fri May  7 2010 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-2
- Fixed build for EPEL

* Fri Apr 30 2010 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-1
- Ver. 1.2.1
- Dropped upstreamed patches

* Thu Apr  1 2010 Peter Lemenkov <lemenkov@gmail.com> 1.2.0-2
- Fix for CMake 2.4 added

* Wed Mar 31 2010 Peter Lemenkov <lemenkov@gmail.com> 1.2.0-1
- Ver. 1.2.0
- Switched to CMake (and fixed many packaging and linking issues)
- All old patches were either applied upstream or dropped (no longer required)
- Finally removed unixsockctrl interface
- New sub-packages: conference, dsm, early_announce
- Module py_sems was re-enabled

* Mon Nov 16 2009 Rex Dieter <rdieter@fedoraproject.org> 1.1.1-7
- drop BR: sip-devel

* Fri Aug 28 2009 Peter Lemenkov <lemenkov@gmail.com> 1.1.1-6
- g722 enabled back

* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.1.1-5
- rebuilt with new openssl

* Mon Aug 17 2009 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 1.1.1-4
- g722 is a conditional build, until it will work with latest spandsp

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jul 15 2009 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 1.1.1-2
- disabled py_sems (python) subpackage until upstream fixes sip-4.8
  compatibility

* Sat Jul 11 2009 Peter Lemenkov <lemenkov@gmail.com> 1.1.1-1
- Ver. 1.1.1

* Thu Apr 30 2009 Ján ONDREJ (SAL) <ondrejj(at)salstar.sk> - 1.1.0-7
- rebuilt

* Sun Apr 19 2009 Peter Lemenkov <lemenkov@gmail.com> 1.1.0-6
- Fix building with GCC 4.4

* Fri Apr 10 2009 Peter Lemenkov <lemenkov@gmail.com> 1.1.0-5
- Use modified tarball (with ilBC sources completely removed)

* Thu Apr  9 2009 Peter Lemenkov <lemenkov@gmail.com> 1.1.0-4
- Internally shipped xmlrpc++ now uses system optflags
- Added more docs
- Moved audiofiles from libdir to datadir
- Removed empty conf_auth.conf
- Splitted out g722 module
- Splitted out xmlrpc2di module

* Wed Apr  8 2009 Peter Lemenkov <lemenkov@gmail.com> 1.1.0-3
- Fixed installation of python files

* Tue Apr  7 2009 Peter Lemenkov <lemenkov@gmail.com> 1.1.0-2
- Module dsm is back
- Disabled OpenSER-specific features (OpenSER is able to manage SEMS
  via SIP-headers).

* Tue Feb 17 2009 Peter Lemenkov <lemenkov@gmail.com> 1.1.0-1
- Ver. 1.1.0
- Disabled module dsm

* Mon Dec  8 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.9.svn1160
- New svn snapshot

* Wed Dec  3 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.8.svn1095
- Another one fix for audio installation

* Fri Oct 17 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.7.svn1095
- Fixed installation of audio files

* Sun Sep 28 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.6.svn1095
- New svn rev. 1095
- Some rpmlint-related fixes

* Thu Aug 21 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.5.svn
- Dropped upstreamed sems--initscript_fix.diff
- Installation of some audiofiles was fixed upstream

* Tue Aug 19 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.4.svn
- Splitted ivr module
- Fixed some rpmlint errors

* Thu Aug 14 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.3.svn
- Conditional switch "with_ilbc"

* Thu Aug 14 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.2.svn
- Splitted some modules

* Wed Aug 13 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-0.1.svn
- Preliminary ver. 1.0.0 (from svn)

* Sun Jun 29 2008 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-rc1
- GCC4.3 patches upstreamed
- Ver. 1.0.0-rc1

* Wed Mar 26 2008 Peter Lemenkov <lemenkov@gmail.com> 0.10.0
- Initial package for Fedora

* Wed Dec 13 2006 Peter Nixon <peter+rpmspam@suntel.com.tr>
- First version of the spec file for SUSE.