Code Monkey home page Code Monkey logo

sems's Introduction

Build Status

Stand With Ukraine

sems

sems core is a part of project Yeti

Installation via Package (Debian)

# apt install curl gnupg
# echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list
# curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg
# echo "deb [arch=amd64] http://pkg.yeti-switch.org/debian/bullseye 1.12 main" > /etc/apt/sources.list.d/yeti.list
# curl https://pkg.yeti-switch.org/key.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/pkg.yeti-switch.org.gpg
# apt install sems sems-modules-base

check Documentation for additional versions/distributions info

Building from sources (Debian)

install prerequisites

# apt install git cmake build-essential devscripts

get sources

$ git clone https://github.com/yeti-switch/sems.git --recursive
$ cd sems

install dependencies

# apt build-deps .

build packages

$ debuild -us -uc -b

sems's People

Contributors

dmitry-sinina avatar furmur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sems's Issues

Segmentation fault. Version 1.54.1

Falling constantly, the reason is not clear :(

--- CORE.DUMP ----
[New LWP 1687]
[New LWP 1688]
[New LWP 1698]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/sems -E -D3 -P /var/run/sems.pid -u root -g root -f /etc/sems/sems.conf'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005604bea08320 in ?? ()
[Current thread is 1 (Thread 0x7fec8a292700 (LWP 1743))]
(gdb)

Memory leak with high volume traffic

I have memory leak with this version, Memory fills rapidly and sems restarts. Maybe 4000 concurrent calls too high?
I have used valgrind to analyse, here is the result.

Nothing about this in sems log.
valgrind-out.txt

Pls tell me if you need any more details.

missing iLBC dependency

Looks like build dependency on iLBC is missing.

make -f core/plug-in/ilbc/CMakeFiles/sems_ilbc.dir/build.make core/plug-in/ilbc/CMakeFiles/sems_ilbc.dir/depend
make[3]: Entering directory '/usr/src/orig/sems-yeti/build'
cd /usr/src/orig/sems-yeti/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /usr/src/orig/sems-yeti /usr/src/orig/sems-yeti/core/plug-in/ilbc /usr/src/orig/sems-yeti/build /usr/src/orig/sems-yeti/build/core/plug-in/ilbc /usr/src/orig/sems-yeti/build/core/plug-in/ilbc/CMakeFiles/sems_ilbc.dir/DependInfo.cmake --color=
Scanning dependencies of target sems_ilbc
make[3]: Leaving directory '/usr/src/orig/sems-yeti/build'
make -f core/plug-in/ilbc/CMakeFiles/sems_ilbc.dir/build.make core/plug-in/ilbc/CMakeFiles/sems_ilbc.dir/build
make[3]: Entering directory '/usr/src/orig/sems-yeti/build'
[ 66%] Building C object core/plug-in/ilbc/CMakeFiles/sems_ilbc.dir/ilbc.c.o
cd /usr/src/orig/sems-yeti/build/core/plug-in/ilbc && /usr/bin/cc -DLOG_BUFFER_LEN=2048 -DMYSQLPP_MYSQL_HEADERS_BURIED -DSESSION_THREADPOOL -DUSE_LIBSAMPLERATE -DUSE_MONITORING -DUSE_SPANDSP -D__STDC_LIMIT_MACROS -Dsems_ilbc_EXPORTS -I/usr/src/orig/sems-yeti/core/ampi -I/usr/src/orig/sems-yeti/core/amci -I/usr/src/orig/sems-yeti/core -I/usr/src/orig/sems-yeti/build/third/spandsp/src -I/usr/src/orig/sems-yeti/build/third/botan/build/include -I/usr/src/orig/sems-yeti/build/third/srtp/include -I/usr/src/orig/sems-yeti/build/third/confuse/src -I/usr/src/orig/sems-yeti/build/third/stun/common -I/usr/src/orig/sems-yeti/build/third/stun/stuncore  -g -O2 -fdebug-prefix-map=/usr/src/orig/sems-yeti=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_THREAD_SAFE -D_REENTRANT -Wall -fPIC -g -O2 -DMAX_RTP_SESSIONS=8192 -fPIC   -D__FILENAME__='"core/plug-in/ilbc/ilbc.c"' -DSEMS_APP_NAME='"sems"' -std=c++11 -Wno-deprecated -DMOD_NAME=\"ilbc\" -o CMakeFiles/sems_ilbc.dir/ilbc.c.o   -c /usr/src/orig/sems-yeti/core/plug-in/ilbc/ilbc.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
/usr/src/orig/sems-yeti/core/plug-in/ilbc/ilbc.c:36:10: fatal error: iLBC_define.h: No such file or directory
 #include "iLBC_define.h"
          ^~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [core/plug-in/ilbc/CMakeFiles/sems_ilbc.dir/build.make:66: core/plug-in/ilbc/CMakeFiles/sems_ilbc.dir/ilbc.c.o] Error 1

problem startibng sems on new installation

Hi,

I have a new install of yeti, done following the doc, but sems doesn't start, it fails with :
[858/858] [yeti:cdr/TrustedHeaders.cpp:47] ERROR: pqxx_exception: ERROR: function load_trusted_headers(unknown) does not exist
LINE 1: SELECT * FROM load_trusted_headers($1)
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

[858/858] [yeti:cdr/TrustedHeaders.cpp:60] ERROR: can't load trusted headers config

debian 9 does not have libzrtpcpp-dev

I tried to build sems on Debian 9 according to README.md, but failed to install libzrtpcpp-dev, which is not included in Debian 9. Where did you get it?

# aptitude install git cmake build-essential libssl-dev libpqxx3-dev libxml2-dev libspandsp-dev libsamplerate-dev libcurl3-dev libhiredis-dev librtmp-dev libzrtpcpp-dev libev-dev python-dev libspeex-dev libgsm1-dev
git is already installed at the requested version (1:2.11.0-3+deb9u4)
build-essential is already installed at the requested version (12.3)
Note: selecting "libsamplerate0-dev" instead of the virtual package "libsamplerate-dev"
Note: selecting "libcurl4-openssl-dev" instead of the virtual package "libcurl3-dev"
Couldn't find any package whose name or description matched "libzrtpcpp-dev"
Unable to apply some actions, aborting

build of dsm app failed

I tried to to build dsm app by uncommenting app/CMakeLists.txt line

ADD_SUBDIRECTORY(dsm)

After that build failed like this:

make[3]: Entering directory '/home/jh/sems/build'
[ 74%] Building CXX object apps/dsm/CMakeFiles/sems_dsm.dir/DSM.cpp.o
cd /home/jh/sems/build/apps/dsm && /usr/bin/c++   -DLOG_BUFFER_LEN=2048 -DSESSION_THREADPOOL -DUSE_LIBSAMPLERATE -DUSE_MONITORING -DUSE_SPANDSP -D__STDC_LIMIT_MACROS -Dsems_dsm_EXPORTS -I/home/jh/sems/core/ampi -I/home/jh/sems/core/amci -I/home/jh/sems/core -I/home/jh/sems/build/third/spandsp/src -I/home/jh/sems/build/third/botan/build/include -I/home/jh/sems/build/third/srtp/include -I/home/jh/sems/build/third/confuse/src  -g -O2 -fdebug-prefix-map=/home/jh/sems=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_THREAD_SAFE -D_REENTRANT -Wall -Wno-reorder -fPIC -g -O2 -fPIC   -D__FILENAME__='"apps/dsm/DSM.cpp"' -DSEMS_APP_NAME='"sems"' -std=c++11 -Wno-deprecated -DMOD_NAME=\"dsm\" -o CMakeFiles/sems_dsm.dir/DSM.cpp.o -c /home/jh/sems/apps/dsm/DSM.cpp
/home/jh/sems/apps/dsm/DSM.cpp: In member function ‘int DSMFactory::preloadModules(AmConfigReader&, std::__cxx11::string&, const string&)’:
/home/jh/sems/apps/dsm/DSM.cpp:885:20: error: ‘class DSMModule’ has no member named ‘preload’
   if (last_loaded->preload()) {
                    ^~~~~~~

For some reason, public function

virtual int preload() { return 0; }

has been removed from DSMModule.h.

Why is that? Or is dsm app simply not intended to work with yeti-switch sems?

TCP interface configuration

New options

sip_tcp_listen_ip - IP for listen socket
sip_tcp_listen_port - Port for listen socket
sip_tcp_source_ip - Source ip for originated TCP connections
sip_tcp_source_port - Source port for originated TCP connections
sip_tcp_source_port_min and sip_tcp_source_port_max - Source port range for originated TCP connections
sip_tcp_source_allow_origination - allow receiving Initial Invite in originated TCP connection

package.sh fails at sems/build/third/srtp

Running package.sh on Debian 9 fails at sems/build/third/srtp:

$ ./package.sh 
dpkg-buildpackage: info: source package sems
dpkg-buildpackage: info: source version 1.8.33-3
dpkg-buildpackage: info: source distribution stable
dpkg-buildpackage: info: source changed by Michael Furmur <[email protected]>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build sems
 fakeroot debian/rules clean
dh clean --buildsystem=cmake --builddirectory=build --parallel
   dh_testdir -O--buildsystem=cmake -O--builddirectory=build -O--parallel
   dh_auto_clean -O--buildsystem=cmake -O--builddirectory=build -O--parallel
   dh_clean -O--buildsystem=cmake -O--builddirectory=build -O--parallel
 debian/rules build
dh build --buildsystem=cmake --builddirectory=build --parallel
   dh_testdir -O--buildsystem=cmake -O--builddirectory=build -O--parallel
   dh_update_autotools_config -O--buildsystem=cmake -O--builddirectory=build -O--parallel
   dh_auto_configure -O--buildsystem=cmake -O--builddirectory=build -O--parallel
	cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Enable building of the bundled libbotan
error: src/lib/tls/tls_channel.cpp: No such file or directory
error: src/lib/tls/tls_handshake_state.cpp: No such file or directory
-- Enable building of the bundled libstun
-- Enable building of the bundled libsrtp
-- Enable building of the bundled Curl
-- Enable building of the bundled Spandsp
-- Enable building of the bundled libconfuse
-- Found Git: /usr/bin/git (found version "2.11.0") 
-- version from git tags: 1.8.33-3
-- Configuring SEMS v. 1.8.33-3
-- max RTP sessions was set to: 8192
-- SEMS cfg prefix was set to: 
-- SEMS audio prefix was set to: /usr/lib
-- SEMS exec prefix was set to: /usr
-- SEMS libdir was set to: lib
-- SEMS doc prefix was set to: /usr/share/doc
-- Using spandsp: YES
-- Found libsamplerate includes:	/usr/include/samplerate.h
-- Found libsamplerate library: /usr/lib/x86_64-linux-gnu/libsamplerate.so
-- Using libsamplerate: YES
-- Using libzrtp: NO (default)
-- Found lame includes:	/usr/include/lame/lame.h
-- Found lame library: /usr/lib/x86_64-linux-gnu/libmp3lame.so
-- Using lame mp3: YES
-- Using iLBC library: YES (bundled, default)
-- Enable monitoring: YES
-- Enable IPv6 support: NO (default)
-- Found gsm includes:	/usr/include/gsm.h
-- Found gsm library: /usr/lib/x86_64-linux-gnu/libgsm.so
-- Using gsm: YES
-- Found speex includes:	/usr/include/speex/speex.h
-- Found speex library: /usr/lib/x86_64-linux-gnu/libspeex.so
-- Using speex: YES
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0k") 
-- Found OpenSSL includes:	/usr/include/openssl/ssl.h
-- Found OpenSSL library: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so
-- Using OpenSSL: YES
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.13") 
-- Found Python includes:	/usr/include/python2.7/Python.h
-- Found Python library: /usr/lib/x86_64-linux-gnu/libpython2.7.so
-- Using Python: YES
-- Using SIP: NO
-- Using MySQL++: NO
-- Using text-to-speech: NO (default)
-- Using mISDN: NO
-- Found libev includes:	/usr/include/libev/ev.h
-- Found libev library: /usr/lib/x86_64-linux-gnu/libev.so
-- Using libev: YES
-- Found rtmp includes:	/usr/include/rtmp.h
-- Found rtmp library: /usr/lib/x86_64-linux-gnu/librtmp.so
-- Using librtmp: YES
-- Looking for res_search
-- Looking for res_search - found
-- Have res_search:1
-- CoreDefs: -DUSE_SPANDSP -D__STDC_LIMIT_MACROS -DUSE_LIBSAMPLERATE -DUSE_MONITORING -DSESSION_THREADPOOL -DLOG_BUFFER_LEN=2048
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Checking for module 'opus'
--   Found opus, version 1.2~alpha2
-- Found OPUS: opus (found version "1.2~alpha2") 
-- Checking for module 'libsctp'
--   Found libsctp, version 1.0.17
-- Found SCTP: sctp (found version "1.0.17") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0") 
-- Generate protocol buffers classes
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_INSTALL_LOCALSTATEDIR
    CMAKE_INSTALL_SYSCONFDIR


-- Build files have been written to: /home/jh/sems/build
   dh_auto_build -O--buildsystem=cmake -O--builddirectory=build -O--parallel
	make -j1
make[1]: Entering directory '/home/jh/sems/build'
/usr/bin/cmake -H/home/jh/sems -B/home/jh/sems/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/jh/sems/build/CMakeFiles /home/jh/sems/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[2]: Entering directory '/home/jh/sems/build'
make -f CMakeFiles/libsrtp.dir/build.make CMakeFiles/libsrtp.dir/depend
make[3]: Entering directory '/home/jh/sems/build'
cd /home/jh/sems/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/jh/sems /home/jh/sems /home/jh/sems/build /home/jh/sems/build /home/jh/sems/build/CMakeFiles/libsrtp.dir/DependInfo.cmake --color=
Scanning dependencies of target libsrtp
make[3]: Leaving directory '/home/jh/sems/build'
make -f CMakeFiles/libsrtp.dir/build.make CMakeFiles/libsrtp.dir/build
make[3]: Entering directory '/home/jh/sems/build'
[  1%] Generating third/srtp/libsrtp2.a
cd /home/jh/sems/build/third/srtp && /usr/bin/cmake -E copy_directory /home/jh/sems/third/srtp /home/jh/sems/build/third/srtp
cd /home/jh/sems/build/third/srtp && ./configure --disable-openssl --enable-debug-logging CPPFLAGS=-fPIC
/bin/sh: 1: ./configure: not found
CMakeFiles/libsrtp.dir/build.make:63: recipe for target 'third/srtp/libsrtp2.a' failed
make[3]: *** [third/srtp/libsrtp2.a] Error 127

looks like dependency on libboost1.67-dev is missing from README.md

Thanks for fixing the git issue. Now I got up to here:

make[5]: Entering directory '/home/jh/sems/build/third/stun/common'
g++ -fPIC -I/home/jh/sems/build/third/botan/build/include/ -Wdate-time -D_FORTIFY_SOURCE=2  -c  -DDEBUG -Wall -Wuninitialized  -g atomichelpers.cpp
In file included from atomichelpers.cpp:18:0:
commonincludes.hpp:51:32: fatal error: boost/shared_ptr.hpp: No such file or directory
 #include <boost/shared_ptr.hpp>
                                ^
compilation terminated.
../common.inc:36: recipe for target 'atomichelpers.o' failed

File boost/shared_ptr.hpp exists in libboost1.67-dev, which can be found in stretch-backports. I haven't tried it yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.