diff --git a/Makefile.defs b/Makefile.defs index d4569065..96bc4c09 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -248,8 +248,6 @@ modules-dir = lib/sems/plug-in/ audio-dir = lib/sems/audio/ lib-dir = lib/sems/ -ser-cfg-dir = etc/ser/ - ifeq ($(OS), linux) doc-dir = share/doc/sems/ man-dir = share/man/ @@ -278,7 +276,6 @@ bin-target = $(prefix)/$(bin-dir) cfg-target = $(prefix)/$(cfg-dir) modules-target = $(prefix)/$(modules-dir) audio-target = $(prefix)/$(audio-dir) -ser-cfg-target =$(ser-prefix)/$(ser-cfg-dir) lib-target = $(prefix)/$(lib-dir) ifeq ($(OS), solaris) @@ -305,8 +302,8 @@ export CXX CC LD export DESTDIR PREFIX prefix basedir ser-prefix export start-script export cfg-prefix bin-prefix modules-prefix doc-prefix audio-prefix lib-prefix -export cfg-dir bin-dir modules-dir audio-dir lib-dir ser-cfg-dir doc-dir man-dir -export bin-target cfg-target modules-target audio-target ser-cfg-target lib-target +export cfg-dir bin-dir modules-dir audio-dir lib-dir doc-dir man-dir +export bin-target cfg-target modules-target audio-target lib-target export INSTALL TAR INSTALL-TOUCH INSTALL-CFG INSTALL-BIN INSTALL-MODULES INSTALL-DOC INSTALL-AUDIO export USE_SPANDSP LIBSPANDSP_STATIC LIBSPANDSP_LDIR diff --git a/README b/README index 86c621bd..77008eb7 100644 --- a/README +++ b/README @@ -139,27 +139,22 @@ Requirements: All requirements are optional. - 1. optional: SER version 0.9.6-sems, or SER 2.0 with SASI: - SIP Epress Router (www.iptel.org/ser) - - SEMS has its own SIP stack. SEMS can also use SER as its - SIP stack. SEMS & SER communicate through unix socket (0.9.6), - or binrpc protocol (2.0 SASI). - - 2. Python version >= 2.3 for the ivr (embedded python interpreter) + 1. Python version >= 2.3 for the ivr (embedded python interpreter) and py_sems, optional - 3. flite speech synthesizer for TTS in the ivr, optional + 2. flite speech synthesizer for TTS in the ivr, optional - 4. lame >= 3.95 for mp3 file output, optional. mpg123 for mp3 playback, + 3. lame >= 3.95 for mp3 file output, optional. mpg123 for mp3 playback, optional - 5. xmlrpcpp for XMLRPC control, optional + 4. xmlrpcpp for XMLRPC control, optional - 6. spandsp library for DTMF detection and PLC, optional + 5. spandsp library for DTMF detection and PLC, optional (SEMS has its own implementations for both) - 7. libZRTP SDK (http://zfoneproject.com) for ZRTP, optional + 6. libZRTP SDK (http://zfoneproject.com) for ZRTP, optional + + 7. libev for jsonrpc, optional How to get started with SEMS: @@ -224,25 +219,13 @@ Installation: is at '/usr/local/etc/sems/sems.conf'. Else make your own using sems.conf.sample. - 4. Optional, needed if you want to use SER as SEMS frontend (SIP stack): - Get and start SER as SIP stack for SEMS: - - By default, sipctrl plugin is loaded, which is the integrated SIP - stack for SEMS. If SER should be used, the following procedure is - necessary for ser as SIP stack: - o For ser 2.0/sasi use this patched ser2.0 version: - http://ftp.iptel.org/pub/sems/ser2-sasi-080108.tar.bz2 - (or ser head possibly with patches from the bug tracker at - http://tracker.iptel.org/browse/SER-346 ) - and core/etc/ser-sems.sasi.cfg. Then load the binrpcctrl module. - - 5. Start SEMS: + 4. Start SEMS: If you installed SEMS with 'make install', sems can be found at '/usr/local/sbin/sems'. If you need help starting 'sems', try 'sems -h'. - 6. Using SEMS + 5. Using SEMS SEMS needs to be told from the many possible applications that are loaded which one to run. You can simply set the application diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index fe504378..f3b0bc75 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -150,8 +150,6 @@ SET(doc_files ../doc/Readme.webconference.txt ../doc/Readme.xmlrpc2di.txt ../doc/WHATSNEW_0.10 - ./etc/ser-sems.cfg - ./etc/ser-sems.sasi.cfg ) INCLUDE(${CMAKE_SOURCE_DIR}/cmake/audio.rules.txt) diff --git a/core/Makefile b/core/Makefile index 60bc41fb..96767023 100644 --- a/core/Makefile +++ b/core/Makefile @@ -90,20 +90,6 @@ install-modules: $(PLUGIN_DIR) $(DESTDIR)$(modules-prefix)/$(modules-dir) install-modules-cfg: $(PLUGIN_DIR) $(MAKE) -C $(PLUGIN_DIR) install-cfg -install-ser-cfg: etc/ser-sems.cfg - mkdir -p $(DESTDIR)$(ser-cfg-target) - - if [ ! -f $(DESTDIR)$(ser-cfg-target)/ser-sems.cfg ]; then \ - sed -e "s#/opt/ser-sems#$(ser-prefix)#g" \ - < etc/ser-sems.cfg > $(DESTDIR)$(ser-cfg-target)ser-sems.cfg; \ - fi - - $(INSTALL-CFG) etc/ser-sems.cfg $(DESTDIR)$(ser-cfg-target)ser-sems.cfg.default - - @echo \*\*\* installed ser-sems.cfg at $(DESTDIR)$(ser-cfg-target)ser-sems.cfg - @echo \*\*\* run $(DESTDIR)$(ser-prefix)/sbin/ser -f $(DESTDIR)$(ser-cfg-target)ser-sems.cfg - @echo \*\*\* to start ser for sems. - install-audio: $(DESTDIR)$(audio-prefix)/$(audio-dir) for f in $(AUDIO_FILES) ; do \ if [ -n "wav/$$f" ]; then \ diff --git a/core/etc/ser-sems.cfg b/core/etc/ser-sems.cfg deleted file mode 100644 index c27c95b9..00000000 --- a/core/etc/ser-sems.cfg +++ /dev/null @@ -1,79 +0,0 @@ -# ser for sems configuration -# -# This is a simple SER configuration for using SER -# as SIP stack for SEMS. It passes every message -# directly to SEMS. -# -# Application and application parameters need to be -# set in P-App-Name/P-App-Param headers of the INVITE. -# -# To install SER 0.9.6 for SEMS in /opt/ser-sems, -# use the following commands: -# wget ftp.iptel.org/pub/sems/ser-0.9.6-sems.tar.gz -# tar xzvf ser-0.9.6-sems.tar.gz; cd ser-0.9.6-sems -# make install PREFIX=/opt/ser-sems -# - -# set listen parameter if you want SEMS to be reachable -# from one interface only: -# listen=eth0 - -# -# listen on this port -port=5070 - -# connection SER->SEMS -unix_sock="/tmp/ser_sock" - -# SEMS sends its own signature -server_signature=0 - -# we only need sl and tm -loadmodule "/opt/ser-sems/lib/ser/modules/sl.so" -loadmodule "/opt/ser-sems/lib/ser/modules/tm.so" - -# we want provisional replies in SEMS -modparam("tm", "pass_provisional_replies", 1) - -# passes "P-App-Name" and -# "P-App-Param" headers with the INVITE -modparam("tm", "tw_append", - "app_headers:hdr[P-App-Name];hdr[P-App-Param]") - -# for DTMF in SIP INFO we need content-length, -type -# and body -modparam( "tm", "tw_append", - "dtmf_info:hdr[Content-Length];hdr[Content-Type];msg[body]") - -# main routing logic -route{ - # make transaction - if (!t_newtran()){ - sl_send_reply("500","could not create transaction"); - break; - } - - # actively absorb ACKs - if (method == "ACK") { - t_relay(); - break; - } - - # pass everything to SEMS - if (method=="INVITE") { - if(!t_write_unix("/tmp/sems_sock","sems/app_headers")){ - log("could not contact sems\n"); - t_reply("500","could not contact media server"); - } - } else if (method=="INFO") { - if(!t_write_unix("/tmp/sems_sock","sems/dtmf_info")){ - log("could not contact sems\n"); - t_reply("500","could not contact media server"); - } - } else { # no need for special appends - if(!t_write_unix("/tmp/sems_sock","sems")){ - log("could not contact sems\n"); - t_reply("500","could not contact media server"); - } - } -} diff --git a/core/etc/ser-sems.sasi.cfg b/core/etc/ser-sems.sasi.cfg deleted file mode 100644 index 898dfa3f..00000000 --- a/core/etc/ser-sems.sasi.cfg +++ /dev/null @@ -1,116 +0,0 @@ - -# ----------- global configuration parameters ------------------------ - -debug=6 # debug level (cmd line: -dddddddddd) -memdbg=10 # memory debug message level -memlog=20 # memory statistics log level -#log_facility=LOG_LOCAL0 # sets the facility used for logging (see syslog(3)) - -#log_stderror=yes -#listen=127.0.0.1 - -check_via=no # (cmd. line: -v) -dns=no # (cmd. line: -r) -rev_dns=no # (cmd. line: -R) - -# ------------------ module loading ---------------------------------- - -loadmodule "modules/textops/textops.so" -loadmodule "modules/avp/avp.so" -loadmodule "modules/sl/sl.so" -loadmodule "modules/tm/tm.so" -loadmodule "modules/xlog/xlog.so" -loadmodule "modules/binrpc/binrpc.so" -#loadmodule "modules/hdrfilter/hdrfilter.so" -loadmodule "modules/asi/asi.so" - -# ----------------- setting module-specific parameters --------------- - - -modparam("tm", "pass_provisional_replies", 0) -modparam("tm", "fr_timer", 30000) -modparam("tm", "fr_inv_timer", 60000) -modparam("tm", "unmatched_cancel", 2) - -modparam("binrpc", "listen", "brpcnd://localhost:2048") -modparam("binrpc", "workers", 8) - -modparam("asi", "app_srv", "sems@brpcnd://localhost:3333") -modparam("asi", "onreply_route", "addavp") - -modparam("asi", "connect_timeout", 50) -modparam("asi", "transmit_timeout", 300) -modparam("asi", "receive_timeout", 400) -# ------------------------- request routing logic ------------------- - -# main routing logic - -route -{ - if (method == "INVITE") - sl_reply(180, "Now hold on a sec, dog"); - - if ((method == "ACK") || (method == "CANCEL")) { - # TODO: unknown cancels can be dropped, at most, right now - # (ref: unmatched_cancel) - t_relay(); - } else if (t_newtran()) { - # give the AS a 5s interval to reply itself in case of local 408 - if (method == "INVITE") - # the worst case: a 100 is received on outgoing leg's transaction, - # delaying it's expiration to 60s - t_set_fr(0, 65000); - else - # guaranteed, outgoing leg's transaction times out after 30s - t_set_fr(0, 35000); - # on INVITE (or any other CANCELable request), AS should reply with - # 100 if it wants to generate the final reply on CANCEL, in the case - # when no other reply is sent out (like callee crash) ; otherwise - # SER will generate it on its own. - if (! route(ASI)) - t_reply(500, "Leave me alone"); - } else { - sl_reply(500, "Bad luck, dude"); - } -} - -route[ASI] -{ - # $sems_cmd is the application which SEMS executes; - # $sems_hdrs is passed as additional headers. E.g. - # a "compatibility" configuration to 0.9.6 ser-sems.cfg - # would be - # $sems_cmd = @hf_value.p_app_name; - # xlset_attr("$sems_hdrs", "P-App-Param: %@hf_value.p_app_param\n"); - - $sems_cmd = "announcement"; - # $sems_hdrs = "P-App-Name: announcement\n"; - - if (! asi_dispatch("sems")) { - if ($? == -2) $stat = "failed"; - else if ($? == -1) $stat = "not interested"; - else $stat = "unknown"; - xdbg("NOT DISPATCHED: <%$stat>.\n"); - return -1; - } - return 1; -} - -onreply_route["addavp"] -{ - if (@cseq.method == "REGISTER") { - #$sems_hdrs = "P-App-Name: reg_agent\n"; - $sems_hdrs = "P-App-Name: registrar_client\n"; - if (@hf_value.www_authenticate) - xlset_attr("$sems_hdrs", "WWW-Authenticate: %@hf_value.www_authenticate\n"); - else if (@hf_value.contact) - xlset_attr("$sems_hdrs", "Contact: %@hf_value.contact\n"); - } else if (@cseq.method == "INVITE") { - #$sems_hdrs = "P-App-Name: callback\n"; - if (@hf_value.proxy_authenticate) - xlset_attr("$sems_hdrs", "Proxy-Authenticate: %@hf_value.proxy_authenticate\n"); - else if (@hf_value.contact) - xlset_attr("$sems_hdrs", "Contact: %@hf_value.contact\n"); - } - dump_attrs(); -}