diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2011-02-27 19:14:53 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2011-02-27 19:14:53 +0000 |
commit | c5aeeff8534b49b09352b03cf3d1a4ea1a2425c9 (patch) | |
tree | 9bb65b185fa0039e446057631acc2c635cf8c0c6 /net-misc/asterisk | |
parent | Initial commit. (diff) | |
download | historical-c5aeeff8534b49b09352b03cf3d1a4ea1a2425c9.tar.gz historical-c5aeeff8534b49b09352b03cf3d1a4ea1a2425c9.tar.bz2 historical-c5aeeff8534b49b09352b03cf3d1a4ea1a2425c9.zip |
Remove insecure ebuilds now that security stabilisation has been completed. Arch teams have signed off on their loss of keywording for this package.
Package-Manager: portage-2.1.9.41/cvs/Linux x86_64
Diffstat (limited to 'net-misc/asterisk')
19 files changed, 21 insertions, 2482 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog index 8e6fbe79d657..902ea13d6f02 100644 --- a/net-misc/asterisk/ChangeLog +++ b/net-misc/asterisk/ChangeLog @@ -1,6 +1,21 @@ # ChangeLog for net-misc/asterisk # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.295 2011/02/27 19:04:18 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.296 2011/02/27 19:14:53 chainsaw Exp $ + + 27 Feb 2011; Tony Vroon <chainsaw@gentoo.org> + -files/1.0.0/asterisk-1.0.5-uclibc-dns.diff, + -files/1.2.0/asterisk-1.2.1-uclibc-getloadavg.diff, + -files/1.2.0/asterisk-1.2.21.1-h323-dumb-makefile.diff, + -files/1.2.0/asterisk-1.2.35-lpc10-prototypes.diff, + -files/1.2.0/asterisk.confd, -files/1.2.0/asterisk.rc6, + -files/1.2.0/asterisk-updater, -files/1.4.0/asterisk.confd, + -files/1.2.0/asterisk-1.2.31.1-comma-is-not-pipe.diff, + -files/1.4.0/asterisk.initd, -files/1.4.0/asterisk.logrotate, + -files/1.4.0/func_devstate-r6.c, -files/1.4.0/func_volume.c, + -asterisk-1.2.37.ebuild, -asterisk-1.2.40.ebuild, + -asterisk-1.4.39.1-r1.ebuild: + Remove insecure ebuilds now that security stabilisation has been completed. + Arch teams have signed off on their loss of keywording for this package. 27 Feb 2011; Tony Vroon <chainsaw@gentoo.org> asterisk-1.6.2.16.2-r2.ebuild: Mark stable on AMD64 for security bug #352059. Arch testing by Agostino "ago" diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest index 4bba9d5c76f0..e1ff97b2747a 100644 --- a/net-misc/asterisk/Manifest +++ b/net-misc/asterisk/Manifest @@ -1,19 +1,6 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -AUX 1.0.0/asterisk-1.0.5-uclibc-dns.diff 304 RMD160 6d58a0fdad04f5105c1b8f8bb3e2058b4f97f12f SHA1 5f7819a1e5f5b8f035146d5506bab83f4ecb6ae0 SHA256 e4de36e528b7d1a7941689d530d93f1ffd41a2f863a856e612e3637f78ea4890 -AUX 1.2.0/asterisk-1.2.1-uclibc-getloadavg.diff 317 RMD160 f598d94a52cec83fefdafdce0694049c657e09e0 SHA1 fc0f4d990e386d39d43bac073f353421063186c9 SHA256 61daa70727418dbaf232fc5d1eaddd20a8505b943b8fb724a1b63170edfe88cc -AUX 1.2.0/asterisk-1.2.21.1-h323-dumb-makefile.diff 1098 RMD160 c39cee5a6f420e6e63e30ac5e83aa9b78c1b12c8 SHA1 93087ecdcde11bd983d25acaac3723450abbc111 SHA256 86d0c8cd754754916c45d77d9c745d1688b3b7b54181ecb1d42a1934bdea7deb -AUX 1.2.0/asterisk-1.2.31.1-comma-is-not-pipe.diff 648 RMD160 9067c51b09f458be44c88b06ae7263ea7dfb13fe SHA1 e49c76a04c959d17b88d388f8cbf32719d2a5fcc SHA256 75bb7f93274ee4c1e7a915b4aea89f96972e43b7a12071fad400f9fe9876ec9f -AUX 1.2.0/asterisk-1.2.35-lpc10-prototypes.diff 500 RMD160 66abbc99cdb18ed82908fb7b7c6514d9c5b4abfc SHA1 77ed05521029b365ee7bf495e90a84fe35165c06 SHA256 29200631d62b3c0e708e24b7d92fc700e0d225119ef0aadc55f3153a47369edd -AUX 1.2.0/asterisk-updater 3127 RMD160 41ea584081c3e565205e59771e24a8715d7e2042 SHA1 1c11d9ce286972b6f98c15a16cbb7f1c943414eb SHA256 93e6862361a320c7f7f30525b4209366190dd2bc21eedbd3654ffb4b991af5fd -AUX 1.2.0/asterisk.confd 2200 RMD160 f26ac9b18e8c1db86c54839d9b4a816cfe45c61f SHA1 2baee139893fd9c413d140db843831da1917f05f SHA256 b94a59f36a46362622acd2ccc811e1e9dd0abf928104285c7098d7c17a324379 -AUX 1.2.0/asterisk.rc6 5891 RMD160 d14da5d703cdd9bedf9986e0e49a93d8031876ee SHA1 3e28003ecd2d0659266644bffe463fd25efddbcc SHA256 d2bbd0e335f7f2f399780778501df3fd2026ba27dfe48db3ab282430fb215531 -AUX 1.4.0/asterisk.confd 2204 RMD160 128eca6297ca6ab4817750f1432be4fdb90d486c SHA1 f26348908a7a622afd21011fdcc38abbced87200 SHA256 69fb5e338e9ff73459e5f788297b57d833f2a15cf764514dff94a42e145a5df5 -AUX 1.4.0/asterisk.initd 6652 RMD160 51a757b75b0a2b923b082a93a82fddac21d0e966 SHA1 111717a594d3a246f596e4c1c43bfdcaebe4e3a0 SHA256 082ba1ecc03b75cfb310a87a1374fdf9cfeb8e0d09e8225a7126f80269403fa2 -AUX 1.4.0/asterisk.logrotate 436 RMD160 06a98d2a908464a951e3386a2681f5829dcb0220 SHA1 31331f8fabc643f722a1c12cee0557e0268019ea SHA256 675705506d1adf7ec8c278581412a7ed69eed2735fea6c5f2faf368fb4ad9a26 -AUX 1.4.0/func_devstate-r6.c 6070 RMD160 5c9c299b486a001e6f871d5177b5405521faf5d0 SHA1 a6b320bfc514fcfe7c396d848a17eb702ab194fd SHA256 50ca3794824f6772fce23d40b868a9bf6451e84765de44b8aa96b334c1d2967d -AUX 1.4.0/func_volume.c 4503 RMD160 7cdd1b570a3cc4ee8f7d49139ab50fe80f33d8bb SHA1 f34e4bb5d75fc9589b27ccd6555c0db5a0d27dbf SHA256 28c8040837ce9cf1c86fdc1d043685723a9f56a2398140d751b85c609248b698 AUX 1.6.0/asterisk.confd 2204 RMD160 31bceebfa535e97cb2634e313678cc42186d4750 SHA1 748c623cea238cd9b322672d5ebcfe214a4f0463 SHA256 daec84c58e0ef6cbd71a6fc62cb83129b1bcffdfdd619ebbd62a642f0cd1eee7 AUX 1.6.2/asterisk.initd2 6658 RMD160 b694da109e746e9a9e642ffa7f1d278f03543cea SHA1 63443d3066d4c47228fe1d852420d571ae6f8800 SHA256 f6fd2c229e61c12360b1d289a631f6a0a6f8638e7c6f6add6040ad988170bf70 AUX 1.6.2/asterisk.initd3 6658 RMD160 adabbacaff55cc49077a919fb23eb6f8e3a2c076 SHA1 a256b7af478a4d83c19a89b23d79a4f832f1fb5a SHA256 ba737b5eadd4a5ff8653e30b54959c1d25a8a68699b8ce9adc9afe09da8b4110 @@ -31,26 +18,18 @@ AUX 1.8.0/asterisk-1.8.0-inband-indications.patch 539 RMD160 91474076400fe022a83 AUX 1.8.0/asterisk-1.8.0-pbxstart-failed-spurious-bye.patch 427 RMD160 aa54556a6139b4e1ddc14001ac2f76e6b5c8fda3 SHA1 5dcf0bb23e5f26925cc73bcb8df013983c6bcf20 SHA256 9eda54a332fcf9ca30e5f11b0ba3b9da151e67732d19f14997fb6ffed554ac89 AUX 1.8.0/asterisk-1.8.0-pri-missing-keyword.patch 550 RMD160 3c69f10658f559cac33774e2eb789521eb1a5ec4 SHA1 f5c012c84f482c50dff244a5284ff5d89265e3b7 SHA256 6e9dece1c443819113a28b057159f6f37b21d2f8b50b2ac8de536446254d126b AUX 1.8.0/asterisk-1.8.0-uclibc.patch 471 RMD160 305b41a818f6a59d44d7fa414282e3e128c11858 SHA1 e876ee62ab896977d9302290340098fdda69bc02 SHA256 e1e3b05b300df6331d771cd6b97a609f797d451d7cb2f1bc15595c9964a5cfa5 -DIST asterisk-1.2.27-patches-1.0.tar.bz2 6653 RMD160 18f1d7fc4497466050ed4f517ff5732eb448ff2e SHA1 2aecd3e91cde38dbb0fd591e8a49db221f44b94e SHA256 a4da0570fca2df3c508f072be62722879956fe8c454027fbb8dafb7a6095384c -DIST asterisk-1.2.37.tar.gz 29899629 RMD160 1de7ff96d3b1fd8d89f3ef7b3bb9e35bedccfb33 SHA1 c9a3c4684e021f62b4d19f6e0c8fc11f64db19d6 SHA256 9f3ec67efe0e4d45434621cd358e8e7d64e1b05df04d66e2390c9420acd2aeaa -DIST asterisk-1.2.40.tar.gz 29903514 RMD160 dc3da60756c82c98a055e49b068eb6760a01948e SHA1 4b4b794e858a3436bc35bdd2f4edf824c2885b68 SHA256 61dc745b12f6dc2998404e77747a964db56df8efae84a666c4ccddf016c9c06d -DIST asterisk-1.4.39.1.tar.gz 21651888 RMD160 0ea21328e1e569499ada5c5a55aaedcd321853b4 SHA1 8a4e586124974e188ccefa902534b874899a7d29 SHA256 39af16a3b15f7ff7a4008b4cc892523189dd89fc57ba9278e248d896ecdabe9c DIST asterisk-1.6.2.16.2.tar.gz 23742356 RMD160 90b17cfb11915ee2cb282576a5b5f4f2ac1738de SHA1 f03a52fc113af884c8adf26252e812a6232f45de SHA256 37f2437e8206127bb16af010f6401a8d0f97ab04ddb8f287931c48174784bb03 DIST asterisk-1.8.2.4.tar.gz 26802859 RMD160 af4206f46c73b8c9227a96a4551f3c969527c793 SHA1 dec9ce8e8dbd6000ccd180de06ecebf74b71f930 SHA256 978dc9b1f4585c31fafa23a86e347ad46a75d8b438c059423f804bea088bbb1d -DIST gentoo-ast14-patchset-0.1.tar.bz2 2468 RMD160 a466a098627edb18603dee199a3c1e858fdc2f77 SHA1 9518d527e56d48c40f520b677e160b6566887910 SHA256 e1385e91f33c3f3441c7405b00e0932cba92f9f561bc4e768bf8094372912184 DIST gentoo-asterisk-patchset-0.1.tar.bz2 5394 RMD160 bfd546101c77f6e6989c406bfb202e592f9d16fd SHA1 e49b7784f987e027d833fbe8e0773acb1ef78521 SHA256 07c1bc6a29bda4fa98e7d1eb436d2e6eafc13263b774a0ff41698e523fa59a97 DIST gentoo-asterisk-patchset-0.2.tar.bz2 7398 RMD160 65b282fa621b3e65d293cd7e1d2f0af1e7837643 SHA1 71958e5108f225dda4e22a97a26a793e51f39283 SHA256 cff992cef307d73d336bf64ed56c32382a264e1b0eb468921a51d09c7f9d5861 -EBUILD asterisk-1.2.37.ebuild 10717 RMD160 6ec81f6a616cc2cefa862c1a53bc339bc2dcb5de SHA1 0d6260ee62d165581e5223524424f41f48aba084 SHA256 32f27ef174d02947c09b2266bf1f763fa594144f24f7c3bec4523818b168e32f -EBUILD asterisk-1.2.40.ebuild 10725 RMD160 a41d802dbc202665f190f29241b0f40645480916 SHA1 489416463292be0c64a2d1e2f2182b38579bbfe3 SHA256 4c3467dcb7c4011e42b468d699ea3dcc0041a2fc6968b8124276c8df705c88c6 -EBUILD asterisk-1.4.39.1-r1.ebuild 7367 RMD160 0304f9478d77dada3b7c4dc4f7ed9c5845ff871a SHA1 03cc1bd64f14156ee03b29609dbe643c9b2fb6cd SHA256 774fd4873d8c3122a96a0ddc7f6a0caed2dff81b9acd60cdb5b805bfd9755d7f EBUILD asterisk-1.6.2.16.2-r2.ebuild 5798 RMD160 f6a851e81ce6a0f09534e206509b521b5a69ddc0 SHA1 40ee8652565875081cf253ef7735edc570349199 SHA256 202742e49d8f109bd29b914c40a891b4fbc4ad8bf25dbcf7abfa024123bf8d89 EBUILD asterisk-1.8.2.4.ebuild 14402 RMD160 6cc9ddd9072d71b880b65bad2038e4b0662043b6 SHA1 321dc1e6fa7b549b576ada245e561e1df66703c1 SHA256 2f3e5efd1db384937f10ffbbe0a5bf6dd1ce91f7700e7ba4a97074f2150f4533 -MISC ChangeLog 73201 RMD160 b8c59d445435a63eee710d5eff97ddbb127ab96a SHA1 03c14f5b43ec88e9a0349197c6c8764ff360b264 SHA256 fcca4622048965db20df3efca81a60ff7f97dda18ebecba9191cd3e01951d0df -MISC metadata.xml 1599 RMD160 e3a57db5f07271fd2504710dd351eba739f7cfa0 SHA1 5914f255dfbb35ffdd989dfd902a511c157c4206 SHA256 66c3fe6c6895e83f1ae0eb674483b1119137af3aab70047b671f40fde3ba0399 +MISC ChangeLog 74004 RMD160 18302990d2af12a92735937d05dda6eacb976729 SHA1 119199369f76ad2d75309de34e34ea9dd0100a67 SHA256 2a0dc42ebce33bae2519b7e0b4e40e7465358f74be7dfe5dd71ee71885f916fc +MISC metadata.xml 1191 RMD160 b0c61bb8c8017af35605613d543dcbcc02148ed6 SHA1 2431068bd813548ea53fd075a8ce63be40a22bfc SHA256 132ca441c4db467d75ce1489770ee3192b7ce5bf36dd2a661851dfbf107ec939 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk1qoCwACgkQp5vW4rUFj5pCRgCfRl8nhsWXf2iyOoVkMfyKuzBu -NLsAnikcraOURUEDzfjQcWVtd0u9nCKO -=2/jT +iEYEARECAAYFAk1qoqcACgkQp5vW4rUFj5ojbgCfTh9Hvrba/55IW87xXckhlKcE +HGUAniddUWqmL84VxGJUF4T8wLKSPxUM +=N7sj -----END PGP SIGNATURE----- diff --git a/net-misc/asterisk/asterisk-1.2.37.ebuild b/net-misc/asterisk/asterisk-1.2.37.ebuild deleted file mode 100644 index 88d3b52078ed..000000000000 --- a/net-misc/asterisk/asterisk-1.2.37.ebuild +++ /dev/null @@ -1,402 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.2.37.ebuild,v 1.8 2011/01/19 17:25:39 c1pher Exp $ - -EAPI=2 -inherit eutils multilib toolchain-funcs - -IUSE="alsa curl debug doc gtk hardened lowmem mmx nosamples \ - odbc osp postgres pri sqlite ssl speex zaptel elibc_uclibc" - -AST_PATCHES="1.2.27-patches-1.0" - -MY_P="${P/_p/.}" - -DESCRIPTION="Asterisk: A Modular Open Source PBX System" -HOMEPAGE="http://www.asterisk.org/" -SRC_URI="http://downloads.digium.com/pub/asterisk/releases/${MY_P}.tar.gz - mirror://gentoo/${PN}-${AST_PATCHES}.tar.bz2" - -S="${WORKDIR}/${MY_P}" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="alpha amd64 ~hppa ppc sparc x86" - -RDEPEND="dev-libs/newt - media-sound/sox - ssl? ( dev-libs/openssl ) - gtk? ( =x11-libs/gtk+-1.2* ) - pri? ( =net-libs/libpri-1.2*[-bri] ) - alsa? ( media-libs/alsa-lib ) - curl? ( net-misc/curl ) - odbc? ( dev-db/unixODBC ) - speex? ( media-libs/speex ) - sqlite? ( <dev-db/sqlite-3.0.0 ) - zaptel? ( >=net-misc/zaptel-1.2.16 ) - postgres? ( dev-db/postgresql-base ) - osp? ( >=net-libs/osptoolkit-3.3.4 )" - -DEPEND="${RDEPEND} - sys-devel/flex - sys-devel/bison - doc? ( app-doc/doxygen ) - virtual/logger - !net-misc/asterisk-core-sounds - !net-misc/asterisk-extra-sounds - !net-misc/asterisk-moh-opsound" - -#asterisk uses special mpg123 functions and does not work with mpeg321, bug #42703 -PDEPEND="|| ( media-sound/mpg123 net-misc/asterisk-addons )" - -QA_TEXTRELS_x86="usr/lib/asterisk/modules/codec_gsm.so" -QA_EXECSTACK_x86="usr/lib/asterisk/modules/codec_gsm.so" - -# -# List of modules to ignore during scan (because they have been removed in 1.2.x) -# -SCAN_IGNORE_MODS=" - app_qcall - chan_modem - chan_modem_i4l - chan_modem_bestdata - chan_modme_aopen" - -# -# shortcuts -# -is_ast10update() { - return $(has_version "=net-misc/asterisk-1.0*") -} - -is_astupdate() { - if ! is_ast10update; then - return $(has_version "<net-misc/asterisk-${PV}") - fi - return 0 -} - -# -# Scan for asterisk-1.0.x modules that will have to be updated -# -scan_modules() { - local modules_list="" - local n - - for x in $(ls -1 "${ROOT}"usr/$(get_libdir)/asterisk/modules/*.so); do - echo -en "Scanning.... $(basename ${x}) \r" - - # skip blacklisted modules - hasq $(basename ${x//.so}) ${SCAN_IGNORE_MODS} && continue - - if $(readelf -s "${x}" | grep -q "\(ast_load\|ast_destroy\)$"); then - modules_list="${modules_list} $(basename ${x//.so})" - fi - done - - if [[ -n "${modules_list}" ]]; then - echo " ========================================================" - ewarn "Please update or unmerge the following modules:" - echo - - n=0 - for x in ${modules_list}; do - ewarn " - ${x}" - (( n++ )) - done - - echo - ewarn "Warning: $n outdated module(s) found!" - ewarn "Warning: asterisk may not work if you don't update them!" - echo " ========================================================" - echo - einfo "You can use the \"asterisk-updater\" script to update the modules" - epause - echo - return 1 - else - einfo "No asterisk-1.0.x modules found!" - return 0 - fi -} - -pkg_setup() { - local checkfailed=0 waitaftermsg=0 - - if is_ast10update; then - ewarn " Asterisk UPGRADE Warning" - ewarn "" - ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.gz after the installation!" - ewarn "" - ewarn " Asterisk UPGRADE Warning" - echo - waitaftermsg=1 - fi - - # - # Regular checks - # - einfo "Running some pre-flight checks..." - echo - - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" -} - -src_prepare() { - # - # gentoo patchset - # - for x in $(grep -v "^#\| \+" "${WORKDIR}"/patches/patches.list); do - epatch "${WORKDIR}"/patches/${x} - done - - if use mmx; then - if ! use hardened; then - einfo "Enabling mmx optimization" - sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \ - Makefile - else - ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!" - fi - fi - - if ! use debug; then - einfo "Disabling debug support" - sed -i -e "s:^\(DEBUG=\):#\1:" \ - Makefile - fi - - if ! use ssl; then - einfo "Disabling crypto support" - sed -i -e 's:^#\(NOCRYPTO=yes\):\1:' \ - -e '/^LIBS+=-lssl/d' Makefile || die - fi - - epatch "${FILESDIR}/1.2.0/${PN}-1.2.35-lpc10-prototypes.diff" - - # - # uclibc patch - # - if use elibc_uclibc; then - einfo "Patching asterisk for uclibc..." - epatch "${FILESDIR}"/1.0.0/${PN}-1.0.5-uclibc-dns.diff - epatch "${FILESDIR}"/1.2.0/${PN}-1.2.1-uclibc-getloadavg.diff - fi - - # - # Disable AEL, security bug #171884 - # Re-enable at your own risk (no USE since it can be critical) - # - sed -i -e 's/pbx_ael.so//' pbx/Makefile || die - - # codecs/Makefile does not add -lspeexdsp needed for speex 1.2, bug #206463 - if use speex && has_version ">=media-libs/speex-1.2"; then - sed -i -e "s/-lspeex/-lspeex -lspeexdsp/" codecs/Makefile \ - || die "patching codecs/Makefile failed" - fi -} - -src_compile() { - local myopts - - use lowmem && \ - myopts="-DLOW_MEMORY" - - einfo "Building Asterisk..." - if use debug; then - unset CFLAGS - make \ - CC=$(tc-getCC) \ - NOTRACE=1 \ - PWLIBDIR=/usr/share/pwlib \ - OPTIONS="${myopts}" \ - dont-optimize=1 || die "Make failed" - else - make \ - CC=$(tc-getCC) \ - NOTRACE=1 \ - OPTIMIZE="${CFLAGS}" \ - PWLIBDIR=/usr/share/pwlib \ - OPTIONS="${myopts}" || die "Make failed" - fi - - # create api docs - use doc && \ - make progdocs -} - -src_install() { - - # install asterisk - make DESTDIR="${D}" ASTLIBDIR="\$(INSTALL_PREFIX)/usr/$(get_libdir)/asterisk" install || die "Make install failed" - make DESTDIR="${D}" ASTLIBDIR="\$(INSTALL_PREFIX)/usr/$(get_libdir)/asterisk" samples || die "Failed to create sample files" - - # remove installed sample files if nosamples flag is set - if use nosamples; then - einfo "Skipping installation of sample files..." - rm -rf "${D}"var/spool/asterisk/voicemail/default - rm -f "${D}"var/lib/asterisk/mohmp3/* - rm -f "${D}"var/lib/asterisk/sounds/demo-* - rm -f "${D}"var/lib/asterisk/agi-bin/* - else - einfo "Sample files have been installed" - keepdir /var/spool/asterisk/voicemail/default/1234/INBOX - fi - - # move sample configuration files to doc directory - if is_ast10update; then - elog "Updating from old (pre-1.2) asterisk version, new configuration files have been installed" - elog "into "${ROOT}"etc/asterisk, use etc-update or dispatch-conf to update them" - elif has_version "net-misc/asterisk"; then - elog "Configuration samples have been moved to: $ROOT/usr/share/doc/${PF}/conf" - insinto /usr/share/doc/${PF}/conf - doins "${D}"etc/asterisk/*.conf* - rm -f "${D}"etc/asterisk/*.conf* 2>/dev/null - fi - - # don't delete these directories, even if they are empty - for x in voicemail meetme system dictate monitor tmp; do - keepdir /var/spool/asterisk/${x} - done - keepdir /var/lib/asterisk/sounds/priv-callerintros - keepdir /var/lib/asterisk/mohmp3 - keepdir /var/lib/asterisk/agi-bin - keepdir /var/log/asterisk/cdr-csv - keepdir /var/log/asterisk/cdr-custom - keepdir /var/run/asterisk - - # install astxs - dobin contrib/scripts/astxs - - newinitd "${FILESDIR}"/1.2.0/asterisk.rc6 asterisk - newconfd "${FILESDIR}"/1.2.0/asterisk.confd asterisk - - # install standard docs... - dodoc BUGS CREDITS ChangeLog HARDWARE README - dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README UPGRADE.txt - dodoc doc/README.* - dodoc doc/*.txt - - docinto scripts - dodoc contrib/scripts/* - - docinto utils - dodoc contrib/utils/* - - docinto configs - dodoc configs/* - - # install api docs - if use doc; then - insinto /usr/share/doc/${PF}/api/html - doins doc/api/html/* - fi - - insinto /usr/share/doc/${PF}/cgi - doins contrib/scripts/vmail.cgi - doins images/*.gif - - # install asterisk-updater - dosbin "${FILESDIR}"/1.2.0/asterisk-updater - - # install asterisk.h, a lot of external modules need this - insinto /usr/include/asterisk - doins include/asterisk.h - - # make sure misdn/capi stuff is not installed, provided by asterisk-chan_.. - rm -f "${D}"/etc/asterisk/misdn.conf "${D}"/usr/lib/asterisk/modules/chan_misdn.so \ - "${D}"/usr/share/doc/${PF}/{conf/misdn.conf,configs/misdn.conf.sample.gz,README.misdn.gz} - rm -f "${D}"/usr/include/asterisk/chan_capi{,_app}.h \ - "${D}"/usr/share/doc/${PF}/{conf/capi.conf,configs/capi.conf.sample.gz} - - # make sure the broken speex support does not keep Asterisk from starting up - # bug #206463 if you care about this. solution needs to work with --as-needed - rm -f "${D}"usr/$(get_libdir)/asterisk/modules/codec_speex.so || die "Unable to remove fatally flawed codec_speex.so" -} - -pkg_postinst() { - einfo "Fixing permissions" - chown -R asterisk:asterisk "${ROOT}"var/log/asterisk - chmod -R u=rwX,g=rX,o= "${ROOT}"var/log/asterisk - - for x in lib run spool; do - chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk - done - - chown asterisk:asterisk "${ROOT}"etc/asterisk/ - chown asterisk:asterisk "${ROOT}"etc/asterisk/*.adsi - chown asterisk:asterisk "${ROOT}"etc/asterisk/extensions.ael - chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/ - chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/*.adsi - chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/extensions.ael - echo - - # - # Announcements, warnings, reminders... - # - einfo "Asterisk has been installed" - einfo "" - 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" - elog - elog "http://www.automated.it/guidetoasterisk.htm" - elog - elog "Gentoo VoIP IRC Channel:" - elog "#gentoo-voip @ irc.freenode.net" - elog - elog "Please note that AEL is no longer built because of security bugs" - elog "See http://bugs.gentoo.org/show_bug.cgi?id=171884" - elog - echo - echo - - # - # Warning about 1.0 -> 1.2 changes... - # - if is_ast10update; then - ewarn "" - ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.gz before continuing" - ewarn "" - fi - - if is_astupdate; then - ewarn "" - ewarn " - The initgroups patch has been dropped, please update your" - ewarn " \"conf.d/asterisk\" and \"init.d/asterisk\" file!" - ewarn "" - fi - - # scan for old modules - if is_ast10update; then - einfo "Asterisk has been updated from pre-1.2.x, scanning for old modules" - scan_modules - fi -} - -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=rX,o= "${ROOT}"var/${x}/asterisk - done - - chown -R root:asterisk "${ROOT}"etc/asterisk - chmod -R u=rwX,g=rX,o= "${ROOT}"etc/asterisk - - einfo "done" - else - einfo "skipping" - fi -} diff --git a/net-misc/asterisk/asterisk-1.2.40.ebuild b/net-misc/asterisk/asterisk-1.2.40.ebuild deleted file mode 100644 index 52ff3e82c913..000000000000 --- a/net-misc/asterisk/asterisk-1.2.40.ebuild +++ /dev/null @@ -1,402 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.2.40.ebuild,v 1.5 2011/01/19 19:46:07 mr_bones_ Exp $ - -EAPI=2 -inherit eutils multilib toolchain-funcs - -IUSE="alsa curl debug doc gtk hardened lowmem mmx nosamples \ - odbc osp postgres pri sqlite ssl speex zaptel elibc_uclibc" - -AST_PATCHES="1.2.27-patches-1.0" - -MY_P="${P/_p/.}" - -DESCRIPTION="Asterisk: A Modular Open Source PBX System" -HOMEPAGE="http://www.asterisk.org/" -SRC_URI="http://downloads.digium.com/pub/asterisk/releases/${MY_P}.tar.gz - mirror://gentoo/${PN}-${AST_PATCHES}.tar.bz2" - -S="${WORKDIR}/${MY_P}" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" - -RDEPEND="dev-libs/newt - media-sound/sox - ssl? ( dev-libs/openssl ) - gtk? ( =x11-libs/gtk+-1.2* ) - pri? ( =net-libs/libpri-1.2*[-bri] ) - alsa? ( media-libs/alsa-lib ) - curl? ( net-misc/curl ) - odbc? ( dev-db/unixODBC ) - speex? ( media-libs/speex ) - sqlite? ( <dev-db/sqlite-3.0.0 ) - zaptel? ( >=net-misc/zaptel-1.2.16 ) - postgres? ( dev-db/postgresql-base ) - osp? ( >=net-libs/osptoolkit-3.3.4 )" - -DEPEND="${RDEPEND} - sys-devel/flex - sys-devel/bison - doc? ( app-doc/doxygen ) - virtual/logger - !net-misc/asterisk-core-sounds - !net-misc/asterisk-extra-sounds - !net-misc/asterisk-moh-opsound" - -#asterisk uses special mpg123 functions and does not work with mpeg321, bug #42703 -PDEPEND="|| ( media-sound/mpg123 net-misc/asterisk-addons )" - -QA_TEXTRELS_x86="usr/lib/asterisk/modules/codec_gsm.so" -QA_EXECSTACK_x86="usr/lib/asterisk/modules/codec_gsm.so" - -# -# List of modules to ignore during scan (because they have been removed in 1.2.x) -# -SCAN_IGNORE_MODS=" - app_qcall - chan_modem - chan_modem_i4l - chan_modem_bestdata - chan_modme_aopen" - -# -# shortcuts -# -is_ast10update() { - return $(has_version "=net-misc/asterisk-1.0*") -} - -is_astupdate() { - if ! is_ast10update; then - return $(has_version "<net-misc/asterisk-${PV}") - fi - return 0 -} - -# -# Scan for asterisk-1.0.x modules that will have to be updated -# -scan_modules() { - local modules_list="" - local n - - for x in $(ls -1 "${ROOT}"usr/$(get_libdir)/asterisk/modules/*.so); do - echo -en "Scanning.... $(basename ${x}) \r" - - # skip blacklisted modules - hasq $(basename ${x//.so}) ${SCAN_IGNORE_MODS} && continue - - if $(readelf -s "${x}" | grep -q "\(ast_load\|ast_destroy\)$"); then - modules_list="${modules_list} $(basename ${x//.so})" - fi - done - - if [[ -n "${modules_list}" ]]; then - echo " ========================================================" - ewarn "Please update or unmerge the following modules:" - echo - - n=0 - for x in ${modules_list}; do - ewarn " - ${x}" - (( n++ )) - done - - echo - ewarn "Warning: $n outdated module(s) found!" - ewarn "Warning: asterisk may not work if you don't update them!" - echo " ========================================================" - echo - einfo "You can use the \"asterisk-updater\" script to update the modules" - epause - echo - return 1 - else - einfo "No asterisk-1.0.x modules found!" - return 0 - fi -} - -pkg_setup() { - local checkfailed=0 waitaftermsg=0 - - if is_ast10update; then - ewarn " Asterisk UPGRADE Warning" - ewarn "" - ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.gz after the installation!" - ewarn "" - ewarn " Asterisk UPGRADE Warning" - echo - waitaftermsg=1 - fi - - # - # Regular checks - # - einfo "Running some pre-flight checks..." - echo - - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" -} - -src_prepare() { - # - # gentoo patchset - # - for x in $(grep -v "^#\| \+" "${WORKDIR}"/patches/patches.list); do - epatch "${WORKDIR}"/patches/${x} - done - - if use mmx; then - if ! use hardened; then - einfo "Enabling mmx optimization" - sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \ - Makefile - else - ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!" - fi - fi - - if ! use debug; then - einfo "Disabling debug support" - sed -i -e "s:^\(DEBUG=\):#\1:" \ - Makefile - fi - - if ! use ssl; then - einfo "Disabling crypto support" - sed -i -e 's:^#\(NOCRYPTO=yes\):\1:' \ - -e '/^LIBS+=-lssl/d' Makefile || die - fi - - epatch "${FILESDIR}/1.2.0/${PN}-1.2.35-lpc10-prototypes.diff" - - # - # uclibc patch - # - if use elibc_uclibc; then - einfo "Patching asterisk for uclibc..." - epatch "${FILESDIR}"/1.0.0/${PN}-1.0.5-uclibc-dns.diff - epatch "${FILESDIR}"/1.2.0/${PN}-1.2.1-uclibc-getloadavg.diff - fi - - # - # Disable AEL, security bug #171884 - # Re-enable at your own risk (no USE since it can be critical) - # - sed -i -e 's/pbx_ael.so//' pbx/Makefile || die - - # codecs/Makefile does not add -lspeexdsp needed for speex 1.2, bug #206463 - if use speex && has_version ">=media-libs/speex-1.2"; then - sed -i -e "s/-lspeex/-lspeex -lspeexdsp/" codecs/Makefile \ - || die "patching codecs/Makefile failed" - fi -} - -src_compile() { - local myopts - - use lowmem && \ - myopts="-DLOW_MEMORY" - - einfo "Building Asterisk..." - if use debug; then - unset CFLAGS - make \ - CC=$(tc-getCC) \ - NOTRACE=1 \ - PWLIBDIR=/usr/share/pwlib \ - OPTIONS="${myopts}" \ - dont-optimize=1 || die "Make failed" - else - make \ - CC=$(tc-getCC) \ - NOTRACE=1 \ - OPTIMIZE="${CFLAGS}" \ - PWLIBDIR=/usr/share/pwlib \ - OPTIONS="${myopts}" || die "Make failed" - fi - - # create api docs - use doc && \ - make progdocs -} - -src_install() { - - # install asterisk - make DESTDIR="${D}" ASTLIBDIR="\$(INSTALL_PREFIX)/usr/$(get_libdir)/asterisk" install || die "Make install failed" - make DESTDIR="${D}" ASTLIBDIR="\$(INSTALL_PREFIX)/usr/$(get_libdir)/asterisk" samples || die "Failed to create sample files" - - # remove installed sample files if nosamples flag is set - if use nosamples; then - einfo "Skipping installation of sample files..." - rm -rf "${D}"var/spool/asterisk/voicemail/default - rm -f "${D}"var/lib/asterisk/mohmp3/* - rm -f "${D}"var/lib/asterisk/sounds/demo-* - rm -f "${D}"var/lib/asterisk/agi-bin/* - else - einfo "Sample files have been installed" - keepdir /var/spool/asterisk/voicemail/default/1234/INBOX - fi - - # move sample configuration files to doc directory - if is_ast10update; then - elog "Updating from old (pre-1.2) asterisk version, new configuration files have been installed" - elog "into "${ROOT}"etc/asterisk, use etc-update or dispatch-conf to update them" - elif has_version "net-misc/asterisk"; then - elog "Configuration samples have been moved to: $ROOT/usr/share/doc/${PF}/conf" - insinto /usr/share/doc/${PF}/conf - doins "${D}"etc/asterisk/*.conf* - rm -f "${D}"etc/asterisk/*.conf* 2>/dev/null - fi - - # don't delete these directories, even if they are empty - for x in voicemail meetme system dictate monitor tmp; do - keepdir /var/spool/asterisk/${x} - done - keepdir /var/lib/asterisk/sounds/priv-callerintros - keepdir /var/lib/asterisk/mohmp3 - keepdir /var/lib/asterisk/agi-bin - keepdir /var/log/asterisk/cdr-csv - keepdir /var/log/asterisk/cdr-custom - keepdir /var/run/asterisk - - # install astxs - dobin contrib/scripts/astxs - - newinitd "${FILESDIR}"/1.2.0/asterisk.rc6 asterisk - newconfd "${FILESDIR}"/1.2.0/asterisk.confd asterisk - - # install standard docs... - dodoc BUGS CREDITS ChangeLog HARDWARE README - dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README UPGRADE.txt - dodoc doc/README.* - dodoc doc/*.txt - - docinto scripts - dodoc contrib/scripts/* - - docinto utils - dodoc contrib/utils/* - - docinto configs - dodoc configs/* - - # install api docs - if use doc; then - insinto /usr/share/doc/${PF}/api/html - doins doc/api/html/* - fi - - insinto /usr/share/doc/${PF}/cgi - doins contrib/scripts/vmail.cgi - doins images/*.gif - - # install asterisk-updater - dosbin "${FILESDIR}"/1.2.0/asterisk-updater - - # install asterisk.h, a lot of external modules need this - insinto /usr/include/asterisk - doins include/asterisk.h - - # make sure misdn/capi stuff is not installed, provided by asterisk-chan_.. - rm -f "${D}"/etc/asterisk/misdn.conf "${D}"/usr/lib/asterisk/modules/chan_misdn.so \ - "${D}"/usr/share/doc/${PF}/{conf/misdn.conf,configs/misdn.conf.sample.gz,README.misdn.gz} - rm -f "${D}"/usr/include/asterisk/chan_capi{,_app}.h \ - "${D}"/usr/share/doc/${PF}/{conf/capi.conf,configs/capi.conf.sample.gz} - - # make sure the broken speex support does not keep Asterisk from starting up - # bug #206463 if you care about this. solution needs to work with --as-needed - rm -f "${D}"usr/$(get_libdir)/asterisk/modules/codec_speex.so || die "Unable to remove fatally flawed codec_speex.so" -} - -pkg_postinst() { - einfo "Fixing permissions" - chown -R asterisk:asterisk "${ROOT}"var/log/asterisk - chmod -R u=rwX,g=rX,o= "${ROOT}"var/log/asterisk - - for x in lib run spool; do - chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk - done - - chown asterisk:asterisk "${ROOT}"etc/asterisk/ - chown asterisk:asterisk "${ROOT}"etc/asterisk/*.adsi - chown asterisk:asterisk "${ROOT}"etc/asterisk/extensions.ael - chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/ - chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/*.adsi - chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/extensions.ael - echo - - # - # Announcements, warnings, reminders... - # - einfo "Asterisk has been installed" - einfo "" - 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" - elog - elog "http://www.automated.it/guidetoasterisk.htm" - elog - elog "Gentoo VoIP IRC Channel:" - elog "#gentoo-voip @ irc.freenode.net" - elog - elog "Please note that AEL is no longer built because of security bugs" - elog "See http://bugs.gentoo.org/show_bug.cgi?id=171884" - elog - echo - echo - - # - # Warning about 1.0 -> 1.2 changes... - # - if is_ast10update; then - ewarn "" - ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.gz before continuing" - ewarn "" - fi - - if is_astupdate; then - ewarn "" - ewarn " - The initgroups patch has been dropped, please update your" - ewarn " \"conf.d/asterisk\" and \"init.d/asterisk\" file!" - ewarn "" - fi - - # scan for old modules - if is_ast10update; then - einfo "Asterisk has been updated from pre-1.2.x, scanning for old modules" - scan_modules - fi -} - -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=rX,o= "${ROOT}"var/${x}/asterisk - done - - chown -R root:asterisk "${ROOT}"etc/asterisk - chmod -R u=rwX,g=rX,o= "${ROOT}"etc/asterisk - - einfo "done" - else - einfo "skipping" - fi -} diff --git a/net-misc/asterisk/asterisk-1.4.39.1-r1.ebuild b/net-misc/asterisk/asterisk-1.4.39.1-r1.ebuild deleted file mode 100644 index 81ac8922d704..000000000000 --- a/net-misc/asterisk/asterisk-1.4.39.1-r1.ebuild +++ /dev/null @@ -1,276 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.4.39.1-r1.ebuild,v 1.1 2011/01/19 23:03:41 chainsaw Exp $ - -EAPI=3 -inherit autotools base eutils flag-o-matic 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/releases/${MY_P}.tar.gz - mirror://gentoo/gentoo-ast14-patchset-0.1.tar.bz2" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="alsa +caps dahdi debug doc freetds imap jabber newt +samples odbc oss postgres radius snmp speex ssl sqlite static vanilla vorbis" - -EPATCH_SUFFIX="patch" -PATCHES=( "${WORKDIR}/ast14-patchset" ) - -RDEPEND="sys-libs/ncurses - dev-libs/popt - sys-libs/zlib - alsa? ( media-libs/alsa-lib ) - caps? ( sys-libs/libcap ) - dahdi? ( >=net-libs/libpri-1.4.7 - net-misc/dahdi-tools ) - freetds? ( dev-db/freetds ) - imap? ( >=net-libs/c-client-2007[ssl=] ) - jabber? ( dev-libs/iksemel ) - newt? ( dev-libs/newt ) - odbc? ( dev-db/unixODBC ) - postgres? ( dev-db/postgresql-base ) - radius? ( net-dialup/radiusclient-ng ) - snmp? ( net-analyzer/net-snmp ) - speex? ( media-libs/speex ) - sqlite? ( dev-db/sqlite ) - ssl? ( dev-libs/openssl ) - vorbis? ( media-libs/libvorbis )" - -DEPEND="${RDEPEND} - !<net-misc/asterisk-addons-1.4 - !>=net-misc/asterisk-addons-1.6 - !net-misc/zaptel" - -PDEPEND="net-misc/asterisk-core-sounds - net-misc/asterisk-extra-sounds - net-misc/asterisk-moh-opsound" - -S="${WORKDIR}/${MY_P}" - -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 - - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" -} - -src_prepare() { - base_src_prepare - AT_M4DIR=autoconf eautoreconf - - # add custom device state function (func_devstate) - # - # http://asterisk.org/node/48360 - # http://svncommunity.digium.com/svn/russell/func_devstate-1.4/README.txt - # - cp "${FILESDIR}"/1.4.0/func_devstate-r6.c "${S}"/funcs/func_devstate.c - - # Add technology-independent volume control function - # - cp "${FILESDIR}"/1.4.0/func_volume.c "${S}"/funcs/func_volume.c - - # Custom menuselect options are defined in this file (it may remain empty) - # - >"${S}"/gentoo.makeopts - - # Enable various debugging options if requested - # - if use debug; then - local debug_opts="DEBUG_CHANNEL_LOCKS DEBUG_THREADS DEBUG_FD_LEAKS" - einfo "Enabling debugging options: ${debug_opts}" - echo "MENUSELECT_CFLAGS=${debug_opts}" >> "${S}"/gentoo.makeopts - fi - - # Enable IMAP storage in app_voicemail if requested - # - use imap && echo "MENUSELECT_OPTS_app_voicemail=IMAP_STORAGE" >> "${S}"/gentoo.makeopts -} - -src_configure() { - if use debug; then - # Tone down the compiler flags somewhat. This should be less aggressive - # than the DONT_OPTIMIZE option whilst still producing useful results. - # - strip-flags - replace-flags -O? -O0 - fi - - if use imap; then - local imap_libs - has_version net-libs/c-client[pam] && imap_libs="-lpam" - has_version net-libs/c-client[ssl] && imap_libs="${imap_libs} -lssl" - export IMAP_LIBS="${imap_libs}" - fi - - econf \ - --libdir="/usr/$(get_libdir)" \ - --localstatedir="/var" \ - --with-gsm=internal \ - --with-ncurses \ - --with-popt \ - --with-z \ - --without-curses \ - --without-h323 \ - --without-nbs \ - --without-osptk \ - --without-pwlib \ - --without-kde \ - --without-usb \ - --without-vpb \ - --without-zaptel \ - $(use_with alsa asound) \ - $(use_with caps cap) \ - $(use_with dahdi pri) \ - $(use_with dahdi tonezone) \ - $(use_with dahdi) \ - $(use_with freetds tds) \ - $(use_with imap imap system) \ - $(use_with jabber iksemel) \ - $(use_with newt) \ - $(use_with odbc) \ - $(use_with oss) \ - $(use_with postgres) \ - $(use_with radius) \ - $(use_with snmp netsnmp) \ - $(use_with speex) \ - $(use_with speex speexdsp) \ - $(use_with sqlite) \ - $(use_with ssl) \ - $(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 USER_MAKEOPTS="${S}"/gentoo.makeopts || 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.4.0/asterisk.initd asterisk - newconfd "${FILESDIR}"/1.4.0/asterisk.confd asterisk - - # 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 - 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" - - insinto /etc/logrotate.d - newins "${FILESDIR}/1.4.0/asterisk.logrotate" asterisk -} - -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 - if has_version "=net-misc/asterisk-1.2*"; then - ewarn "Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 before continuing" - fi -} - -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.0.0/asterisk-1.0.5-uclibc-dns.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-uclibc-dns.diff deleted file mode 100644 index 61dc1261f70c..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-uclibc-dns.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- asterisk-1.0.5/dns.c.orig 2005-02-15 04:32:18.581297392 +0100 -+++ asterisk-1.0.5/dns.c 2005-02-15 04:32:57.583368176 +0100 -@@ -151,7 +151,7 @@ - return 0; - } - --#if defined(res_ninit) -+#if (defined(res_ninit) && !defined(__UCLIBC__)) - #define HAS_RES_NINIT - #else - AST_MUTEX_DEFINE_STATIC(res_lock); diff --git a/net-misc/asterisk/files/1.2.0/asterisk-1.2.1-uclibc-getloadavg.diff b/net-misc/asterisk/files/1.2.0/asterisk-1.2.1-uclibc-getloadavg.diff deleted file mode 100644 index 370ccc970923..000000000000 --- a/net-misc/asterisk/files/1.2.0/asterisk-1.2.1-uclibc-getloadavg.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- asterisk-1.2.1/include/asterisk/compat.h.orig 2005-12-20 23:04:56 +0000 -+++ asterisk-1.2.1/include/asterisk/compat.h 2005-12-20 23:05:19 +0000 -@@ -74,7 +74,7 @@ - #define HAVE_VASPRINTF - #define HAVE_STRTOQ - --#ifdef _BSD_SOURCE -+#if defined(_BSD_SOURCE) && !defined(__UCLIBC__) - #define HAVE_GETLOADAVG - #endif - diff --git a/net-misc/asterisk/files/1.2.0/asterisk-1.2.21.1-h323-dumb-makefile.diff b/net-misc/asterisk/files/1.2.0/asterisk-1.2.21.1-h323-dumb-makefile.diff deleted file mode 100644 index 37c44e6ad188..000000000000 --- a/net-misc/asterisk/files/1.2.0/asterisk-1.2.21.1-h323-dumb-makefile.diff +++ /dev/null @@ -1,36 +0,0 @@ -diff -Nura asterisk-1.2.17/channels/h323/Makefile asterisk-1.2.17.h323/channels/h323/Makefile ---- asterisk-1.2.17/channels/h323/Makefile 2007-03-06 12:17:16.000000000 -0300 -+++ asterisk-1.2.17.h323/channels/h323/Makefile 2007-04-27 16:08:27.481923054 -0300 -@@ -12,15 +12,13 @@ - STDCCFLAGS += -fPIC - #OPTCCFLAGS += - CFLAGS += -pipe -+CXXFLAGS += -I/usr/include/openh323 $(STDCCFLAGS) - TARGET += libchanh323.a - TARGET += Makefile.ast - SOURCES = ast_h323.cxx -+OBJS = ast_h323.o - OBJDIR = . - --ifndef OPENH323DIR --OPENH323DIR=$(HOME)/openh323 --endif -- - clean: - rm -f *.so *.o .depend - -@@ -31,13 +29,12 @@ - touch $(SOURCES) - - libchanh323.a: $(OBJS) -- include $(OPENH323DIR)/openh323u.mak - ar crv $@ $(OBJS) - - Makefile.ast: FORCE - @echo H323CFLAGS = $(STDCCFLAGS) $(OPTCCFLAGS) $(CFLAGS) >$@.tmp - @echo H323LDFLAGS = $(CFLAGS) $(LDFLAGS) >>$@.tmp -- @echo H323LDLIBS = $(LDLIBS) $(ENDLDLIBS) $(ENDLDFLAGS) >>$@.tmp -+ @echo H323LDLIBS = $(LDLIBS) $(ENDLDLIBS) $(ENDLDFLAGS) -lopenh323 -lpt >>$@.tmp - @if [ -r $@ ] && cmp -s $@ $@.tmp; then rm -f $@.tmp; else mv -f $@.tmp $@; fi - - FORCE: diff --git a/net-misc/asterisk/files/1.2.0/asterisk-1.2.31.1-comma-is-not-pipe.diff b/net-misc/asterisk/files/1.2.0/asterisk-1.2.31.1-comma-is-not-pipe.diff deleted file mode 100644 index b07c1fb93bce..000000000000 --- a/net-misc/asterisk/files/1.2.0/asterisk-1.2.31.1-comma-is-not-pipe.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr asterisk-1.2.31.1.ORIG/apps/app_chanspy.c asterisk-1.2.31.1/apps/app_chanspy.c ---- asterisk-1.2.31.1.ORIG/apps/app_chanspy.c 2009-03-11 15:37:50.000000000 +0000 -+++ asterisk-1.2.31.1/apps/app_chanspy.c 2009-03-11 15:38:55.000000000 +0000 -@@ -438,7 +438,7 @@ - if (recbase) { - char filename[512]; - snprintf(filename,sizeof(filename),"%s/%s.%d.raw",ast_config_AST_MONITOR_DIR, recbase, (int)time(NULL)); -- if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC, 0644)) <= 0) { -+ if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644)) <= 0) { - ast_log(LOG_WARNING, "Cannot open %s for recording\n", filename); - fd = 0; - } diff --git a/net-misc/asterisk/files/1.2.0/asterisk-1.2.35-lpc10-prototypes.diff b/net-misc/asterisk/files/1.2.0/asterisk-1.2.35-lpc10-prototypes.diff deleted file mode 100644 index 41d20f085194..000000000000 --- a/net-misc/asterisk/files/1.2.0/asterisk-1.2.35-lpc10-prototypes.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr asterisk-1.2.35.ORIG/codecs/lpc10/Makefile asterisk-1.2.35/codecs/lpc10/Makefile ---- asterisk-1.2.35.ORIG/codecs/lpc10/Makefile 2009-09-04 13:12:03.000000000 +0100 -+++ asterisk-1.2.35/codecs/lpc10/Makefile 2009-09-04 13:15:32.000000000 +0100 -@@ -22,7 +22,7 @@ - # - - WARNINGS = -Wall -Wno-comment -Wno-error --CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -+CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -DP_R_O_T_O_T_Y_P_E_S - ifneq (${OSARCH},CYGWIN) - CFLAGS += -fPIC - endif diff --git a/net-misc/asterisk/files/1.2.0/asterisk-updater b/net-misc/asterisk/files/1.2.0/asterisk-updater deleted file mode 100644 index 273f511375b6..000000000000 --- a/net-misc/asterisk/files/1.2.0/asterisk-updater +++ /dev/null @@ -1,153 +0,0 @@ -#!/bin/bash - -# -# -# -PORTDB_DIR="$(portageq vdb_path)" -PRETEND=0 -UPDATE=0 - -# -# -# -modules_list="" -ebuild_list="" - -pkgname() { - echo "${1%-[0-9.]*}" -} - -pkgver() { - echo "${1##$(pkgname "$1")-}" -} - -for x in $@; do - case ${x} in - *help|*h) - echo "Usage: $0 [EMERGE_OPTIONS|--help|-h]" - exit 0 - ;; - *pretend|*p) - PRETEND=1 - ;; - *update|*u) - UPDATE=1 - ;; - esac -done - -# strip --update and -u from emerge options (breaks re-emerging) -EMERGE_OPTS="$(echo $@ | sed -e "s:--update\|-u::")" - -echo ">>> Scanning modules in /usr/lib/asterisk/modules..." - -# create list of modules -for x in $(ls -1 /usr/lib/asterisk/modules/*.so); do - - if $(readelf -s "${x}" | grep -q "\(ast_load\|ast_save\|ast_destroy\|ast_pthread_create\|ast_strcasestr\)$"); then - modules_list="${modules_list} $(basename ${x})" - fi -done - -if [[ -n "${modules_list}" ]]; then - echo ">>> Module(s) need to be updated, creating list..." - - # - # grab initial list of ebuilds - # - for x in ${modules_list}; do - package="$(grep -l "${x}" "${PORTDB_DIR}"/net-misc/*/CONTENTS | head -n 1 | sed -e "s:${PORTDB_DIR}/::" -e "s:/CONTENTS::")" - - [[ -n "${package}" ]] && \ - ebuild_list="${ebuild_list} ${package}" - done - - echo - echo ">>> Checking packages..." - - tmp_list="" - fail_list="" - for x in ${ebuild_list}; do - # strip version from package - pkgname="${x%-[0-9.]*}" - - if [[ $UPDATE -eq 0 ]]; then - # try to emerge same version - if ! emerge -pq "=${x}" &>/dev/null; then - if ! emerge -pq ">${x}" &>/dev/null; then - - # ebuild is gone - fail_list="${fail_list} ${x}" - else - - # ebuild is available in a newer version, - # add it to the update list - update_list="${update_list} ${x}" - fi - else - tmp_list="${tmp_list} =${x}" - fi - else - # try to update ebuild - if ! emerge -pq ">=${x}" &>/dev/null; then - if ! emerge -pq ">${x}" &>/dev/null; then - - # ebuild is gone - fail_list="${fail_list} ${x}" - fi - else - tmp_list="${tmp_list} >=${x}" - fi - fi - done - - echo - - if [[ -n "${fail_list}" ]]; then - echo - echo "!!! The following ebuild(s) need to be updated manually:" - for x in ${fail_list}; do - echo " $(pkgname "${x}")" - done - echo - fi - - if [[ $UPDATE -eq 0 ]] && [[ -n "${update_list}" ]] - then - # display list of packages and ask user what to do - echo "!!! The following ebuilds are only available in newer versions:" - echo - for x in ${update_list}; do - echo " $(pkgname "${x}")" - done - echo - echo -n "--- Do you want to update them (y/N)? " - read tmp - - tmp="$(echo "${tmp}" | tr "[[:upper:]]" "[[:lower:]]")" - if [[ "${tmp}" != "y" ]]; then - echo ">>> NOT updating ebuilds" - unset update_list - fi - fi - - if [[ -n "${update_list}" ]]; then - # simply copy update list to merge list - echo ">>> Adding list of ebuilds to update..." - for x in ${update_list}; do - tmp_list="${tmp_list} $(pkgname "${x}")" - done - fi - - if [[ -n "${tmp_list}" ]]; then - echo ">>> Feeding list of ebuilds to emerge ${EMERGE_OPTS}..." - emerge ${tmp_list} ${EMERGE_OPTS} - else - echo -e "*** Nothing to emerge..." - fi -else - echo "*** No asterisk-1.0.x modules found!" -fi - -echo -exit 0 diff --git a/net-misc/asterisk/files/1.2.0/asterisk.confd b/net-misc/asterisk/files/1.2.0/asterisk.confd deleted file mode 100644 index c25ee0050ff9..000000000000 --- a/net-misc/asterisk/files/1.2.0/asterisk.confd +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.2.0/asterisk.confd,v 1.1 2006/04/16 01:04:44 stkn Exp $ - -# -# Additional options for asterisk -# -# see "asterisk -h" for a list of options -# -ASTERISK_OPTS="" - -# -# User and group to run asterisk as -# -# Value: double-colon separated list of user and group, or empty to run as root: -# -# -# "asterisk:asterisk" to run as user "asterisk" and group "asterisk" -# -# "asterisk" to run as user "asterisk" and all groups that user "asterisk" is a member of -# -# ":asterisk" to run as user "root" and group "asterisk" -# -# "" to run as user "root" and group "root" -# -ASTERISK_USER="asterisk" - -# -# Nicelevel -# -# Set the priority of the asterisk process -# -# Value: (highest) -20..19 (lowest) -# -#ASTERISK_NICE="19" - -# -# Wrapper script -# -# Value: yes or no/empty -# -ASTERISK_WRAPPER="no" - -############# Wrapper script settings ############# - -# -# Send crash notifications emails to this address -# (needs a working mail service and /usr/sbin/sendmail to do so (e.g. ssmtp)) -# -# Value: Email address or empty to disable -# -#ASTERISK_NOTIFY_EMAIL="root" - -# -# Send asterisk's output to this terminal -# -# Value: Full path to device node or a number -# -#ASTERISK_TTY="/dev/tty9" - -# -# Start an asterisk console on the terminal specified by ASTERISK_TTY -# -# Warning! Use only for debugging, this is a potential security issue! -# -# Value: yes or no/empty -# -ASTERISK_CONSOLE="no" - -# -# Maximum size of core files. -# -# Value: Size in bytes, unlimited for no limit or empty to disable. -# -#ASTERISK_CORE_SIZE="unlimited" - -# -# ASTERISK_CORE_DIR -# -# Value: Directory (will be created if non-existant), default is /tmp -# -ASTERISK_CORE_DIR="/var/lib/asterisk/coredump" - -# -# Max number of filedescriptors -# -# Value: Number of descriptors -# -#ASTERISK_MAX_FD="1024" - -# -# Kill these tasks after asterisk crashed (ASTERISK_WRAPPER=yes only!) -# -# Warning! This will kill _ALL_ tasks with the specified names! -# -# Value: Space separated list of names in double quotes (e.g. "mpg123 mad") -# -#ASTERISK_CLEANUP_ON_CRASH="mpg123 asterisk-mpg123 mad" diff --git a/net-misc/asterisk/files/1.2.0/asterisk.rc6 b/net-misc/asterisk/files/1.2.0/asterisk.rc6 deleted file mode 100755 index af388015bb92..000000000000 --- a/net-misc/asterisk/files/1.2.0/asterisk.rc6 +++ /dev/null @@ -1,253 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.2.0/asterisk.rc6,v 1.5 2007/04/19 19:46:16 gustavoz Exp $ - -opts="${opts} forcestop reload" - -depend() { - need net - use nscd dns zaptel mysql postgresql slapd capi -} - -is_running() { - if [ -z "$(pidof asterisk)" ]; then - return 1 - else - PID="$(cat /var/run/asterisk/asterisk.pid)" - for x in $(pidof asterisk); do - if [ "${x}" = "${PID}" ]; then - return 0 - fi - done - fi - - return 1 -} - -asterisk_run_loop() { - local OPTS ARGS MSG NICE="" - local result=0 signal=0 - - # default options - OPTS="-f" # don't fork / detach breaks wrapper script... - - # filter (redundant) arguments - ARGS="$(echo "${@}" | sed -e "s:-c\|-f::g")" - - # mangle yes/no options - ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')" - - if [ -n "${ASTERISK_CORE_SIZE}" ] && - [ "${ASTERISK_CORE_SIZE}" != "0" ]; then - ulimit -c ${ASTERISK_CORE_SIZE} - - if [ -n "${ASTERISK_CORE_DIR}" ] && \ - [ ! -d "${ASTERISK_CORE_DIR}" ] - then - mkdir -m750 -p "${ASTERISK_CORE_DIR}" - - if [ -n "${ASTERISK_USER}" ]; then - chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}" - fi - fi - ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}" - - cd "${ASTERISK_CORE_DIR}" - echo " Core dump size : ${ASTERISK_CORE_SIZE}" - echo " Core dump location : ${ASTERISK_CORE_DIR}" - fi - - if [ -n "${ASTERISK_MAX_FD}" ]; then - ulimit -n ${ASTERISK_MAX_FD} - echo " Max open filedescriptors : ${ASTERISK_MAX_FD}" - fi - - if [ -n "${ASTERISK_NICE}" ]; then - echo " Nice level : ${ASTERISK_NICE}" - NICE="nice -n ${ASTERISK_NICE} --" - fi - - if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then - if [ -x /usr/sbin/sendmail ]; then - echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}" - else - echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!" - unset ASTERISK_NOTIFY_EMAIL - fi - fi - - if [ -n "${ASTERISK_TTY}" ]; then - for x in ${ASTERISK_TTY} \ - /dev/tty${ASTERISK_TTY} \ - /dev/vc/${ASTERISK_TTY} - do - if [ -c "${x}" ]; then - TTY="${x}" - fi - done - [ -n "${TTY}" ] && \ - echo " Messages are sent to : ${TTY}" - fi - - if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then - echo " Starting Asterisk console : ${ASTERISK_CONSOLE}" - OPTS="${OPTS} -c" - fi - - OPTS="${OPTS} ${ARGS}" - - while :; do - - if [ -n "${TTY}" ]; then - /usr/bin/stty -F ${TTY} sane - ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY} - result=$? - else - ${NICE} /usr/sbin/asterisk ${OPTS} &>/dev/null - result=$? - fi - - if [ $result -eq 0 ]; then - echo "Asterisk terminated normally" - break - else - if [ $result -gt 128 ]; then - signal=$((result - 128)) - MSG="Asterisk terminated with Signal: $signal" - - CORE_TARGET="core-$(date "+%Y%m%d-%h%M%s")" - - local CORE_DUMPED=0 - if [ -f "${ASTERISK_CORE_DIR}/core" ]; then - mv "${ASTERISK_CORE_DIR}/core" \ - "${ASTERISK_CORE_DIR}/${CORE_TARGET}" - CORE_DUMPED=1 - - elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then - mv "${ASTERISK_CORE_DIR}/core.${PID}" \ - "${ASTERISK_CORE_DIR}/${CORE_TARGET}" - CORE_DUMPED=1 - - fi - - [ $CORE_DUMPED -eq 1 ] && \ - MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}" - else - MSG="Asterisk terminated with return code: $result" - fi - - # kill left-over tasks - for X in ${ASTERISK_CLEANUP_ON_CRASH}; do - kill -9 $(pidof ${X}); - done - fi - - [ -n "${TTY}" ] \ - && echo "${MSG}" >${TTY} \ - || echo "${MSG}" - - - if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \ - [ -x /usr/sbin/sendmail ]; then - echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\ - /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}" - fi - sleep 5 - echo "Restarting Asterisk..." - done - return 0 -} - -start() { - local OPTS USER GROUP PID - local tmp x - - if [ -n "${ASTERISK_NICE}" ]; then - if [ ${ASTERISK_NICE} -ge -20 ] && \ - [ ${ASTERISK_NICE} -le 19 ]; then - OPTS="--nicelevel ${ASTERISK_NICE}" - else - eerror "Nice value must be between -20 and 19" - return 1 - fi - fi - - if [ -n "${ASTERISK_USER}" ]; then - USER=$(echo $ASTERISK_USER | sed 's/:.*//') - GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }') - if [ -n "${USER}" ]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}" - fi - if [ -n "${GROUP}" ]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}" - GROUP=":${GROUP}" # make it look nice... - fi - ebegin "Starting asterisk PBX (as ${USER}${GROUP})" - else - ebegin "Starting asterisk PBX (as root)" - fi - - if [ "$(echo ${ASTERISK_WRAPPER} | tr '[:upper:]' '[:lower:]')" != "yes" ]; then - start-stop-daemon --start --exec /usr/sbin/asterisk \ - ${OPTS} -- ${ASTERISK_OPTS} - result=$? - else - asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null & - result=$? - fi - - if [ $result -eq 0 ]; then - # 2 seconds should be enough for asterisk to start - sleep 2 - is_running - result=$? - fi - - eend $result -} - -forcestop() { - ebegin "Stopping asterisk PBX" - start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid - eend $? -} - -stop() { - if ! is_running; then - eerror "Asterisk is not running!" - return 0 - fi - - ebegin "Stopping asterisk PBX gracefully" - /usr/sbin/asterisk -r -x "stop gracefully" &>/dev/null - # Now we have to wait until asterisk has _really_ stopped. - sleep 1 - if is_running; then - einfon "Waiting for asterisk to shutdown ." - local cnt=0 - while is_running; do - cnt=`expr $cnt + 1` - if [ $cnt -gt 60 ] ; then - # Waited 120 seconds now. Fail. - echo - eend 1 "Failed." - return - fi - sleep 2 - echo -n "." - done - echo - fi - eend 0 -} - -reload() { - if is_running; then - ebegin "Forcing asterisk to reload configuration" - /usr/sbin/asterisk -r -x "reload" &>/dev/null - eend $? - else - eerror "Asterisk is not running!" - fi -} diff --git a/net-misc/asterisk/files/1.4.0/asterisk.confd b/net-misc/asterisk/files/1.4.0/asterisk.confd deleted file mode 100644 index 4a4ef3f554ce..000000000000 --- a/net-misc/asterisk/files/1.4.0/asterisk.confd +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.4.0/asterisk.confd,v 1.1 2010/12/01 17:54:28 chainsaw Exp $ - -# -# Additional options for asterisk -# -# see "asterisk -h" for a list of options -# -ASTERISK_OPTS="" - -# -# User and group to run asterisk as -# -# Value: double-colon separated list of user and group, or empty to run as root: -# -# -# "asterisk:asterisk" to run as user "asterisk" and group "asterisk" -# -# "asterisk" to run as user "asterisk" and all groups that user "asterisk" is a member of -# -# ":asterisk" to run as user "root" and group "asterisk" -# -# "" to run as user "root" and group "root" -# -ASTERISK_USER="asterisk" - -# -# Nicelevel -# -# Set the priority of the asterisk process -# -# Value: (highest) -20..19 (lowest) -# -#ASTERISK_NICE="19" - -# -# Wrapper script -# -# Value: yes or no/empty -# -ASTERISK_WRAPPER="no" - -############# Wrapper script settings ############# - -# -# Send crash notifications emails to this address -# (needs a working mail service and /usr/sbin/sendmail to do so (e.g. ssmtp)) -# -# Value: Email address or empty to disable -# -#ASTERISK_NOTIFY_EMAIL="root" - -# -# Send asterisk's output to this terminal -# -# Value: Full path to device node or a number -# -#ASTERISK_TTY="/dev/tty9" - -# -# Start an asterisk console on the terminal specified by ASTERISK_TTY -# -# Warning! Use only for debugging, this is a potential security issue! -# -# Value: yes or no/empty -# -ASTERISK_CONSOLE="no" - -# -# Maximum size of core files. -# -# Value: Size in bytes, unlimited for no limit or empty to disable. -# -#ASTERISK_CORE_SIZE="unlimited" - -# -# ASTERISK_CORE_DIR -# -# Value: Directory (will be created if non-existant), default is /tmp -# -ASTERISK_CORE_DIR="/var/lib/asterisk/coredump" - -# -# Max number of filedescriptors -# -# Value: Number of descriptors -# -#ASTERISK_MAX_FD="1024" - -# -# Kill these tasks after asterisk crashed (ASTERISK_WRAPPER=yes only!) -# -# Warning! This will kill _ALL_ tasks with the specified names! -# -# Value: Space separated list of names in double quotes (e.g. "mpg123 mad") -# -#ASTERISK_CLEANUP_ON_CRASH="mpg123 asterisk-mpg123 mad" diff --git a/net-misc/asterisk/files/1.4.0/asterisk.initd b/net-misc/asterisk/files/1.4.0/asterisk.initd deleted file mode 100644 index ab1f017ef362..000000000000 --- a/net-misc/asterisk/files/1.4.0/asterisk.initd +++ /dev/null @@ -1,273 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.4.0/asterisk.initd,v 1.1 2010/12/01 17:54:28 chainsaw Exp $ - -opts="${opts} forcestop reload" - -depend() { - need net - use nscd dns dahdi mysql postgresql slapd capi -} - -is_running() { - if [ -z "`pidof asterisk`" ]; then - return 1 - else - PID="`cat /var/run/asterisk/asterisk.pid`" - for x in `pidof asterisk`; do - if [ "${x}" = "${PID}" ]; then - return 0 - fi - done - fi - - return 1 -} - -asterisk_run_loop() { - logger -t asterisk_wrapper "Initializing asterisk wrapper" - - local OPTS ARGS MSG NICE="" - local result=0 signal=0 - - # default options - OPTS="-f" # don't fork / detach breaks wrapper script... - - # filter (redundant) arguments - ARGS="`echo "${@}" | sed -e "s:-c\|-f::g"`" - - # mangle yes/no options - ASTERISK_CONSOLE="`echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]'`" - - if [ -n "${ASTERISK_CORE_SIZE}" ] && - [ "${ASTERISK_CORE_SIZE}" != "0" ]; then - ulimit -c ${ASTERISK_CORE_SIZE} - - if [ -n "${ASTERISK_CORE_DIR}" ] && \ - [ ! -d "${ASTERISK_CORE_DIR}" ] - then - mkdir -m750 -p "${ASTERISK_CORE_DIR}" - - if [ -n "${ASTERISK_USER}" ]; then - chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}" - fi - fi - ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}" - - cd "${ASTERISK_CORE_DIR}" - echo " Core dump size : ${ASTERISK_CORE_SIZE}" - echo " Core dump location : ${ASTERISK_CORE_DIR}" - fi - - if [ -n "${ASTERISK_MAX_FD}" ]; then - ulimit -n ${ASTERISK_MAX_FD} - echo " Max open filedescriptors : ${ASTERISK_MAX_FD}" - fi - - if [ -n "${ASTERISK_NICE}" ]; then - echo " Nice level : ${ASTERISK_NICE}" - NICE="nice -n ${ASTERISK_NICE} --" - fi - - if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then - if [ -x /usr/sbin/sendmail ]; then - echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}" - else - echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!" - unset ASTERISK_NOTIFY_EMAIL - fi - fi - - if [ -n "${ASTERISK_TTY}" ]; then - for x in ${ASTERISK_TTY} \ - /dev/tty${ASTERISK_TTY} \ - /dev/vc/${ASTERISK_TTY} - do - if [ -c "${x}" ]; then - TTY="${x}" - fi - done - [ -n "${TTY}" ] && \ - echo " Messages are sent to : ${TTY}" - fi - - if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then - echo " Starting Asterisk console : ${ASTERISK_CONSOLE}" - OPTS="${OPTS} -c" - fi - - OPTS="${OPTS} ${ARGS}" - - trap "rm /var/run/asterisk/wrapper_loop.pid" EXIT - cut -f4 -d' ' < /proc/self/stat > /var/run/asterisk/wrapper_loop.pid - - while :; do - if [ -n "${TTY}" ]; then - /usr/bin/stty -F ${TTY} sane - ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY} - result=$? - else - set -o pipefail - ${NICE} /usr/sbin/asterisk ${OPTS} 2>&1 >/dev/null | logger -t asterisk_wrapper - result=$? - set +o pipefail - fi - - if [ $result -eq 0 ]; then - logger -t asterisk_wrapper "Asterisk terminated normally" - break - else - if [ $result -gt 128 ]; then - signal=`expr $signal - 128` - MSG="Asterisk terminated with Signal: $signal" - - CORE_TARGET="core-`date +%Y%m%d-%H%M%S`" - - local CORE_DUMPED=0 - if [ -f "${ASTERISK_CORE_DIR}/core" ]; then - mv "${ASTERISK_CORE_DIR}/core" \ - "${ASTERISK_CORE_DIR}/${CORE_TARGET}" - CORE_DUMPED=1 - - elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then - mv "${ASTERISK_CORE_DIR}/core.${PID}" \ - "${ASTERISK_CORE_DIR}/${CORE_TARGET}" - CORE_DUMPED=1 - - fi - - [ $CORE_DUMPED -eq 1 ] && \ - MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}" - else - MSG="Asterisk terminated with return code: $result" - fi - - # kill left-over tasks - for X in ${ASTERISK_CLEANUP_ON_CRASH}; do - kill -9 `pidof ${X}`; - done - fi - - [ -n "${TTY}" ] \ - && echo "${MSG}" >${TTY} \ - || logger -t asterisk_wrapper "${MSG}" - - - if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \ - [ -x /usr/sbin/sendmail ]; then - echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\ - /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}" - fi - sleep 5 - logger -t asterisk_wrapper "Restarting Asterisk..." - done - return 0 -} - -start() { - local OPTS USER GROUP PID - local tmp x - - if [ -n "${ASTERISK_NICE}" ]; then - if [ ${ASTERISK_NICE} -ge -20 ] && \ - [ ${ASTERISK_NICE} -le 19 ]; then - OPTS="--nicelevel ${ASTERISK_NICE}" - else - eerror "Nice value must be between -20 and 19" - return 1 - fi - fi - - if [ -n "${ASTERISK_USER}" ]; then - USER=`echo $ASTERISK_USER | sed 's/:.*//'` - GROUP=`echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }'` - if [ -n "${USER}" ]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}" - fi - if [ -n "${GROUP}" ]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}" - GROUP=":${GROUP}" # make it look nice... - fi - for element in `find /var/{log,run}/asterisk`; do - if [ `stat -c %U $element` != "${USER}" ]; then - ewarn "${USER} is not the owner of $element, fixing." - chown -R ${USER} /var/{log,run}/asterisk - chmod -R u+r /var/{log,run}/asterisk - chmod u+x /var/{log,run}/asterisk - fi; - done; - ebegin "Starting asterisk PBX (as ${USER}${GROUP})" - else - ebegin "Starting asterisk PBX (as root)" - fi - - if [ "`echo ${ASTERISK_WRAPPER} | tr '[:upper:]' '[:lower:]'`" != "yes" ]; then - start-stop-daemon --start --exec /usr/sbin/asterisk \ - ${OPTS} -- ${ASTERISK_OPTS} - result=$? - else - asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null & - result=$? - fi - - if [ $result -eq 0 ]; then - # 2 seconds should be enough for asterisk to start - sleep 2 - is_running - result=$? - fi - - eend $result -} - -forcestop() { - ebegin "Stopping asterisk PBX" - start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid - eend $? -} - -stop() { - if ! is_running; then - eerror "Asterisk is not running!" - return 0 - fi - - if [ -r /var/run/asterisk/wrapper_loop.pid ]; then - ebegin "Killing wrapper script" - kill `cat /var/run/asterisk/wrapper_loop.pid` - eend $? - fi - - ebegin "Stopping asterisk PBX gracefully" - /usr/sbin/asterisk -r -x "stop gracefully" &>/dev/null - # Now we have to wait until asterisk has _really_ stopped. - sleep 1 - if is_running; then - einfon "Waiting for asterisk to shutdown ." - local cnt=0 - while is_running; do - cnt=`expr $cnt + 1` - if [ $cnt -gt 60 ] ; then - # Waited 120 seconds now. Fail. - echo - eend 1 "Failed." - return - fi - sleep 2 - echo -n "." - done - echo - fi - eend 0 -} - -reload() { - if is_running; then - ebegin "Forcing asterisk to reload configuration" - /usr/sbin/asterisk -r -x "reload" &>/dev/null - eend $? - else - eerror "Asterisk is not running!" - fi -} diff --git a/net-misc/asterisk/files/1.4.0/asterisk.logrotate b/net-misc/asterisk/files/1.4.0/asterisk.logrotate deleted file mode 100644 index 69296c99e66d..000000000000 --- a/net-misc/asterisk/files/1.4.0/asterisk.logrotate +++ /dev/null @@ -1,25 +0,0 @@ -/var/log/asterisk/messages /var/log/asterisk/queue_log { - missingok - notifempty - - postrotate - /usr/sbin/asterisk -rnx "logger reload" || /bin/true - endscript -} - -/var/log/asterisk/debug /var/log/asterisk/full { - missingok - notifempty - daily - - postrotate - /usr/sbin/asterisk -rnx "logger reload" || /bin/true - endscript -} - -/var/log/asterisk/cdr-csv/*.csv /var/log/asterisk/cdr-custom/*.csv { - missingok - notifempty - weekly - rotate 52 -} diff --git a/net-misc/asterisk/files/1.4.0/func_devstate-r6.c b/net-misc/asterisk/files/1.4.0/func_devstate-r6.c deleted file mode 100644 index bee18aa0eea5..000000000000 --- a/net-misc/asterisk/files/1.4.0/func_devstate-r6.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2007, Digium, Inc. - * - * Russell Bryant <russell@digium.com> - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ - -/*! \file - * - * \brief Manually controlled blinky lights - * - * \author Russell Bryant <russell@digium.com> - * - * \ingroup functions - * - * \note Props go out to Ahrimanes in #asterisk for requesting this at 4:30 AM - * when I couldn't sleep. :) - */ - -#include "asterisk.h" - -ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.1 $") - -#include <stdlib.h> - -#include "asterisk/module.h" -#include "asterisk/channel.h" -#include "asterisk/pbx.h" -#include "asterisk/utils.h" -#include "asterisk/linkedlists.h" -#include "asterisk/devicestate.h" -#include "asterisk/cli.h" -#include "asterisk/astdb.h" - -static const char astdb_family[] = "CustomDevstate"; - -static const char *ast_devstate_str(int state) -{ - const char *res = "UNKNOWN"; - - switch (state) { - case AST_DEVICE_UNKNOWN: - break; - case AST_DEVICE_NOT_INUSE: - res = "NOT_INUSE"; - break; - case AST_DEVICE_INUSE: - res = "INUSE"; - break; - case AST_DEVICE_BUSY: - res = "BUSY"; - break; - case AST_DEVICE_INVALID: - res = "INVALID"; - break; - case AST_DEVICE_UNAVAILABLE: - res = "UNAVAILABLE"; - break; - case AST_DEVICE_RINGING: - res = "RINGING"; - break; - case AST_DEVICE_RINGINUSE: - res = "RINGINUSE"; - break; - case AST_DEVICE_ONHOLD: - res = "ONHOLD"; - break; - } - - return res; -} - -static int ast_devstate_val(const char *val) -{ - if (!strcasecmp(val, "NOT_INUSE")) - return AST_DEVICE_NOT_INUSE; - else if (!strcasecmp(val, "INUSE")) - return AST_DEVICE_INUSE; - else if (!strcasecmp(val, "BUSY")) - return AST_DEVICE_BUSY; - else if (!strcasecmp(val, "INVALID")) - return AST_DEVICE_INVALID; - else if (!strcasecmp(val, "UNAVAILABLE")) - return AST_DEVICE_UNAVAILABLE; - else if (!strcasecmp(val, "RINGING")) - return AST_DEVICE_RINGING; - else if (!strcasecmp(val, "RINGINUSE")) - return AST_DEVICE_RINGINUSE; - else if (!strcasecmp(val, "ONHOLD")) - return AST_DEVICE_ONHOLD; - - return AST_DEVICE_UNKNOWN; -} - -static int devstate_read(struct ast_channel *chan, char *cmd, char *data, - char *buf, size_t len) -{ - ast_copy_string(buf, ast_devstate_str(ast_device_state(data)), len); - - return 0; -} - -static int devstate_write(struct ast_channel *chan, char *function, - char *data, const char *value) -{ - size_t len = strlen("Custom:"); - - if (strncasecmp(data, "Custom:", len)) { - ast_log(LOG_WARNING, "The DEVSTATE function can only be used to set 'Custom:' device state!\n"); - return -1; - } - data += len; - if (ast_strlen_zero(data)) { - ast_log(LOG_WARNING, "DEVSTATE function called with no custom device name!\n"); - return -1; - } - - ast_db_put(astdb_family, data, (char *) value); - - ast_device_state_changed("Custom:%s", data); - - return 0; -} - -static int custom_devstate_callback(const char *data) -{ - char buf[256] = ""; - - ast_db_get(astdb_family, data, buf, sizeof(buf)); - - return ast_devstate_val(buf); -} - -static int cli_funcdevstate_list(int fd, int argc, char *argv[]) -{ - struct ast_db_entry *db_entry, *db_tree; - - if (argc != 2) - return RESULT_SHOWUSAGE; - - ast_cli(fd, "\n" - "---------------------------------------------------------------------\n" - "--- Custom Device States --------------------------------------------\n" - "---------------------------------------------------------------------\n" - "---\n"); - - db_entry = db_tree = ast_db_gettree(astdb_family, NULL); - for (; db_entry; db_entry = db_entry->next) { - const char *dev_name = strrchr(db_entry->key, '/') + 1; - if (dev_name <= (const char *) 1) - continue; - ast_cli(fd, "--- name: 'custom:%s' state: '%s'\n" - "---\n", dev_name, db_entry->data); - } - ast_db_freetree(db_tree); - db_tree = NULL; - - ast_cli(fd, - "---------------------------------------------------------------------\n" - "---------------------------------------------------------------------\n" - "\n"); - - return RESULT_SUCCESS; -} - -static struct ast_cli_entry cli_funcdevstate[] = { - { { "funcdevstate", "list", }, cli_funcdevstate_list, NULL, NULL }, -}; - -static struct ast_custom_function devstate_function = { - .name = "DEVSTATE", - .synopsis = "Get or Set a device state", - .syntax = "DEVSTATE(device)", - .desc = - " The DEVSTATE function can be used to retrieve the device state from any\n" - "device state provider. For example:\n" - " NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)})\n" - " NoOp(Conference number 1234 has state ${DEVSTATE(MeetMe:1234)})\n" - "\n" - " The DEVSTATE function can also be used to set custom device state from\n" - "the dialplan. The \"Custom:\" prefix must be used. For example:\n" - " Set(DEVSTATE(Custom:lamp1)=BUSY)\n" - " Set(DEVSTATE(Custom:lamp2)=NOT_INUSE)\n" - "You can subscribe to the status of a custom device state using a hint in\n" - "the dialplan:\n" - " exten => 1234,hint,Custom:lamp1\n" - "\n" - " The possible values for both uses of this function are:\n" - "UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING\n" - "RINGINUSE | ONHOLD\n", - .read = devstate_read, - .write = devstate_write, -}; - -static int unload_module(void) -{ - int res = 0; - - res |= ast_custom_function_unregister(&devstate_function); - ast_devstate_prov_del("Custom"); - ast_cli_unregister_multiple(cli_funcdevstate, ARRAY_LEN(cli_funcdevstate)); - - return res; -} - -static int load_module(void) -{ - int res = 0; - - res |= ast_custom_function_register(&devstate_function); - res |= ast_devstate_prov_add("Custom", custom_devstate_callback); - ast_cli_register_multiple(cli_funcdevstate, ARRAY_LEN(cli_funcdevstate)); - - return res; -} - -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Gets or sets a device state in the dialplan"); diff --git a/net-misc/asterisk/files/1.4.0/func_volume.c b/net-misc/asterisk/files/1.4.0/func_volume.c deleted file mode 100644 index 4591e62f24e5..000000000000 --- a/net-misc/asterisk/files/1.4.0/func_volume.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2007, Digium, Inc. - * - * Joshua Colp <jcolp@digium.com> - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ - -/*! \file - * - * \brief Technology independent volume control - * - * \author Joshua Colp <jcolp@digium.com> - * - * \ingroup functions - * - */ - -#include "asterisk.h" - -ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.1 $") - -#include "asterisk/module.h" -#include "asterisk/channel.h" -#include "asterisk/pbx.h" -#include "asterisk/utils.h" -#include "asterisk/audiohook.h" - -struct volume_information { - struct ast_audiohook audiohook; - int tx_gain; - int rx_gain; -}; - -static void destroy_callback(void *data) -{ - struct volume_information *vi = data; - - /* Destroy the audiohook, and destroy ourselves */ - ast_audiohook_destroy(&vi->audiohook); - free(vi); - - return; -} - -/*! \brief Static structure for datastore information */ -static const struct ast_datastore_info volume_datastore = { - .type = "volume", - .destroy = destroy_callback -}; - -static int volume_callback(struct ast_audiohook *audiohook, struct ast_channel *chan, struct ast_frame *frame, enum ast_audiohook_direction direction) -{ - struct ast_datastore *datastore = NULL; - struct volume_information *vi = NULL; - int *gain = NULL; - - /* If the audiohook is stopping it means the channel is shutting down.... but we let the datastore destroy take care of it */ - if (audiohook->status == AST_AUDIOHOOK_STATUS_DONE) - return 0; - - /* Grab datastore which contains our gain information */ - if (!(datastore = ast_channel_datastore_find(chan, &volume_datastore, NULL))) - return 0; - - vi = datastore->data; - - /* If this is DTMF then allow them to increase/decrease the gains */ - if (frame->frametype == AST_FRAME_DTMF) { - /* Only use DTMF coming from the source... not going to it */ - if (direction != AST_AUDIOHOOK_DIRECTION_READ) - return 0; - if (frame->subclass == '*') { - vi->tx_gain += 1; - vi->rx_gain += 1; - } else if (frame->subclass == '#') { - vi->tx_gain -= 1; - vi->rx_gain -= 1; - } - } else if (frame->frametype == AST_FRAME_VOICE) { - /* Based on direction of frame grab the gain, and confirm it is applicable */ - if (!(gain = (direction == AST_AUDIOHOOK_DIRECTION_READ) ? &vi->rx_gain : &vi->tx_gain) || !*gain) - return 0; - /* Apply gain to frame... easy as pi */ - ast_frame_adjust_volume(frame, *gain); - } - - return 0; -} - -static int volume_write(struct ast_channel *chan, char *cmd, char *data, const char *value) -{ - struct ast_datastore *datastore = NULL; - struct volume_information *vi = NULL; - int is_new = 0; - - if (!(datastore = ast_channel_datastore_find(chan, &volume_datastore, NULL))) { - /* Allocate a new datastore to hold the reference to this volume and audiohook information */ - if (!(datastore = ast_channel_datastore_alloc(&volume_datastore, NULL))) - return 0; - if (!(vi = ast_calloc(1, sizeof(*vi)))) { - ast_channel_datastore_free(datastore); - return 0; - } - ast_audiohook_init(&vi->audiohook, AST_AUDIOHOOK_TYPE_MANIPULATE, "Volume"); - vi->audiohook.manipulate_callback = volume_callback; - ast_set_flag(&vi->audiohook, AST_AUDIOHOOK_WANTS_DTMF); - is_new = 1; - } else { - vi = datastore->data; - } - - /* Adjust gain on volume information structure */ - if (!strcasecmp(data, "tx")) - vi->tx_gain = atoi(value); - else if (!strcasecmp(data, "rx")) - vi->rx_gain = atoi(value); - - if (is_new) { - datastore->data = vi; - ast_channel_datastore_add(chan, datastore); - ast_audiohook_attach(chan, &vi->audiohook); - } - - return 0; -} - -static struct ast_custom_function volume_function = { - .name = "VOLUME", - .synopsis = "Set the TX or RX volume of a channel", - .syntax = "VOLUME(TX|RX)", - .desc = - " The VOLUME function can be used to increase or decrease the tx or\n" - "rx gain of any channel. For example:\n" - " Set(VOLUME(TX)=3)\n" - " Set(VOLUME(RX)=2)\n", - .write = volume_write, -}; - -static int unload_module(void) -{ - return ast_custom_function_unregister(&volume_function); -} - -static int load_module(void) -{ - return ast_custom_function_register(&volume_function); -} - -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Technology independent volume control"); diff --git a/net-misc/asterisk/metadata.xml b/net-misc/asterisk/metadata.xml index 557d1402f823..cec0ee5e2b13 100644 --- a/net-misc/asterisk/metadata.xml +++ b/net-misc/asterisk/metadata.xml @@ -7,11 +7,6 @@ <name>Tony Vroon</name> </maintainer> <use> - <flag name="pri">Enables pri support</flag> - <flag name="zaptel">Enables deprecated zaptel support (use dahdi if available)</flag> - <flag name="lowmem">Build Asterisk for environments with low amounts of memory (embedded devices)</flag> - <flag name="nosamples">Don't install sample sound and configuration files</flag> - <flag name="osp">Enable support for the Open Settlement Protocol</flag> <flag name="misdn">Build with mISDN (chan_misdn) support for BRI ISDN cards</flag> <flag name="newt">Include additional tools that require redhats windowing toolkit</flag> <flag name="dahdi">Support Digium compatible hardware (formerly known as Zaptel).</flag> |