diff options
author | sobomax <sobomax@FreeBSD.org> | 2003-01-20 04:43:32 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2003-01-20 04:43:32 +0800 |
commit | 81f633ad3ff26d4a989111934fe71bcfc781fed0 (patch) | |
tree | 0f0b3f8764243792043530646c4dd8302da9e7dc /net/b2bua | |
parent | acfd2faea2778ddf819bdacd18f3afad518a9360 (diff) | |
download | freebsd-ports-gnome-81f633ad3ff26d4a989111934fe71bcfc781fed0.tar.gz freebsd-ports-gnome-81f633ad3ff26d4a989111934fe71bcfc781fed0.tar.zst freebsd-ports-gnome-81f633ad3ff26d4a989111934fe71bcfc781fed0.zip |
Add b2bua 1.4.0, a back-to-back (B2B) SIP user agent.
Diffstat (limited to 'net/b2bua')
20 files changed, 393 insertions, 0 deletions
diff --git a/net/b2bua/Makefile b/net/b2bua/Makefile new file mode 100644 index 000000000000..82ab8ca783f7 --- /dev/null +++ b/net/b2bua/Makefile @@ -0,0 +1,44 @@ +# New ports collection makefile for: b2bua +# Date created: 6 December 2002 +# Whom: Maxim Sobolev <sobomax@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= b2bua +PORTVERSION= 1.4.0 +CATEGORIES= net +MASTER_SITES= http://www.vovida.org/downloads/b2bua/ + +MAINTAINER= sobomax@FreeBSD.org + +LIB_DEPENDS= xml2.5:${PORTSDIR}/textproc/libxml2 \ + lthread:${PORTSDIR}/devel/linuxthreads + +USE_GMAKE= yes +ALL_TARGET= b2bua +CFLAGS+= -I${LOCALBASE}/include/pthread/linuxthreads \ + -I${LOCALBASE}/include/libxml2 \ + -I${LOCALBASE}/include/libxml2/libxml \ + -I${LOCALBASE}/include -Wno-deprecated +PTHREAD_LDFLAGS= -L${LOCALBASE}/lib -llthread -llgcc_r +MAKE_ENV= PTHREAD_LDFLAGS="${PTHREAD_LDFLAGS}" \ + PTHREAD_LIBNAME="" + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 500035 +PTHREAD_LDFLAGS+= -llstdc++ -llsupc++ +.endif + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/sip/b2b/bin.nodebug.FreeBSD.i386/b2bua \ + ${PREFIX}/bin + ${MKDIR} ${DOCSDIR} +.for file in README HOWTO b2bdesign.pdf Doc/B2BUA.pdf + ${INSTALL_DATA} ${WRKSRC}/sip/b2b/${file} ${DOCSDIR} +.endfor + ${INSTALL_DATA} ${WRKSRC}/sip/b2b/b2bConfig.xml \ + ${PREFIX}/etc/b2bConfig.xml.sample + +.include <bsd.port.post.mk> diff --git a/net/b2bua/distinfo b/net/b2bua/distinfo new file mode 100644 index 000000000000..c5af6b377260 --- /dev/null +++ b/net/b2bua/distinfo @@ -0,0 +1 @@ +MD5 (b2bua-1.4.0.tar.gz) = 741616e24f10f4122aef96ebc4658fdf diff --git a/net/b2bua/files/patch-build::Makefile.osarch b/net/b2bua/files/patch-build::Makefile.osarch new file mode 100644 index 000000000000..6216ba4f5f26 --- /dev/null +++ b/net/b2bua/files/patch-build::Makefile.osarch @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- build/Makefile.osarch 2003/01/18 02:21:44 1.1 ++++ build/Makefile.osarch 2003/01/18 02:22:24 +@@ -18,6 +18,8 @@ + + ifeq ($(OSTYPE),FreeBSD) + ++ CXXFLAGS += -D_REENTRANT -D_THREAD_SAFE ++ CFLAGS += -D_REENTRANT -D_THREAD_SAFE + USE_LIBGETOPT = 1 + USE_R_WRAPPER = 1 + diff --git a/net/b2bua/files/patch-build::Makefile.pkg b/net/b2bua/files/patch-build::Makefile.pkg new file mode 100644 index 000000000000..034c8f964d95 --- /dev/null +++ b/net/b2bua/files/patch-build::Makefile.pkg @@ -0,0 +1,41 @@ + +$FreeBSD$ + +--- build/Makefile.pkg.orig Thu Apr 25 23:18:34 2002 ++++ build/Makefile.pkg Sun Jan 19 17:28:26 2003 +@@ -415,13 +415,13 @@ + cd $(ROOT)/proxies/fs/cpl;$(MAKE) + + LIBXML_INCLUDEDIRS := $(ROOT)/contrib/libxml2.$(OS_ARCH) +-LIBXML_LIBDIRS := $(ROOT)/contrib/libxml2.$(OS_ARCH)/.libs ++LIBXML_LIBDIRS := $(LOCALBASE)/lib + ifeq ($(OSTYPE),Linux) + LIBXML_LIBNAME := + endif + + ifeq ($(OSTYPE),FreeBSD) +- LIBXML_LDLIBS_LAST := $(LD_STATIC) -lxml $(LD_DYNAMIC) ++ LIBXML_LDLIBS_LAST := -lxml2 + endif + + ifeq ($(OSTYPE),Linux) +@@ -435,7 +435,7 @@ + LIBXML_DEPENDS := $(ROOT)/contrib/libxml2.$(OS_ARCH)/.libs/libxml.a + + $(LIBXML_DEPENDS): +- cd $(ROOT)/contrib ;$(MAKE) libxml ++# cd $(ROOT)/contrib ;$(MAKE) libxml + + ENUM_INCLUDEDIRS := $(ROOT)/contrib/enum.$(OS_ARCH)/include + #ENUM_LIBDIRS := $(ROOT)/contrib/enum.$(OS_ARCH)/lib /usr/local/bind-8.2.2p7/src/lib +@@ -627,8 +627,8 @@ + ifneq ($(OSTYPE),FreeBSD) + PTHREAD_LIBNAME := pthread + else +-PTHREAD_LDFLAGS := -pthread +-PTHREAD_LIBNAME := c_r ++PTHREAD_LDFLAGS ?= -pthread ++PTHREAD_LIBNAME ?= c_r + endif + + ifeq ($(OSTYPE),IRIX64) diff --git a/net/b2bua/files/patch-build::Makefile.pre b/net/b2bua/files/patch-build::Makefile.pre new file mode 100644 index 000000000000..0fea44efc12e --- /dev/null +++ b/net/b2bua/files/patch-build::Makefile.pre @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- build/Makefile.pre 2003/01/18 02:20:43 1.1 ++++ build/Makefile.pre 2003/01/18 02:20:51 +@@ -81,7 +81,7 @@ + # defaults should you want to. + + VOCAL_TOOLCHAIN_TYPE := gnu +-VOCAL_COMPILE_TYPE := debug ++VOCAL_COMPILE_TYPE := nodebug + + + ###################################################################### diff --git a/net/b2bua/files/patch-contrib::Makefile b/net/b2bua/files/patch-contrib::Makefile new file mode 100644 index 000000000000..63de564d48f0 --- /dev/null +++ b/net/b2bua/files/patch-contrib::Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- contrib/Makefile 2002/12/18 08:31:42 1.1 ++++ contrib/Makefile 2002/12/18 08:32:44 +@@ -26,7 +26,7 @@ + + INSTALL = install + +-CODE_DEPENDS = libxml ++CODE_DEPENDS = + + ifeq ($(OSTYPE),FreeBSD) + CODE_DEPENDS += libcext_bsd libcext_lgpl diff --git a/net/b2bua/files/patch-radius::RadiusAttribute.cxx b/net/b2bua/files/patch-radius::RadiusAttribute.cxx new file mode 100644 index 000000000000..cafd3ad72b0d --- /dev/null +++ b/net/b2bua/files/patch-radius::RadiusAttribute.cxx @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- radius/RadiusAttribute.cxx.orig Sat Sep 22 05:16:51 2001 ++++ radius/RadiusAttribute.cxx Sun Jan 19 01:35:01 2003 +@@ -52,6 +52,8 @@ + static const char* const RadiusAttribute_cxx_Version = + "$Id: RadiusAttribute.cxx,v 1.11 2001/09/22 02:16:51 sprajpat Exp $"; + ++#include <sys/types.h> ++#include <sys/socket.h> + #include <netinet/in.h> + #include <cstdio> + diff --git a/net/b2bua/files/patch-radius::RadiusMessage.cxx b/net/b2bua/files/patch-radius::RadiusMessage.cxx new file mode 100644 index 000000000000..32bd4256b7c1 --- /dev/null +++ b/net/b2bua/files/patch-radius::RadiusMessage.cxx @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- radius/RadiusMessage.cxx.orig Thu Nov 8 00:43:39 2001 ++++ radius/RadiusMessage.cxx Sun Jan 19 01:35:13 2003 +@@ -52,6 +52,8 @@ + static const char* const RadiusMessage_cxx_Version = + "$Id: RadiusMessage.cxx,v 1.10 2001/11/07 22:43:39 chok Exp $"; + ++#include <sys/types.h> ++#include <sys/socket.h> + #include <netinet/in.h> + #include <time.h> + diff --git a/net/b2bua/files/patch-radius::test::Makefile b/net/b2bua/files/patch-radius::test::Makefile new file mode 100644 index 000000000000..935770e1fe81 --- /dev/null +++ b/net/b2bua/files/patch-radius::test::Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- radius/test/Makefile 2003/01/19 13:26:53 1.1 ++++ radius/test/Makefile 2003/01/19 13:27:00 +@@ -5,7 +5,7 @@ + + include $(BUILD)/Makefile.pre + +-PACKAGES += RADIUS UTIL PTHREAD ++PACKAGES += RADIUS UTIL PTHREAD LIBCEXT + + TESTPROGRAMS = \ + radiusTest.cxx \ diff --git a/net/b2bua/files/patch-radius::test::radiusClient.cxx b/net/b2bua/files/patch-radius::test::radiusClient.cxx new file mode 100644 index 000000000000..e34f4f42b4c6 --- /dev/null +++ b/net/b2bua/files/patch-radius::test::radiusClient.cxx @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- radius/test/radiusClient.cxx 2003/01/18 20:10:53 1.1 ++++ radius/test/radiusClient.cxx 2003/01/18 20:11:19 +@@ -52,6 +52,8 @@ + + #include <cstdio> + ++#include <netinet/in.h> ++ + #include "cpLog.h" + #include "UdpStack.hxx" + #include "TimeFunc.hxx" diff --git a/net/b2bua/files/patch-radius::test::radiusServer.cxx b/net/b2bua/files/patch-radius::test::radiusServer.cxx new file mode 100644 index 000000000000..b567b9f76b3f --- /dev/null +++ b/net/b2bua/files/patch-radius::test::radiusServer.cxx @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- radius/test/radiusServer.cxx 2003/01/18 20:14:02 1.1 ++++ radius/test/radiusServer.cxx 2003/01/18 20:14:31 +@@ -52,6 +52,8 @@ + + #include <cstdio> + ++#include <netinet/in.h> ++ + #include "cpLog.h" + #include "UdpStack.hxx" + #include "TimeFunc.hxx" diff --git a/net/b2bua/files/patch-sip::b2b::AAATransceiver.cxx b/net/b2bua/files/patch-sip::b2b::AAATransceiver.cxx new file mode 100644 index 000000000000..abe4e660b05c --- /dev/null +++ b/net/b2bua/files/patch-sip::b2b::AAATransceiver.cxx @@ -0,0 +1,13 @@ + +$FreeBSD$ + +--- sip/b2b/AAATransceiver.cxx 2003/01/18 06:18:49 1.1 ++++ sip/b2b/AAATransceiver.cxx 2003/01/18 06:19:07 +@@ -52,6 +52,7 @@ + static const char* const AAATransceiver_cxx_Version = + "$Id: AAATransceiver.cxx,v 1.1 2003/01/18 06:18:49 root Exp root $"; + ++#include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> diff --git a/net/b2bua/files/patch-sip::b2b::AAATransceiver.hxx b/net/b2bua/files/patch-sip::b2b::AAATransceiver.hxx new file mode 100644 index 000000000000..041f3eb8ae40 --- /dev/null +++ b/net/b2bua/files/patch-sip::b2b::AAATransceiver.hxx @@ -0,0 +1,16 @@ + +$FreeBSD$ + +--- sip/b2b/AAATransceiver.hxx 2003/01/18 23:09:49 1.1 ++++ sip/b2b/AAATransceiver.hxx 2003/01/18 23:10:07 +@@ -61,8 +61,9 @@ + #include "VThread.hxx" + #include "AAAEvent.hxx" + #include "RadiusMessage.hxx" ++#include "UdpStack.hxx" + +-class UdpStack; ++//class UdpStack; + + using Vocal::Fifo; + diff --git a/net/b2bua/files/patch-sip::b2b::AuthAgent.cxx b/net/b2bua/files/patch-sip::b2b::AuthAgent.cxx new file mode 100644 index 000000000000..f9928c00d92e --- /dev/null +++ b/net/b2bua/files/patch-sip::b2b::AuthAgent.cxx @@ -0,0 +1,107 @@ + +$FreeBSD$ + +--- sip/b2b/AuthAgent.cxx 2003/01/19 16:15:54 1.1 ++++ sip/b2b/AuthAgent.cxx 2003/01/19 18:03:43 +@@ -367,6 +367,31 @@ + AuthAgent::doCancel() + { + cpLog(LOG_DEBUG, "AuthAgent::doCancel()"); ++ Sptr<MultiLegCallData> mData = ++ CallDB::instance().getMultiLegCallData(myInvokee->getCallLeg()); ++ assert(mData != 0); ++ ++ Sptr<AccountingData> accData = mData->getAccountingData(); ++ time_t t; ++ t = time(&t); ++ accData->setEndTime(t); ++ ++ if(B2bConfig::instance().getStr(B2bConfig::PP_OPTIONS) ++ != B2bConfig::PP_FREE) ++ { ++ ///Send Stop records to billing ++ int duration = t - accData->getStartTime(); ++ Sptr<BillingData> bData; ++ bData.dynamicCast(myAAAData); ++ assert(bData != 0); ++ bData->setDuration(duration); ++ ++ Sptr<AAAEvent> aEvent = new AAAEvent(this); ++ cpLog(LOG_DEBUG, "AuthAgent::Sending Acct Stop"); ++ B2bUa::instance().getAAATransceiver()->sendAcctStop(aEvent); ++ } ++ ++ ///Transit the controller state + myState->cancel(*this); + } + +@@ -424,6 +449,31 @@ + AuthAgent::callFailed() + { + cpLog(LOG_DEBUG, "AuthAgent::callFailed()"); ++ Sptr<MultiLegCallData> mData = ++ CallDB::instance().getMultiLegCallData(myInvokee->getCallLeg()); ++ assert(mData != 0); ++ ++ Sptr<AccountingData> accData = mData->getAccountingData(); ++ time_t t; ++ t = time(&t); ++ accData->setEndTime(t); ++ ++ if(B2bConfig::instance().getStr(B2bConfig::PP_OPTIONS) ++ != B2bConfig::PP_FREE) ++ { ++ ///Send Stop records to billing ++ int duration = t - accData->getStartTime(); ++ Sptr<BillingData> bData; ++ bData.dynamicCast(myAAAData); ++ assert(bData != 0); ++ bData->setDuration(duration); ++ ++ Sptr<AAAEvent> aEvent = new AAAEvent(this); ++ cpLog(LOG_DEBUG, "AuthAgent::Sending Acct Stop"); ++ B2bUa::instance().getAAATransceiver()->sendAcctStop(aEvent); ++ } ++ ++ ///Transit the controller state + myState->fail(*this); + } + +@@ -488,5 +538,37 @@ + void + AuthAgent::receivedStatus(UaBase& agent, const Sptr<SipMsg>& msg) + { ++ Sptr<StatusMsg> statusMsg; ++ statusMsg.dynamicCast(msg); ++ assert(statusMsg != 0); ++ int statusCode = statusMsg->getStatusLine().getStatusCode(); ++ if(statusCode > 200) ++ { ++ Sptr<MultiLegCallData> mData = ++ CallDB::instance().getMultiLegCallData(myInvokee->getCallLeg()); ++ assert(mData != 0); ++ ++ Sptr<AccountingData> accData = mData->getAccountingData(); ++ time_t t; ++ t = time(&t); ++ accData->setEndTime(t); ++ ++ if(B2bConfig::instance().getStr(B2bConfig::PP_OPTIONS) ++ != B2bConfig::PP_FREE) ++ { ++ ///Send Stop records to billing ++ int duration = t - accData->getStartTime(); ++ Sptr<BillingData> bData; ++ bData.dynamicCast(myAAAData); ++ assert(bData != 0); ++ bData->setDuration(duration); ++ bData->setTermCause(BT_SERVICE_UNAVAIL); ++ ++ Sptr<AAAEvent> aEvent = new AAAEvent(this); ++ cpLog(LOG_DEBUG, "AuthAgent::Sending Acct Stop"); ++ B2bUa::instance().getAAATransceiver()->sendAcctStop(aEvent); ++ } ++ } ++ + MultiLegCallControl::instance().receivedStatus(agent,msg); + } diff --git a/net/b2bua/files/patch-sip::b2b::B2bDef.hxx b/net/b2bua/files/patch-sip::b2b::B2bDef.hxx new file mode 100644 index 000000000000..214906f27acc --- /dev/null +++ b/net/b2bua/files/patch-sip::b2b::B2bDef.hxx @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- sip/b2b/B2bDef.hxx 2003/01/19 18:01:33 1.1 ++++ sip/b2b/B2bDef.hxx 2003/01/19 18:02:05 +@@ -95,7 +95,8 @@ + { + BT_NONE=0, + BT_USER_REQ=1, +- BT_SESSION_TIMEOUT=5 ++ BT_SESSION_TIMEOUT=5, ++ BT_SERVICE_UNAVAIL=15 + }; + + typedef vector<Sptr<UaBase> > UserAgentPeerList; diff --git a/net/b2bua/files/patch-sip::b2b::Makefile b/net/b2bua/files/patch-sip::b2b::Makefile new file mode 100644 index 000000000000..90efbb1acc6a --- /dev/null +++ b/net/b2bua/files/patch-sip::b2b::Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- sip/b2b/Makefile 2002/12/18 17:03:43 1.1 ++++ sip/b2b/Makefile 2002/12/18 17:49:16 +@@ -19,6 +19,8 @@ + PACKAGES += PROXYBASE RADIUS SIP SDP2 PTHREAD UTIL LIBXML + endif + ++PACKAGES += LIBCEXT ++ + INCDIRS += $(ROOT)/sip/b2b $(ROOT)//sip/b2b/controlState \ + $(ROOT)//sip/b2b/uaState + diff --git a/net/b2bua/files/patch-util::threads::VSemaphore.hxx b/net/b2bua/files/patch-util::threads::VSemaphore.hxx new file mode 100644 index 000000000000..4aa18be27390 --- /dev/null +++ b/net/b2bua/files/patch-util::threads::VSemaphore.hxx @@ -0,0 +1,13 @@ + +$FreeBSD$ + +--- util/threads/VSemaphore.hxx 2003/01/19 14:09:49 1.1 ++++ util/threads/VSemaphore.hxx 2003/01/19 14:10:16 +@@ -59,6 +59,7 @@ + #endif + + #if defined( __linux__ ) || defined(__FreeBSD__) || defined (WIN32) ++#include <pthread.h> + #include <semaphore.h> + #else + #include <synch.h> diff --git a/net/b2bua/pkg-comment b/net/b2bua/pkg-comment new file mode 100644 index 000000000000..be3482e4250d --- /dev/null +++ b/net/b2bua/pkg-comment @@ -0,0 +1 @@ +A back-to-back (B2B) SIP user agent diff --git a/net/b2bua/pkg-descr b/net/b2bua/pkg-descr new file mode 100644 index 000000000000..9837fe0f00e0 --- /dev/null +++ b/net/b2bua/pkg-descr @@ -0,0 +1,9 @@ +B2bUa is basically two SIP UAs working back-to-back and thus controlling +the calls going through it.Unlike a sip-proxy, a B2bUa will take an +incoming call, modify it and present it in other form to final +destination.B2bUa is in the call-signalling-path all the times. +There are numerous applications in which b2bUa can be used either +as a media negotiator or simply supervising the calls between two +parties. + +WWW: http://www.vovida.org/applications/downloads/b2bua/ diff --git a/net/b2bua/pkg-plist b/net/b2bua/pkg-plist new file mode 100644 index 000000000000..5a8511112ff5 --- /dev/null +++ b/net/b2bua/pkg-plist @@ -0,0 +1,7 @@ +bin/b2bua +etc/b2bConfig.xml.sample +share/doc/b2bua/B2BUA.pdf +share/doc/b2bua/HOWTO +share/doc/b2bua/README +share/doc/b2bua/b2bdesign.pdf +@dirrm share/doc/b2bua |