Date: Sat, 21 Feb 2009 15:47:55 +0100 (CET) From: Florian Smeets <flo@kasimir.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/131934: [NEW PORT] net/asterisk-addons160: GPL modules for the Asterisk Open Source PBX Message-ID: <20090221144755.431F33F4A5@mail.solomo.de> Resent-Message-ID: <200902211510.n1LFA19G073618@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 131934 >Category: ports >Synopsis: [NEW PORT] net/asterisk-addons160: GPL modules for the Asterisk Open Source PBX >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Feb 21 15:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Florian Smeets >Release: FreeBSD 7.1-STABLE amd64 >Organization: >Environment: System: FreeBSD mail.solomo.de 7.1-STABLE FreeBSD 7.1-STABLE #4: Mon Jan 5 22:33:23 CET >Description: This package contains additional modules for the Asterisk Open Source PBX which are, not included in the normal base distribution, becouse of licence incompatilities. WWW: http://www.asteriskpbx.com Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- asterisk-addons160-1.6.0.1.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # asterisk-addons160 # asterisk-addons160/pkg-descr # asterisk-addons160/Makefile # asterisk-addons160/pkg-plist # asterisk-addons160/distinfo # asterisk-addons160/files # asterisk-addons160/files/patch-Makefile # asterisk-addons160/files/patch-Makefile.rules # asterisk-addons160/files/codecnego.diff # echo c - asterisk-addons160 mkdir -p asterisk-addons160 > /dev/null 2>&1 echo x - asterisk-addons160/pkg-descr sed 's/^X//' >asterisk-addons160/pkg-descr << 'c60ce310c9ff51512030cc120997fc40' XThis package contains additional modules for the Asterisk Open Source PBX Xwhich are, not included in the normal base distribution, becouse of licence Xincompatilities. X XWWW: http://www.asteriskpbx.com c60ce310c9ff51512030cc120997fc40 echo x - asterisk-addons160/Makefile sed 's/^X//' >asterisk-addons160/Makefile << '942a48190f50ccba7e25b402b19b2d10' X# New ports collection makefile for: asterisk-addons16 X# Date created: 2009-02-17 X# Whom: Florian Smeets <flo@kasimir.com> X# X# $FreeBSD$ X# X XPORTNAME= asterisk-addons XPORTVERSION= 1.6.0.1 XCATEGORIES= net XMASTER_SITES= http://downloads.digium.com/pub/asterisk/ \ X http://downloads.digium.com/pub/asterisk/old-releases/ \ X http://ftp.digium.com/pub/asterisk/ \ X http://ftp.digium.com/pub/asterisk/old-releases/ XPKGNAMESUFFIX= 160 X XMAINTAINER= flo@kasimir.com XCOMMENT= GPL modules for the Asterisk Open Source PBX X XBUILD_DEPENDS= asterisk:${PORTSDIR}/net/asterisk16 XRUN_DEPENDS= asterisk:${PORTSDIR}/net/asterisk16 X XOPTIONS= SAMPLE_CONFIG "Install sample configuration files" off X XONLY_FOR_ARCHS= i386 amd64 powerpc XUSE_AUTOTOOLS= libtool:15 XUSE_GMAKE= yes XGNU_CONFIGURE= yes XMAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ X PTHREAD_LIBS="${PTHREAD_LIBS}" \ X OSVERSION=${OSVERSION} \ X NOISY_BUILD=YES \ X DOCSDIR=${DOCSDIR} \ X ASTCFLAGS="${CFLAGS}" XUSE_MYSQL= yes X X.include <bsd.port.pre.mk> X X.if defined(WITH_SAMPLE_CONFIG) XPLIST_SUB+= SAMPLE_CONFIG="" X.else XPLIST_SUB+= SAMPLE_CONFIG="@comment " X.endif X Xpre-configure: X if ${GREP} -sq fixup_codecs ${LOCALBASE}/include/asterisk/channel.h; \ X then \ X ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/codecnego.diff; \ X fi X Xpost-install: X.if defined(WITH_SAMPLE_CONFIG) X @cd ${WRKSRC} && ${GMAKE} samples X.endif X X.include <bsd.port.post.mk> 942a48190f50ccba7e25b402b19b2d10 echo x - asterisk-addons160/pkg-plist sed 's/^X//' >asterisk-addons160/pkg-plist << 'b8dd89746a82a2309717ae6ad9486381' Xlib/asterisk/modules/app_saycountpl.so Xlib/asterisk/modules/format_mp3.so Xlib/asterisk/modules/chan_ooh323.so Xlib/asterisk/modules/app_addon_sql_mysql.so Xlib/asterisk/modules/cdr_addon_mysql.so Xlib/asterisk/modules/res_config_mysql.so X%%SAMPLE_CONFIG%%etc/asterisk/cdr_mysql.conf X%%SAMPLE_CONFIG%%etc/asterisk/res_mysql.conf b8dd89746a82a2309717ae6ad9486381 echo x - asterisk-addons160/distinfo sed 's/^X//' >asterisk-addons160/distinfo << 'eb713cdc43556cf6d5e3ddaf1ee52261' XMD5 (asterisk-addons-1.6.0.1.tar.gz) = 40c07612e486160c128e22811f357893 XSHA256 (asterisk-addons-1.6.0.1.tar.gz) = 82970f39075e267b51932d482a8535d77ce91d656bd100b5542ed30970cf7447 XSIZE (asterisk-addons-1.6.0.1.tar.gz) = 846856 eb713cdc43556cf6d5e3ddaf1ee52261 echo c - asterisk-addons160/files mkdir -p asterisk-addons160/files > /dev/null 2>&1 echo x - asterisk-addons160/files/patch-Makefile sed 's/^X//' >asterisk-addons160/files/patch-Makefile << '7cfcbb269e60cf949ceb1753b8ee4d29' X--- Makefile.orig 2008-09-12 18:21:53.000000000 +0000 X+++ Makefile 2009-02-17 12:48:55.000000000 +0000 X@@ -26,7 +26,9 @@ X ASTTOPDIR:=$(subst $(space),\$(space),$(CURDIR)) X X # Overwite config files on "make samples" X-OVERWRITE:=y X+OVERWRITE:=n X+ X+ASTCFLAGS+=-I${PREFIX}/include X X # If the file .asteriskaddons.makeopts is present in your home directory, you can X # include all of your favorite menuselect options so that every time you download X 7cfcbb269e60cf949ceb1753b8ee4d29 echo x - asterisk-addons160/files/patch-Makefile.rules sed 's/^X//' >asterisk-addons160/files/patch-Makefile.rules << 'ac61a1e419eb714a6037abd29bb93aab' X--- Makefile.rules.orig 2009-02-17 13:27:59.000000000 +0000 X+++ Makefile.rules 2009-02-17 13:28:21.000000000 +0000 X@@ -38,7 +38,9 @@ X # ppro's, etc, as well as the AMD K6 and K7. X #K6OPT=-DK6OPT X X+ifneq ($(OSARCH),FreeBSD) X OPTIMIZE?=-O6 X+endif X ASTCFLAGS+=$(OPTIMIZE) X endif X ac61a1e419eb714a6037abd29bb93aab echo x - asterisk-addons160/files/codecnego.diff sed 's/^X//' >asterisk-addons160/files/codecnego.diff << '41130b82dd4742f7227de28a83f71b7c' X--- channels/chan_ooh323.c.orig 2007-07-21 15:17:52.000000000 +0800 X+++ channels/chan_ooh323.c 2008-02-13 15:37:17.000000000 +0800 X@@ -42,8 +42,8 @@ X X X /* Channel Definition */ X-static struct ast_channel *ooh323_request(const char *type, int format, X- void *data, int *cause); X+static struct ast_channel *ooh323_request(const char *type, const struct ast_codec_pref *format, void *data, int *cause); X+ X static int ooh323_digit_begin(struct ast_channel *ast, char digit); X static int ooh323_digit_end(struct ast_channel *ast, char digit, unsigned int duration); X static int ooh323_call(struct ast_channel *ast, char *dest, int timeout); X@@ -57,8 +57,7 @@ X X static enum ast_rtp_get_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp); X static enum ast_rtp_get_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp **rtp); X-static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, X- struct ast_rtp *vrtp, int codecs, int nat_active); X+static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp, const struct ast_codec_pref *codecs, int nat_active); X X static void print_codec_to_cli(int fd, struct ast_codec_pref *pref); X static void ast_ooh323c_exit(); X@@ -244,6 +243,7 @@ X { X struct ast_channel *ch = NULL; X int fmt; X+ int cap; X if(gH323Debug) X ast_log(LOG_DEBUG, "--- ooh323_new - %s\n", host); X X@@ -258,10 +258,11 @@ X ast_mutex_lock(&ch->lock); X ch->tech = &ooh323_tech; X X- ch->nativeformats = i->capability; X- X+ ast_codec_pref_init(&ch->nativeformats); X+ ast_codec_pref_append_missing2(&ch->nativeformats, i->capability); X X- fmt = ast_best_codec(ch->nativeformats); X+ cap = ast_codec_pref_bits(&ch->nativeformats); X+ fmt = ast_best_codec(cap); X X ch->fds[0] = ast_rtp_fd(i->rtp); X ch->fds[1] = ast_rtcp_fd(i->rtp); X@@ -451,8 +452,7 @@ X /* X Possible data values - peername, exten/peername, exten@ip X */ X-static struct ast_channel *ooh323_request(const char *type, int format, X- void *data, int *cause) X+static struct ast_channel *ooh323_request(const char *type, const struct ast_codec_pref *formats, void *data, int *cause) X X { X struct ast_channel *chan=NULL; X@@ -461,22 +461,11 @@ X char *dest = NULL; X char *ext = NULL; X char tmp[256]; X- char formats[512]; X- int oldformat; X char *sport = NULL; X int port = 0; X X if(gH323Debug) X- ast_verbose("--- ooh323_request - data %s format %s\n", (char*)data, X- ast_getformatname_multiple(formats,512,format) ); X- X- oldformat = format; X- format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1); X- if (!format) { X- ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format " X- "'%d'\n", format); X- return NULL; X- } X+ ast_verbose("--- ooh323_request - data %s format %s\n", (char*)data, ast_codec_pref_dump(tmp, sizeof(tmp), formats) ); X X p = ooh323_alloc(0,0); /* Initial callRef is zero */ X X@@ -536,8 +525,8 @@ X if(ext) X strncpy(p->exten, ext, sizeof(p->exten)-1); X X- if(peer->capability & format) X- p->capability = peer->capability & format; X+ if(peer->capability & formats->audio_bits) X+ p->capability = peer->capability & formats->audio_bits; X else{ X p->capability = peer->capability; X } X@@ -971,11 +960,11 @@ X X if(f->frametype == AST_FRAME_VOICE) X { X- if(!(f->subclass & ast->nativeformats)) X+ if(!(f->subclass & ast->nativeformats.audio_bits)) X { X ast_log(LOG_WARNING, "Asked to transmit frame type %d, while native " X "formats is %d (read/write = %d/%d)\n", X- f->subclass, ast->nativeformats, ast->readformat, X+ f->subclass, ast->nativeformats.audio_bits, ast->readformat, X ast->writeformat); X return 0; X } X@@ -2219,12 +2208,12 @@ X int x, codec; X X for(x = 0; x < 32 ; x++) { X- codec = ast_codec_pref_index(pref, x); X+ codec = ast_codec_pref_index_audio(pref, x); X if (!codec) X break; X ast_cli(fd, "%s", ast_getformatname(codec)); X- ast_cli(fd, ":%d", pref->framing[x]); X- if (x < 31 && ast_codec_pref_index(pref, x + 1)) X+ ast_cli(fd, ":%d", pref->audio_framing[x]); X+ if (x < 31 && ast_codec_pref_index_audio(pref, x + 1)) X ast_cli(fd, ","); X } X if (!x) X@@ -3020,13 +3009,13 @@ X (ooCallData *call, struct ast_codec_pref *prefs) X { X int i=0; X- int codec = ast_codec_pref_index(prefs, i); X+ int codec = ast_codec_pref_index_audio(prefs, i); X X ooResetCapPrefs(call); X while(codec) X { X ooAppendCapToCapPrefs(call, ooh323_convertAsteriskCapToH323Cap(codec)); X- codec = ast_codec_pref_index(prefs, ++i); X+ codec = ast_codec_pref_index_audio(prefs, ++i); X } X X return 0; X@@ -3058,7 +3047,7 @@ X X static int ooh323_set_rtp_peer X (struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp, X- int codecs, int nat_active) X+ const struct ast_codec_pref *codecs, int nat_active) X { X /* XXX Deal with Video */ X struct ooh323_pvt *p; X@@ -3106,7 +3095,7 @@ X strncpy(mediaInfo.lMediaIP, ast_inet_ntoa(us.sin_addr), sizeof(mediaInfo.lMediaIP)-1); X mediaInfo.lMediaPort = ntohs(us.sin_port); X mediaInfo.lMediaCntrlPort = mediaInfo.lMediaPort +1; X- for(x=0; 0 != (format=ast_codec_pref_index(&p->prefs, x)); x++) X+ for(x=0; 0 != (format=ast_codec_pref_index_audio(&p->prefs, x)); x++) X { X strcpy(mediaInfo.dir, "transmit"); X mediaInfo.cap = ooh323_convertAsteriskCapToH323Cap(format); X@@ -3250,10 +3239,11 @@ X /* We already hold the channel lock */ X if (f->frametype == AST_FRAME_VOICE) X { X- if (f->subclass != p->owner->nativeformats) X+ if (!(f->subclass & p->owner->nativeformats.audio_bits)) X { X ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass); X- p->owner->nativeformats = f->subclass; X+ ast_codec_pref_append(&p->owner->nativeformats, f->subclass); X+ p->capability |= f->subclass; X ast_set_read_format(p->owner, p->owner->readformat); X ast_set_write_format(p->owner, p->owner->writeformat); X } X--- channels/ooh323cDriver.c.orig 2007-01-20 06:27:05.000000000 +0800 X+++ channels/ooh323cDriver.c 2008-02-11 16:47:24.000000000 +0800 X@@ -66,7 +66,7 @@ X if(gH323Debug) X ast_verbose("\tAdding capabilities to H323 endpoint\n"); X X- for(x=0; 0 != (format=ast_codec_pref_index(prefs, x)); x++) X+ for(x=0; 0 != (format=ast_codec_pref_index_audio(prefs, x)); x++) X { X if(format & AST_FORMAT_ULAW) X { X@@ -172,14 +172,14 @@ X ret |= ooCallEnableDTMFH245Signal(call); X X X- for(x=0; 0 !=(format=ast_codec_pref_index(prefs, x)); x++) X+ for(x=0; 0 !=(format=ast_codec_pref_index_audio(prefs, x)); x++) X { X if(format & AST_FORMAT_ULAW) X { X if(gH323Debug) X ast_verbose("\tAdding g711 ulaw capability to call(%s, %s)\n", X call->callType, call->callToken); X- txframes = prefs->framing[x]; X+ txframes = prefs->audio_framing[x]; X ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes, X grxframes, OORXANDTX, X &ooh323c_start_receive_channel, X@@ -192,7 +192,7 @@ X if(gH323Debug) X ast_verbose("\tAdding g711 alaw capability to call(%s, %s)\n", X call->callType, call->callToken); X- txframes = prefs->framing[x]; X+ txframes = prefs->audio_framing[x]; X ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes, X grxframes, OORXANDTX, X &ooh323c_start_receive_channel, X@@ -206,7 +206,7 @@ X if(gH323Debug) X ast_verbose("\tAdding g729A capability to call(%s, %s)\n", X call->callType, call->callToken); X- txframes = (prefs->framing[x])/10; X+ txframes = (prefs->audio_framing[x])/10; X ret= ooCallAddG729Capability(call, OO_G729A, txframes, 24, X OORXANDTX, &ooh323c_start_receive_channel, X &ooh323c_start_transmit_channel, 41130b82dd4742f7227de28a83f71b7c exit --- asterisk-addons160-1.6.0.1.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090221144755.431F33F4A5>