Added files for wiresniff module. Identical to Rev. 2213

git-svn-id: http://yate.null.ro/svn/yate/trunk@6331 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
sabina 2018-11-27 12:57:17 +00:00
parent 8038fbe8e4
commit 220ab39310
6 changed files with 482 additions and 9 deletions

View File

@ -29,10 +29,12 @@ SLIBS:= $(YLIB) libyate.so \
libyatesig.so.@PACKAGE_VERSION@ libyatesig.so \
libyateasn.so.@PACKAGE_VERSION@ libyateasn.so \
libyateradio.so.@PACKAGE_VERSION@ libyateradio.so \
libyatemapcamel.so.@PACKAGE_VERSION@ libyatemapcamel.so \
libyatemgcp.so.@PACKAGE_VERSION@ libyatemgcp.so \
libyatejabber.so.@PACKAGE_VERSION@ libyatejabber.so
libyatejabber.so.@PACKAGE_VERSION@ libyatejabber.so \
libyatecodecutils.so.@PACKAGE_VERSION@ libyatecodecutils.so
ILIBS:= yscript yasn yradio
INCS := yateclass.h yatemime.h yatengine.h yatephone.h yatecbase.h yatexml.h yatemath.h
INCS := yateclass.h yatemime.h yatengine.h yatephone.h yatecbase.h yatexml.h yatemath.h yatewiresniff.h
GENS := yateversn.h
LIBS :=
MAN8 := yate.8 yate-config.8

View File

@ -0,0 +1,29 @@
[general]
; General settings for wiresniff module.
; remote_host: ipaddr: IPv4 or IPv6 address where to send the packets.
; If empty the module won't process the messages
;remote_host=
; remote_port: Remote port assigned to the remote_host.
; Mandatory to be set if remote_host is set
;remote_port=
; local_host: ipaddr: Address of local interface,
; IPv4 default address is '0.0.0.0' and IPv6 default address is '::'
;local_host=
; local_port: int: Local UDP port assigned to local_host
; Default value for local port is 0
;local_port=
; filter: regexp: Default filter to apply to message sniffer at initialization
; If empty it will match all messages
; Example for a filter matching all chan.Anything messages and engine.halt:
; filter=^\(chan\.\|engine\.halt$\)
;filter

View File

