mirror of https://github.com/sipwise/sems.git
commit
2f9a6aa33f
@ -0,0 +1,8 @@
|
||||
COREPATH =../..
|
||||
|
||||
plug_in_name = opus
|
||||
|
||||
#module_cflags = -I /opt/include
|
||||
module_ldflags = -lm -fPIC -lopus
|
||||
|
||||
include ../Makefile.audio_module
|
||||
@ -0,0 +1,246 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2003 Fhg Fokus
|
||||
*
|
||||
* This file is part of SEMS, a free SIP media server.
|
||||
*
|
||||
* SEMS 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 released under
|
||||
* the GPL with the additional exemption that compiling, linking,
|
||||
* and/or using OpenSSL is allowed.
|
||||
*
|
||||
* For a license to use the SEMS software under conditions
|
||||
* other than those described here, or to purchase support for this
|
||||
* software, please contact iptel.org by e-mail at the following addresses:
|
||||
* info@iptel.org
|
||||
*
|
||||
* SEMS 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "amci.h"
|
||||
#include "codecs.h"
|
||||
#include "../../log.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
/**
|
||||
* @file plug-in/opus/opus.c
|
||||
* OPUS support
|
||||
* This plug-in imports the OPUS Codec.
|
||||
*
|
||||
* See http://www.opus-codec.org/ .
|
||||
* Features: <ul>
|
||||
* <li>OPUS codec/payload/subtype
|
||||
* <li>OPUS file format
|
||||
* </ul>
|
||||
*
|
||||
*/
|
||||
|
||||
#include <opus/opus.h>
|
||||
|
||||
#define _OPUS_APPLICATION_ OPUS_APPLICATION_VOIP
|
||||
/* Allowed values:
|
||||
OPUS_APPLICATION_VOIP Process signal for improved speech intelligibility.
|
||||
OPUS_APPLICATION_AUDIO Favor faithfulness to the original input.
|
||||
OPUS_APPLICATION_RESTRICTED_LOWDELAY Configure the minimum possible coding delay by disabling certain modes of operation.*/
|
||||
|
||||
#define _OPUS_MAX_BANDWIDTH_ OPUS_BANDWIDTH_FULLBAND
|
||||
/* Allowed values:
|
||||
OPUS_BANDWIDTH_NARROWBAND - 4 kHz passband
|
||||
OPUS_BANDWIDTH_MEDIUMBAND - 6 kHz passband
|
||||
OPUS_BANDWIDTH_WIDEBAND - 8 kHz passband
|
||||
OPUS_BANDWIDTH_SUPERWIDEBAND - 12 kHz passband
|
||||
OPUS_BANDWIDTH_FULLBAND - 20 kHz passband */
|
||||
|
||||
#define _OPUS_PKT_LOSS_PCT_ 5
|
||||
/* Allowed values: 0 - 100 */
|
||||
|
||||
#define _OPUS_COMPLEXITY_ 10
|
||||
/* Allowed values: 0 - 10, where 10 is highest computational complexity */
|
||||
|
||||
#define _OPUS_INBAND_FEC_ 1
|
||||
/* Forward error correction.
|
||||
Allowed values: 0 - 1 */
|
||||
|
||||
#define _OPUS_DTX_ 0
|
||||
/* Discontinued transmission
|
||||
Allowed values: 0 - 1 */
|
||||
|
||||
static int opus_2_pcm16( unsigned char* out_buf, unsigned char* in_buf, unsigned int size,
|
||||
unsigned int channels, unsigned int rate, long h_codec );
|
||||
|
||||
static int opus_plc( unsigned char* out_buf, unsigned int size,
|
||||
unsigned int channels, unsigned int rate, long h_codec );
|
||||
|
||||
static int pcm16_2_opus( unsigned char* out_buf, unsigned char* in_buf, unsigned int size,
|
||||
unsigned int channels, unsigned int rate, long h_codec );
|
||||
static long opus_create(const char* format_parameters, amci_codec_fmt_info_t* format_description);
|
||||
static void opus_destroy(long h_inst);
|
||||
|
||||
#if SYSTEM_SAMPLECLOCK_RATE >= 48000
|
||||
#define _OPUS_RATE 48000
|
||||
#elif SYSTEM_SAMPLECLOCK_RATE >= 24000
|
||||
#define _OPUS_RATE 24000
|
||||
#elif SYSTEM_SAMPLECLOCK_RATE >= 12000
|
||||
#define _OPUS_RATE 12000
|
||||
#elif SYSTEM_SAMPLECLOCK_RATE >= 8000
|
||||
#define _OPUS_RATE 8000
|
||||
#else
|
||||
#error Minimal sample rate for OPUS codec is 8000.
|
||||
#endif
|
||||
|
||||
BEGIN_EXPORTS( "opus" , AMCI_NO_MODULEINIT, AMCI_NO_MODULEDESTROY )
|
||||
|
||||
BEGIN_CODECS
|
||||
CODEC( CODEC_OPUS, pcm16_2_opus, opus_2_pcm16, opus_plc,
|
||||
opus_create,
|
||||
opus_destroy,
|
||||
NULL, NULL )
|
||||
END_CODECS
|
||||
|
||||
BEGIN_PAYLOADS
|
||||
PAYLOAD( -1, "opus", _OPUS_RATE, 48000, 1, CODEC_OPUS, AMCI_PT_AUDIO_FRAME )
|
||||
END_PAYLOADS
|
||||
|
||||
BEGIN_FILE_FORMATS
|
||||
END_FILE_FORMATS
|
||||
|
||||
END_EXPORTS
|
||||
|
||||
typedef struct {
|
||||
OpusEncoder* opus_enc;
|
||||
OpusDecoder* opus_dec;
|
||||
} opus_state_t;
|
||||
|
||||
long opus_create(const char* format_parameters, amci_codec_fmt_info_t* format_description) {
|
||||
opus_state_t* codec_inst;
|
||||
int error;
|
||||
|
||||
if (format_parameters) {
|
||||
DBG("OPUS params: >>%s<<.\n", format_parameters);
|
||||
}
|
||||
|
||||
format_description[0].id = AMCI_FMT_FRAME_LENGTH ;
|
||||
format_description[0].value = 20;
|
||||
format_description[1].id = AMCI_FMT_FRAME_SIZE;
|
||||
format_description[1].value = 20 * _OPUS_RATE / 1000;
|
||||
format_description[2].id = 0;
|
||||
|
||||
codec_inst = (opus_state_t*)malloc(sizeof(opus_state_t));
|
||||
|
||||
if (!codec_inst)
|
||||
return -1;
|
||||
|
||||
codec_inst->opus_enc = opus_encoder_create(_OPUS_RATE,1,_OPUS_APPLICATION_,&error);
|
||||
if (error) {
|
||||
DBG("OPUS: error %d while creating encoder state.\n", error);
|
||||
return -1;
|
||||
}
|
||||
|
||||
opus_encoder_ctl(codec_inst->opus_enc, OPUS_SET_FORCE_CHANNELS(1));
|
||||
opus_encoder_ctl(codec_inst->opus_enc, OPUS_SET_MAX_BANDWIDTH(_OPUS_MAX_BANDWIDTH_));
|
||||
opus_encoder_ctl(codec_inst->opus_enc, OPUS_SET_PACKET_LOSS_PERC(_OPUS_PKT_LOSS_PCT_));
|
||||
opus_encoder_ctl(codec_inst->opus_enc, OPUS_SET_COMPLEXITY(_OPUS_COMPLEXITY_));
|
||||
opus_encoder_ctl(codec_inst->opus_enc, OPUS_SET_INBAND_FEC(_OPUS_INBAND_FEC_));
|
||||
opus_encoder_ctl(codec_inst->opus_enc, OPUS_SET_DTX(_OPUS_DTX_));
|
||||
|
||||
codec_inst->opus_dec = opus_decoder_create(_OPUS_RATE,1,&error);
|
||||
if (error) {
|
||||
DBG("OPUS: error %d while creating decoder state.\n", error);
|
||||
opus_encoder_destroy(codec_inst->opus_enc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (long)codec_inst;
|
||||
}
|
||||
|
||||
void opus_destroy(long h_inst) {
|
||||
opus_state_t* codec_inst;
|
||||
|
||||
if (h_inst) {
|
||||
codec_inst = (opus_state_t*)h_inst;
|
||||
opus_encoder_destroy(codec_inst->opus_enc);
|
||||
opus_decoder_destroy(codec_inst->opus_dec);
|
||||
free(codec_inst);
|
||||
}
|
||||
}
|
||||
|
||||
int pcm16_2_opus( unsigned char* out_buf, unsigned char* in_buf, unsigned int size,
|
||||
unsigned int channels, unsigned int rate, long h_codec )
|
||||
{
|
||||
opus_state_t* codec_inst;
|
||||
int res;
|
||||
|
||||
if (!h_codec){
|
||||
ERROR("opus codec not initialized.\n");
|
||||
return 0;
|
||||
}
|
||||
codec_inst = (opus_state_t*)h_codec;
|
||||
|
||||
res = opus_encode(codec_inst->opus_enc, (opus_int16*)in_buf, size/2/channels, out_buf, AUDIO_BUFFER_SIZE);
|
||||
/* returns bytes in encoded frame */
|
||||
|
||||
/* DBG ("OPUS encode: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res); */
|
||||
return res;
|
||||
}
|
||||
|
||||
static int opus_2_pcm16( unsigned char* out_buf, unsigned char* in_buf, unsigned int size,
|
||||
unsigned int channels, unsigned int rate, long h_codec )
|
||||
{
|
||||
opus_state_t* codec_inst;
|
||||
int res;
|
||||
|
||||
if (!h_codec){
|
||||
ERROR("opus codec not initialized.\n");
|
||||
return 0;
|
||||
}
|
||||
codec_inst = (opus_state_t*)h_codec;
|
||||
|
||||
if (0<(res = opus_decode(codec_inst->opus_dec, in_buf, size, (opus_int16*)out_buf, AUDIO_BUFFER_SIZE/2, 0))) {
|
||||
/* returns samples in encoded frame */
|
||||
res*=2;
|
||||
}
|
||||
|
||||
/* DBG ("OPUS decode: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res); */
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
static int opus_plc( unsigned char* out_buf, unsigned int size,
|
||||
unsigned int channels, unsigned int rate, long h_codec )
|
||||
{
|
||||
opus_state_t* codec_inst;
|
||||
int res;
|
||||
|
||||
if (!h_codec){
|
||||
ERROR("opus codec not initialized.\n");
|
||||
return 0;
|
||||
}
|
||||
codec_inst = (opus_state_t*)h_codec;
|
||||
|
||||
if (size/channels > AUDIO_BUFFER_SIZE) {
|
||||
/* DBG("OPUS plc: size %d, chan %d exceeds buffer size %d.\n", size, channels, AUDIO_BUFFER_SIZE); */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (0<(res = opus_decode(codec_inst->opus_dec, NULL, 0, (opus_int16*)out_buf, size/2/channels, 0))) {
|
||||
/* returns samples in encoded frame */
|
||||
res*=2;
|
||||
}
|
||||
|
||||
/* DBG ("OPUS plc: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res); */
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
#include "fct.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
#include "AmSdp.h"
|
||||
|
||||
#define CRLF "\r\n"
|
||||
#define LF "\n"
|
||||
|
||||
FCTMF_SUITE_BGN(test_sdp) {
|
||||
|
||||
FCT_TEST_BGN(normal_sdp_ok) {
|
||||
AmSdp s;
|
||||
string sdp =
|
||||
"v=0" CRLF
|
||||
"o=- 3615077380 3615077398 IN IP4 178.66.14.5" CRLF
|
||||
"s=-" CRLF
|
||||
"c=IN IP4 178.66.14.5" CRLF
|
||||
"t=0 0" CRLF
|
||||
"m=audio 21964 RTP/AVP 0 101" CRLF
|
||||
"a=sendrecv" CRLF
|
||||
"a=ptime:20" CRLF
|
||||
"a=rtpmap:0 PCMU/8000" CRLF
|
||||
"a=rtpmap:101 telephone-event/8000" CRLF
|
||||
"a=fmtp:101 0-15" CRLF ;
|
||||
|
||||
fct_chk(!s.parse(sdp.c_str()));
|
||||
fct_chk(s.version==0);
|
||||
fct_chk(s.origin.user == "-");
|
||||
fct_chk(s.origin.sessId == 3615077380);
|
||||
fct_chk(s.origin.sessV == 3615077398);
|
||||
fct_chk(s.origin.conn.address == "178.66.14.5");
|
||||
fct_chk(s.origin.conn.network == NT_IN);
|
||||
fct_chk(s.origin.conn.addrType == AT_V4);
|
||||
|
||||
fct_chk(s.conn.address == "178.66.14.5");
|
||||
fct_chk(s.conn.network == NT_IN);
|
||||
fct_chk(s.conn.addrType == AT_V4);
|
||||
|
||||
fct_chk(s.media.size() == 1);
|
||||
fct_chk(s.media[0].type == MT_AUDIO);
|
||||
fct_chk(s.media[0].port == 21964);
|
||||
fct_chk(s.media[0].transport == TP_RTPAVP);
|
||||
fct_chk(s.media[0].payloads.size()==2);
|
||||
fct_chk(s.media[0].payloads[0].payload_type==0);
|
||||
fct_chk(s.media[0].payloads[1].payload_type==101);
|
||||
fct_chk(s.media[0].payloads[0].encoding_name=="PCMU");
|
||||
fct_chk(s.media[0].payloads[1].encoding_name=="telephone-event");
|
||||
} FCT_TEST_END();
|
||||
|
||||
FCT_TEST_BGN(sdp_LF_no_CRLF) {
|
||||
AmSdp s;
|
||||
string sdp =
|
||||
"v=0" LF
|
||||
"o=- 3615077380 3615077398 IN IP4 178.66.14.5" LF
|
||||
"s=-" LF
|
||||
"c=IN IP4 178.66.14.5" LF
|
||||
"t=0 0" LF
|
||||
"m=audio 21964 RTP/AVP 0 101" LF
|
||||
"a=sendrecv" LF
|
||||
"a=ptime:20" LF
|
||||
"a=rtpmap:0 PCMU/8000" LF
|
||||
"a=rtpmap:101 telephone-event/8000" LF
|
||||
"a=fmtp:101 0-15" LF ;
|
||||
|
||||
fct_chk(!s.parse(sdp.c_str()));
|
||||
fct_chk(s.version==0);
|
||||
fct_chk(s.origin.user == "-");
|
||||
fct_chk(s.origin.sessId == 3615077380);
|
||||
fct_chk(s.origin.sessV == 3615077398);
|
||||
fct_chk(s.origin.conn.address == "178.66.14.5");
|
||||
fct_chk(s.origin.conn.network == NT_IN);
|
||||
fct_chk(s.origin.conn.addrType == AT_V4);
|
||||
|
||||
fct_chk(s.conn.address == "178.66.14.5");
|
||||
fct_chk(s.conn.network == NT_IN);
|
||||
fct_chk(s.conn.addrType == AT_V4);
|
||||
|
||||
fct_chk(s.media.size() == 1);
|
||||
fct_chk(s.media[0].type == MT_AUDIO);
|
||||
fct_chk(s.media[0].port == 21964);
|
||||
fct_chk(s.media[0].transport == TP_RTPAVP);
|
||||
fct_chk(s.media[0].payloads.size()==2);
|
||||
fct_chk(s.media[0].payloads[0].payload_type==0);
|
||||
fct_chk(s.media[0].payloads[1].payload_type==101);
|
||||
fct_chk(s.media[0].payloads[0].encoding_name=="PCMU");
|
||||
fct_chk(s.media[0].payloads[1].encoding_name=="telephone-event");
|
||||
} FCT_TEST_END();
|
||||
|
||||
} FCTMF_SUITE_END();
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
# postrm script for ngcp-sems
|
||||
|
||||
set -e
|
||||
|
||||
removal_wrapper() {
|
||||
# remove the init script only on ce systems, as the
|
||||
# the pro system handle it inside the monitoring/HA setup
|
||||
if ! [ -x "$(which ngcp-check_active 2>/dev/null)" ]; then
|
||||
update-rc.d ngcp-sems remove >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "purge" ] ; then
|
||||
removal_wrapper
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@ -1,4 +1,3 @@
|
||||
sipwise/sw_vcs.patch
|
||||
upstream/0001-dsm-mod_dlg-q-f-make-compilable.patch
|
||||
no_config.patch
|
||||
py_sems_path.patch
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
From c008d587acc92faa62afb622ce15e85a72d54c38 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=A1clav=20Kubart?= <vaclav.kubart@frafos.com>
|
||||
Date: Fri, 16 May 2014 16:19:55 +0200
|
||||
Subject: [PATCH] dsm mod_dlg q/f: make compilable
|
||||
|
||||
---
|
||||
apps/dsm/mods/mod_dlg/ModDlg.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/apps/dsm/mods/mod_dlg/ModDlg.h b/apps/dsm/mods/mod_dlg/ModDlg.h
|
||||
index 23cb104..098f772 100644
|
||||
--- a/apps/dsm/mods/mod_dlg/ModDlg.h
|
||||
+++ b/apps/dsm/mods/mod_dlg/ModDlg.h
|
||||
@@ -52,6 +52,7 @@ DEF_ACTION_1P(DLGGetOtherIdAction);
|
||||
DEF_ACTION_1P(DLGGetRtpRelayModeAction);
|
||||
|
||||
DEF_ACTION_2P(DLGReferAction);
|
||||
+DEF_ACTION_2P(DLGInfoAction);
|
||||
DEF_ACTION_2P(DLGB2BRelayErrorAction);
|
||||
|
||||
DEF_ACTION_2P(DLGAddReplyBodyPartAction);
|
||||
--
|
||||
2.0.0.rc0
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
core/compat/getarch
|
||||
core/compat/getos
|
||||
@ -0,0 +1,7 @@
|
||||
This plugin implements JSON-RPC protocol version 2.0
|
||||
(http://www.jsonrpc.org/specification) operating over TCP/Netstrings.
|
||||
Each request and response is of form <size>:<request or response> where
|
||||
<size> tells the number of bytes in <request or response>.
|
||||
|
||||
Configuration file jsonrpc.conf can contain parameters jsonrpc_port
|
||||
(default 7080) and server_threads (default 5).
|
||||
@ -0,0 +1,112 @@
|
||||
sems (1.6.0~dev) unstable; urgency=medium
|
||||
|
||||
* Devel version
|
||||
|
||||
-- Victor Seva <linuxmaniac@torreviejawireless.org> Thu, 03 Apr 2014 17:52:53 +0200
|
||||
|
||||
sems (1.5.0) maverick; urgency=low
|
||||
|
||||
* Core
|
||||
- configurable SIP timers (global)
|
||||
- timer C support (mainly for SBC)
|
||||
- SUBSCRIBE/NOTIFY support
|
||||
- multi-mime bodies
|
||||
- wideband / multiple sample frequency support
|
||||
- multiple destinations (faked SRV record)
|
||||
- DNS SRV: support for 503 replies
|
||||
- multi-threaded RTP receiver
|
||||
- complete rework of offer/answer mechanisms
|
||||
|
||||
* Codecs:
|
||||
- iSAC
|
||||
- SILK
|
||||
- SPEEX 16kHz, 32kHz
|
||||
- G722
|
||||
- L16
|
||||
|
||||
* SBC
|
||||
- audio & dtmf transcoder
|
||||
- call-control modules
|
||||
- lots of small improvements
|
||||
|
||||
* Monitoring
|
||||
- munin plugin
|
||||
|
||||
* DSM
|
||||
- mod_xml: XML handling
|
||||
- mod_curl: HTTP requests
|
||||
- mod_subscription: SUBSCRIBE/NOTIFY
|
||||
- mod_regex: regular expressions
|
||||
- lots of small improvements
|
||||
|
||||
* App Plug-ins
|
||||
- db_reg_agent: register SIP accounts from a DB
|
||||
- rtmp: RTMP gateway
|
||||
|
||||
-- Raphael Coeffic <rco@iptel.org> Tue, 03 Jul 2012 15:06:08 +0200
|
||||
|
||||
sems (1.4.0) maverick; urgency=low
|
||||
|
||||
* SEMS 1.4.0 release
|
||||
|
||||
-- Stefan Sayer <stefan.sayer@frafos.com> Tue, 15 Mar 2011 11:13:05 +0100
|
||||
|
||||
sems (1.3.0) unstable; urgency=low
|
||||
|
||||
* 100rel (PRACK) support
|
||||
* DNS cache, lb on SRV records
|
||||
* B2B with Session Timer
|
||||
* json-rpc v2 module
|
||||
* SIP stack moved into core
|
||||
* optimizations, especially for signaling
|
||||
* many DSM improvements
|
||||
|
||||
-- Stefan Sayer <stefan.sayer@frafos.com> Sun, 26 Sep 2010 17:35:22 -0400
|
||||
|
||||
sems (1.2.0) unstable; urgency=low
|
||||
|
||||
* SEMS 1.2.0 release
|
||||
|
||||
-- Stefan Sayer <stefan.sayer@frafos.com> Tue, 30 Mar 2010 21:46:39 +0200
|
||||
|
||||
sems (1.1.1) unstable; urgency=low
|
||||
|
||||
* SEMS 1.1.1 bugfix release - fixed Via HF missing the port number
|
||||
in ACK to 200 reply - do not try to scale too short RTP packets -
|
||||
fixed initialization of SSL - caused random crashing of xmlrpc
|
||||
server - fix size() for AmArg struct type - authenticate on both
|
||||
401 and 407 reply in click2dial - fixed ssl build dependency for
|
||||
DIAMETER client in deb
|
||||
|
||||
-- Stefan Sayer <stefan.sayer@frafos.com> Tue, 07 Jul 2009 15:13:24 +0200
|
||||
|
||||
sems (1.1.0-1) unstable; urgency=low
|
||||
|
||||
* DSM state machine scripting (it's cool!)
|
||||
* an (experimental) ISDN gateway module
|
||||
* binrpc: MT (SER->) and connection pool (->SER)
|
||||
* MT xmlrpc server
|
||||
* controlled server shutdown
|
||||
* improved logging
|
||||
* g722 in 8khz compat mode
|
||||
* out of dialog request handling for modules & dialogs without
|
||||
sessions
|
||||
* audio file autorewind, AmAudio mixing
|
||||
* SIP and media IP separately configurable
|
||||
* UID/DID support for voicemail/-box/annrecorder
|
||||
* and quite some bugs and mem leaks fixed, documentation, etc.
|
||||
|
||||
-- Stefan Sayer <sayer@iptel.org> Tue, 20 Jan 2009 18:11:25 +0100
|
||||
|
||||
sems (1.1.0-0rc1) unstable; urgency=low
|
||||
|
||||
* Debian Release Candidate 1 for 1.1.
|
||||
|
||||
-- Stefan Sayer <sayer@iptel.org> Mon, 8 Dec 2008 23:01:40 +0200
|
||||
|
||||
sems (1.0.0-0pre1-r856M) unstable; urgency=low
|
||||
|
||||
* Debian Release Candidate 1 for 1.0.
|
||||
|
||||
-- Stefan Sayer <sayer@iptel.org> Sun, 2 Mar 2002 23:41:31 +0200
|
||||
|
||||
@ -0,0 +1 @@
|
||||
9
|
||||
@ -0,0 +1,54 @@
|
||||
Source: sems
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
|
||||
Uploaders: Victor Seva <linuxmaniac@torreviejawireless.org>
|
||||
Build-Depends: debhelper (>= 9~),
|
||||
flite-dev,
|
||||
libcurl4-openssl-dev | libcurl4-gnutls-dev,
|
||||
libev-dev,
|
||||
libevent-dev (>= 2.0.0),
|
||||
libhiredis-dev,
|
||||
libmysql++-dev,
|
||||
libspandsp-dev,
|
||||
libspeex-dev,
|
||||
libssl-dev,
|
||||
libxml2-dev,
|
||||
openssl,
|
||||
python-dev,
|
||||
python-sip-dev
|
||||
Standards-Version: 3.9.5
|
||||
|
||||
Package: sems
|
||||
Architecture: any
|
||||
Depends: adduser, python, ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: SIP Express Media Server, very fast and flexible SIP media server
|
||||
SEMS, the SIP Express Media Server, is a free, high performance,
|
||||
extensible media server and SBC for SIP (RFC3261) based VoIP services. It
|
||||
features voicemail, conferencing, announcements, pre-call announcements,
|
||||
prepaid service, calling card service etc.
|
||||
|
||||
Package: sems-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: sems (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debugging symbols for Sems SIP Express Media Server
|
||||
SEMS, the SIP Express Media Server, is a free, high performance,
|
||||
extensible media server and SBC for SIP (RFC3261) based VoIP services. It
|
||||
features voicemail, conferencing, announcements, pre-call announcements,
|
||||
prepaid service, calling card service etc.
|
||||
.
|
||||
This package contains the debugging sysmbols.
|
||||
|
||||
Package: libsems1-dev
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Depends: ${misc:Depends}
|
||||
Description: development files for SIP Express Media Server
|
||||
SEMS, the SIP Express Media Server, is a free, high performance,
|
||||
extensible media server and SBC for SIP (RFC3261) based VoIP services. It
|
||||
features voicemail, conferencing, announcements, pre-call announcements,
|
||||
prepaid service, calling card service etc.
|
||||
.
|
||||
This package contains the files needed to compile sems applications.
|
||||
@ -0,0 +1,34 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: SEMS
|
||||
Upstream-Contact: semsdev@lists.iptel.org
|
||||
Source: http://www.iptel.org/sems
|
||||
|
||||
Files: *
|
||||
Copyright:
|
||||
2005-2014 Raphael Coeffic <rco@iptel.org>
|
||||
2010-2014 FRAFOS GmbH
|
||||
2005-2014 Stefan Sayer <stefan.sayer@frafos.com>
|
||||
2002-2005 FhG Fokus
|
||||
2006-2010 iptelorg GmbH
|
||||
2007-2009 IPTEGO GmbH
|
||||
2007-2013 Juha Heinanen <jh@tutpro.com>
|
||||
2007 Andreas Granig <agranig@sipwise.com>
|
||||
2009-2010 TelTech Systems Inc.
|
||||
2006-2007 Maxim Sobolev <sobomax@sippysoft.com>
|
||||
2010 Anton Zagorskiy amberovsky@gmail.com
|
||||
2011-2012 Peter Lemenkov <lemenkov@gmail.com>
|
||||
Various others (see README file)
|
||||
License: GPL-2.0+ OpenSSL exception
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
|
||||
* Exception: permission to copy, modify, propagate, and distribute a work
|
||||
* formed by combining OpenSSL toolkit software and the code in this file,
|
||||
* such as linking with software components and libraries released under
|
||||
* OpenSSL project license.
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2014 Victor Seva <linuxmaniac@torreviejawireless.org>
|
||||
2008-2014, Stefan Sayer <stefan.sayer@frafos.com>
|
||||
License: GPL-2+
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
|
||||
@ -0,0 +1,13 @@
|
||||
Makefile.defs usr/include/sems/
|
||||
core/*.h usr/include/sems/
|
||||
core/SampleArray.cc usr/include/sems/
|
||||
core/amci usr/include/sems/
|
||||
core/ampi usr/include/sems/
|
||||
core/compat/*.c usr/include/sems/compat/
|
||||
core/compat/*.h usr/include/sems/compat/
|
||||
core/compat/getarch usr/include/sems/compat/
|
||||
core/compat/getos usr/include/sems/compat/
|
||||
core/plug-in/Makefile.app_module usr/include/sems/plug-in/
|
||||
core/plug-in/Makefile.audio_module usr/include/sems/plug-in/
|
||||
core/rtp usr/include/sems/
|
||||
core/sip/*.h usr/include/sems/sip/
|
||||
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
PYTHON_MODULES=ivr conf_auth mailbox pin_collect
|
||||
|
||||
EXCLUDED_MODULES=gateway examples mp3 twit
|
||||
|
||||
EXCLUDED_DSM_MODULES=mod_aws
|
||||
EXCLUDED_DSM_PY_MODULES=mod_aws mod_py
|
||||
|
||||
CPPFLAGS += -DHAVE_XMLRPCPP_SSL
|
||||
|
||||
export USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)"
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
$(MAKE) \
|
||||
cfg-target=/etc/sems/ prefix=/usr \
|
||||
exclude_app_modules="$(EXCLUDED_MODULES)" \
|
||||
exclude_dsm_modules="$(EXCLUDED_DSM_MODULES)" \
|
||||
DESTDIR=$(CURDIR)/debian/sems
|
||||
|
||||
override_dh_auto_install:
|
||||
$(MAKE) -C core/ install \
|
||||
DESTDIR=$(CURDIR)/debian/sems \
|
||||
prefix=/usr \
|
||||
cfg-target=/etc/sems/
|
||||
|
||||
$(MAKE) -C apps/ install \
|
||||
exclude_app_modules="$(EXCLUDED_MODULES) $(PYTHON_MODULES)" \
|
||||
exclude_dsm_modules="$(EXCLUDED_DSM_PY_MODULES)" \
|
||||
DESTDIR=$(CURDIR)/debian/sems \
|
||||
prefix=/usr \
|
||||
cfg-target=/etc/sems/
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=sems-dbg
|
||||
# those binaries aren't automatically stripped
|
||||
test -r $(CURDIR)/debian/libsems1-dev/usr/include/sems/compat/getarch && \
|
||||
strip --remove-section=.comment --remove-section=.note --strip-unneeded \
|
||||
$(CURDIR)/debian/libsems1-dev/usr/include/sems/compat/getarch
|
||||
test -r $(CURDIR)/debian/libsems1-dev/usr/include/sems/compat/getos && \
|
||||
strip --remove-section=.comment --remove-section=.note --strip-unneeded \
|
||||
$(CURDIR)/debian/libsems1-dev/usr/include/sems/compat/getos
|
||||
@ -0,0 +1,25 @@
|
||||
# configuration for SEMS - SIP Express Media Server
|
||||
#
|
||||
# this file is sourced by SEMS init script /etc/init.d/sems
|
||||
|
||||
# Don't start with default config as we need to deploy the ngcp-templates first
|
||||
SEMS_RUN="no"
|
||||
|
||||
# ser configuration file
|
||||
SEMS_CFG_FILE="/etc/sems/sems.conf"
|
||||
|
||||
# user to run SEMS as
|
||||
SEMS_USER="sems"
|
||||
|
||||
# group to run SEMS as
|
||||
SEMS_GROUP="sems"
|
||||
|
||||
SEMS_RUNDIR="/var/run/sems"
|
||||
|
||||
# sems pidfile
|
||||
SEMS_PIDFILE="$SEMS_RUNDIR/sems.pid"
|
||||
|
||||
# set if you want to create core files
|
||||
SEMS_CREATE_CORE="yes"
|
||||
|
||||
SEMS_COREDIR="/var/cores"
|
||||
@ -0,0 +1,108 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: sems
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start/stop SEMS Application Server
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
# read configuration from /etc/default/sems file
|
||||
if test -f /etc/default/sems ; then
|
||||
. /etc/default/sems
|
||||
fi
|
||||
|
||||
|
||||
if test "$SEMS_RUN" = "no" ; then
|
||||
log_failure_msg "Sems start disabled by default file"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/sbin/sems
|
||||
NAME=sems
|
||||
DESC=sems
|
||||
|
||||
PARAMS=""
|
||||
|
||||
if ! test -d $SEMS_RUNDIR ; then
|
||||
mkdir $SEMS_RUNDIR
|
||||
fi
|
||||
chown $SEMS_USER:$SEMS_GROUP $SEMS_RUNDIR
|
||||
|
||||
if test "$SEMS_PIDFILE" ; then
|
||||
PARAMS="$PARAMS -P $SEMS_PIDFILE"
|
||||
fi
|
||||
|
||||
if test "$SEMS_USER" ; then
|
||||
PARAMS="$PARAMS -u $SEMS_USER"
|
||||
fi
|
||||
|
||||
if test "$SEMS_GROUP" ; then
|
||||
PARAMS="$PARAMS -g $SEMS_GROUP"
|
||||
fi
|
||||
|
||||
if test "$SEMS_CFG_FILE" ; then
|
||||
PARAMS="$PARAMS -f $SEMS_CFG_FILE"
|
||||
CFGPARAMS="-f $SEMS_CFG_FILE"
|
||||
fi
|
||||
|
||||
if test "$SEMS_CREATE_CORE" = "yes" ; then
|
||||
# directory for the core dump files
|
||||
[ -d $SEMS_COREDIR ] || mkdir $SEMS_COREDIR
|
||||
chmod 777 $SEMS_COREDIR
|
||||
echo "$SEMS_COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
|
||||
echo 2 > /proc/sys/fs/suid_dumpable
|
||||
ulimit -c unlimited
|
||||
fi
|
||||
|
||||
# raise file descriptors limit - call hold consumes two fds for RTP ports and one for moh file
|
||||
ulimit -n 100000
|
||||
|
||||
if ! test -f $DAEMON ; then
|
||||
log_failure_msg "Error: cannot find $DAEMON"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LD_LIBRARY_PATH=/usr/lib/sems
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_daemon_msg "Starting $DESC: $NAME "
|
||||
start-stop-daemon --start --quiet --oknodo --pidfile $SEMS_PIDFILE \
|
||||
--exec $DAEMON -- $PARAMS
|
||||
log_end_msg $?
|
||||
;;
|
||||
stop)
|
||||
log_daemon_msg "Stopping $DESC: $NAME "
|
||||
start-stop-daemon --oknodo --stop --quiet --pidfile $SEMS_PIDFILE \
|
||||
--exec $DAEMON
|
||||
log_end_msg $?
|
||||
;;
|
||||
restart|force-reload)
|
||||
log_daemon_msg "Restarting $DESC: $NAME "
|
||||
start-stop-daemon --oknodo --stop --quiet --pidfile \
|
||||
$SEMS_PIDFILE --exec $DAEMON
|
||||
sleep 5
|
||||
start-stop-daemon --start --quiet --pidfile \
|
||||
$SEMS_PIDFILE --exec $DAEMON -- $PARAMS
|
||||
echo "."
|
||||
;;
|
||||
status)
|
||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@ -0,0 +1 @@
|
||||
sems: possible-gpl-code-linked-with-openssl
|
||||
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# don't do anything when called with other argument than configure
|
||||
case "$1" in
|
||||
configure)
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "postinst called with unknown argument \$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# add sems user
|
||||
adduser --quiet --system --group --disabled-password --shell /bin/false \
|
||||
--gecos "SIP Express Media Server" --home /var/run/sems sems || true
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
if [ "$1" = "purge" ] ; then
|
||||
# remove user/group on purge
|
||||
if [ -x "$(command -v deluser)" ]; then
|
||||
deluser --quiet --remove-home sems >/dev/null 2>&1 || true
|
||||
else
|
||||
echo >&2 "not removing sems system account because deluser command was not found"
|
||||
fi
|
||||
# remove /etc/sems if empty
|
||||
rmdir /etc/sems || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@ -0,0 +1 @@
|
||||
3.0 (native)
|
||||
Loading…
Reference in new issue