diff options
author | Leonardo Arena <rnalrd@gmail.com> | 2010-06-28 08:51:17 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@gmail.com> | 2010-06-28 08:51:17 +0000 |
commit | 78e13c7934f6f1f69df4a3c6674b390791d2a5da (patch) | |
tree | a287f83aeaa899156c1aee14b04d0c0b44794c9a /testing/sems | |
parent | f7b7bee3e81109a892e43065b6c16cd8c3779502 (diff) | |
download | aports-78e13c7934f6f1f69df4a3c6674b390791d2a5da.tar.bz2 aports-78e13c7934f6f1f69df4a3c6674b390791d2a5da.tar.xz |
testing/sems: upgrade to 1.2.1
Diffstat (limited to 'testing/sems')
-rw-r--r-- | testing/sems/APKBUILD | 49 | ||||
-rw-r--r-- | testing/sems/sems.conf | 352 | ||||
-rw-r--r-- | testing/sems/sems.initd | 27 | ||||
-rw-r--r-- | testing/sems/sems.post-install | 6 | ||||
-rw-r--r-- | testing/sems/sems.pre-install | 5 |
5 files changed, 421 insertions, 18 deletions
diff --git a/testing/sems/APKBUILD b/testing/sems/APKBUILD index 2f1e6ee055..9d16fc8336 100644 --- a/testing/sems/APKBUILD +++ b/testing/sems/APKBUILD @@ -6,12 +6,12 @@ pkgrel=0 pkgdesc="High performance, extensible media server for SIP (RFC3261) based VoIP services" url="http://iptel.org/sems/" license="GPL-2" -depends="kamailio" -makedepends="python-dev openssl-dev lame-dev" -install= -subpackages= +install="$pkgname.pre-install $pkgname.post-install" +makedepends="python-dev openssl-dev cmake bash" source="http://ftp.iptel.org/pub/sems/sems-$pkgver.tar.gz 0003-cc-and-cflags.patch + sems.conf + sems.initd " prepare() { @@ -22,37 +22,50 @@ prepare() { patch -p1 -i $i || return 1 done - sed -i -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \ - -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' \ + sed -i -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' \ + -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \ Makefile.defs \ || return 1 + + # Patch for fixin unistd.h + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/AmArg.cpp + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/AmMediaProcessor.cpp + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/AmRtpReceiver.cpp + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/plug-in/sipctrl/udp_trsp.cpp + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/plug-in/stats/query_stats.cxx + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' apps/annrecorder/AnnRecorder.cpp + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' apps/callback/CallBack.cpp + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' apps/diameter_client/ServerConnection.cpp + sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' apps/dsm/mods/mod_sys/ModSys.cpp } build() { cd "$srcdir"/$pkgname-$pkgver - make PREFIX=/usr \ - cfg-dir=/etc/sems/ \ - CC="$CC" CXX="$CXX" \ - exclude_modules+="ivr examples py_sems speex gateway echo g722" \ + make PREFIX=/usr \ + cfg-target=/etc/sems/ \ + exclude_modules+="ivr examples py_sems speex gateway mp3 echo g722" \ WITH_MPG123DECODER=no \ - || return 1 + all || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver - make PREFIX=/usr \ - cfg-dir=/etc/sems/ \ - exclude_modules+="ivr examples py_sems speex gateway echo g722" \ + + make PREFIX=/usr \ DESTDIR="$pkgdir" \ + cfg-target=/etc/sems/ \ + cfg-prefix="$pkgdir" \ + exclude_modules+="ivr examples py_sems speex gateway mp3 echo g722" \ WITH_MPG123DECODER=no \ install || return 1 - # remove the 2 lines below (and this) if there is no init.d script -# install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname -# install -m644 -D "$srcdir"//$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/sems/$pkgname.conf } md5sums="f0545c0708849e1a723d453244c2a79e sems-1.2.1.tar.gz -0054e6ed7e11393e71204876179d3199 0003-cc-and-cflags.patch" +0054e6ed7e11393e71204876179d3199 0003-cc-and-cflags.patch +8b74528c8605b7adb01a0133fcd0c247 sems.conf +2e738c6402eb1fbceb279cf050a9090f sems.initd" diff --git a/testing/sems/sems.conf b/testing/sems/sems.conf new file mode 100644 index 0000000000..5e0ba4935e --- /dev/null +++ b/testing/sems/sems.conf @@ -0,0 +1,352 @@ +# $Id: sems.conf.sample 1541 2009-10-14 12:00:58Z sayer $ +# +# sems.conf.sample +# +# Sip Express Media Server (sems) +# +# sample configuration file +# +# +# whitespaces (spaces and tabs) are ignored +# comments start with a "#" and may be used inline +# +# example: option=value # i like this option +# +# @filename includes mod_config_path/filename +# @/absolute/path/to/file includes file + +############################################################ +# Network configuration + +# optional parameter: media_ip=<ip_address>|<device> +# +# - this informs SEMS about the IP address or interface that +# SEMS uses to send and receive media. If not set, defaults +# to first non-loopback interface. +# +# Examples: +# media_ip=10.0.0.34 +# media_ip=eth0 + +# optional parameter: sip_ip=<ip_address> +# +# - this informs SEMS about the SIP IP where its SIP stack is +# bound to or should be bound to. If 'sipctrl' SIP stack is used, +# the SIP stack will bind to this address. This also sets +# the value used for contact header in outgoing calls and +# registrations. If not set, defaults to first non-loopback +# interface. +# +# Example: +# sip_ip=10.0.0.34 +# + +# optional parameter: public_ip=<ip_address> +# +# - when running SEMS behind certain simple NAT configurations, +# you can use this parameter to inform SEMS of its public IP +# address. If this parameter is set, SEMS will write this value +# into SDP bodies. +# If this parameter is not set, the local IP address is used. +# N.B., there is no support for port translation; the local +# RTP port is advertised in SDP in either case. +# +# Example: +# public_ip=75.101.219.48 +# + +# optional parameter: sip_port=<port_number> +# +# - this informs SEMS about the port where its SIP stack is +# bound to or should be bound to. SEMS needs this information +# to correctly set the contact header in outgoing calls +# and registrations. Should be set to equal the 'port' +# configuration option in ser_sems.cfg. +# This does not need to be set if sipctrl SIP stack, outgoing +# calls and registrations from SEMS are not used. +# +# default: 5060 +# +sip_port=5080 + +# optional parameter: outbound_proxy=uri +# +# - this sets a next hop for calls and registrations outgoing +# from SEMS. This does not apply to requests in a dialog that +# is initiated by someone else and incoming to SEMS, as in +# this case the next_hop is taken by SEMS from the incoming +# request that established the dialog. +# If this is not set (default setting), then for dialogs +# initiated by SEMS the r-uri is resolved and the request +# is sent there directly. +# This is resolved by the SIP stack with DNS if a name is given. +# Warning: If the value set here can not be resolved, no +# requests will be sent out at all! +# +# default: empty +# +# Example: +# outbound_proxy=sip:proxy.mydomain.net + +# optional parameter: rtp_low_port=<port> +# +# - sets lowest for RTP used port +rtp_low_port=10000 + +# optional parameter: rtp_high_port=<port> +# +# - sets highest for RTP used port +rtp_high_port=60000 + +############################################################ +# modules and application configuration +# +# Configuration of plugin (module) loading: +# - if load_plugins is set, only those are loaded. +# - if load_plugins is not set, all modules in the plugin_path +# directory are loaded, except those which are listed +# in exclude_plugins. +# + +# optional parameter: plugin_path=<path> +# +# - sets the path to the plug-ins' binaries +# - may be absolute or relative to CWD +plugin_path=/usr/lib/sems/plug-in/ + +# optional parameter: load_plugins=<modules list> +# +# semicolon-separated list of modules to load. +# If empty, all modules in plugin_path are loaded. +# One of [sipctrl,unixsockctrl,binrpcctrl] must be loaded. +# +# example for announcement with only g711 and ilbc codecs +# load_plugins=wav;ilbc;announcement;sipctrl + +# optional parameter: exclude_plugins=<modules list> +# +# semicolon-separated list of modules to exclude from loading +# ('blacklist'). If empty, all modules in plugin_path are loaded. +# This has only effect it load_plugins is not set. +# +# o binrpcctrl and unixsockctrl: excluded as sipctrl is default ctrl +# o precoded_announce: no precoded sample files present +exclude_plugins=binrpcctrl;unixsockctrl;precoded_announce + +# optional parameter: application +# +# This controls which application is to be executed if there +# is no explicit application requested from the SIP stack +# (i.e. unixsockctrl and second parameter of t_write_unix). +# +# This can be one of +# $(ruri.user) - user part of ruri is taken as application, +# e.g. sip:announcement@host +# $(ruri.param) - uri parameter "app", e.g. +# sip:joe@host.net;app=announcement +# $(apphdr) - the value of the P-App-Name header is used +# +# $(mapping) - regex=>application mapping is read from +# app_mapping.conf (see app_mapping.conf) +# <application name> - application name configured here, e.g. +# application=announcement +# +# examples: +# application = conference +# application = $(mapping) +# application = $(ruri.user) +# application = $(ruri.param) +application = $(apphdr) + +# parameter: plugin_config_path=<path> +# +# - in this path configuration files of the applications +# (e.g. announcement.conf) are searched +plugin_config_path=/etc/sems/etc/ + +# optional parameter: exclude_payloads=<payload list> +# +# semicolon-separated list of payloads to exclude from loading +# ('blacklist'). +# +# For example, to only use low bandwidth codecs: +# exclude_payloads=PCMU;PCMA;G726-40;G726-32;G721;L16 +# or, to use only codecs which are not CPU-intensive: +# exclude_payloads=iLBC;speex; +# only use G711 (exclude everything else): +# exclude_payloads=iLBC;speex;G726-40;G726-32;G721;G726-24;G726-16;GSM;L16 + +############################################################ +# logging and running + +# optional parameter: fork={yes|no} +# +# - specifies if sems should run in daemon mode (background) +# (fork=no is the same as -E) +fork=yes + +# optional parameter: stderr={yes|no} +# +# - debug mode: do not fork and log to stderr +# (stderr=yes is the same as -E) +stderr=no + +# optional parameter: loglevel={0|1|2|3} +# +# - sets log level (error=0, warning=1, info=2, debug=3) +# (same as -D) +loglevel=2 + +# optional parameter: syslog_facility={DAEMON|USER|LOCAL[0-7]} +# +# - sets the log facility that is used for syslog. Using this, +# the log can for example be filtered into a special file +# by the syslog daemon. +# +# Default: DAEMON +# +# Example: +# syslog_facility=LOCAL0 + +# optional parameter: log_sessions=[yes|no] +# +# Default: no +# +# If log_sessions=yes is set, INFO level log messages are generated +# for each session when it is started and stopped. +# +# log_sessions=yes + +# optional parameter: log_events=[yes|no] +# +# Default: no +# +# If log_eventy=yes is set, generic DBG level log messages are +# generated for each event that is posted into an event queue. +# +# log_events=yes + + +############################################################ +# tuning + +# optional parameter: media_processor_threads=<num_value> +# +# - controls how many threads should be created that +# process media - on single-processor systems set this +# parameter to 1 (default), on MP systems to a higher +# value +# +# media_processor_threads=1 + + +# optional parameter: session_limit=<limit>;<err code>;<err reason> +# +# - this sets a maximum active session limit. If that limit is +# reached, no further calls are accepted, but the error reply +# with err code/err reason is sent out. +# +# Default: 0 (None) +# +# Example: +# session_limit="1000;503;Server overload" + +# optional parameter: options_session_limit=<limit>;<err code>;<err reason> +# +# - this sets a custom response to OPTIONS, if the session count reaches +# a certain limit. This way health monitor could raise an alarm to syste +# administrator. +# +# Default: 0 (None) +# +# Example: +# options_session_limit="900;503;Warning, server soon overloaded" + + +# optional parameter: dead_rtp_time=<unsigned int> +# +# - if != 0, after this time (in seconds) of no RTP +# a session is considered dead and stopped. If set +# to 0 no check is done for rtp timeout. +# +# default=300 (5 minutes) +# +# Examples: +# # disable RTP timeout +# dead_rtp_time=0 +# # RTP timeout after 10 seconds +# dead_rtp_time=10 + +# optional parameter: use_default_signature={yes|no} +# +# - use a Server/User-Agent header with the SEMS server +# signature and version. +# Set server_signature=0 in ser_sems.cfg if you use SER +# as SIP stack. +# +# default=no +# +use_default_signature=yes + +# optional parameter: signature=<signature string> +# +# - use a Server/User-Agent header with a custom user agent +# signature. +# Overridden by default signature if +# use_default_signature is set. +# Set server_signature=0 in ser_sems.cfg if you use it. +# +# +# signature="SEMS media server 1.0" + +# optional parameter: single_codec_in_ok={yes|no} +# +# - use single codec in 200 OK response +# +# default=no +# +# single_codec_in_ok=no + +# optional parameter: codec_order=codec_name_1,codec_name2,... +# +# - Codec order used when sending INVITE requests. Codecs in codec_order +# will be on the top of the list followed by other supported codecs +# (if any). +# +# default=empty +# +# codec_order=iLBC,GSM + +# optional parameter: ignore_rtpxheaders={yes|no} +# +# - if this is set to yes, RTP extension headers (e.g. when using ZRTP) +# are ignored. If set to no, the whole RTP packets with extension +# headers will be ignored and a debug message is printed on every +# received packet. +# +# default=no +# +# ignore_rtpxheaders=yes + +# optional parameter: dtmf_detector={spandsp|internal} +# +# sets inband DTMF detector to use. spandsp support must be compiled in +# for this to have effect if dtmf_detector=spandsp. +# +# default: internal +# +# dtmf_detector=spandsp + +# optional parameter: unhandled_reply_loglevel={error|warn|info|debug|no} +# +# the default application logic implemented in the applications is to stop +# the session right after sending BYE, without waiting for a reply. this +# leads to many log entries of the form +# ERROR: [b6fa6bb0] handleSipMsg (AmSipDispatcher.cpp:48): unhandled +# reply: [code:200;phrase:[OK];... ] +# +# This parameter sets the log lovel of unhandled positive (200 class) replies. +# +# default: error +# +# unhandled_reply_loglevel=info diff --git a/testing/sems/sems.initd b/testing/sems/sems.initd new file mode 100644 index 0000000000..9cf98a185e --- /dev/null +++ b/testing/sems/sems.initd @@ -0,0 +1,27 @@ +#!/sbin/runscript + +daemon=/usr/sbin/sems +pidfile=/var/run/sems/sems.pid +conffile=/etc/sems/sems.conf + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting sems" + start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \ + -- \ + -u sems \ + -g sems \ + -P $pidfile \ + -f $conffile + eend $? +} + +stop() { + ebegin "Stopping sems" + start-stop-daemon --stop --quiet --pidfile $pidfile + eend $? +} diff --git a/testing/sems/sems.post-install b/testing/sems/sems.post-install new file mode 100644 index 0000000000..cd800bdcd6 --- /dev/null +++ b/testing/sems/sems.post-install @@ -0,0 +1,6 @@ +#!/bin/sh + +mkdir -p /var/run/sems 2>/dev/null +chown -R sems:sems /var/run/sems 2>/dev/null +chgrp sems /etc/sems/sems.cfg 2>/dev/null +exit 0 diff --git a/testing/sems/sems.pre-install b/testing/sems/sems.pre-install new file mode 100644 index 0000000000..3e82578a3e --- /dev/null +++ b/testing/sems/sems.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +adduser -H -h /var/empty -s /bin/false -D sems 2>/dev/null + +exit 0 |