@ -37,6 +37,11 @@ OPENSSL_LIB := @OPENSSL_LIB@
HAVE_ZLIB := @HAVE_ZLIB@
ZLIB_INC := @ZLIB_INC@
ZLIB_LIB := @ZLIB_LIB@
HAVE_CELLALGO := @HAVE_CELLALGO@
HAVE_128EIA1 := @HAVE_128EIA1@
CELLALGO_INC := @CELLALGO_INC@
CELLALGO_LIB := @CELLALGO_LIB@
CELLALGO_DEF := @CELLALGO_DEF@
HAVE_LIBUSB := @HAVE_LIBUSB@
LIBUSB_INC := @LIBUSB_INC@
LIBUSB_LIB := @LIBUSB_LIB@
@ -55,7 +60,8 @@ INCFILES := @top_srcdir@/yateclass.h @top_srcdir@/yatengine.h @top_srcdir@/yatep
JUSTSIG := server/ysigchan.yate server/analog.yate \
server/ciscosm.yate server/sigtransport.yate \
sig/isupmangler.yate sig/ss7_lnp_ansi.yate \
sig/camel_map.yate
sig/camel_map.yate sig/camel_bcsm.yate sig/camel_bcsm_proxy.yate \
sig/ussd_map.yate sig/camelmap.yate
SUBDIRS :=
MKDEPS := ../config.status
@ -90,11 +96,14 @@ PROGS := cdrbuild.yate cdrcombine.yate cdrfile.yate regexroute.yate \
server/cache.yate \
server/eventlogs.yate \
client/jabberclient.yate \
callgen.yate analyzer.yate rmanager.yate msgsniff.yate \
radio/dummyradio.yate radio/radiotest.yate
callgen.yate analyzer.yate rmanager.yate msgsniff.yate wiresniff.yate\
radio/dummyradio.yate radio/radiotest.yate \
server/ysmpp.yate server/ydiameter.yate \
mobile/gsmfeatures.yate \
server/xml_tcp.yate
LIBS :=
DIRS := client server jabber qt4 sip sig radio
DIRS := client server jabber qt4 sip sig radio mobile
ifneq ($(HAVE_PGSQL),no)
PROGS := $(PROGS) server/pgsqldb.yate
@ -112,6 +121,13 @@ ifneq (@HAVE_RESOLV@,no)
PROGS := $(PROGS) enumroute.yate
endif
ifneq (@HAVE_IPV6@,no)
PROGS := $(PROGS) mobile/ys1ap.yate
ifneq (@HAVE_TUN@,no)
PROGS := $(PROGS) mobile/gtp.yate
endif
endif
ifneq (@HAVE_SOUNDCARD@,no)
PROGS := $(PROGS) client/osschan.yate
endif
@ -183,6 +199,10 @@ PROGS := $(PROGS) amrnbcodec.yate
PROGS := $(PROGS) efrcodec.yate
endif
ifneq (@HAVE_AMRWB@,no)
PROGS := $(PROGS) amrwbcodec.yate
endif
ifneq ($(HAVE_OPENSSL),no)
PROGS := $(PROGS) openssl.yate
endif
@ -204,6 +224,11 @@ ifneq (@HAVE_LIBUSB@,no)
PROGS := $(PROGS) radio/ybladerf.yate
endif
ifeq (@HAVE_CELLALGO@,yes)
ifeq (@HAVE_128EIA1@,yes)
PROGS := $(PROGS) mobile/nassession.yate
endif
endif
LOCALFLAGS =
LOCALLIBS =
@ -311,6 +336,9 @@ sig/%.yate: @srcdir@/sig/%.cpp $(MKDEPS) $(INCFILES)
sip/%.yate: @srcdir@/sip/%.cpp $(MKDEPS) $(INCFILES)
mkdir -p sip && $(MODCOMP) -o $@ $(LOCALFLAGS) $(EXTERNFLAGS) $< $(LOCALLIBS) $(YATELIBS) $(EXTERNLIBS)
mobile/%.yate: @srcdir@/mobile/%.cpp $(MKDEPS) $(INCFILES)
mkdir -p mobile && $(MODCOMP) -o $@ $(LOCALFLAGS) $(EXTERNFLAGS) $< $(LOCALLIBS) $(YATELIBS) $(EXTERNLIBS)
%.yate: @srcdir@/%.cpp $(MKDEPS) $(INCFILES)
$(MODCOMP) -o $@ $(LOCALFLAGS) $(EXTERNFLAGS) $< $(LOCALLIBS) $(YATELIBS) $(EXTERNLIBS)
@ -329,6 +357,14 @@ sig/camel_map.yate: ../libs/yasn/libyasn.a
sig/camel_map.yate: LOCALFLAGS = -I@top_srcdir@/libs/ysig -I@top_srcdir@/libs/yasn
sig/camel_map.yate: LOCALLIBS = -lyatesig -lyateasn
sig/camelmap.yate: ../libyatemapcamel.so
sig/camelmap.yate: LOCALFLAGS = -I@top_srcdir@/libs/ysig -I@top_srcdir@/libs/yasn -I@top_srcdir@/libs/ymapcamel
sig/camelmap.yate: LOCALLIBS = -lyatemapcamel -lyatesig -lyateasn
sig/camel_bcsm_proxy.yate sig/ussd_map.yate: ../libs/ytcapxml/libyatetcapxml.a
sig/camel_bcsm_proxy.yate sig/ussd_map.yate: LOCALFLAGS = -I../libs/ytcapxml
sig/camel_bcsm_proxy.yate sig/ussd_map.yate: LOCALLIBS = -L../libs/ytcapxml -lyatetcapxml
server/analogdetect.yate: ../libs/ymodem/libyatemodem.a
server/analogdetect.yate: LOCALFLAGS = -I@top_srcdir@/libs/ymodem
server/analogdetect.yate: LOCALLIBS = -L../libs/ymodem -lyatemodem
@ -393,6 +429,9 @@ speexcodec.yate: EXTERNLIBS = @SPEEX_LIB@
amrnbcodec.yate efrcodec.yate: EXTERNFLAGS = @AMRNB_INC@
amrnbcodec.yate efrcodec.yate: EXTERNLIBS = @AMRNB_LIB@
amrwbcodec.yate: EXTERNFLAGS = @AMRWB_INC@
amrwbcodec.yate: EXTERNLIBS = @AMRWB_LIB@
faxchan.yate: EXTERNFLAGS = $(SPANDSP_INC)
faxchan.yate: EXTERNLIBS = $(SPANDSP_LIB)
@ -424,6 +463,30 @@ server/ysnmpagent.yate: ../libyateasn.so ../libs/ysnmp/libysnmp.a
server/ysnmpagent.yate: LOCALFLAGS = -I@top_srcdir@/libs/yasn -I@top_srcdir@/libs/ysnmp
server/ysnmpagent.yate: LOCALLIBS = -L../libs/ysnmp -lysnmp -lyateasn
server/ysmpp.yate: ../libs/ysmpp/libyatesmpp.a ../libs/ycodecutils/libyatecodecutils.a
server/ysmpp.yate: LOCALFLAGS = -I@top_srcdir@/libs/ysmpp -I@top_srcdir@/libs/ycodecutils
server/ysmpp.yate: LOCALLIBS = -L../libs/ysmpp -lyatesmpp -L../libs/ycodecutils -lyatecodecutils
server/ydiameter.yate: ../libs/ydiameter/libyatediameter.a
server/ydiameter.yate: LOCALFLAGS = -I@top_srcdir@/libs/ydiameter
server/ydiameter.yate: LOCALLIBS = -L../libs/ydiameter -lyatediameter
mobile/gtp.yate: ../libs/ygtp/libyategtp.a
mobile/gtp.yate: LOCALFLAGS = -I@top_srcdir@/libs/ygtp
mobile/gtp.yate: LOCALLIBS = -L../libs/ygtp -lyategtp
mobile/ys1ap.yate: ../libyateasn.so
mobile/ys1ap.yate: LOCALFLAGS = -I../libs/yasn
mobile/ys1ap.yate: LOCALLIBS = -lyateasn
mobile/gsmfeatures.yate: ../libyateradio.so ../libyatecodecutils.so
mobile/gsmfeatures.yate: LOCALFLAGS = -I@top_srcdir@/libs/yradio -I@top_srcdir@/libs/ycodecutils
mobile/gsmfeatures.yate: LOCALLIBS = -lyateradio -L../libs/ycodecutils -lyatecodecutils
mobile/nassession.yate: ../libyatescript.so ../libyateradio.so
mobile/nassession.yate: LOCALFLAGS = -I@top_srcdir@/libs/yscript -I@top_srcdir@/libs/yradio $(CELLALGO_DEF) $(CELLALGO_INC)
mobile/nassession.yate: LOCALLIBS = -lyatescript -lyateradio $(CELLALGO_LIB)
radio/ybladerf.yate radio/dummyradio.yate radio/radiotest.yate: ../libyateradio.so
radio/ybladerf.yate radio/dummyradio.yate radio/radiotest.yate: LOCALFLAGS = -I@top_srcdir@/libs/yradio
radio/ybladerf.yate radio/dummyradio.yate radio/radiotest.yate: LOCALLIBS = -lyateradio
@ -477,3 +540,21 @@ radio/ybladerf.yate: EXTERNLIBS = $(LIBUSB_LIB)
../libyateradio.so ../libs/yradio/libyateradio.a: @top_srcdir@/libs/yradio/yateradio.h
$(MAKE) -C ../libs/yradio
../libs/ytcapxml/libyatetcapxml.a: @top_srcdir@/libs/ytcapxml/yatetcapxml.h
$(MAKE) -C ../libs/ytcapxml
../libs/ysmpp/libyatesmpp.a: @top_srcdir@/libs/ysmpp/yatesmpp.h
$(MAKE) -C ../libs/ysmpp
../libs/ydiameter/libyatediameter.a: @top_srcdir@/libs/ydiameter/yatediameter.h
$(MAKE) -C ../libs/ydiameter
../libs/ygtp/libyategtp.a: @top_srcdir@/libs/ygtp/yategtp.h
$(MAKE) -C ../libs/ygtp
../libyatemapcamel.so ../libs/ysig/libyatemapcamel.a: @top_srcdir@/libs/ymapcamel/yatemapcamel.h
$(MAKE) -C ../libs/ymapcamel
../libs/ycodecutils/libyatecodecutils.a: @top_srcdir@/libs/ycodecutils/yatecodecutils.h
$(MAKE) -C ../libs/ycodecutils

