diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2010-10-27 00:32:28 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2010-10-27 00:32:28 +0000 |
commit | 86dcb046fc322589ea528e24d8cf239bd8a4b61a (patch) | |
tree | 0f06ec7e46a4d283f1cc2fc4bbb6230984a2d83a /net-misc/asterisk | |
parent | Mask Asterisk 1.8 branch; it is the bleeding edge. (diff) | |
download | gentoo-2-86dcb046fc322589ea528e24d8cf239bd8a4b61a.tar.gz gentoo-2-86dcb046fc322589ea528e24d8cf239bd8a4b61a.tar.bz2 gentoo-2-86dcb046fc322589ea528e24d8cf239bd8a4b61a.zip |
Initial 1.8 branch ebuild, masked for your protection. Extensive patch rebasing, dropped oddball fax detection. Closes bug #342225 by Oliver Jaksch. Ebuild changes inspired by Oliver, some additional work done.
(Portage version: 2.1.9.22/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/asterisk')
12 files changed, 635 insertions, 1 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog index d6c8d5b0ebc7..3d2026378d62 100644 --- a/net-misc/asterisk/ChangeLog +++ b/net-misc/asterisk/ChangeLog @@ -1,6 +1,22 @@ # ChangeLog for net-misc/asterisk # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.272 2010/10/15 18:04:29 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.273 2010/10/27 00:32:28 chainsaw Exp $ + +*asterisk-1.8.0 (27 Oct 2010) + + 27 Oct 2010; <chainsaw@gentoo.org> +asterisk-1.8.0.ebuild, + +files/1.8.0/asterisk-1.8.0-alarm-receiver-use-playtones.patch, + +files/1.8.0/asterisk-1.8.0-confbridge-menu-invocation.patch, + +files/1.8.0/asterisk-1.8.0-dahdiras-without-root.patch, + +files/1.8.0/asterisk-1.8.0-gsm-pic.patch, + +files/1.8.0/asterisk-1.8.0-iax2-peerstate.patch, + +files/1.8.0/asterisk-1.8.0-inband-indications.patch, + +files/1.8.0/asterisk-1.8.0-pbxstart-failed-spurious-bye.patch, + +files/1.8.0/asterisk-1.8.0-pri-missing-keyword.patch, + +files/1.8.0/asterisk-1.8.0-uclibc.patch, metadata.xml: + Initial 1.8 branch ebuild, masked for your protection. Extensive patch + rebasing, dropped oddball fax detection. Closes bug #342225 by Oliver + Jaksch. Ebuild changes inspired by Oliver, some additional work done. 15 Oct 2010; <chainsaw@gentoo.org> -files/1.6.1/asterisk-1.6.1.6-fxsks-hookstate.patch, diff --git a/net-misc/asterisk/asterisk-1.8.0.ebuild b/net-misc/asterisk/asterisk-1.8.0.ebuild new file mode 100644 index 000000000000..98cc08be150b --- /dev/null +++ b/net-misc/asterisk/asterisk-1.8.0.ebuild @@ -0,0 +1,302 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.8.0.ebuild,v 1.1 2010/10/27 00:32:28 chainsaw Exp $ + +EAPI=3 +inherit autotools base eutils linux-info multilib + +MY_P="${PN}-${PV/_/-}" + +DESCRIPTION="Asterisk: A Modular Open Source PBX System" +HOMEPAGE="http://www.asterisk.org/" +SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="ais alsa bluetooth calendar +caps curl dahdi debug doc freetds gtalk h323 http iconv jabber jingle ldap logrotate lua keepsrc misdn mysql newt +samples odbc osplookup oss portaudio postgres radius snmp span speex ssl sqlite sqlite3 srtp static syslog usb vorbis" + +RDEPEND="sys-libs/ncurses + dev-libs/popt + sys-libs/zlib + dev-libs/libxml2 + ais? ( sys-cluster/openais ) + alsa? ( media-libs/alsa-lib ) + bluetooth? ( net-wireless/bluez ) + calendar? ( net-libs/neon + dev-libs/libical + dev-libs/iksemel ) + caps? ( sys-libs/libcap ) + curl? ( net-misc/curl ) + dahdi? ( >=net-libs/libpri-1.4.7 + net-misc/dahdi-tools ) + freetds? ( dev-db/freetds ) + gtalk? ( dev-libs/iksemel ) + h323? ( net-libs/openh323 ) + http? ( dev-libs/gmime:0 ) + iconv? ( virtual/libiconv ) + jabber? ( dev-libs/iksemel ) + jingle? ( dev-libs/iksemel ) + ldap? ( net-nds/openldap ) + lua? ( dev-lang/lua ) + misdn? ( net-dialup/misdnuser ) + mysql? ( dev-db/mysql ) + newt? ( dev-libs/newt ) + odbc? ( dev-db/unixODBC ) + osplookup? ( net-libs/osptoolkit + dev-libs/openssl ) + portaudio? ( media-libs/portaudio ) + postgres? ( dev-db/postgresql-base ) + radius? ( net-dialup/radiusclient-ng ) + snmp? ( net-analyzer/net-snmp ) + span? ( media-libs/spandsp ) + speex? ( media-libs/speex ) + sqlite? ( dev-db/sqlite:0 ) + sqlite3? ( dev-db/sqlite:3 ) + srtp? ( net-libs/libsrtp ) + ssl? ( dev-libs/openssl ) + syslog? ( app-admin/syslog-ng ) + usb? ( dev-libs/libusb + media-libs/alsa-lib ) + vorbis? ( media-libs/libvorbis )" + +DEPEND="${RDEPEND} + !<net-misc/asterisk-addons-1.6 + !net-misc/asterisk-chan_unistim + !net-misc/zaptel" + +PDEPEND="net-misc/asterisk-core-sounds + net-misc/asterisk-extra-sounds + net-misc/asterisk-moh-opsound" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/1.8.0/${P}-gsm-pic.patch" + "${FILESDIR}/1.8.0/${P}-pri-missing-keyword.patch" + "${FILESDIR}/1.8.0/${P}-inband-indications.patch" + "${FILESDIR}/1.8.0/${P}-uclibc.patch" + "${FILESDIR}/1.8.0/${P}-iax2-peerstate.patch" + "${FILESDIR}/1.8.0/${P}-dahdiras-without-root.patch" + "${FILESDIR}/1.8.0/${P}-pbxstart-failed-spurious-bye.patch" + "${FILESDIR}/1.8.0/${P}-confbridge-menu-invocation.patch" + "${FILESDIR}/1.8.0/${P}-alarm-receiver-use-playtones.patch" +) + +pkg_setup() { + CONFIG_CHECK="~!NF_CONNTRACK_SIP" + local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users + have reported that this module dropped critical SIP packets in their deployments. You + may want to disable it if you see such problems." + check_extra_config +} + +src_prepare() { + base_src_prepare + AT_M4DIR=autoconf eautoreconf +} + +src_configure() { + econf \ + --libdir="/usr/$(get_libdir)" \ + --localstatedir="/var" \ + --with-gsm=internal \ + --with-popt \ + --with-z \ + $(use_with ais openais) \ + $(use_with alsa asound) \ + $(use_with bluetooth) \ + $(use_with calendar neon) \ + $(use_with calendar neon29) \ + $(use_with calendar ical) \ + $(use_with calendar iksemel) \ + $(use_with caps cap) \ + $(use_with curl libcurl) \ + $(use_with dahdi pri) \ + $(use_with dahdi tonezone) \ + $(use_with dahdi) \ + $(use_with freetds tds) \ + $(use_with h323) \ + $(use_with http gmime) \ + $(use_with iconv) \ + $(use_with jabber iksemel) \ + $(use_with jingle iksemel) \ + $(use_with lua) \ + $(use_with misdn isdnnet) \ + $(use_with misdn suppserv) \ + $(use_with misdn) \ + $(use_with mysql mysqlclient) \ + $(use_with newt) \ + $(use_with osplookup osptk) \ + $(use_with oss) \ + $(use_with portaudio) \ + $(use_with postgres) \ + $(use_with radius) \ + $(use_with snmp netsnmp) \ + $(use_with span spandsp) \ + $(use_with speex) \ + $(use_with speex speexdsp) \ + $(use_with sqlite) \ + $(use_with sqlite3) \ + $(use_with srtp) \ + $(use_with ssl crypto) \ + $(use_with ssl) \ + $(use_with usb) \ + $(use_with vorbis ogg) \ + $(use_with vorbis) || die "econf failed" + + # + # blank out sounds/sounds.xml file to prevent + # asterisk from installing sounds files (we pull them in via + # asterisk-{core,extra}-sounds and asterisk-moh-opsound. + # + >"${S}"/sounds/sounds.xml +} + +src_compile() { + ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" +} + +src_install() { + # setup directory structure + # + mkdir -p "${D}"usr/$(get_libdir)/pkgconfig + + emake DESTDIR="${D}" install || die "emake install failed" + + if use samples; then + emake DESTDIR="${D}" samples || die "emake samples failed" + for conffile in "${D}"etc/asterisk/*.* + do + chown asterisk:asterisk $conffile + chmod 0660 $conffile + done + einfo "Sample files have been installed" + else + einfo "Skipping installation of sample files..." + rm -f "${D}"var/lib/asterisk/mohmp3/* + rm -f "${D}"var/lib/asterisk/sounds/demo-* + rm -f "${D}"var/lib/asterisk/agi-bin/* + rm -f "${D}"etc/asterisk/* + fi + rm -rf "${D}"var/spool/asterisk/voicemail/default + + # keep directories + diropts -m 0770 -o asterisk -g asterisk + keepdir /etc/asterisk + keepdir /var/lib/asterisk + keepdir /var/run/asterisk + keepdir /var/spool/asterisk + keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} + diropts -m 0750 -o asterisk -g asterisk + keepdir /var/log/asterisk/{cdr-csv,cdr-custom} + + newinitd "${FILESDIR}"/1.6.2/asterisk.initd2 asterisk + newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk + + # some people like to keep the sources around for custom patching + # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there + if use keepsrc + then + dodir /usr/src + + ebegin "Copying sources into /usr/src" + cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources" + eend $? + + ebegin "Cleaning source tree" + emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources" + eend $? + + einfo "Clean sources are available in "${ROOT}"usr/src/${PF}" + fi + + # install the upgrade documentation + # + dodoc README UPGRADE* BUGS CREDITS + + # install extra documentation + # + if use doc + then + dodoc doc/*.txt + dodoc doc/*.pdf + dodoc doc/PEERING + dodoc doc/CODING-GUIDELINES + dodoc doc/tex/*.pdf + fi + + # install snmp mib files + # + if use snmp + then + insinto /usr/share/snmp/mibs/ + doins doc/digium-mib.txt doc/asterisk-mib.txt + fi + + # install SIP scripts; bug #300832 + # + dodoc "${FILESDIR}/1.6.2/sip_calc_auth" + dodoc "${FILESDIR}/1.6.2/find_call_sip_trace.sh" + dodoc "${FILESDIR}/1.6.2/find_call_ids.sh" + dodoc "${FILESDIR}/1.6.2/call_data.txt" + + # install logrotate snippet; bug #329281 + # + if use logrotate + then + insinto /etc/logrotate.d + newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk + fi +} + +pkg_preinst() { + enewgroup asterisk + enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" +} + +pkg_postinst() { + # + # Announcements, warnings, reminders... + # + einfo "Asterisk has been installed" + echo + elog "If you want to know more about asterisk, visit these sites:" + elog "http://www.asteriskdocs.org/" + elog "http://www.voip-info.org/wiki-Asterisk" + echo + elog "http://www.automated.it/guidetoasterisk.htm" + echo + elog "Gentoo VoIP IRC Channel:" + elog "#gentoo-voip @ irc.freenode.net" + echo + echo + elog "1.6 -> 1.8 changes that you may care about:" + elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" + elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" +} + +pkg_config() { + einfo "Do you want to reset file permissions and ownerships (y/N)?" + + read tmp + tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" + + if [[ "$tmp" = "y" ]] ||\ + [[ "$tmp" = "yes" ]] + then + einfo "Resetting permissions to defaults..." + + for x in spool run lib log; do + chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk + chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk + done + + chown -R root:asterisk "${ROOT}"etc/asterisk + chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk + + einfo "done" + else + einfo "skipping" + fi +} diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-alarm-receiver-use-playtones.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-alarm-receiver-use-playtones.patch new file mode 100644 index 000000000000..34942de14fa1 --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-alarm-receiver-use-playtones.patch @@ -0,0 +1,151 @@ +diff -uNr asterisk-1.8.0.ORIG//apps/app_alarmreceiver.c asterisk-1.8.0/apps/app_alarmreceiver.c +--- asterisk-1.8.0.ORIG//apps/app_alarmreceiver.c 2010-10-27 00:41:40.000000000 +0100 ++++ asterisk-1.8.0/apps/app_alarmreceiver.c 2010-10-27 00:57:00.000000000 +0100 +@@ -51,6 +51,7 @@ + #include "asterisk/callerid.h" + #include "asterisk/astdb.h" + #include "asterisk/utils.h" ++#include "asterisk/indications.h" + + #define ALMRCV_CONFIG "alarmreceiver.conf" + #define ADEMCO_CONTACT_ID "ADEMCO_CONTACT_ID" +@@ -139,86 +140,6 @@ + return; + } + +- +-/* +-* Build a MuLaw data block for a single frequency tone +-*/ +-static void make_tone_burst(unsigned char *data, float freq, float loudness, int len, int *x) +-{ +- int i; +- float val; +- +- for (i = 0; i < len; i++) { +- val = loudness * sin((freq * 2.0 * M_PI * (*x)++)/8000.0); +- data[i] = AST_LIN2MU((int)val); +- } +- +- /* wrap back around from 8000 */ +- +- if (*x >= 8000) +- *x = 0; +- return; +-} +- +-/* +-* Send a single tone burst for a specifed duration and frequency. +-* Returns 0 if successful +-*/ +-static int send_tone_burst(struct ast_channel *chan, float freq, int duration, int tldn) +-{ +- int res = 0; +- int i = 0; +- int x = 0; +- struct ast_frame *f, wf; +- +- struct { +- unsigned char offset[AST_FRIENDLY_OFFSET]; +- unsigned char buf[640]; +- } tone_block; +- +- for (;;) { +- +- if (ast_waitfor(chan, -1) < 0) { +- res = -1; +- break; +- } +- +- f = ast_read(chan); +- if (!f) { +- res = -1; +- break; +- } +- +- if (f->frametype == AST_FRAME_VOICE) { +- wf.frametype = AST_FRAME_VOICE; +- wf.subclass.codec = AST_FORMAT_ULAW; +- wf.offset = AST_FRIENDLY_OFFSET; +- wf.mallocd = 0; +- wf.data.ptr = tone_block.buf; +- wf.datalen = f->datalen; +- wf.samples = wf.datalen; +- +- make_tone_burst(tone_block.buf, freq, (float) tldn, wf.datalen, &x); +- +- i += wf.datalen / 8; +- if (i > duration) { +- ast_frfree(f); +- break; +- } +- if (ast_write(chan, &wf)) { +- ast_verb(4, "AlarmReceiver: Failed to write frame on %s\n", chan->name); +- ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name); +- res = -1; +- ast_frfree(f); +- break; +- } +- } +- +- ast_frfree(f); +- } +- return res; +-} +- + /* + * Receive a string of DTMF digits where the length of the digit string is known in advance. Do not give preferential + * treatment to any digit value, and allow separate time out values to be specified for the first digit and all subsequent +@@ -437,19 +358,29 @@ + database_increment("calls-received"); + + /* Wait for first event */ +- ast_verb(4, "AlarmReceiver: Waiting for first event from panel\n"); ++ ast_verb(4, "AlarmReceiver: Waiting for first event from panel...\n"); + + while (res >= 0) { + if (got_some_digits == 0) { + /* Send ACK tone sequence */ + ast_verb(4, "AlarmReceiver: Sending 1400Hz 100ms burst (ACK)\n"); +- res = send_tone_burst(chan, 1400.0, 100, tldn); +- if (!res) +- res = ast_safe_sleep(chan, 100); ++ res = ast_playtones_start(chan, tldn, "1400", 0); + if (!res) { ++ ast_safe_sleep(chan, 100); ++ ast_playtones_stop(chan); ++ } ++ if (!res) { ++ ast_safe_sleep(chan, 100); + ast_verb(4, "AlarmReceiver: Sending 2300Hz 100ms burst (ACK)\n"); +- res = send_tone_burst(chan, 2300.0, 100, tldn); ++ res = ast_playtones_start(chan, tldn, "2300", 0); ++ if (!res) { ++ ast_safe_sleep(chan, 100); ++ ast_playtones_stop(chan); ++ } ++ } else { ++ ast_debug(1, "AlarmReceiver: Failed sending tones\n"); + } ++ + } + if ( res >= 0) + res = receive_dtmf_digits(chan, event, sizeof(event) - 1, fdto, sdto); +@@ -556,9 +487,14 @@ + if (res == 0) + res = ast_safe_sleep(chan, 200); + +- /* Send the kissoff tone */ +- if (res == 0) +- res = send_tone_burst(chan, 1400.0, 900, tldn); ++ /* Send the kissoff tone (1400 Hz, 900 ms) */ ++ if (res == 0) { ++ res = ast_playtones_start(chan, tldn, "1400", 0); ++ if (res == 0) { ++ ast_safe_sleep(chan, 900); ++ ast_playtones_stop(chan); ++ } ++ } + } + + return res; diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-confbridge-menu-invocation.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-confbridge-menu-invocation.patch new file mode 100644 index 000000000000..89008e4b5912 --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-confbridge-menu-invocation.patch @@ -0,0 +1,12 @@ +diff -uNr asterisk-1.8.0.ORIG//apps/app_confbridge.c asterisk-1.8.0/apps/app_confbridge.c +--- asterisk-1.8.0.ORIG//apps/app_confbridge.c 2010-10-27 00:41:40.000000000 +0100 ++++ asterisk-1.8.0/apps/app_confbridge.c 2010-10-27 00:54:18.000000000 +0100 +@@ -734,7 +734,7 @@ + + /* If the menu option is enabled provide a user or admin menu as a custom feature hook */ + if (ast_test_flag(&conference_bridge_user.flags, OPTION_MENU)) { +- ast_bridge_features_hook(&conference_bridge_user.features, "#", menu_callback, &conference_bridge_user); ++ ast_bridge_features_hook(&conference_bridge_user.features, "*", menu_callback, &conference_bridge_user); + } + + /* If the caller should be joined already muted, make it so */ diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-dahdiras-without-root.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-dahdiras-without-root.patch new file mode 100644 index 000000000000..493bc2065689 --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-dahdiras-without-root.patch @@ -0,0 +1,12 @@ +diff -uNr asterisk-1.8.0.ORIG//apps/app_dahdiras.c asterisk-1.8.0/apps/app_dahdiras.c +--- asterisk-1.8.0.ORIG//apps/app_dahdiras.c 2010-10-27 00:41:40.000000000 +0100 ++++ asterisk-1.8.0/apps/app_dahdiras.c 2010-10-27 00:50:00.000000000 +0100 +@@ -119,8 +119,6 @@ + c = strsep(&stringp, ","); + } + +- argv[argc++] = "plugin"; +- argv[argc++] = "dahdi.so"; + argv[argc++] = "stdin"; + + /* Finally launch PPP */ diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-gsm-pic.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-gsm-pic.patch new file mode 100644 index 000000000000..a96fd47cccce --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-gsm-pic.patch @@ -0,0 +1,64 @@ +diff -uNr asterisk-1.8.0.ORIG/codecs/gsm/Makefile asterisk-1.8.0/codecs/gsm/Makefile +--- asterisk-1.8.0.ORIG/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100 ++++ asterisk-1.8.0/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100 +@@ -45,30 +45,6 @@ + OPTIMIZE=-O2 + endif + +-ifeq (,$(findstring $(shell uname -s),Darwin SunOS)) +- ifeq (,$(strip $(findstring $(PROC) ,"x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips "))) +- ifeq (,$(strip $(findstring $(shell uname -m) ,"ppc ppc64 alpha armv4l s390 "))) +- OPTIMIZE+=-march=$(PROC) +- endif +- endif +-else +- ifneq (,$(findstring $(OSARCH),Darwin)) +- ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6) +- # Snow Leopard reports i386, even though it's really x86_64 +- OPTIMIZE+=-mtune=native +- endif +- endif +-endif +- +-#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. +-#This works for even old (2.96) versions of gcc and provides a small boost either way. +-#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it. +-#So we go lowest common available by gcc and go a step down, still a step up from +-#the default as we now have a better instruction set to work with. - Belgarath +-ifeq ($(PROC),ultrasparc) +-OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3 +-endif +- + PG = + #PG = -g -pg + ######### Profiling flags. If you don't know what that means, leave it blank. +@@ -223,11 +199,9 @@ + # XXX Keep a space after each findstring argument + # XXX should merge with GSM_OBJECTS + ifeq ($(OSARCH),linux-gnu) +-ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 )) +-ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel mips )) +-GSM_SOURCES+= $(SRC)/k6opt.s +-endif +-endif ++ ifneq ($(K6OPT),) ++ GSM_SOURCES+= $(SRC)/k6opt.s ++ endif + endif + + TOAST_SOURCES = $(SRC)/toast.c \ +@@ -275,11 +249,9 @@ + $(SRC)/table.o + + ifeq ($(OSARCH),linux-gnu) +-ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc )) +-ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel mips )) +-GSM_OBJECTS+= $(SRC)/k6opt.o +-endif +-endif ++ ifneq ($(K6OPT),) ++ GSM_OBJECTS+= $(SRC)/k6opt.o ++ endif + endif + + TOAST_OBJECTS = $(SRC)/toast.o \ diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-iax2-peerstate.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-iax2-peerstate.patch new file mode 100644 index 000000000000..4ecc245d99c9 --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-iax2-peerstate.patch @@ -0,0 +1,12 @@ +diff -uNr asterisk-1.8.0.ORIG//channels/chan_iax2.c asterisk-1.8.0/channels/chan_iax2.c +--- asterisk-1.8.0.ORIG//channels/chan_iax2.c 2010-10-27 00:41:40.000000000 +0100 ++++ asterisk-1.8.0/channels/chan_iax2.c 2010-10-27 00:47:42.000000000 +0100 +@@ -8707,7 +8707,7 @@ + ast_db_put("IAX/Registry", p->name, data); + ast_verb(3, "Registered IAX2 '%s' (%s) at %s:%d\n", p->name, + ast_test_flag(&iaxs[callno]->state, IAX_STATE_AUTHENTICATED) ? "AUTHENTICATED" : "UNAUTHENTICATED", ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port)); +- manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Registered\r\n", p->name); ++ manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Registered\r\nAddress: %s\r\nPost: %d\r\n", p->name, ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port)); + register_peer_exten(p, 1); + ast_devstate_changed(AST_DEVICE_UNKNOWN, "IAX2/%s", p->name); /* Activate notification */ + } else if (!ast_test_flag64(p, IAX_TEMPONLY)) { diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-inband-indications.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-inband-indications.patch new file mode 100644 index 000000000000..b249bf9cf818 --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-inband-indications.patch @@ -0,0 +1,21 @@ +diff -uNr asterisk-1.8.0.ORIG/main/channel.c asterisk-1.8.0/main/channel.c +--- asterisk-1.8.0-orig/main/channel.c 2010-10-22 10:04:33.439148782 +0200 ++++ asterisk-1.8.0/main/channel.c 2010-10-22 10:05:51.124146954 +0200 +@@ -2955,6 +2955,8 @@ + chan->generator->release(chan, chan->generatordata); + chan->generatordata = NULL; + } ++ ++ ast_prod(chan); + if (gen->alloc && !(chan->generatordata = gen->alloc(chan, params))) { + res = -1; + } +@@ -2964,8 +2966,6 @@ + } + ast_channel_unlock(chan); + +- ast_prod(chan); +- + return res; + } + diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-pbxstart-failed-spurious-bye.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-pbxstart-failed-spurious-bye.patch new file mode 100644 index 000000000000..361c1ebb9d48 --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-pbxstart-failed-spurious-bye.patch @@ -0,0 +1,12 @@ +diff -uNr asterisk-1.8.0.ORIG//channels/chan_sip.c asterisk-1.8.0/channels/chan_sip.c +--- asterisk-1.8.0.ORIG//channels/chan_sip.c 2010-10-27 00:41:40.000000000 +0100 ++++ asterisk-1.8.0/channels/chan_sip.c 2010-10-27 00:52:14.000000000 +0100 +@@ -21567,6 +21567,8 @@ + + if (result) { + ++ sip_alreadygone(p); ++ + /* Unlock locks so ast_hangup can do its magic */ + ast_channel_unlock(c); + sip_pvt_unlock(p); diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-pri-missing-keyword.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-pri-missing-keyword.patch new file mode 100644 index 000000000000..5db2bcaa2729 --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-pri-missing-keyword.patch @@ -0,0 +1,12 @@ +diff -uNr asterisk-1.8.0.ORIG//include/asterisk/autoconfig.h.in asterisk-1.8.0/include/asterisk/autoconfig.h.in +--- asterisk-1.8.0.ORIG//include/asterisk/autoconfig.h.in 2010-10-27 00:41:40.000000000 +0100 ++++ asterisk-1.8.0/include/asterisk/autoconfig.h.in 2010-10-27 00:43:34.000000000 +0100 +@@ -573,6 +573,8 @@ + /* Define to 1 if you have the ISDN PRI hangup fix library. */ + #undef HAVE_PRI_HANGUP_FIX + ++#undef HAVE_PRI_PROG_W_CAUSE ++ + /* Define to 1 if you have the ISDN PRI set_inbanddisconnect library. */ + #undef HAVE_PRI_INBANDDISCONNECT + diff --git a/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-uclibc.patch b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-uclibc.patch new file mode 100644 index 000000000000..87d9a98ef058 --- /dev/null +++ b/net-misc/asterisk/files/1.8.0/asterisk-1.8.0-uclibc.patch @@ -0,0 +1,14 @@ +diff -uNr asterisk-1.8.0.ORIG/Makefile asterisk-1.8.0/Makefile +--- asterisk-1.8.0-orig/Makefile.old 2008-03-22 11:51:39.000000000 +0100 ++++ asterisk-1.8.0/Makefile 2008-03-22 11:51:49.000000000 +0100 +@@ -259,6 +259,10 @@ + ASTCFLAGS+=-pthread + endif + ++ifeq ($(OSARCH),linux-uclibc) ++ AST_LIBS+=-lpthread -ldl ++endif ++ + ifeq ($(OSARCH),SunOS) + ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 + endif diff --git a/net-misc/asterisk/metadata.xml b/net-misc/asterisk/metadata.xml index 7f063071545d..0d99eaee9f3a 100644 --- a/net-misc/asterisk/metadata.xml +++ b/net-misc/asterisk/metadata.xml @@ -19,5 +19,11 @@ <flag name="span">Enable support for the spandsp codec</flag> <flag name="samples">Install sample sound and configuration files (default: on)</flag> <flag name="logrotate">Install a configuration snippet for the logrotate cronjob</flag> + <flag name="srtp">Enable support for encrypted voice transmission (secure RTP)</flag> + <flag name="gtalk">Enable support for Google Talk services</flag> + <flag name="h323">Enable support for the H323 telephony protocol</flag> + <flag name="ais">Support clustering using the Application Interface Specification framework</flag> + <flag name="osplookup">Support secure peering using the Open Settlement Protocol</flag> + <flag name="http">Enable embedded web server</flag> </use> </pkgmetadata> |