1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00

Add asterisk-oh323 - an alternative H.323 protocol module for the asterisk.

Unlike h323 module in the asterisk itself it's being actively maintained
and pretty functional.

Submitted by:	Andriy I Pylypenko <bamby@portaone.com>
This commit is contained in:
Maxim Sobolev 2005-06-18 18:48:32 +00:00
parent 5857bd80cc
commit de80e13115
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=137695
9 changed files with 214 additions and 0 deletions

View File

@ -33,6 +33,7 @@
SUBDIR += asfrecorder
SUBDIR += aslookup
SUBDIR += asterisk
SUBDIR += asterisk-oh323
SUBDIR += atmsupport
SUBDIR += ayttm
SUBDIR += azureus

View File

@ -0,0 +1,29 @@
# New ports collection makefile for: asterisk-oh323
# Date created: 17 Jun 2005
# Whom: Andriy Pylypenko <bamby@portaone.com>
#
# $FreeBSD$
#
PORTNAME= asterisk-oh323
PORTVERSION= 0.6.5
CATEGORIES= net
MASTER_SITES= http://www.inaccessnetworks.com/asterisk-oh323/download/
MAINTAINER= bamby@portaone.com
COMMENT= A H.323 support module for the Asterisk soft PBX
BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/devel/pwlib:build \
${NONEXISTENT}:${PORTSDIR}/net/openh323:build \
${LOCALBASE}/sbin/asterisk:${PORTSDIR}/net/asterisk
USE_GMAKE= yes
PLIST_FILES= lib/liboh323wrapd.a
PLIST_FILES+= lib/asterisk/modules/chan_oh323.so
PLIST_FILES+= etc/asterisk/oh323.conf.sample
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
MD5 (asterisk-oh323-0.6.5.tar.gz) = 4cf3ff5362bb5db498f2a2dfb8b24087
SIZE (asterisk-oh323-0.6.5.tar.gz) = 87112

View File

@ -0,0 +1,80 @@
--- Makefile.orig Wed Nov 3 13:52:59 2004
+++ Makefile Fri Jun 17 15:58:04 2005
@@ -39,7 +39,7 @@
# Install everything under this directory. If this is empty, then everything
# will be installed under /
#
-DESTDIR=
+DESTDIR=/usr/local
#
# Set PWLIBDIR variable to the directory containing the sources of
@@ -49,7 +49,7 @@ DESTDIR=
# compile asterisk-oh323. Do not use the installed library of your
# distribution. It won't work.
#
-PWLIBDIR=/root/src/oh323/pwlib
+PWLIBDIR=/usr/ports/devel/pwlib/work/pwlib
#
# Set OPENH323LIBDIR variable to the directory containing the sources of
@@ -59,13 +59,13 @@ PWLIBDIR=/root/src/oh323/pwlib
# compile asterisk-oh323. Do not use the installed library of your
# distribution. It won't work.
#
-OPENH323DIR=/root/src/oh323/openh323
+OPENH323DIR=/usr/ports/net/openh323/work/openh323
#
# Set ASTERISKINCDIR variable to the directory containing the include files of
# Asterisk PBX.
#
-ASTERISKINCDIR=/root/src/asterisk/include
+ASTERISKINCDIR=/usr/local/include
#
# Set ASTERISKMODDIR variable to the directory where ASTERISK's modules reside.
@@ -73,7 +73,7 @@ ASTERISKINCDIR=/root/src/asterisk/includ
#
# Note: This directory is created under $DESTDIR.
#
-ASTERISKMODDIR=/usr/lib/asterisk/modules
+ASTERISKMODDIR=/lib/asterisk/modules
#
# Set ASTERISKETCDIR variable to the directory where ASTERISK's configuration
@@ -91,7 +91,7 @@ ASTERISKETCDIR=/etc/asterisk
#
# Note: This directory is created under $DESTDIR.
#
-OH323WRAPLIBDIR=/usr/local/lib
+OH323WRAPLIBDIR=/lib
#
# Set SSLINCDIR variable to the directory where ssl/crypto
@@ -159,7 +159,6 @@ SUBDIRS=wrapper asterisk-driver
rpm rpm_clean help $(SUBDIRS)
CC=gcc
CPP=g++
-MAKE=make
INSTALL=install
TOUCH=touch
AR=ar
@@ -191,7 +190,7 @@ endif
ifdef P_PTHREADS
OPENH323USERFLAGS += P_PTHREADS=1
endif
-OPENH323FLAGS=$(shell make $(OPENH323USERFLAGS) --no-print-directory -s \
+OPENH323FLAGS=$(shell $(MAKE) $(OPENH323USERFLAGS) --no-print-directory -s \
-C $(OPENH323DIR) \
PWLIBDIR=$(PWLIBDIR) OPENH323DIR=$(OPENH323DIR) ccflags)
CPPFLAGS=$(OPENH323FLAGS) -Wall -x c++ -Os
@@ -223,7 +222,7 @@ install: subdirs_build subdirs_install
clean: subdirs_clean rpm_clean
-all: subdirs_build subdirs_strip subdirs_install
+all: subdirs_build
subdirs_build:
for x in $(SUBDIRS); do $(MAKE) -C $$x build || exit 1 ; done

View File

@ -0,0 +1,43 @@
--- asterisk-driver/Makefile.orig Mon Oct 4 14:52:09 2004
+++ asterisk-driver/Makefile Fri Jun 17 13:51:08 2005
@@ -33,9 +33,9 @@ TARGET_OBJ=chan_oh323.o
ifndef SKIP_SUFFIX
ifeq ($(OH323STAT),1)
- LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/libpt*s.a))
+ LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/libpt*.a))
else
- LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/libpt*r.so))
+ LIBPTPATH=$(word 1,$(shell ls $(PWLIBDIR)/lib/libpt*.so))
endif
LIBPTNAME=$(subst lib,,$(basename $(notdir $(LIBPTPATH))))
LIBPTSSUF=$(findstring _r_s,$(LIBPTNAME)) # Static lib suffix
@@ -54,9 +54,9 @@ ifndef SKIP_SUFFIX
LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*s.a))
else
ifdef NOTRACE
- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*n.so))
+ LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*.so))
else
- LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*r.so))
+ LIBH323PATH=$(word 1,$(shell ls $(OPENH323DIR)/lib/libh323*.so))
endif
endif
LIBH323NAME=$(subst lib,,$(basename $(notdir $(LIBH323PATH))))
@@ -76,7 +76,7 @@ else
endif
ifndef SKIP_EXTLIBS
- EXTLIBS=$(shell $(PWLIBDIR)/make/ptlib-config --libs)
+ EXTLIBS=$(shell $(PWLIBDIR)/make/ptlib-config --ldflags --libs)
endif
CFLAGS += -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes \
@@ -101,6 +101,7 @@ install:
if [ ! -d $(DESTDIR)$(ASTERISKETCDIR) ]; then \
$(INSTALL) -d $(DESTDIR)$(ASTERISKETCDIR); \
fi
+ $(INSTALL) -m 0644 oh323.conf.sample $(DESTDIR)$(ASTERISKETCDIR)/oh323.conf.sample
if [ ! -f $(DESTDIR)$(ASTERISKETCDIR)/oh323.conf ]; then \
$(INSTALL) -m 0644 oh323.conf.sample $(DESTDIR)$(ASTERISKETCDIR)/oh323.conf; \
fi