263
modules/wiresniff.cpp Normal file
View File

@ -0,0 +1,263 @@
/**
* wiresniff.cpp
* This file is part of the YATE Project http://YATE.null.ro
*
* Capture interface for YATE messages.
*
* Yet Another Telephony Engine - a fully featured software PBX and IVR
* Copyright (C) 2018 Null Team
*
* This software is distributed under multiple licenses;
* see the COPYING file in the main directory for licensing
* information for this specific distribution.
*
* This use of this software may be subject to additional restrictions.
* See the LEGAL file in the main directory for details.
*
* This program 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.
*/
#include <yatengine.h>
#include <wiresniff.h>
#include <stdio.h>
#include <string.h>
#define MAX_BUFFER_SIZE 65507
using namespace TelEngine;
namespace { //anonymous
static Configuration s_cfg;
static Socket s_socket;
static SocketAddr addr;
static SocketAddr s_addr;
static Regexp s_filter;
static bool s_timer = false;
static Mutex s_mutex(false,"WireSniff");
class WireSniffPlugin : public Plugin
{
public:
WireSniffPlugin();
virtual void initialize();
private:
bool m_first;
};
class WireSniffHandler : public MessageHandler
{
public:
WireSniffHandler() : MessageHandler(0,0) { }
virtual bool received(Message &msg);
};
class WireSniffHook : public MessagePostHook
{
public:
virtual void dispatched(const Message& msg, bool handled);
};
static void addTag(DataBlock& data, uint8_t tag, uint8_t length = 0, const void* value = 0)
{
unsigned char buf[2];
buf[0] = tag;
buf[1] = length;
data.append(buf,2);
if (length)
data.append(const_cast<void*>(value),length);
}
static void addTag(DataBlock& data, uint8_t tag, const char* text)
{
if (text && *text)
addTag(data,tag,::strlen(text),text);
}
static void addTag(DataBlock& data, uint8_t tag, void* ptr)
{
if (!ptr)
return;
intptr_t val = reinterpret_cast<intptr_t>(ptr);
addTag(data,tag,sizeof(val),ptr);
}
static bool sendMessage(const Message& msg, bool result, bool handled)
{
DataBlock buf;
String signature("yate-msg");
buf.append(signature);
uint8_t i = result ? 1: 0;
addTag(buf,YSNIFF_RESULT,1,&i);
Thread* t = Thread::current();
addTag(buf,YSNIFF_THREAD_ADDR,t);
const char* name = Thread::currentName();
addTag(buf,YSNIFF_THREAD_NAME,name);
RefObject* data = msg.userData();
addTag(buf, YSNIFF_DATA, data);
uint8_t broadcast = msg.broadcast() ? 1 : 0;
addTag(buf,YSNIFF_BROADCAST,1,&broadcast);
uint8_t finaltag = 0;
addTag(buf,YSNIFF_FINAL_TAG,1,&finaltag);
String id;
id.printf("%p",&msg);
if (result)
buf.append(msg.encode(handled,id));
else
buf.append(msg.encode(id));
if (!(buf.length() < MAX_BUFFER_SIZE))
DDebug(DebugWarn,"Buffer Overrun");
s_mutex.lock();
unsigned int len = s_socket.sendTo(buf.data(),buf.length(),addr);
s_mutex.unlock();
if (!len)
DDebug(DebugWarn,"Unable to send package");
return(len == buf.length());
}
bool WireSniffHandler::received(Message &msg)
{
if (!s_timer && (msg == YSTRING("engine.timer")))
return false;
if (!s_socket.valid()) {
Debug(DebugWarn,"Socket %s is not valid", strerror(s_socket.error()));
return false;
}
if (!s_addr.valid()){
Debug(DebugWarn,"SocketAddr is not valid");
return false;
}
if (s_filter && !s_filter.matches(msg))
return false;
sendMessage(msg,false,false);
return false;
}
void WireSniffHook::dispatched(const Message& msg, bool handled)
{
if ((!s_timer && (msg == YSTRING("engine.timer"))))
return;
if (s_filter && !s_filter.matches(msg))
return;
sendMessage(msg,true,handled);
}
WireSniffPlugin::WireSniffPlugin()
: Plugin("wiresniff"),
m_first(true)
{
Output("Loaded module WireSniff");
}
void WireSniffPlugin::initialize()
{
Output("Initializing module WireSniff");
s_mutex.lock();
s_cfg = Engine::configFile("wiresniff");
s_cfg.load();
s_mutex.unlock();
String remoteName = s_cfg.getValue("general","remote_host");
addr.host(remoteName);
addr.port(s_cfg.getIntValue("general","remote_port"));
if(addr.valid() && addr.port()) {
DDebug(this,DebugNote,"Remote address '%s' and remote port '%u' are set", remoteName.c_str(), addr.port());
}
if(!(addr.host() && addr.port())) {
s_socket.terminate();
Debug(this,DebugWarn,"Remote address and remote port are not configured");
}
if (!(addr.valid())) {
DDebug(this,DebugWarn,"Invalid address '%s'",remoteName.c_str());
return;
}
if(addr.family() != SocketAddr::IPv6)
s_addr.host(s_cfg.getValue("general","local_host","0.0.0.0"));
else
s_addr.host(s_cfg.getValue("general","local_host","::"));
s_addr.port(s_cfg.getIntValue("general","local_port",0));
if (!(s_addr.valid() && s_addr.host())) {
DDebug(this,DebugWarn,"Invalid address '%s'", s_addr.host().c_str());
return;
}
if (s_addr.family() != addr.family()) {
Debug(this,DebugWarn,"Socket Addresses are not compatible");
return;
}
if (!s_socket.create(s_addr.family(),SOCK_DGRAM)) {
Debug(this,DebugWarn,"Could not create socket %s", strerror(s_socket.error()));
s_socket.terminate();
}
if (!s_socket.bind(s_addr)) {
Debug(this,DebugWarn,"Unable to bind to %s:%u : %s",s_addr.host().c_str(),s_addr.port(),strerror(s_socket.error()));
return;
}
int val = 1;
if (!s_socket.setOption(IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val))) {
Debug(this,DebugWarn,"Socket %s option is not set!", strerror(s_socket.error()));
return;
}
if (!s_socket.setBlocking(false)) {
Debug(DebugWarn,"Unable to set socket %s to nonblocking mode", strerror(s_socket.error()));
return;
}
if (!s_socket.getSockName(s_addr)) {
Debug(this,DebugWarn,"Error getting address: %s",strerror(s_socket.error()));
return;
}
DDebug(this,DebugNote,"Socket bound to: %s:%u",s_addr.host().c_str(),s_addr.port());
Debug(this,DebugNote,"Sending from %s:%u to %s:%u",s_addr.host().c_str(),s_addr.port(),addr.host().c_str(),addr.port());
if (m_first) {
m_first = false;
Engine::install(new WireSniffHandler);
Engine::self()->setHook(new WireSniffHook);
}
s_mutex.lock();
s_filter = s_cfg.getValue("general", "filter");
s_mutex.unlock();
Output("WireSniff was initialized");
}
INIT_PLUGIN(WireSniffPlugin);
}; // anonymous namespace
/* vi: set ts=8 sw=4 sts=4 noet: */

