Mergeing in Paul Cadach's chan_h323 changes *holds breath*
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
d4d7a8b132
commit
2cc96500bd
2
Makefile
2
Makefile
|
@ -641,7 +641,7 @@ uninstall-all: _uninstall
|
|||
rm -rf $(DESTDIR)$(ASTLOGDIR)
|
||||
|
||||
menuselect: menuselect/menuselect menuselect-tree
|
||||
-@menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
|
||||
-@menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
|
||||
|
||||
menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
|
||||
@unset CC LD AR RANLIB && $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
|
||||
|
|
314
acinclude.m4
314
acinclude.m4
|
@ -116,6 +116,320 @@ fi
|
|||
AC_SUBST([GNU_MAKE])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(
|
||||
[AST_CHECK_PWLIB], [
|
||||
PWLIB_INCDIR=
|
||||
PWLIB_LIBDIR=
|
||||
if test "${PWLIBDIR:-unset}" != "unset" ; then
|
||||
AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PWLIB=1, )
|
||||
fi
|
||||
if test "${HAS_PWLIB:-unset}" = "unset" ; then
|
||||
if test "${OPENH323DIR:-unset}" != "unset"; then
|
||||
AC_CHECK_FILE(${OPENH323DIR}/../pwlib/version.h, HAS_PWLIB=1, )
|
||||
fi
|
||||
if test "${HAS_PWLIB:-unset}" != "unset" ; then
|
||||
PWLIBDIR="${OPENH323DIR}/../pwlib"
|
||||
else
|
||||
AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PWLIB=1, )
|
||||
if test "${HAS_PWLIB:-unset}" != "unset" ; then
|
||||
PWLIBDIR="${HOME}/pwlib"
|
||||
else
|
||||
AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PWLIB=1, )
|
||||
if test "${HAS_PWLIB:-unset}" != "unset" ; then
|
||||
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin)
|
||||
if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
|
||||
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/share/pwlib/make)
|
||||
fi
|
||||
PWLIB_INCDIR="/usr/local/include"
|
||||
PWLIB_LIBDIR="/usr/local/lib"
|
||||
else
|
||||
AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PWLIB=1, )
|
||||
if test "${HAS_PWLIB:-unset}" != "unset" ; then
|
||||
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make)
|
||||
PWLIB_INCDIR="/usr/include"
|
||||
PWLIB_LIBDIR="/usr/lib"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#if test "${HAS_PWLIB:-unset}" = "unset" ; then
|
||||
# echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
|
||||
# exit
|
||||
#fi
|
||||
|
||||
if test "${HAS_PWLIB:-unset}" != "unset" ; then
|
||||
if test "${PWLIBDIR:-unset}" = "unset" ; then
|
||||
if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
|
||||
PWLIBDIR=`$PTLIB_CONFIG --prefix`
|
||||
else
|
||||
echo "Cannot find ptlib-config - please install and try again"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
|
||||
PWLIBDIR="/usr/share/pwlib"
|
||||
PWLIB_INCDIR="/usr/include"
|
||||
PWLIB_LIBDIR="/usr/lib"
|
||||
fi
|
||||
if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
|
||||
PWLIBDIR="/usr/local/share/pwlib"
|
||||
PWLIB_INCDIR="/usr/local/include"
|
||||
PWLIB_LIBDIR="/usr/local/lib"
|
||||
fi
|
||||
|
||||
if test "${PWLIB_INCDIR:-unset}" = "unset"; then
|
||||
PWLIB_INCDIR="${PWLIBDIR}/include"
|
||||
fi
|
||||
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
|
||||
PWLIB_LIBDIR="${PWLIBDIR}/lib"
|
||||
fi
|
||||
|
||||
AC_SUBST([PWLIBDIR])
|
||||
AC_SUBST([PWLIB_INCDIR])
|
||||
AC_SUBST([PWLIB_LIBDIR])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(
|
||||
[AST_CHECK_OPENH323_PLATFORM], [
|
||||
PWLIB_OSTYPE=
|
||||
case "$host_os" in
|
||||
linux*) PWLIB_OSTYPE=linux ;
|
||||
;;
|
||||
freebsd* ) PWLIB_OSTYPE=FreeBSD ;
|
||||
;;
|
||||
openbsd* ) PWLIB_OSTYPE=OpenBSD ;
|
||||
ENDLDLIBS="-lossaudio" ;
|
||||
;;
|
||||
netbsd* ) PWLIB_OSTYPE=NetBSD ;
|
||||
ENDLDLIBS="-lossaudio" ;
|
||||
;;
|
||||
solaris* | sunos* ) PWLIB_OSTYPE=solaris ;
|
||||
;;
|
||||
darwin* ) PWLIB_OSTYPE=Darwin ;
|
||||
;;
|
||||
beos*) PWLIB_OSTYPE=beos ;
|
||||
STDCCFLAGS="$STDCCFLAGS -D__BEOS__"
|
||||
;;
|
||||
cygwin*) PWLIB_OSTYPE=cygwin ;
|
||||
;;
|
||||
mingw*) PWLIB_OSTYPE=mingw ;
|
||||
STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
|
||||
ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ;
|
||||
;;
|
||||
* ) PWLIB_OSTYPE="$host_os" ;
|
||||
AC_MSG_WARN("OS $PWLIB_OSTYPE not recognized - proceed with caution!") ;
|
||||
;;
|
||||
esac
|
||||
|
||||
PWLIB_MACHTYPE=
|
||||
case "$host_cpu" in
|
||||
x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86
|
||||
;;
|
||||
|
||||
x86_64) PWLIB_MACHTYPE=x86_64 ;
|
||||
P_64BIT=1 ;
|
||||
LIB64=1 ;
|
||||
;;
|
||||
|
||||
alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ;
|
||||
P_64BIT=1 ;
|
||||
;;
|
||||
|
||||
sparc ) PWLIB_MACHTYPE=sparc ;
|
||||
;;
|
||||
|
||||
powerpc ) PWLIB_MACHTYPE=ppc ;
|
||||
;;
|
||||
|
||||
ppc ) PWLIB_MACHTYPE=ppc ;
|
||||
;;
|
||||
|
||||
powerpc64 ) PWLIB_MACHTYPE=ppc64 ;
|
||||
P_64BIT=1 ;
|
||||
LIB64=1 ;
|
||||
;;
|
||||
|
||||
ppc64 ) PWLIB_MACHTYPE=ppc64 ;
|
||||
P_64BIT=1 ;
|
||||
LIB64=1 ;
|
||||
;;
|
||||
|
||||
ia64) PWLIB_MACHTYPE=ia64 ;
|
||||
P_64BIT=1 ;
|
||||
;;
|
||||
|
||||
s390x) PWLIB_MACHTYPE=s390x ;
|
||||
P_64BIT=1 ;
|
||||
LIB64=1 ;
|
||||
;;
|
||||
|
||||
s390) PWLIB_MACHTYPE=s390 ;
|
||||
;;
|
||||
|
||||
* ) PWLIB_MACHTYPE="$host_cpu";
|
||||
AC_MSG_WARN("CPU $PWLIB_MACHTYPE not recognized - proceed with caution!") ;;
|
||||
esac
|
||||
|
||||
PWLIB_PLATFORM="${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}"
|
||||
|
||||
AC_SUBST([PWLIB_PLATFORM])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(
|
||||
[AST_CHECK_OPENH323], [
|
||||
OPENH323_INCDIR=
|
||||
OPENH323_LIBDIR=
|
||||
if test "${OPENH323DIR:-unset}" != "unset" ; then
|
||||
AC_CHECK_FILE(${OPENH323DIR}/version.h, HAS_OPENH323=1, )
|
||||
fi
|
||||
if test "${HAS_OPENH323:-unset}" = "unset" ; then
|
||||
AC_CHECK_FILE(${PWLIBDIR}/../openh323/version.h, OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1, )
|
||||
if test "${HAS_OPENH323:-unset}" != "unset" ; then
|
||||
OPENH323DIR="${PWLIBDIR}/../openh323"
|
||||
AC_CHECK_FILE(${OPENH323DIR}/include/h323.h, , OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}")
|
||||
else
|
||||
AC_CHECK_FILE(${HOME}/openh323/include/h323.h, HAS_OPENH323=1, )
|
||||
if test "${HAS_OPENH323:-unset}" != "unset" ; then
|
||||
OPENH323DIR="${HOME}/openh323"
|
||||
else
|
||||
AC_CHECK_FILE(/usr/local/include/openh323/h323.h, HAS_OPENH323=1, )
|
||||
if test "${HAS_OPENH323:-unset}" != "unset" ; then
|
||||
OPENH323DIR="/usr/local/share/openh323"
|
||||
OPENH323_INCDIR="/usr/local/include/openh323"
|
||||
OPENH323_LIBDIR="/usr/local/lib"
|
||||
else
|
||||
AC_CHECK_FILE(/usr/include/openh323/h323.h, HAS_OPENH323=1, )
|
||||
if test "${HAS_OPENH323:-unset}" != "unset" ; then
|
||||
OPENH323DIR="/usr/share/openh323"
|
||||
OPENH323_INCDIR="/usr/include/openh323"
|
||||
OPENH323_LIBDIR="/usr/lib"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "${HAS_OPENH323:-unset}" != "unset" ; then
|
||||
if test "${OPENH323_INCDIR:-unset}" = "unset"; then
|
||||
OPENH323_INCDIR="${OPENH323DIR}/include"
|
||||
fi
|
||||
if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
|
||||
OPENH323_LIBDIR="${OPENH323DIR}/lib"
|
||||
fi
|
||||
|
||||
AC_SUBST([OPENH323DIR])
|
||||
AC_SUBST([OPENH323_INCDIR])
|
||||
AC_SUBST([OPENH323_LIBDIR])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(
|
||||
[AST_CHECK_PWLIB_VERSION], [
|
||||
if test "${HAS_$2:-unset}" != "unset"; then
|
||||
$2_VERSION=`grep "$2_VERSION" ${$2_INCDIR}/$3 | cut -f2 -d ' ' | sed -e 's/"//g'`
|
||||
$2_MAJOR_VERSION=`echo ${$2_VERSION} | cut -f1 -d.`
|
||||
$2_MINOR_VERSION=`echo ${$2_VERSION} | cut -f2 -d.`
|
||||
$2_BUILD_NUMBER=`echo ${$2_VERSION} | cut -f3 -d.`
|
||||
let $2_VER=${$2_MAJOR_VERSION}*10000+${$2_MINOR_VERSION}*100+${$2_BUILD_NUMBER}
|
||||
let $2_REQ=$4*10000+$5*100+$6
|
||||
|
||||
AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323)
|
||||
if test ${$2_VER} -lt ${$2_REQ}; then
|
||||
AC_MSG_RESULT(no)
|
||||
unset HAS_$2
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(
|
||||
[AST_CHECK_PWLIB_BUILD], [
|
||||
if test "${HAS_$2:-unset}" != "unset"; then
|
||||
AC_MSG_CHECKING($1 installation validity)
|
||||
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
saved_libs="${LIBS}"
|
||||
LIBS="${LIBS} -L${$2_LIBDIR} -l${PLATFORM_$2} $7"
|
||||
CPPFLAGS="${CPPFLAGS} -I${$2_INCDIR} $6"
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([$4],[$5])],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
ac_cv_lib_$2="yes"
|
||||
],
|
||||
[ AC_MSG_RESULT(no)
|
||||
ac_cv_lib_$2="no"
|
||||
]
|
||||
)
|
||||
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
LIBS="${saved_libs}"
|
||||
CPPFLAGS="${saved_cppflags}"
|
||||
|
||||
if test "${ac_cv_lib_$2}" = "yes"; then
|
||||
if test "${$2_LIBDIR}" != "" -a "${$2_LIBDIR}" != "/usr/lib"; then
|
||||
$2_LIB="-L${$2_LIBDIR} -l${PLATFORM_$2}"
|
||||
else
|
||||
$2_LIB="-l${PLATFORM_$2}"
|
||||
fi
|
||||
if test "${$2_INCDIR}" != "" -a "${$2_INCDIR}" != "/usr/include"; then
|
||||
$2_INCLUDE="-I${$2_INCDIR}"
|
||||
fi
|
||||
PBX_$2=1
|
||||
AC_DEFINE([HAVE_$2], 1, [$3])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(
|
||||
[AST_CHECK_OPENH323_BUILD], [
|
||||
if test "${HAS_OPENH323:-unset}" != "unset"; then
|
||||
AC_MSG_CHECKING(OpenH323 build option)
|
||||
OPENH323_SUFFIX=
|
||||
files=`ls -l ${OPENH323_LIBDIR}/libh323_${PWLIB_PLATFORM}_*.so*`
|
||||
libfile=
|
||||
if test -n "$files"; then
|
||||
for f in $files; do
|
||||
if test -f $f -a ! -L $f; then
|
||||
libfile=`basename $f`
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "${libfile:-unset}" != "unset"; then
|
||||
OPENH323_SUFFIX=`eval "echo ${libfile} | sed -e 's/libh323_${PWLIB_PLATFORM}_\(@<:@^.@:>@*\)\..*/\1/'"`
|
||||
fi
|
||||
case "${OPENH323_SUFFIX}" in
|
||||
n)
|
||||
OPENH323_BUILD="notrace";;
|
||||
r)
|
||||
OPENH323_BUILD="opt";;
|
||||
d)
|
||||
OPENH323_BUILD="debug";;
|
||||
*)
|
||||
OPENH323_BUILD="notrace";;
|
||||
esac
|
||||
AC_MSG_RESULT(${OPENH323_BUILD})
|
||||
|
||||
AC_SUBST([OPENH323_SUFFIX])
|
||||
AC_SUBST([OPENH323_BUILD])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# AST_FUNC_FORK
|
||||
# -------------
|
||||
AN_FUNCTION([fork], [AST_FUNC_FORK])
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
</member>
|
||||
<member name="DETECT_DEADLOCKS" displayname="Detect Deadlocks">
|
||||
</member>
|
||||
<member name="DO_CRASH" displayname="Crash on fatal errors">
|
||||
</member>
|
||||
<member name="DONT_OPTIMIZE" displayname="Disable Optimizations by the Compiler">
|
||||
</member>
|
||||
<member name="DUMP_SCHEDULER" displayname="Dump Scheduler Contents for Debugging">
|
||||
|
|
|
@ -4,6 +4,7 @@ FREETDS=@PBX_FREETDS@
|
|||
GSM=@PBX_GSM@
|
||||
GTK=@PBX_GTK@
|
||||
H323=@PBX_H323@
|
||||
OPENH323=@PBX_OPENH323@
|
||||
IKSEMEL=@PBX_IKSEMEL@
|
||||
IMAP_TK=@PBX_IMAP_TK@
|
||||
IXJUSER=@PBX_IXJUSER@
|
||||
|
|
|
@ -63,7 +63,20 @@ clean::
|
|||
rm -f busy.h ringtone.h gentone
|
||||
$(MAKE) -C misdn clean
|
||||
|
||||
-include $(PWD)/Makefile.ast
|
||||
ifneq ($(wildcard h323/Makefile.ast),)
|
||||
include h323/Makefile.ast
|
||||
H323LDFLAGS += -Wl,--version-script=h323/noexport.map
|
||||
else
|
||||
h323/libchanh323.a h323/Makefile.ast:
|
||||
$(CMD_PREFIX) $(MAKE) -C h323
|
||||
$(CMD_PREFIX) rm -f ../main/asterisk
|
||||
$(CMD_PREFIX) echo "***************************************************************"
|
||||
$(CMD_PREFIX) echo
|
||||
$(CMD_PREFIX) echo "********** Re-run 'make' to pick up H.323 parameters **********"
|
||||
$(CMD_PREFIX) echo
|
||||
$(CMD_PREFIX) echo "***************************************************************"
|
||||
$(CMD_PREFIX) exit 1
|
||||
endif
|
||||
|
||||
$(eval $(call ast_make_final_host,gentone,gentone.c))
|
||||
gentone: LIBS+=-lm
|
||||
|
@ -81,11 +94,13 @@ $(chan_iax2): iax2-parser.o iax2-provision.o
|
|||
chan_alsa.o: busy.h ringtone.h
|
||||
|
||||
ifeq ($(OSARCH),linux-gnu)
|
||||
chan_h323.so: chan_h323.o h323_module_interface.so h323/libchanh323.a h323/Makefile.ast
|
||||
$(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $^ h323/libchanh323.a $(H323LDLIBS) -lstdc++
|
||||
chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
|
||||
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
||||
$(CMD_PREFIX) $(CXX) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS)
|
||||
else
|
||||
chan_h323.so: chan_h323.o h323_module_interface.so h323/libchanh323.a
|
||||
$(CC) $(SOLINK) -o $@ $^ h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
|
||||
chan_h323.so: chan_h323.o h323/libchanh323.a
|
||||
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
||||
$(CMD_PREFIX) $(CXX) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
|
||||
endif
|
||||
|
||||
chan_misdn.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\"
|
||||
|
|
1820
channels/chan_h323.c
1820
channels/chan_h323.c
File diff suppressed because it is too large
Load Diff
|
@ -4,34 +4,50 @@
|
|||
# Make file for OpenH323 support layer
|
||||
#
|
||||
|
||||
.PHONY: Makefile.ast
|
||||
.PHONY: Makefile.ast clean
|
||||
|
||||
default:: opt
|
||||
|
||||
# Verify those options with main Makefile
|
||||
STDCCFLAGS += -DNDEBUG
|
||||
STDCCFLAGS += $(shell grep ^DEBUG_THREADS ../../Makefile | sed -e "s/^DEBUG_THREADS[ ]*=//" -e "s/\([^\#]*\)\#.*/\1/")
|
||||
STDCCFLAGS += -I../../include -include autoconfig.h
|
||||
STDCCFLAGS = -DNDEBUG
|
||||
STDCCFLAGS += -I../../include -include ../../include/asterisk/autoconfig.h
|
||||
STDCCFLAGS += -fPIC
|
||||
#OPTCCFLAGS +=
|
||||
CFLAGS += -pipe
|
||||
TARGET += libchanh323.a
|
||||
CFLAGS = -pipe
|
||||
TARGET = libchanh323.a
|
||||
TARGET += Makefile.ast
|
||||
SOURCES = ast_h323.cxx
|
||||
SOURCES = ast_h323.cxx compat_h323.cxx cisco-h225.cxx
|
||||
OBJDIR = .
|
||||
OBJS =
|
||||
|
||||
ifndef OPENH323DIR
|
||||
OPENH323DIR=$(HOME)/openh323
|
||||
OPENH323DIR=/usr/src/OpenH323/openh323
|
||||
endif
|
||||
|
||||
include $(OPENH323DIR)/openh323u.mak
|
||||
|
||||
$(SOURCES):: $(SOURCES:.cxx=.cpp)
|
||||
ln -f $< $@
|
||||
notrace::
|
||||
$(MAKE) NOTRACE=1 opt
|
||||
|
||||
define module_cxx_template
|
||||
$(1):: $(2)
|
||||
ln -f $(2) $(1)
|
||||
endef
|
||||
|
||||
$(foreach mod,$(SOURCES),$(eval $(call module_cxx_template,$(mod),$(mod:.cxx=.cpp))))
|
||||
#$(SOURCES):: $(SOURCES:.cxx=.cpp)
|
||||
# ln -f $(patsubst %.cxx, %.cpp, $@) $@
|
||||
|
||||
$(SOURCES):: Makefile ../../Makefile
|
||||
touch $(SOURCES)
|
||||
touch $@
|
||||
|
||||
libchanh323.a: $(OBJS)
|
||||
ar crv $@ $(OBJS)
|
||||
|
||||
cisco-h225.cpp:: cisco-h225.asn
|
||||
asnparser -m CISCO_H225 -c $<
|
||||
mv -f cisco-h225.cxx cisco-h225.cpp
|
||||
|
||||
Makefile.ast:
|
||||
@echo H323CFLAGS = $(STDCCFLAGS) $(OPTCCFLAGS) $(CFLAGS) >$@.tmp
|
||||
@echo H323LDFLAGS = $(CFLAGS) $(LDFLAGS) >>$@.tmp
|
||||
|
@ -39,4 +55,4 @@ Makefile.ast:
|
|||
@if [ -r $@ ] && cmp -s $@ $@.tmp; then rm -f $@.tmp; else mv -f $@.tmp $@; fi
|
||||
|
||||
clean::
|
||||
rm -f ast_h323.cxx libchanh323.a Makefile.ast *.dep
|
||||
rm -f $(SOURCES) $(TARGET) $(OBJS) Makefile.ast *.dep
|
||||
|
|
|
@ -4,13 +4,15 @@
|
|||
|
||||
First public release on November 10th, 2002
|
||||
|
||||
Dependancies: openssl-0.9.6b+
|
||||
Dependancies (based on OpenH323/PWLib ones):
|
||||
openssl-0.9.6b+
|
||||
openssl-devel-0.9.6b+
|
||||
expat-1.95+
|
||||
expat-dev-1.95+
|
||||
|
||||
Tested with Open H.323 version v1.17.1, PWLib v1.9.0 and GCC v3.2.2. Usage of any
|
||||
other versions is not supported.
|
||||
Tested with Open H.323 version v1.18.0, PWLib v1.10.0 and GCC v3.2.2. Usage of any
|
||||
other (especially prior OpenH323 v1.17.3 and PWLib v1.9.2) versions is not
|
||||
supported.
|
||||
|
||||
NOTICE: Whatever you do, DO NOT USE distrubution specific installs
|
||||
of Open H.323 and PWLib. In fact, you should check to make sure
|
||||
|
|
|
@ -2,11 +2,6 @@ The NuFone Network's Open H.323 Channel Driver for Asterisk
|
|||
|
||||
TODO:
|
||||
|
||||
- Fix Gatekeeper re-registration seg (HELP)
|
||||
|
||||
- Track down why calls to invalid extensions always
|
||||
get sent to 's' in context 'default'
|
||||
|
||||
- H.323 Native Bridging
|
||||
|
||||
- Gatekeeping support (started)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -29,6 +29,9 @@
|
|||
#ifndef AST_H323_H
|
||||
#define AST_H323_H
|
||||
|
||||
#define VERSION(a,b,c) ((a)*10000+(b)*100+(c))
|
||||
|
||||
#if 0
|
||||
/** These need to be redefined here because the C++
|
||||
side of this driver is blind to the asterisk headers */
|
||||
/*! G.723.1 compression */
|
||||
|
@ -53,21 +56,24 @@
|
|||
#define AST_FORMAT_SPEEX (1 << 9)
|
||||
/*! ILBC Free Codec */
|
||||
#define AST_FORMAT_ILBC (1 << 10)
|
||||
#endif
|
||||
|
||||
/**This class describes the G.723.1 codec capability.
|
||||
*/
|
||||
class H323_G7231Capability : public H323AudioCapability
|
||||
{
|
||||
PCLASSINFO(H323_G7231Capability, H323AudioCapability);
|
||||
|
||||
public:
|
||||
H323_G7231Capability(BOOL annexA = TRUE);
|
||||
Comparison Compare(const PObject & obj) const;
|
||||
PObject * Clone() const;
|
||||
virtual PObject * Clone() const;
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
unsigned GetSubType() const;
|
||||
PString GetFormatName() const;
|
||||
BOOL OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const;
|
||||
BOOL OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
|
||||
virtual unsigned GetSubType() const;
|
||||
virtual PString GetFormatName() const;
|
||||
virtual BOOL OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const;
|
||||
virtual BOOL OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
|
||||
|
||||
protected:
|
||||
BOOL annexA;
|
||||
};
|
||||
|
@ -95,7 +101,6 @@ class AST_G729Capability : public H323AudioCapability
|
|||
|
||||
/* Get the name of the media data format this class represents. */
|
||||
virtual PString GetFormatName() const;
|
||||
|
||||
};
|
||||
|
||||
/* This class describes the VoiceAge G729A codec capability. */
|
||||
|
@ -123,20 +128,53 @@ class AST_G729ACapability : public H323AudioCapability
|
|||
virtual PString GetFormatName() const;
|
||||
};
|
||||
|
||||
class MyH323EndPoint : public H323EndPoint {
|
||||
/* This class describes the GSM-06.10 codec capability. */
|
||||
class AST_GSM0610Capability : public H323AudioCapability
|
||||
{
|
||||
PCLASSINFO(AST_GSM0610Capability, H323AudioCapability);
|
||||
|
||||
public:
|
||||
/* Create a new GSM capability. */
|
||||
AST_GSM0610Capability(int comfortNoise = 0, int scrambled = 0);
|
||||
|
||||
/* Create a copy of the object. */
|
||||
virtual PObject * Clone() const;
|
||||
|
||||
/* Create the codec instance, allocating resources as required. */
|
||||
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
|
||||
|
||||
/* Get the sub-type of the capability. This is a code dependent on the
|
||||
main type of the capability.
|
||||
|
||||
This returns one of the four possible combinations of mode and speed
|
||||
using the enum values of the protocol ASN H245_AudioCapability class. */
|
||||
virtual unsigned GetSubType() const;
|
||||
|
||||
/* Get the name of the media data format this class represents. */
|
||||
virtual PString GetFormatName() const;
|
||||
|
||||
BOOL OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const;
|
||||
BOOL OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
|
||||
|
||||
protected:
|
||||
int comfortNoise;
|
||||
int scrambled;
|
||||
};
|
||||
|
||||
class MyH323EndPoint : public H323EndPoint
|
||||
{
|
||||
PCLASSINFO(MyH323EndPoint, H323EndPoint);
|
||||
|
||||
public:
|
||||
MyH323EndPoint();
|
||||
int MakeCall(const PString &, PString &, unsigned int *, call_options_t *opts);
|
||||
int MyMakeCall(const PString &, PString &, void *_callReference, void *_opts);
|
||||
BOOL ClearCall(const PString &, H323Connection::CallEndReason reason);
|
||||
BOOL ClearCall(const PString &);
|
||||
|
||||
void OnClosedLogicalChannel(H323Connection &, const H323Channel &);
|
||||
void OnConnectionEstablished(H323Connection &, const PString &);
|
||||
void OnConnectionCleared(H323Connection &, const PString &);
|
||||
H323Connection * CreateConnection(unsigned, void *);
|
||||
virtual H323Connection * CreateConnection(unsigned, void *, H323Transport *, H323SignalPDU *);
|
||||
void SendUserTone(const PString &, char);
|
||||
BOOL OnConnectionForwarded(H323Connection &, const PString &, const H323SignalPDU &);
|
||||
BOOL ForwardConnection(H323Connection &, const PString &, const H323SignalPDU &);
|
||||
|
@ -145,8 +183,8 @@ class MyH323EndPoint : public H323EndPoint {
|
|||
PStringArray SupportedPrefixes;
|
||||
};
|
||||
|
||||
class MyH323Connection : public H323Connection {
|
||||
|
||||
class MyH323Connection : public H323Connection
|
||||
{
|
||||
PCLASSINFO(MyH323Connection, H323Connection);
|
||||
|
||||
public:
|
||||
|
@ -168,37 +206,48 @@ class MyH323Connection : public H323Connection {
|
|||
BOOL OnSendSignalSetup(H323SignalPDU &);
|
||||
BOOL OnStartLogicalChannel(H323Channel &);
|
||||
BOOL OnClosingLogicalChannel(H323Channel &);
|
||||
void SendUserInputTone(char, unsigned);
|
||||
void OnUserInputTone(char, unsigned, unsigned, unsigned);
|
||||
void OnUserInputString(const PString &value);
|
||||
virtual void SendUserInputTone(char tone, unsigned duration = 0, unsigned logicalChannel = 0, unsigned rtpTimestamp = 0);
|
||||
virtual void OnUserInputTone(char, unsigned, unsigned, unsigned);
|
||||
virtual void OnUserInputString(const PString &value);
|
||||
BOOL OnReceivedProgress(const H323SignalPDU &);
|
||||
void OnSendCapabilitySet(H245_TerminalCapabilitySet &);
|
||||
void OnSetLocalCapabilities();
|
||||
void SetCapabilities(int, int);
|
||||
void SetCapabilities(int, int, void *, int);
|
||||
BOOL OnReceivedCapabilitySet(const H323Capabilities &, const H245_MultiplexCapability *,
|
||||
H245_TerminalCapabilitySetReject &);
|
||||
void SetCause(int _cause) { cause = _cause; };
|
||||
virtual BOOL StartControlChannel(const H225_TransportAddress & h245Address);
|
||||
void SetCallOptions(void *opts, BOOL isIncoming);
|
||||
void SetCallDetails(void *callDetails, const H323SignalPDU &setupPDU, BOOL isIncoming);
|
||||
#ifdef TUNNELLING
|
||||
virtual BOOL HandleSignalPDU(H323SignalPDU &pdu);
|
||||
BOOL EmbedTunneledInfo(H323SignalPDU &pdu);
|
||||
#endif
|
||||
|
||||
PString sourceAliases;
|
||||
PString destAliases;
|
||||
PString sourceE164;
|
||||
PString destE164;
|
||||
PString rdnis;
|
||||
int redirect_reason;
|
||||
|
||||
WORD sessionId;
|
||||
BOOL bridging;
|
||||
#ifdef TUNNELLING
|
||||
int remoteTunnelOptions;
|
||||
int tunnelOptions;
|
||||
#endif
|
||||
|
||||
unsigned progressSetup;
|
||||
unsigned progressAlert;
|
||||
int cause;
|
||||
|
||||
RTP_DataFrame::PayloadTypes dtmfCodec;
|
||||
|
||||
PString ast_cid_num;
|
||||
PString ast_cid_name;
|
||||
int dtmfMode;
|
||||
};
|
||||
|
||||
class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel {
|
||||
|
||||
class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel
|
||||
{
|
||||
PCLASSINFO(MyH323_ExternalRTPChannel, H323_ExternalRTPChannel);
|
||||
|
||||
public:
|
||||
|
@ -227,13 +276,16 @@ class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel {
|
|||
* The MyProcess is a necessary descendant PProcess class so that the H323EndPoint
|
||||
* objected to be created from within that class. (Solves the who owns main() problem).
|
||||
*/
|
||||
class MyProcess : public PProcess {
|
||||
|
||||
class MyProcess : public PProcess
|
||||
{
|
||||
PCLASSINFO(MyProcess, PProcess);
|
||||
|
||||
public:
|
||||
MyProcess();
|
||||
~MyProcess();
|
||||
void Main();
|
||||
};
|
||||
|
||||
#include "compat_h323.h"
|
||||
|
||||
#endif /* !defined AST_H323_H */
|
||||
|
|
|
@ -28,14 +28,27 @@
|
|||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
/*
|
||||
* Enable support for sending/reception of tunnelled Q.SIG messages and
|
||||
* some sort of IEs (especially RedirectingNumber) which Cisco CallManager
|
||||
* isn't like to pass in standard Q.931 message.
|
||||
*
|
||||
*/
|
||||
#define TUNNELLING
|
||||
|
||||
#define H323_TUNNEL_CISCO (1 << 0)
|
||||
#define H323_TUNNEL_QSIG (1 << 1)
|
||||
|
||||
/** call_option struct holds various bits
|
||||
* of information for each call */
|
||||
typedef struct call_options {
|
||||
char cid_num[80];
|
||||
char cid_name[80];
|
||||
int noFastStart;
|
||||
int noH245Tunneling;
|
||||
int noSilenceSuppression;
|
||||
char cid_rdnis[80];
|
||||
int redirect_reason;
|
||||
int fastStart;
|
||||
int h245Tunneling;
|
||||
int silenceSuppression;
|
||||
int progress_setup;
|
||||
int progress_alert;
|
||||
int progress_audio;
|
||||
|
@ -44,44 +57,43 @@ typedef struct call_options {
|
|||
int capability;
|
||||
int bridge;
|
||||
int nat;
|
||||
int tunnelOptions;
|
||||
struct ast_codec_pref prefs;
|
||||
} call_options_t;
|
||||
|
||||
/* structure to hold the valid asterisk users */
|
||||
struct oh323_user {
|
||||
char name[80];
|
||||
ASTOBJ_COMPONENTS(struct oh323_user);
|
||||
// char name[80];
|
||||
char context[80];
|
||||
char secret[80];
|
||||
char callerid[80];
|
||||
char accountcode[AST_MAX_ACCOUNT_CODE];
|
||||
int amaflags;
|
||||
int host;
|
||||
struct sockaddr_in addr;
|
||||
struct ast_ha *ha;
|
||||
call_options_t options;
|
||||
struct oh323_user *next;
|
||||
};
|
||||
|
||||
/* structure to hold the valid asterisk peers
|
||||
All peers are registered to a GK if there is one */
|
||||
struct oh323_peer {
|
||||
char name[80];
|
||||
ASTOBJ_COMPONENTS(struct oh323_peer);
|
||||
char mailbox[80];
|
||||
int delme;
|
||||
struct sockaddr_in addr;
|
||||
struct ast_ha *ha;
|
||||
call_options_t options;
|
||||
struct oh323_peer *next;
|
||||
};
|
||||
|
||||
/* structure to hold the H.323 aliases which get registered to
|
||||
the H.323 endpoint and gatekeeper */
|
||||
struct oh323_alias {
|
||||
char name[80];
|
||||
ASTOBJ_COMPONENTS(struct oh323_alias);
|
||||
char e164[20]; /* tells a GK to route this E.164 to this alias */
|
||||
char prefix[500]; /* tells a GK this alias supports these prefixes */
|
||||
char secret[20]; /* the H.235 password to send to the GK for authentication */
|
||||
char context[80];
|
||||
struct oh323_alias *next;
|
||||
};
|
||||
|
||||
/** call_details struct call detail records
|
||||
|
@ -95,6 +107,8 @@ typedef struct call_details {
|
|||
char *call_source_name;
|
||||
char *call_source_e164;
|
||||
char *call_dest_e164;
|
||||
char *redirect_number;
|
||||
int redirect_reason;
|
||||
int presentation;
|
||||
int screening;
|
||||
char *sourceIp;
|
||||
|
@ -107,8 +121,8 @@ typedef struct rtp_info {
|
|||
|
||||
/* This is a callback prototype function, called pass
|
||||
DTMF down the RTP. */
|
||||
typedef int (*send_digit_cb)(unsigned, char, const char *);
|
||||
extern send_digit_cb on_send_digit;
|
||||
typedef int (*receive_digit_cb)(unsigned, char, const char *, int);
|
||||
extern receive_digit_cb on_receive_digit;
|
||||
|
||||
/* This is a callback prototype function, called to collect
|
||||
the external RTP port from Asterisk. */
|
||||
|
@ -167,6 +181,9 @@ extern hangup_cb on_hangup;
|
|||
typedef void (*setcapabilities_cb)(unsigned, const char *);
|
||||
extern setcapabilities_cb on_setcapabilities;
|
||||
|
||||
typedef void (*setpeercapabilities_cb)(unsigned, const char *, int);
|
||||
extern setpeercapabilities_cb on_setpeercapabilities;
|
||||
|
||||
/* debug flag */
|
||||
extern int h323debug;
|
||||
|
||||
|
@ -196,13 +213,14 @@ extern "C" {
|
|||
clear_con_cb,
|
||||
chan_ringing_cb,
|
||||
con_established_cb,
|
||||
send_digit_cb,
|
||||
receive_digit_cb,
|
||||
answer_call_cb,
|
||||
progress_cb,
|
||||
rfc2833_cb,
|
||||
hangup_cb,
|
||||
setcapabilities_cb);
|
||||
int h323_set_capabilities(const char *, int, int);
|
||||
setcapabilities_cb,
|
||||
setpeercapabilities_cb);
|
||||
int h323_set_capabilities(const char *, int, int, struct ast_codec_pref *, int);
|
||||
int h323_set_alias(struct oh323_alias *);
|
||||
int h323_set_gk(int, char *, char *);
|
||||
void h323_set_id(char *);
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
; The NuFone Network's
|
||||
; Open H.323 driver configuration
|
||||
;
|
||||
[general]
|
||||
port = 1720
|
||||
bindaddr = 1.2.3.4 ; this SHALL contain a single, valid IP address for this machine
|
||||
;tos=lowdelay
|
||||
;
|
||||
; You may specify a global default AMA flag for iaxtel calls. It must be
|
||||
; one of 'default', 'omit', 'billing', or 'documentation'. These flags
|
||||
; are used in the generation of call detail records.
|
||||
;
|
||||
;amaflags = default
|
||||
;
|
||||
; You may specify a default account for Call Detail Records in addition
|
||||
; to specifying on a per-user basis
|
||||
;
|
||||
;accountcode=lss0101
|
||||
;
|
||||
; You can fine tune codecs here using "allow" and "disallow" clauses
|
||||
; with specific codecs. Use "all" to represent all formats.
|
||||
;
|
||||
disallow=all
|
||||
;allow=all ; turns on all installed codecs
|
||||
;disallow=g723.1 ; Hm... Proprietary, don't use it...
|
||||
allow=gsm ; Always allow GSM, it's cool :)
|
||||
;
|
||||
; User-Input Mode (DTMF)
|
||||
;
|
||||
; valid entries are: rfc2833, inband
|
||||
; default is rfc2833
|
||||
;dtmfmode=rfc2833
|
||||
;
|
||||
; Default RTP Payload to send RFC2833 DTMF on. This is used to
|
||||
; interoperate with broken gateways which cannot successfully
|
||||
; negotiate a RFC2833 payload type in the TerminalCapabilitySet.
|
||||
;
|
||||
; You may also specify on either a per-peer or per-user basis below.
|
||||
;dtmfcodec=101
|
||||
;
|
||||
; Set the gatekeeper
|
||||
; DISCOVER - Find the Gk address using multicast
|
||||
; DISABLE - Disable the use of a GK
|
||||
; <IP address> or <Host name> - The acutal IP address or hostname of your GK
|
||||
;gatekeeper = DISABLE
|
||||
;
|
||||
;
|
||||
; Tell Asterisk whether or not to accept Gatekeeper
|
||||
; routed calls or not. Normally this should always
|
||||
; be set to yes, unless you want to have finer control
|
||||
; over which users are allowed access to Asterisk.
|
||||
; Default: YES
|
||||
;
|
||||
;AllowGKRouted = yes
|
||||
;
|
||||
; Optionally you can determine a user by Source IP versus its H.323 alias.
|
||||
; Default behavour is to determine user by H.323 alias.
|
||||
;UserByAlias=no
|
||||
;
|
||||
; Default context gets used in siutations where you are using
|
||||
; the GK routed model or no type=user was found. This gives you
|
||||
; the ability to either play an invalid message or to simply not
|
||||
; use user authentication at all.
|
||||
;
|
||||
;context=default
|
||||
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
|
||||
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
|
||||
; H323 channel. Defaults to "no". An enabled jitterbuffer will
|
||||
; be used only if the sending side can create and the receiving
|
||||
; side can not accept jitter. The H323 channel can accept jitter,
|
||||
; thus an enabled jitterbuffer on the receive H323 side will only
|
||||
; be used if the sending side can create jitter and jbforce is
|
||||
; also set to yes.
|
||||
|
||||
; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a H323
|
||||
; channel. Defaults to "no".
|
||||
|
||||
; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
|
||||
|
||||
; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
|
||||
; resynchronized. Useful to improve the quality of the voice, with
|
||||
; big jumps in/broken timestamps, usualy sent from exotic devices
|
||||
; and programs. Defaults to 1000.
|
||||
|
||||
; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a H323
|
||||
; channel. Two implementations are currenlty available - "fixed"
|
||||
; (with size always equals to jbmax-size) and "adaptive" (with
|
||||
; variable size, actually the new jb of IAX2). Defaults to fixed.
|
||||
|
||||
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
|
||||
;-----------------------------------------------------------------------------------
|
||||
;
|
||||
; H.323 Alias definitions
|
||||
;
|
||||
; Type 'h323' will register aliases to the endpoint
|
||||
; and Gatekeeper, if there is one.
|
||||
;
|
||||
; Example: if someone calls time@your.asterisk.box.com
|
||||
; Asterisk will send the call to the extension 'time'
|
||||
; in the context default
|
||||
;
|
||||
; [default]
|
||||
; exten => time,1,Answer
|
||||
; exten => time,2,Playback,current-time
|
||||
;
|
||||
; Keyword's 'prefix' and 'e164' are only make sense when
|
||||
; used with a gatekeeper. You can specify either a prefix
|
||||
; or E.164 this endpoint is responsible for terminating.
|
||||
;
|
||||
; Example: The H.323 alias 'det-gw' will tell the gatekeeper
|
||||
; to route any call with the prefix 1248 to this alias. Keyword
|
||||
; e164 is used when you want to specifiy a full telephone
|
||||
; number. So a call to the number 18102341212 would be
|
||||
; routed to the H.323 alias 'time'.
|
||||
;
|
||||
;[time]
|
||||
;type=h323
|
||||
;e164=18102341212
|
||||
;context=default
|
||||
;
|
||||
;[det-gw]
|
||||
;type=h323
|
||||
;prefix=1248,1313
|
||||
;context=detroit
|
||||
;
|
||||
;
|
||||
; Inbound H.323 calls from BillyBob would land in the incoming
|
||||
; context with a maximum of 4 concurrent incoming calls
|
||||
;
|
||||
;
|
||||
; Note: If keyword 'incominglimit' are omitted Asterisk will not
|
||||
; enforce any maximum number of concurrent calls.
|
||||
;
|
||||
;[BillyBob]
|
||||
;type=user
|
||||
;host=192.168.1.1
|
||||
;context=incoming
|
||||
;incominglimit=4
|
||||
;
|
||||
;
|
||||
; Outbound H.323 call to Larry using SlowStart
|
||||
;
|
||||
[Larry]
|
||||
type=peer
|
||||
host=192.168.2.1
|
||||
noFastStart=yes
|
||||
|
||||
|
||||
|
78
configure.ac
78
configure.ac
|
@ -195,6 +195,7 @@ AST_EXT_LIB_SETUP([POPT], [popt], [popt])
|
|||
AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres])
|
||||
AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
|
||||
AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
|
||||
AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
|
||||
AST_EXT_LIB_SETUP([QT], [Qt], [qt])
|
||||
AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
|
||||
AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
|
||||
|
@ -701,48 +702,57 @@ AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
|
|||
|
||||
AST_EXT_LIB_CHECK([PRI], [pri], [pri_call], [libpri.h])
|
||||
|
||||
PLATFORM_PTLIB="ptlib_${OSTYPE}_${MACHTYPE}_r"
|
||||
if test "${USE_PWLIB}" != "no"; then
|
||||
AC_MSG_CHECKING(for existence of pwlib)
|
||||
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
saved_libs="${LIBS}"
|
||||
LIBS="${LIBS} -L${PWLIB_DIR} -l${PLATFORM_PTLIB}"
|
||||
CPPFLAGS="${CPPFLAGS} -I${PWLIB_DIR}/include"
|
||||
|
||||
AC_LINK_IFELSE(
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[#include "ptime.h"],
|
||||
[int q = PTime::IsDaylightSaving();])
|
||||
],
|
||||
[ AC_MSG_RESULT(yes)
|
||||
ac_cv_lib_pwlib="yes"
|
||||
],
|
||||
[ AC_MSG_RESULT(no)
|
||||
ac_cv_lib_pwlib="no"
|
||||
]
|
||||
)
|
||||
|
||||
LIBS="${saved_libs}"
|
||||
CPPFLAGS="${saved_cppflags}"
|
||||
|
||||
if test "${ac_cv_lib_pwlib}" = "yes"; then
|
||||
PWLIB_LIB="-l{PLATFORM_PWLIB}"
|
||||
if test "${PWLIB_DIR}" != ""; then
|
||||
PWLIB_LIB="-L${PWLIB_DIR}/lib ${PWLIB_LIB}"
|
||||
PWLIB_INCLUDE="-I${PWLIB_DIR}/include"
|
||||
if test ! -z "${PWLIB_DIR}"; then
|
||||
PWLIBDIR="${PWLIB_DIR}"
|
||||
fi
|
||||
PBX_PWLIB=1
|
||||
AC_DEFINE([HAVE_PWLIB], 1, [Define if your system has the pwlib libraries.])
|
||||
elif test ! -z "${PWLIB_MANDATORY}"; then
|
||||
AST_CHECK_PWLIB()
|
||||
AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2])
|
||||
|
||||
if test "${HAS_PWLIB:-unset}" != "unset"; then
|
||||
AST_CHECK_OPENH323_PLATFORM()
|
||||
|
||||
PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r"
|
||||
|
||||
AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB],
|
||||
[Define if your system has the PWLib libraries.],
|
||||
[#include "ptlib.h"],
|
||||
[BOOL q = PTime::IsDaylightSavings();])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "${USE_PWLIB}" != "no" -a "x${ac_cv_lib_PWLIB}" != "xyes" -a ! -z "${PWLIB_MANDATORY}"; then
|
||||
AC_MSG_NOTICE(***)
|
||||
AC_MSG_NOTICE(*** The PWLIB installation on this system appears to be broken.)
|
||||
AC_MSG_NOTICE(*** Either correct the installation, or run configure)
|
||||
AC_MSG_NOTICE(*** including --without-pwlib)
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then
|
||||
if test ! -z "${OPENH323_DIR}"; then
|
||||
OPENH323DIR="${OPENH323_DIR}"
|
||||
fi
|
||||
AST_CHECK_OPENH323()
|
||||
AST_CHECK_PWLIB_VERSION([OpenH323], [OPENH323], [openh323buildopts.h], [1], [17], [3])
|
||||
AST_CHECK_OPENH323_BUILD()
|
||||
PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
|
||||
AST_CHECK_PWLIB_BUILD([OpenH323], [OPENH323],
|
||||
[Define if your system has the OpenH323 libraries.],
|
||||
[#include "ptlib.h"
|
||||
#include "h323.h"
|
||||
#include "h323ep.h"],
|
||||
[H323EndPoint ep = H323EndPoint();],
|
||||
[${PWLIB_INCLUDE}], [${PWLIB_LIB}])
|
||||
fi
|
||||
if test "${USE_OPENH323}" != "no" -a "x${ac_cv_lib_OPENH323}" != "xyes" -a ! -z "${OPENH323_MANDATORY}"; then
|
||||
AC_MSG_NOTICE(***)
|
||||
AC_MSG_NOTICE(*** The PWLIB installation on this system appears to be broken.)
|
||||
AC_MSG_NOTICE(*** Either correct the installation, or run configure)
|
||||
AC_MSG_NOTICE(*** including --without-pwlib)
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
|
@ -1000,7 +1010,7 @@ AC_SUBST(PBX_CURL)
|
|||
AC_SUBST(CURL_INCLUDE)
|
||||
AC_SUBST(CURL_LIB)
|
||||
|
||||
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
|
||||
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
if test "x${silent}" != "xyes" ; then
|
||||
|
|
|
@ -52,6 +52,11 @@ the ones in static configuration.
|
|||
With caching, the device stays in memory for a specified time. More
|
||||
information about this is to be found in the sip.conf sample file.
|
||||
|
||||
* Realtime H.323 friends
|
||||
------------------------
|
||||
Like SIP realtime friends, H.323 friends aslo can be configured using
|
||||
dynamic realtime objects.
|
||||
|
||||
* New function in the dial plan: The Realtime Switch
|
||||
----------------------------------------------------
|
||||
The realtime switch is more than a port of functionality in v1.0 to the
|
||||
|
|
|
@ -115,6 +115,13 @@ AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep)))
|
|||
AST_EMBED_LIBS:=$(foreach dep,$(EMBED_LIBS),$(value $(dep)))
|
||||
OBJS:=$(sort $(OBJS))
|
||||
|
||||
ifneq ($(wildcard ../channels/h323/Makefile.ast),)
|
||||
include ../channels/h323/Makefile.ast
|
||||
else
|
||||
H323LDFLAGS=
|
||||
H323LDLIBS=
|
||||
endif
|
||||
|
||||
asterisk: $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS)
|
||||
@$(ASTTOPDIR)/build_tools/make_build_h > $(ASTTOPDIR)/include/asterisk/build.h.tmp
|
||||
@if cmp -s $(ASTTOPDIR)/include/asterisk/build.h.tmp $(ASTTOPDIR)/include/asterisk/build.h ; then echo ; else \
|
||||
|
@ -123,7 +130,7 @@ asterisk: $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS)
|
|||
@rm -f $(ASTTOPDIR)/include/asterisk/build.h.tmp
|
||||
@$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
|
||||
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
|
||||
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o asterisk $(ASTLINK) $(AST_EMBED_LDFLAGS) $(LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS)
|
||||
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o asterisk $(ASTLINK) $(AST_EMBED_LDFLAGS) $(LDFLAGS) $(H323LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS)
|
||||
|
||||
clean::
|
||||
rm -f asterisk
|
||||
|
|
Loading…
Reference in New Issue