View File

@ -0,0 +1,28 @@
--- asterisk-driver/chan_oh323.c.orig Tue Dec 21 17:28:11 2004
+++ asterisk-driver/chan_oh323.c Fri Jun 17 13:23:19 2005
@@ -56,6 +56,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <math.h>
+#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <sys/signal.h>
@@ -1155,7 +1156,7 @@ static struct ast_frame *oh323_exception
p->fr.src = type;
p->fr.offset = 0;
p->fr.mallocd = 0;
- p->fr.src = __FUNCTION__;
+ p->fr.src = "oh323_exception";
/* -- User input */
if (p->except_struct.type == OH323EXC_USER_INPUT_TONE) {
@@ -1770,7 +1771,7 @@ static struct ast_frame *oh323_read(stru
p->fr.src = type;
p->fr.offset = AST_FRIENDLY_OFFSET;
p->fr.samples = 0;
- p->fr.src = __FUNCTION__;
+ p->fr.src = "oh323_read";
/* Check the event pipe */
//CHECK_BLOCKING(c);

View File

@ -0,0 +1,20 @@
--- wrapper/asteriskaudio.cxx.orig Fri Jun 17 13:32:45 2005
+++ wrapper/asteriskaudio.cxx Fri Jun 17 13:33:19 2005
@@ -164,7 +164,7 @@ PAsteriskSoundChannel::~PAsteriskSoundCh
WRAPTRACE(3, "Total I/Os: read=" << readCount << ", write=" << writeCount);
WRAPTRACE(3, "Short I/Os: write=" << shortWriteCount);
WRAPTRACE(4, "Object deleted.");
- baseChannel = NULL;
+// baseChannel = NULL;
}
PStringArray PAsteriskSoundChannel::GetDeviceNames(Directions dir)
@@ -231,7 +231,7 @@ BOOL PAsteriskSoundChannel::Open(const P
**********/
if (deviceFd < 0)
return FALSE;
- baseChannel = this; // XXX Use the old interface of the PSoundChannel
+// baseChannel = this; // XXX Use the old interface of the PSoundChannel
os_handle = deviceFd;
mediaFormat = mediaFmt;
frameTime = frameTm;

View File

@ -0,0 +1,3 @@
Alternative implementation of H.323 protocol support for Asterisk PBX.
WWW: http://www.inaccessnetworks.com/ian/projects/asterisk-oh323/

View File

@ -0,0 +1,8 @@
*********************************************
* *
* Do not forget to disable loading *
* the chan_h323 module as it will most *
* likely prevent the Asterisk from working! *
* *
*********************************************