View File

@ -12,6 +12,8 @@
# to disable the GUI clients run rpmbuild --define 'nogui 1'
# to disable only Zaptel support run rpmbuild --define 'nozap 1'
# to disable only TDMV support run rpmbuild --define 'notdm 1'
# to disable kernel GTP-U acceleration run rpmbuild --define 'nokgtpu 1'
# to disable cell algorithms run rpmbuild --define 'nocellalgo 1'
%{!?systemd:%define systemd %(test -x /usr/bin/systemd && echo 1 || echo 0)}
%{!?_unitdir:%define _unitdir /usr/lib/systemd/system}
@ -31,6 +33,8 @@
%{?nogui:%define no_gui 1}
%{?nozap:%define no_zaptel 1}
%{?notdm:%define no_tdmapi 1}
%{?nokgtpu:%define no_kgtpu 1}
%{?nocellalgo:%define no_cellalgo 1}
%{!?debuginfo:%define debuginfo %{nil}}
%if "%{debuginfo}"
@ -79,6 +83,7 @@ Source: http://yate.null.ro/tarballs/@PACKAGE_TARNAME@@PACKAGE_VERSION_MAJOR@/@
Group: Applications/Communication
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://yate.null.ro/
Provides: %{name}-commercial
%{?extra_prov:Provides: %{?extra_prov}}
%{?extra_reqs:Requires: %{?extra_reqs}}
BuildRequires: gcc-c++
@ -108,6 +113,8 @@ for small to large scale projects.
%{_libdir}/libyateasn.so.*
%{_libdir}/libyateradio.so.*
%{_libdir}/libyatemgcp.so.*
%{_libdir}/libyatemapcamel.so.*
%{_libdir}/libyatecodecutils.so.*
%{_bindir}/yate
%{_mandir}/*/yate.*
%if "%{systemd}" != "0"
@ -136,6 +143,7 @@ for small to large scale projects.
%{_libdir}/yate/analyzer.yate
%{_libdir}/yate/rmanager.yate
%{_libdir}/yate/msgsniff.yate
%{_libdir}/yate/wiresniff.yate
%{_libdir}/yate/mux.yate
%{_libdir}/yate/pbx.yate
%{_libdir}/yate/dumbchan.yate
@ -181,8 +189,11 @@ for small to large scale projects.
%{_libdir}/yate/server/ccongestion.yate
%{_libdir}/yate/server/monitoring.yate
%{_libdir}/yate/server/ysnmpagent.yate
%{_libdir}/yate/server/ysmpp.yate
%{_libdir}/yate/server/cache.yate
%{_libdir}/yate/server/ydiameter.yate
%{_libdir}/yate/server/eventlogs.yate
%{_libdir}/yate/server/xml_tcp.yate
%{_libdir}/yate/client/osschan.yate
%{_libdir}/yate/client/jabberclient.yate
%{_libdir}/yate/jabber/jabberserver.yate
@ -190,7 +201,14 @@ for small to large scale projects.
%{_libdir}/yate/sig/isupmangler.yate
%{_libdir}/yate/sig/ss7_lnp_ansi.yate
%{_libdir}/yate/sig/camel_map.yate
%{_libdir}/yate/sig/camelmap.yate
%{_libdir}/yate/sig/camel_bcsm.yate
%{_libdir}/yate/sig/camel_bcsm_proxy.yate
%{_libdir}/yate/sig/ussd_map.yate
%{_libdir}/yate/sip/sip_cnam_lnp.yate
%{_libdir}/yate/mobile/gtp.yate
%{_libdir}/yate/mobile/ys1ap.yate
%{_libdir}/yate/mobile/gsmfeatures.yate
%{_libdir}/yate/radio/dummyradio.yate
%{_libdir}/yate/radio/radiotest.yate
%dir %{_sysconfdir}/yate
@ -238,8 +256,11 @@ for small to large scale projects.
%config(noreplace) %{_sysconfdir}/yate/cpuload.conf
%config(noreplace) %{_sysconfdir}/yate/ccongestion.conf
%config(noreplace) %{_sysconfdir}/yate/monitoring.conf
%config(noreplace) %{_sysconfdir}/yate/wiresniff.conf
%config(noreplace) %{_sysconfdir}/yate/ysnmpagent.conf
%config(noreplace) %{_sysconfdir}/yate/ysmpp.conf
%config(noreplace) %{_sysconfdir}/yate/cache.conf
%config(noreplace) %{_sysconfdir}/yate/ydiameter.conf
%config(noreplace) %{_sysconfdir}/yate/eventlogs.conf
%config(noreplace) %{_sysconfdir}/yate/users.conf
%config(noreplace) %{_sysconfdir}/yate/presence.conf
@ -250,7 +271,11 @@ for small to large scale projects.
%config(noreplace) %{_sysconfdir}/yate/isupmangler.conf
%config(noreplace) %{_sysconfdir}/yate/ss7_lnp_ansi.conf
%config(noreplace) %{_sysconfdir}/yate/camel_map.conf
%config(noreplace) %{_sysconfdir}/yate/camel_bcsm.conf
%config(noreplace) %{_sysconfdir}/yate/camel_bcsm_proxy.conf
%config(noreplace) %{_sysconfdir}/yate/ussd_map.conf
%config(noreplace) %{_sysconfdir}/yate/sip_cnam_lnp.conf
%config(noreplace) %{_sysconfdir}/yate/xml_tcp.conf
%config(noreplace) %{_sysconfdir}/yate/dummyradio.conf
%config %{_sysconfdir}/logrotate.d/yate
@ -300,16 +325,19 @@ Requires: %{name} = %{version}-%{release}
%description amr
GSM-AMR and GSM-EFR audio codecs for Yate. AMR is a multi-rate codec that provides moderate
to high compression rate and good voice quality. EFR is just a different payload stucture
for 12.2 kbit/s AMR-NB.
for 12.2 kbit/s AMR-NB. AMR-WB provides wideband (16 kHz) audio with bitrates between 7 and
24 kbit/s.
%files amr
%{_libdir}/yate/amrnbcodec.yate
%{_libdir}/yate/amrwbcodec.yate
%{_libdir}/yate/efrcodec.yate
%config(noreplace) %{_sysconfdir}/yate/amrnbcodec.conf
%config(noreplace) %{_sysconfdir}/yate/amrwbcodec.conf
%define conf_amr %{nil}
%else
%define conf_amr --without-amrnb
%define conf_amr --without-amrnb --without-amrwb
%endif
@ -627,6 +655,30 @@ The devel package must still be installed separately.
%defattr(-,root,root)
%if "%{no_cellalgo}" != "1"
%package ltenas
Summary: Yate LTE NAS session support
Group: Applications/Communication
Requires: %{name} = %{version}-%{release}
%description ltenas
This package provides support for LTE NAS integrity check and ciphering.
%files ltenas
%{_libdir}/yate/mobile/nassession.yate
%define conf_cellalgo %{nil}
%else
%define conf_cellalgo --without-cellalgo
%endif
%if "%{no_kgtpu}" == "1"
%define conf_gtpu --disable-gtpuacc
%else
%define conf_gtpu %{nil}
%endif
# disable unpackaged files check if we know we are going to skip some
%if "%{no_pstn}" == "1"
%define _unpackaged_files_terminate_build 0
@ -689,7 +741,7 @@ chmod +x %{local_find_requires} %{local_find_provides}
--libdir=%{_libdir} --mandir=%{_mandir} --with-archlib=%{_lib} \
--without-spandsp --without-coredumper \
%{conf_sctp} %{conf_h323} %{conf_amr} %{conf_pstn} %{conf_usb} %{conf_gui} \
%{?extra_conf}
%{conf_gtpu} %{conf_cellalgo} %{?extra_conf}
make %{stripped} %{?extra_make}
%{?extra_step}
@ -717,9 +769,15 @@ rm -rf %{buildroot}
%changelog
* Thu Aug 10 2017 Paul Chitescu <paulc@voip.null.ro>
- Added AMR-WB codec to the yate-amr package
* Fri Nov 25 2016 Paul Chitescu <paulc@voip.null.ro>
- Added package for the AMR codec
* Mon Jan 25 2016 Marian Podgoreanu <marian@voip.null.ro>
- Added separate package for nassession
* Thu Nov 26 2015 Paul Chitescu <paulc@voip.null.ro>
- More tweaking to suppress unwanted dependencies in newer RPM
@ -729,6 +787,13 @@ rm -rf %{buildroot}
* Wed Apr 01 2015 Paul Chitescu <paulc@voip.null.ro>
- Package the new dynamic libyateasn.so
* Wed Apr 01 2015 Marian Podgoreanu <marian@voip.null.ro>
- Added codec utils dynamic library
* Tue Nov 11 2014 Ioana Stanciu <oana@voip.null.ro>
- Added MAP & CAMEL codec library and new camelmap module
- Added xml_tcp module
* Tue Apr 29 2014 Paul Chitescu <paulc@voip.null.ro>
- Added SQLite module and subpackage

33
yatewiresniff.h Normal file
View File

@ -0,0 +1,33 @@
/**
* wiresniff.h
* This file is part of the YATE Project http://YATE.null.ro
*
* Definition of the tags related to wiresniff module.
*
* Yet Another Telephony Engine - a fully featured software PBX and IVR
* Copyright (C) 2018 Null Team
*
* This software is distributed under multiple licenses;
* see the COPYING file in the main directory for licensing
* information for this specific distribution.
*
* This use of this software may be subject to additional restrictions.
* See the LEGAL file in the main directory for details.
*
* This program 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.
*/
#ifndef __WIRESNIFF_H
#define __WIRESNIFF_H
#define YSNIFF_RESULT 1
#define YSNIFF_THREAD_ADDR 2
#define YSNIFF_THREAD_NAME 3
#define YSNIFF_DATA 4
#define YSNIFF_BROADCAST 5
#define YSNIFF_FINAL_TAG 0
#endif /*__WIRESNIFF_H*/