diff --git a/MANIFEST.in b/MANIFEST.in index 0bfd32c..a5ac8ae 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,12 +1,12 @@ recursive-include debian changelog compat control copyright rules -recursive-include debian *.apache2 *.conf *.docs *.install *.init +recursive-include debian *.apache2 *.conf *.docs *.install *.service recursive-include debian *.lintian-overrides *.manpages *.preinst recursive-include debian/source format recursive-include doc/man *.1 recursive-include radius * recursive-include test *.py multitest recursive-include tls README *.crt *.key *.pem recursive-include web * prune debian/tmp prune debian/mediaproxy-* include INSTALL LICENSE MANIFEST.in TODO build_inplace diff --git a/debian/control b/debian/control index bdd489d..6054d42 100644 --- a/debian/control +++ b/debian/control @@ -1,105 +1,105 @@ Source: mediaproxy Section: net Priority: optional Maintainer: Dan Pascu Uploaders: Tijmen de Mes Build-Depends: debhelper (>= 11), dh-apache2, dh-python, python-all-dev, python-all-dbg, libnetfilter-conntrack-dev, iptables-dev Standards-Version: 3.9.8 Package: mediaproxy-common Architecture: any Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, iptables, python-application (>= 2.8.0), python-cjson, python-gnutls (>= 3.0.0), python-pyrad, python-sqlobject, python-twisted-core, python-twisted-names, python-zope.interface Description: MediaProxy common files MediaProxy is a distributed far end NAT traversal solution for media streams of SIP calls. MediaProxy has a dispatcher running on the same host as the OpenSIPS SIP proxy and multiple media relays distributed over the network. The media relays work by manipulating conntrack rules in the Linux kernel to create paths that forward the media streams between the 2 SIP user agents participating in the call. Because it avoids copying stream data between kernel and user space like other implementations, MediaProxy can handle many more media streams at a time, being limited only by the network interface bandwidth and the Linux kernel network layer processing speed. . MediaProxy features secure encrypted communication between the dispatcher and the relays, advanced accounting capabilities using multiple backends, support for any combination of audio and video streams, realtime statistics, T.38 fax support as well as automatic load balancing and redundancy among the active relays. . This package includes files common to all MediaProxy packages. Package: mediaproxy-dispatcher Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, mediaproxy-common (>= ${source:Version}), lsb-base +Depends: ${python:Depends}, ${misc:Depends}, mediaproxy-common (>= ${source:Version}) Description: MediaProxy dispatcher for OpenSIPS MediaProxy is a distributed far end NAT traversal solution for media streams of SIP calls. MediaProxy has a dispatcher running on the same host as the OpenSIPS SIP proxy and multiple media relays distributed over the network. The media relays work by manipulating conntrack rules in the Linux kernel to create paths that forward the media streams between the 2 SIP user agents participating in the call. Because it avoids copying stream data between kernel and user space like other implementations, MediaProxy can handle many more media streams at a time, being limited only by the network interface bandwidth and the Linux kernel network layer processing speed. . MediaProxy features secure encrypted communication between the dispatcher and the relays, advanced accounting capabilities using multiple backends, support for any combination of audio and video streams, realtime statistics, T.38 fax support as well as automatic load balancing and redundancy among the active relays. . This package provides the MediaProxy dispatcher. Package: mediaproxy-relay Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, mediaproxy-common (>= ${source:Version}), lsb-base +Depends: ${python:Depends}, ${misc:Depends}, mediaproxy-common (>= ${source:Version}) Description: MediaProxy relay for OpenSIPS MediaProxy is a distributed far end NAT traversal solution for media streams of SIP calls. MediaProxy has a dispatcher running on the same host as the OpenSIPS SIP proxy and multiple media relays distributed over the network. The media relays work by manipulating conntrack rules in the Linux kernel to create paths that forward the media streams between the 2 SIP user agents participating in the call. Because it avoids copying stream data between kernel and user space like other implementations, MediaProxy can handle many more media streams at a time, being limited only by the network interface bandwidth and the Linux kernel network layer processing speed. . MediaProxy features secure encrypted communication between the dispatcher and the relays, advanced accounting capabilities using multiple backends, support for any combination of audio and video streams, realtime statistics, T.38 fax support as well as automatic load balancing and redundancy among the active relays. . This package provides the MediaProxy relay. Package: mediaproxy-web-sessions Architecture: all Depends: ${misc:Depends}, libapache2-mod-php Description: MediaProxy sessions web view MediaProxy is a distributed far end NAT traversal solution for media streams of SIP calls. MediaProxy has a dispatcher running on the same host as the OpenSIPS SIP proxy and multiple media relays distributed over the network. The media relays work by manipulating conntrack rules in the Linux kernel to create paths that forward the media streams between the 2 SIP user agents participating in the call. Because it avoids copying stream data between kernel and user space like other implementations, MediaProxy can handle many more media streams at a time, being limited only by the network interface bandwidth and the Linux kernel network layer processing speed. . MediaProxy features secure encrypted communication between the dispatcher and the relays, advanced accounting capabilities using multiple backends, support for any combination of audio and video streams, realtime statistics, T.38 fax support as well as automatic load balancing and redundancy among the active relays. . This package provides a simple web page to display active media sessions. diff --git a/debian/mediaproxy-dispatcher.init b/debian/mediaproxy-dispatcher.init deleted file mode 100644 index dfc3344..0000000 --- a/debian/mediaproxy-dispatcher.init +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh -# -### BEGIN INIT INFO -# Provides: mediaproxy-dispatcher -# Required-Start: $syslog $network $local_fs $remote_fs $time -# Required-Stop: $syslog $network $local_fs $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start the MediaProxy dispatcher -# Description: Start the MediaProxy dispatcher -### END INIT INFO - -NAME="mediaproxy-dispatcher" -DESC="MediaProxy dispatcher" - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/bin/media-dispatcher -PIDFILE=/var/run/mediaproxy/dispatcher.pid -OPTIONS= - -set -e - -test -f $DAEMON || exit 0 - -. /lib/lsb/init-functions - -case "$1" in - start|debug) - log_daemon_msg "Starting $DESC" "media-dispatcher" - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON -- $OPTIONS || log_progress_msg "already running" - log_end_msg 0 - ;; - stop) - log_daemon_msg "Stopping $DESC" "media-dispatcher" - start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE - log_end_msg 0 - ;; - restart|force-reload) - log_daemon_msg "Restarting $DESC" "media-dispatcher" - start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE - sleep 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON -- $OPTIONS - log_end_msg 0 - ;; - *) - echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" - exit 1 - ;; -esac - -exit 0 diff --git a/debian/mediaproxy-dispatcher.service b/debian/mediaproxy-dispatcher.service new file mode 100644 index 0000000..4280a97 --- /dev/null +++ b/debian/mediaproxy-dispatcher.service @@ -0,0 +1,17 @@ +[Unit] +Description=MediaProxy dispatcher +Documentation=man:media-dispatcher +After=network.target mysqld.service mariadb.service + +[Service] +Type=simple +RuntimeDirectory=mediaproxy +RuntimeDirectoryMode=755 +RuntimeDirectoryPreserve=yes +Environment=PYTHONUNBUFFERED=yes +ExecStart=/usr/bin/media-dispatcher --systemd +Restart=on-abnormal +LimitCORE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/debian/mediaproxy-relay.init b/debian/mediaproxy-relay.init deleted file mode 100644 index 383a7d5..0000000 --- a/debian/mediaproxy-relay.init +++ /dev/null @@ -1,58 +0,0 @@ -#! /bin/sh -# -### BEGIN INIT INFO -# Provides: mediaproxy-relay -# Required-Start: $syslog $network $local_fs $remote_fs $time -# Required-Stop: $syslog $network $local_fs $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start the MediaProxy relay -# Description: Start the MediaProxy relay -### END INIT INFO - -NAME="mediaproxy-relay" -DESC="MediaProxy relay" - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/bin/media-relay -PIDFILE=/var/run/mediaproxy/relay.pid -OPTIONS= - -set -e - -test -f $DAEMON || exit 0 - -. /lib/lsb/init-functions - -case "$1" in - start|debug) - log_daemon_msg "Starting $DESC" "media-relay" - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON -- $OPTIONS || log_progress_msg "already running" - log_end_msg 0 - ;; - stop) - log_daemon_msg "Stopping $DESC" "media-relay" - start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE - log_end_msg 0 - ;; - stop-gracefully) - log_daemon_msg "Stopping $DESC when all sessions are done" "media-relay" - start-stop-daemon --oknodo --stop --quiet --signal 1 --pidfile $PIDFILE - log_end_msg 0 - ;; - restart|force-reload) - log_daemon_msg "Restarting $DESC" "media-relay" - start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE - sleep 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON -- $OPTIONS - log_end_msg 0 - ;; - *) - echo "Usage: /etc/init.d/$NAME {start|stop|stop-gracefully|restart|force-reload}" - exit 1 - ;; -esac - -exit 0 diff --git a/debian/mediaproxy-relay.service b/debian/mediaproxy-relay.service new file mode 100644 index 0000000..c975d9b --- /dev/null +++ b/debian/mediaproxy-relay.service @@ -0,0 +1,14 @@ +[Unit] +Description=MediaProxy relay +Documentation=man:media-relay +After=network.target nss-lookup.target thor-eventserver.service + +[Service] +Type=simple +Environment=PYTHONUNBUFFERED=yes +ExecStart=/usr/bin/media-relay --systemd +Restart=on-abnormal +LimitCORE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index 70e2f8f..97b067b 100644 --- a/debian/rules +++ b/debian/rules @@ -1,23 +1,26 @@ #!/usr/bin/make -f #export DH_VERBOSE=1 %: dh $@ --with python2,apache2 --buildsystem=pybuild override_dh_clean: dh_clean rm -rf build dist MANIFEST override_dh_auto_install: dh_auto_install mv debian/tmp/etc/mediaproxy/config.ini.sample debian/tmp/etc/mediaproxy/config.ini override_dh_install: dh_install install -D -m 644 web/config/media_sessions.conf.sample debian/mediaproxy-web-sessions/etc/mediaproxy/web/media_sessions.conf +override_dh_installsystemd: + dh_installsystemd --no-start + override_dh_fixperms: dh_fixperms chmod 600 debian/mediaproxy-common/etc/mediaproxy/config.ini