app_conference-20051110, conferencing application for asterisk

This commit is contained in:
jolan 2005-11-10 21:13:11 +00:00
parent f3521c1b69
commit 8d57f7f473
8 changed files with 162 additions and 0 deletions

View File

@ -0,0 +1,32 @@
# $OpenBSD: Makefile,v 1.1.1.1 2005/11/10 21:13:11 jolan Exp $
SHARED_ONLY= Yes
COMMENT= "conferencing application for asterisk"
DISTNAME= app_conference-20051110
CATEGORIES= telephony
MASTER_SITES= http://mirrors.protection.cx/~jolan/
HOMEPAGE= http://iaxclient.sourceforge.net/
# GPL
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
NO_REGRESS= Yes
USE_GMAKE= Yes
BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= ::telephony/asterisk
MAKE_ENV+= LOCALBASE=${LOCALBASE}
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/asterisk/modules
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/app_conference
${INSTALL_DATA} ${WRKSRC}/app_conference.so \
${PREFIX}/lib/asterisk/modules
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/app_conference
.include <bsd.port.mk>

View File

@ -0,0 +1,4 @@
MD5 (app_conference-20051110.tar.gz) = 9713b6102f17deca64d62dd87c01dea3
RMD160 (app_conference-20051110.tar.gz) = 25e6928d3e97ee5a59ea1bf6fe7a881e41fd39ef
SHA1 (app_conference-20051110.tar.gz) = fd97f0e01e2755c992e3420cd47d6a72d1038175
SIZE (app_conference-20051110.tar.gz) = 55866

View File

@ -0,0 +1,69 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2005/11/10 21:13:11 jolan Exp $
--- Makefile.orig Thu Oct 27 12:53:35 2005
+++ Makefile Thu Nov 10 14:03:54 2005
@@ -17,13 +17,13 @@
# app_conference defines which can be passed on the command-line
#
-INSTALL_PREFIX := /opt/horizon
-INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules
+#INSTALL_PREFIX := /opt/horizon
+INSTALL_MODULES_DIR := $(PREFIX)/lib/asterisk/modules
-ASTERISK_INCLUDE_DIR := $(HOME)/local/asterisk/asterisk/include
+ASTERISK_INCLUDE_DIR := $(LOCALBASE)/include
# turn app_conference debugging on or off ( 0 == OFF, 1 == ON )
-APP_CONFERENCE_DEBUG := 1
+APP_CONFERENCE_DEBUG := 0
# 0 = OFF 1 = astdsp 2 = speex
SILDET := 2
@@ -41,32 +41,32 @@ SHAREDOS = app_conference.so
PROC = $(shell uname -m)
INSTALL = install
-CC = gcc
+#CC = gcc
INCLUDE = -I$(ASTERISK_INCLUDE_DIR)
LIBS = -ldl -lpthread -lm
DEBUG := -g
-CFLAGS = -pipe -Wall -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE
+CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE
#CFLAGS += -O2
#CFLAGS += -O3 -march=pentium3 -msse -mfpmath=sse,387 -ffast-math
# PERF: below is 10% faster than -O2 or -O3 alone.
#CFLAGS += -O3 -ffast-math -funroll-loops
# below is another 5% faster or so.
-CFLAGS += -O3 -ffast-math -funroll-all-loops -fprefetch-loop-arrays -fsingle-precision-constant
+#CFLAGS += -O3 -ffast-math -funroll-all-loops -fprefetch-loop-arrays -fsingle-precision-constant
# this is fun for PPC
#CFLAGS += -mcpu=7450 -faltivec -mabi=altivec -mdynamic-no-pic
# this is fun for x86
-CFLAGS += -march=pentium3 -msse -mfpmath=sse,387
+#CFLAGS += -march=pentium3 -msse -mfpmath=sse,387
# adding -msse -mfpmath=sse has little effect.
#CFLAGS += -O3 -msse -mfpmath=sse
#CFLAGS += $(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
-CFLAGS += $(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
-CFLAGS += -DCRYPTO
+#CFLAGS += $(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
+#CFLAGS += -DCRYPTO
ifeq ($(APP_CONFERENCE_DEBUG), 1)
CFLAGS += -DAPP_CONFERENCE_DEBUG
@@ -102,7 +102,7 @@ clean:
rm -f *.so *.o $(OBJS)
app_conference.so : $(OBJS)
- $(CC) -pg -shared -Xlinker -x -o $@ $(OBJS)
+ $(CC) -shared -Xlinker -x -o $@ $(OBJS)
vad_test: vad_test.o libspeex/preprocess.o libspeex/misc.o libspeex/smallft.o
$(CC) $(PROFILE) -o $@ $^ -lm

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-cli_c,v 1.1.1.1 2005/11/10 21:13:11 jolan Exp $
--- cli.c.orig Thu Nov 10 13:22:21 2005
+++ cli.c Thu Nov 10 13:56:04 2005
@@ -232,7 +232,7 @@ int conference_play_sound( int fd, int a
member->chan->stream = NULL;
newsound->muted = mute;
- ast_copy_string(newsound->name, file, sizeof(newsound->name));
+ strncpy(newsound->name, file, sizeof(newsound->name));
// append sound to the end of the list.
for(q=&member->soundq; *q; q = &((*q)->next)) ;;

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-conference_c,v 1.1.1.1 2005/11/10 21:13:11 jolan Exp $
--- conference.c.orig Thu Nov 10 13:22:21 2005
+++ conference.c Thu Nov 10 13:50:48 2005
@@ -17,6 +17,7 @@
*/
#include "conference.h"
+#include <asterisk/utils.h>
//
// static variables
@@ -618,7 +619,7 @@ struct ast_conference* create_conf( char
// acquire conference mutexes
ast_mutex_lock( &conf->lock ) ;
- if ( pthread_create( &conf->conference_thread, NULL, (void*)conference_exec, conf ) == 0 )
+ if ( ast_pthread_create( &conf->conference_thread, NULL, (void*)conference_exec, conf ) == 0 )
{
// detach the thread so it doesn't leak
pthread_detach( conf->conference_thread ) ;

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-member_c,v 1.1.1.1 2005/11/10 21:13:11 jolan Exp $
--- member.c.orig Thu Nov 10 13:22:21 2005
+++ member.c Thu Nov 10 13:56:55 2005
@@ -362,9 +362,11 @@ int member_exec( struct ast_channel* cha
//
// setup asterisk read/write formats
//
-
+
+/*
ast_log( AST_CONF_DEBUG, "CHANNEL INFO, CHANNEL => %s, DNID => %s, CALLER_ID => %s, ANI => %s\n",
chan->name, chan->cid.cid_dnid, chan->cid.cid_num, chan->cid.cid_ani ) ;
+*/
ast_log( AST_CONF_DEBUG, "CHANNEL CODECS, CHANNEL => %s, NATIVE => %d, READ => %d, WRITE => %d\n",
chan->name, chan->nativeformats, member->read_format, member->write_format ) ;

View File

@ -0,0 +1,5 @@
app_conference is a channel-independent conference application for
asterisk. Additional documentation (besides the included README) may be
found at:
http://www.voip-info.org/wiki-Asterisk+app_conference

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/11/10 21:13:11 jolan Exp $
lib/asterisk/modules/app_conference.so
share/doc/app_conference/
share/doc/app_conference/README