OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 16-Sep-2006 17:32:25
Branch: HEAD Handle: 2006091616322400
Modified files:
openpkg-src/asterisk asterisk.patch asterisk.spec asterisk.txt
Log:
add optional Zaptel support for Linux & FreeBSD; this allows one to
use PSTN hardware or at least the ztdummy kernel device which in turn
allows one to use the more robust MeetMe conference application
Summary:
Revision Changes Path
1.16 +43 -32 openpkg-src/asterisk/asterisk.patch
1.14 +23 -0 openpkg-src/asterisk/asterisk.spec
1.9 +26 -0 openpkg-src/asterisk/asterisk.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/asterisk/asterisk.patch
============================================================================
$ cvs diff -u -r1.15 -r1.16 asterisk.patch
--- openpkg-src/asterisk/asterisk.patch 16 Sep 2006 07:53:32 -0000
1.15
+++ openpkg-src/asterisk/asterisk.patch 16 Sep 2006 15:32:24 -0000
1.16
@@ -1,6 +1,6 @@
Index: Makefile
--- Makefile.orig 2006-09-06 22:09:10 +0200
-+++ Makefile 2006-09-16 09:51:07 +0200
++++ Makefile 2006-09-16 14:56:22 +0200
@@ -47,14 +47,14 @@
#K6OPT = -DK6OPT
@@ -128,7 +128,18 @@
ifeq ($(OSCPU),sun4u)
OPTIMIZE+=-mcpu=v9 -mcpu=ultrasparc
endif
-@@ -341,9 +305,9 @@
+@@ -306,6 +270,10 @@
+ endif
+
+ ifndef WITHOUT_ZAPTEL
++ifeq ($(OSARCH),FreeBSD)
++CFLAGS+=-I/usr/local/include
++LIBS+=-L/usr/local/lib
++endif
+
+ ifneq ($(wildcard
$(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard
$(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard
$(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
+ ASTCFLAGS+=-DZAPTEL_OPTIMIZATIONS
+@@ -341,9 +309,9 @@
ASTCFLAGS+= $(MALLOC_DEBUG)
ASTCFLAGS+= $(BUSYDETECT)
ASTCFLAGS+= $(OPTIONS)
@@ -143,7 +154,7 @@
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
Index: agi/Makefile
--- agi/Makefile.orig 2006-03-28 22:22:05 +0200
-+++ agi/Makefile 2006-09-16 09:51:07 +0200
++++ agi/Makefile 2006-09-16 14:55:34 +0200
@@ -20,9 +20,7 @@
LIBS=-lsocket -lnsl ../strcompat.o
endif
@@ -157,7 +168,7 @@
Index: app_conference/Makefile
--- app_conference/Makefile.orig 2005-10-27 19:53:35 +0200
-+++ app_conference/Makefile 2006-09-16 09:51:07 +0200
++++ app_conference/Makefile 2006-09-16 14:55:34 +0200
@@ -20,10 +20,10 @@
INSTALL_PREFIX := /opt/horizon
INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules
@@ -229,7 +240,7 @@
# cp conf.conf /etc/asterisk/
Index: app_conference/app_conference.h
--- app_conference/app_conference.h.orig 2005-12-16 23:31:58 +0100
-+++ app_conference/app_conference.h 2006-09-16 09:51:07 +0200
++++ app_conference/app_conference.h 2006-09-16 14:55:34 +0200
@@ -33,6 +33,7 @@
#include <asterisk/channel.h>
#include <asterisk/file.h>
@@ -253,7 +264,7 @@
//
Index: app_conference/conference.c
--- app_conference/conference.c.orig 2005-10-27 19:53:35 +0200
-+++ app_conference/conference.c 2006-09-16 09:51:07 +0200
++++ app_conference/conference.c 2006-09-16 14:55:34 +0200
@@ -568,7 +568,6 @@
conf->memberlist = NULL ;
@@ -282,7 +293,7 @@
Index: apps/Makefile
--- apps/Makefile.orig 2006-04-30 15:38:22 +0200
-+++ apps/Makefile 2006-09-16 09:51:07 +0200
++++ apps/Makefile 2006-09-16 14:55:34 +0200
@@ -54,16 +54,11 @@
APPS+=app_osplookup.so
endif
@@ -306,7 +317,7 @@
CYGSOLINK=-Wl,[EMAIL PROTECTED] -Wl,--export-all-symbols
Index: asterisk-addons-1.2.4/Makefile
--- asterisk-addons-1.2.4/Makefile.orig 2005-12-02 00:14:28 +0100
-+++ asterisk-addons-1.2.4/Makefile 2006-09-16 09:51:07 +0200
++++ asterisk-addons-1.2.4/Makefile 2006-09-16 14:55:34 +0200
@@ -27,17 +27,9 @@
#
# MySQL stuff... Autoconf anyone??
@@ -330,7 +341,7 @@
Index: asterisk.c
--- asterisk.c.orig 2006-08-22 00:34:26 +0200
-+++ asterisk.c 2006-09-16 09:51:07 +0200
++++ asterisk.c 2006-09-16 14:55:34 +0200
@@ -1902,9 +1902,9 @@
} else if (!strcasecmp(v->name, "astspooldir")) {
ast_copy_string(ast_config_AST_SPOOL_DIR, v->value,
sizeof(ast_config_AST_SPOOL_DIR));
@@ -344,7 +355,7 @@
ast_copy_string(ast_config_AST_LOG_DIR, v->value,
sizeof(ast_config_AST_LOG_DIR));
Index: build_tools/make_defaults_h
--- build_tools/make_defaults_h.orig 2005-06-20 19:26:08 +0200
-+++ build_tools/make_defaults_h 2006-09-16 09:51:07 +0200
++++ build_tools/make_defaults_h 2006-09-16 14:55:34 +0200
@@ -14,7 +14,7 @@
#define AST_LOG_DIR "${INSTALL_PATH}${ASTLOGDIR}"
#define AST_AGI_DIR "${INSTALL_PATH}${AGI_DIR}"
@@ -356,7 +367,7 @@
#define AST_CONFIG_FILE "${INSTALL_PATH}${ASTCONFPATH}"
Index: cdr/Makefile
--- cdr/Makefile.orig 2006-04-30 16:27:56 +0200
-+++ cdr/Makefile 2006-09-16 09:51:07 +0200
++++ cdr/Makefile 2006-09-16 14:55:34 +0200
@@ -20,10 +20,8 @@
CFLAGS+=-fPIC
endif
@@ -372,7 +383,7 @@
#This works for even old (2.96) versions of gcc and provides a small boost
either way.
Index: channels/Makefile
--- channels/Makefile.orig 2006-08-17 23:57:19 +0200
-+++ channels/Makefile 2006-09-16 09:51:07 +0200
++++ channels/Makefile 2006-09-16 14:55:34 +0200
@@ -21,9 +21,7 @@
#CHANNEL_LIBS+=chan_modem.so chan_modem_aopen.so chan_modem_bestdata.so
endif
@@ -386,7 +397,7 @@
PTLIB=-lpt_OpenBSD_x86_r
Index: channels/chan_h323.c
--- channels/chan_h323.c.orig 2006-08-30 20:59:44 +0200
-+++ channels/chan_h323.c 2006-09-16 09:51:07 +0200
++++ channels/chan_h323.c 2006-09-16 14:55:34 +0200
@@ -31,6 +31,7 @@
* \ingroup channel_drivers
*/
@@ -397,7 +408,7 @@
#include <sys/param.h>
Index: channels/chan_iax2.c
--- channels/chan_iax2.c.orig 2006-09-06 17:55:20 +0200
-+++ channels/chan_iax2.c 2006-09-16 09:51:07 +0200
++++ channels/chan_iax2.c 2006-09-16 14:55:34 +0200
@@ -2606,7 +2606,7 @@
struct ast_variable *var;
struct ast_variable *tmp;
@@ -422,7 +433,7 @@
} else if (!strcasecmp(tmp->name, "port")) {
Index: channels/chan_sip.c
--- channels/chan_sip.c.orig 2006-09-09 14:14:03 +0200
-+++ channels/chan_sip.c 2006-09-16 09:51:07 +0200
++++ channels/chan_sip.c 2006-09-16 14:55:34 +0200
@@ -12250,7 +12250,7 @@
int obproxyfound=0;
int found=0;
@@ -447,7 +458,7 @@
} else if (realtime && !strcasecmp(v->name, "name"))
Index: channels/chan_skinny.c
--- channels/chan_skinny.c.orig 2006-08-30 20:59:44 +0200
-+++ channels/chan_skinny.c 2006-09-16 09:51:07 +0200
++++ channels/chan_skinny.c 2006-09-16 14:55:34 +0200
@@ -99,7 +99,7 @@
#define htolel(x) (x)
#define htoles(x) (x)
@@ -459,7 +470,7 @@
(((x) & 0x00ff) << 8))
Index: codecs/Makefile
--- codecs/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ codecs/Makefile 2006-09-16 09:51:07 +0200
++++ codecs/Makefile 2006-09-16 14:55:34 +0200
@@ -28,45 +28,16 @@
LIBG723B=g723.1b/libg723b.a
endif
@@ -512,7 +523,7 @@
codec_adpcm.so codec_ulaw.so codec_alaw.so codec_a_mu.so \
Index: codecs/gsm/src/short_term.c
--- codecs/gsm/src/short_term.c.orig 2005-11-29 19:24:39 +0100
-+++ codecs/gsm/src/short_term.c 2006-09-16 09:51:07 +0200
++++ codecs/gsm/src/short_term.c 2006-09-16 14:55:34 +0200
@@ -373,7 +373,6 @@
word * LARpp_j_1 = S->LARpp[ S->j ^= 1 ];
@@ -523,7 +534,7 @@
# define FILTER (* (S->fast \
Index: codecs/lpc10/analys.c
--- codecs/lpc10/analys.c.orig 2005-11-29 19:24:39 +0100
-+++ codecs/lpc10/analys.c 2006-09-16 09:51:07 +0200
++++ codecs/lpc10/analys.c 2006-09-16 14:55:34 +0200
@@ -32,7 +32,7 @@
#include "f2c.h"
@@ -535,7 +546,7 @@
/*:ref: preemp_ 14 5 6 6 4 6 6 */
Index: dns.c
--- dns.c.orig 2005-11-29 19:24:39 +0100
-+++ dns.c 2006-09-16 09:51:50 +0200
++++ dns.c 2006-09-16 14:55:34 +0200
@@ -194,9 +194,7 @@
int res, ret = -1;
@@ -548,7 +559,7 @@
#else
Index: formats/Makefile
--- formats/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ formats/Makefile 2006-09-16 09:51:07 +0200
++++ formats/Makefile 2006-09-16 14:55:34 +0200
@@ -29,9 +29,7 @@
FORMAT_LIBS+=format_ogg_vorbis.so
endif
@@ -562,7 +573,7 @@
Index: formats/msgsm.h
--- formats/msgsm.h.orig 2005-11-29 19:24:39 +0100
-+++ formats/msgsm.h 2006-09-16 09:51:07 +0200
++++ formats/msgsm.h 2006-09-16 14:55:34 +0200
@@ -562,6 +562,7 @@
xmc[46] = sr & 0x7; sr >>= 3;
xmc[47] = sr & 0x7; sr >>= 3;
@@ -573,7 +584,7 @@
xmc[50] = sr & 0x7; sr >>= 3;
Index: frame.c
--- frame.c.orig 2006-07-31 06:06:16 +0200
-+++ frame.c 2006-09-16 09:51:07 +0200
++++ frame.c 2006-09-16 14:55:34 +0200
@@ -1055,7 +1055,7 @@
{
switch(buf & TYPE_MASK) {
@@ -585,7 +596,7 @@
return 4;
Index: funcs/Makefile
--- funcs/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ funcs/Makefile 2006-09-16 09:51:07 +0200
++++ funcs/Makefile 2006-09-16 14:55:34 +0200
@@ -40,9 +40,7 @@
CFLAGS+=-fPIC
endif
@@ -599,7 +610,7 @@
Index: funcs/func_strings.c
--- funcs/func_strings.c.orig 2006-03-21 18:45:56 +0100
-+++ funcs/func_strings.c 2006-09-16 09:51:07 +0200
++++ funcs/func_strings.c 2006-09-16 14:55:34 +0200
@@ -169,7 +169,7 @@
epochi = tv.tv_sec;
}
@@ -611,7 +622,7 @@
format = "%c";
Index: pbx/Makefile
--- pbx/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ pbx/Makefile 2006-09-16 09:51:07 +0200
++++ pbx/Makefile 2006-09-16 14:55:34 +0200
@@ -14,9 +14,7 @@
PBX_LIBS=pbx_config.so pbx_spool.so pbx_dundi.so pbx_loopback.so
pbx_realtime.so \
pbx_ael.so
@@ -625,7 +636,7 @@
#PBX_LIBS+=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null
2>/dev/null && echo "pbx_gtkconsole.so")
Index: res/Makefile
--- res/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ res/Makefile 2006-09-16 09:51:07 +0200
++++ res/Makefile 2006-09-16 14:55:34 +0200
@@ -36,10 +36,8 @@
endif
endif
@@ -641,7 +652,7 @@
CYGSOLINK=-Wl,[EMAIL PROTECTED] -Wl,--export-all-symbols
Index: res/res_features.c
--- res/res_features.c.orig 2006-08-02 01:07:06 +0200
-+++ res/res_features.c 2006-09-16 09:51:07 +0200
++++ res/res_features.c 2006-09-16 14:55:34 +0200
@@ -505,13 +505,13 @@
if (touch_monitor) {
len = strlen(touch_monitor) + 50;
@@ -660,7 +671,7 @@
for( x = 0; x < strlen(args); x++)
Index: rtp.c
--- rtp.c.orig 2006-09-01 19:35:06 +0200
-+++ rtp.c 2006-09-16 09:51:07 +0200
++++ rtp.c 2006-09-16 14:55:34 +0200
@@ -962,8 +962,10 @@
rtp->us.sin_port = htons(x);
rtp->us.sin_addr = addr;
@@ -675,7 +686,7 @@
(!rtp->rtcp || !bind(rtp->rtcp->s, (struct sockaddr
*)&rtp->rtcp->us, sizeof(rtp->rtcp->us))))
Index: say.c
--- say.c.orig 2005-11-29 19:24:39 +0100
-+++ say.c 2006-09-16 09:51:07 +0200
++++ say.c 2006-09-16 14:55:34 +0200
@@ -3133,7 +3133,7 @@
time_t beg_today;
@@ -867,7 +878,7 @@
beg_today = now.tv_sec - (tmnow.tm_hour * 3600)
- (tmnow.tm_min * 60) - (tmnow.tm_sec);
Index: utils.c
--- utils.c.orig 2006-07-12 15:54:10 +0200
-+++ utils.c 2006-09-16 09:51:07 +0200
++++ utils.c 2006-09-16 14:55:34 +0200
@@ -63,6 +63,8 @@
/* duh? ERANGE value copied from web... */
#define ERANGE 34
@@ -879,7 +890,7 @@
Index: utils/Makefile
--- utils/Makefile.orig 2005-11-29 19:24:39 +0100
-+++ utils/Makefile 2006-09-16 09:51:07 +0200
++++ utils/Makefile 2006-09-16 14:55:34 +0200
@@ -16,17 +16,15 @@
#
CFLAGS+=-DNO_AST_MM
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/asterisk/asterisk.spec
============================================================================
$ cvs diff -u -r1.13 -r1.14 asterisk.spec
--- openpkg-src/asterisk/asterisk.spec 16 Sep 2006 07:53:32 -0000
1.13
+++ openpkg-src/asterisk/asterisk.spec 16 Sep 2006 15:32:24 -0000
1.14
@@ -42,6 +42,9 @@
Version: %{V_asterisk}
Release: 20060916
+# package options
+%option with_zaptel no
+
# list of sources
Source0:
ftp://ftp.digium.com/pub/asterisk/releases/asterisk-%{V_asterisk}.tar.gz
Source1:
ftp://ftp.digium.com/pub/asterisk/releases/asterisk-addons-%{V_asterisk_addons}.tar.gz
@@ -121,8 +124,28 @@
apps/app_mp3.c
%build
+ # sanity check
+%if "%{with_zaptel}" == "yes"
+ case "%{l_platform -t}" in
+ *-linux* )
+ if [ ! -f /usr/include/linux/zaptel.h ]; then
+ echo "option \"with_zaptel\" requires Zaptel Linux drivers
installed" 1>&2; exit 1
+ fi
+ ;;
+ *-freebsd* )
+ if [ ! -f /usr/local/include/zaptel.h ]; then
+ echo "option \"with_zaptel\" requires Zaptel FreeBSD drivers
installed" 1>&2; exit 1
+ fi
+ ;;
+ * ) echo "option \"with_zaptel\" supported under Linux and FreeBSD
only" 1>&2; exit 1 ;;
+ esac
+%endif
+
# build program
%{l_make} %{l_mflags} \
+%if "%{with_zaptel}" == "no"
+ WITHOUT_ZAPTEL=1 \
+%endif
CC="%{l_cc}" \
INSTALL_PREFIX=%{l_prefix}
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/asterisk/asterisk.txt
============================================================================
$ cvs diff -u -r1.8 -r1.9 asterisk.txt
--- openpkg-src/asterisk/asterisk.txt 11 Sep 2006 17:43:25 -0000 1.8
+++ openpkg-src/asterisk/asterisk.txt 16 Sep 2006 15:32:24 -0000 1.9
@@ -264,13 +264,18 @@
exten = 7,n,Goto(7,3)
exten = 7-ok,1,Playback(conf-placeintoconf)
exten = 7-ok,n,SayNumber(${number})
+exten = 7-ok,n,Set(SPYGROUP=conference-${number})
+;exten = 7-ok,n,MeetMe(${number},cps)
exten = 7-ok,n,Conference(conference-${number}/M)
+exten = 7-ok,n,Playback(vm-goodbye)
exten = 7-ok,n,Hangup
exten = _7[0-9],1,Set(TIMEOUT(digit)=3)
exten = _7[0-9],n,Playback(conf-placeintoconf)
exten = _7[0-9],n,SayNumber(${EXTEN:1})
exten = _7[0-9],n,Set(SPYGROUP=conference-${EXTEN:1})
+;exten = _7[0-9],n,MeetMe(${EXTEN:1},cps)
exten = _7[0-9],n,Conference(conference-${EXTEN:1}/M)
+exten = _7[0-9],n,Playback(vm-goodbye)
exten = _7[0-9],n,Hangup
exten = _7X.,1,Playback(conf-invalid)
exten = _7X.,n,Hangup
@@ -371,3 +376,24 @@
1 = 1,Example,[EMAIL PROTECTED],,|delete=yes
</file>
+<file name="meetme.conf">
+;;
+;; meetme.conf -- Asterisk conference configuration
+;;
+
+[general]
+audiobuffers = 16
+
+[rooms]
+conf = 0
+conf = 1
+conf = 2
+conf = 3
+conf = 4
+conf = 5
+conf = 6
+conf = 7
+conf = 8
+conf = 9,1234,1234
+
+</file>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]