debian/0000775000000000000000000000000012256215452007174 5ustar debian/rules0000775000000000000000000001703212254353232010254 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_HARDENING=1 # Necessary to pass hardening flags to menuselect. # export CFLAGS LDFLAGS BUILD_CFLAGS BUILD_LDFLAGS # Starting with dpkg-dev >= 1.16.1.1 you can use the new buildflags.mk file # to set all *FLAGS # When building programs that handle untrusted data # (parsers, network listeners, etc.), # or run with elevated privileges (PAM, X, etc.), # please enable "PIE" and "BINDNOW" in the build. # The "all" option enables "PIE" and "BINDNOW" and future hardening flags %: dh "$@" --with autotools_dev,autoreconf #export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += --build $(DEB_HOST_GNU_TYPE) else confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif # We copy around a number of things in case we're linux: BUILD_OS=$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) export PROC := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) BUILDFLAGS += OPTIMIZE=-O0 else BUILDFLAGS += OPTIMIZE=-O2 endif BUILDFLAGS += MAKECMDGOALS=dont-optimize # show full gcc arguments instead of [CC] and [LD] BUILDFLAGS += NOISY_BUILD=yes BUILDFLAGS += ASTDATADIR=/usr/share/asterisk ASTVARRUNDIR=/var/run/asterisk ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) ENABLE_DEBUG += --enable-dev-mode endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif DEBVERSION:=$(shell dpkg-parsechangelog | sed -n -e 's/Version: //p') DEB_NOEPOCH_VERSION:=$(shell echo $(DEBVERSION) | cut -d':' -f 2) DEB_SRC_VERSION:=$(shell echo $(DEB_NOEPOCH_VERSION) | sed -e 's/-[^-]\+$$//') UPVERSION:=$(shell echo $(DEB_SRC_VERSION) | sed -e 's/[.~]dfsg[0-9]*//' -e 's/~\(\(rc\|beta\)[0-9]\)/-\1/') FILENAME := asterisk_$(DEB_SRC_VERSION).orig.tar.gz UPFILENAME := asterisk_$(UPVERSION).orig.tar.gz URL := http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$(UPVERSION).tar.gz # make sure we have 'fetch' . We need to have either wget or fetch # on the system. However it is generally not a good idea to actually # get remote tarballs at build time. So if neither wget nor fetch # happen to be installed, the configure script will find a dummy # fetch script that always returns an error. FETCH_ENV = PATH=$$PATH:$(CURDIR)/debian/dummyprogs override_dh_autoreconf: if [ ! -r configure.debian_sav ]; then cp -a configure configure.debian_sav; fi [ -f .version.debian_sav ] || cp -a .version .version.debian_sav echo $(DEB_NOEPOCH_VERSION) > .version dh_autoreconf -- ./bootstrap.sh # Make sure the configure script gets an CFLAGS parameter. Otherwise # it will build with -march=native # Pass CPPFLAGS in the CFLAGS as otherwise the build system will # ignore them. override_dh_auto_configure: chmod 755 $(CURDIR)/debian/dummyprogs/fetch $(FETCH_ENV) ./configure \ CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --disable-asteriskssl \ --with-gsm \ --with-imap=system \ --without-pwlib \ ${ENABLE_DEBUG} # --with-cap \ override_dh_auto_build: $(MAKE) menuselect.makeopts @if [ "x${ENABLE_DEBUG}" != "x" ] ; then \ menuselect/menuselect --enable BETTER_BACKTRACES menuselect.makeopts ; \ menuselect/menuselect --enable DONT_OPTIMIZE menuselect.makeopts ; \ menuselect/menuselect --enable DEBUG_THREADS menuselect.makeopts ; \ fi $(FETCH_ENV) dh_auto_build -- $(BUILDFLAGS) SND_FILE=asterisk-core-sounds-en-gsm-1.4.20.tar.gz override_dh_clean: if [ -r sounds/$(SND_FILE) ]; then mv sounds/$($SND_FILE) debian/; fi GREP=grep AWK=awk $(MAKE) distclean if [ -r debian/$(SND_FILE) ]; then mv debian/$(SND_FILE) sounds/; fi -test -d configs && chmod -x configs/*.sample [ ! -f .version.debian_sav ] || mv .version.debian_sav .version if [ -f configure.debian_sav ]; then mv configure.debian_sav configure; fi dh_clean SUBPACKS_EXTRA = \ voicemail voicemail-odbcstorage voicemail-imapstorage \ ooh323 mysql mp3 ifeq (linux,$(BUILD_OS)) SUBPACKS_EXTRA += dahdi mobile vpb endif SUBPACKS_EXTRA_DIRS = $(SUBPACKS_EXTRA:%=$(CURDIR)/debian/asterisk-%) SUBPACKS_EXTRA_DIRS_MOD = $(SUBPACKS_EXTRA_DIRS:%=%/usr/lib/asterisk/modules) override_dh_auto_install: $(FETCH_ENV) dh_auto_install -- $(BUILDFLAGS) samples cp -a configs $(CURDIR)/debian/tmp/usr/share/asterisk/conf $(RM) -f $(CURDIR)/debian/tmp/usr/sbin/aelparse $(RM) -f $(CURDIR)/debian/tmp/usr/sbin/conf2ael $(RM) -f $(CURDIR)/debian/tmp/usr/sbin/muted $(RM) -f $(CURDIR)/debian/tmp/usr/sbin/streamplayer $(RM) -f $(CURDIR)/debian/tmp/usr/sbin/stereorize $(RM) -f $(CURDIR)/debian/tmp/usr/sbin/hashtest* $(RM) -f $(CURDIR)/debian/tmp/usr/sbin/refcounter override_dh_install: dh_install extra_packs=`find $(SUBPACKS_EXTRA_DIRS_MOD) -name '*.so' -printf '%f\n'`\ ; cd $(CURDIR)/debian/asterisk-modules/usr/lib/asterisk/modules \ && rm -f $$extra_packs # Rename dh_install file for -imapstorage and -odbcstorage. mv $(CURDIR)/debian/asterisk-voicemail-imapstorage/usr/lib/asterisk/modules/app_voicemail_imapstorage.so \ $(CURDIR)/debian/asterisk-voicemail-imapstorage/usr/lib/asterisk/modules/app_voicemail.so mv $(CURDIR)/debian/asterisk-voicemail-odbcstorage/usr/lib/asterisk/modules/app_voicemail_odbcstorage.so \ $(CURDIR)/debian/asterisk-voicemail-odbcstorage/usr/lib/asterisk/modules/app_voicemail.so override_dh_fixperms: dh_fixperms # should follow dh_fixperms; asterisk configurations may contain # sensitive information, such as passwords if [ -d $(CURDIR)/debian/asterisk-config ]; then \ chmod o-rwx $(CURDIR)/debian/asterisk-config/etc/asterisk/*; \ chmod o+rx $(CURDIR)/debian/asterisk-config/etc/asterisk/manager.d; \ fi override_dh_strip: dh_strip -a --dbg-package=asterisk-dbg print-version: @@echo "Debian version: $(DEBVERSION)" @@echo "Upstream version: $(UPVERSION)" TMP_TARBALL_TOP=../tarballs/asterisk-$(UPVERSION).tmp/asterisk-$(UPVERSION) get-orig-source: @@dh_testdir #@@[ -d ../tarballs/. ]||mkdir -p ../tarballs #@@echo Downloading $(FILENAME) from $(URL) ... #@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL) @echo Downloading $(UPFILENAME) from $(URL) ... @wget -nv -T10 -t3 -O ../tarballs/$(UPFILENAME) $(URL) @echo Repacking as DFSG-free... @mkdir -p ../tarballs/asterisk-$(UPVERSION).tmp/ @cd ../tarballs/asterisk-$(UPVERSION).tmp ; \ tar xfz ../$(UPFILENAME) # in case the tarball is not clean: @rm -rf $(TMP_TARBALL_TOP)/AST.txt @rm -rf $(TMP_TARBALL_TOP)/AST.pdf @rm -rf $(TMP_TARBALL_TOP)/doc/Asterisk-Admin-Guide/ @rm -rf $(TMP_TARBALL_TOP)/doc/Asterisk-Admin-Guide.pdf @rm -rf $(TMP_TARBALL_TOP)/codecs/ilbc @rm -rf $(TMP_TARBALL_TOP)/res/pjproject # While we're at it: remove some generated files that will become # invalid: @rm -rf $(TMP_TARBALL_TOP)/*/.makeopts @rm -rf $(TMP_TARBALL_TOP)/*/.*.makeopts @rm -rf $(TMP_TARBALL_TOP)/*/.moduleinfo @rm -rf $(TMP_TARBALL_TOP)/*/.*.moduleinfo # And some large sound files we already ship in a different package: @rm -rf $(TMP_TARBALL_TOP)/sounds/*.tar.gz @cd ../tarballs/asterisk-$(UPVERSION).tmp ; \ tar cf - * | gzip -9 >../$(FILENAME) @echo Cleaning up... @$(RM) -rf ../tarballs/asterisk-$(UPVERSION).tmp/ # .PHONY: binary-indep binary-arch binary install debian/source/0000775000000000000000000000000012254353236010475 5ustar debian/source/format0000664000000000000000000000001412254353233011700 0ustar 3.0 (quilt) debian/asterisk.prerm0000664000000000000000000000022212254353233012062 0ustar #! /bin/sh -e rmdir /usr/local/share/asterisk/sounds 2>/dev/null || true rmdir /usr/local/share/asterisk 2>/dev/null || true #DEBHELPER# debian/control0000664000000000000000000002405112254353232010576 0ustar Source: asterisk Priority: optional Section: comm Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian VoIP Team Uploaders: Mark Purcell , Tzafrir Cohen , Jeremy Lainé Build-Depends: debhelper (>= 8), hardening-wrapper, dpkg-dev (>= 1.16.1.1), lsb-base (>= 3.2-14), libreadline-dev | libreadline5-dev, libgsm1-dev, libssl-dev, libtonezone-dev (>= 1:2.0.0) [linux-any], libasound2-dev, libpq-dev, unixodbc-dev, libmysqlclient-dev | libmysqlclient15-dev, libbluetooth-dev [linux-any], libpri-dev (>= 1.4.12), libss7-dev, libvpb-dev [linux-any], dahdi-source, autotools-dev, dh-autoreconf, autoconf, automake, libnewt-dev, libsqlite0-dev | libsqlite-dev, libsqlite3-dev, libspeex-dev, libspeexdsp-dev, libcurl4-openssl-dev | libcurl-dev, libxml2-dev, libpopt-dev, libiksemel-dev, libfreeradius-client-dev | libradiusclient-ng-dev, freetds-dev, libvorbis-dev, libsnmp-dev, libc-client2007e-dev | libc-client2007b-dev, libgmime-2.6-dev, libjack-dev, liblua5.1-0-dev, libcap-dev (>= 1:2.16-4) [linux-any] | libcap2-dev [linux-any], libspandsp-dev, libopenr2-dev [linux-any], libresample1-dev, corosync-dev, uuid-dev, libpjproject-dev, libncurses-dev, libneon27-gnutls-dev | libneon27-dev, libical-dev (>= 1.0), libsrtp0-dev, zlib1g-dev, libedit-dev, binutils-dev Standards-Version: 3.9.5 Homepage: http://www.asterisk.org/ Vcs-Git: git://anonscm.debian.org/pkg-voip/asterisk.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/asterisk.git Package: asterisk Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, asterisk-config (= ${source:Version}) | asterisk-config-custom, asterisk-modules (= ${binary:Version}), adduser, asterisk-core-sounds-en-gsm | asterisk-prompt-en Provides: asterisk-11 Recommends: sox, asterisk-voicemail | asterisk-voicemail-storage, asterisk-moh-opsound-gsm Suggests: asterisk-doc, asterisk-dev, asterisk-ooh323, asterisk-dahdi, asterisk-vpb Description: Open Source Private Branch Exchange (PBX) Asterisk is an Open Source PBX and telephony toolkit. It is, in a sense, middleware between Internet and telephony channels on the bottom, and Internet and telephony applications at the top. . Asterisk can be used with Voice over IP (SIP, H.323, IAX and more) standards, or the Public Switched Telephone Network (PSTN) through supported hardware. . Supported hardware: . * All Wildcard (tm) ISDN PRI cards from Digium (http://www.digium.com) * HFC-S/HFC-4S-based ISDN BRI cards (Junghanns.NET, beroNet, Digium etc.) * All TDM (FXO/FXS) cards from Digium * Various clones of Digium cards such as those by OpenVox * Xorcom Astribank USB telephony adapter (http://www.xorcom.com) * Voicetronix OpenPCI, OpenLine and OpenSwitch cards * CAPI-compatible ISDN cards (using the add-on package chan-capi) * Full Duplex Sound Card (ALSA or OSS) supported by Linux * Tormenta T1/E1 card (http://www.zapatatelephony.org) * QuickNet Internet PhoneJack and LineJack (http://www.quicknet.net) . This is the main package that includes the Asterisk daemon and most channel drivers and applications. Package: asterisk-modules Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Section: libs Breaks: asterisk (<< 1:1.8.3.3), asterisk-h323 (<< 1:1.8.4.4~dfsg-2) Replaces: asterisk (<< 1:1.8.3.3) Description: loadable modules for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package includes most of the loadable modules of the Asterisk package. There is normally no need to explicitly install it. Package: asterisk-dahdi Architecture: linux-any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, dahdi Breaks: asterisk (<< 1:11.6.0~dfsg-2) Replaces: asterisk (<< 1:11.6.0~dfsg-2) Description: DAHDI devices support for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package includes the DAHDI channel driver (chan_dahdi.so) and a number of other Asterisk modules that require DAHDI support. They will not be useful without kernel-level DAHDI support. . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-vpb Architecture: linux-any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Breaks: asterisk-modules (<< 1:11.6.0~dfsg-1) Replaces: asterisk-modules (<< 1:11.6.0~dfsg-1) Description: VoiceTronix devices support for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package includes the VoiceTronix channel driver (chan_vpb.so). It will not be useful without kernel-level VoiceTronix support. . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-voicemail Architecture: any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Provides: asterisk-voicemail-storage Conflicts: asterisk-voicemail-storage Breaks: asterisk (<< 1:1.8.3.3) Replaces: asterisk (<< 1:1.8.3.3) Description: simple voicemail support for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package includes the standard files-based voicemail storage. This is normally the one you use and is the one that will Just Work. The only reason not to install it is if you want to use a different Asterisk voicemail storage (ODBC or IMAP). . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-voicemail-imapstorage Architecture: any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Provides: asterisk-voicemail-storage Conflicts: asterisk-voicemail-storage Breaks: asterisk (<< 1:1.8.3.3) Replaces: asterisk (<< 1:1.8.3.3) Description: IMAP voicemail storage support for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package includes an IMAP-based voicemail storage: storing the voicemail in a remote IMAP mail boxes. While more complex to set up, it may be useful in some settings. . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-voicemail-odbcstorage Architecture: any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Provides: asterisk-voicemail-storage Conflicts: asterisk-voicemail-storage Breaks: asterisk (<< 1:1.8.3.3) Replaces: asterisk (<< 1:1.8.3.3) Description: ODBC voicemail storage support for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package includes an database-based voicemail storage: storing the voicemail in a database accessed through the ODBC interface. While more complex to set up, it may be useful in some settings. . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-ooh323 Architecture: any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: H.323 protocol support for the Asterisk PBX - ooH323c Asterisk is an Open Source PBX and telephony toolkit. . This channel driver (chan_ooh323c) provides support for the H.323 protocol for Asterisk. This is an independent implementation that does not depend on OpenH323, but may be less functional than the original chan_h323. . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-mp3 Architecture: any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: MP3 playback support for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package provides support for playing MP3-encoded files in Asterisk. . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-mysql Architecture: any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: MySQL database protocol support for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package provides support for using a MySQL database to store configuration, call detail records, and also provides generic access to it from the dialplan. . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-mobile Architecture: linux-any Depends: asterisk (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Bluetooth phone support for the Asterisk PBX Asterisk is an Open Source PBX and telephony toolkit. . This package provides support for connecting Bluetooth devices to the Asterisk PBX. It allows you to: * Send and receive PSTN calls and SMS messages over a Bluetooth phone. * Use a Bluetooth handset as a local phone connected to your PBX. . For more information about the Asterisk PBX, have a look at the Asterisk package. Package: asterisk-doc Depends: ${misc:Depends} Recommends: asterisk Section: doc Priority: extra Architecture: all Description: Source code documentation for Asterisk Asterisk is an Open Source PBX and telephony toolkit. . This package contains the documentation for configuring an Asterisk system. Package: asterisk-dev Architecture: all Depends: ${misc:Depends} Recommends: asterisk Section: devel Priority: extra Description: Development files for Asterisk Asterisk is an Open Source PBX and telephony toolkit. . This package contains the include files used if you wish to compile a package which requires Asterisk's source file headers. Package: asterisk-dbg Architecture: any Depends: asterisk (= ${binary:Version}), ${misc:Depends} Section: debug Priority: extra Description: Debugging symbols for Asterisk Asterisk is an Open Source PBX and telephony toolkit. . This package includes the debugging symbols useful for debugging Asterisk. The debugging symbols are used for execution tracing and core dump analysis. Package: asterisk-config Depends: ${misc:Depends} Recommends: asterisk Conflicts: asterisk-config-custom Architecture: all Description: Configuration files for Asterisk Asterisk is an Open Source PBX and telephony toolkit. . This package contains the default configuration files of Asterisk. debian/asterisk.default0000664000000000000000000000660312254353232012371 0ustar # This file allows you to alter the configuration of the Asterisk # init.d script. Normally you should leave the file as-is. # # RUNASTERISK: If set to anything other that 'yes', the asterisk init.d script # will not run. The default is 'yes'. #RUNASTERISK=no # # # AST_REALTIME: if set to anything other than "no", asterisk will run in # real-time priority (pass '-p' to asterisk). un-rem the # following line to disable asterisk from running in real-time # priority. The default is 'yes'. #AST_REALTIME=no # # PARAMS: extra parameters to pass to asterisk: generate cores in # case of crash, and be more verbose. -F guarantees that Asterisk # will still run daemonized. # # Instead of adding switches here, consider editing # /etc/asterisk/asterisk.conf #PARAMS="-F -g -vvv" # # # RUNASTSAFE: run safe_asterisk rather than asterisk (will auto-restart upon # crash). This is generally less tested and has some known issues # with properly starting and stopping Asterisk. #RUNASTSAFE=yes # # MAXFILES: Set this to the number of open file handles the Asterisk # process can have. Useful if you get "Too many open files" error. #MAXFILES=8192 # # AST_DUMPCORE: if set to anything other than "no", asterisk will be run with # the option -g (to tell it to dump core on crash) and its # working directory will be set to /var/spool/asterisk, as that # directory is writable and hence core files can be written there. # See /etc/init.d/asterisk for some other relevant variables. # # It is recommended that you install asterisk-dbg to be able # to produce meaningful backtraces from the core file. # # By default core files will be written to /tmp (can be # changed by setting AST_DUMPCORE_DIR). Alternatively, see # CORE_PATTERN below. #AST_DUMPCORE=yes # # AST_DUMPCORE_DIR: By default asterisk runs in the directory '/' like any # daemon. Setting this allows you to tell it to tell the # Asterisk daemon to run in a different directory if # AST_DUMPCORE is enabled. The default is # /var/spool/asterisk. That is a good choice because it # is writable (thus enabling the actual writing of the # core file) but relatively immune to symlink attacks # (because not world-writable like /tmp/). # Note, however, that if CORE_PATTERN is an absolute # path, it will override AST_DUMPCORE_DIR. # # CORE_PATTERN: If you use AST_DUMPCORE above, this is optionally set to a # pattern of the core file. The default is not to touch the # core_pattern settings, which is generally a good idea as # it affects every core file generated on your system. # # However if you just enable generation of core files and run # asterisk as a daemon it will fail to write core files. # # Alternatively you can set this independently elsewhere. # See http://lxr.linux.no/source/Documentation/sysctl/kernel.txt # Here is what Asterisk's ast_grab_core # script would expect: #CORE_PATTERN='core.%p' # But you might prefer something like: #CORE_PATTERN='core.%e.%t' debian/asterisk-config.dirs0000664000000000000000000000002712254353233013144 0ustar etc/asterisk/manager.d debian/asterisk.postinst0000664000000000000000000000645312254353233012634 0ustar #! /bin/sh set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # case "$1" in configure) # add asterisk user if ! getent passwd asterisk > /dev/null ; then echo 'Adding system user for Asterisk' 1>&2 adduser --system --group --quiet \ --home /var/lib/asterisk \ --no-create-home --disabled-login \ --gecos "Asterisk PBX daemon" \ asterisk fi # add asterisk to required groups for group in dialout audio; do if groups asterisk | grep -w -q -v $group; then adduser asterisk $group fi done # chown asterisk on all $dirs and their subdirectories # do not harm the files, they should be empty on new installations # and we don't want to mess-up anything on old installations find /var/log/asterisk \ /var/lib/asterisk \ -type d | while read dir; do if ! dpkg-statoverride --list "$dir" > /dev/null ; then chown asterisk: "$dir" fi done # this is not needed for new installations but is not such a bad idea # removing this will _break_ upgrades from versions < 1:1.4.10.1~dfsg-1 # # we are doing the same for subdirectories, since we are not shipping # any and it's supposed to be user-modifiable if ! dpkg-statoverride --list "/etc/asterisk" > /dev/null ; then chown asterisk: /etc/asterisk fi # spool holds some sensitive information (e.g. monitor, voicemail etc.) find /var/spool/asterisk -type d | while read dir; do if ! dpkg-statoverride --list "$dir" > /dev/null ; then chown asterisk: "$dir" chmod 750 "$dir" fi done # Create /usr/local directory; policy 9.1.2 if [ ! -e /usr/local/share/asterisk/sounds ]; then if mkdir -p /usr/local/share/asterisk/sounds 2>/dev/null ; then chown root:staff /usr/local/share/asterisk/sounds chmod 2775 /usr/local/share/asterisk/sounds fi fi ### this is done here in case asterisk-config was installed/upgraded first set +e # ignore errors temporarily # find the name of the package providing config; either asterisk-config # or a package providing asterisk-config-custom ASTERISK_CONFIG=`dpkg-query -W -f='${Package}\t${Provides}\n' | \ sed -nr 's/(.*)\tasterisk-config-custom|(asterisk-config)(\t.*)?/\1\2/p'` # find conffiles under /etc/asterisk belonging to asterisk-config # and chown them to user asterisk. dpkg-query -W -f='${Conffiles}\n' $ASTERISK_CONFIG 2>/dev/null | \ sed -nr -e 's; (/etc/asterisk/.*) [0-9a-f]*;\1;p' | \ while read conffile; do chown asterisk: "$conffile" 2>/dev/null done # handle them in the end with a glob since it's way faster dpkg-statoverride --quiet --list '/etc/asterisk/*' | while read STAT; do chown `echo $STAT | cut -d' ' -f 1,2,4 | sed 's/ /:/'` \ 2>/dev/null done set -e ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/asterisk-config.install0000664000000000000000000000005312254353233013650 0ustar etc/asterisk ../ast_config/* etc/asterisk/ debian/asterisk-mp3.install0000664000000000000000000000004712254353233013105 0ustar usr/lib/asterisk/modules/format_mp3.so debian/asterisk-config.preinst0000664000000000000000000000261412254353233013673 0ustar #! /bin/sh # preinst script # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # Remove a no-longer used conffile rm_conffile() { PKGNAME="$1" CONFFILE="$2" if [ -e "$CONFFILE" ]; then md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE" fi fi } case "$1" in install|upgrade) # chan_modem was removed on 1.4+ if dpkg --compare-versions "$2" lt "1:1.4.0-1~"; then rm_conffile asterisk-config "/etc/asterisk/modem.conf" fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/asterisk.dirs0000664000000000000000000000066512254353233011711 0ustar etc/asterisk usr/share/asterisk var/log/asterisk var/spool/asterisk var/lib/asterisk usr/share/asterisk/static-http usr/share/asterisk/agi-bin var/lib/asterisk/moh var/lib/asterisk/sounds/custom var/log/asterisk/cdr-csv var/log/asterisk/cdr-custom var/spool/asterisk/dictate var/spool/asterisk/meetme var/spool/asterisk/monitor var/spool/asterisk/system var/spool/asterisk/tmp var/spool/asterisk/voicemail var/spool/asterisk/outgoing debian/asterisk-voicemail-imapstorage.install0000664000000000000000000000006612254353232016667 0ustar usr/lib/asterisk/modules/app_voicemail_imapstorage.so debian/watch0000664000000000000000000000026712254353233010230 0ustar version=3 opts=dversionmangle=s/\~dfsg//,downloadurlmangle=s/.*ref=// \ http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-(11.[0-9.]*).tar.gz debian svn-upgrade debian/asterisk.manpages0000664000000000000000000000004612254353233012534 0ustar utils/*.1 doc/*.8 contrib/scripts/*.8 debian/asterisk.postrm0000664000000000000000000000021312254353233012261 0ustar #! /bin/sh -e if [ "$1" = purge ]; then userdel -r asterisk 2>/dev/null || true rm -fR /var/log/asterisk fi #DEBHELPER# debian/asterisk-config.lintian-overrides0000664000000000000000000000005012254353233015635 0ustar asterisk-config: non-standard-file-perm debian/patches/0000775000000000000000000000000012254353236010624 5ustar debian/patches/undeprecate0000664000000000000000000000036312254353233013045 0ustar --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -31,7 +31,6 @@ /*** MODULEINFO dahdi - no deprecated app_confbridge ***/ debian/patches/h323-no-deps-on-asterisk0000664000000000000000000000341612254353233015027 0ustar Subject: Avoid linking the asterisk binary with the H.323 libraries Author: Faidon Liambotis Forwarded: no Last-Update: 2010-10-20 Don't link the Asterisk binary with the H.323 libraries since they are only used by separate shared object, chan_h323.so. (Closes: #433884) WARNING: this will make Asterisk segfault (see #435146) when loading chan_h323.so because libopenh323 is buggy (#438815). We are working around this, see patch h323-workaround-openh323-segfault. --- a/main/Makefile +++ b/main/Makefile @@ -153,13 +153,6 @@ AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED AST_EMBED_LIBS:=$(foreach dep,$(EMBED_LIBS),$(value $(dep))) OBJS:=$(sort $(OBJS)) -ifneq ($(wildcard ../channels/h323/Makefile.ast),) - include ../channels/h323/Makefile.ast -else - H323LDFLAGS= - H323LDLIBS= -endif - ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) MAIN_TGT:=asterisk.dll asterisk: cygload @@ -177,11 +170,7 @@ endif $(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) @$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS) $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@" -ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),) $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS) -else - $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(GMIMELDFLAGS) -endif ifeq ($(GNU_LD),1) $(MAIN_TGT): asterisk.exports debian/patches/dahdi_pri_event_removed0000664000000000000000000001136512254353233015417 0ustar From: Tzafrir Cohen Date: Wed, 17 Jul 2013 16:56:14 +0000 Subject: handle DAHDI_EVENT_REMOVED on a pri D-Channel Origin: http://svnview.digium.com/svn/asterisk?view=rev&rev=394552 When a DAHDI device is removed at run-time it sends the event DAHDI_EVENT_REMOVED on each channel. This is intended to signal the userspace program to close the respective file handle, as the driver of the device will need all of them closed to properly clean-up. This event has long since been handled in chan_dahdi (chan_zap at the time). However the event that is sent on a D-Channel of a "PRI" (ISDN) span simply gets ignored. This commit adds handling for closing the file descriptor (and shutting down the span, while we're at it). It also adds a CLI command 'pri destroy span ' to destroy the span and its DAHDI channels. Review: https://reviewboard.asterisk.org/r/726/ Trivial backport from trunk / 12. --- channels/chan_dahdi.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -3217,6 +3217,8 @@ static int sig_pri_tone_to_dahditone(enu #endif /* defined(HAVE_PRI) */ #if defined(HAVE_PRI) +static int pri_destroy_dchan(struct sig_pri_span *pri); + static void my_handle_dchan_exception(struct sig_pri_span *pri, int index) { int x; @@ -3244,6 +3246,9 @@ static void my_handle_dchan_exception(st case DAHDI_EVENT_NOALARM: pri_event_noalarm(pri, index, 0); break; + case DAHDI_EVENT_REMOVED: + pri_destroy_dchan(pri); + break; default: break; } @@ -14887,6 +14892,97 @@ static char *handle_pri_show_spans(struc #endif /* defined(HAVE_PRI) */ #if defined(HAVE_PRI) +#define container_of(ptr, type, member) \ + ((type *)((char *)(ptr) - offsetof(type, member))) +/*! + * \internal + * \brief Destroy a D-Channel of a PRI span + * \since 12 + * + * \param pri the pri span + * + * \return TRUE if the span was valid and we attempted destroying. + * + * Shuts down a span and destroys its D-Channel. Further destruction + * of the B-channels using dahdi_destroy_channel() would probably be required + * for the B-Channels. + */ +static int pri_destroy_dchan(struct sig_pri_span *pri) +{ + int i; + struct dahdi_pri* dahdi_pri; + + if (!pri->master || (pri->master == AST_PTHREADT_NULL)) { + return 0; + } + pthread_cancel(pri->master); + pthread_join(pri->master, NULL); + + /* The 'struct dahdi_pri' that contains our 'struct sig_pri_span' */ + dahdi_pri = container_of(pri, struct dahdi_pri, pri); + for (i = 0; i < SIG_PRI_NUM_DCHANS; i++) { + ast_debug(4, "closing pri_fd %d\n", i); + dahdi_close_pri_fd(dahdi_pri, i); + } + pri->pri = NULL; + ast_debug(1, "PRI span %d destroyed\n", pri->span); + return 1; +} + +static char *handle_pri_destroy_span(struct ast_cli_entry *e, int cmd, + struct ast_cli_args *a) +{ + int span; + int i; + int res; + + switch (cmd) { + case CLI_INIT: + e->command = "pri destroy span"; + e->usage = + "Usage: pri destroy span \n" + " Destorys D-channel of span and its B-channels.\n" + " DON'T USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.\n"; + return NULL; + case CLI_GENERATE: + return complete_span_4(a->line, a->word, a->pos, a->n); + } + + if (a->argc < 4) { + return CLI_SHOWUSAGE; + } + res = sscanf(a->argv[3], "%30d", &span); + if ((res != 1) || span < 1 || span > NUM_SPANS) { + ast_cli(a->fd, + "Invalid span '%s'. Should be a number from %d to %d\n", + a->argv[3], 1, NUM_SPANS); + return CLI_SUCCESS; + } + if (!pris[span - 1].pri.pri) { + ast_cli(a->fd, "No PRI running on span %d\n", span); + return CLI_SUCCESS; + } + + for (i = 0; i < pris[span - 1].pri.numchans; i++) { + int channel; + struct sig_pri_chan *pvt = pris[span - 1].pri.pvts[i]; + + if (!pvt) { + continue; + } + channel = pvt->channel; + ast_debug(2, "About to destroy B-channel %d.\n", channel); + dahdi_destroy_channel_bynum(channel); + } + ast_debug(2, "About to destroy D-channel of span %d.\n", span); + pri_destroy_dchan(&pris[span - 1].pri); + + return CLI_SUCCESS; +} + +#endif /* defined(HAVE_PRI) */ + +#if defined(HAVE_PRI) static char *handle_pri_show_span(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { int span; @@ -14992,6 +15088,7 @@ static struct ast_cli_entry dahdi_pri_cl AST_CLI_DEFINE(handle_pri_show_channels, "Displays PRI channel information"), AST_CLI_DEFINE(handle_pri_show_spans, "Displays PRI span information"), AST_CLI_DEFINE(handle_pri_show_span, "Displays PRI span information"), + AST_CLI_DEFINE(handle_pri_destroy_span, "Destroy a PRI span"), AST_CLI_DEFINE(handle_pri_show_debug, "Displays current PRI debug settings"), AST_CLI_DEFINE(handle_pri_set_debug_file, "Sends PRI debug output to the specified file"), AST_CLI_DEFINE(handle_pri_version, "Displays libpri version"), debian/patches/pjproject0000664000000000000000000001043312254353233012545 0ustar From 5d584d0d83c063006ba1b731046d309123b7409c Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Tue, 12 Mar 2013 19:08:59 +0000 Origin: http://svnview.digium.com/svn/asterisk?view=rev&rev=382900 Subject: Switch to using external pjproject libraries. ICE/STUN/TURN support in res_rtp_asterisk is also now optional. (With minor backport adjustments for branch 11) --- a/build_tools/menuselect-deps.in +++ b/build_tools/menuselect-deps.in @@ -43,6 +43,7 @@ OPENH323=@PBX_OPENH323@ OSPTK=@PBX_OSPTK@ OSS=@PBX_OSS@ PGSQL=@PBX_PGSQL@ +PJPROJECT=@PBX_PJPROJECT@ POPT=@PBX_POPT@ PORTAUDIO=@PBX_PORTAUDIO@ PRI=@PBX_PRI@ --- a/configure.ac +++ b/configure.ac @@ -425,6 +425,7 @@ AST_EXT_LIB_SETUP([OPENR2], [MFR2], [ope AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk]) AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss]) AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres]) +AST_EXT_LIB_SETUP([PJPROJECT], [PJPROJECT], [pjproject]) AST_EXT_LIB_SETUP([POPT], [popt], [popt]) AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio]) AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri]) @@ -1996,6 +1997,8 @@ if test "${PG_CONFIG}" != No; then fi fi +AST_PKG_CONFIG_CHECK([PJPROJECT], [libpjproject]) + AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h]) AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h]) --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -551,6 +551,9 @@ /* Define to indicate presence of the pg_encoding_to_char API. */ #undef HAVE_PGSQL_pg_encoding_to_char +/* Define if your system has the PJPROJECT libraries. */ +#undef HAVE_PJPROJECT + /* Define to 1 if your system defines IP_PKTINFO. */ #undef HAVE_PKTINFO --- a/makeopts.in +++ b/makeopts.in @@ -214,6 +214,9 @@ OSS_LIB=@OSS_LIB@ @FFMPEG_LIB@ @SDL_LIB@ PGSQL_INCLUDE=@PGSQL_INCLUDE@ PGSQL_LIB=@PGSQL_LIB@ +PJPROJECT_INCLUDE=@PJPROJECT_INCLUDE@ +PJPROJECT_LIB=@PJPROJECT_LIB@ + POPT_INCLUDE=@POPT_INCLUDE@ POPT_LIB=@POPT_LIB@ --- a/res/Makefile +++ b/res/Makefile @@ -67,29 +67,8 @@ endif ael/pval.o: ael/pval.c clean:: - @if [ -f pjproject/build.mak ]; then $(MAKE) -C pjproject realclean; fi rm -f snmp/*.o snmp/*.i ael/*.o ael/*.i ais/*.o ais/*.i -dist-clean:: - rm -f pjproject/build.mak - -pjproject/build.mak: pjproject/aconfigure - (cd pjproject && CFLAGS="-fPIC" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --disable-floating-point --disable-sound --disable-oss --disable-speex-aec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-g711-codec) - -ifneq ($(findstring $(MAKECMDGOALS),all),) --include pjproject/build.mak -endif - -.PHONY: FORCE -FORCE: - -$(PJ_LIB_FILES): FORCE - $(MAKE) -C $(patsubst %/lib/,%,$(dir $@))/build/ ../lib/$(notdir $@) - -ifeq ($(subst 1:0,1,$(UUID)), 1) +ifeq ($(subst 1:0,1,$(PJPROJECT)), 1) -res_rtp_asterisk.o: $(PJ_LIB_FILES) res_rtp_asterisk.o: _ASTCFLAGS+=-DUSE_PJPROJECT -res_rtp_asterisk.o: _ASTCFLAGS+=$(PJ_CFLAGS) -res_rtp_asterisk.so: _ASTLDFLAGS+=$(PJ_LDFLAGS) -res_rtp_asterisk.so: LIBS+=$(PJ_LDLIBS) -endif \ No newline at end of file +endif --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -29,7 +29,7 @@ */ /*** MODULEINFO - uuid + pjproject core ***/ @@ -52,9 +52,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 397604 $") * here since it is used internally by pjlib. The only other option would be to modify pjlib... which won't happen. */ #undef bzero #define bzero bzero -#include "pjlib.h" -#include "pjlib-util.h" -#include "pjnath.h" +#include +#include +#include #endif #include "asterisk/stun.h" @@ -1801,7 +1801,7 @@ static int ast_rtp_new(struct ast_rtp_instance *instance, passwd = pj_str(rtp->local_passwd); /* Create an ICE session for ICE negotiation */ - if (icesupport && pj_ice_sess_create(&stun_config, NULL, PJ_ICE_SESS_ROLE_UNKNOWN, 2, &ast_rtp_ice_sess_cb, &ufrag, &passwd, &rtp->ice) == PJ_SUCCESS) { + if (icesupport && pj_ice_sess_create(&stun_config, NULL, PJ_ICE_SESS_ROLE_UNKNOWN, 2, &ast_rtp_ice_sess_cb, &ufrag, &passwd, NULL, &rtp->ice) == PJ_SUCCESS) { /* Make this available for the callbacks */ rtp->ice->user_data = rtp; debian/patches/ignore_failed_channels.patch0000664000000000000000000000256512254353233016314 0ustar Author: Tzafrir Cohen Description: Ignore failed DAHDI channels at startup Origin: https://reviewboard.asterisk.org/r/3063 Allow DAHDI channels to be failed at startup, as it allows them to be added later through 'dahdi create channels' from e.g. a udev hook. --- a/configs/chan_dahdi.conf.sample +++ b/configs/chan_dahdi.conf.sample @@ -1159,12 +1159,11 @@ ; ; ; ignore_failed_channels: Continue even if some channels failed to configure. -; False by default, as if even a single channel failed to configure, it might -; mean other channels are misplaced and having them work may not be a good -; idea. If enabled (set to true), chan_dahdi will nevertheless attempt to -; configure other channels rather than giving up. This normally makes sense -; only if you use names (!) for DAHDI channels. -;ignore_failed_channels = true +; True by default. Disable this if you can guarantee that DAHDI starts before +; Asterisk and want to be sure chan_dahdi will not start with broken +; configuration. +; +;ignore_failed_channels = false ; ; Configure jitter buffers in DAHDI (each one is 20ms, default is 4) ; This is set globally, rather than per-channel. --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -961,6 +961,7 @@ .debouncetime = -1 }, .is_sig_auto = 1, + .ignore_failed_channels = 1, .smdi_port = "/dev/ttyS0", }; debian/patches/h323-workaround-openh323-segfault0000664000000000000000000000241212254353233016562 0ustar Subject: Hack dynamic loader to workaround libopenh323 bug Author: Faidon Liambotis Forwarded: no Last-Update: 2009-12-19 libopenh323 is buggy and crashes on dlclose() when the library was opened with RTLD_LAZY (#438815). Hack around this by opening it with RTLD_NOW by matching the module names (chan_h323.so and the external chan_oh323.so) This is a very crude hack needed because we are removing libopenh323 dependencies from the asterisk binary. (h323-no-deps-on-asterisk) Namely, it will have unexpected results if e.g. the user renames the module for any reason. Should be removed when #438815 closes. --- a/main/loader.c +++ b/main/loader.c @@ -382,6 +382,12 @@ static struct ast_module *load_dynamic_m if (missing_so) strcat(resource_being_loaded->resource, ".so"); + /* libopenh323 is buggy and segfaults on dlclose() when opened with + * RTLD_LAZY. Workaround this until it gets fixed */ + if (!strcasecmp(resource_being_loaded->resource, "chan_h323.so") || + !strcasecmp(resource_being_loaded->resource, "chan_oh323.so")) + lib = dlopen(fn, RTLD_NOW | RTLD_LOCAL); + if (!(lib = dlopen(fn, RTLD_LAZY | RTLD_LOCAL))) { ast_log(LOG_WARNING, "Error loading module '%s': %s\n", resource_in, dlerror()); ast_free(resource_being_loaded); debian/patches/safe_asterisk-config0000664000000000000000000000134312254353233014633 0ustar Subject: Don't use TTY9 by default Author: Faidon Liambotis Bug-Debian: http://bugs.debian.org/381786 Last-Update: 2010-02-14 --- a/contrib/scripts/safe_asterisk +++ b/contrib/scripts/safe_asterisk @@ -109,7 +109,7 @@ ulimit -c unlimited # Don't fork when running "safely" # ASTARGS="" -if test "x$TTY" != "x" ; then +if test "x$TTY" != "xno" ; then if test -c /dev/tty${TTY} ; then TTY=tty${TTY} elif test -c /dev/vc/${TTY} ; then @@ -159,7 +159,7 @@ run_asterisk() { while :; do - if test "x$TTY" != "x" ; then + if test "x$TTY" != "xno" ; then cd "${RUNDIR}" stty sane < /dev/${TTY} nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY} debian/patches/hack-multiple-app-voicemail0000664000000000000000000000457012254353233016035 0ustar Subject: build multiple versions of app_voicemail.so Author: Faidon Liambotis Bug: http://issues.asterisk.org/view.php?id=13822 Last-Update: 2010-12-24 This is a very ugly hack on upstream's Makefiles to allow building multiple variants of app_voicemail. Three variants are created: * app_voicemail.so: plain old filesystem storage that doesn't break existing setups * app_voicemail_imapstorage.so: IMAP storage * app_voicemail_odbcstorage.so: ODBC storage All these conflict with each other and Asterisk will refuse to load them concurrently. They are thus included in three separate and complicting packages. Patch suggested to upstream but rejected for being "hackish". Though upstream RPM packages include packages that are only somewhat cleaner. --- a/apps/Makefile +++ b/apps/Makefile @@ -15,6 +15,8 @@ MODULE_PREFIX=app MENUSELECT_CATEGORY=APPS MENUSELECT_DESCRIPTION=Applications +MODS_C_ADDITIONAL=app_voicemail_imapstorage app_voicemail_odbcstorage + MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail) ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),) MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE) @@ -25,6 +27,25 @@ endif all: _all +add_depends_cmd = sed -i -e '/^\/\*\*\* MODULEINFO/a\\t$(1)<\/depend>' +app_voicemail_imapstorage.c: app_voicemail.c + cp $< $@ + $(call add_depends_cmd,imap_tk) $@ + $(call add_depends_cmd,openssl) $@ + cp app_voicemail.exports.in app_voicemail_imapstorage.exports.in +app_voicemail_odbcstorage.c: app_voicemail.c + cp $< $@ + $(call add_depends_cmd,unixodbc) $@ + $(call add_depends_cmd,ltdl) $@ + cp app_voicemail.exports.in app_voicemail_odbcstorage.exports.in + +dist-clean:: + rm -f app_voicemail_*.c + rm -f app_voicemail_*.exports.in + +app_voicemail_imapstorage.o: _ASTCFLAGS+=-DIMAP_STORAGE +app_voicemail_odbcstorage.o: _ASTCFLAGS+=-DODBC_STORAGE + include $(ASTTOPDIR)/Makefile.moddir_rules clean:: --- a/Makefile.moddir_rules +++ b/Makefile.moddir_rules @@ -37,7 +37,7 @@ include $(ASTTOPDIR)/Makefile.rules # Use MODULE_EXCLUDE to specify additional modules to exclude. ifneq ($(MODULE_PREFIX),) - ALL_C_MODS:= + ALL_C_MODS:=$(MODS_C_ADDITIONAL) ALL_CC_MODS:= ALL_C_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.c,%,$(wildcard $(p)_*.c))) ALL_CC_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.cc,%,$(wildcard $(p)_*.cc))) debian/patches/mpglib0000664000000000000000000034177412254353233012036 0ustar Description: mpglib code originally in asterisk-addons Origin: http://svn.digium.com/svn/thirdparty/mp3/trunk The package asterisk-addons originally included mpglib. After the merge with asterisk, that code is no longer included and needs to be fetched (contrib/scripts/get_mpg_source.sh). This patch includes that fetched source (rev. 180). TODO: get rid of this code and use libmpg123 or whatever. --- /dev/null +++ b/addons/mp3/common.c @@ -0,0 +1,267 @@ +#include "asterisk.h" +#include "asterisk/logger.h" + +#include +#include +#include + +#include +#include +#include + +#include "mpg123.h" +#include "mpglib.h" + +struct parameter param = { 1 , 1 , 0 , 0 }; + +int tabsel_123[2][3][16] = { + { {0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,}, + {0,32,48,56, 64, 80, 96,112,128,160,192,224,256,320,384,}, + {0,32,40,48, 56, 64, 80, 96,112,128,160,192,224,256,320,} }, + + { {0,32,48,56,64,80,96,112,128,144,160,176,192,224,256,}, + {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,}, + {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,} } +}; + +long freqs[9] = { 44100, 48000, 32000, + 22050, 24000, 16000 , + 11025 , 12000 , 8000 }; + + +#if 0 +static void get_II_stuff(struct frame *fr) +{ + static int translate[3][2][16] = + { { { 0,2,2,2,2,2,2,0,0,0,1,1,1,1,1,0 } , + { 0,2,2,0,0,0,1,1,1,1,1,1,1,1,1,0 } } , + { { 0,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0 } , + { 0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0 } } , + { { 0,3,3,3,3,3,3,0,0,0,1,1,1,1,1,0 } , + { 0,3,3,0,0,0,1,1,1,1,1,1,1,1,1,0 } } }; + + int table,sblim; + static struct al_table *tables[5] = + { alloc_0, alloc_1, alloc_2, alloc_3 , alloc_4 }; + static int sblims[5] = { 27 , 30 , 8, 12 , 30 }; + + if(fr->lsf) + table = 4; + else + table = translate[fr->sampling_frequency][2-fr->stereo][fr->bitrate_index]; + sblim = sblims[table]; + + fr->alloc = tables[table]; + fr->II_sblimit = sblim; +} +#endif + +#define HDRCMPMASK 0xfffffd00 + +#if 0 +int head_check(unsigned long head) +{ + if( (head & 0xffe00000) != 0xffe00000) + return FALSE; + if(!((head>>17)&3)) + return FALSE; + if( ((head>>12)&0xf) == 0xf) + return FALSE; + if( ((head>>10)&0x3) == 0x3 ) + return FALSE; + return TRUE; +} +#endif + + +/* + * the code a header and write the information + * into the frame structure + */ +int decode_header(struct frame *fr,unsigned long newhead) +{ + if( newhead & (1<<20) ) { + fr->lsf = (newhead & (1<<19)) ? 0x0 : 0x1; + fr->mpeg25 = 0; + } + else { + fr->lsf = 1; + fr->mpeg25 = 1; + } + + fr->lay = 4-((newhead>>17)&3); + if( ((newhead>>10)&0x3) == 0x3) { + ast_log(LOG_WARNING,"Stream error\n"); + return (0); + } + if(fr->mpeg25) { + fr->sampling_frequency = 6 + ((newhead>>10)&0x3); + } + else + fr->sampling_frequency = ((newhead>>10)&0x3) + (fr->lsf*3); + fr->error_protection = ((newhead>>16)&0x1)^0x1; + + if(fr->mpeg25) /* allow Bitrate change for 2.5 ... */ + fr->bitrate_index = ((newhead>>12)&0xf); + + fr->bitrate_index = ((newhead>>12)&0xf); + fr->padding = ((newhead>>9)&0x1); + fr->extension = ((newhead>>8)&0x1); + fr->mode = ((newhead>>6)&0x3); + fr->mode_ext = ((newhead>>4)&0x3); + fr->copyright = ((newhead>>3)&0x1); + fr->original = ((newhead>>2)&0x1); + fr->emphasis = newhead & 0x3; + + fr->stereo = (fr->mode == MPG_MD_MONO) ? 1 : 2; + + if(!fr->bitrate_index) + { + ast_log(LOG_WARNING,"Free format not supported.\n"); + return (0); + } + + switch(fr->lay) + { + case 1: +#if 0 + fr->do_layer = do_layer1; + fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? + (fr->mode_ext<<2)+4 : 32; + fr->framesize = (long) tabsel_123[fr->lsf][0][fr->bitrate_index] * 12000; + fr->framesize /= freqs[fr->sampling_frequency]; + fr->framesize = ((fr->framesize+fr->padding)<<2)-4; +#else + ast_log(LOG_WARNING,"Layer 1 not supported!\n"); +#endif + break; + case 2: +#if 0 + fr->do_layer = do_layer2; + get_II_stuff(fr); + fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? + (fr->mode_ext<<2)+4 : fr->II_sblimit; + fr->framesize = (long) tabsel_123[fr->lsf][1][fr->bitrate_index] * 144000; + fr->framesize /= freqs[fr->sampling_frequency]; + fr->framesize += fr->padding - 4; +#else + ast_log(LOG_WARNING,"Layer 2 not supported!\n"); +#endif + break; + case 3: +#if 0 + fr->do_layer = do_layer3; + if(fr->lsf) + ssize = (fr->stereo == 1) ? 9 : 17; + else + ssize = (fr->stereo == 1) ? 17 : 32; +#endif + +#if 0 + if(fr->error_protection) + ssize += 2; +#endif + fr->framesize = (long) tabsel_123[fr->lsf][2][fr->bitrate_index] * 144000; + fr->framesize /= freqs[fr->sampling_frequency]<<(fr->lsf); + fr->framesize = fr->framesize + fr->padding - 4; + break; + default: + ast_log(LOG_WARNING,"Sorry, unknown layer type.\n"); + return (0); + } + return 1; +} + +#if 0 +void print_header(struct frame *fr) +{ + static char *modes[4] = { "Stereo", "Joint-Stereo", "Dual-Channel", "Single-Channel" }; + static char *layers[4] = { "Unknown" , "I", "II", "III" }; + + ast_log(LOG_WARNING,"MPEG %s, Layer: %s, Freq: %ld, mode: %s, modext: %d, BPF : %d\n", + fr->mpeg25 ? "2.5" : (fr->lsf ? "2.0" : "1.0"), + layers[fr->lay],freqs[fr->sampling_frequency], + modes[fr->mode],fr->mode_ext,fr->framesize+4); + ast_log(LOG_WARNING,"Channels: %d, copyright: %s, original: %s, CRC: %s, emphasis: %d.\n", + fr->stereo,fr->copyright?"Yes":"No", + fr->original?"Yes":"No",fr->error_protection?"Yes":"No", + fr->emphasis); + ast_log(LOG_WARNING,"Bitrate: %d Kbits/s, Extension value: %d\n", + tabsel_123[fr->lsf][fr->lay-1][fr->bitrate_index],fr->extension); +} + +void print_header_compact(struct frame *fr) +{ + static char *modes[4] = { "stereo", "joint-stereo", "dual-channel", "mono" }; + static char *layers[4] = { "Unknown" , "I", "II", "III" }; + + ast_log(LOG_WARNING,"MPEG %s layer %s, %d kbit/s, %ld Hz %s\n", + fr->mpeg25 ? "2.5" : (fr->lsf ? "2.0" : "1.0"), + layers[fr->lay], + tabsel_123[fr->lsf][fr->lay-1][fr->bitrate_index], + freqs[fr->sampling_frequency], modes[fr->mode]); +} + +#endif + +unsigned int getbits(struct mpstr *mp, int number_of_bits) +{ + unsigned long rval; + + if(!number_of_bits) + return 0; + + { + rval = (mp->worksample).wordpointer[0]; + rval <<= 8; + rval |= (mp->worksample).wordpointer[1]; + rval <<= 8; + rval |= (mp->worksample).wordpointer[2]; + rval <<= (mp->worksample).bitindex; + rval &= 0xffffff; + + (mp->worksample).bitindex += number_of_bits; + + rval >>= (24-number_of_bits); + + (mp->worksample).wordpointer += ((mp->worksample).bitindex>>3); + (mp->worksample).bitindex &= 7; + } + return rval; +} + +unsigned int getbits_fast(struct mpstr *mp, int number_of_bits) +{ + unsigned long rval; + + { + rval = (mp->worksample).wordpointer[0]; + rval <<= 8; + rval |= (mp->worksample).wordpointer[1]; + rval <<= (mp->worksample).bitindex; + rval &= 0xffff; + (mp->worksample).bitindex += number_of_bits; + + rval >>= (16-number_of_bits); + + (mp->worksample).wordpointer += ((mp->worksample).bitindex>>3); + (mp->worksample).bitindex &= 7; + } + return rval; +} + +unsigned int get1bit(struct mpstr *mp) +{ + unsigned char rval; + + rval = *((mp->worksample).wordpointer) << (mp->worksample).bitindex; + + (mp->worksample).bitindex++; + (mp->worksample).wordpointer += ((mp->worksample).bitindex>>3); + (mp->worksample).bitindex &= 7; + + return rval>>7; +} + + + --- /dev/null +++ b/addons/mp3/dct64_i386.c @@ -0,0 +1,335 @@ + +/* + * Discrete Cosine Tansform (DCT) for subband synthesis + * optimized for machines with no auto-increment. + * The performance is highly compiler dependend. Maybe + * the dct64.c version for 'normal' processor may be faster + * even for Intel processors. + */ + +#include "mpg123.h" + +/* + * the call via dct64 is a trick to force GCC to use + * (new) registers for the b1,b2 pointer to the bufs[xx] field + */ +void dct64(real *a,real *b,real *c); + +static void dct64_1(real *out0,real *out1,real *b1,real *b2,real *samples) +{ + { + register real *costab = pnts[0]; + + b1[0x00] = samples[0x00] + samples[0x1F]; + b1[0x01] = samples[0x01] + samples[0x1E]; + b1[0x1F] = (samples[0x00] - samples[0x1F]) * costab[0x0]; + b1[0x1E] = (samples[0x01] - samples[0x1E]) * costab[0x1]; + + b1[0x02] = samples[0x02] + samples[0x1D]; + b1[0x03] = samples[0x03] + samples[0x1C]; + b1[0x1D] = (samples[0x02] - samples[0x1D]) * costab[0x2]; + b1[0x1C] = (samples[0x03] - samples[0x1C]) * costab[0x3]; + + b1[0x04] = samples[0x04] + samples[0x1B]; + b1[0x05] = samples[0x05] + samples[0x1A]; + b1[0x1B] = (samples[0x04] - samples[0x1B]) * costab[0x4]; + b1[0x1A] = (samples[0x05] - samples[0x1A]) * costab[0x5]; + + b1[0x06] = samples[0x06] + samples[0x19]; + b1[0x07] = samples[0x07] + samples[0x18]; + b1[0x19] = (samples[0x06] - samples[0x19]) * costab[0x6]; + b1[0x18] = (samples[0x07] - samples[0x18]) * costab[0x7]; + + b1[0x08] = samples[0x08] + samples[0x17]; + b1[0x09] = samples[0x09] + samples[0x16]; + b1[0x17] = (samples[0x08] - samples[0x17]) * costab[0x8]; + b1[0x16] = (samples[0x09] - samples[0x16]) * costab[0x9]; + + b1[0x0A] = samples[0x0A] + samples[0x15]; + b1[0x0B] = samples[0x0B] + samples[0x14]; + b1[0x15] = (samples[0x0A] - samples[0x15]) * costab[0xA]; + b1[0x14] = (samples[0x0B] - samples[0x14]) * costab[0xB]; + + b1[0x0C] = samples[0x0C] + samples[0x13]; + b1[0x0D] = samples[0x0D] + samples[0x12]; + b1[0x13] = (samples[0x0C] - samples[0x13]) * costab[0xC]; + b1[0x12] = (samples[0x0D] - samples[0x12]) * costab[0xD]; + + b1[0x0E] = samples[0x0E] + samples[0x11]; + b1[0x0F] = samples[0x0F] + samples[0x10]; + b1[0x11] = (samples[0x0E] - samples[0x11]) * costab[0xE]; + b1[0x10] = (samples[0x0F] - samples[0x10]) * costab[0xF]; + + } + + + { + register real *costab = pnts[1]; + + b2[0x00] = b1[0x00] + b1[0x0F]; + b2[0x01] = b1[0x01] + b1[0x0E]; + b2[0x0F] = (b1[0x00] - b1[0x0F]) * costab[0]; + b2[0x0E] = (b1[0x01] - b1[0x0E]) * costab[1]; + + b2[0x02] = b1[0x02] + b1[0x0D]; + b2[0x03] = b1[0x03] + b1[0x0C]; + b2[0x0D] = (b1[0x02] - b1[0x0D]) * costab[2]; + b2[0x0C] = (b1[0x03] - b1[0x0C]) * costab[3]; + + b2[0x04] = b1[0x04] + b1[0x0B]; + b2[0x05] = b1[0x05] + b1[0x0A]; + b2[0x0B] = (b1[0x04] - b1[0x0B]) * costab[4]; + b2[0x0A] = (b1[0x05] - b1[0x0A]) * costab[5]; + + b2[0x06] = b1[0x06] + b1[0x09]; + b2[0x07] = b1[0x07] + b1[0x08]; + b2[0x09] = (b1[0x06] - b1[0x09]) * costab[6]; + b2[0x08] = (b1[0x07] - b1[0x08]) * costab[7]; + + /* */ + + b2[0x10] = b1[0x10] + b1[0x1F]; + b2[0x11] = b1[0x11] + b1[0x1E]; + b2[0x1F] = (b1[0x1F] - b1[0x10]) * costab[0]; + b2[0x1E] = (b1[0x1E] - b1[0x11]) * costab[1]; + + b2[0x12] = b1[0x12] + b1[0x1D]; + b2[0x13] = b1[0x13] + b1[0x1C]; + b2[0x1D] = (b1[0x1D] - b1[0x12]) * costab[2]; + b2[0x1C] = (b1[0x1C] - b1[0x13]) * costab[3]; + + b2[0x14] = b1[0x14] + b1[0x1B]; + b2[0x15] = b1[0x15] + b1[0x1A]; + b2[0x1B] = (b1[0x1B] - b1[0x14]) * costab[4]; + b2[0x1A] = (b1[0x1A] - b1[0x15]) * costab[5]; + + b2[0x16] = b1[0x16] + b1[0x19]; + b2[0x17] = b1[0x17] + b1[0x18]; + b2[0x19] = (b1[0x19] - b1[0x16]) * costab[6]; + b2[0x18] = (b1[0x18] - b1[0x17]) * costab[7]; + } + + { + register real *costab = pnts[2]; + + b1[0x00] = b2[0x00] + b2[0x07]; + b1[0x07] = (b2[0x00] - b2[0x07]) * costab[0]; + b1[0x01] = b2[0x01] + b2[0x06]; + b1[0x06] = (b2[0x01] - b2[0x06]) * costab[1]; + b1[0x02] = b2[0x02] + b2[0x05]; + b1[0x05] = (b2[0x02] - b2[0x05]) * costab[2]; + b1[0x03] = b2[0x03] + b2[0x04]; + b1[0x04] = (b2[0x03] - b2[0x04]) * costab[3]; + + b1[0x08] = b2[0x08] + b2[0x0F]; + b1[0x0F] = (b2[0x0F] - b2[0x08]) * costab[0]; + b1[0x09] = b2[0x09] + b2[0x0E]; + b1[0x0E] = (b2[0x0E] - b2[0x09]) * costab[1]; + b1[0x0A] = b2[0x0A] + b2[0x0D]; + b1[0x0D] = (b2[0x0D] - b2[0x0A]) * costab[2]; + b1[0x0B] = b2[0x0B] + b2[0x0C]; + b1[0x0C] = (b2[0x0C] - b2[0x0B]) * costab[3]; + + b1[0x10] = b2[0x10] + b2[0x17]; + b1[0x17] = (b2[0x10] - b2[0x17]) * costab[0]; + b1[0x11] = b2[0x11] + b2[0x16]; + b1[0x16] = (b2[0x11] - b2[0x16]) * costab[1]; + b1[0x12] = b2[0x12] + b2[0x15]; + b1[0x15] = (b2[0x12] - b2[0x15]) * costab[2]; + b1[0x13] = b2[0x13] + b2[0x14]; + b1[0x14] = (b2[0x13] - b2[0x14]) * costab[3]; + + b1[0x18] = b2[0x18] + b2[0x1F]; + b1[0x1F] = (b2[0x1F] - b2[0x18]) * costab[0]; + b1[0x19] = b2[0x19] + b2[0x1E]; + b1[0x1E] = (b2[0x1E] - b2[0x19]) * costab[1]; + b1[0x1A] = b2[0x1A] + b2[0x1D]; + b1[0x1D] = (b2[0x1D] - b2[0x1A]) * costab[2]; + b1[0x1B] = b2[0x1B] + b2[0x1C]; + b1[0x1C] = (b2[0x1C] - b2[0x1B]) * costab[3]; + } + + { + register real const cos0 = pnts[3][0]; + register real const cos1 = pnts[3][1]; + + b2[0x00] = b1[0x00] + b1[0x03]; + b2[0x03] = (b1[0x00] - b1[0x03]) * cos0; + b2[0x01] = b1[0x01] + b1[0x02]; + b2[0x02] = (b1[0x01] - b1[0x02]) * cos1; + + b2[0x04] = b1[0x04] + b1[0x07]; + b2[0x07] = (b1[0x07] - b1[0x04]) * cos0; + b2[0x05] = b1[0x05] + b1[0x06]; + b2[0x06] = (b1[0x06] - b1[0x05]) * cos1; + + b2[0x08] = b1[0x08] + b1[0x0B]; + b2[0x0B] = (b1[0x08] - b1[0x0B]) * cos0; + b2[0x09] = b1[0x09] + b1[0x0A]; + b2[0x0A] = (b1[0x09] - b1[0x0A]) * cos1; + + b2[0x0C] = b1[0x0C] + b1[0x0F]; + b2[0x0F] = (b1[0x0F] - b1[0x0C]) * cos0; + b2[0x0D] = b1[0x0D] + b1[0x0E]; + b2[0x0E] = (b1[0x0E] - b1[0x0D]) * cos1; + + b2[0x10] = b1[0x10] + b1[0x13]; + b2[0x13] = (b1[0x10] - b1[0x13]) * cos0; + b2[0x11] = b1[0x11] + b1[0x12]; + b2[0x12] = (b1[0x11] - b1[0x12]) * cos1; + + b2[0x14] = b1[0x14] + b1[0x17]; + b2[0x17] = (b1[0x17] - b1[0x14]) * cos0; + b2[0x15] = b1[0x15] + b1[0x16]; + b2[0x16] = (b1[0x16] - b1[0x15]) * cos1; + + b2[0x18] = b1[0x18] + b1[0x1B]; + b2[0x1B] = (b1[0x18] - b1[0x1B]) * cos0; + b2[0x19] = b1[0x19] + b1[0x1A]; + b2[0x1A] = (b1[0x19] - b1[0x1A]) * cos1; + + b2[0x1C] = b1[0x1C] + b1[0x1F]; + b2[0x1F] = (b1[0x1F] - b1[0x1C]) * cos0; + b2[0x1D] = b1[0x1D] + b1[0x1E]; + b2[0x1E] = (b1[0x1E] - b1[0x1D]) * cos1; + } + + { + register real const cos0 = pnts[4][0]; + + b1[0x00] = b2[0x00] + b2[0x01]; + b1[0x01] = (b2[0x00] - b2[0x01]) * cos0; + b1[0x02] = b2[0x02] + b2[0x03]; + b1[0x03] = (b2[0x03] - b2[0x02]) * cos0; + b1[0x02] += b1[0x03]; + + b1[0x04] = b2[0x04] + b2[0x05]; + b1[0x05] = (b2[0x04] - b2[0x05]) * cos0; + b1[0x06] = b2[0x06] + b2[0x07]; + b1[0x07] = (b2[0x07] - b2[0x06]) * cos0; + b1[0x06] += b1[0x07]; + b1[0x04] += b1[0x06]; + b1[0x06] += b1[0x05]; + b1[0x05] += b1[0x07]; + + b1[0x08] = b2[0x08] + b2[0x09]; + b1[0x09] = (b2[0x08] - b2[0x09]) * cos0; + b1[0x0A] = b2[0x0A] + b2[0x0B]; + b1[0x0B] = (b2[0x0B] - b2[0x0A]) * cos0; + b1[0x0A] += b1[0x0B]; + + b1[0x0C] = b2[0x0C] + b2[0x0D]; + b1[0x0D] = (b2[0x0C] - b2[0x0D]) * cos0; + b1[0x0E] = b2[0x0E] + b2[0x0F]; + b1[0x0F] = (b2[0x0F] - b2[0x0E]) * cos0; + b1[0x0E] += b1[0x0F]; + b1[0x0C] += b1[0x0E]; + b1[0x0E] += b1[0x0D]; + b1[0x0D] += b1[0x0F]; + + b1[0x10] = b2[0x10] + b2[0x11]; + b1[0x11] = (b2[0x10] - b2[0x11]) * cos0; + b1[0x12] = b2[0x12] + b2[0x13]; + b1[0x13] = (b2[0x13] - b2[0x12]) * cos0; + b1[0x12] += b1[0x13]; + + b1[0x14] = b2[0x14] + b2[0x15]; + b1[0x15] = (b2[0x14] - b2[0x15]) * cos0; + b1[0x16] = b2[0x16] + b2[0x17]; + b1[0x17] = (b2[0x17] - b2[0x16]) * cos0; + b1[0x16] += b1[0x17]; + b1[0x14] += b1[0x16]; + b1[0x16] += b1[0x15]; + b1[0x15] += b1[0x17]; + + b1[0x18] = b2[0x18] + b2[0x19]; + b1[0x19] = (b2[0x18] - b2[0x19]) * cos0; + b1[0x1A] = b2[0x1A] + b2[0x1B]; + b1[0x1B] = (b2[0x1B] - b2[0x1A]) * cos0; + b1[0x1A] += b1[0x1B]; + + b1[0x1C] = b2[0x1C] + b2[0x1D]; + b1[0x1D] = (b2[0x1C] - b2[0x1D]) * cos0; + b1[0x1E] = b2[0x1E] + b2[0x1F]; + b1[0x1F] = (b2[0x1F] - b2[0x1E]) * cos0; + b1[0x1E] += b1[0x1F]; + b1[0x1C] += b1[0x1E]; + b1[0x1E] += b1[0x1D]; + b1[0x1D] += b1[0x1F]; + } + + out0[0x10*16] = b1[0x00]; + out0[0x10*12] = b1[0x04]; + out0[0x10* 8] = b1[0x02]; + out0[0x10* 4] = b1[0x06]; + out0[0x10* 0] = b1[0x01]; + out1[0x10* 0] = b1[0x01]; + out1[0x10* 4] = b1[0x05]; + out1[0x10* 8] = b1[0x03]; + out1[0x10*12] = b1[0x07]; + +#if 1 + out0[0x10*14] = b1[0x08] + b1[0x0C]; + out0[0x10*10] = b1[0x0C] + b1[0x0a]; + out0[0x10* 6] = b1[0x0A] + b1[0x0E]; + out0[0x10* 2] = b1[0x0E] + b1[0x09]; + out1[0x10* 2] = b1[0x09] + b1[0x0D]; + out1[0x10* 6] = b1[0x0D] + b1[0x0B]; + out1[0x10*10] = b1[0x0B] + b1[0x0F]; + out1[0x10*14] = b1[0x0F]; +#else + b1[0x08] += b1[0x0C]; + out0[0x10*14] = b1[0x08]; + b1[0x0C] += b1[0x0a]; + out0[0x10*10] = b1[0x0C]; + b1[0x0A] += b1[0x0E]; + out0[0x10* 6] = b1[0x0A]; + b1[0x0E] += b1[0x09]; + out0[0x10* 2] = b1[0x0E]; + b1[0x09] += b1[0x0D]; + out1[0x10* 2] = b1[0x09]; + b1[0x0D] += b1[0x0B]; + out1[0x10* 6] = b1[0x0D]; + b1[0x0B] += b1[0x0F]; + out1[0x10*10] = b1[0x0B]; + out1[0x10*14] = b1[0x0F]; +#endif + + { + real tmp; + tmp = b1[0x18] + b1[0x1C]; + out0[0x10*15] = tmp + b1[0x10]; + out0[0x10*13] = tmp + b1[0x14]; + tmp = b1[0x1C] + b1[0x1A]; + out0[0x10*11] = tmp + b1[0x14]; + out0[0x10* 9] = tmp + b1[0x12]; + tmp = b1[0x1A] + b1[0x1E]; + out0[0x10* 7] = tmp + b1[0x12]; + out0[0x10* 5] = tmp + b1[0x16]; + tmp = b1[0x1E] + b1[0x19]; + out0[0x10* 3] = tmp + b1[0x16]; + out0[0x10* 1] = tmp + b1[0x11]; + tmp = b1[0x19] + b1[0x1D]; + out1[0x10* 1] = tmp + b1[0x11]; + out1[0x10* 3] = tmp + b1[0x15]; + tmp = b1[0x1D] + b1[0x1B]; + out1[0x10* 5] = tmp + b1[0x15]; + out1[0x10* 7] = tmp + b1[0x13]; + tmp = b1[0x1B] + b1[0x1F]; + out1[0x10* 9] = tmp + b1[0x13]; + out1[0x10*11] = tmp + b1[0x17]; + out1[0x10*13] = b1[0x17] + b1[0x1F]; + out1[0x10*15] = b1[0x1F]; + } +} + +/* + * the call via dct64 is a trick to force GCC to use + * (new) registers for the b1,b2 pointer to the bufs[xx] field + */ +void dct64(real *a,real *b,real *c) +{ + real bufs[0x40]; + dct64_1(a,b,bufs,bufs+0x20,c); +} + --- /dev/null +++ b/addons/mp3/decode_i386.c @@ -0,0 +1,153 @@ +/* + * Mpeg Layer-1,2,3 audio decoder + * ------------------------------ + * copyright (c) 1995,1996,1997 by Michael Hipp, All rights reserved. + * See also 'README' + * + * slighlty optimized for machines without autoincrement/decrement. + * The performance is highly compiler dependend. Maybe + * the decode.c version for 'normal' processor may be faster + * even for Intel processors. + */ + +#include +#include +#include + + +#include "mpglib.h" + + + + /* old WRITE_SAMPLE */ +#define WRITE_SAMPLE(samples,sum,clip) \ + if( (sum) > 32767.0) { *(samples) = 0x7fff; (clip)++; } \ + else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \ + else { *(samples) = sum; } + +int synth_1to1_mono(struct mpstr *mp,real *bandPtr,unsigned char *samples,int *pnt) +{ + short samples_tmp[64]; + short *tmp1 = samples_tmp; + int i,ret; + int pnt1 = 0; + + ret = synth_1to1(mp,bandPtr,0,(unsigned char *) samples_tmp,&pnt1); + samples += *pnt; + + for(i=0;i<32;i++) { + *( (short *) samples) = *tmp1; + samples += 2; + tmp1 += 2; + } + *pnt += 64; + + return ret; +} + + +int synth_1to1(struct mpstr *mp, real *bandPtr,int channel,unsigned char *out,int *pnt) +{ + static const int step = 2; + int bo; + short *samples = (short *) (out + *pnt); + + real *b0,(*buf)[0x110]; + int clip = 0; + int bo1; + + bo = mp->synth_bo; + + if(!channel) { + bo--; + bo &= 0xf; + buf = mp->synth_buffs[0]; + } + else { + samples++; + buf = mp->synth_buffs[1]; + } + + if(bo & 0x1) { + b0 = buf[0]; + bo1 = bo; + dct64(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr); + } + else { + b0 = buf[1]; + bo1 = bo+1; + dct64(buf[0]+bo,buf[1]+bo+1,bandPtr); + } + + mp->synth_bo = bo; + + { + register int j; + real *window = decwin + 16 - bo1; + + for (j=16;j;j--,b0+=0x10,window+=0x20,samples+=step) + { + real sum; + sum = window[0x0] * b0[0x0]; + sum -= window[0x1] * b0[0x1]; + sum += window[0x2] * b0[0x2]; + sum -= window[0x3] * b0[0x3]; + sum += window[0x4] * b0[0x4]; + sum -= window[0x5] * b0[0x5]; + sum += window[0x6] * b0[0x6]; + sum -= window[0x7] * b0[0x7]; + sum += window[0x8] * b0[0x8]; + sum -= window[0x9] * b0[0x9]; + sum += window[0xA] * b0[0xA]; + sum -= window[0xB] * b0[0xB]; + sum += window[0xC] * b0[0xC]; + sum -= window[0xD] * b0[0xD]; + sum += window[0xE] * b0[0xE]; + sum -= window[0xF] * b0[0xF]; + + WRITE_SAMPLE(samples,sum,clip); + } + + { + real sum; + sum = window[0x0] * b0[0x0]; + sum += window[0x2] * b0[0x2]; + sum += window[0x4] * b0[0x4]; + sum += window[0x6] * b0[0x6]; + sum += window[0x8] * b0[0x8]; + sum += window[0xA] * b0[0xA]; + sum += window[0xC] * b0[0xC]; + sum += window[0xE] * b0[0xE]; + WRITE_SAMPLE(samples,sum,clip); + b0-=0x10,window-=0x20,samples+=step; + } + window += bo1<<1; + + for (j=15;j;j--,b0-=0x10,window-=0x20,samples+=step) + { + real sum; + sum = -window[-0x1] * b0[0x0]; + sum -= window[-0x2] * b0[0x1]; + sum -= window[-0x3] * b0[0x2]; + sum -= window[-0x4] * b0[0x3]; + sum -= window[-0x5] * b0[0x4]; + sum -= window[-0x6] * b0[0x5]; + sum -= window[-0x7] * b0[0x6]; + sum -= window[-0x8] * b0[0x7]; + sum -= window[-0x9] * b0[0x8]; + sum -= window[-0xA] * b0[0x9]; + sum -= window[-0xB] * b0[0xA]; + sum -= window[-0xC] * b0[0xB]; + sum -= window[-0xD] * b0[0xC]; + sum -= window[-0xE] * b0[0xD]; + sum -= window[-0xF] * b0[0xE]; + sum -= window[-0x0] * b0[0xF]; + + WRITE_SAMPLE(samples,sum,clip); + } + } + *pnt += 128; + + return clip; +} + --- /dev/null +++ b/addons/mp3/decode_ntom.c @@ -0,0 +1,219 @@ +/* + * Mpeg Layer-1,2,3 audio decoder + * ------------------------------ + * copyright (c) 1995,1996,1997 by Michael Hipp, All rights reserved. + * See also 'README' + * + * N->M down/up sampling. Not optimized for speed. + */ + +#include "asterisk.h" +#include "asterisk/logger.h" +#include +#include +#include + +#include "mpg123.h" +#include "mpglib.h" + +#define WRITE_SAMPLE(samples,sum,clip) \ + if( (sum) > 32767.0) { *(samples) = 0x7fff; (clip)++; } \ + else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \ + else { *(samples) = sum; } + +#define NTOM_MUL (32768) +static unsigned long ntom_val[2] = { NTOM_MUL>>1,NTOM_MUL>>1 }; +static unsigned long ntom_step = NTOM_MUL; + + +int synth_ntom_set_step(long m,long n) +{ + if(param.verbose > 1) + ast_log(LOG_WARNING,"Init rate converter: %ld->%ld\n",m,n); + + if(n >= 96000 || m >= 96000 || m == 0 || n == 0) { + ast_log(LOG_WARNING,"NtoM converter: illegal rates\n"); + return (1); + } + + n *= NTOM_MUL; + ntom_step = n / m; + + if(ntom_step > 8*NTOM_MUL) { + ast_log(LOG_WARNING,"max. 1:8 conversion allowed!\n"); + return (1); + } + + ntom_val[0] = ntom_val[1] = NTOM_MUL>>1; + + return (0); + +} + + +int synth_ntom_mono (struct mpstr *mp, real *bandPtr,unsigned char *samples,int *pnt) +{ + short samples_tmp[8*64]; + short *tmp1 = samples_tmp; + int i,ret; + int pnt1 = 0; + + ret = synth_ntom(mp, bandPtr,0,(unsigned char *) samples_tmp,&pnt1); + samples += *pnt; + + for(i=0;i<(pnt1>>2);i++) { + *( (short *)samples) = *tmp1; + samples += 2; + tmp1 += 2; + } + *pnt += pnt1 >> 1; + + return ret; +} + + + +int synth_ntom(struct mpstr *mp, real *bandPtr,int channel,unsigned char *out,int *pnt) +{ + static const int step = 2; + int bo; + short *samples = (short *) (out + *pnt); + + real *b0,(*buf)[0x110]; + int clip = 0; + int bo1; + int ntom; + + bo = mp->synth_bo; + + if(!channel) { + bo--; + bo &= 0xf; + buf = mp->synth_buffs[0]; + ntom = ntom_val[1] = ntom_val[0]; + } + else { + samples++; + out += 2; /* to compute the right *pnt value */ + buf = mp->synth_buffs[1]; + ntom = ntom_val[1]; + } + + if(bo & 0x1) { + b0 = buf[0]; + bo1 = bo; + dct64(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr); + } + else { + b0 = buf[1]; + bo1 = bo+1; + dct64(buf[0]+bo,buf[1]+bo+1,bandPtr); + } + + mp->synth_bo = bo; + + { + register int j; + real *window = (mp->decwin) + 16 - bo1; + + for (j=16;j;j--,window+=0x10) + { + real sum; + + ntom += ntom_step; + if(ntom < NTOM_MUL) { + window += 16; + b0 += 16; + continue; + } + + sum = *window++ * *b0++; + sum -= *window++ * *b0++; + sum += *window++ * *b0++; + sum -= *window++ * *b0++; + sum += *window++ * *b0++; + sum -= *window++ * *b0++; + sum += *window++ * *b0++; + sum -= *window++ * *b0++; + sum += *window++ * *b0++; + sum -= *window++ * *b0++; + sum += *window++ * *b0++; + sum -= *window++ * *b0++; + sum += *window++ * *b0++; + sum -= *window++ * *b0++; + sum += *window++ * *b0++; + sum -= *window++ * *b0++; + + while(ntom >= NTOM_MUL) { + WRITE_SAMPLE(samples,sum,clip); + samples += step; + ntom -= NTOM_MUL; + } + } + + ntom += ntom_step; + if(ntom >= NTOM_MUL) + { + real sum; + sum = window[0x0] * b0[0x0]; + sum += window[0x2] * b0[0x2]; + sum += window[0x4] * b0[0x4]; + sum += window[0x6] * b0[0x6]; + sum += window[0x8] * b0[0x8]; + sum += window[0xA] * b0[0xA]; + sum += window[0xC] * b0[0xC]; + sum += window[0xE] * b0[0xE]; + + while(ntom >= NTOM_MUL) { + WRITE_SAMPLE(samples,sum,clip); + samples += step; + ntom -= NTOM_MUL; + } + } + + b0-=0x10,window-=0x20; + window += bo1<<1; + + for (j=15;j;j--,b0-=0x20,window-=0x10) + { + real sum; + + ntom += ntom_step; + if(ntom < NTOM_MUL) { + window -= 16; + b0 += 16; + continue; + } + + sum = -*(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + sum -= *(--window) * *b0++; + + while(ntom >= NTOM_MUL) { + WRITE_SAMPLE(samples,sum,clip); + samples += step; + ntom -= NTOM_MUL; + } + } + } + + ntom_val[channel] = ntom; + *pnt = ((unsigned char *) samples - out); + + return clip; +} + + --- /dev/null +++ b/addons/mp3/huffman.h @@ -0,0 +1,332 @@ +/* + * huffman tables ... recalcualted to work with my optimzed + * decoder scheme (MH) + * + * probably we could save a few bytes of memory, because the + * smaller tables are often the part of a bigger table + */ + +struct newhuff +{ + unsigned int linbits; + short *table; +}; + +static short tab0[] = +{ + 0 +}; + +static short tab1[] = +{ + -5, -3, -1, 17, 1, 16, 0 +}; + +static short tab2[] = +{ + -15, -11, -9, -5, -3, -1, 34, 2, 18, -1, 33, 32, 17, -1, 1, + 16, 0 +}; + +static short tab3[] = +{ + -13, -11, -9, -5, -3, -1, 34, 2, 18, -1, 33, 32, 16, 17, -1, + 1, 0 +}; + +static short tab5[] = +{ + -29, -25, -23, -15, -7, -5, -3, -1, 51, 35, 50, 49, -3, -1, 19, + 3, -1, 48, 34, -3, -1, 18, 33, -1, 2, 32, 17, -1, 1, 16, + 0 +}; + +static short tab6[] = +{ + -25, -19, -13, -9, -5, -3, -1, 51, 3, 35, -1, 50, 48, -1, 19, + 49, -3, -1, 34, 2, 18, -3, -1, 33, 32, 1, -1, 17, -1, 16, + 0 +}; + +static short tab7[] = +{ + -69, -65, -57, -39, -29, -17, -11, -7, -3, -1, 85, 69, -1, 84, 83, + -1, 53, 68, -3, -1, 37, 82, 21, -5, -1, 81, -1, 5, 52, -1, + 80, -1, 67, 51, -5, -3, -1, 36, 66, 20, -1, 65, 64, -11, -7, + -3, -1, 4, 35, -1, 50, 3, -1, 19, 49, -3, -1, 48, 34, 18, + -5, -1, 33, -1, 2, 32, 17, -1, 1, 16, 0 +}; + +static short tab8[] = +{ + -65, -63, -59, -45, -31, -19, -13, -7, -5, -3, -1, 85, 84, 69, 83, + -3, -1, 53, 68, 37, -3, -1, 82, 5, 21, -5, -1, 81, -1, 52, + 67, -3, -1, 80, 51, 36, -5, -3, -1, 66, 20, 65, -3, -1, 4, + 64, -1, 35, 50, -9, -7, -3, -1, 19, 49, -1, 3, 48, 34, -1, + 2, 32, -1, 18, 33, 17, -3, -1, 1, 16, 0 +}; + +static short tab9[] = +{ + -63, -53, -41, -29, -19, -11, -5, -3, -1, 85, 69, 53, -1, 83, -1, + 84, 5, -3, -1, 68, 37, -1, 82, 21, -3, -1, 81, 52, -1, 67, + -1, 80, 4, -7, -3, -1, 36, 66, -1, 51, 64, -1, 20, 65, -5, + -3, -1, 35, 50, 19, -1, 49, -1, 3, 48, -5, -3, -1, 34, 2, + 18, -1, 33, 32, -3, -1, 17, 1, -1, 16, 0 +}; + +static short tab10[] = +{ +-125,-121,-111, -83, -55, -35, -21, -13, -7, -3, -1, 119, 103, -1, 118, + 87, -3, -1, 117, 102, 71, -3, -1, 116, 86, -1, 101, 55, -9, -3, + -1, 115, 70, -3, -1, 85, 84, 99, -1, 39, 114, -11, -5, -3, -1, + 100, 7, 112, -1, 98, -1, 69, 53, -5, -1, 6, -1, 83, 68, 23, + -17, -5, -1, 113, -1, 54, 38, -5, -3, -1, 37, 82, 21, -1, 81, + -1, 52, 67, -3, -1, 22, 97, -1, 96, -1, 5, 80, -19, -11, -7, + -3, -1, 36, 66, -1, 51, 4, -1, 20, 65, -3, -1, 64, 35, -1, + 50, 3, -3, -1, 19, 49, -1, 48, 34, -7, -3, -1, 18, 33, -1, + 2, 32, 17, -1, 1, 16, 0 +}; + +static short tab11[] = +{ +-121,-113, -89, -59, -43, -27, -17, -7, -3, -1, 119, 103, -1, 118, 117, + -3, -1, 102, 71, -1, 116, -1, 87, 85, -5, -3, -1, 86, 101, 55, + -1, 115, 70, -9, -7, -3, -1, 69, 84, -1, 53, 83, 39, -1, 114, + -1, 100, 7, -5, -1, 113, -1, 23, 112, -3, -1, 54, 99, -1, 96, + -1, 68, 37, -13, -7, -5, -3, -1, 82, 5, 21, 98, -3, -1, 38, + 6, 22, -5, -1, 97, -1, 81, 52, -5, -1, 80, -1, 67, 51, -1, + 36, 66, -15, -11, -7, -3, -1, 20, 65, -1, 4, 64, -1, 35, 50, + -1, 19, 49, -5, -3, -1, 3, 48, 34, 33, -5, -1, 18, -1, 2, + 32, 17, -3, -1, 1, 16, 0 +}; + +static short tab12[] = +{ +-115, -99, -73, -45, -27, -17, -9, -5, -3, -1, 119, 103, 118, -1, 87, + 117, -3, -1, 102, 71, -1, 116, 101, -3, -1, 86, 55, -3, -1, 115, + 85, 39, -7, -3, -1, 114, 70, -1, 100, 23, -5, -1, 113, -1, 7, + 112, -1, 54, 99, -13, -9, -3, -1, 69, 84, -1, 68, -1, 6, 5, + -1, 38, 98, -5, -1, 97, -1, 22, 96, -3, -1, 53, 83, -1, 37, + 82, -17, -7, -3, -1, 21, 81, -1, 52, 67, -5, -3, -1, 80, 4, + 36, -1, 66, 20, -3, -1, 51, 65, -1, 35, 50, -11, -7, -5, -3, + -1, 64, 3, 48, 19, -1, 49, 34, -1, 18, 33, -7, -5, -3, -1, + 2, 32, 0, 17, -1, 1, 16 +}; + +static short tab13[] = +{ +-509,-503,-475,-405,-333,-265,-205,-153,-115, -83, -53, -35, -21, -13, -9, + -7, -5, -3, -1, 254, 252, 253, 237, 255, -1, 239, 223, -3, -1, 238, + 207, -1, 222, 191, -9, -3, -1, 251, 206, -1, 220, -1, 175, 233, -1, + 236, 221, -9, -5, -3, -1, 250, 205, 190, -1, 235, 159, -3, -1, 249, + 234, -1, 189, 219, -17, -9, -3, -1, 143, 248, -1, 204, -1, 174, 158, + -5, -1, 142, -1, 127, 126, 247, -5, -1, 218, -1, 173, 188, -3, -1, + 203, 246, 111, -15, -7, -3, -1, 232, 95, -1, 157, 217, -3, -1, 245, + 231, -1, 172, 187, -9, -3, -1, 79, 244, -3, -1, 202, 230, 243, -1, + 63, -1, 141, 216, -21, -9, -3, -1, 47, 242, -3, -1, 110, 156, 15, + -5, -3, -1, 201, 94, 171, -3, -1, 125, 215, 78, -11, -5, -3, -1, + 200, 214, 62, -1, 185, -1, 155, 170, -1, 31, 241, -23, -13, -5, -1, + 240, -1, 186, 229, -3, -1, 228, 140, -1, 109, 227, -5, -1, 226, -1, + 46, 14, -1, 30, 225, -15, -7, -3, -1, 224, 93, -1, 213, 124, -3, + -1, 199, 77, -1, 139, 184, -7, -3, -1, 212, 154, -1, 169, 108, -1, + 198, 61, -37, -21, -9, -5, -3, -1, 211, 123, 45, -1, 210, 29, -5, + -1, 183, -1, 92, 197, -3, -1, 153, 122, 195, -7, -5, -3, -1, 167, + 151, 75, 209, -3, -1, 13, 208, -1, 138, 168, -11, -7, -3, -1, 76, + 196, -1, 107, 182, -1, 60, 44, -3, -1, 194, 91, -3, -1, 181, 137, + 28, -43, -23, -11, -5, -1, 193, -1, 152, 12, -1, 192, -1, 180, 106, + -5, -3, -1, 166, 121, 59, -1, 179, -1, 136, 90, -11, -5, -1, 43, + -1, 165, 105, -1, 164, -1, 120, 135, -5, -1, 148, -1, 119, 118, 178, + -11, -3, -1, 27, 177, -3, -1, 11, 176, -1, 150, 74, -7, -3, -1, + 58, 163, -1, 89, 149, -1, 42, 162, -47, -23, -9, -3, -1, 26, 161, + -3, -1, 10, 104, 160, -5, -3, -1, 134, 73, 147, -3, -1, 57, 88, + -1, 133, 103, -9, -3, -1, 41, 146, -3, -1, 87, 117, 56, -5, -1, + 131, -1, 102, 71, -3, -1, 116, 86, -1, 101, 115, -11, -3, -1, 25, + 145, -3, -1, 9, 144, -1, 72, 132, -7, -5, -1, 114, -1, 70, 100, + 40, -1, 130, 24, -41, -27, -11, -5, -3, -1, 55, 39, 23, -1, 113, + -1, 85, 7, -7, -3, -1, 112, 54, -1, 99, 69, -3, -1, 84, 38, + -1, 98, 53, -5, -1, 129, -1, 8, 128, -3, -1, 22, 97, -1, 6, + 96, -13, -9, -5, -3, -1, 83, 68, 37, -1, 82, 5, -1, 21, 81, + -7, -3, -1, 52, 67, -1, 80, 36, -3, -1, 66, 51, 20, -19, -11, + -5, -1, 65, -1, 4, 64, -3, -1, 35, 50, 19, -3, -1, 49, 3, + -1, 48, 34, -3, -1, 18, 33, -1, 2, 32, -3, -1, 17, 1, 16, + 0 +}; + +static short tab15[] = +{ +-495,-445,-355,-263,-183,-115, -77, -43, -27, -13, -7, -3, -1, 255, 239, + -1, 254, 223, -1, 238, -1, 253, 207, -7, -3, -1, 252, 222, -1, 237, + 191, -1, 251, -1, 206, 236, -7, -3, -1, 221, 175, -1, 250, 190, -3, + -1, 235, 205, -1, 220, 159, -15, -7, -3, -1, 249, 234, -1, 189, 219, + -3, -1, 143, 248, -1, 204, 158, -7, -3, -1, 233, 127, -1, 247, 173, + -3, -1, 218, 188, -1, 111, -1, 174, 15, -19, -11, -3, -1, 203, 246, + -3, -1, 142, 232, -1, 95, 157, -3, -1, 245, 126, -1, 231, 172, -9, + -3, -1, 202, 187, -3, -1, 217, 141, 79, -3, -1, 244, 63, -1, 243, + 216, -33, -17, -9, -3, -1, 230, 47, -1, 242, -1, 110, 240, -3, -1, + 31, 241, -1, 156, 201, -7, -3, -1, 94, 171, -1, 186, 229, -3, -1, + 125, 215, -1, 78, 228, -15, -7, -3, -1, 140, 200, -1, 62, 109, -3, + -1, 214, 227, -1, 155, 185, -7, -3, -1, 46, 170, -1, 226, 30, -5, + -1, 225, -1, 14, 224, -1, 93, 213, -45, -25, -13, -7, -3, -1, 124, + 199, -1, 77, 139, -1, 212, -1, 184, 154, -7, -3, -1, 169, 108, -1, + 198, 61, -1, 211, 210, -9, -5, -3, -1, 45, 13, 29, -1, 123, 183, + -5, -1, 209, -1, 92, 208, -1, 197, 138, -17, -7, -3, -1, 168, 76, + -1, 196, 107, -5, -1, 182, -1, 153, 12, -1, 60, 195, -9, -3, -1, + 122, 167, -1, 166, -1, 192, 11, -1, 194, -1, 44, 91, -55, -29, -15, + -7, -3, -1, 181, 28, -1, 137, 152, -3, -1, 193, 75, -1, 180, 106, + -5, -3, -1, 59, 121, 179, -3, -1, 151, 136, -1, 43, 90, -11, -5, + -1, 178, -1, 165, 27, -1, 177, -1, 176, 105, -7, -3, -1, 150, 74, + -1, 164, 120, -3, -1, 135, 58, 163, -17, -7, -3, -1, 89, 149, -1, + 42, 162, -3, -1, 26, 161, -3, -1, 10, 160, 104, -7, -3, -1, 134, + 73, -1, 148, 57, -5, -1, 147, -1, 119, 9, -1, 88, 133, -53, -29, + -13, -7, -3, -1, 41, 103, -1, 118, 146, -1, 145, -1, 25, 144, -7, + -3, -1, 72, 132, -1, 87, 117, -3, -1, 56, 131, -1, 102, 71, -7, + -3, -1, 40, 130, -1, 24, 129, -7, -3, -1, 116, 8, -1, 128, 86, + -3, -1, 101, 55, -1, 115, 70, -17, -7, -3, -1, 39, 114, -1, 100, + 23, -3, -1, 85, 113, -3, -1, 7, 112, 54, -7, -3, -1, 99, 69, + -1, 84, 38, -3, -1, 98, 22, -3, -1, 6, 96, 53, -33, -19, -9, + -5, -1, 97, -1, 83, 68, -1, 37, 82, -3, -1, 21, 81, -3, -1, + 5, 80, 52, -7, -3, -1, 67, 36, -1, 66, 51, -1, 65, -1, 20, + 4, -9, -3, -1, 35, 50, -3, -1, 64, 3, 19, -3, -1, 49, 48, + 34, -9, -7, -3, -1, 18, 33, -1, 2, 32, 17, -3, -1, 1, 16, + 0 +}; + +static short tab16[] = +{ +-509,-503,-461,-323,-103, -37, -27, -15, -7, -3, -1, 239, 254, -1, 223, + 253, -3, -1, 207, 252, -1, 191, 251, -5, -1, 175, -1, 250, 159, -3, + -1, 249, 248, 143, -7, -3, -1, 127, 247, -1, 111, 246, 255, -9, -5, + -3, -1, 95, 245, 79, -1, 244, 243, -53, -1, 240, -1, 63, -29, -19, + -13, -7, -5, -1, 206, -1, 236, 221, 222, -1, 233, -1, 234, 217, -1, + 238, -1, 237, 235, -3, -1, 190, 205, -3, -1, 220, 219, 174, -11, -5, + -1, 204, -1, 173, 218, -3, -1, 126, 172, 202, -5, -3, -1, 201, 125, + 94, 189, 242, -93, -5, -3, -1, 47, 15, 31, -1, 241, -49, -25, -13, + -5, -1, 158, -1, 188, 203, -3, -1, 142, 232, -1, 157, 231, -7, -3, + -1, 187, 141, -1, 216, 110, -1, 230, 156, -13, -7, -3, -1, 171, 186, + -1, 229, 215, -1, 78, -1, 228, 140, -3, -1, 200, 62, -1, 109, -1, + 214, 155, -19, -11, -5, -3, -1, 185, 170, 225, -1, 212, -1, 184, 169, + -5, -1, 123, -1, 183, 208, 227, -7, -3, -1, 14, 224, -1, 93, 213, + -3, -1, 124, 199, -1, 77, 139, -75, -45, -27, -13, -7, -3, -1, 154, + 108, -1, 198, 61, -3, -1, 92, 197, 13, -7, -3, -1, 138, 168, -1, + 153, 76, -3, -1, 182, 122, 60, -11, -5, -3, -1, 91, 137, 28, -1, + 192, -1, 152, 121, -1, 226, -1, 46, 30, -15, -7, -3, -1, 211, 45, + -1, 210, 209, -5, -1, 59, -1, 151, 136, 29, -7, -3, -1, 196, 107, + -1, 195, 167, -1, 44, -1, 194, 181, -23, -13, -7, -3, -1, 193, 12, + -1, 75, 180, -3, -1, 106, 166, 179, -5, -3, -1, 90, 165, 43, -1, + 178, 27, -13, -5, -1, 177, -1, 11, 176, -3, -1, 105, 150, -1, 74, + 164, -5, -3, -1, 120, 135, 163, -3, -1, 58, 89, 42, -97, -57, -33, + -19, -11, -5, -3, -1, 149, 104, 161, -3, -1, 134, 119, 148, -5, -3, + -1, 73, 87, 103, 162, -5, -1, 26, -1, 10, 160, -3, -1, 57, 147, + -1, 88, 133, -9, -3, -1, 41, 146, -3, -1, 118, 9, 25, -5, -1, + 145, -1, 144, 72, -3, -1, 132, 117, -1, 56, 131, -21, -11, -5, -3, + -1, 102, 40, 130, -3, -1, 71, 116, 24, -3, -1, 129, 128, -3, -1, + 8, 86, 55, -9, -5, -1, 115, -1, 101, 70, -1, 39, 114, -5, -3, + -1, 100, 85, 7, 23, -23, -13, -5, -1, 113, -1, 112, 54, -3, -1, + 99, 69, -1, 84, 38, -3, -1, 98, 22, -1, 97, -1, 6, 96, -9, + -5, -1, 83, -1, 53, 68, -1, 37, 82, -1, 81, -1, 21, 5, -33, + -23, -13, -7, -3, -1, 52, 67, -1, 80, 36, -3, -1, 66, 51, 20, + -5, -1, 65, -1, 4, 64, -1, 35, 50, -3, -1, 19, 49, -3, -1, + 3, 48, 34, -3, -1, 18, 33, -1, 2, 32, -3, -1, 17, 1, 16, + 0 +}; + +static short tab24[] = +{ +-451,-117, -43, -25, -15, -7, -3, -1, 239, 254, -1, 223, 253, -3, -1, + 207, 252, -1, 191, 251, -5, -1, 250, -1, 175, 159, -1, 249, 248, -9, + -5, -3, -1, 143, 127, 247, -1, 111, 246, -3, -1, 95, 245, -1, 79, + 244, -71, -7, -3, -1, 63, 243, -1, 47, 242, -5, -1, 241, -1, 31, + 240, -25, -9, -1, 15, -3, -1, 238, 222, -1, 237, 206, -7, -3, -1, + 236, 221, -1, 190, 235, -3, -1, 205, 220, -1, 174, 234, -15, -7, -3, + -1, 189, 219, -1, 204, 158, -3, -1, 233, 173, -1, 218, 188, -7, -3, + -1, 203, 142, -1, 232, 157, -3, -1, 217, 126, -1, 231, 172, 255,-235, +-143, -77, -45, -25, -15, -7, -3, -1, 202, 187, -1, 141, 216, -5, -3, + -1, 14, 224, 13, 230, -5, -3, -1, 110, 156, 201, -1, 94, 186, -9, + -5, -1, 229, -1, 171, 125, -1, 215, 228, -3, -1, 140, 200, -3, -1, + 78, 46, 62, -15, -7, -3, -1, 109, 214, -1, 227, 155, -3, -1, 185, + 170, -1, 226, 30, -7, -3, -1, 225, 93, -1, 213, 124, -3, -1, 199, + 77, -1, 139, 184, -31, -15, -7, -3, -1, 212, 154, -1, 169, 108, -3, + -1, 198, 61, -1, 211, 45, -7, -3, -1, 210, 29, -1, 123, 183, -3, + -1, 209, 92, -1, 197, 138, -17, -7, -3, -1, 168, 153, -1, 76, 196, + -3, -1, 107, 182, -3, -1, 208, 12, 60, -7, -3, -1, 195, 122, -1, + 167, 44, -3, -1, 194, 91, -1, 181, 28, -57, -35, -19, -7, -3, -1, + 137, 152, -1, 193, 75, -5, -3, -1, 192, 11, 59, -3, -1, 176, 10, + 26, -5, -1, 180, -1, 106, 166, -3, -1, 121, 151, -3, -1, 160, 9, + 144, -9, -3, -1, 179, 136, -3, -1, 43, 90, 178, -7, -3, -1, 165, + 27, -1, 177, 105, -1, 150, 164, -17, -9, -5, -3, -1, 74, 120, 135, + -1, 58, 163, -3, -1, 89, 149, -1, 42, 162, -7, -3, -1, 161, 104, + -1, 134, 119, -3, -1, 73, 148, -1, 57, 147, -63, -31, -15, -7, -3, + -1, 88, 133, -1, 41, 103, -3, -1, 118, 146, -1, 25, 145, -7, -3, + -1, 72, 132, -1, 87, 117, -3, -1, 56, 131, -1, 102, 40, -17, -7, + -3, -1, 130, 24, -1, 71, 116, -5, -1, 129, -1, 8, 128, -1, 86, + 101, -7, -5, -1, 23, -1, 7, 112, 115, -3, -1, 55, 39, 114, -15, + -7, -3, -1, 70, 100, -1, 85, 113, -3, -1, 54, 99, -1, 69, 84, + -7, -3, -1, 38, 98, -1, 22, 97, -5, -3, -1, 6, 96, 53, -1, + 83, 68, -51, -37, -23, -15, -9, -3, -1, 37, 82, -1, 21, -1, 5, + 80, -1, 81, -1, 52, 67, -3, -1, 36, 66, -1, 51, 20, -9, -5, + -1, 65, -1, 4, 64, -1, 35, 50, -1, 19, 49, -7, -5, -3, -1, + 3, 48, 34, 18, -1, 33, -1, 2, 32, -3, -1, 17, 1, -1, 16, + 0 +}; + +static short tab_c0[] = +{ + -29, -21, -13, -7, -3, -1, 11, 15, -1, 13, 14, -3, -1, 7, 5, + 9, -3, -1, 6, 3, -1, 10, 12, -3, -1, 2, 1, -1, 4, 8, + 0 +}; + +static short tab_c1[] = +{ + -15, -7, -3, -1, 15, 14, -1, 13, 12, -3, -1, 11, 10, -1, 9, + 8, -7, -3, -1, 7, 6, -1, 5, 4, -3, -1, 3, 2, -1, 1, + 0 +}; + + + +static struct newhuff ht[] = +{ + { /* 0 */ 0 , tab0 } , + { /* 2 */ 0 , tab1 } , + { /* 3 */ 0 , tab2 } , + { /* 3 */ 0 , tab3 } , + { /* 0 */ 0 , tab0 } , + { /* 4 */ 0 , tab5 } , + { /* 4 */ 0 , tab6 } , + { /* 6 */ 0 , tab7 } , + { /* 6 */ 0 , tab8 } , + { /* 6 */ 0 , tab9 } , + { /* 8 */ 0 , tab10 } , + { /* 8 */ 0 , tab11 } , + { /* 8 */ 0 , tab12 } , + { /* 16 */ 0 , tab13 } , + { /* 0 */ 0 , tab0 } , + { /* 16 */ 0 , tab15 } , + + { /* 16 */ 1 , tab16 } , + { /* 16 */ 2 , tab16 } , + { /* 16 */ 3 , tab16 } , + { /* 16 */ 4 , tab16 } , + { /* 16 */ 6 , tab16 } , + { /* 16 */ 8 , tab16 } , + { /* 16 */ 10, tab16 } , + { /* 16 */ 13, tab16 } , + { /* 16 */ 4 , tab24 } , + { /* 16 */ 5 , tab24 } , + { /* 16 */ 6 , tab24 } , + { /* 16 */ 7 , tab24 } , + { /* 16 */ 8 , tab24 } , + { /* 16 */ 9 , tab24 } , + { /* 16 */ 11, tab24 } , + { /* 16 */ 13, tab24 } +}; + +static struct newhuff htc[] = +{ + { /* 1 , 1 , */ 0 , tab_c0 } , + { /* 1 , 1 , */ 0 , tab_c1 } +}; + + --- /dev/null +++ b/addons/mp3/interface.c @@ -0,0 +1,323 @@ +#include "asterisk.h" +#include "asterisk/logger.h" + +#include +#include + +#include "mpg123.h" +#include "mpglib.h" + + +void InitMP3Constants(void) +{ + init_layer3_const(); + make_decode_tables_const(); + +} + + +BOOL InitMP3(struct mpstr *mp, long outscale) +{ + /* quiet 4096 med 8192 */ + + memset(mp,0,sizeof(struct mpstr)); + + mp->framesize = 0; + mp->fsizeold = -1; + mp->bsize = 0; + mp->head = mp->tail = NULL; + mp->fr.single = 3; /* force mono */ + mp->bsnum = 0; + mp->synth_bo = 1; + mp->outsamplerate = 8000; + + make_decode_tables_scale(mp, outscale); + + init_layer3_sample_limits(mp, SBLIMIT); + + return !0; +} + +void ExitMP3(struct mpstr *mp) +{ + struct buf *b,*bn; + + b = mp->tail; + while(b) { + free(b->pnt); + bn = b->next; + free(b); + b = bn; + } +} + +static struct buf *addbuf(struct mpstr *mp,char *buf,int size) +{ + struct buf *nbuf; + + nbuf = malloc( sizeof(struct buf) ); + if(!nbuf) { + ast_log(LOG_WARNING,"Out of memory!\n"); + return NULL; + } + nbuf->pnt = malloc(size); + if(!nbuf->pnt) { + free(nbuf); + return NULL; + } + nbuf->size = size; + memcpy(nbuf->pnt,buf,size); + nbuf->next = NULL; + nbuf->prev = mp->head; + nbuf->pos = 0; + + if(!mp->tail) { + mp->tail = nbuf; + } + else { + mp->head->next = nbuf; + } + + mp->head = nbuf; + mp->bsize += size; + + return nbuf; +} + +static void remove_buf(struct mpstr *mp) +{ + struct buf *buf = mp->tail; + + mp->tail = buf->next; + if(mp->tail) + mp->tail->prev = NULL; + else { + mp->tail = mp->head = NULL; + } + + free(buf->pnt); + free(buf); + +} + +static int read_buf_byte(int *error, struct mpstr *mp) +{ + unsigned int b;int pos; + + pos = mp->tail->pos; + while(pos >= mp->tail->size) { + remove_buf(mp); + pos = mp->tail->pos; + if(!mp->tail) { + /* We may pick up this error a few times*/ + /* But things have gone pear shaped */ + ast_log(LOG_WARNING,"Fatal Buffer error!\n"); + *error = 1; + return (0); + } + } + + b = mp->tail->pnt[pos]; + mp->bsize--; + mp->tail->pos++; + + + return b; +} + +static int read_head(struct mpstr *mp) +{ + unsigned long head; + int error=0; + + + head = read_buf_byte(&error, mp); + head <<= 8; + head |= read_buf_byte(&error, mp); + head <<= 8; + head |= read_buf_byte(&error, mp); + head <<= 8; + head |= read_buf_byte(&error, mp); + + mp->header = head; + + if(error){ + return (1); + }else + return (0); + +} + +static int head_check(unsigned long head) +{ + if( (head & 0xffe00000) != 0xffe00000) + return FALSE; + if(!((head>>17)&3)) + return FALSE; + if( ((head>>12)&0xf) == 0xf || ((head>>12)&0xf) == 0) + return FALSE; + if( ((head>>10)&0x3) == 0x3 ) + return FALSE; + if ((head & 0xffff0000) == 0xfffe0000) + return FALSE; + + return TRUE; +} + +static int head_shift(struct mpstr *mp) +{ + unsigned long head; + int error = 0; + + head = mp->header; + + head <<= 8; + head |= read_buf_byte(&error, mp); + + mp->header = head; + + if (error){ + return (1); + }else + return (0); + +} + + +int decodeMP3(struct mpstr *mp,char *in,int isize,char *out, + int osize,int *done) +{ + int len; + long n,m; + int down_sample_sblimit; + + if(osize < 4608) { + ast_log(LOG_WARNING,"To less out space\n"); + return MP3_ERR; + } + + if(in) { + if(addbuf(mp,in,isize) == NULL) { + return MP3_ERR; + } + } + + /* First decode header */ + if(mp->framesize == 0) { + if(mp->bsize < 4) { + return MP3_NEED_MORE; + } + if (read_head(mp)) + return MP3_ERR; + + if(!head_check(mp->header) ) { + int i; + + ast_log(LOG_WARNING,"Junk at the beginning of frame %08lx\n",mp->header); + + /* step in byte steps through next 64K */ + for(i=0;i<65536;i++) { + if(!mp->bsize) + return MP3_NEED_MORE; + + if(head_shift(mp)) + return MP3_ERR; + + if(head_check(mp->header)) + break; + } + if(i == 65536) { + ast_log(LOG_WARNING,"Giving up searching valid MPEG header\n"); + return MP3_ERR; + } + } + + decode_header(&mp->fr,mp->header); + mp->framesize = mp->fr.framesize; + + if (!mp->initmp3){ + mp->initmp3 = 1; + + n = freqs[mp->fr.sampling_frequency]; + if (mp->outsamplerate) { + m = mp->outsamplerate; + } + else { + m =n; + } + + if (synth_ntom_set_step(n,m)) + return MP3_ERR; + + + if(n>m) { + down_sample_sblimit = SBLIMIT * m; + down_sample_sblimit /= n; + } + else { + down_sample_sblimit = SBLIMIT; + } + + init_layer3_sample_limits(mp, down_sample_sblimit); + + } + } + + + if(mp->fr.framesize > mp->bsize) + return MP3_NEED_MORE; + + (mp->worksample).wordpointer = mp->bsspace[mp->bsnum] + 512; + mp->bsnum = (mp->bsnum + 1) & 0x1; + (mp->worksample).bitindex = 0; + + len = 0; + while(len < mp->framesize) { + int nlen; + int blen = mp->tail->size - mp->tail->pos; + if( (mp->framesize - len) <= blen) { + nlen = mp->framesize-len; + } + else { + nlen = blen; + } + memcpy((mp->worksample).wordpointer+len,mp->tail->pnt+mp->tail->pos,nlen); + len += nlen; + mp->tail->pos += nlen; + mp->bsize -= nlen; + if(mp->tail->pos == mp->tail->size) { + remove_buf(mp); + } + } + + *done = 0; + if(mp->fr.error_protection) + getbits(mp, 16); + + if (do_layer3(mp,(unsigned char *) out,done)) + return MP3_ERR; + + mp->fsizeold = mp->framesize; + mp->framesize = 0; + + return MP3_OK; +} + +int set_pointer(struct mpstr *mp, long backstep) +{ + unsigned char *bsbufold; + if(mp->fsizeold < 0 && backstep > 0) { + ast_log(LOG_WARNING,"Can't step back %ld!\n",backstep); + return MP3_ERR; + } + bsbufold = mp->bsspace[mp->bsnum] + 512; + (mp->worksample).wordpointer -= backstep; + if (backstep) + memcpy((mp->worksample).wordpointer,bsbufold+mp->fsizeold-backstep,backstep); + (mp->worksample).bitindex = 0; + return MP3_OK; +} + + + + --- /dev/null +++ b/addons/mp3/layer3.c @@ -0,0 +1,2029 @@ +/* + * Mpeg Layer-3 audio decoder + * -------------------------- + * copyright (c) 1995,1996,1997 by Michael Hipp. + * All rights reserved. See also 'README' + */ + +#include "asterisk.h" +#include "asterisk/logger.h" +#include +#include "mpg123.h" +#include "mpglib.h" +#include "huffman.h" + +#define MPEG1 + +/* These should all be constants setup once using init_layer3_const */ +static real ispow[8207]; +static real aa_ca[8],aa_cs[8]; +static real COS1[12][6]; +static real win[4][36]; +static real win1[4][36]; +static real gainpow2[256+118+4]; +static real COS9[9]; +static real COS6_1,COS6_2; +static real tfcos36[9]; +static real tfcos12[3]; + +struct bandInfoStruct { + short longIdx[23]; + short longDiff[22]; + short shortIdx[14]; + short shortDiff[13]; +}; + + +struct bandInfoStruct bandInfo[9] = { + +/* MPEG 1.0 */ + { {0,4,8,12,16,20,24,30,36,44,52,62,74, 90,110,134,162,196,238,288,342,418,576}, + {4,4,4,4,4,4,6,6,8, 8,10,12,16,20,24,28,34,42,50,54, 76,158}, + {0,4*3,8*3,12*3,16*3,22*3,30*3,40*3,52*3,66*3, 84*3,106*3,136*3,192*3}, + {4,4,4,4,6,8,10,12,14,18,22,30,56} } , + + { {0,4,8,12,16,20,24,30,36,42,50,60,72, 88,106,128,156,190,230,276,330,384,576}, + {4,4,4,4,4,4,6,6,6, 8,10,12,16,18,22,28,34,40,46,54, 54,192}, + {0,4*3,8*3,12*3,16*3,22*3,28*3,38*3,50*3,64*3, 80*3,100*3,126*3,192*3}, + {4,4,4,4,6,6,10,12,14,16,20,26,66} } , + + { {0,4,8,12,16,20,24,30,36,44,54,66,82,102,126,156,194,240,296,364,448,550,576} , + {4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102, 26} , + {0,4*3,8*3,12*3,16*3,22*3,30*3,42*3,58*3,78*3,104*3,138*3,180*3,192*3} , + {4,4,4,4,6,8,12,16,20,26,34,42,12} } , + +/* MPEG 2.0 */ + { {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576}, + {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54 } , + {0,4*3,8*3,12*3,18*3,24*3,32*3,42*3,56*3,74*3,100*3,132*3,174*3,192*3} , + {4,4,4,6,6,8,10,14,18,26,32,42,18 } } , + + { {0,6,12,18,24,30,36,44,54,66,80,96,114,136,162,194,232,278,330,394,464,540,576}, + {6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,52,64,70,76,36 } , + {0,4*3,8*3,12*3,18*3,26*3,36*3,48*3,62*3,80*3,104*3,136*3,180*3,192*3} , + {4,4,4,6,8,10,12,14,18,24,32,44,12 } } , + + { {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576}, + {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54 }, + {0,4*3,8*3,12*3,18*3,26*3,36*3,48*3,62*3,80*3,104*3,134*3,174*3,192*3}, + {4,4,4,6,8,10,12,14,18,24,30,40,18 } } , +/* MPEG 2.5 */ + { {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576} , + {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54}, + {0,12,24,36,54,78,108,144,186,240,312,402,522,576}, + {4,4,4,6,8,10,12,14,18,24,30,40,18} }, + { {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576} , + {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54}, + {0,12,24,36,54,78,108,144,186,240,312,402,522,576}, + {4,4,4,6,8,10,12,14,18,24,30,40,18} }, + { {0,12,24,36,48,60,72,88,108,132,160,192,232,280,336,400,476,566,568,570,572,574,576}, + {12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2}, + {0, 24, 48, 72,108,156,216,288,372,480,486,492,498,576}, + {8,8,8,12,16,20,24,28,36,2,2,2,26} } , +}; + +static int mapbuf0[9][152]; +static int mapbuf1[9][156]; +static int mapbuf2[9][44]; +static int *map[9][3]; +static int *mapend[9][3]; + +static unsigned int n_slen2[512]; /* MPEG 2.0 slen for 'normal' mode */ +static unsigned int i_slen2[256]; /* MPEG 2.0 slen for intensity stereo */ + +static real tan1_1[16],tan2_1[16],tan1_2[16],tan2_2[16]; +static real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16]; + +/* + * init constant tables for layer-3 + */ +void init_layer3_const(void) +{ + int i,j,k,l; + + for(i=-256;i<118+4;i++) + gainpow2[i+256] = pow((double)2.0,-0.25 * (double) (i+210) ); + + for(i=0;i<8207;i++) + ispow[i] = pow((double)i,(double)4.0/3.0); + + for (i=0;i<8;i++) + { + static double Ci[8]={-0.6,-0.535,-0.33,-0.185,-0.095,-0.041,-0.0142,-0.0037}; + double sq=sqrt(1.0+Ci[i]*Ci[i]); + aa_cs[i] = 1.0/sq; + aa_ca[i] = Ci[i]/sq; + } + + for(i=0;i<18;i++) + { + win[0][i] = win[1][i] = 0.5 * sin( M_PI / 72.0 * (double) (2*(i+0) +1) ) / cos ( M_PI * (double) (2*(i+0) +19) / 72.0 ); + win[0][i+18] = win[3][i+18] = 0.5 * sin( M_PI / 72.0 * (double) (2*(i+18)+1) ) / cos ( M_PI * (double) (2*(i+18)+19) / 72.0 ); + } + for(i=0;i<6;i++) + { + win[1][i+18] = 0.5 / cos ( M_PI * (double) (2*(i+18)+19) / 72.0 ); + win[3][i+12] = 0.5 / cos ( M_PI * (double) (2*(i+12)+19) / 72.0 ); + win[1][i+24] = 0.5 * sin( M_PI / 24.0 * (double) (2*i+13) ) / cos ( M_PI * (double) (2*(i+24)+19) / 72.0 ); + win[1][i+30] = win[3][i] = 0.0; + win[3][i+6 ] = 0.5 * sin( M_PI / 24.0 * (double) (2*i+1) ) / cos ( M_PI * (double) (2*(i+6 )+19) / 72.0 ); + } + + for(i=0;i<9;i++) + COS9[i] = cos( M_PI / 18.0 * (double) i); + + for(i=0;i<9;i++) + tfcos36[i] = 0.5 / cos ( M_PI * (double) (i*2+1) / 36.0 ); + for(i=0;i<3;i++) + tfcos12[i] = 0.5 / cos ( M_PI * (double) (i*2+1) / 12.0 ); + + COS6_1 = cos( M_PI / 6.0 * (double) 1); + COS6_2 = cos( M_PI / 6.0 * (double) 2); + + for(i=0;i<12;i++) + { + win[2][i] = 0.5 * sin( M_PI / 24.0 * (double) (2*i+1) ) / cos ( M_PI * (double) (2*i+7) / 24.0 ); + for(j=0;j<6;j++) + COS1[i][j] = cos( M_PI / 24.0 * (double) ((2*i+7)*(2*j+1)) ); + } + + for(j=0;j<4;j++) { + static int len[4] = { 36,36,12,36 }; + for(i=0;i 0) { + if( i & 1 ) + p1 = pow(base,(i+1.0)*0.5); + else + p2 = pow(base,i*0.5); + } + pow1_1[j][i] = p1; + pow2_1[j][i] = p2; + pow1_2[j][i] = M_SQRT2 * p1; + pow2_2[j][i] = M_SQRT2 * p2; + } + } + + for(j=0;j<9;j++) + { + struct bandInfoStruct *bi = &bandInfo[j]; + int *mp; + int cb,lwin; + short *bdf; + + mp = map[j][0] = mapbuf0[j]; + bdf = bi->longDiff; + for(i=0,cb = 0; cb < 8 ; cb++,i+=*bdf++) { + *mp++ = (*bdf) >> 1; + *mp++ = i; + *mp++ = 3; + *mp++ = cb; + } + bdf = bi->shortDiff+3; + for(cb=3;cb<13;cb++) { + int l = (*bdf++) >> 1; + for(lwin=0;lwin<3;lwin++) { + *mp++ = l; + *mp++ = i + lwin; + *mp++ = lwin; + *mp++ = cb; + } + i += 6*l; + } + mapend[j][0] = mp; + + mp = map[j][1] = mapbuf1[j]; + bdf = bi->shortDiff+0; + for(i=0,cb=0;cb<13;cb++) { + int l = (*bdf++) >> 1; + for(lwin=0;lwin<3;lwin++) { + *mp++ = l; + *mp++ = i + lwin; + *mp++ = lwin; + *mp++ = cb; + } + i += 6*l; + } + mapend[j][1] = mp; + + mp = map[j][2] = mapbuf2[j]; + bdf = bi->longDiff; + for(cb = 0; cb < 22 ; cb++) { + *mp++ = (*bdf++) >> 1; + *mp++ = cb; + } + mapend[j][2] = mp; + + } + + for(i=0;i<5;i++) { + for(j=0;j<6;j++) { + for(k=0;k<6;k++) { + int n = k + j * 6 + i * 36; + i_slen2[n] = i|(j<<3)|(k<<6)|(3<<12); + } + } + } + for(i=0;i<4;i++) { + for(j=0;j<4;j++) { + for(k=0;k<4;k++) { + int n = k + j * 4 + i * 16; + i_slen2[n+180] = i|(j<<3)|(k<<6)|(4<<12); + } + } + } + for(i=0;i<4;i++) { + for(j=0;j<3;j++) { + int n = j + i * 3; + i_slen2[n+244] = i|(j<<3) | (5<<12); + n_slen2[n+500] = i|(j<<3) | (2<<12) | (1<<15); + } + } + + for(i=0;i<5;i++) { + for(j=0;j<5;j++) { + for(k=0;k<4;k++) { + for(l=0;l<4;l++) { + int n = l + k * 4 + j * 16 + i * 80; + n_slen2[n] = i|(j<<3)|(k<<6)|(l<<9)|(0<<12); + } + } + } + } + for(i=0;i<5;i++) { + for(j=0;j<5;j++) { + for(k=0;k<4;k++) { + int n = k + j * 4 + i * 20; + n_slen2[n+400] = i|(j<<3)|(k<<6)|(1<<12); + } + } + } +} + +/* MP3 file specific rates */ +void init_layer3_sample_limits(struct mpstr *mp, int down_sample_sblimit) +{ + int i,j; + for(j=0;j<9;j++) { + for(i=0;i<23;i++) { + (mp->longLimit)[j][i] = (bandInfo[j].longIdx[i] - 1 + 8) / 18 + 1; + if((mp->longLimit)[j][i] > (down_sample_sblimit) ) + (mp->longLimit)[j][i] = down_sample_sblimit; + } + for(i=0;i<14;i++) { + (mp->shortLimit)[j][i] = (bandInfo[j].shortIdx[i] - 1) / 18 + 1; + if((mp->shortLimit)[j][i] > (down_sample_sblimit) ) + (mp->shortLimit)[j][i] = down_sample_sblimit; + } + } +} + + + +/* + * read additional side information + */ +#ifdef MPEG1 +static int III_get_side_info_1(struct mpstr *mp, struct III_sideinfo *si,int stereo, + int ms_stereo,long sfreq,int single) +{ + int ch, gr; + int powdiff = (single == 3) ? 4 : 0; + + si->main_data_begin = getbits(mp, 9); + if (stereo == 1) + si->private_bits = getbits_fast(mp, 5); + else + si->private_bits = getbits_fast(mp, 3); + + for (ch=0; chch[ch].gr[0].scfsi = -1; + si->ch[ch].gr[1].scfsi = getbits_fast(mp, 4); + } + + for (gr=0; gr<2; gr++) + { + for (ch=0; chch[ch].gr[gr]); + + gr_info->part2_3_length = getbits(mp, 12); + gr_info->big_values = getbits_fast(mp, 9); + if(gr_info->big_values > 288) { + ast_log(LOG_WARNING,"big_values too large!\n"); + gr_info->big_values = 288; + } + gr_info->pow2gain = gainpow2+256 - getbits_fast(mp, 8) + powdiff; + if(ms_stereo) + gr_info->pow2gain += 2; + gr_info->scalefac_compress = getbits_fast(mp, 4); +/* window-switching flag == 1 for block_Type != 0 .. and block-type == 0 -> win-sw-flag = 0 */ + if(get1bit(mp)) + { + int i; + gr_info->block_type = getbits_fast(mp, 2); + gr_info->mixed_block_flag = get1bit(mp); + gr_info->table_select[0] = getbits_fast(mp, 5); + gr_info->table_select[1] = getbits_fast(mp, 5); + /* + * table_select[2] not needed, because there is no region2, + * but to satisfy some verifications tools we set it either. + */ + gr_info->table_select[2] = 0; + for(i=0;i<3;i++) + gr_info->full_gain[i] = gr_info->pow2gain + (getbits_fast(mp, 3)<<3); + + if(gr_info->block_type == 0) { + ast_log(LOG_WARNING,"Blocktype == 0 and window-switching == 1 not allowed.\n"); + return (1); + } + /* region_count/start parameters are implicit in this case. */ + gr_info->region1start = 36>>1; + gr_info->region2start = 576>>1; + } + else + { + int i,r0c,r1c; + for (i=0; i<3; i++) + gr_info->table_select[i] = getbits_fast(mp, 5); + r0c = getbits_fast(mp, 4); + r1c = getbits_fast(mp, 3); + gr_info->region1start = bandInfo[sfreq].longIdx[r0c+1] >> 1 ; + gr_info->region2start = bandInfo[sfreq].longIdx[r0c+1+r1c+1] >> 1; + gr_info->block_type = 0; + gr_info->mixed_block_flag = 0; + } + gr_info->preflag = get1bit(mp); + gr_info->scalefac_scale = get1bit(mp); + gr_info->count1table_select = get1bit(mp); + } + } + return (0); + +} +#endif + +/* + * Side Info for MPEG 2.0 / LSF + */ +static int III_get_side_info_2(struct mpstr *mp, struct III_sideinfo *si,int stereo, + int ms_stereo,long sfreq,int single) +{ + int ch; + int powdiff = (single == 3) ? 4 : 0; + + si->main_data_begin = getbits(mp, 8); + if (stereo == 1) + si->private_bits = get1bit(mp); + else + si->private_bits = getbits_fast(mp, 2); + + for (ch=0; chch[ch].gr[0]); + + gr_info->part2_3_length = getbits(mp, 12); + gr_info->big_values = getbits_fast(mp, 9); + if(gr_info->big_values > 288) { + ast_log(LOG_WARNING,"big_values too large!\n"); + gr_info->big_values = 288; + } + gr_info->pow2gain = gainpow2+256 - getbits_fast(mp, 8) + powdiff; + if(ms_stereo) + gr_info->pow2gain += 2; + gr_info->scalefac_compress = getbits(mp, 9); +/* window-switching flag == 1 for block_Type != 0 .. and block-type == 0 -> win-sw-flag = 0 */ + if(get1bit(mp)) + { + int i; + gr_info->block_type = getbits_fast(mp, 2); + gr_info->mixed_block_flag = get1bit(mp); + gr_info->table_select[0] = getbits_fast(mp, 5); + gr_info->table_select[1] = getbits_fast(mp, 5); + /* + * table_select[2] not needed, because there is no region2, + * but to satisfy some verifications tools we set it either. + */ + gr_info->table_select[2] = 0; + for(i=0;i<3;i++) + gr_info->full_gain[i] = gr_info->pow2gain + (getbits_fast(mp, 3)<<3); + + if(gr_info->block_type == 0) { + ast_log(LOG_WARNING,"Blocktype == 0 and window-switching == 1 not allowed.\n"); + return (1); + } + /* region_count/start parameters are implicit in this case. */ +/* check this again! */ + if(gr_info->block_type == 2) + gr_info->region1start = 36>>1; + else if(sfreq == 8) +/* check this for 2.5 and sfreq=8 */ + gr_info->region1start = 108>>1; + else + gr_info->region1start = 54>>1; + gr_info->region2start = 576>>1; + } + else + { + int i,r0c,r1c; + for (i=0; i<3; i++) + gr_info->table_select[i] = getbits_fast(mp, 5); + r0c = getbits_fast(mp, 4); + r1c = getbits_fast(mp, 3); + gr_info->region1start = bandInfo[sfreq].longIdx[r0c+1] >> 1 ; + gr_info->region2start = bandInfo[sfreq].longIdx[r0c+1+r1c+1] >> 1; + gr_info->block_type = 0; + gr_info->mixed_block_flag = 0; + } + gr_info->scalefac_scale = get1bit(mp); + gr_info->count1table_select = get1bit(mp); + } + return (0); +} + +/* + * read scalefactors + */ +#ifdef MPEG1 +static int III_get_scale_factors_1(struct mpstr *mp, int *scf,struct gr_info_s *gr_info) +{ + static unsigned char slen[2][16] = { + {0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4}, + {0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3} + }; + int numbits; + int num0 = slen[0][gr_info->scalefac_compress]; + int num1 = slen[1][gr_info->scalefac_compress]; + + if (gr_info->block_type == 2) + { + int i=18; + numbits = (num0 + num1) * 18; + + if (gr_info->mixed_block_flag) { + for (i=8;i;i--) + *scf++ = getbits_fast(mp, num0); + i = 9; + numbits -= num0; /* num0 * 17 + num1 * 18 */ + } + + for (;i;i--) + *scf++ = getbits_fast(mp, num0); + for (i = 18; i; i--) + *scf++ = getbits_fast(mp, num1); + *scf++ = 0; *scf++ = 0; *scf++ = 0; /* short[13][0..2] = 0 */ + } + else + { + int i; + int scfsi = gr_info->scfsi; + + if(scfsi < 0) { /* scfsi < 0 => granule == 0 */ + for(i=11;i;i--) + *scf++ = getbits_fast(mp, num0); + for(i=10;i;i--) + *scf++ = getbits_fast(mp, num1); + numbits = (num0 + num1) * 10 + num0; + } + else { + numbits = 0; + if(!(scfsi & 0x8)) { + for (i=6;i;i--) + *scf++ = getbits_fast(mp, num0); + numbits += num0 * 6; + } + else { + *scf++ = 0; *scf++ = 0; *scf++ = 0; /* set to ZERO necessary? */ + *scf++ = 0; *scf++ = 0; *scf++ = 0; + } + + if(!(scfsi & 0x4)) { + for (i=5;i;i--) + *scf++ = getbits_fast(mp, num0); + numbits += num0 * 5; + } + else { + *scf++ = 0; *scf++ = 0; *scf++ = 0; /* set to ZERO necessary? */ + *scf++ = 0; *scf++ = 0; + } + + if(!(scfsi & 0x2)) { + for(i=5;i;i--) + *scf++ = getbits_fast(mp, num1); + numbits += num1 * 5; + } + else { + *scf++ = 0; *scf++ = 0; *scf++ = 0; /* set to ZERO necessary? */ + *scf++ = 0; *scf++ = 0; + } + + if(!(scfsi & 0x1)) { + for (i=5;i;i--) + *scf++ = getbits_fast(mp, num1); + numbits += num1 * 5; + } + else { + *scf++ = 0; *scf++ = 0; *scf++ = 0; /* set to ZERO necessary? */ + *scf++ = 0; *scf++ = 0; + } + } + + *scf++ = 0; /* no l[21] in original sources */ + } + return numbits; +} +#endif + +static int III_get_scale_factors_2(struct mpstr *mp, int *scf,struct gr_info_s *gr_info,int i_stereo) +{ + unsigned char *pnt; + int i,j; + unsigned int slen; + int n = 0; + int numbits = 0; + + static unsigned char stab[3][6][4] = { + { { 6, 5, 5,5 } , { 6, 5, 7,3 } , { 11,10,0,0} , + { 7, 7, 7,0 } , { 6, 6, 6,3 } , { 8, 8,5,0} } , + { { 9, 9, 9,9 } , { 9, 9,12,6 } , { 18,18,0,0} , + {12,12,12,0 } , {12, 9, 9,6 } , { 15,12,9,0} } , + { { 6, 9, 9,9 } , { 6, 9,12,6 } , { 15,18,0,0} , + { 6,15,12,0 } , { 6,12, 9,6 } , { 6,18,9,0} } }; + + if(i_stereo) /* i_stereo AND second channel -> do_layer3() checks this */ + slen = i_slen2[gr_info->scalefac_compress>>1]; + else + slen = n_slen2[gr_info->scalefac_compress]; + + gr_info->preflag = (slen>>15) & 0x1; + + n = 0; + if( gr_info->block_type == 2 ) { + n++; + if(gr_info->mixed_block_flag) + n++; + } + + pnt = stab[n][(slen>>12)&0x7]; + + for(i=0;i<4;i++) { + int num = slen & 0x7; + slen >>= 3; + if(num) { + for(j=0;j<(int)(pnt[i]);j++) + *scf++ = getbits_fast(mp, num); + numbits += pnt[i] * num; + } + else { + for(j=0;j<(int)(pnt[i]);j++) + *scf++ = 0; + } + } + + n = (n << 1) + 1; + for(i=0;iscalefac_scale; + real *xrpnt = (real *) xr; + int l[3],l3; + int part2remain = gr_info->part2_3_length - part2bits; + int *me; + + { + int bv = gr_info->big_values; + int region1 = gr_info->region1start; + int region2 = gr_info->region2start; + + l3 = ((576>>1)-bv)>>1; +/* + * we may lose the 'odd' bit here !! + * check this later again + */ + if(bv <= region1) { + l[0] = bv; l[1] = 0; l[2] = 0; + } + else { + l[0] = region1; + if(bv <= region2) { + l[1] = bv - l[0]; l[2] = 0; + } + else { + l[1] = region2 - l[0]; l[2] = bv - region2; + } + } + } + + if(gr_info->block_type == 2) { + /* + * decoding with short or mixed mode BandIndex table + */ + int i,max[4]; + int step=0,lwin=0,cb=0; + register real v = 0.0; + register int *m,mc; + + if(gr_info->mixed_block_flag) { + max[3] = -1; + max[0] = max[1] = max[2] = 2; + m = map[sfreq][0]; + me = mapend[sfreq][0]; + } + else { + max[0] = max[1] = max[2] = max[3] = -1; + /* max[3] not really needed in this case */ + m = map[sfreq][1]; + me = mapend[sfreq][1]; + } + + mc = 0; + for(i=0;i<2;i++) { + int lp = l[i]; + struct newhuff *h = ht+gr_info->table_select[i]; + for(;lp;lp--,mc--) { + register int x,y; + if( (!mc) ) { + mc = *m++; + xrpnt = ((real *) xr) + (*m++); + lwin = *m++; + cb = *m++; + if(lwin == 3) { + v = gr_info->pow2gain[(*scf++) << shift]; + step = 1; + } + else { + v = gr_info->full_gain[lwin][(*scf++) << shift]; + step = 3; + } + } + { + register short *val = h->table; + while((y=*val++)<0) { + if (get1bit(mp)) + val -= y; + part2remain--; + } + x = y >> 4; + y &= 0xf; + } + if(x == 15) { + max[lwin] = cb; + part2remain -= h->linbits+1; + x += getbits(mp, h->linbits); + if(get1bit(mp)) + *xrpnt = -ispow[x] * v; + else + *xrpnt = ispow[x] * v; + } + else if(x) { + max[lwin] = cb; + if(get1bit(mp)) + *xrpnt = -ispow[x] * v; + else + *xrpnt = ispow[x] * v; + part2remain--; + } + else + *xrpnt = 0.0; + xrpnt += step; + if(y == 15) { + max[lwin] = cb; + part2remain -= h->linbits+1; + y += getbits(mp, h->linbits); + if(get1bit(mp)) + *xrpnt = -ispow[y] * v; + else + *xrpnt = ispow[y] * v; + } + else if(y) { + max[lwin] = cb; + if(get1bit(mp)) + *xrpnt = -ispow[y] * v; + else + *xrpnt = ispow[y] * v; + part2remain--; + } + else + *xrpnt = 0.0; + xrpnt += step; + } + } + for(;l3 && (part2remain > 0);l3--) { + struct newhuff *h = htc+gr_info->count1table_select; + register short *val = h->table,a; + + while((a=*val++)<0) { + part2remain--; + if(part2remain < 0) { + part2remain++; + a = 0; + break; + } + if (get1bit(mp)) + val -= a; + } + + for(i=0;i<4;i++) { + if(!(i & 1)) { + if(!mc) { + mc = *m++; + xrpnt = ((real *) xr) + (*m++); + lwin = *m++; + cb = *m++; + if(lwin == 3) { + v = gr_info->pow2gain[(*scf++) << shift]; + step = 1; + } + else { + v = gr_info->full_gain[lwin][(*scf++) << shift]; + step = 3; + } + } + mc--; + } + if( (a & (0x8>>i)) ) { + max[lwin] = cb; + part2remain--; + if(part2remain < 0) { + part2remain++; + break; + } + if(get1bit(mp)) + *xrpnt = -v; + else + *xrpnt = v; + } + else + *xrpnt = 0.0; + xrpnt += step; + } + } + + while( m < me ) { + if(!mc) { + mc = *m++; + xrpnt = ((real *) xr) + *m++; + if( (*m++) == 3) + step = 1; + else + step = 3; + m++; /* cb */ + } + mc--; + *xrpnt = 0.0; + xrpnt += step; + *xrpnt = 0.0; + xrpnt += step; +/* we could add a little opt. here: + * if we finished a band for window 3 or a long band + * further bands could copied in a simple loop without a + * special 'map' decoding + */ + } + + gr_info->maxband[0] = max[0]+1; + gr_info->maxband[1] = max[1]+1; + gr_info->maxband[2] = max[2]+1; + gr_info->maxbandl = max[3]+1; + + { + int rmax = max[0] > max[1] ? max[0] : max[1]; + rmax = (rmax > max[2] ? rmax : max[2]) + 1; + gr_info->maxb = rmax ? (mp->shortLimit)[sfreq][rmax] : (mp->longLimit)[sfreq][max[3]+1]; + } + + } + else { + /* + * decoding with 'long' BandIndex table (block_type != 2) + */ + int *pretab = gr_info->preflag ? pretab1 : pretab2; + int i,max = -1; + int cb = 0; + register int *m = map[sfreq][2]; + register real v = 0.0; + register int mc = 0; +#if 0 + me = mapend[sfreq][2]; +#endif + + /* + * long hash table values + */ + for(i=0;i<3;i++) { + int lp = l[i]; + struct newhuff *h = ht+gr_info->table_select[i]; + + for(;lp;lp--,mc--) { + int x,y; + + if(!mc) { + mc = *m++; + v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift]; + cb = *m++; + } + { + register short *val = h->table; + while((y=*val++)<0) { + if (get1bit(mp)) + val -= y; + part2remain--; + } + x = y >> 4; + y &= 0xf; + } + if (x == 15) { + max = cb; + part2remain -= h->linbits+1; + x += getbits(mp, h->linbits); + if(get1bit(mp)) + *xrpnt++ = -ispow[x] * v; + else + *xrpnt++ = ispow[x] * v; + } + else if(x) { + max = cb; + if(get1bit(mp)) + *xrpnt++ = -ispow[x] * v; + else + *xrpnt++ = ispow[x] * v; + part2remain--; + } + else + *xrpnt++ = 0.0; + + if (y == 15) { + max = cb; + part2remain -= h->linbits+1; + y += getbits(mp, h->linbits); + if(get1bit(mp)) + *xrpnt++ = -ispow[y] * v; + else + *xrpnt++ = ispow[y] * v; + } + else if(y) { + max = cb; + if(get1bit(mp)) + *xrpnt++ = -ispow[y] * v; + else + *xrpnt++ = ispow[y] * v; + part2remain--; + } + else + *xrpnt++ = 0.0; + } + } + + /* + * short (count1table) values + */ + for(;l3 && (part2remain > 0);l3--) { + struct newhuff *h = htc+gr_info->count1table_select; + register short *val = h->table,a; + + while((a=*val++)<0) { + part2remain--; + if(part2remain < 0) { + part2remain++; + a = 0; + break; + } + if (get1bit(mp)) + val -= a; + } + + for(i=0;i<4;i++) { + if(!(i & 1)) { + if(!mc) { + mc = *m++; + cb = *m++; + v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift]; + } + mc--; + } + if ( (a & (0x8>>i)) ) { + max = cb; + part2remain--; + if(part2remain < 0) { + part2remain++; + break; + } + if(get1bit(mp)) + *xrpnt++ = -v; + else + *xrpnt++ = v; + } + else + *xrpnt++ = 0.0; + } + } + + /* + * zero part + */ + for(i=(&xr[SBLIMIT][0]-xrpnt)>>1;i;i--) { + *xrpnt++ = 0.0; + *xrpnt++ = 0.0; + } + + gr_info->maxbandl = max+1; + gr_info->maxb = (mp->longLimit)[sfreq][gr_info->maxbandl]; + } + + while( part2remain > 16 ) { + getbits(mp, 16); /* Dismiss stuffing Bits */ + part2remain -= 16; + } + if(part2remain > 0) + getbits(mp, part2remain); + else if(part2remain < 0) { + ast_log(LOG_WARNING,"mpg123: Can't rewind stream by %d bits!\n",-part2remain); + return 1; /* -> error */ + } + return 0; +} + +#if 0 +static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT],int *scf, + struct gr_info_s *gr_info,int sfreq,int part2bits) +{ + int shift = 1 + gr_info->scalefac_scale; + real *xrpnt = (real *) xr[1]; + real *xr0pnt = (real *) xr[0]; + int l[3],l3; + int part2remain = gr_info->part2_3_length - part2bits; + int *me; + + { + int bv = gr_info->big_values; + int region1 = gr_info->region1start; + int region2 = gr_info->region2start; + + l3 = ((576>>1)-bv)>>1; +/* + * we may lose the 'odd' bit here !! + * check this later gain + */ + if(bv <= region1) { + l[0] = bv; l[1] = 0; l[2] = 0; + } + else { + l[0] = region1; + if(bv <= region2) { + l[1] = bv - l[0]; l[2] = 0; + } + else { + l[1] = region2 - l[0]; l[2] = bv - region2; + } + } + } + + if(gr_info->block_type == 2) { + int i,max[4]; + int step=0,lwin=0,cb=0; + register real v = 0.0; + register int *m,mc = 0; + + if(gr_info->mixed_block_flag) { + max[3] = -1; + max[0] = max[1] = max[2] = 2; + m = map[sfreq][0]; + me = mapend[sfreq][0]; + } + else { + max[0] = max[1] = max[2] = max[3] = -1; + /* max[3] not really needed in this case */ + m = map[sfreq][1]; + me = mapend[sfreq][1]; + } + + for(i=0;i<2;i++) { + int lp = l[i]; + struct newhuff *h = ht+gr_info->table_select[i]; + for(;lp;lp--,mc--) { + int x,y; + + if(!mc) { + mc = *m++; + xrpnt = ((real *) xr[1]) + *m; + xr0pnt = ((real *) xr[0]) + *m++; + lwin = *m++; + cb = *m++; + if(lwin == 3) { + v = gr_info->pow2gain[(*scf++) << shift]; + step = 1; + } + else { + v = gr_info->full_gain[lwin][(*scf++) << shift]; + step = 3; + } + } + { + register short *val = h->table; + while((y=*val++)<0) { + if (get1bit(mp)) + val -= y; + part2remain--; + } + x = y >> 4; + y &= 0xf; + } + if(x == 15) { + max[lwin] = cb; + part2remain -= h->linbits+1; + x += getbits(mp, h->linbits); + if(get1bit(mp)) { + real a = ispow[x] * v; + *xrpnt = *xr0pnt + a; + *xr0pnt -= a; + } + else { + real a = ispow[x] * v; + *xrpnt = *xr0pnt - a; + *xr0pnt += a; + } + } + else if(x) { + max[lwin] = cb; + if(get1bit(mp)) { + real a = ispow[x] * v; + *xrpnt = *xr0pnt + a; + *xr0pnt -= a; + } + else { + real a = ispow[x] * v; + *xrpnt = *xr0pnt - a; + *xr0pnt += a; + } + part2remain--; + } + else + *xrpnt = *xr0pnt; + xrpnt += step; + xr0pnt += step; + + if(y == 15) { + max[lwin] = cb; + part2remain -= h->linbits+1; + y += getbits(mp, h->linbits); + if(get1bit(mp)) { + real a = ispow[y] * v; + *xrpnt = *xr0pnt + a; + *xr0pnt -= a; + } + else { + real a = ispow[y] * v; + *xrpnt = *xr0pnt - a; + *xr0pnt += a; + } + } + else if(y) { + max[lwin] = cb; + if(get1bit(mp)) { + real a = ispow[y] * v; + *xrpnt = *xr0pnt + a; + *xr0pnt -= a; + } + else { + real a = ispow[y] * v; + *xrpnt = *xr0pnt - a; + *xr0pnt += a; + } + part2remain--; + } + else + *xrpnt = *xr0pnt; + xrpnt += step; + xr0pnt += step; + } + } + + for(;l3 && (part2remain > 0);l3--) { + struct newhuff *h = htc+gr_info->count1table_select; + register short *val = h->table,a; + + while((a=*val++)<0) { + part2remain--; + if(part2remain < 0) { + part2remain++; + a = 0; + break; + } + if (get1bit(mp)) + val -= a; + } + + for(i=0;i<4;i++) { + if(!(i & 1)) { + if(!mc) { + mc = *m++; + xrpnt = ((real *) xr[1]) + *m; + xr0pnt = ((real *) xr[0]) + *m++; + lwin = *m++; + cb = *m++; + if(lwin == 3) { + v = gr_info->pow2gain[(*scf++) << shift]; + step = 1; + } + else { + v = gr_info->full_gain[lwin][(*scf++) << shift]; + step = 3; + } + } + mc--; + } + if( (a & (0x8>>i)) ) { + max[lwin] = cb; + part2remain--; + if(part2remain < 0) { + part2remain++; + break; + } + if(get1bit(mp)) { + *xrpnt = *xr0pnt + v; + *xr0pnt -= v; + } + else { + *xrpnt = *xr0pnt - v; + *xr0pnt += v; + } + } + else + *xrpnt = *xr0pnt; + xrpnt += step; + xr0pnt += step; + } + } + + while( m < me ) { + if(!mc) { + mc = *m++; + xrpnt = ((real *) xr[1]) + *m; + xr0pnt = ((real *) xr[0]) + *m++; + if(*m++ == 3) + step = 1; + else + step = 3; + m++; /* cb */ + } + mc--; + *xrpnt = *xr0pnt; + xrpnt += step; + xr0pnt += step; + *xrpnt = *xr0pnt; + xrpnt += step; + xr0pnt += step; +/* we could add a little opt. here: + * if we finished a band for window 3 or a long band + * further bands could copied in a simple loop without a + * special 'map' decoding + */ + } + + gr_info->maxband[0] = max[0]+1; + gr_info->maxband[1] = max[1]+1; + gr_info->maxband[2] = max[2]+1; + gr_info->maxbandl = max[3]+1; + + { + int rmax = max[0] > max[1] ? max[0] : max[1]; + rmax = (rmax > max[2] ? rmax : max[2]) + 1; + gr_info->maxb = rmax ? (mp->shortLimit)[sfreq][rmax] : (mp->longLimit)[sfreq][max[3]+1]; + } + } + else { + int *pretab = gr_info->preflag ? pretab1 : pretab2; + int i,max = -1; + int cb = 0; + register int mc=0,*m = map[sfreq][2]; + register real v = 0.0; +#if 0 + me = mapend[sfreq][2]; +#endif + + for(i=0;i<3;i++) { + int lp = l[i]; + struct newhuff *h = ht+gr_info->table_select[i]; + + for(;lp;lp--,mc--) { + int x,y; + if(!mc) { + mc = *m++; + cb = *m++; + v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift]; + } + { + register short *val = h->table; + while((y=*val++)<0) { + if (get1bit(mp)) + val -= y; + part2remain--; + } + x = y >> 4; + y &= 0xf; + } + if (x == 15) { + max = cb; + part2remain -= h->linbits+1; + x += getbits(mp, h->linbits); + if(get1bit(mp)) { + real a = ispow[x] * v; + *xrpnt++ = *xr0pnt + a; + *xr0pnt++ -= a; + } + else { + real a = ispow[x] * v; + *xrpnt++ = *xr0pnt - a; + *xr0pnt++ += a; + } + } + else if(x) { + max = cb; + if(get1bit(mp)) { + real a = ispow[x] * v; + *xrpnt++ = *xr0pnt + a; + *xr0pnt++ -= a; + } + else { + real a = ispow[x] * v; + *xrpnt++ = *xr0pnt - a; + *xr0pnt++ += a; + } + part2remain--; + } + else + *xrpnt++ = *xr0pnt++; + + if (y == 15) { + max = cb; + part2remain -= h->linbits+1; + y += getbits(mp, h->linbits); + if(get1bit(mp)) { + real a = ispow[y] * v; + *xrpnt++ = *xr0pnt + a; + *xr0pnt++ -= a; + } + else { + real a = ispow[y] * v; + *xrpnt++ = *xr0pnt - a; + *xr0pnt++ += a; + } + } + else if(y) { + max = cb; + if(get1bit(mp)) { + real a = ispow[y] * v; + *xrpnt++ = *xr0pnt + a; + *xr0pnt++ -= a; + } + else { + real a = ispow[y] * v; + *xrpnt++ = *xr0pnt - a; + *xr0pnt++ += a; + } + part2remain--; + } + else + *xrpnt++ = *xr0pnt++; + } + } + + for(;l3 && (part2remain > 0);l3--) { + struct newhuff *h = htc+gr_info->count1table_select; + register short *val = h->table,a; + + while((a=*val++)<0) { + part2remain--; + if(part2remain < 0) { + part2remain++; + a = 0; + break; + } + if (get1bit(mp)) + val -= a; + } + + for(i=0;i<4;i++) { + if(!(i & 1)) { + if(!mc) { + mc = *m++; + cb = *m++; + v = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift]; + } + mc--; + } + if ( (a & (0x8>>i)) ) { + max = cb; + part2remain--; + if(part2remain <= 0) { + part2remain++; + break; + } + if(get1bit(mp)) { + *xrpnt++ = *xr0pnt + v; + *xr0pnt++ -= v; + } + else { + *xrpnt++ = *xr0pnt - v; + *xr0pnt++ += v; + } + } + else + *xrpnt++ = *xr0pnt++; + } + } + for(i=(&xr[1][SBLIMIT][0]-xrpnt)>>1;i;i--) { + *xrpnt++ = *xr0pnt++; + *xrpnt++ = *xr0pnt++; + } + + gr_info->maxbandl = max+1; + gr_info->maxb = longLimit[sfreq][gr_info->maxbandl]; + } + + while ( part2remain > 16 ) { + getbits(mp, 16); /* Dismiss stuffing Bits */ + part2remain -= 16; + } + if(part2remain > 0 ) + getbits(mp, part2remain); + else if(part2remain < 0) { + ast_log(LOG_WARNING,"mpg123_ms: Can't rewind stream by %d bits!\n",-part2remain); + return 1; /* -> error */ + } + return 0; +} +#endif + +/* + * III_stereo: calculate real channel values for Joint-I-Stereo-mode + */ +static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac, + struct gr_info_s *gr_info,int sfreq,int ms_stereo,int lsf) +{ + real (*xr)[SBLIMIT*SSLIMIT] = (real (*)[SBLIMIT*SSLIMIT] ) xr_buf; + struct bandInfoStruct *bi = &bandInfo[sfreq]; + real *tab1,*tab2; + + if(lsf) { + int p = gr_info->scalefac_compress & 0x1; + if(ms_stereo) { + tab1 = pow1_2[p]; tab2 = pow2_2[p]; + } + else { + tab1 = pow1_1[p]; tab2 = pow2_1[p]; + } + } + else { + if(ms_stereo) { + tab1 = tan1_2; tab2 = tan2_2; + } + else { + tab1 = tan1_1; tab2 = tan2_1; + } + } + + if (gr_info->block_type == 2) + { + int lwin,do_l = 0; + if( gr_info->mixed_block_flag ) + do_l = 1; + + for (lwin=0;lwin<3;lwin++) /* process each window */ + { + /* get first band with zero values */ + int is_p,sb,idx,sfb = gr_info->maxband[lwin]; /* sfb is minimal 3 for mixed mode */ + if(sfb > 3) + do_l = 0; + + for(;sfb<12;sfb++) + { + is_p = scalefac[sfb*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ + if(is_p != 7) { + real t1,t2; + sb = bi->shortDiff[sfb]; + idx = bi->shortIdx[sfb] + lwin; + t1 = tab1[is_p]; t2 = tab2[is_p]; + for (; sb > 0; sb--,idx+=3) + { + real v = xr[0][idx]; + xr[0][idx] = v * t1; + xr[1][idx] = v * t2; + } + } + } + +#if 1 +/* in the original: copy 10 to 11 , here: copy 11 to 12 +maybe still wrong??? (copy 12 to 13?) */ + is_p = scalefac[11*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ + sb = bi->shortDiff[12]; + idx = bi->shortIdx[12] + lwin; +#else + is_p = scalefac[10*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ + sb = bi->shortDiff[11]; + idx = bi->shortIdx[11] + lwin; +#endif + if(is_p != 7) + { + real t1,t2; + t1 = tab1[is_p]; t2 = tab2[is_p]; + for ( ; sb > 0; sb--,idx+=3 ) + { + real v = xr[0][idx]; + xr[0][idx] = v * t1; + xr[1][idx] = v * t2; + } + } + } /* end for(lwin; .. ; . ) */ + + if (do_l) + { +/* also check l-part, if ALL bands in the three windows are 'empty' + * and mode = mixed_mode + */ + int sfb = gr_info->maxbandl; + int idx = bi->longIdx[sfb]; + + for ( ; sfb<8; sfb++ ) + { + int sb = bi->longDiff[sfb]; + int is_p = scalefac[sfb]; /* scale: 0-15 */ + if(is_p != 7) { + real t1,t2; + t1 = tab1[is_p]; t2 = tab2[is_p]; + for ( ; sb > 0; sb--,idx++) + { + real v = xr[0][idx]; + xr[0][idx] = v * t1; + xr[1][idx] = v * t2; + } + } + else + idx += sb; + } + } + } + else /* ((gr_info->block_type != 2)) */ + { + int sfb = gr_info->maxbandl; + int is_p,idx = bi->longIdx[sfb]; + for ( ; sfb<21; sfb++) + { + int sb = bi->longDiff[sfb]; + is_p = scalefac[sfb]; /* scale: 0-15 */ + if(is_p != 7) { + real t1,t2; + t1 = tab1[is_p]; t2 = tab2[is_p]; + for ( ; sb > 0; sb--,idx++) + { + real v = xr[0][idx]; + xr[0][idx] = v * t1; + xr[1][idx] = v * t2; + } + } + else + idx += sb; + } + + is_p = scalefac[20]; /* copy l-band 20 to l-band 21 */ + if(is_p != 7) + { + int sb; + real t1 = tab1[is_p],t2 = tab2[is_p]; + + for ( sb = bi->longDiff[21]; sb > 0; sb--,idx++ ) + { + real v = xr[0][idx]; + xr[0][idx] = v * t1; + xr[1][idx] = v * t2; + } + } + } /* ... */ +} + +static void III_antialias(real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) +{ + int sblim; + + if(gr_info->block_type == 2) + { + if(!gr_info->mixed_block_flag) + return; + sblim = 1; + } + else { + sblim = gr_info->maxb-1; + } + + /* 31 alias-reduction operations between each pair of sub-bands */ + /* with 8 butterflies between each pair */ + + { + int sb; + real *xr1=(real *) xr[1]; + + for(sb=sblim;sb;sb--,xr1+=10) + { + int ss; + real *cs=aa_cs,*ca=aa_ca; + real *xr2 = xr1; + + for(ss=7;ss>=0;ss--) + { /* upper and lower butterfly inputs */ + register real bu = *--xr2,bd = *xr1; + *xr2 = (bu * (*cs) ) - (bd * (*ca) ); + *xr1++ = (bd * (*cs++) ) + (bu * (*ca++) ); + } + } + } +} + +/* + DCT insipired by Jeff Tsay's DCT from the maplay package + this is an optimized version with manual unroll. + + References: + [1] S. Winograd: "On Computing the Discrete Fourier Transform", + Mathematics of Computation, Volume 32, Number 141, January 1978, + Pages 175-199 +*/ + +static void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf) +{ + { + register real *in = inbuf; + + in[17]+=in[16]; in[16]+=in[15]; in[15]+=in[14]; + in[14]+=in[13]; in[13]+=in[12]; in[12]+=in[11]; + in[11]+=in[10]; in[10]+=in[9]; in[9] +=in[8]; + in[8] +=in[7]; in[7] +=in[6]; in[6] +=in[5]; + in[5] +=in[4]; in[4] +=in[3]; in[3] +=in[2]; + in[2] +=in[1]; in[1] +=in[0]; + + in[17]+=in[15]; in[15]+=in[13]; in[13]+=in[11]; in[11]+=in[9]; + in[9] +=in[7]; in[7] +=in[5]; in[5] +=in[3]; in[3] +=in[1]; + + + { + +#define MACRO0(v) { \ + real tmp; \ + out2[9+(v)] = (tmp = sum0 + sum1) * w[27+(v)]; \ + out2[8-(v)] = tmp * w[26-(v)]; } \ + sum0 -= sum1; \ + ts[SBLIMIT*(8-(v))] = out1[8-(v)] + sum0 * w[8-(v)]; \ + ts[SBLIMIT*(9+(v))] = out1[9+(v)] + sum0 * w[9+(v)]; +#define MACRO1(v) { \ + real sum0,sum1; \ + sum0 = tmp1a + tmp2a; \ + sum1 = (tmp1b + tmp2b) * tfcos36[(v)]; \ + MACRO0(v); } +#define MACRO2(v) { \ + real sum0,sum1; \ + sum0 = tmp2a - tmp1a; \ + sum1 = (tmp2b - tmp1b) * tfcos36[(v)]; \ + MACRO0(v); } + + register const real *c = COS9; + register real *out2 = o2; + register real *w = wintab; + register real *out1 = o1; + register real *ts = tsbuf; + + real ta33,ta66,tb33,tb66; + + ta33 = in[2*3+0] * c[3]; + ta66 = in[2*6+0] * c[6]; + tb33 = in[2*3+1] * c[3]; + tb66 = in[2*6+1] * c[6]; + + { + real tmp1a,tmp2a,tmp1b,tmp2b; + tmp1a = in[2*1+0] * c[1] + ta33 + in[2*5+0] * c[5] + in[2*7+0] * c[7]; + tmp1b = in[2*1+1] * c[1] + tb33 + in[2*5+1] * c[5] + in[2*7+1] * c[7]; + tmp2a = in[2*0+0] + in[2*2+0] * c[2] + in[2*4+0] * c[4] + ta66 + in[2*8+0] * c[8]; + tmp2b = in[2*0+1] + in[2*2+1] * c[2] + in[2*4+1] * c[4] + tb66 + in[2*8+1] * c[8]; + + MACRO1(0); + MACRO2(8); + } + + { + real tmp1a,tmp2a,tmp1b,tmp2b; + tmp1a = ( in[2*1+0] - in[2*5+0] - in[2*7+0] ) * c[3]; + tmp1b = ( in[2*1+1] - in[2*5+1] - in[2*7+1] ) * c[3]; + tmp2a = ( in[2*2+0] - in[2*4+0] - in[2*8+0] ) * c[6] - in[2*6+0] + in[2*0+0]; + tmp2b = ( in[2*2+1] - in[2*4+1] - in[2*8+1] ) * c[6] - in[2*6+1] + in[2*0+1]; + + MACRO1(1); + MACRO2(7); + } + + { + real tmp1a,tmp2a,tmp1b,tmp2b; + tmp1a = in[2*1+0] * c[5] - ta33 - in[2*5+0] * c[7] + in[2*7+0] * c[1]; + tmp1b = in[2*1+1] * c[5] - tb33 - in[2*5+1] * c[7] + in[2*7+1] * c[1]; + tmp2a = in[2*0+0] - in[2*2+0] * c[8] - in[2*4+0] * c[2] + ta66 + in[2*8+0] * c[4]; + tmp2b = in[2*0+1] - in[2*2+1] * c[8] - in[2*4+1] * c[2] + tb66 + in[2*8+1] * c[4]; + + MACRO1(2); + MACRO2(6); + } + + { + real tmp1a,tmp2a,tmp1b,tmp2b; + tmp1a = in[2*1+0] * c[7] - ta33 + in[2*5+0] * c[1] - in[2*7+0] * c[5]; + tmp1b = in[2*1+1] * c[7] - tb33 + in[2*5+1] * c[1] - in[2*7+1] * c[5]; + tmp2a = in[2*0+0] - in[2*2+0] * c[4] + in[2*4+0] * c[8] + ta66 - in[2*8+0] * c[2]; + tmp2b = in[2*0+1] - in[2*2+1] * c[4] + in[2*4+1] * c[8] + tb66 - in[2*8+1] * c[2]; + + MACRO1(3); + MACRO2(5); + } + + { + real sum0,sum1; + sum0 = in[2*0+0] - in[2*2+0] + in[2*4+0] - in[2*6+0] + in[2*8+0]; + sum1 = (in[2*0+1] - in[2*2+1] + in[2*4+1] - in[2*6+1] + in[2*8+1] ) * tfcos36[4]; + MACRO0(4); + } + } + + } +} + +/* + * new DCT12 + */ +static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,register real *ts) +{ +#define DCT12_PART1 \ + in5 = in[5*3]; \ + in5 += (in4 = in[4*3]); \ + in4 += (in3 = in[3*3]); \ + in3 += (in2 = in[2*3]); \ + in2 += (in1 = in[1*3]); \ + in1 += (in0 = in[0*3]); \ + \ + in5 += in3; in3 += in1; \ + \ + in2 *= COS6_1; \ + in3 *= COS6_1; \ + +#define DCT12_PART2 \ + in0 += in4 * COS6_2; \ + \ + in4 = in0 + in2; \ + in0 -= in2; \ + \ + in1 += in5 * COS6_2; \ + \ + in5 = (in1 + in3) * tfcos12[0]; \ + in1 = (in1 - in3) * tfcos12[2]; \ + \ + in3 = in4 + in5; \ + in4 -= in5; \ + \ + in2 = in0 + in1; \ + in0 -= in1; + + + { + real in0,in1,in2,in3,in4,in5; + register real *out1 = rawout1; + ts[SBLIMIT*0] = out1[0]; ts[SBLIMIT*1] = out1[1]; ts[SBLIMIT*2] = out1[2]; + ts[SBLIMIT*3] = out1[3]; ts[SBLIMIT*4] = out1[4]; ts[SBLIMIT*5] = out1[5]; + + DCT12_PART1 + + { + real tmp0,tmp1 = (in0 - in4); + { + real tmp2 = (in1 - in5) * tfcos12[1]; + tmp0 = tmp1 + tmp2; + tmp1 -= tmp2; + } + ts[(17-1)*SBLIMIT] = out1[17-1] + tmp0 * wi[11-1]; + ts[(12+1)*SBLIMIT] = out1[12+1] + tmp0 * wi[6+1]; + ts[(6 +1)*SBLIMIT] = out1[6 +1] + tmp1 * wi[1]; + ts[(11-1)*SBLIMIT] = out1[11-1] + tmp1 * wi[5-1]; + } + + DCT12_PART2 + + ts[(17-0)*SBLIMIT] = out1[17-0] + in2 * wi[11-0]; + ts[(12+0)*SBLIMIT] = out1[12+0] + in2 * wi[6+0]; + ts[(12+2)*SBLIMIT] = out1[12+2] + in3 * wi[6+2]; + ts[(17-2)*SBLIMIT] = out1[17-2] + in3 * wi[11-2]; + + ts[(6+0)*SBLIMIT] = out1[6+0] + in0 * wi[0]; + ts[(11-0)*SBLIMIT] = out1[11-0] + in0 * wi[5-0]; + ts[(6+2)*SBLIMIT] = out1[6+2] + in4 * wi[2]; + ts[(11-2)*SBLIMIT] = out1[11-2] + in4 * wi[5-2]; + } + + in++; + + { + real in0,in1,in2,in3,in4,in5; + register real *out2 = rawout2; + + DCT12_PART1 + + { + real tmp0,tmp1 = (in0 - in4); + { + real tmp2 = (in1 - in5) * tfcos12[1]; + tmp0 = tmp1 + tmp2; + tmp1 -= tmp2; + } + out2[5-1] = tmp0 * wi[11-1]; + out2[0+1] = tmp0 * wi[6+1]; + ts[(12+1)*SBLIMIT] += tmp1 * wi[1]; + ts[(17-1)*SBLIMIT] += tmp1 * wi[5-1]; + } + + DCT12_PART2 + + out2[5-0] = in2 * wi[11-0]; + out2[0+0] = in2 * wi[6+0]; + out2[0+2] = in3 * wi[6+2]; + out2[5-2] = in3 * wi[11-2]; + + ts[(12+0)*SBLIMIT] += in0 * wi[0]; + ts[(17-0)*SBLIMIT] += in0 * wi[5-0]; + ts[(12+2)*SBLIMIT] += in4 * wi[2]; + ts[(17-2)*SBLIMIT] += in4 * wi[5-2]; + } + + in++; + + { + real in0,in1,in2,in3,in4,in5; + register real *out2 = rawout2; + out2[12]=out2[13]=out2[14]=out2[15]=out2[16]=out2[17]=0.0; + + DCT12_PART1 + + { + real tmp0,tmp1 = (in0 - in4); + { + real tmp2 = (in1 - in5) * tfcos12[1]; + tmp0 = tmp1 + tmp2; + tmp1 -= tmp2; + } + out2[11-1] = tmp0 * wi[11-1]; + out2[6 +1] = tmp0 * wi[6+1]; + out2[0+1] += tmp1 * wi[1]; + out2[5-1] += tmp1 * wi[5-1]; + } + + DCT12_PART2 + + out2[11-0] = in2 * wi[11-0]; + out2[6 +0] = in2 * wi[6+0]; + out2[6 +2] = in3 * wi[6+2]; + out2[11-2] = in3 * wi[11-2]; + + out2[0+0] += in0 * wi[0]; + out2[5-0] += in0 * wi[5-0]; + out2[0+2] += in4 * wi[2]; + out2[5-2] += in4 * wi[5-2]; + } +} + +/* + * III_hybrid + */ +static void III_hybrid(struct mpstr *mp, real fsIn[SBLIMIT][SSLIMIT],real tsOut[SSLIMIT][SBLIMIT], + int ch,struct gr_info_s *gr_info) +{ + real *tspnt = (real *) tsOut; + real (*block)[2][SBLIMIT*SSLIMIT] = mp->hybrid_block; + int *blc = mp->hybrid_blc; + real *rawout1,*rawout2; + int bt; + int sb = 0; + + { + int b = blc[ch]; + rawout1=block[b][ch]; + b=-b+1; + rawout2=block[b][ch]; + blc[ch] = b; + } + + + if(gr_info->mixed_block_flag) { + sb = 2; + dct36(fsIn[0],rawout1,rawout2,win[0],tspnt); + dct36(fsIn[1],rawout1+18,rawout2+18,win1[0],tspnt+1); + rawout1 += 36; rawout2 += 36; tspnt += 2; + } + + bt = gr_info->block_type; + if(bt == 2) { + for (; sbmaxb; sb+=2,tspnt+=2,rawout1+=36,rawout2+=36) { + dct12(fsIn[sb],rawout1,rawout2,win[2],tspnt); + dct12(fsIn[sb+1],rawout1+18,rawout2+18,win1[2],tspnt+1); + } + } + else { + for (; sbmaxb; sb+=2,tspnt+=2,rawout1+=36,rawout2+=36) { + dct36(fsIn[sb],rawout1,rawout2,win[bt],tspnt); + dct36(fsIn[sb+1],rawout1+18,rawout2+18,win1[bt],tspnt+1); + } + } + + for(;sbfr); + stereo = fr->stereo; + single = fr->single; + sfreq = fr->sampling_frequency; + + + + if(stereo == 1) { /* stream is mono */ + stereo1 = 1; + single = 0; + } + else if(single >= 0) /* stream is stereo, but force to mono */ + stereo1 = 1; + else + stereo1 = 2; + + if(fr->mode == MPG_MD_JOINT_STEREO) { + ms_stereo = fr->mode_ext & 0x2; + i_stereo = fr->mode_ext & 0x1; + } + else + ms_stereo = i_stereo = 0; + + if(fr->lsf) { + granules = 1; + if (III_get_side_info_2(mp, &sideinfo,stereo,ms_stereo,sfreq,single)) + return (MP3_ERR); + } + else { + granules = 2; +#ifdef MPEG1 + if ( III_get_side_info_1(mp, &sideinfo,stereo,ms_stereo,sfreq,single)) + return (MP3_ERR); + +#else + ast_log(LOG_WARNING,"Not supported\n"); +#endif + } + + if(set_pointer(mp, sideinfo.main_data_begin) == MP3_ERR) + return 0; + + for (gr=0;grlsf) + part2bits = III_get_scale_factors_2(mp, scalefacs,gr_info,0); + else { +#ifdef MPEG1 + part2bits = III_get_scale_factors_1(mp, scalefacs,gr_info); +#else + ast_log(LOG_WARNING,"Not supported\n"); +#endif + } + if(III_dequantize_sample(mp, hybridIn[0], scalefacs,gr_info,sfreq,part2bits)) + return (MP3_ERR); + } + if(stereo == 2) { + struct gr_info_s *gr_info = &(sideinfo.ch[1].gr[gr]); + long part2bits; + if(fr->lsf) + part2bits = III_get_scale_factors_2(mp, scalefacs,gr_info,i_stereo); + else { +#ifdef MPEG1 + part2bits = III_get_scale_factors_1(mp, scalefacs,gr_info); +#else + ast_log(LOG_WARNING,"Not supported\n"); +#endif + } + + if(III_dequantize_sample(mp, hybridIn[1],scalefacs,gr_info,sfreq,part2bits)) + return (MP3_ERR); + + if(ms_stereo) { + int i; + for(i=0;ilsf); + + if(ms_stereo || i_stereo || (single == 3) ) { + if(gr_info->maxb > sideinfo.ch[0].gr[gr].maxb) + sideinfo.ch[0].gr[gr].maxb = gr_info->maxb; + else + gr_info->maxb = sideinfo.ch[0].gr[gr].maxb; + } + + switch(single) { + case 3: + { + register int i; + register real *in0 = (real *) hybridIn[0],*in1 = (real *) hybridIn[1]; + for(i=0;imaxb;i++,in0++) + *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */ + } + break; + case 1: + { + register int i; + register real *in0 = (real *) hybridIn[0],*in1 = (real *) hybridIn[1]; + for(i=0;imaxb;i++) + *in0++ = *in1++; + } + break; + } + } + + for(ch=0;ch= 0) { + clip += synth_ntom_mono(mp,hybridOut[0][ss],pcm_sample,pcm_point); + } + else { + int p1 = *pcm_point; + clip += synth_ntom(mp,hybridOut[0][ss],0,pcm_sample,&p1); + clip += synth_ntom(mp,hybridOut[1][ss],1,pcm_sample,pcm_point); + } + } + } + + return 0; +} + + --- /dev/null +++ b/addons/mp3/Makefile @@ -0,0 +1,24 @@ +MP3OBJS=common.o dct64_i386.o decode_ntom.o layer3.o tabinit.o interface.o + +ifeq ($(OSARCH),FreeBSD) +OSVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) +CFLAGS+=$(if $(OSVERSION)<500016,-D_THREAD_SAFE) +LIBS+=$(if $(OSVERSION)<502102,-lc_r,-pthread) +INCLUDE+=-I/usr/local/include +CFLAGS+=$(shell if [ -d /usr/local/include/spandsp ]; then echo "-I/usr/local/include/spandsp"; fi) +endif # FreeBSD + +ifeq ($(OSARCH),NetBSD) +CFLAGS+=-pthread +INCLUDE+=-I/usr/local/include +endif + +ifeq ($(OSARCH),OpenBSD) +CFLAGS+=-pthread +endif + +all: $(MP3OBJS) + +clean: + rm -f *.o *.so *~ + rm -f .*.o.d --- /dev/null +++ b/addons/mp3/mpg123.h @@ -0,0 +1,132 @@ +#include +#include +#include + +#ifndef WIN32 +#include +#include +#endif + +#include + +#ifdef _WIN32 +# undef WIN32 +# define WIN32 + +# define M_PI 3.14159265358979323846 +# define M_SQRT2 1.41421356237309504880 +# define REAL_IS_FLOAT +# define NEW_DCT9 + +# define random rand +# define srandom srand + +#endif + +#ifdef REAL_IS_FLOAT +# define real float +#elif defined(REAL_IS_LONG_DOUBLE) +# define real long double +#else +# define real double +#endif + +#ifdef __GNUC__ +#define INLINE inline +#else +#define INLINE +#endif + +/* AUDIOBUFSIZE = n*64 with n=1,2,3 ... */ +#define AUDIOBUFSIZE 16384 + +#define FALSE 0 +#define TRUE 1 + +#define SBLIMIT 32 +#define SSLIMIT 18 + +#define MPG_MD_STEREO 0 +#define MPG_MD_JOINT_STEREO 1 +#define MPG_MD_DUAL_CHANNEL 2 +#define MPG_MD_MONO 3 + +#define MAXFRAMESIZE 1792 + + +/* Pre Shift fo 16 to 8 bit converter table */ +#define AUSHIFT (3) + +struct frame { + int stereo; + int jsbound; + int single; + int lsf; + int mpeg25; + int header_change; + int lay; + int error_protection; + int bitrate_index; + int sampling_frequency; + int padding; + int extension; + int mode; + int mode_ext; + int copyright; + int original; + int emphasis; + int framesize; /* computed framesize */ +}; + +struct parameter { + int quiet; /* shut up! */ + int tryresync; /* resync stream after error */ + int verbose; /* verbose level */ + int checkrange; +}; + +extern int decode_header(struct frame *fr,unsigned long newhead); + + + +struct gr_info_s { + int scfsi; + unsigned part2_3_length; + unsigned big_values; + unsigned scalefac_compress; + unsigned block_type; + unsigned mixed_block_flag; + unsigned table_select[3]; + unsigned subblock_gain[3]; + unsigned maxband[3]; + unsigned maxbandl; + unsigned maxb; + unsigned region1start; + unsigned region2start; + unsigned preflag; + unsigned scalefac_scale; + unsigned count1table_select; + real *full_gain[3]; + real *pow2gain; +}; + +struct III_sideinfo +{ + unsigned main_data_begin; + unsigned private_bits; + struct { + struct gr_info_s gr[2]; + } ch[2]; +}; + +struct pcm_workingsample +{ + int bitindex; + unsigned char *wordpointer; +}; + + +extern long freqs[9]; +extern struct parameter param; +extern real *pnts[5]; + --- /dev/null +++ b/addons/mp3/mpglib.h @@ -0,0 +1,75 @@ + +struct buf { + unsigned char *pnt; + long size; + long pos; + struct buf *next; + struct buf *prev; +}; + +struct framebuf { + struct buf *buf; + long pos; + struct frame *next; + struct frame *prev; +}; + +struct mpstr { + struct buf *head,*tail; + int bsize; + int framesize; + int fsizeold; + struct frame fr; + unsigned char bsspace[2][MAXFRAMESIZE+512]; /* MAXFRAMESIZE */ + real hybrid_block[2][2][SBLIMIT*SSLIMIT]; + int hybrid_blc[2]; + unsigned long header; + int bsnum; + real synth_buffs[2][2][0x110]; + int synth_bo; + long outscale; /* volume control default value 32768 */ + long outsamplerate; /* raw output rate default same as mp3 sample rate*/ + struct pcm_workingsample worksample; /* keep the state of the working sample for threads */ + int initmp3; /* flag for first initialisation */ + int longLimit[9][23]; /*sample limits re setting volume */ + int shortLimit[9][14]; + real decwin[512+32]; /* scale table */ + + }; + +#define BOOL int + +#define MP3_ERR -1 +#define MP3_OK 0 +#define MP3_NEED_MORE 1 + + +void InitMP3Constants(void); +BOOL InitMP3(struct mpstr *mp, long outscale); +int decodeMP3(struct mpstr *mp,char *inmemory,int inmemsize, + char *outmemory,int outmemsize,int *done); +void ExitMP3(struct mpstr *mp); + +extern int synth_ntom_set_step(long,long); +extern int synth_ntom(struct mpstr *mp, real *bandPtr,int channel,unsigned char *out,int *pnt); +extern int synth_ntom_mono (struct mpstr *mp, real *bandPtr,unsigned char *samples,int *pnt); +extern int synth_ntom_8bit (real *,int,unsigned char *,int *); +extern int synth_ntom_mono2stereo (real *,unsigned char *,int *); +extern int synth_ntom_8bit_mono (real *,unsigned char *,int *); +extern int synth_ntom_8bit_mono2stereo (real *,unsigned char *,int *); + +extern void init_layer3_sample_limits(struct mpstr *mp, int down_sample_sblimit); +extern void init_layer3_const(void); +extern int do_layer3(struct mpstr *mp,unsigned char *,int *); + +extern void make_decode_tables_scale(struct mpstr *mp, long scaleval); +extern void make_decode_tables_const(void); +extern void make_conv16to8_table(int); + +extern void dct64(real *,real *,real *); + +extern unsigned int get1bit(struct mpstr *mp); +extern unsigned int getbits(struct mpstr *mp, int); +extern unsigned int getbits_fast(struct mpstr *mp, int); +extern int set_pointer(struct mpstr *mp, long backstep); + --- /dev/null +++ b/addons/mp3/MPGLIB_README @@ -0,0 +1,39 @@ +MP3 library +----------- +Version 0.2 + +This decoder is a 'light' version (thrown out all unnecessay parts) +from the mpg123 package. I made this for a company. + +Currently only Layer3 is enabled to save some space. Layer1,2 isn't +tested at all. The interface will not change significantly. +A backport to the mpg123 package is planed. + +comiled and tested only on Solaris 2.6 +main.c contains a simple demo application for library. + +COPYING: you may use this source under GPL terms! + +PLEASE NOTE: This software may contain patented alogrithm (at least + patented in some countries). It may be not allowed to sell/use products + based on this source code in these countries. Check this out first! + +COPYRIGHT of MP3 music: + Please note, that the duplicating of copyrighted music without explicit + permission violates the rights of the owner. + +SENDING PATCHES: + Maybe I change the copyright policy (ie some kind of more free BSD licencse). + Please consider this when sending patches/changes. + I also want to have the freedom to sell the code to companies that + can not use the code under GPL. So, if you send me significant patches, + I need your explicit permission to do this. Of course, there will also + be the GPLed open source version of the 100% same code. + For the case you cannot accept this: the code is GPL, it's your freedom + to distribute your changes again under GPL. + +FEEDBACK: + I'm interessted to here from you, when you use this package as part + of another project. + + --- /dev/null +++ b/addons/mp3/MPGLIB_TODO @@ -0,0 +1,2 @@ + +apply 'VBR' bugfix --- /dev/null +++ b/addons/mp3/README @@ -0,0 +1 @@ + --- /dev/null +++ b/addons/mp3/tabinit.c @@ -0,0 +1,81 @@ + +#include + +#include "mpg123.h" +#include "mpglib.h" + +static real cos64[16],cos32[8],cos16[4],cos8[2],cos4[1]; +real *pnts[] = { cos64,cos32,cos16,cos8,cos4 }; + +static long intwinbase[] = { + 0, -1, -1, -1, -1, -1, -1, -2, -2, -2, + -2, -3, -3, -4, -4, -5, -5, -6, -7, -7, + -8, -9, -10, -11, -13, -14, -16, -17, -19, -21, + -24, -26, -29, -31, -35, -38, -41, -45, -49, -53, + -58, -63, -68, -73, -79, -85, -91, -97, -104, -111, + -117, -125, -132, -139, -147, -154, -161, -169, -176, -183, + -190, -196, -202, -208, -213, -218, -222, -225, -227, -228, + -228, -227, -224, -221, -215, -208, -200, -189, -177, -163, + -146, -127, -106, -83, -57, -29, 2, 36, 72, 111, + 153, 197, 244, 294, 347, 401, 459, 519, 581, 645, + 711, 779, 848, 919, 991, 1064, 1137, 1210, 1283, 1356, + 1428, 1498, 1567, 1634, 1698, 1759, 1817, 1870, 1919, 1962, + 2001, 2032, 2057, 2075, 2085, 2087, 2080, 2063, 2037, 2000, + 1952, 1893, 1822, 1739, 1644, 1535, 1414, 1280, 1131, 970, + 794, 605, 402, 185, -45, -288, -545, -814, -1095, -1388, + -1692, -2006, -2330, -2663, -3004, -3351, -3705, -4063, -4425, -4788, + -5153, -5517, -5879, -6237, -6589, -6935, -7271, -7597, -7910, -8209, + -8491, -8755, -8998, -9219, -9416, -9585, -9727, -9838, -9916, -9959, + -9966, -9935, -9863, -9750, -9592, -9389, -9139, -8840, -8492, -8092, + -7640, -7134, -6574, -5959, -5288, -4561, -3776, -2935, -2037, -1082, + -70, 998, 2122, 3300, 4533, 5818, 7154, 8540, 9975, 11455, + 12980, 14548, 16155, 17799, 19478, 21189, 22929, 24694, 26482, 28289, + 30112, 31947, 33791, 35640, 37489, 39336, 41176, 43006, 44821, 46617, + 48390, 50137, 51853, 53534, 55178, 56778, 58333, 59838, 61289, 62684, + 64019, 65290, 66494, 67629, 68692, 69679, 70590, 71420, 72169, 72835, + 73415, 73908, 74313, 74630, 74856, 74992, 75038 }; + +void make_decode_tables_const(void) +{ + int i,k,kr,divv; + real *costab; + + for(i=0;i<5;i++) + { + kr=0x10>>i; divv=0x40>>i; + costab = pnts[i]; + for(k=0;kdecwin; + scaleval = -scaleval; + for(i=0,j=0;i<256;i++,j++,table+=32) + { + if(table < (mp->decwin)+512+16) + table[16] = table[0] = (double) intwinbase[j] / 65536.0 * (double) scaleval; + if(i % 32 == 31) + table -= 1023; + if(i % 64 == 63) + scaleval = - scaleval; + } + + for( /* i=256 */ ;i<512;i++,j--,table+=32) + { + if(table < (mp->decwin)+512+16) + table[16] = table[0] = (double) intwinbase[j] / 65536.0 * (double) scaleval; + if(i % 32 == 31) + table -= 1023; + if(i % 64 == 63) + scaleval = - scaleval; + } +} + + debian/patches/astdatadir0000664000000000000000000000110012254353233012654 0ustar --- a/configure.ac +++ b/configure.ac @@ -51,7 +51,7 @@ AC_SUBST([astlibdir], ['${libdir AC_SUBST([astmoddir], ['${libdir}/asterisk/modules'])dnl AC_SUBST([astmandir], ['${mandir}'])dnl AC_SUBST([astvarlibdir], ['${localstatedir}/lib/asterisk'])dnl -AC_SUBST([astdatadir], ['${astvarlibdir}'])dnl +AC_SUBST([astdatadir], ['${datadir}/asterisk'])dnl AC_SUBST([astdbdir], ['${astvarlibdir}'])dnl AC_SUBST([astkeydir], ['${astvarlibdir}'])dnl AC_SUBST([astspooldir], ['${localstatedir}/spool/asterisk'])dnl debian/patches/astgenkey-security0000664000000000000000000000127412254353233014407 0ustar Subject: astgenkey should generate a private key that is not world-readable Author: Lionel Elie Mamane Bug: http://issues.asterisk.org/view.php?id=12373 Last-Update: 2009-12-19 Upstream has not accepted this patch and chose intead to document this as a known minor issue. --- a/contrib/scripts/astgenkey +++ b/contrib/scripts/astgenkey @@ -47,7 +47,11 @@ done rm -f ${KEY}.key ${KEY}.pub echo "Generating SSL key '$KEY': " +oldumask="`umask`" +umask 0077 openssl genrsa -out ${KEY}.key ${DES3} 1024 +[ "$(id -u)" = 0 ] && chown asterisk: ${KEY}.key +umask $oldumask openssl rsa -in ${KEY}.key -pubout -out ${KEY}.pub if [ -f "${KEY}.key" ] && [ -f "${KEY}.pub" ]; then debian/patches/series0000664000000000000000000000103112254353233012031 0ustar # upstream fixes allow-tilde-destdir hack-multiple-app-voicemail # Not used ATM. See comment in patch: #make-clean-fixes safe_asterisk-config safe_asterisk-nobg # #h323-no-deps-on-asterisk #h323-workaround-openh323-segfault astgenkey-security # bugfixes on top of everything sound_files #h323-extra-target mpglib enable_addons no_uname ilbc_disable astdatadir pjproject # Backport of dynamic generation of DAHDI channels: dahdi_pri_event_removed dahdi_create_channels hyphen reenable freeradius-client ignore_failed_channels.patch debian/patches/reenable0000664000000000000000000000046312254353233012324 0ustar Description: reenable some drivers, currently chan_vpb Author: Tzafrir Cohen --- a/channels/chan_vpb.cc +++ b/channels/chan_vpb.cc @@ -31,7 +31,6 @@ /*** MODULEINFO vpb - no extended ***/ debian/patches/menuselect_weakref0000664000000000000000000000422512254353233014417 0ustar Bug: https://reviewboard.asterisk.org/r/1330/ Author: Tzafrir Cohen Description: fix detection of weakref attribute in menuselect Asterisk relies on weakref symbols for optional dependencies. Their detection broke with gcc 4.6. This fixes their detection. Requires re-running autoconf in menuselect. diff --git a/acinclude.m4 b/acinclude.m4 index 9410608..3517918 100644 --- a/menuselect/acinclude.m4 +++ b/menuselect/acinclude.m4 @@ -1,35 +1,20 @@ # Helper function to check for gcc attributes. -# AST_GCC_ATTRIBUTE([attribute name], [attribute syntax], [attribute scope], [makeopts flag]) +# AST_GCC_TYPE_ATTRIBUTE([attribute name], [attribute extra], [attribute scope]) -AC_DEFUN([AST_GCC_ATTRIBUTE], +AC_DEFUN([AST_GCC_TYPE_ATTRIBUTE], [ AC_MSG_CHECKING(checking for compiler 'attribute $1' support) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" -m4_ifval([$4],$4=0) -if test "x$2" = "x" -then AC_COMPILE_IFELSE( - AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}], + AC_LANG_PROGRAM([$3 __attribute__(($1 $2)) int muffin;], []), AC_MSG_RESULT(yes) - m4_ifval([$4],$4=1) AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]), AC_MSG_RESULT(no) ) -else -AC_COMPILE_IFELSE( - AC_LANG_PROGRAM([$3 void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}], - []), - AC_MSG_RESULT(yes) - m4_ifval([$4],$4=1) - AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]), - AC_MSG_RESULT(no) -) -fi -m4_ifval([$4],[AC_SUBST($4)]) CFLAGS="$saved_CFLAGS" ]) diff --git a/configure.ac b/configure.ac index d04aeb7..d4472a5 100644 --- a/menuselect/configure.ac +++ b/menuselect/configure.ac @@ -51,9 +51,8 @@ AC_ARG_ENABLE([debug], esac]) AC_SUBST(MENUSELECT_DEBUG) -AST_GCC_ATTRIBUTE(weak_import) -AST_GCC_ATTRIBUTE(weakref) -AST_GCC_ATTRIBUTE(weak) +AST_GCC_TYPE_ATTRIBUTE(weak_import) +AST_GCC_TYPE_ATTRIBUTE(weakref, ("foo"), static) AC_FUNC_ALLOCA AC_CHECK_FUNCS([asprintf getloadavg setenv strcasestr strndup strnlen strsep unsetenv vasprintf]) debian/patches/ilbc_disable0000664000000000000000000000141212254353233013136 0ustar Descirption: disable building codec_ilbc Author: Tzafrir Cohen Forwarded-Upstream: no Bug-Debian: As we have to strip the ilbc code from asterisk, we need to disable building codec_ilbc and cleaning the ilbc/ directory. Patch needs to be cleaned-up to be uploaded upstream. FIXME: module now seems to potentially use libilbc. If it can be packaged into Debian, no reason to remove it. --- a/codecs/codec_ilbc.c +++ b/codecs/codec_ilbc.c @@ -27,6 +27,7 @@ /*** MODULEINFO ilbc + no core ***/ --- a/codecs/Makefile +++ b/codecs/Makefile @@ -27,7 +27,6 @@ LIBLPC10 := $(SUB_LPC10)/liblpc10.a SUB_DIRS := \ $(SUB_GSM) \ - $(SUB_ILBC) \ $(SUB_LPC10) \ all: _all debian/patches/dahdi_event_removed_dchan0000664000000000000000000001112612254353233015675 0ustar From: Tzafrir Cohen Subject: DAHDI_EVENT_REMOVED on a D-Channel - Disconnect PRI/BRI Astribank Bug: https://issues.asterisk.org/view.php?id=17525 Applied-Upsteam: no When a DAHDI device is removed at run-time it sends the event DAHDI_EVENT_REMOVED on each channel. This is intended to signal the userspace program to close the respective file handle, as the driver of the device will need all of them closed to properly clean-up. This event has long since been handled in chan_dahdi (chan_zap at the time). However the event that is sent on a D-Channel of a "PRI" (ISDN) span simply gets ignored. This code adds handling for closing the file descriptor (and shutting down the span, while we're at it). It also adds a CLI command to help test it. This patch is included in the package to help test it. It is not yet included in upstream trunk. NOTE: At the moment this patch should not be considered safe for inclusion in squeeze, till further testing. Make sure it is disabled before uploading the package. This patch should not have any effect on system without such Astribanks, though. --- channels/chan_dahdi.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 2a256f2..b2af9dd 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -1430,6 +1430,7 @@ static const struct ast_channel_tech dahdi_tech = { struct dahdi_pvt *round_robin[32]; #if defined(HAVE_PRI) +static int pri_destroy_dchan(struct dahdi_pri *pri); static inline int pri_grab(struct dahdi_pvt *pvt, struct dahdi_pri *pri) { int res; @@ -12706,6 +12707,8 @@ static void *pri_dchannel(void *vpri) } else if (x == DAHDI_EVENT_NOALARM) { pri->dchanavail[which] |= DCHAN_NOTINALARM; pri_restart(pri->dchans[which]); + } else if (x == DAHDI_EVENT_REMOVED) { + pri_destroy_dchan(pri); } ast_debug(1, "Got event %s (%d) on D-channel for span %d\n", event2str(x), x, pri->span); @@ -13934,6 +13937,74 @@ static char *handle_pri_show_spans(struct ast_cli_entry *e, int cmd, struct ast_ #endif /* defined(HAVE_PRI) */ #if defined(HAVE_PRI) +/*! + * \internal + * \brief Destroy a D-Channel of a PRI span + * \since 1.8 + * + * \param pri the pri span + * + * \return TRUE if the span was valid and we attempted destroying. + * + * Shuts down a span and destroys its D-Channel. Further destruction + * of the B-channels using dahdi_destroy_channel() would probably be required + * for the B-Channels. + */ +static int pri_destroy_dchan(struct dahdi_pri *pri) { + int i; + + if (!pri->master || (pri->master == AST_PTHREADT_NULL)) { + return 0; + } + ast_debug(1, "Stopping PRI span [FIXME: num/name]\n"); + pthread_cancel(pri->master); + + for (i = 0; i < NUM_DCHANS; i++) { + ast_debug(4, "closing pri_fd %d\n", i); + dahdi_close_pri_fd(pri, i); + } + return 1; +} + +static char *handle_pri_destroy_span(struct ast_cli_entry *e, int cmd, + struct ast_cli_args *a) +{ + int span; + + switch (cmd) { + case CLI_INIT: + e->command = "pri destroy span"; + e->usage = + "Usage: pri destroy span \n" + " Destorys D-channel of span.\n" + " B-Channels will need to be destroyed separately\n" + " (with: dahdi destroy channel).\n" + " DON'T USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.\n"; + return NULL; + case CLI_GENERATE: + return complete_span_4(a->line, a->word, a->pos, a->n); + } + + if (a->argc < 4) + return CLI_SHOWUSAGE; + span = atoi(a->argv[3]); + if ((span < 1) || (span > NUM_SPANS)) { + ast_cli(a->fd, "Invalid span '%s'. Should be a number from %d to %d\n", a->argv[3], 1, NUM_SPANS); + return CLI_SUCCESS; + } + if (!pris[span-1].pri) { + ast_cli(a->fd, "No PRI running on span %d\n", span); + return CLI_SUCCESS; + } + + pri_destroy_dchan(&(pris[span-1].pri)); + + return CLI_SUCCESS; +} + +#endif /* defined(HAVE_PRI) */ + +#if defined(HAVE_PRI) static char *handle_pri_show_span(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { int span; @@ -14053,6 +14124,7 @@ static struct ast_cli_entry dahdi_pri_cli[] = { AST_CLI_DEFINE(handle_pri_debug, "Enables PRI debugging on a span"), AST_CLI_DEFINE(handle_pri_show_spans, "Displays PRI Information"), AST_CLI_DEFINE(handle_pri_show_span, "Displays PRI Information"), + AST_CLI_DEFINE(handle_pri_destroy_span, "Destroy a PRI span"), AST_CLI_DEFINE(handle_pri_show_debug, "Displays current PRI debug settings"), AST_CLI_DEFINE(handle_pri_set_debug_file, "Sends PRI debug output to the specified file"), AST_CLI_DEFINE(handle_pri_version, "Displays libpri version"), -- 1.5.6.5 debian/patches/safe_asterisk-nobg0000664000000000000000000000165212254353233014316 0ustar Subject: Add an option to safe_asterisk so that it won't background. Author: Faidon Liambotis Bug-Debian: http://bugs.debian.org/376514 Forwarded: not-needed Last-Update: 2010-10-21 This is intended to work with start-stop-daemon's --background option which results in a correct pidfile since the process doesn't fork. Needs more work from me to not change behavior for users but only for the init script. After that, it can safely go upstream. --- a/contrib/scripts/safe_asterisk +++ b/contrib/scripts/safe_asterisk @@ -18,6 +18,7 @@ DUMPDROP=${DUMPDROP:-/tmp} RUNDIR=${RUNDIR:-/tmp} SLEEPSECS=4 ASTPIDFILE=${ASTVARRUNDIR}/asterisk.pid +SAFE_AST_BACKGROUND=0 # comment this line out to have this script _not_ kill all mpg123 processes when # asterisk exits @@ -211,4 +212,8 @@ run_asterisk() done } -run_asterisk & +if [ "$SAFE_AST_BACKGROUND" = "1" ]; then + run_asterisk & +else + run_asterisk +fi debian/patches/freeradius-client0000664000000000000000000000521112254353233014150 0ustar Description: allows either libfreeradius-client or libradiusclient-ng Author: Daniel Pocock Author: Jeremy Lainé Bug: https://issues.asterisk.org/jira/browse/ASTERISK-22980 --- a/cdr/cdr_radius.c 2013-12-11 10:08:13.537159711 +0100 +++ b/cdr/cdr_radius.c 2013-12-11 10:08:13.529159762 +0100 @@ -36,7 +36,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 328259 $") +#ifdef FREERADIUS_CLIENT +#include +#else #include +#endif #include "asterisk/channel.h" #include "asterisk/cdr.h" @@ -82,7 +86,11 @@ static const char name[] = "radius"; static const char cdr_config[] = "cdr.conf"; +#ifdef FREERADIUS_CLIENT +static char radiuscfg[PATH_MAX] = "/etc/radiusclient/radiusclient.conf"; +#else static char radiuscfg[PATH_MAX] = "/etc/radiusclient-ng/radiusclient.conf"; +#endif static struct ast_flags global_flags = { RADIUS_FLAG_USEGMTIME | RADIUS_FLAG_LOGUNIQUEID | RADIUS_FLAG_LOGUSERFIELD }; --- a/cel/cel_radius.c 2013-12-11 10:08:13.537159711 +0100 +++ b/cel/cel_radius.c 2013-12-11 10:08:13.529159762 +0100 @@ -35,7 +35,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Rev: 328259 $") +#ifdef FREERADIUS_CLIENT +#include +#else #include +#endif #include "asterisk/channel.h" #include "asterisk/cel.h" @@ -79,7 +83,11 @@ static char *cel_config = "cel.conf"; +#ifdef FREERADIUS_CLIENT +static char radiuscfg[PATH_MAX] = "/etc/radiusclient/radiusclient.conf"; +#else static char radiuscfg[PATH_MAX] = "/etc/radiusclient-ng/radiusclient.conf"; +#endif static struct ast_flags global_flags = { RADIUS_FLAG_USEGMTIME | RADIUS_FLAG_LOGUNIQUEID | RADIUS_FLAG_LOGUSERFIELD }; --- a/configure.ac 2013-12-11 10:08:13.537159711 +0100 +++ b/configure.ac 2013-12-11 10:11:02.420053317 +0100 @@ -2103,7 +2103,14 @@ # Some distributions (like SuSE) remove the 5.1 suffix. AST_EXT_LIB_CHECK([LUA], [lua], [luaL_register], [lua.h], [-lm]) -AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h]) +# Accept either RADIUS client library, their APIs are fully compatible, +# just different header filenames and different SONAMEs +AST_EXT_LIB_CHECK([RADIUS], [freeradius-client], [rc_read_config], [freeradius-client.h]) +if test "x${PBX_RADIUS}" = "x1"; then + AC_DEFINE(FREERADIUS_CLIENT, [], [Use the FreeRADIUS-client library]) +else + AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h]) +fi AST_EXT_LIB_CHECK([COROSYNC], [cpg], [cpg_join], [corosync/cpg.h], [-lcfg]) AST_EXT_LIB_CHECK([COROSYNC_CFG_STATE_TRACK], [cfg], [corosync_cfg_state_track], [corosync/cfg.h], [-lcfg]) debian/patches/allow-tilde-destdir0000664000000000000000000000154512254353233014422 0ustar Subject: relax badshell tilde test Author: Faidon Liambotis Bug: http://issues.asterisk.org/view.php?id=14718 Last-Update: 2009-12-19 badshell is disallowing tildes (~) in the DESTDIR directory to warn people who use a shell that doesn't expand it to $HOMEDIR. However, we have such a tilde in our directory (~rcN) that isn't expanded to $HOMEDIR nor shouldn't be. This patch relaxes this test just for cases where the ~ is followed by a '/', which should catch most cases. --- a/Makefile +++ b/Makefile @@ -596,7 +596,7 @@ oldmodcheck: fi badshell: -ifneq ($(findstring ~,$(DESTDIR)),) +ifneq ($(findstring ~/,$(DESTDIR)),) @echo "Your shell doesn't do ~ expansion when expected (specifically, when doing \"make install DESTDIR=~/path\")." @echo "Try replacing ~ with \$$HOME, as in \"make install DESTDIR=\$$HOME/path\"." @exit 1 debian/patches/no_uname0000664000000000000000000000102412254353233012342 0ustar Author: Tzafrir Cohen Bug: https://issues.asterisk.org/view.php?id=17161 Forwarded-Upstream: no Remove the special case for BSD in the bootstrap script. This is a simple brute-force patch until I figure out why that specific version of autoconf is needed on BSD. --- a/bootstrap.sh +++ b/bootstrap.sh @@ -21,10 +21,6 @@ case `uname -sr` in export AUTOCONF_VERSION=2.63 export AUTOMAKE_VERSION=1.9 ;; - *'BSD'*) - MY_AC_VER=-2.62 - MY_AM_VER=-1.9 - ;; *'SunOS '*) MY_AC_VER= MY_AM_VER=-1.9 debian/patches/make-clean-fixes0000664000000000000000000000241012254353233013652 0ustar Subject: Don't remove sounds on dist-clean Author: Faidon Liambotis Forwarded: not-needed Last-Update: 2010-10-20 Upstream build system may optionally download some extra sound files. Thus those sound files are deleted on dist-clean. The tarballs include some soundfiles tarballs by default. Thus the normal procedure of running 'make dist-clean' before building the package would delete them. Not used ATM as we ship a tarball with the sound files stripped out. May be re-used in the future. --- a/Makefile +++ b/Makefile @@ -442,7 +442,6 @@ dist-clean: distclean distclean: $(SUBDIRS_DIST_CLEAN) _clean @$(MAKE) -C menuselect dist-clean - @$(MAKE) -C sounds dist-clean rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps rm -f makeopts.embed_rules rm -f config.log config.status config.cache @@ -452,6 +451,10 @@ distclean: $(SUBDIRS_DIST_CLEAN) _clean rm -rf doc/api rm -f build_tools/menuselect-deps +# tarballs distributed by Digium include sounds +all-clean: distclean + @$(MAKE) -C sounds dist-clean + datafiles: _all doc/core-en_US.xml CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig "$(DESTDIR)$(libdir)/pkgconfig"; # Should static HTTP be installed during make samples or even with its own target ala debian/patches/dahdi_create_channels0000664000000000000000000004277312254353233015030 0ustar From: Tzafrir Cohen Date: Thu, 8 Aug 2013 22:09:07 +0000 Subject: [PATCH] chan_dahdi: create channels at run-time Origin: http://svnview.digium.com/svn/asterisk?view=rev&rev=396474 This code adds chan_dahdi the command 'dahdi create channels ' (where is a single - or 'new') and updates 'dahdi destroy channel' with a similar 'dahdi destroy channels'. It allows DAHDI channels and spans to be added after the initial channel load (without destroying all other channels as in 'dahdi restart'). It also includes some fixes to the D-Channel / span destruction code (r394552). This change is intended to provide a hook for a script running from udev once a span has been assigned ("registered") / unassigned ("unregistered") for its channels. The udev hook configures the span's channels with dahdi_cfg -S, and can then ask Asterisk to create ethe channels. See the scripts added to DAHDI-tools in 2.7.0. Review: https://reviewboard.asterisk.org/r/1598/ A trivial backport from trunk / 12. --- channels/chan_dahdi.c | 322 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 261 insertions(+), 61 deletions(-) --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -404,6 +404,8 @@ static const char config[] = "chan_dahdi static int num_cadence = 4; static int user_has_defined_cadences = 0; +static int has_pseudo; + static struct dahdi_ring_cadence cadences[NUM_CADENCE_MAX] = { { { 125, 125, 2000, 4000 } }, /*!< Quick chirp followed by normal ring */ { { 250, 250, 500, 1000, 250, 250, 500, 4000 } }, /*!< British style ring */ @@ -1391,6 +1393,18 @@ struct dahdi_chan_conf { * \note Set from the "smdiport" string read in from chan_dahdi.conf */ char smdi_port[SMDI_MAX_FILENAME_LEN]; + + /*! + * \brief Don't create channels below this number + * \note by default is 0 (no limit) + */ + int wanted_channels_start; + + /*! + * \brief Don't create channels above this number (infinity by default) + * \note by default is 0 (special value that means "no limit"). + */ + int wanted_channels_end; }; /*! returns a new dahdi_chan_conf with default values (by-value) */ @@ -3217,7 +3231,7 @@ static int sig_pri_tone_to_dahditone(enu #endif /* defined(HAVE_PRI) */ #if defined(HAVE_PRI) -static int pri_destroy_dchan(struct sig_pri_span *pri); +static void pri_destroy_span(struct sig_pri_span *pri); static void my_handle_dchan_exception(struct sig_pri_span *pri, int index) { @@ -3247,7 +3261,7 @@ static void my_handle_dchan_exception(st pri_event_noalarm(pri, index, 0); break; case DAHDI_EVENT_REMOVED: - pri_destroy_dchan(pri); + pri_destroy_span(pri); break; default: break; @@ -11670,29 +11684,121 @@ static int mwi_send_process_event(struct return handled; } -/* destroy a DAHDI channel, identified by its number */ -static int dahdi_destroy_channel_bynum(int channel) +/* destroy a range DAHDI channels, identified by their number */ +static void dahdi_destroy_channel_range(int start, int end) { struct dahdi_pvt *cur; + struct dahdi_pvt *next; + int destroyed_first = 0; + int destroyed_last = 0; ast_mutex_lock(&iflock); - for (cur = iflist; cur; cur = cur->next) { - if (cur->channel == channel) { + ast_debug(1, "range: %d-%d\n", start, end); + for (cur = iflist; cur; cur = next) { + next = cur->next; + if (cur->channel >= start && cur->channel <= end) { int x = DAHDI_FLASH; + if (cur->channel > destroyed_last) { + destroyed_last = cur->channel; + } + if (destroyed_first < 1 || cur->channel < destroyed_first) { + destroyed_first = cur->channel; + } + ast_debug(3, "Destroying %d\n", cur->channel); /* important to create an event for dahdi_wait_event to register so that all analog_ss_threads terminate */ ioctl(cur->subs[SUB_REAL].dfd, DAHDI_HOOK, &x); destroy_channel(cur, 1); - ast_mutex_unlock(&iflock); ast_module_unref(ast_module_info->self); - return RESULT_SUCCESS; } } ast_mutex_unlock(&iflock); - return RESULT_FAILURE; + if (destroyed_first > start || destroyed_last < end) { + ast_debug(1, "Asked to destroy %d-%d, destroyed %d-%d,\n", + start, end, destroyed_first, destroyed_last); + } +} + +static int setup_dahdi(int reload); +static int setup_dahdi_int(int reload, struct dahdi_chan_conf *default_conf, struct dahdi_chan_conf *base_conf, struct dahdi_chan_conf *conf); + +/*! + * \internal + * \brief create a range of new DAHDI channels + * + * \param start first channel in the range + * \param end last channel in the range + * + * \retval RESULT_SUCCESS on success. + * \retval RESULT_FAILURE on error. + */ +static int dahdi_create_channel_range(int start, int end) +{ + struct dahdi_pvt *cur; + struct dahdi_chan_conf default_conf = dahdi_chan_conf_default(); + struct dahdi_chan_conf base_conf = dahdi_chan_conf_default(); + struct dahdi_chan_conf conf = dahdi_chan_conf_default(); + int i, x; + int ret = RESULT_FAILURE; /* be pessimistic */ + + ast_debug(1, "channel range caps: %d - %d\n", start, end); + ast_mutex_lock(&iflock); + for (cur = iflist; cur; cur = cur->next) { + if (cur->channel >= start && cur->channel <= end) { + ast_log(LOG_ERROR, + "channel range %d-%d is occupied\n", + start, end); + goto out; + } + } + for (x = 0; x < NUM_SPANS; x++) { +#ifdef HAVE_PRI + struct dahdi_pri *pri = pris + x; + + if (!pris[x].pri.pvts[0]) { + break; + } + for (i = 0; i < SIG_PRI_NUM_DCHANS; i++) { + int channo = pri->dchannels[i]; + + if (!channo) { + break; + } + if (!pri->pri.fds[i]) { + break; + } + if (channo >= start && channo <= end) { + ast_log(LOG_ERROR, + "channel range %d-%d is occupied by span %d\n", + start, end, x + 1); + goto out; + } + } +#endif + } + if (!default_conf.chan.cc_params || !base_conf.chan.cc_params || + !conf.chan.cc_params) { + goto out; + } + default_conf.wanted_channels_start = start; + base_conf.wanted_channels_start = start; + conf.wanted_channels_start = start; + default_conf.wanted_channels_end = end; + base_conf.wanted_channels_end = end; + conf.wanted_channels_end = end; + if (setup_dahdi_int(0, &default_conf, &base_conf, &conf) == 0) { + ret = RESULT_SUCCESS; + } +out: + ast_cc_config_params_destroy(default_conf.chan.cc_params); + ast_cc_config_params_destroy(base_conf.chan.cc_params); + ast_cc_config_params_destroy(conf.chan.cc_params); + ast_mutex_unlock(&iflock); + return ret; } + static struct dahdi_pvt *handle_init_event(struct dahdi_pvt *i, int event) { int res; @@ -12058,11 +12164,7 @@ static void *do_monitor(void *data) doomed = NULL; for (i = iflist;; i = i->next) { if (doomed) { - int res; - res = dahdi_destroy_channel_bynum(doomed->channel); - if (res != RESULT_SUCCESS) { - ast_log(LOG_WARNING, "Couldn't find channel to destroy, hopefully another destroy operation just happened.\n"); - } + dahdi_destroy_channel_range(doomed->channel, doomed->channel); doomed = NULL; } if (!i) { @@ -14497,10 +14599,21 @@ static int prepare_pri(struct dahdi_pri for (i = 0; i < SIG_PRI_NUM_DCHANS; i++) { if (!pri->dchannels[i]) break; + if (pri->pri.fds[i] >= 0) { + /* A partial range addition. Not a complete setup. */ + break; + } pri->pri.fds[i] = open("/dev/dahdi/channel", O_RDWR); + if ((pri->pri.fds[i] < 0)) { + ast_log(LOG_ERROR, "Unable to open D-channel (fd=%d) (%s)\n", + pri->pri.fds[i], strerror(errno)); + return -1; + } x = pri->dchannels[i]; - if ((pri->pri.fds[i] < 0) || (ioctl(pri->pri.fds[i],DAHDI_SPECIFY,&x) == -1)) { - ast_log(LOG_ERROR, "Unable to open D-channel %d (%s)\n", x, strerror(errno)); + res = ioctl(pri->pri.fds[i], DAHDI_SPECIFY, &x); + if (res) { + dahdi_close_pri_fd(pri, i); + ast_log(LOG_ERROR, "Unable to SPECIFY channel %d (%s)\n", x, strerror(errno)); return -1; } memset(&p, 0, sizeof(p)); @@ -14901,22 +15014,44 @@ static char *handle_pri_show_spans(struc * * \param pri the pri span * - * \return TRUE if the span was valid and we attempted destroying. - * * Shuts down a span and destroys its D-Channel. Further destruction * of the B-channels using dahdi_destroy_channel() would probably be required * for the B-Channels. */ -static int pri_destroy_dchan(struct sig_pri_span *pri) +static void pri_destroy_span(struct sig_pri_span *pri) { int i; + int res; + int cancel_code; struct dahdi_pri* dahdi_pri; + pthread_t master = pri->master; - if (!pri->master || (pri->master == AST_PTHREADT_NULL)) { - return 0; + if (!master || (master == AST_PTHREADT_NULL)) { + return; + } + ast_debug(2, "About to destroy DAHDI channels of span %d.\n", pri->span); + for (i = 0; i < pri->numchans; i++) { + int channel; + struct sig_pri_chan *pvt = pri->pvts[i]; + + if (!pvt) { + continue; + } + channel = pvt->channel; + ast_debug(2, "About to destroy B-channel %d.\n", channel); + dahdi_destroy_channel_range(channel, channel); + } + + cancel_code = pthread_cancel(master); + ast_debug(4, + "Waiting to join thread of span %d " + "with pid=%p cancel_code=%d\n", + pri->span, (void *)master, cancel_code); + res = pthread_join(master, NULL); + if (res != 0) { + ast_log(LOG_NOTICE, "pthread_join failed: %d\n", res); } - pthread_cancel(pri->master); - pthread_join(pri->master, NULL); + pri->master = AST_PTHREADT_NULL; /* The 'struct dahdi_pri' that contains our 'struct sig_pri_span' */ dahdi_pri = container_of(pri, struct dahdi_pri, pri); @@ -14924,17 +15059,16 @@ static int pri_destroy_dchan(struct sig_ ast_debug(4, "closing pri_fd %d\n", i); dahdi_close_pri_fd(dahdi_pri, i); } - pri->pri = NULL; + sig_pri_init_pri(pri); ast_debug(1, "PRI span %d destroyed\n", pri->span); - return 1; } static char *handle_pri_destroy_span(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { int span; - int i; int res; + struct sig_pri_span *pri; switch (cmd) { case CLI_INIT: @@ -14958,25 +15092,13 @@ static char *handle_pri_destroy_span(str a->argv[3], 1, NUM_SPANS); return CLI_SUCCESS; } - if (!pris[span - 1].pri.pri) { + pri = &pris[span - 1].pri; + if (!pri->pri) { ast_cli(a->fd, "No PRI running on span %d\n", span); return CLI_SUCCESS; } - for (i = 0; i < pris[span - 1].pri.numchans; i++) { - int channel; - struct sig_pri_chan *pvt = pris[span - 1].pri.pvts[i]; - - if (!pvt) { - continue; - } - channel = pvt->channel; - ast_debug(2, "About to destroy B-channel %d.\n", channel); - dahdi_destroy_channel_bynum(channel); - } - ast_debug(2, "About to destroy D-channel of span %d.\n", span); - pri_destroy_dchan(&pris[span - 1].pri); - + pri_destroy_span(pri); return CLI_SUCCESS; } @@ -15428,26 +15550,97 @@ static struct ast_cli_entry dahdi_mfcr2_ #endif /* HAVE_OPENR2 */ -static char *dahdi_destroy_channel(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +static char *dahdi_destroy_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { - int channel; - int ret; + int start; + int end; switch (cmd) { case CLI_INIT: - e->command = "dahdi destroy channel"; + e->command = "dahdi destroy channels"; e->usage = - "Usage: dahdi destroy channel \n" + "Usage: dahdi destroy channels []\n" " DON'T USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. Immediately removes a given channel, whether it is in use or not\n"; return NULL; case CLI_GENERATE: return NULL; } - if (a->argc != 4) + if ((a->argc < 4) || a->argc > 5) { return CLI_SHOWUSAGE; + } + start = atoi(a->argv[3]); + if (start < 1) { + ast_cli(a->fd, "Invalid starting channel number %s.\n", + a->argv[4]); + return CLI_FAILURE; + } + if (a->argc == 5) { + end = atoi(a->argv[4]); + if (end < 1) { + ast_cli(a->fd, "Invalid ending channel number %s.\n", + a->argv[4]); + return CLI_FAILURE; + } + } else { + end = start; + } - channel = atoi(a->argv[3]); - ret = dahdi_destroy_channel_bynum(channel); - return ( RESULT_SUCCESS == ret ) ? CLI_SUCCESS : CLI_FAILURE; + if (end < start) { + ast_cli(a->fd, + "range end (%d) is smaller than range start (%d)\n", + end, start); + return CLI_FAILURE; + } + dahdi_destroy_channel_range(start, end); + return CLI_SUCCESS; +} + +static char *dahdi_create_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +{ + int start; + int end; + int ret; + + switch (cmd) { + case CLI_INIT: + e->command = "dahdi create channels"; + e->usage = "Usage: dahdi create channels [] - a range of channels\n" + " dahdi create channels new - add channels not yet created\n" + "For ISDN and SS7 the range should include complete spans.\n"; + return NULL; + case CLI_GENERATE: + return NULL; + } + if ((a->argc < 4) || a->argc > 5) { + return CLI_SHOWUSAGE; + } + if (a->argc == 4 && !strcmp(a->argv[3], "new")) { + ret = dahdi_create_channel_range(0, 0); + return (RESULT_SUCCESS == ret) ? CLI_SUCCESS : CLI_FAILURE; + } + start = atoi(a->argv[3]); + if (start <= 0) { + ast_cli(a->fd, "Invalid starting channel number '%s'.\n", + a->argv[3]); + return CLI_FAILURE; + } + if (a->argc == 5) { + end = atoi(a->argv[4]); + if (end <= 0) { + ast_cli(a->fd, "Invalid ending channel number '%s'.\n", + a->argv[4]); + return CLI_FAILURE; + } + } else { + end = start; + } + if (end < start) { + ast_cli(a->fd, + "range end (%d) is smaller than range start (%d)\n", + end, start); + return CLI_FAILURE; + } + ret = dahdi_create_channel_range(start, end); + return (RESULT_SUCCESS == ret) ? CLI_SUCCESS : CLI_FAILURE; } static void dahdi_softhangup_all(void) @@ -15478,7 +15671,6 @@ retry: ast_mutex_unlock(&iflock); } -static int setup_dahdi(int reload); static int dahdi_restart(void) { #if defined(HAVE_PRI) || defined(HAVE_SS7) @@ -16254,7 +16446,8 @@ static struct ast_cli_entry dahdi_cli[] AST_CLI_DEFINE(handle_dahdi_show_cadences, "List cadences"), AST_CLI_DEFINE(dahdi_show_channels, "Show active DAHDI channels"), AST_CLI_DEFINE(dahdi_show_channel, "Show information on a channel"), - AST_CLI_DEFINE(dahdi_destroy_channel, "Destroy a channel"), + AST_CLI_DEFINE(dahdi_destroy_channels, "Destroy channels"), + AST_CLI_DEFINE(dahdi_create_channels, "Create channels"), AST_CLI_DEFINE(dahdi_restart_cmd, "Fully restart DAHDI channels"), AST_CLI_DEFINE(dahdi_show_status, "Show all DAHDI cards status"), AST_CLI_DEFINE(dahdi_show_version, "Show the DAHDI version in use"), @@ -17278,7 +17471,7 @@ static char *parse_spanchan(char *chanst return p; } -static int build_channels(struct dahdi_chan_conf *conf, const char *value, int reload, int lineno, int *found_pseudo) +static int build_channels(struct dahdi_chan_conf *conf, const char *value, int reload, int lineno) { char *c, *chan; char *subdir; @@ -17301,8 +17494,6 @@ static int build_channels(struct dahdi_c finish = start; } else if (!strcasecmp(chan, "pseudo")) { finish = start = CHAN_PSEUDO; - if (found_pseudo) - *found_pseudo = 1; } else { ast_log(LOG_ERROR, "Syntax error parsing '%s' at '%s'\n", value, chan); return -1; @@ -17332,6 +17523,12 @@ static int build_channels(struct dahdi_c } } } + if (conf->wanted_channels_start && + (real_channel < conf->wanted_channels_start || + real_channel > conf->wanted_channels_end) + ) { + continue; + } tmp = mkintf(real_channel, conf, reload); if (tmp) { @@ -17341,6 +17538,9 @@ static int build_channels(struct dahdi_c (reload == 1) ? "reconfigure" : "register", value); return -1; } + if (real_channel == CHAN_PSEUDO) { + has_pseudo = 1; + } } } @@ -17527,7 +17727,6 @@ static int process_dahdi(struct dahdi_ch { struct dahdi_pvt *tmp; int y; - int found_pseudo = 0; struct ast_variable *dahdichan = NULL; for (; v; v = v->next) { @@ -17540,7 +17739,7 @@ static int process_dahdi(struct dahdi_ch ast_log(LOG_WARNING, "Channel '%s' ignored.\n", v->value); continue; } - if (build_channels(confp, v->value, reload, v->lineno, &found_pseudo)) { + if (build_channels(confp, v->value, reload, v->lineno)) { if (confp->ignore_failed_channels) { ast_log(LOG_WARNING, "Channel '%s' failure ignored: ignore_failed_channels.\n", v->value); continue; @@ -18673,8 +18872,7 @@ static int process_dahdi(struct dahdi_ch if (dahdichan) { /* Process the deferred dahdichan value. */ - if (build_channels(confp, dahdichan->value, reload, dahdichan->lineno, - &found_pseudo)) { + if (build_channels(confp, dahdichan->value, reload, dahdichan->lineno)) { if (confp->ignore_failed_channels) { ast_log(LOG_WARNING, "Dahdichan '%s' failure ignored: ignore_failed_channels.\n", @@ -18697,7 +18895,7 @@ static int process_dahdi(struct dahdi_ch /*< \todo why check for the pseudo in the per-channel section. * Any actual use for manual setup of the pseudo channel? */ - if (!found_pseudo && reload != 1 && !(options & PROC_DAHDI_OPT_NOCHAN)) { + if (!has_pseudo && reload != 1 && !(options & PROC_DAHDI_OPT_NOCHAN)) { /* use the default configuration for a channel, so that any settings from real configured channels don't "leak" into the pseudo channel config @@ -18711,6 +18909,7 @@ static int process_dahdi(struct dahdi_ch } if (tmp) { ast_verb(3, "Automatically generated pseudo channel\n"); + has_pseudo = 1; } else { ast_log(LOG_WARNING, "Unable to register pseudo channel!\n"); } @@ -18990,7 +19189,8 @@ static int setup_dahdi_int(int reload, s if (reload != 1) { int x; for (x = 0; x < NUM_SPANS; x++) { - if (pris[x].pri.pvts[0]) { + if (pris[x].pri.pvts[0] && + pris[x].pri.master == AST_PTHREADT_NULL) { prepare_pri(pris + x); if (sig_pri_start_pri(&pris[x].pri)) { ast_log(LOG_ERROR, "Unable to start D-channel on span %d\n", x + 1); debian/patches/h323-extra-target0000664000000000000000000000111212254353233013623 0ustar Description: allow manually generating channels/h323/Makefile.ast Author: Tzafrir Cohen Bug: https://issues.asterisk.org/view.php?id=17162 Last-Update: 2010-12-18 This patch is a work-around to that bug. It allows running 'make h323-mak' from debian/rules to generate channels/h323/Makefile.ast before running the main 'make' command. --- a/Makefile +++ b/Makefile @@ -965,6 +965,9 @@ pdf: asterisk.pdf asterisk.txt: $(MAKE) -C doc/tex asterisk.txt +h323-mak: + $(MAKE) -C channels h323/Makefile.ast + .PHONY: menuselect .PHONY: main .PHONY: sounds debian/patches/hyphen0000664000000000000000000002247012254353233012044 0ustar Author: Tzafrir Cohen Description: hyphen/minus fixes in asterisk.8 groff considers '-' as hyphen and '\-' as minus. --- a/doc/asterisk.8 +++ b/doc/asterisk.8 @@ -16,27 +16,27 @@ asterisk \fBasterisk\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu -[\fB-BcdfFghiImnpqRtTvVW\fR] [\fB-C \fR\fIfile\fR] [\fB-e \fR\fImemory\fR] [\fB-G \fR\fIgroup\fR] [\fB-L \fR\fIloadaverage\fR] [\fB-M \fR\fIvalue\fR] [\fB-U \fR\fIuser\fR] [\fB-s \fR\fIsocket-file\fR] -'in \n(.iu-\nxu +[\fB\-BcdfFghiImnpqRtTvVW\fR] [\fB\-C \fR\fIfile\fR] [\fB\-e \fR\fImemory\fR] [\fB\-G \fR\fIgroup\fR] [\fB\-L \fR\fIloadaverage\fR] [\fB\-M \fR\fIvalue\fR] [\fB\-U \fR\fIuser\fR] [\fB\-s \fR\fIsocket\-file\fR] +'in \n(.iu\-\nxu .ad b 'hy 'nh .fi .ad l -\fBasterisk -r\fR \kx +\fBasterisk \-r\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu -[\fB-v\fR] [\fB-d\fR] [\fB-x \fR\fIcommand\fR] +[\fB\-v\fR] [\fB\-d\fR] [\fB\-x \fR\fIcommand\fR] 'in \n(.iu-\nxu .ad b 'hy 'nh .fi .ad l -\fBasterisk -R\fR \kx +\fBasterisk \-R\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu -[\fB-v\fR] [\fB-d\fR] [\fB-x \fR\fIcommand\fR] +[\fB\-v\fR] [\fB\-d\fR] [\fB\-x \fR\fIcommand\fR] 'in \n(.iu-\nxu .ad b 'hy @@ -52,12 +52,12 @@ ISDN BRI and many more. .PP At start, Asterisk reads the /etc/asterisk/asterisk.conf main configuration file and locates the rest of the configuration files from the configuration -in that file. The -C option specifies an alternate main configuration file. +in that file. The \-C option specifies an alternate main configuration file. Virtually all aspects of the operation of asterisk's configuration files can be found in the sample configuration files. The format for those files is generally beyond the scope of this man page. .PP -When running with \fB-c\fR, \fB-r\fR or \fB-R\fR +When running with \fB\-c\fR, \fB\-r\fR or \fB\-R\fR options, Asterisk supplies a powerful command line, including command completion, which may be used to monitors its status, perform a variety of administrative actions and even explore the applications that are @@ -70,26 +70,26 @@ in the foreground). However running it w \*(T<\fB\-R\fR\*(T> connects to an existing Asterisk instance through a remote console. .TP --B +\-B Force the background of the terminal to be black, in order for terminal colors to show up properly. Equivalent to \*(T<\fBforceblackbackground = yes\fR\*(T> in \*(T<\fIasterisk.conf\fR\*(T>. See also \*(T<\fB\-n\fR\*(T> and \*(T<\fB\-W\fR\*(T>. .TP --C \fIfile\fR +\-C \fIfile\fR Use \*(T<\fIfile\fR\*(T> as master configuration file instead of the default, /etc/asterisk/asterisk.conf .TP --c +\-c Provide a control console on the calling terminal. The console is similar to the remote console provided by \*(T<\fB\-r\fR\*(T>. Specifying this option implies -\fB-f\fR and will cause asterisk to no longer +\fB\-f\fR and will cause asterisk to no longer fork or detach from the controlling terminal. Equivalent to \*(T<\fBconsole = yes\fR\*(T> in \*(T<\fIasterisk.conf\fR\*(T>. .TP --d +\-d Enable extra debugging statements. This parameter may be used several times, and each increases the debug level. Equivalent to \*(T<\fBdebug = \fR\*(T>\fInum\fR in \*(T<\fIasterisk.conf\fR\*(T> to explicitly set the initian debug @@ -104,62 +104,62 @@ has decreased to under \fImemory\fR mega Equivalent to \*(T<\fBminmemfree = \fR\*(T>\fImemory\fR in \*(T<\fIasterisk.conf\fR\*(T>. .TP --f +\-f Do not fork or detach from controlling terminal. Overrides any -preceding specification of \fB-F\fR on the command line. +preceding specification of \fB\-F\fR on the command line. Equivalent to \*(T<\fBnofork = yes\fR\*(T> in \*(T<\fIasterisk.conf\fR\*(T>. See also \*(T<\fB\-c\fR\*(T>. .TP --F +\-F Always fork and detach from controlling terminal. Overrides any -preceding specification of \fB-f\fR on the command line. +preceding specification of \fB\-f\fR on the command line. May also be used to prevent \*(T<\fB\-d\fR\*(T> and \*(T<\fB\-v\fR\*(T> to imply no forking. Equivalent to \*(T<\fBalwaysfork = yes\fR\*(T> in \*(T<\fIasterisk.conf\fR\*(T>. .TP --g +\-g Remove resource limit on core size, thus forcing Asterisk to dump core in the unlikely event of a segmentation fault or abort signal. \fBNOTE:\fR in some cases this may be incompatible -with the \fB-U\fR or \fB-G\fR flags. +with the \fB\-U\fR or \fB\-G\fR flags. .TP --G \fIgroup\fR +\-G \fIgroup\fR Run as group \fIgroup\fR instead of the calling group. \fBNOTE:\fR this requires substantial work to be sure that Asterisk's environment has permission to write the files required for its operation, including logs, its comm socket, the asterisk database, etc. .TP --h +\-h Provide brief summary of command line arguments and terminate. .TP --i +\-i Prompt user to intialize any encrypted private keys for IAX2 secure authentication during startup. .TP --I +\-I Enable internal timing if DAHDI timing is available. The default behaviour is that outbound packets are phase locked to inbound packets. Enabling this switch causes them to be locked to the internal DAHDI timer instead. .TP --L \fIloadaverage\fR +\-L \fIloadaverage\fR Limits the maximum load average before rejecting new calls. This can be useful to prevent a system from being brought down by terminating too many simultaneous calls. .TP --m +\-m Temporarily mutes output to the console and logs. To return to normal, use \fBlogger mute\fR. .TP --M \fIvalue\fR +\-M \fIvalue\fR Limits the maximum number of calls to the specified value. This can be useful to prevent a system from being brought down by terminating too many simultaneous calls. .TP --n +\-n Disable ANSI colors even on terminals capable of displaying them. .TP --p +\-p If supported by the operating system (and executing as root), attempt to run with realtime priority for increased performance and responsiveness within the Asterisk process, at the expense of other @@ -170,77 +170,77 @@ Note: \fBastcanary\fR will run concurren running or is killed, \fBasterisk\fR will slow down to normal process priority, to avoid locking up the machine. .TP --q +\-q Reduce default console output when running in conjunction with -console mode (\fB-c\fR). +console mode (\fB\-c\fR). .TP --r +\-r Instead of running a new Asterisk process, attempt to connect to a running Asterisk process and provide a console interface for controlling it. .TP --R -Much like \fB-r\fR. Instead of running a new Asterisk process, attempt to connect +\-R +Much like \fB\-r\fR. Instead of running a new Asterisk process, attempt to connect to a running Asterisk process and provide a console interface for controlling it. Additionally, if connection to the Asterisk process is lost, attempt to reconnect for as long as 30 seconds. .TP -s \fIsocket file name\fR -In combination with \fB-r\fR, connect directly to a specified +In combination with \fB\-r\fR, connect directly to a specified Asterisk server socket. .TP --t +\-t When recording files, write them first into a temporary holding directory, then move them into the final location when done. .TP --T +\-T Add timestamp to all non-command related output going to the console when running with verbose and/or logging to the console. .TP --U \fIuser\fR +\-U \fIuser\fR Run as user \fIuser\fR instead of the calling user. \fBNOTE:\fR this requires substantial work to be sure that Asterisk's environment has permission to write the files required for its operation, including logs, its comm socket, the asterisk database, etc. .TP --v +\-v Increase the level of verboseness on the console. The more times -\fB-v\fR is specified, the more verbose the output is. -Specifying this option implies \fB-f\fR and will cause +\fB\-v\fR is specified, the more verbose the output is. +Specifying this option implies \fB\-f\fR and will cause asterisk to no longer fork or detach from the controlling terminal. -This option may also be used in conjunction with \fB-r\fR -and \fB-R\fR. +This option may also be used in conjunction with \fB\-r\fR +and \fB\-R\fR. Note: This always sets the verbose level in the asterisk process, even if it is running in the background. This will affect the size of your log files. .TP --V +\-V Display version information and exit immediately. .TP --W +\-W Display colored terminal text as if the background were white or otherwise light in color. Normally, terminal text is displayed as if the background were black or otherwise dark in color. .TP --x \fIcommand\fR +\-x \fIcommand\fR Connect to a running Asterisk process and execute a command on a command line, passing any output through to standard out and then terminating when the command execution completes. Implies -\fB-r\fR when \fB-R\fR is not explicitly +\fB\-r\fR when \fB\-R\fR is not explicitly supplied. .TP --X +\-X Enables executing of includes via \fB#exec\fR directive. This can be useful if You want to do \fB#exec\fR inside \*(T<\fIasterisk.conf\fR\*(T> .SH EXAMPLES \fBasterisk\fR - Begin Asterisk as a daemon .PP -\fBasterisk -vvvgc\fR - Run on controlling terminal +\fBasterisk \-vvvgc\fR - Run on controlling terminal .PP -\fBasterisk -rx "core show channels"\fR - Display channels on running server +\fBasterisk \-rx "core show channels"\fR - Display channels on running server .SH BUGS Bug reports and feature requests may be filed at https://issues.asterisk.org .SH "SEE ALSO" debian/patches/sound_files0000664000000000000000000000241412254353233013057 0ustar Subject: Avoid downloading extra sound files From: Tzafrir Cohen Forwarded: no Last-Update: 2012-12-15 Asterisk configures several sound files to be installed that are not included in the distribution tarball. Those files are downloaded by the 'install' target. The exact files to be downloaded is configurable. Here we change the default to avoid downloading any. We believe those should be part of a separate source package (as they rarely change, and have their own versioning). --- a/sounds/sounds.xml +++ b/sounds/sounds.xml @@ -10,7 +10,6 @@ core - yes core @@ -138,7 +137,6 @@ - yes core debian/patches/enable_addons0000664000000000000000000000374412254353233013332 0ustar Description: enable modules formly from asterisk-addons Author: Tzafrir Cohen Applied-Upsteam: no The modules under addons/ are originally from the separate asterisk-addons package. As of asterisk 1.8 they are included in the main Asterisk distribution but not enabled by default. this patch enables them, as it seems valid in Debian. format_mp3.c is not enabled, yet, though: the complete source is not included. See contrib/scripts/get_mp3_source.sh in the source tree. --- a/addons/app_mysql.c +++ b/addons/app_mysql.c @@ -25,7 +25,6 @@ /*** MODULEINFO mysqlclient - no deprecated func_odbc ***/ --- a/addons/app_saycountpl.c +++ b/addons/app_saycountpl.c @@ -21,7 +21,6 @@ */ /*** MODULEINFO - no deprecated say.conf ***/ --- a/addons/chan_mobile.c +++ b/addons/chan_mobile.c @@ -27,7 +27,6 @@ /*** MODULEINFO bluetooth - no extended ***/ --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -18,7 +18,6 @@ /*** MODULEINFO - no extended ***/ --- a/addons/res_config_mysql.c +++ b/addons/res_config_mysql.c @@ -24,7 +24,6 @@ /*** MODULEINFO mysqlclient - no extended ***/ --- a/addons/cdr_mysql.c +++ b/addons/cdr_mysql.c @@ -35,7 +35,6 @@ /*** MODULEINFO mysqlclient - no deprecated cdr_adaptive_odbc ***/ --- a/addons/format_mp3.c +++ b/addons/format_mp3.c @@ -28,7 +28,6 @@ */ /*** MODULEINFO - no extended ***/ debian/asterisk.install0000664000000000000000000000016612254353233012412 0ustar usr/sbin usr/share/asterisk/firmware usr/share/asterisk/keys usr/share/asterisk/conf usr/share/asterisk/documentation debian/asterisk-config.examples0000664000000000000000000000012112254353233014014 0ustar configs agi/agi-test.agi agi/eagi-test.c agi/eagi-sphinx-test.c agi/fastagi-test debian/asterisk.examples0000664000000000000000000000010312254353232012550 0ustar sample.call contrib/scripts/vmail.cgi debian/asterisk.startup.conf debian/asterisk.docs0000664000000000000000000000006012254353233011665 0ustar BUGS README CREDITS CHANGES menuselect.makeopts debian/TODO.Debian0000664000000000000000000000024212254353233011041 0ustar * Some man pages to write. * Get rid of the lump of code in patch mpglib. Rewrite using code from mpg123? * Get libilbc packages instead of the built-in libilbc. debian/asterisk-doc.docs0000664000000000000000000000024712254353232012436 0ustar BUGS README CREDITS CHANGES UPGRADE-1.2.txt UPGRADE-1.4.txt UPGRADE-1.6.txt UPGRADE-1.8.txt UPGRADE-10.txt UPGRADE.txt Zaptel-to-DAHDI.txt doc/*.txt doc/*.pdf configs debian/changelog0000664000000000000000000034770512256214512011062 0ustar asterisk (1:11.7.0~dfsg-1ubuntu1) trusty; urgency=low * Merge from Debian testing, remaining changes: - debian/asterisk.init: chown /dev/dahdi - debian/control, debian/rules: + Enable Hardening Wrapper (PIE and BIND_NOW) + Build against libical 1.0 -- Mahyuddin Susanto Tue, 24 Dec 2013 12:18:35 +0700 asterisk (1:11.7.0~dfsg-1) unstable; urgency=high * New upstream security release (Closes: #732355). - Drop astdb_mans patch, fixed upstream. * Fix versioned Breaks/Replaces for asterisk-dahdi (Closes: #732419). -- Jeremy Lainé Wed, 18 Dec 2013 09:47:58 +0100 asterisk (1:11.6.0~dfsg-3ubuntu1) trusty; urgency=low * Merge from Debian unstable, remaining changes: - debian/asterisk.init: chown /dev/dahdi - debian/control, debian/rules: + Enable Hardening Wrapper (PIE and BIND_NOW) + Build against libical 1.0 -- Lorenzo De Liso Sun, 15 Dec 2013 23:07:52 +0100 asterisk (1:11.6.0~dfsg-3) unstable; urgency=medium * Fix default RADIUS configuration path when using libfreeradius-client. -- Jeremy Lainé Fri, 13 Dec 2013 10:10:50 +0100 asterisk (1:11.6.0~dfsg-2) unstable; urgency=medium [ Jeremy Lainé ] * Update Standards-Version to 3.9.5 (no changes). * Add Suggests on asterisk-vpb. * Build against libfreeradius-client (Closes: #721622). * Make sure CPPFLAGS get carried down to the build system. * Fix versioned Breaks/Replaces for asterisk-vpb (Closes: #731971). [ Tzafrir Cohen ] * Restore SE Linux settings on directories created in init script (Russell Coker, Closes: #731397). * ignore_failed_channels.patch: allow dahdi to start after Asterisk. * Move app_flash to asterisk-dahdi. -- Jeremy Lainé Thu, 12 Dec 2013 19:04:39 +0100 asterisk (1:11.6.0~dfsg-1) unstable; urgency=low * New upstream release. - Drop bzero patch, fixed upstream. - Update pjproject patch. * Move VoiceTronix support to asterisk-vpb (Closes: #492329). * Enable BETTER_BACKTRACES for debug builds. -- Jeremy Lainé Mon, 02 Dec 2013 19:26:03 +0100 asterisk (1:11.5.1~dfsg1-1) unstable; urgency=low * Remove res/pjproject from the source tarball (Closes: #725210). -- Jeremy Lainé Thu, 03 Oct 2013 09:25:06 +0200 asterisk (1:11.5.1~dfsg-2) unstable; urgency=low [ Jeremy Lainé ] * Fix FTBFS for binary-arch builds. * Fix Vcs-Browser and Vcs-Git URLs. * Update Standards-Version to 3.9.4 (no changes). [ Tzafrir Cohen ] * Patch reenable: reenable chan_vpb. * Depend on srtp even on sparc and hurd: the build fails if srtp is not installed. * Add Jeremy Lainé to uploaders. -- Jeremy Lainé Wed, 02 Oct 2013 13:46:40 +0200 asterisk (1:11.5.1~dfsg-1) unstable; urgency=low [ Faidon Liambotis ] * New major upstream release. - Drop patch kfreebsd, fixed upstream. - Drop patch httpd_port. - Drop patch menuselect_cflags, merged upstream. - Drop patch bluetooth_bind, merged upstream. - Replace libopenais-dev with corosync-dev, res_corosync replaces res_ais. - Fixes CVE-2013-5641, CVE-2013-5642 (Closes: #721220). - Patch fix_xmpp_19532 also included (Closes: #545272). - Patch powerpcspe also included (Closes: #701505). - Fixes incorrect sip causes issue (Closes: #710557). - Patch powerpcspe also included (Closes: #701505). - Patces merged upstream: AST-2012-012, ASt-2012-013, AST-2012-014, AST-2012-015, AST-2013-002, AST-2013-003 * Do not ship the removed-but-reincluded docs, they're outdated by now. Upstream wants their Wiki to be the primary Asterisk documentation place. * Ship UPGRADE-{10,1.8,1.4,1.2}.txt in asterisk-doc. * Do not ship app_meetme.so and app_dahdibarge.so, deprecated by upstream. - Also remove them from asterisk-dahdi's full description. * Remove ASTSAFE_CONSOLE and ASTSAFE_TTY from asterisk.default, they aren't being unused for a while now. [ Tzafrir Cohen ] * Patch undeprecate: undeprecate meetme. * increased compat level for debian/clean. * Disable hardening for now. * Convert rules to dh. - Patch astdatadir: set datadir in /usr/share/asterisk instead of using an environment variable. * Patch pjproject: make pjproject optional. - Patch bzero: Simplify applying the above, and fix an interface stupidity inflicted by pjproject. - get-orig-source: remove res/pjproject from the source tarball. * debian/rules: switch to dh. * Patches dahdi_create_channels, dahdi_pri_event_removed: backport dynamic DAHDI support. * Patch hyphen: hypen-minus fixes in asterisk.8 * Patch astdb_man: Man pages for astdb2bdb and astdb2sqlite3. [ David Sarmiento ] * Re-enabled pjproject * Modified rules file to be able to build pjproject * Updated build-deps -- Tzafrir Cohen Mon, 30 Sep 2013 21:28:22 +0300 asterisk (1:1.8.13.1~dfsg-3ubuntu3) saucy; urgency=low * Use the autotools-dev dh addon to update config.guess/config.sub for arm64. -- Colin Watson Thu, 17 Oct 2013 00:43:57 +0100 asterisk (1:1.8.13.1~dfsg-3ubuntu2) saucy; urgency=low * Drop Build-Depends on libopenais-dev. This drops support for res_ais.so. A newer upstream release has support for Corosync instead of ais. -- Andres Rodriguez Wed, 25 Sep 2013 14:06:23 -0400 asterisk (1:1.8.13.1~dfsg-3ubuntu1) saucy; urgency=low * Merge from Debian unstable. (LP: #1205644) Remaining changes: - debian/asterisk.init: + chown /dev/dahdi - debian/control, debian/rules: + Enable Hardening Wrapper (PIE and BIND_NOW). + Build against libical 1.0. - debian/patches/armhf-fixes: + Fix FTBFS on armhf. * Fixed security issues: - CVE-2012-5976 (LP: #1097687) - CVE-2012-5977 (LP: #1097691) - CVE-2013-2686 - CVE-2013-2264 -- Artur Rona Sat, 27 Jul 2013 14:56:17 +0200 asterisk (1:1.8.13.1~dfsg-3) unstable; urgency=high * Rewrtote sip.conf parts of AST-2012-014: dropped patches fix-sip-tcp-no-FILE and fix-sip-tls-leak. * Reverting other changes rejected by the release team: README.Debian, powerpcspe and fix_xmpp_19532 dropped (#545272 and #701505 reopened). -- Tzafrir Cohen Tue, 09 Apr 2013 13:23:07 +0300 asterisk (1:1.8.13.1~dfsg-2) unstable; urgency=high * Patches backported from Asterisk 1.8.19.1 (Closes: #697230): - Patch AST-2012-014 (CVE-2012-5976) - fixes Crashes due to large stack allocations when using TCP. The following two fixes were also pulled in order to easily apply it: - Patch fix-sip-tcp-no-FILE - Switch to reading with a recv loop - Patch fix-sip-tls-leak - Memory leak in the SIP TLS code - Patch AST-2012-015 (CVE-2012-5977) - Denial of Service Through Exploitation of Device State Caching * Patch powerpcspe: Fix OSARCH for powerpcspe (Closes: #701505). * README.Debian: document running the testsuite. * Patch fix_xmpp_19532: fix a crash of the XMPP code (Closes: #545272). * Patches backported from Asterisk 1.8.20.2 (Closes: #704114): - Patch AST-2013-002 (CVE-2013-2686): Prevent DoS in HTTP server with a large POST. - Patch AST-2013-003 (CVE-2013-2264): Prevent username disclosure in SIP channel driver. * Patch bluetooth_bind - fix breakage of chan_mobile (Closes: #614786). -- Tzafrir Cohen Sat, 06 Apr 2013 14:15:41 +0300 asterisk (1:1.8.13.1~dfsg-1ubuntu4) saucy; urgency=low * Build against libical 1.0 -- Jonathan Riddell Thu, 13 Jun 2013 13:23:50 +0100 asterisk (1:1.8.13.1~dfsg-1ubuntu3) saucy; urgency=low * Rebuild for libsnmp30. -- Colin Watson Mon, 20 May 2013 09:47:14 +0100 asterisk (1:1.8.13.1~dfsg-1ubuntu2) quantal; urgency=low * Build-depend on hardening-wrapper again, reenables pie and bindnow (LP: #1039542) -- Julian Taylor Tue, 09 Oct 2012 21:44:39 +0200 asterisk (1:1.8.13.1~dfsg-1ubuntu1) quantal; urgency=low * Merge from Debian unstable. (LP: #1022360, CVE-2012-3812) Remaining changes: - debian/asterisk.init: chown /dev/dahdi - Fix building on armhf with debian/patches/armhf-fixes: + Flatten linux-gnueabihf in configure to linux-gnu, in the same way that's already done for linux-gnueabi -- Julian Taylor Sat, 08 Sep 2012 12:38:06 +0200 asterisk (1:1.8.13.1~dfsg-1) unstable; urgency=low * New upstream release (Closes: #680470): - Fixes AST-2012-010 (CVE-2012-3863). - Fixes AST-2012-011 (CVE-2012-38612). * Patch AST-2012-012 (CVE-2012-2186): AMI User Shell Access with ExternalIVR * Patch AST-2012-012 (CVE-2012-4737): ACL rules ignored during calls by some IAX2 peers. -- Tzafrir Cohen Sat, 01 Sep 2012 04:44:12 +0300 asterisk (1:1.8.13.0~dfsg-1ubuntu1) quantal; urgency=low * Merge from Debian unstable. * Remaining changes: - debian/asterisk.init: chown /dev/dahdi - Fix building on armhf with debian/patches/armhf-fixes: + Flatten linux-gnueabihf in configure to linux-gnu, in the same way that's already done for linux-gnueabi * Changes dropped from Ubuntu delta as no longer applicable: - debian/backports/hardy: add file - debian/backports/asterisk.init.hardy: add file -- Andrew Mitchell Fri, 15 Jun 2012 09:18:16 +1200 asterisk (1:1.8.13.0~dfsg-1) unstable; urgency=high * New upstream release. - AST-2012-007 (CVE-2012-2947): Fix IAX receiving HOLD without suggested MOH class crash (Closes: #675204). - AST-2012-008 (CVE-2012-2948): remote crash issue in chan_skinny (Closes: #67521). - Patch gmime2.6 removed: merged upstream. - Patch sparc32_disable removed: hacks removed from Upstream Makefile. * Also pass LDFLAGS to menuselect (Closes: #664086 for real). * Fully strip-out the ilbc code (Closes: #665938, #665937). - Patch ilbc_disable to fix the build. * Patch httpd_port: Fix port number of Asterisk httpd. * While we're at it: Closes: #606959, which is a non-issue. -- Tzafrir Cohen Wed, 16 May 2012 18:43:18 +0300 asterisk (1:1.8.11.1~dfsg-1) unstable; urgency=high * New upstream release, Closes: #670180: - AST-2012-004 - further Manager permission fixes (CVE-2012-2414). - AST-2012-005 - Heap overflow in chan_skinny (CVE-2012-2415). - AST-2012-006 - Remote crash on SIP "UPDATE" method (CVE-2012-2416). * Fix daemon status check in init.d script (Closes: #669378). * Patch menuselect_cflags: allow passing our flags to menuselect's build. - Use it t opass our CFLAGS to menuselect (Closes: #664086). -- Tzafrir Cohen Wed, 25 Apr 2012 12:19:06 +0300 asterisk (1:1.8.10.1~dfsg-1ubuntu1) precise; urgency=low * Merge from Debian unstable. (LP: #987772, #956578, #956580, #956581) * Remaining changes: - debian/asterisk.init: chown /dev/dahdi - debian/backports/hardy: add file - debian/backports/asterisk.init.hardy: add file - Fix building on armhf with debian/patches/armhf-fixes: + Flatten linux-gnueabihf in configure to linux-gnu, in the same way that's already done for linux-gnueabi * Changes dropped from Ubuntu delta as no longer applicable: - debian/patches/backport-r312866.diff: Backported from upstream - debian/control: Build-depend on hardening-wrapper, now handled by dpkg-buildflags - debian/rules: Make use of hardening-wrapper -- Andrew Mitchell Tue, 24 Apr 2012 22:15:54 +1200 asterisk (1:1.8.10.1~dfsg-1) unstable; urgency=low [ Victor Seva ] * Update backports/squeeze script gmime2.6 -> gmime2.4 [ Tzafrir Cohen ] * New upstrean bug-fix release. - Fixes "[CVE-2012-1183 - CVE-2012-1184] Asterisk: AST-2012-002 and AST-2012-003 flaws" (Closes: #664411). * Patch gmime2.6 (Closes: #663998, #664004), also fixed Build-Depends. * Remove the text of RFC 3951 from the tarball. (Closes: #665937) -- Mark Purcell Sat, 31 Mar 2012 08:44:57 +1100 asterisk (1:1.8.10.0~dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * New upstrean release. * Build-depend on sqlite3 as well (Closes: #531759). [ Paul Belanger ] * debian/patch/chan_iax2-detach-thread-on-non-stop-exit: - Dropped; merged upstream [ Mark Purcell ] * New Release: - Fixes "SHA-1 code is doesn't allow modification" (Closes: #643703) - Fixes "Placing calls on hold fails with some IP phones" (Closes: #632518) - Fixes "Pass the correct value to ast_timer_set_rate() for IAX2 trunking." (Closes: #661974) - Fixes "Call quality on IAX significantly worse than SIP" (Closes: #481702) - Fixes "New upstream release: 1.8.2.2" (Closes: #610811) - Fixes "asterisk german number pronunciation" (Closes: #402991) - Fixes "Why using version 1.6.2.9 - it's not LTS" (Closes: #612147) - Fixes "SRTP/ZRTP support for Asterisk" (Closes: #577686) - Fixes "fails to register SIP channels on ARM" (Closes: #660240) * export CFLAGS LDFLAGS - Fixes "Hardening flags missing for menuselect" (Closes: #664086) - Fixes "enable hardening options" (Closes: #542741) -- Mark Purcell Sun, 18 Mar 2012 16:47:35 +1100 asterisk (1:1.8.8.2~dfsg-1) unstable; urgency=high * New upstream release, fixes AST-2012-001 (Closes: #656596). * Use CFLAGS and LDFLAGS from dpkg-buildflags (Closes: #653944). -- Tzafrir Cohen Fri, 20 Jan 2012 14:16:47 +0200 asterisk (1:1.8.8.0~dfsg-1) unstable; urgency=high [ Faidon Liambotis ] * Fix Breaks/Conflicts to contain the epoch. * Urgency high since this resulted in file conflicts when upgrading from stable. * Patch reenable-pri-optional: Backport a patch from upstream to fix several PRI features being compiled-out and hence disabled. * Bump libpri-dev dependency to 1.4.12; it is not strictly needed but extra functionality is enabled at build-time. [ Tzafrir Cohen ] * New upstream release. Closes: #651552. - Patch reenable-pri-optional dropped: included upstream. * Officially remove asterisk-h323: - Break older versions, as it did not have a versioned Depends before. - Remove the package. * Update watch file to only check for 1.8.x tarballs. * Quote pathes in postinst script: Closes: #656208 (Pocos). -- Tzafrir Cohen Wed, 18 Jan 2012 15:26:34 +0200 asterisk (1:1.8.7.1~dfsg-2) unstable; urgency=low * libncurses is a build dep afterall (Closes: #649431). -- Tzafrir Cohen Fri, 25 Nov 2011 16:44:31 +0200 asterisk (1:1.8.7.1~dfsg-1) unstable; urgency=high [ Tzafrir Cohen ] * New upstream release (Closes: #647252): - Patch refix_bashism removed: applied upstream. - Patch openssl10 removed: applied upstream. - Patch gmime-2.4 removed: applied upstream. - Patch gcc46 removed - was a backport from upstream. * Disable chan_h323: broken with current h323plus, and not loved by upstream. * Patch chan_iax2-detach-thread-on-non-stop-exit: Hopefully plugs a memory leak. * Patch reinclude_docs: a copy of the included documentation that was removed. * Patch sparc32_disable: Remove pointless optimization for sparc64 [ Paul Belanger ] * Bump libpri-dev to 1.4.11. * Ensure sub-packages with asterisk modules are the same version as the binary. -- Tzafrir Cohen Fri, 11 Nov 2011 17:48:03 +0200 asterisk (1:1.8.4.4~dfsg-2ubuntu4) precise; urgency=low * debian/patches/backport-r312866.diff - Responding to OPTIONS packet with 404 because Asterisk not looking for "s" extension (LP: #920020) -- Paul Belanger Sat, 10 Mar 2012 21:38:29 +0100 asterisk (1:1.8.4.4~dfsg-2ubuntu3) precise; urgency=low * Fix building on armhf with debian/patches/armhf-fixes: - Add linux-gnueabihf to list of OSARCHes that need -ldl - Flatten linux-gnueabihf in configure to linux-gnu, in the same way that's already done for linux-gnueabi -- Adam Conrad Thu, 12 Jan 2012 09:08:17 -0700 asterisk (1:1.8.4.4~dfsg-2ubuntu2) precise; urgency=low * Rebuild for libmysqlclient transition. -- Clint Byrum Wed, 23 Nov 2011 10:52:40 -0800 asterisk (1:1.8.4.4~dfsg-2ubuntu1) oneiric; urgency=low * Merge from debian unstable (LP: #852479). Remaining changes: - debian/control: Build-depend on hardening-wrapper - debian/rules: Make use of hardening-wrapper - debian/asterisk.init: chown /dev/dahdi - debian/backports/hardy: add file - debian/backports/asterisk.init.hardy: add file * Changes dropped from Ubuntu delta as no longer applicable: - debian/control: + Removed Uploaders field + Removed Debian Vcs-Svn entry and replaced with ubuntu-voip Vcs-Bzr, to reflect divergence in packages. -- James Page Tue, 20 Sep 2011 14:05:14 +0100 asterisk (1:1.8.4.4~dfsg-2) unstable; urgency=low * Don't mark en-gsm sound files as enabled, so they won't be downloaded. -- Tzafrir Cohen Mon, 04 Jul 2011 23:19:50 +0300 asterisk (1:1.8.4.4~dfsg-1) unstable; urgency=high * AST-2011-011 (CVE-2011-2536): Don't leak SIP username information (closes: #632029) * Clearly the NC-ND license for AST.{pdf,txt} is here to stay. Strip it. - And while we're at at, strip out sound files and some generated files. -- Tzafrir Cohen Fri, 01 Jul 2011 11:51:45 +0300 asterisk (1:1.8.4.3-1) unstable; urgency=high * New upstream point release, fixes 3 remotely-explitables (of sort) bugs: - AST-2011-008, CVE-2011-2529 (Closes: #631446) - AST-2011-009 (Closes: #631445) - AST-2011-010, CVE-2011-2535 (Closes: #631448) -- Tzafrir Cohen Fri, 24 Jun 2011 00:51:49 +0300 asterisk (1:1.8.4.2-1) unstable; urgency=low * New upstream point release: - Fixes CVE-2011-2216 - AST-2011-007 (Closes: #629130). * Patch gcc46: Fix the induced regression. * Blacklist SRTP support on Sparc and hurd-i386 until SRTP available there. -- Tzafrir Cohen Fri, 03 Jun 2011 23:20:29 +0300 asterisk (1:1.8.4-1) unstable; urgency=low * New upstream release. - Patch no_ssl2 removed: merged upstream. * Remove unneeded dependency on voicemail modules - only leave Recommends (Closes: #624190). * Patch refix_bashism: bashism crept bact into the configure script (Jilles Tjoelker). * Fixes for kFreeBSD (Closes: #624569): - Declare build-deps linux-any: libtonezone-dev, libvpb-dev, libbluetooth-dev, libopenh323-dev, libcap[2]-dev, libstrp0-dev. - Thus sub-packages asterisk-dahdi, asterisk-h323 and asterisk-mobile are linux-any. - And logic added to rules file not to copy their files on non-linux. - Patch kfreebsd: Fix building with kFreeBSD. - Patch no_uname: Fix building with kFreeBSD: an uglier patch. * Patch gcc46: Some gcc-4.6 fixes from upstream. Get rid of some build warnings. -- Tzafrir Cohen Mon, 16 May 2011 00:58:19 +0300 asterisk (1:1.8.3.3-1ubuntu1) oneiric; urgency=low * Merge from debian unstable, remaining changes: - debian/control: + Build-depend on hardening-wrapper + Removed Uploaders field + Removed Debian Vcs-Svn entry and replaced with ubuntu-voip Vcs-Bzr, to reflect divergence in packages. - debian/rules: Make use of hardening-wrapper - debian/asterisk.init: chown /dev/dahdi - debian/backports/hardy: add file - debian/backports/asterisk.init.hardy: add file -- Lorenzo De Liso Mon, 02 May 2011 10:44:38 +0200 asterisk (1:1.8.3.3-1) unstable; urgency=high [ Tzafrir Cohen ] * Switching to branch 1.8 (Closes: #610487, #614580, #618790, #618791, #623775). * Patch parser-mangles-include dropped: merged upstream. * Patch dahdi-fxsks-hookstate dropped: merged upstream. * Patch dahdi_ptmp_nt dropped: silly hack no longer needed. * Patch dahdi_pri_debug_spannums dropped: merged upstream. * Patch moh_datadir dropped: merged upstream. * Patch settings_show_dirs dropped: merged upstream. * Patch man_hyphen dropped: merged upstream. * Patch typos dropped: merged upstream. * Patch rtcp_cli_fix dropped: merged upstream. * Sound files: version 1.4.20 * Separate sub-package asterisk-modules to avoid multiarch issues. * Extra sub-package asterisk-dahdi for the dahdi modules (Closes: #590558). * As of 1.8.1, AST.pdf and AST.txt are generated from the wiki. - And thus no need for rubber at build time (Closes: #531551). * Separate sub-packages for voicemail backends: - asterisk-voicemail{,-{imap,odbc}storage} - And rename the modules accordingly. * asterisk-mysql, asterisk-mobile, asterisk-mp3, asterisk-ooh323: - asterisk-addons was merged into Asterisk. - Patch enable_addons: do build those modules. - Also app_saycountpl, which will go into the mian package. - Patch mpglib: mpglib from asterisk-addons, originally. * Patch gmime-2.4: fixes building with gmime 2.4 (Closes: #549054). - Requires re-generating configure script. * Patch openssl10: Fix detection of openssl 1.0. * Patch no_ssl2: Don't require client-side SSL2 support. * include menuselect.makeopts in the docs directory - let us know what modules were not built. * Bump Standards version to 3.9.2.0 (no change needed). * Upstream prefers chan_ooh323 to chan_h323. Suggest asterisk-ooh323. * Drop asterisk-sounds-main: we already have that functionality the asterisk-core-sounds packages. * Recommend a moh (music-on-hold) package to have music played on hold. [ Faidon Liambotis ] * Switch to the "3.0 (quilt)" package source format. [ Paul Belanger ] * Depend on libneon27-dev and libical-dev for calendar support. * Depend on libsrtp0-dev for SRTP support. * When compiling with DEB_BUILD_OPTIONS="debug" enable native Asterisk debugging tools. Specifically DONT_OPTIMIZE, DEBUG_THREADS and --enable-dev-mode. * Regardless of which asterisk-voicemail-* is installed (each package conflicts on each other), the name of the module is now app_voicemail.so. * Fix a bug with app_voicemail-*.exports.in not being copied properly. -- Tzafrir Cohen Mon, 25 Apr 2011 21:46:51 +0300 asterisk (1:1.6.2.9-2ubuntu2) natty; urgency=low * SECURITY UPDATE: Stack buffer overflow in SIP channel driver. (LP: #705014) - debian/patches/AST-2011-001-1.6.2: The size of the output buffer passed to the ast_uri_encode function is now properly respected in main/utils.c. Patch courtesy of upstream. - CVE-2011-0495 -- Dave Walker (Daviey) Thu, 20 Jan 2011 21:19:46 +0000 asterisk (1:1.6.2.9-2ubuntu1) natty; urgency=low * Merge from debian unstable, remaining changes: - debian/control: + Build-depend on hardening-wrapper + Change Maintainer + Removed Uploaders field. + Removed Debian Vcs-Svn entry and replaced with ubuntu-voip Vcs-Bzr, to reflect divergence in packages. - debian/rules: Make use of hardening-wrapper - debian/asterisk.init: chown /dev/dahdi - debian/backports/hardy: add file - debian/backports/asterisk.init.hardy: add file -- Lorenzo De Liso Fri, 15 Oct 2010 22:24:34 +0200 asterisk (1:1.6.2.9-2) unstable; urgency=high [ Tzafrir Cohen ] * Bump Standards version to 3.9.0 (no change needed). * rtcp_cli_fix: Backport a silly CLI parsing issue. (Closes: #589736) * Patch typos: fix a few typos in the source. * Patch man_hyphen: fix hyphen/minus issues in man pages. * Remove useless binaries aelparse, conf2ael and muted. [ Faidon Liambotis ] * Change the way that we read include files, to accommodate for changes in GCC 4.4. Taken from upstream's SVN, thanks to Peter Allgeyer for the patch and Stefan Bauer for preparing an upload. (Closes: #594190) * Set urgency high for a squeeze-targetted RC bug-fixing upload. -- Faidon Liambotis Tue, 07 Sep 2010 21:52:54 +0300 asterisk (1:1.6.2.9-1) unstable; urgency=low * New upstream release (Closes: #585156). - Patch dahdi_fxs_false_ringing removed: merged upstream. - Patch fxs_ports_1626 removed: merged upstream. * Fix dependencies so we start after named and such (Closes: #433779). * Do use libresample (app_jack, codec_resample). -- Tzafrir Cohen Tue, 29 Jun 2010 23:53:28 +0300 asterisk (1:1.6.2.7-1ubuntu1) maverick; urgency=low * Merge from debian unstable (LP: #597792), remaining changes: - debian/control: + Build-depend on hardening-wrapper + Change Maintainer + Removed Uploaders field. + Removed Debian Vcs-Svn entry and replaced with ubuntu-voip Vcs-Bzr, to reflect divergence in packages. - debian/rules: Make use of hardening-wrapper - debian/asterisk.init: chown /dev/dahdi - debian/backports/hardy: add file - debian/backports/asterisk.init.hardy: add file -- Lorenzo De Liso Wed, 23 Jun 2010 19:37:50 +0200 asterisk (1:1.6.2.7-1) unstable; urgency=low * New upstream release * Add Build-Depends: libsqlite0-dev | libsqlite-dev * Included upstream: followme_prompts sqlite3_func_rename -- Mark Purcell Wed, 05 May 2010 23:36:52 +1000 asterisk (1:1.6.2.6-2) unstable; urgency=low * Also depend on openr2. * Patch fxs_ports_1626: fixes regression when building with openr2 support. -- Tzafrir Cohen Wed, 21 Apr 2010 20:12:34 +0300 asterisk (1:1.6.2.6-1) unstable; urgency=low * New upstream release. - Fixes AST-2010-003 - CVE-2010-1224 (Closes: #576560). * Patch h323-fix-makefile dropped: merged upstream. * Patch safe_asterisk-config: Mostly merged upstream. * Patch moh_datadir: Make the datadir the default base for moh files if a relative path is used. * Patch dahdi-fxsks-hookstate: a newer version. * sounds/en/ is now an alternative. English sounds installed to en_US_f_Allison . * Removed empty es/ and fr/ directories under sounds/ * Patch settings_show_dirs: display the user values of more configurable items. * Patch dahdi_fxs_false_ringing: Fix having Astribank FXS-s keep ringing if answered too soon. * Patch followme_prompts: set proper vars when reading followme.conf * Patch sqlite3_func_rename: Avoid issues with the name sqlite3_log . * Patch h323-extra-target: Allow manuallly generate channels/h323/Makefile.ast * And use it to generate the file before building, as otherwise some libs are missing from the link command, resulting in chan_h323.so load fail. -- Tzafrir Cohen Sat, 10 Apr 2010 21:18:39 +0300 asterisk (1:1.6.2.5-0ubuntu1) lucid; urgency=low * New upstream bugfix release (1.6.2.5) * Security Fixes: - AST-2010-003: Invalid parsing of ACL rules can compromise security - AST-2010-002: Dialplan injection vulnerability * Remaining Ubuntu-specific changes: - debian/control: Build-depend on hardening-wrapper - debian/rules: Make use of hardening-wrapper - debian/control: Change Maintainer - debian/control: Removed Uploaders field. - debian/control: Removed Debian Vcs-Svn entry and replaced with ubuntu-voip Vcs-Bzr, to reflect divergence in packages. - debian/asterisk.init : chown /dev/dahdi - debian/backports/hardy : add file - debian/backports/asterisk.init.hardy : add file -- Jean-Michel Dault Tue, 13 Apr 2010 16:27:27 -0400 asterisk (1:1.6.2.2-1ubuntu2) lucid; urgency=low * debian/{control,rules}: re-enable hardened options to gain PIE build (Debian bug 542741, LP: #527538) -- Steve Beattie Tue, 02 Mar 2010 10:00:03 -0800 asterisk (1:1.6.2.2-1ubuntu1) lucid; urgency=high * Merge from Debian: security update * Changes: - debian/control: Change Maintainer - debian/control: Removed Uploaders field. - debian/control: Removed Debian Vcs-Svn entry and replaced with ubuntu-voip Vcs-Bzr, to reflect divergence in packages. - debian/asterisk.init : chown /dev/dahdi - debian/backports/hardy : add file - debian/backports/asterisk.init.hardy : add file -- Jean-Michel Dault Tue, 16 Feb 2010 14:08:54 -0500 asterisk (1:1.6.2.2-1) unstable; urgency=medium [ Faidon Liambotis ] * Relax Debian revision parsing regexp in debian/rules to help with parsing derivatives (e.g. Ubuntu) and backports.org revisions. * Urgency medium because of a security fix upload. * Bump Standards-Version to 3.8.4, no changes needed. * Add ${misc:Depends} on all packages; no functional change, just makes lintian happier. * Use $remote_fs instead of $local_fs in init script's Required-{Start,Stop} since we use /usr. Thanks lintian! [ Tzafrir Cohen ] * New upstream release. Fixes CVE-2010-0441 (AST-2010-001). * Patch sound_files: configure asterisk not to download the new MoH files. * Move sound files tarball to a safe place, as the patch we used to protect them is aparantly not in effect at clean time. -- Faidon Liambotis Sun, 07 Feb 2010 15:13:47 +0200 asterisk (1:1.6.2.0-1) unstable; urgency=low * New upstream release. * Use DEP3 to tag all of our patches and their merge status. -- Faidon Liambotis Mon, 21 Dec 2009 06:19:38 +0200 asterisk (1:1.6.2.0~rc7-1) unstable; urgency=high * New upstream release candidate. - Fixes RTP comfort noise issues: CVE-2009-4055 (Closes: #559103). -- Tzafrir Cohen Wed, 02 Dec 2009 20:47:02 +0200 asterisk (1:1.6.2.0~rc6-1) unstable; urgency=low * New upstream release candidate. - Drop paches/AST-2009-007, included upstream. - Drop patches/configure-armel, merged upstream. - Fixes security-related information leak (SIP responses expose valid usernames), fixes AST-2009-008. (Closes: #554487) * Switch to the "3.0 (quilt)" package source format. * Create the /usr/share/asterisk/agi-bin directory. (Closes: #463983) * Stop shipping the refcounter tool since the required debugging compile-time switch is not enabled in our builds. -- Faidon Liambotis Mon, 16 Nov 2009 06:10:10 +0200 asterisk (1:1.6.2.0~rc3-2) unstable; urgency=high [ Faidon Liambotis ] * Really ship MoH sounds, as mentioned in the rc1 upload. * Move dahdi to Should-Start instead of Required-Start in the init script. (Closes: #552604) * Security fix: "ACL check not present for verifying SIP INVITEs", AST-2009-007. (Closes: #552756) * Urgency high because of security fix upload. [ Tzafrir Cohen ] * Add a sample startup init script. Not installed. * Add mysql and postgresql to Should-Start/Stop: Asterisk may use them in real-time mode. -- Faidon Liambotis Thu, 29 Oct 2009 21:38:55 +0200 asterisk (1:1.6.2.0~rc3-1) unstable; urgency=low * New upstream RC. - Session timer is not activated if Supported header field in INVITE has both "timer" and other option(s) (Closes: #552336) - Adapt patches/hack-multiple-app-voicemail. * Switch from libreadline5-dev to libreadline-dev build dependency. * Switch from libc-client2007b-dev to libc-client2007e-dev build dependency. * No need for repacking anymore; upstream removed the last piece of non-free material (IAXy's firmware) from the tarball upon our request. Thanks Digium! * Remove patches/debian-banner, no need to warn users to use our BTS anymore as we don't diverge that much nowadays. * Multiple fixes to init script: call 'core stop now' instead of 'stop now', kill the canary on stop, don't print the banner on start. * Temporarily remove OSP support, Asterisk needs a new version (3.5) that isn't yet in Debian. * Add sox to Recommends, used by res_monitor. * Remove ekiga, ohphone, twinkle, kphone from Suggests. * Cleanup the documentation provided in the asterisk-doc package. (Closes: #499215) * Cleanup cruft present in diff.gz after a double build. * Stop shipping old static-http code in examples. Among other things, it includes a vulnerable version of the prototype Javascript library. * Remove obsolete debian/backports/{etch,edgy,feisty}. -- Faidon Liambotis Mon, 26 Oct 2009 02:03:45 +0200 asterisk (1:1.6.2.0~dfsg~rc1-1) unstable; urgency=low [ Faidon Liambotis ] * New upstream release. - Fixes CVE-2009-2726 aka AST-2009-005 (Closes: #541441). - Ship CC BY-SA 3.0 licensed music-on-hold sounds, replacing the old non-free FreePlay Music that were never distributed by Debian. - Removed patches/makefile_appdocs_dtd (merged upstream) and patches/disable_moh (obsoleted, see above). * Fix FTBFS on armel. (Closes: #532971) * Bump Standards-Version to 3.8.3, no changes needed. * Provides: asterisk-1.6.2, instead of 1.6.1; there are no ABI gurantees between 1.6.x releases. * Remove references of Section: comm in individual binary packages as it is inherited from the source package. [ Tzafrir Cohen ] * Patch hardware_dtmf_mute_fix removed: Applied upstream. * No need for a separate app_directory_odbc (will use app_voicemail_odbc). * Fix name of voicemail 'openssl' dep. (Thomas Renard) (Closes: #539150) * Patch AST-2009-006: breaks IAX2 compatibility, note it in NEWS.Debian. (Closes: #539473) -- Faidon Liambotis Sun, 13 Sep 2009 02:22:17 +0300 asterisk (1:1.6.2.0~dfsg~beta3-1) unstable; urgency=low [ Faidon Liambotis ] * New upstream release. - Drop patches astvarrundir, pubkey_jnctn; merged upstream (finally!). - Adapt patch safe_asterisk-nobg. * Switch to downloads.asterisk.org instead of downloads.digium.com. * Add depends on libxml2-dev for the new XML documentation. * Remove Conflicts/Replaces with asterisk-classic, asterisk-bristuff, asterisk-chan-capi (<< 1.1.1-1~), since those are pre-lenny. * Revert upstream's r190830 that ported app_osplookup to OSP Toolkit 3.5; the API is not backwards compatible and Debian still has 3.4.2. * Accommodate for the rename of libcap2-dev to libcap-dev (Closes: #532971). * Add dependency to libspandsp to build the fax applications. * Update Standards-Version to 3.8.2, no changes needed. * Remove init script's "zaptel-fix" action; there's no zaptel anymore and was also lintian-buggy in its current form. * Don't include /var/run/asterisk in the package, it is created at boot-time by the init script (thanks lintian). * Remove asterisk-progdocs: it is of very limited use but a) is enormous in size and b) takes too long to build. * Re-enable and port to 1.6 the h323 segfault patch, apparently it's still needed. * Fix asterisk's Makefiles so that the openh323/libpt dependencies are added to chan_h323.so instead of the main asterisk binary. * Fix astgenkey to respect system's umask. Thanks Jonas Smedegaard. (Closes: #531730) * Create /var/log/asterisk/* directories if non-existent, for /var/log on tmpfs scenarios. Thanks martin f krafft! (Closes: #524015) * Use the lsb-base standard way of gathering and reporting status in the init script. Thanks Dustin Kirkland and Ubuntu! (Closes: #506453) * Fix debian/rules so that configure isn't called twice during a build. * Install Zaptel-to-DAHDI.txt, explains the migration procedure from Zaptel to DAHDI and is therefore useful when upgrading from lenny. [ Tzafrir Cohen ] * New upstream release. - Fixes that bashism in safe_asterisk (Closes: #530047) (not dashism). - Dropped patch astcanary_startup: merged upstream. * Patch makefile_appdocs_dtd: fix location of DTD installation. * Register the HTML docs with doc-base as well. -- Faidon Liambotis Tue, 28 Jul 2009 03:42:54 +0300 asterisk (1:1.6.1.0~dfsg-1) unstable; urgency=low * New upstream release (Closes: #522528). [ Tzafrir Cohen ] * Depend explicitly on dahdi. * Patch apptest_sleep dropped: merged upstream. * Patch libtonezone_libm dropped: merged upstream. * Patch h323-make-fix dropped: merged upstream. * Use upstream's asterisk.conf rather than our bogus one. * Also add the version-specific release summary. * Patch dahdi_ptmp_nt: (not really) chan_dahdi PtMP NT support (Kristijan Vrban). * Patch dahdi_pri_debug_spannums: add span number in PRI trace. * Patch astcanary_startup: Avoid a false death of the canary (Closes: #528497). * Patch hardware_dtmf_mute_fix: Fix muting of DAHDI channels with hardware DTMF detection. -- Mark Purcell Wed, 20 May 2009 08:00:23 +1000 asterisk (1:1.6.1.0~dfsg~rc3-1) experimental; urgency=low [ Tzafrir Cohen ] * Experimental 1.6.x branch. * Remove bristuff for now. * Also drop zap-fix-deadlock and zap-fix-cause34 that are in bristuff code. * And likewise the example agi/xagi-test.c . * Drop patch silence-buildsum-warning - a legitimate change for 1.6.x . * Refresh patch debian-banner. * Slightly rework patch hack-multiple-app-voicemail * Drop patch h323 fixes as they fails and I don't fully understand them. * drop patch func_devstate: was backport from 1.6. * drop patch feature-bridge: was backport from 1.6. * Drop vpb-handle-nocards that is not needed anymore. * Patch disable_moh: Disable MOH file through the XML spec. * Don't do ant makeopts manipulation in the rules, as makeopts gets regenerated when running 'make install', rendering build-*-stamp useless. * Patch libtonezone_libm: libtonezone requires -lm . * Separate API documentation to the progdoc package. * Move configuration files to the doc package, as they are reference. * Include the new asterisk.pdf . * Depend on libgmime: allows uploads in the built-in httpd. * Depend on libjack. Though app_jack also depends on libresample. * Depend on liblua: For pbx_lua (dialplan in lua). * Depend on libss7 and newer libpri (1.4.7) for latest chan_dahdi abilities. * Depend on libtonezone from dahdi (ver. 2.0). * Includes fix for AST-2009-001 (Closes: #513413). * Remove hashtest and hashtest2: debugging utilities. * Patch zap-fix-timing-source removed: Problem fixed. * Build-Depends on libopenais-dev (for res_ais.so) * Build-Depends on libosptk3-dev (for app_osplookup.so) * Patch dahdi-fxsks-hookstate: Fix FXO dialout issue. * Patch h323-make-fix: No, we should not need to run 'make' twice. [ Victor Seva ] * Drop patch misdn_FOP. Applied upstream (r112521 branches/1.6.0/). [ Mark Purcell ] * Update debian/watch * asterisk-dbg -> Section: debug -- Mark Purcell Sun, 29 Mar 2009 22:21:47 +1100 asterisk (1:1.4.21.2~dfsg-3) UNRELEASED; urgency=low * Bumped Standards-Version to 3.8.0. -- Patrick Matthäi Wed, 8 Oct 2008 21:39:31 +0200 asterisk (1:1.4.21.2~dfsg-2) unstable; urgency=low [ Victor Seva ] * support DEB_BUILD_OPTION noopt used to produce non-optimized builds. (Closes: #492941). * Depend on libcap2-dev instead of libcap-dev because libcap1 is no longer maintained upstream. Thanks to Torsten Werner . (Closes: #492620). * Backport script fixes: - Depend on debhelper >=5 on backport etch script. - replace libcap2-dev by libcap-dev. - remove lib-client2007b-dev. (Closes: #494405) [ Tzafrir Cohen ] * Patch chan_zap so that asterisk starts even without a Zaptel timing source. (Closes: #491310) [ Lionel Elie Mamane ] * /etc/default/asterisk: Bring comments on AST_DUMPCORE_DIR in sync with reality of implementation in /etc/init.d/asterisk. Change suggested CORE_PATTERN to more secure ones. * /etc/init.d/asterisk: Use the value of AST_DUMPCORE_DIR if it is a directory, not if the value if DUMPCORE_DIR is a directory. [ Faidon Liambotis ] * Backport a patch from Xorcom's tree fixing a deadlock situation caused by the bristuff patch. (Closes: #493055) * Backport a patch from Xorcom's tree fixing an occasional "Cause 34" error on BRIs. * Don't write /root/.asterisk_history when stopping asterisk with the init script. (Closes: #500294) * Eliminate warnings when calling some actions of the init script by replacing obsolete asterisk commands with their newer counterpart. -- Faidon Liambotis Sat, 04 Oct 2008 01:21:40 +0300 asterisk (1:1.4.21.2~dfsg-1) unstable; urgency=high [ Victor Seva ] * asterisk.postinst should always check group memberships (Closes: #486097) patch by Tim Retout * changed libc-client2007-dev to libc-client2007b-dev on Build-Depends (fixes FTBFS). [ Tzafrir Cohen ] * Depend on debhelper >= 6.0.7 due to dh_lintian (Closes: #492202). * New upstream bugfix release. Fixes CVE-2008-3263 and CVE-2008-3264. [ Faidon Liambotis ] * Do a quilt refresh on all patches. * Remove the dh_makeshlibs call as it is unneeded and generates a lintian warning. -- Faidon Liambotis Thu, 24 Jul 2008 19:51:20 +0300 asterisk (1:1.4.21.1~dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * New upstream bugfix release. * Fix get-orig-source target to remove temporary files left in that tarball. * The asterisk.h symlink moved to asterisk-dev where it should be. [ Mark Purcell ] * asterisk-dev Replaces: asterisk (<< 1:1.4.21.1~dfsg-1) * lintian cleanup: debian-copyright-line-too-long * Call dh_lintian lintian-cleanup: package-contains-empty-directory -- Mark Purcell Wed, 16 Jul 2008 21:14:10 +1000 asterisk (1:1.4.21~dfsg-1) unstable; urgency=low * New upstream release. * bison no longer needed to build Asterisk (Since 1.4.0). * Patch armel_support applied upstream. * Patches bristuff/zapata-gsm and bristuff/zapata-bri+euroisdn adjusted to chan_zap changes (conf became a pointer in mkintf). -- Tzafrir Cohen Thu, 12 Jun 2008 21:30:40 +0300 asterisk (1:1.4.20~dfsg-1) unstable; urgency=low [ Victor Seva ] * Patch sample files pointing now to the correct doc files. (Closes: #475681) * Added support for armel, thanks to Riku Voipio. (Closes: #477389) * Added asterisk-config.dirs in order to create etc/asterisk/manager.d dir, and added a README.conf on it on rule install-indep. [ Tzafrir Cohen ] * Provide /usr/include/asterisk.h as well (through a symlink). * Remove {,} bashism from debian/rules (Closes: #478361). [ Faidon Liambotis ] * New upstream version. - Fix IAX performance issues introduced by security fix in 1.4.19.1 - Dropped patches samples, vpb-driver-4.2.18, vpb_no_cards, incorporated by upstream. * Update to bristuff-0.4.0-RC1: - Revert API changes to res_agi (xagi). - Revert API changes to ast_sendtext() (ast-send-message). - Merge several chan_zap changes (zapata-bri+euroisdn, zapata-gsm). - Remove unused zapata-device-state, feature-parking_con, find-feature, chan-capi, ast_channel_masquerade_locked, find-feature patches, obsoleted by upstream. - Remove uniqueid-01-use-pid-on-uniqueid-generation patch, dropped by upstream. - Rename app-zapras-fix-audiomode to isdn-fixes and include another fix that we dropped earlier by mistake (r5162). - Merge ast-send-message with ast-send-message-users, following upstream split. - Other minor and cosmetic fixes. - Comment-out the only use of ast-send-message (in GSM) to avoid an ABI change. We are not shipping GSM, hence this is not a feature regression. * Conflict with asterisk-chan-capi << 1.1.1-1 which we broke with an ABI change :( (Closes: #472379). * Drop doc-base entries for sip.conf and zapata.conf, there was no point in just listing those two configuration files. * Remove -1 revision dependency on libpri and libopenh323-dev. * Override some lintian warnings for asterisk (empty IAX firmware and static-http directories) and asterisk-sounds-main (empty MOH and es/fr sounds directories). -- Faidon Liambotis Sat, 07 Jun 2008 19:18:56 +0300 asterisk (1:1.4.19.1~dfsg-1) unstable; urgency=low [ Faidon Liambotis ] * New upstream release. - Dropped configure-libc-client, incorporated upstream. - Adapted bristuff patches uniqueid-10-channel-ops-uniqueid, uniqueid-30-app-chanspy, zapata-bri+euroisdn. - Fixes CVE-2008-1897 / AST-2008-006 (Closes: #477472). * Build with -O2 instead of the default -O6 (bug introduced in 1.4.18~dfsg-1). * Depend on libspeexdsp-dev because of the use of preprocessor features, which were split from libspeex >= 1.2. - FTBFS: codec_speex.c:99: error: expected specifier-qualifier-list before 'SpeexPreprocessState' (Closes: #474789) - Asterisk fails to install due to broken libspeex dependency (Closes: #477086) [ Lionel Elie Mamane ] * debian/rules: fix get-orig-source to actually work * Fix genastkey so that keys are not world-readable by default. [ Tzafrir Cohen ] * Watching downloads.digium.com directly again. * Patch apptest_sleep: A woraround for TestServer fail on SEND DTMF 8. -- Mark Purcell Wed, 23 Apr 2008 22:50:35 +1000 asterisk (1:1.4.18.1~dfsg-1) unstable; urgency=high * New upstream release. - Fixes a vulnerability in the RTP codec payload type handling (AST-2008-002, CVE-2008-1289). - Fixes a critical vulnerability that could be exploited to bypass SIP authentication (AST-2008-003, CVE-2008-1332). - Fixes a potential DoS vulnerability in the Manager interface (AST-2008-004, CVE-2008-1333). * Urgency high because of critical security fixes. -- Faidon Liambotis Wed, 19 Mar 2008 00:49:17 +0200 asterisk (1:1.4.18~dfsg-1) unstable; urgency=low [ Faidon Liambotis ] * Update debian/copyright (packaging copyright, formatting etc.) * Remove workaround for gcc ICE on hppa (#445336), since apparently that has been fixed. * Do not provide asterisk-classic/asterisk-bristuff, we don't want to satisfy those dependencies anymore. * Provide asterisk-1.4 virtual package, so that all reverse-dependencies that use 1.4's ABI can depend on that. * Switch asterisk-h323 to the new asterisk-1.4 dependency. * Remove libc-client-dev dependency since it is satisfied in etch by a version (2002) incompatible to the one that works. (Closes: #465524) * Backport upstream's patch for chan_vpb to avoid crashes when no VoiceTronix cards are present. (Closes: #466729) * Backport feature Bridge from 1.6, thanks to Jon Webster. (Closes: #458475) [ Tzafrir Cohen ] * New upstream release. * Break bristuff BRI/EuroISDN patch: - zapata_num_spans - already accepted by upstream. Independent of libpri bristuff patch. - zapata-bri+euroisdn - now does not depend on most bristuff interface changes. But lacks: - zapata_euroisdn_holded - Support for putting an ISDN phone on hold. Depends on some other bristuff patches, and adds another interface change. * patch use-libpri-bristuffed right next to zapata-bri+euroisdn, as zapata-bri+euroisdn depends on it to build. * patch tos-libcap remeved: merged by upstream. * Adjusted patch bristuff/ast-device-state-CID to Asterisk 1.4.18. -- Faidon Liambotis Thu, 06 Mar 2008 04:32:33 +0200 asterisk (1:1.4.17~dfsg-2) unstable; urgency=low * Allow building vs. libc-client2007 (Closes: #458877). -- Tzafrir Cohen Thu, 03 Jan 2008 15:14:23 +0200 asterisk (1:1.4.17~dfsg-1) unstable; urgency=low * New upstream release. Fixes ASA-2008-001. -- Faidon Liambotis Thu, 03 Jan 2008 00:27:16 +0200 asterisk (1:1.4.16.2~dfsg-2) unstable; urgency=low * asterisk.init: fix start so that it works again. (Closes: #458022) -- Tzafrir Cohen Fri, 28 Dec 2007 02:46:38 +0200 asterisk (1:1.4.16.2~dfsg-1) unstable; urgency=low * New upstream release. (Closes: #457063) (Fixes CVE-2007-6430) - Remove keep-1.4-abi, merged upstream. - Adapt hack-multiple-app-voicemail, use-libpri-bristuffed, tos-libcap. - Adapt bristuff patches app-dial-etc, chan-iax2-hangup-cause, app-dial-priority-202, zapata-bri+euroisdn. * Silence upstream's build sum warning but generate one on all modules so that we can enable it at a later point. * Make the init script's detection of a running daemon to be more precise. * Bump Standards-Version to 3.7.3, no changes needed. * Remove modem.conf on upgrades from 1.2 (i.e. etch). (Closes: #454332) * Ressurect long-forgotten logrotate script. -- Faidon Liambotis Fri, 21 Dec 2007 22:38:03 +0200 asterisk (1:1.4.15~dfsg-1) unstable; urgency=low * New upstream release (Closes: #452054) - Fix a potential corrupt of voicemail.conf on simultaneous PIN updates (Closes: #353227) [ Tzafrir Cohen ] * Add some sample/reference config files as documentation. * Provide asterisk-bristuff for upgrading from Etch. * Move libc-client to not be last, so debian/backports/xorcom.etch would still work. [ Faidon Liambotis ] * Really enable the libcap/ToS functionality; the previous patch didn't enable the functionality, even though the code and the libcap.so dependency were there. (Closes: #454342) * Fix a minor issue with init script's stop target when running with safe_asterisk. * Add chan_vpb, adding support for VoiceTronix OpenSwitch and OpenLine cards. (Closes: #396499) * Fix debian/watch by using a pkg-voip wrapper to avoid upstream's silly redirections. (Closes: #449706) * Use DEBVERSION as asterisk's version string. * Disable the MD5 build sum that breaks all out-of-tree plugins (duh!). * Create /usr/local/share/asterisk/sounds to put all site-specific non-modifiable sounds. * Add a note about bugs.debian.org to the banner. * Add noload for res_config_* since loading them results in errors and doesn't provide any functionality. * News entries were added but we never shipped the file; ship NEWS.Debian. * Add an entry to NEWS.Debian warning users about app_voicemail_*.so (Closes: #452596) * Provide options in /etc/default/asterisk for configuring safe_asterisk. (Closes: #381786) [ Tzafrir Cohen ] * Provide a custom sounds directory under /var/lib - user-modifieble at runtime and hence not under /usr. (Closes: #337209) -- Faidon Liambotis Thu, 06 Dec 2007 17:20:21 +0200 asterisk (1:1.4.13~dfsg-1) unstable; urgency=low * New upstream release. - Implemented Dynamic DUNDi peering support (Closes: #439331) - Removed merged patches: bashism-safeasterisk, ast_key_dir, h323-add-missing-ptrace-guard, CVE-2007-4521. - Adapted patches: make-clean-fixes, h323-no-deps-on-asterisk. - Adapted bristuff 0.4.0-test4 to apply to 1.4.12 (bristuff.notice, xagi, app-dial-c-callback, app-dial-priority-202) * When DFSG-ing the tarball, create a fake codecs/ilbc/Makefile so that make doesn't fail on clean. * Pass NOISY_BUILD to make so that the GCC arguments can be examined in build logs. * Remove versioned dependency on dpkg-dev since that particular version is present since etch (sarge is not supported as a backport target anymore). * Backport a patch from trunk so that Asterisk can set the IP ToS bits when it is run as a simple user (as we do). * Re-enable IMAP support and enable ODBC support; this time they are provided as app_voicemail_imap.so and _odbc.so so that they don't break existing setups. * Build with -O1 on hppa to workaround gcc-4.2 ICE (#445336). * Zaptel package added support for Voicetronix OpenPCI cards, mention it on asterisk's description. -- Faidon Liambotis Wed, 10 Oct 2007 22:18:16 +0300 asterisk (1:1.4.11~dfsg-4) unstable; urgency=low * Remove imap support to get back original files voicemail functionality. * Fix comment in patches/bristuff/zapata-bri+euroisdn (by nickzxcv). -- Tzafrir Cohen Sun, 30 Sep 2007 15:12:09 +0200 asterisk (1:1.4.11~dfsg-3) unstable; urgency=low * Depend on libsnmp-dev instead of libsnmp10-dev. Fixes FTBFS (Closes: #444322) -- Faidon Liambotis Fri, 28 Sep 2007 05:58:29 +0300 asterisk (1:1.4.11~dfsg-2) unstable; urgency=low [ Faidon Liambotis ] * Depend on libpri-dev >= 1.4.1-1 for the bristuffed header. (Closes: #439197) * Added a 1.4 backport of the DEVSTATE() dialplan function which allows retrieving any device state in the dialplan, as well as creating custom device states that are controllable from the dialplan. * Replace Build-Depends libc-client-dev (which wasn't used) with libc-client2006j2-dev and enable Voicemail IMAP storage (configure-libc-client). * Build depend on libcurl4-openssl-dev instead of libcurl4-dev which is a virtual package. This also means using the more complete OpenSSL libcurl backend instead of the GnuTLS one. * Add a versioned >= 1.4 dependency of asterisk in asterisk-h323. * Don't use MAKEFLAGS as a variable in debian/rules since it has a special meaning for make. Reported by Simon Richter. * Add Homepage field, as supported by dpkg 1.14.6. * Fix init.d stop when using safe_asterisk. (Closes: #376514) * Drop asterisk-web-vmail package and place the script in /usr/share/doc/asterisk. * Move static-http and sample.call to asterisk's examples. [ Kilian Krause ] * Update backports scripts for libcurl4*-dev * Fix IMAP crash with upstream source snipplet. (Closes: #440187) [ Tzafrir Cohen ] * Support increasing open files limit from init.d script. -- Faidon Liambotis Wed, 26 Sep 2007 13:32:01 +0300 asterisk (1:1.4.11~dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * Remove libgtk2.0-dev from Build-Depends since the GTK+ console was not getting built anyway. [ Kilian Krause ] * Add dpkg-dev (>= 1.13.19) to Build-Depends for binary:Version and source:Version. [ Faidon Liambotis ] * New upstream release. (Closes: #439062) - AST-2007-020 Resource Exhaustion vulnerability in SIP channel driver * Switch to quilt as a patch management system instead of dpatch. * Add bristuff 0.4.0-test4 - Split into smaller, individual patches (bristuff/). - Mention HFC-S/HFC-4S support in the Description. - Use libpri-bristuffed.so.1 and its respective header (use-libpri-bristuffed). - Ship xagi-test.c as an example. - Add a news item to NEWS.Debian stating bristuff's inclusion. * Major overhaul of the postinst scripts, completely replacing asterisk_fix. - Create Asterisk's directories on asterisk.dirs to track them using dpkg. - Add asterisk.postinst which calls adduser, chown, chmod. Improve error handling. - Don't do unnecessary stuff on asterisk-config postinst. (Closes: #431506) - chmod /etc/asterisk on build-time to allow the user to modify the permissions; this required a lintian override. - Honor dpkg-statoverride on all the chowned/chmoded directories and configuration files under /etc/asterisk. - Handle asterisk-config -> asterisk installation order properly (Closes: #408708) - Don't add asterisk user to audio and dialout groups if existed before. This allows the administrator to remove the membership. - Don't depend on adduser from asterisk-config. * Remove Suggests to gnomemeeting (it's a dummy package nowdays), asterisk-rate-engine and add one for twinkle. * Remove Conflicts for an old version of asterisk-oh323 which was only present until sarge. * Remove versioned dependencies on ancient (pre-sarge) versions of sed and adduser. * Patch channels/h323/ast_h323.cxx to add some missing PTRACING #ifdef (h323-add-missing-ptrace-guard). * h323-workaround-openh323-segfault patch: workaround a libopenh323 bug (#438815) which causes Asterisk to segfault on startup. (Closes: #435146) * Remove -XCVS from dh_installexamples arguments. Upstream doesn't use CVS anymore. * Add a README.Debian for asterisk-h323 that explains the differences between the different H.323 channel drivers, taken from the asterisk-oh323 package. * Clarify asterisk-h323's description and mention the other channel drivers. * Suggest asterisk-h323 from asterisk. -- Faidon Liambotis Wed, 22 Aug 2007 20:55:12 +0300 asterisk (1:1.4.10~dfsg-1) unstable; urgency=low * New upstream release - Fwd: [asterisk-announce] ASA-2007-019: Remote crash vulnerability in Skinny channel driver (Closes: #436808) [ Mark Purcell ] * debhelper(1) states Build-Depends: debhelper (>= 5) - aids backports * Update debian/backports for etch, edgy, dapper and feisty - http://status.buildserver.net/packages/status.php?package=asterisk&subdist=pkg-voip [ Faidon Liambotis ] * Refer to /usr/share/common-licenses/GPL-2 instead of GPL. The code is -for now- GPLv2-only and in light of GPLv3, pointing to GPL is misleading. * Add ast_key_dir patch to move keys from /var/lib/asterisk/keys to /usr/share/asterisk/keys where they should be. * Actually ship keys, including Junction Networks' by fixing pubkey_jnctn patch. * Handle space/newline-delimited directories on /etc/asterisk when doing chmod on postinst. * Correct descriptions of packages in debian/control, adapting them to the present and correcting some spelling mistakes. (Closes: #428671) * Add a noload directive for cdr_sqlite.so in the default modules.conf since it writes unconditionally to the database file without being rotated, resulting in unexpected waste of disk space. (Closes: #301883) * Delete duplicated creation of /var/run/asterisk in the init script. -- Mark Purcell Thu, 09 Aug 2007 22:47:00 +0100 asterisk (1:1.4.9~dfsg-1) unstable; urgency=high [ Tzafrir Cohen ] * New upstream release. - ASA-2007-018 - DoS Resource Exhaustion vulnerability in IAX2 [ Faidon Liambotis ] * Add myself to Uploaders. * Fix "debian/rules clean" to cleanup correctly the tree by calling "make distclean" instead of "make clean". Also, fix some stuff in the upstream Makefiles (debian/patches/make-clean-fixes). Fixes a lintian warning. * Add XS-Vcs-Svn and XS-Vcs-Browser to debian/control. * Move examples from all packages (debian/examples) to asterisk-config only. * Add eagi-test.c, eagi-sphinx-test.c, fastagi-test and static-http to examples. * Remove Conflicts/Replaces/Depends to pre-sarge versions, they're useless even for backports. [ Mark Purcell ] * Include asterisk.init changes from Martin - Asterisk does not create /var/run/asterisk directory if not existent (Closes: #413541) * Backout asterisk-h323 Suggests:/ Recommends: asterisk-oh323. The former works, the latter does not with asterisk-1.4.x * Upstream fixes from 1.4.x branch: - Multiple security flaws in Asterisk (Closes: #421467) - Debug switch wrong in /etc/default/asterisk (Closes: #413544) - Upgrading destroys astdb (Closes: #354132) - Upgrading destroys astdb (Closes: #354132) - asterisk bindaddr in sip and iax config is to fixed ip not Interfaces (Closes: #316443) - Incorrect callerid syntax in sip.conf causes incorrect error (Closes: #323275) - dropouts (Closes: #335079) - Does not include cdr_sqlite userfield support by default (Closes: #344097) - Asterisk crashes on sparc when playing 'demo-moreinfo' (Closes: #344484) - fresh install - crash after dialing IAX test (Closes: #350001) - asterisk_fix script fails to set variables for adduser, user creation fails (Closes: #383075) - Debug switch wrong in /etc/default/asterisk (Closes: #413544) - When using L option on Dial, instead of warning asterisk disconnects the call (Closes: #419894) - Patch for fastagi handling (Closes: #368948) - bristuff patch breaks cause codes in Hangup() (Closes: #320350) * add debian/patches/basim-safeasterisk.dpatch - contrib/scripts/safe_asterisk should explicitly link to a cli (Closes: #413543) * Adding a restart when convenient in Asterisk (Closes: #413816) * asterisk-h323: libpt.so.1.10.2 => not found (Closes: #434076) -- Mark Purcell Thu, 26 Jul 2007 16:52:29 +0100 asterisk (1:1.4.8~dfsg-2) unstable; urgency=low * Add patch from Faidon debian/patches/dbug433884.dpatch: - Should not depend on libopenH323, libpt, libSDL, libssl, libldap, ... (Closes: #433884) - Fails to restart after upgrade due to dep on libpt.so.1.10.2 (Closes: #434066) -- Mark Purcell Sat, 21 Jul 2007 11:41:01 +0100 asterisk (1:1.4.8~dfsg-1) unstable; urgency=high * New upstream release - ASA-2007-017: Remote crash vulnerability in STUN implementation (Closes: #433681) * Urgency high for remote crash vulnerability * Updated standard version to 3.7.2 . -- Mark Purcell Wed, 18 Jul 2007 20:51:46 +0100 asterisk (1:1.4.6~dfsg-1) unstable; urgency=low [ Mark Purcell ] * CVE-2007-2488 was addressed 1:1.4.5~dfsg-1 * CVE-2007-1595 was addressed 1:1.4.0~dfsg-1 [ Tzafrir Cohen ] * New upstream release. * Added asterisk-dbg for debugging symbols. * Updated priorities of some packages. * Updated list of supported hardware in description. -- Mark Purcell Wed, 04 Jul 2007 18:31:00 +0100 asterisk (1:1.4.5~dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * New upstream release. [ Mark Purcell ] * Debconf7 Release :-) * Build-Depends: libpq-dev - obsolete build dependency postgresql-dev (Closes: #389376) -- Mark Purcell Mon, 18 Jun 2007 10:18:13 +0100 asterisk (1:1.4.4~dfsg-3) unstable; urgency=low * Build-Depends: libcurl4-dev | libcurl-dev - uninstallable due to dependancy on libcurl3 (Closes: #426393) -- Mark Purcell Sat, 02 Jun 2007 10:52:05 +0100 asterisk (1:1.4.4~dfsg-2) unstable; urgency=low * Missing debian/changelog entries * Upstream calls make twice to build h323, copy in debian/rules - Asterisks chan_h323 doesn't work because of an undefined symbol (Closes: #421552) * Cleanup debian/patches * chmod +x asterisk-fix - Setting up asterisk (1.4.3~dfsg-1) -> id: asterisk: No such user (Closes: #422237) -- Mark Purcell Thu, 17 May 2007 07:35:30 +0100 asterisk (1:1.4.4~dfsg-1) unstable; urgency=low * New Upstream Release - Fix a crash in chan_zap - Fix some cases where IAX2 calls would get dropped - Merge a re-write of channel group counting support that fixes a lot of issues - Fix some DTMF issues related to the use of chan_agent - Fix a crash that occurs when using dialplan functions to set global variables -- Mark Purcell Wed, 25 Apr 2007 18:11:44 +1000 asterisk (1:1.4.3~dfsg-1) unstable; urgency=high * Urgency high as this fixes a number of Asterisk Security Advisories (ASA) * New upstream release - [asteriskteam@digium.com: [asterisk-announce] ASA-2007-011: Multiple problems in SIP channel parser handling response codes] (Closes: #420864) - [asteriskteam@digium.com: [asterisk-announce] ASA-2007-012: Remote Crash Vulnerability in Manager Interface] (Closes: #420866) - [asteriskteam@digium.com: [asterisk-announce] ASA-2007-010: Two stack buffer overflows in SIP channel's T.38 SDP parsing code] (Closes: #420868) - CVE-2007-1594: Asterisk segfaults upon receipt of a certain SIP packet (SIP Response code 0) (Closes: #419820) * Update debian/NEWS to broadcast the demise of bristuff * Asterisk-classic, asterisk-bristuff are depreciated - asterisk has circular Depends on asterisk-bristuff|asterisk-classic (Closes: #384674) * Ship UPGRADE.txt and refer to it in debian/NEWS - UPGRADE.txt cannot be found in any package (Closes: #419164) -- Mark Purcell Wed, 25 Apr 2007 16:47:31 +1000 asterisk (1:1.4.2~dfsg-5) unstable; urgency=low * Bump Build-Depends: libsnmp10-dev | libsnmp-dev * Only ship default/asterisk in asterisk package - Asterisk-config and asterisk 1:1.4.2~dfsg-4 both contain /etc/default/asterisk (Closes: #418656) * Lintian fixes debian-rules-sets-DH_COMPAT -- Mark Purcell Sat, 14 Apr 2007 16:44:18 +0100 asterisk (1:1.4.2~dfsg-4) experimental; urgency=low [ Tzafrir Cohen ] * The dummy fetch was not executable when generated from tar+diff. [ Mark Purcell ] * Create debian/rules binary-arch & binary-indep targets * Move debian/rules magic to package.install files -- Mark Purcell Thu, 29 Mar 2007 00:31:41 +0100 asterisk (1:1.4.2~dfsg-3) experimental; urgency=low * Fix syntax of for dummy fetch (Closes: #416143). * LSB init section in init.d script. * Merge other init.d changes from trunk. -- Tzafrir Cohen Sun, 25 Mar 2007 16:19:37 +0200 asterisk (1:1.4.2~dfsg-2) experimental; urgency=low [ Tzafrir Cohen ] * Fix default varrundir using make vars (Closes: #415799). * Don't run autoconf if you don't need (Closes: #415865). * Require zaptel >= 1.4.1, for ZT_EVENT_REMOVED . [ Mark Purcell ] * Include chan_h323.so in debian/asterisk-h323.install * Please package Asterisk-1.4.0 (Closes: #405723) * Add Build-Depends: libgtk2.0-dev, libc-client-dev * configure --with-pwlib=/usr/share/pwlib/include/ \ --with-h323=/usr/share/openh323/ * debian/asterisk.default - fix -D/-d typo in PARAMS (Closes LP#68169) * debian/asterisk.init: - create /var/run/ directory if necessary and set proper permissions * Move dh_installinit to architecture dependant * Move ASTVARRUNDIR to /var/run/asterisk/ - PID & control files go in wrong place (Closes: #415799) -- Mark Purcell Sat, 24 Mar 2007 18:32:45 +0000 asterisk (1:1.4.2~dfsg-1) experimental; urgency=low * New upstream release. - SIP INVITE DoS, supposedly fixed in 1.4.2 and 1.2.17, which is released today 19/03/2007 (Closes: #415466) * asterisk Depends: ${shlibs:Depends} -- Mark Purcell Tue, 20 Mar 2007 19:07:18 +0000 asterisk (1:1.4.1~dfsg-1) experimental; urgency=low [ Tzafrir Cohen ] * New upstream release. - Please package Asterisk-1.4.0 (Closes: #405723) * A package that builds. * Removed asterisk-sounds.install: does not belong here. * Removed makefile_noiaxy.dpatch: applied by upstream. * Config examples in a separate examples subdirectory. * Generate explicitly some missing subdirectories. * Man pages are included in upstream now. * set ASTDATADIR=/usr/share/asterisk . * A bunch of other fils moved for 1.4 . * Use system gsm (only requires an explicit --with-gsm) * Allow chrooted building with no wget. * h323_no_exit.dpatch: Don't requires two rounds of building. [ Mark Purcell ] * configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man -- infodir=\$${prefix}/share/info -- Mark Purcell Mon, 19 Mar 2007 06:24:43 +0000 asterisk (1:1.4.0~dfsg-1) UNRELEASED; urgency=low * New upstream release (1.4) * Sandbox to start playing with 1.4, it uses autotools :-), it also uses ASTDATADIR :-) :-) * need to understand this menuselect and how to encorporate into debian. * need to discuss with upstream iLBC conflict with GPL * Ugly hack in version number. * get-orig-source now works, though. * No more asterisk-classic and asterisk-bristuff * FreePlay Music files location changed * Disabling h323 build for now, until I figure what's wrong. * Extra Build-Deps: libiksemel-dev, libradiusclient-ng2-dev, freetds-dev, libvorbis-dev, libsnmp9-dev * Simply use configure. No workarounds. * Edit menuselect.makeopts to avoid downloading MOH files. * makefile_noiaxy.dpatch: don't try to copy the non-existing iaxy.bin , * zapbri.dpatch: support zapbri devices * chanzap_chanremoved.dpatch: handle ZT_EVENT_REMOVED event from zaptel -- Mark Purcell Mon, 25 Sep 2006 08:46:16 +0100 asterisk (1:1.2.16~dfsg-1) unstable; urgency=high [ Tzafrir Cohen ] * New upstream release. Also fixes remote SIP security hole. * Updated bristuff patch. * Fix umask of Asterisk for the voicemail. -- Tzafrir Cohen Sun, 4 Mar 2007 00:35:53 +0200 asterisk (1:1.2.15~dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * New upstream release. * ukcid.dpatch: adapted to chan_conf. * bristuff.dpatch: adapted to chan_conf. * daemon_color.dpatch: make rastrisk colourful even without safe_asterisk. * No need to edit a config file to start Asterisk. * Use asterisk.conf based on README.asterisk.conf: - Set default user to asterisk. - Make the control socket writabe by the group asterisk. * don't remove stereorize and streamplayer. * A man page for stereorize. * Create /etc/asterisk/manager.d (Closes: #410715). * Check that Asterisk is alive before sending a command (Closes: #389448). * Use MAKEBUILDOPTS instead of MAKEFLAGS, which is a reserved gmake name. * Removing build depepndency on obsolete and unused libzap-dev. * New transcoding interfaces from zaptel.h of zaptel 1.2.13 or 1.4 seem to be required for Asterisk 1.2.15 . -- Mark Purcell Sat, 3 Mar 2007 17:14:25 +0000 asterisk (1:1.2.14~dfsg-5) UNRELEASED; urgency=low [ Tzafrir Cohen ] * Bristuff 0.3.0-PRE-1x -- Tzafrir Cohen Mon, 22 Jan 2007 23:30:34 +0200 asterisk (1:1.2.14~dfsg-4) unstable; urgency=high * Add missing "fi" to asterisk_fix. (Closes: #406961) -- Kilian Krause Mon, 15 Jan 2007 12:05:18 +0100 asterisk (1:1.2.14~dfsg-3) unstable; urgency=low * Write a more robust version of the FHS-update for /usr/share/asterisk/sounds/priv-callerintros. * Update 30_ast-data-dir to complete fix for #406714. Thanks to Lionel! -- Kilian Krause Sun, 14 Jan 2007 13:38:57 +0100 asterisk (1:1.2.14~dfsg-2) unstable; urgency=low * Install private callerinfos in /var/lib/ where they belong acording to FHS. (Closes: #406714) -- Kilian Krause Sat, 13 Jan 2007 12:01:33 +0100 asterisk (1:1.2.14~dfsg-1) unstable; urgency=low * New upstream release. * Build against libspeex-dev (>= 1.1.12-3) with updated shlibs (Closes: #403544) * Update bristuff patch to apply cleanly with 1.2.14 until new upstream version is out. * Remove hardcoded gcc (Closes: #316802) * Fix upstream clean target. (Closes: #393659) -- Kilian Krause Wed, 3 Jan 2007 21:03:19 +0100 asterisk (1:1.2.13~dfsg-2) unstable; urgency=low [ Tzafrir Cohen ] * less_docs.dpatch: remove unnecessary doxygen docs. asterisk-doc's size is now 1.6M (7.7M installed). [ Mark Purcell ] * asterisk-classic, asterisk-bristuff: /usr/lib/asterisk/modules/format_ogg_vorbis.so gone missing when rebuilt (Closes: #397147) -- Mark Purcell Mon, 6 Nov 2006 06:33:19 +0000 asterisk (1:1.2.13~dfsg-1) unstable; urgency=high [ Kilian Krause ] * Fixup dfsg versions with increased upstream build count. [ Santiago Ruano Rincón ] * Added cdr_sqlite3_custom dpatch [ Mark Purcell ] * New upstream release - Remote compromise (Closes: #394025) - CVE-2006-5444/5:security issues in asterisk (Closes: #395080) - Urgency high as this fixes remote compromise security issue - Information disclosure of voice mail messages through vmail.cgi (Closes: #338116) - package asterisk-dev should contain asterisk.h main header (Closes: #342138) - format_ogg_vorbis.so was present in i386, no longer in packages (Closes: #375141) * Update debian/patches/bristuff.dpatch * bristuff-0.3.0-PRE-1v - Please package bristuff 0.3.0PREu (Closes: #394122) - please include app_pickup.c from bristuff (Closes: #348194) * Build Depends: dpkg ( >= 1.13.19) - Asterisk must build-depend upon dpkg ( >= 1.13.19) (Closes: #386113) * Build-Depends: libpq-dev - obsolete build dependency postgresql-dev (Closes: #389376) -- Mark Purcell Wed, 25 Oct 2006 06:46:52 +0100 asterisk (1:1.2.12.1.dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * New upstream release * bristuff.dpatch: version adapted. * apprecord_sprintf.dpatch removed: already applied. [ Mark Purcell ] * binary blob in asterisk-classic package (Closes: #386361) * Cleanup bristuff.dpatch -- Mark Purcell Sun, 24 Sep 2006 14:45:58 +0100 asterisk (1:1.2.11.dfsg-1) unstable; urgency=high [ Tzafrir Cohen] * apprecord_sprintf.dpatch: fix format string issue in app_record.so . [ Mark Purcell ] * New Upstream Release * Urgency high as fixes CVE-2006-4346 * CVE-2006-4346: Asterisk MGCP AUEP Response Handling Buffer Overflow (Closes: Bug#385060) * Please package Asterisk 1.2.11 and Zaptel 1.2.8 (Closes: #384283) * Better error handling on init.d reload, if asterisk isn't running * Lintian cleanup: not-binnmuable-any-depends-all * Lintian cleanup: not-binnmuable-all-depends-any * Use restart in asterisk_fix -- Mark Purcell Sat, 2 Sep 2006 13:01:02 +0100 asterisk (1:1.2.10.dfsg-3) unstable; urgency=low [ Kilian Krause ] * Add iaxy.bin to asterisk debs to have working IAX support. * asterisk_fix is included on the main asterisk package (Closes: Bug#287025, Bug#360233, Bug#381861) * Various fixes to asterisk_fix [ Mark Purcell ] * Remove Build-Depends: libgtk1.2-dev (only for asterisk-gtk) * export PROC := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) * asterisk-{classic-bristuff} Depends: asterisk * asterisk_fix needs to fix /var/run/asterisk * Move doc/asterisk -> asterisk-doc package [ Tzafrir Cohen] * New upstream release (Closes: #385060). * bristuff 0.3.0-PRE-1s (adapted to asterisk 1.2.11). -- Mark Purcell Thu, 17 Aug 2006 20:31:02 +0100 asterisk (1:1.2.10.dfsg-2) unstable; urgency=high * IAX2 channel driver security patch [CVE-2006-2898] - CVE-2006-2898: Denial of service in Asterisk (Closes: #380054) -- Mark Purcell Thu, 27 Jul 2006 08:09:47 +0100 asterisk (1:1.2.10.dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * New upstream release. * bristuff.dpatch updated for the new version. * dfsg tarball also removes ilbc. * Cleanups to asterisk_fix [ Mark Purcell ] * Build-Depends: libpri-dev (>= 1.2.3-1) * Fixes: - Please package version 1.2.9.1 (Closes: #372527) -- Mark Purcell Mon, 17 Jul 2006 21:15:50 +0100 asterisk (1:1.2.9.1.dfsg-1) unstable; urgency=high * New upstream release. [CVE-2006-2898] [ Mark Purcell ] * Update debian/watch for numeric upstream versions [ Kilian Krause ] * Remove unused correct_pid.dpatch (has apparently been fixed with 1.2 upstream) * debian/patches/100_nonroot.dpatch, debian/patches/20_Makefile.dpatch, debian/patches/25_subdirs_Makefiles.dpatch: Remove unused patches [ Tzafrir Cohen ] * reunite init.d and logrotate scripts in the package asterisk * Re-add correct_pid_display.dpatch * bristuff 0.3.0-PRE1s (gsm functionality missing: needs libgstam) * sys_readline.dpatch: Realine support in the CLI. TODO: tab completion * sys_editline.dpatch: alternativly, simply use the system version of editline (not used). * func_odbc_12.dpatch: backport of func_odbc (Closes: #364633) * brazilian_syntax.dpatch (using "pt_BR") * vm_he.dpatch: Hebrew in app_voicemail * The data_dir patch also moves agi-bin/ and firmware/ * option_detach: using -F instead of -D (the same as upstream) * asterisk.init: added "zaptel-fix" to unload and reload zaptel modules -- Kilian Krause Fri, 16 Jun 2006 18:04:50 +0000 asterisk (1:1.2.7.1.dfsg-3) unstable; urgency=high * Urgency high as this is a security fix [CVE-2006-2898] * Added 99_CVE-2006-2898.dpatch from Joey Schulze - Fixes: Bug in the IAX2 channel allows remote attackers to craft a denial of service. -- Mark Purcell Tue, 13 Jun 2006 05:11:44 +0100 asterisk (1:1.2.7.1.dfsg-2) unstable; urgency=high [ Kilian Krause ] * Urgency bumped since 1.2.7 is a security update [CVE-2006-1827] (Closes: #364195) [ Mark Purcell ] * Previous Upload also fixes: - cannot install - directories not created (Closes: #360233) - package uninstallable (Closes: #359970) * Update postinst to fix: fails to upgrade when /etc/asterisk/voicemail.conf is deleted (Closes: #360220) * Link debian/asterisk-bristuff.asterisk.{logrotate,init} & provide debian/asterisk-classic.asterisk.logfile - Fixes: init.d and logrotate.d conflicts (Closes: #360181) -- Mark Purcell Sun, 23 Apr 2006 13:26:29 +0100 asterisk (1:1.2.7.1.dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * New upstream release. * nomarch.dpatch: removed the patching to internal libgsm, as we don't use it (and it broke in this version) * bristuff.dpatch: based on the patch from bristuff-0.3.0-PRE1n * bristuff.dpatch: A small fix in chan_sip.c * bristuff.dpatch: Disabling "libgsm" until it is renamed * 30_ast-data-dir.dpatch: the symlink sounds/voicemail is now gone * rules: do fail if bristuff patching hasfailed * zap_restart.dpatch: allow restarting zaptel channel with "zap restart" * backport_playdtmf.dpatch: a harmless backport (no impact if not used) * completed the merge of logrotate and init.d scripts [ Lionel Elie Mamane ] * When not running asterisk, do it successfully, not by failure. (closes: #360234) * Create /var/log/asterisk/cdr-csv, not cdr-cvs. [ Mark Purcell ] * Update debian/control for asterisk-h323 package description * Create /var/spool/asterisk & /var/lib/asterisk in debian/*.postinst * New upstream release. Fixes: - Version 1.2.5 is out (Closes: #355299) - since 1.2.0 no chan_modem (Closes: #343232) - Undefined symbol in chan_zap.so (Closes: #339559) - Unapplying patches fail (Closes: #345676) - utils.c:619 tvfix: warning negative timestamp... (Closes: #347929) - creates /.asterisk_history on reboot (Closes: #307218) * h323 modules can be unstable so dont load my default * Cleanup debian/patches to remove obsolete/ old patches -- Mark Purcell Fri, 21 Apr 2006 17:33:31 +0100 asterisk (1:1.2.6.dfsg-1) unstable; urgency=low * New upstream release. (Closes: #355299) * correct_pid_display.dpatch: adjusted to 1.2.6 * 30_ast-data-dir.dpatch: adjusted to 1.2.6 * debian/control: Add adduser to depends of asterisk-config to shut up lintian. * rules: no need to copy config to the bristuff install * rules: but use cp -a for ast_config, as there may be subdirs. -- Tzafrir Cohen Mon, 10 Apr 2006 19:00:12 +0300 asterisk (1:1.2.4.dfsg-7) unstable; urgency=low * Recompile to fix missing asterisk-config from last binNMU round (Closes: #356712, #358413, #355524, #358145) * postinstall: Add /var/spool/asterisk/meetme if nonexistant. (Closes: #355046) * asterisk.init: Install both asterisk-classic and asterisk-bristuff with /etc/init.d/asterisk (Closes: #354729) * logroate: create /var/log/asterisk/cdr-custom/ as well as cdr-csv (Closes: #355048) * logrotate: share location of logrotate file as /etc/logrotate.d/asterisk for both classic and bristuff version (Closes: #356712) * delete chan_capi modules from bristuff * Move postinstall and postrm to asterisk-classsic, asterisk-bristuff and asterisk-config. (Closes: #355524) -- Kilian Krause Thu, 30 Mar 2006 11:55:03 +0200 asterisk (1:1.2.4.dfsg-6) unstable; urgency=low * Add chan_h323 back with new Atlas_devel3 OpenH323. -- Kilian Krause Sat, 18 Feb 2006 17:55:24 +0000 asterisk (1:1.2.4.dfsg-5) unstable; urgency=low * Fix install of asterisk-bristuff with dh_install. -- Kilian Krause Tue, 14 Feb 2006 20:23:56 +0100 asterisk (1:1.2.4.dfsg-4) unstable; urgency=low * Create missing /var/spool/asterisk/voicemail in postinst (Closes: #352586) -- Kilian Krause Sun, 12 Feb 2006 22:51:50 +0100 asterisk (1:1.2.4.dfsg-3) unstable; urgency=low * Fix asterisk-bristuff install target to catch correct versions. -- Kilian Krause Sun, 12 Feb 2006 12:34:31 +0000 asterisk (1:1.2.4.dfsg-2) unstable; urgency=low * update to bristuff 0.3.0-PRE-1k -- Kilian Krause Thu, 9 Feb 2006 18:12:08 +0000 asterisk (1:1.2.4.dfsg-1) unstable; urgency=low [ Tzafrir Cohen ] * Fix PID display (Closes: #338646) * changes to the init.d script (Tzafrir) * debian/ast_config/ place here configurutaion files that will override the defaults from the source, though not get into the sample documentation dir * debian/ast_config/manager.conf: asterisk does listen onthe manager by default, but only on localhost. Other packages need not edit manager.conf to get a manager acount * bristuff 0.3.0-PRE-1f * option_detach.dpatch: Adds option -D: always daemonize (even with -v,-d) (conflicts with bristuff, though) * ukcid.dpatch: UK Caller ID patch for the X100P. (Closes: #302380) [ Kilian Krause ] * New upstream release. (Closes: #350905) * Bumping depends on libpri and zaptel to according 1.2 versions. * Build-Depends on libpri1.2 since new ABI caused new package name. * Removed alternatives from Build-Depends since sbuild will only take first anyway to ensure constant rebuilds. * Add a noload for chan_capi by default, so that we d not stop loading when no CAPI is installed. (Closes: #328835) * Include smsq by adding Build-Depends on libpopt-dev (Closes: #348090) -- Kilian Krause Sun, 5 Feb 2006 11:44:28 +0100 asterisk (1:1.2.1.dfsg-3) unstable; urgency=low * Remove -msoft-float from compile flags to fix compilation on arm. (Closes: #343154) * Provide nonexistant dirs before running chown on them. (Closes: #341810) * Depend on Perl module in libapache-dbi-perl or libdbi-perl or web-vmail (Closes: #337448) * Fix permissions on voicemail.conf. (Closes: #304615) * Build-Depend on gsfonts to have Helvetica font for doxygen (Closes: #343079) -- Kilian Krause Mon, 2 Jan 2006 00:15:59 +0000 asterisk (1:1.2.1.dfsg-2) unstable; urgency=low [ Tzafrir Cohen ] * bristuff 0.3.0-PRE-1d . Still disabled by default * libpri_bristuffed.dpatch: link chan_zap with libpri-bristuffed.so.1 * Use asterisk(8) as a man page for rasterisk * Removing binary steroize: can be done with soxmix of package sox. * Removing binary streamplay: can be done with netcat [ Kilian Krause ] * Fix asterisk-dev to include asterisk.h -- Tzafrir Cohen Sat, 31 Dec 2005 21:17:44 +0200 asterisk (1:1.2.1.dfsg-1) unstable; urgency=low * New upstream release - Please package asterisk 1.2.1 (Closes: #342463) * Temporary disable bristuff for upstream release * sip-1.914.dpatch merged upstream -- Mark Purcell Wed, 7 Dec 2005 21:59:20 +0000 asterisk (1:1.2.0.dfsg-6) unstable; urgency=low * Add Build-Depends: libcurl3-dev | libcurl-dev - Should build-depend on libcurl3-dev (Closes: #341363) * Add Build-Depends: doxygen - Missing build-dependency on doxygen (Closes: #341362) * Build-Depends: adduser (>= 3.63) * disable chan_zap building (in channels makefile) against old libmfcr2 (Closes: #342139) * seperate api docs and configuration samples (Closes: #341395) * Add sip-1.913.dpatch; SIP error 400 on outgoing calls (Closes: #340574) -- Mark Purcell Mon, 5 Dec 2005 23:49:40 +0000 asterisk (1:1.2.0.dfsg-5) unstable; urgency=low [ Tzafrir Cohen ] * Added bristuff 0.3.0-PRE1 [ Mark Purcell ] * asterisk-sounds-main Replaces: asterisk-sounds-extra - asterisk-sounds-{main,extra}: file conflict (Closes: #339791) -- Mark Purcell Thu, 1 Dec 2005 17:37:13 +0000 asterisk (1:1.2.0.dfsg-4) unstable; urgency=low * Fix 50_debian-libgsm.dpatch to apply correctly - asterisk - FTBFS: Tries to build a i386 assembler file (Closes: #340102) -- Mark Purcell Mon, 21 Nov 2005 19:56:03 +0000 asterisk (1:1.2.0.dfsg-3) unstable; urgency=low * Remove -march to fix FTBFS. (Closes: #338753) -- Kilian Krause Sat, 19 Nov 2005 19:36:31 +0000 asterisk (1:1.2.0.dfsg-2) unstable; urgency=low * libreadline4-dev is superseeded by libreadline5-dev. Fixed build-depends. -- Kilian Krause Sat, 19 Nov 2005 12:12:51 +0000 asterisk (1:1.2.0.dfsg-1) unstable; urgency=low * New upstream release -- Mark Purcell Thu, 17 Nov 2005 18:17:02 +0000 asterisk (1:1.2.0-rc2.dfsg-1) experimental; urgency=low * New upstream release -- Mark Purcell Sun, 13 Nov 2005 17:58:08 +0000 asterisk (1:1.2.0-rc1.dfsg-1) experimental; urgency=low * New upstream release * Suggests: asterisk-rate-engine * debian/rules touch .cleancount (upstream bug?) -- Mark Purcell Wed, 9 Nov 2005 22:05:30 +0000 asterisk (1:1.2.0-beta2.dfsg-3) experimental; urgency=low * Fix debian/patches/30_ast-data-dir with /var/run/asterisk. Thanks Alessandro Polverini -- Mark Purcell Tue, 8 Nov 2005 22:00:29 +0000 asterisk (1:1.2.0-beta2.dfsg-2) experimental; urgency=low * Copyright audit into debian/copyright (Closes: #331318) * Please package 1.2 beta 2 (Closes: #336749) -- Mark Purcell Mon, 7 Nov 2005 22:58:27 +0000 asterisk (1:1.2.0-beta2.dfsg-1) experimental; urgency=low * New upstream release * Update Build-Depends: libpri1 >= 1.2.0-beta2 * Remove Build-Depends: doxygen. Takes too long for experimental ;-) -- Mark Purcell Tue, 1 Nov 2005 22:27:43 +0000 asterisk (1:1.2.0-beta1.dfsg-1) experimental; urgency=low [ Tzafrir Cohen ] * recreated system_libgsm patch, http://bugs.digium.com/view.php?id=5434 * Added public key from Junction Networks (pubkey_jnctn.dpatch). Any other keys for IAX providers we can add? * updating to a beta of Asterisk 1.2 * added defaults_debian.dpatch to set pathes * BuildDepends on graphviz * disabled most patches: still need to review them * What about h323? * deleted from patches/00list a number of patches that should not go in [ Mark Purcell ] * Fix: old-fsf-address-in-copyright-file * Please package version 1.2 betas (Closes: #325268) -- Mark Purcell Thu, 20 Oct 2005 19:42:14 +0100 asterisk (1:1.0.9.dfsg-6) UNRELEASED; urgency=low * Fix memleak bug (http://bugs.digium.com/view.php?id=4318) * Fix depends to adduser 3.64 (Closes: #326198) -- Kilian Krause Wed, 7 Sep 2005 21:22:40 +0200 asterisk (1:1.0.9.dfsg-5) unstable; urgency=low [ Kilian Krause ] * debian/control: fix GCI to read CGI. (Closes: #311291) [ Mark Purcell ] * /var/lib/dpkg/info/asterisk.postinst: line 22: adduser: command not found (Closes: #322115) * debian/patches/chan-modem.dpatch from Simon Peter - chan_modem.c should set default read & write format (Closes: #303903) * apply patch from Jérôme Warnier - Asterisk autosupport script not recognized as such (Closes: #316799) * Updated debian/postrm: - 'apt-get --purge remove asterisk' removes configuration files from another package (Closes: #318455) -- Mark Purcell Tue, 9 Aug 2005 22:07:13 +0100 asterisk (1:1.0.9.dfsg-4) unstable; urgency=low * Cleanup bristuff to build under gcc4, thanks for the suggestions - Closes: #318337: FTBFS. channel.c:64: error: static declaration of 'uniquelock' follows non-static declaration -- Mark Purcell Fri, 22 Jul 2005 10:28:15 +1000 asterisk (1:1.0.9.dfsg-3) unstable; urgency=low * Cleanup 70_debian-libpe-fe.dpatch to check in Makefile * Enable bristuff-0.2.0-RC8j.dpatch * Remove debian/patches/08_debian-zaptel.dpatch as it is no longer needed with new zaptel-source package * Cleanup debian/patches/ * Conflicts: asterisk-oh323 (<= 0.6.6pre3-3) - Closes: #318189: asterisk-oh323: chan_oh323.so cannot find symbol and Asterisk crashes - Closes: #318216: chan_oh323.so symbols * Cleanup postinit error: adduser asterisk audio; adduser asterisk dialout * Incorporate suggestions from Tzafrir Cohen - postinst script has an error - modified astdir patch, so it won't conflict with bristuff patch - typo in the debian/asterisk.default: s/exra/extra/ - build-depends both on zaptel-source (>= 1.0.6) and simply on zaptel-source, The latter is probably unnecessary - man pages for the other executables in the package -- Mark Purcell Thu, 14 Jul 2005 07:22:59 +0100 asterisk (1:1.0.9.dfsg-2) unstable; urgency=low * Closes: #301490: Please add patch for Italian syntax * Closes: #305734: On PowerPC, hanging up on voicemail causes non-stop log messages -- Mark Purcell Fri, 1 Jul 2005 23:24:53 +0100 asterisk (1:1.0.9.dfsg-1) unstable; urgency=low * New upstream release - Closes: #315578: New version of asterisk and bristuff released * Remove BRI patch while we work on it, to allow 1.0.9 to unstable -- Mark Purcell Fri, 1 Jul 2005 22:38:24 +0100 asterisk (1:1.0.8.dfsg-1) UNRELEASED; urgency=low * (NOT RELEASED YET) New upstream release -- Mark Purcell Fri, 24 Jun 2005 23:25:02 +0100 asterisk (1:1.0.7.dfsg.1-4) unstable; urgency=low * debian/control: fixed build-depends on sed's version greater than Woody. (Closes: #308885) -- Kilian Krause Sat, 21 May 2005 14:15:03 +0200 asterisk (1:1.0.7.dfsg.1-3) unstable; urgency=low * Jose Carlos + Fix a typo in NEWS.Readme + debian/postint: Add asterisk user to dialout group too. This is needed for asterisk to have enoug permissions to access zaptel devices. + debian/control: allow a local asterisk-config-local package to satisfy dependencies. Conflict with asterisk-config -- Jose Carlos Garcia Sogo Sun, 8 May 2005 22:06:44 +0200 asterisk (1:1.0.7.dfsg.1-2) unstable; urgency=low * Mark Purcell + Update debian/watch to use svn-upgrade * Kilian Krause + debian/asterisk.init: fixed restart problem with breaking up after stop. + debian/asterisk.init: fixed reference to WRAPPER_DEAMON which is only DEAMON for us. (Closes:#300707) -- Kilian Krause Mon, 21 Mar 2005 10:59:01 +0100 asterisk (1:1.0.7.dfsg.1-1) unstable; urgency=low * New upstream release (Ensure non-dfsg MOH is not included in orig.tar) -- Mark Purcell Sun, 20 Mar 2005 10:30:44 +0000 asterisk (1:1.0.7-1) unstable; urgency=low * New upstream release. (Closes: #300403) + Fixed music on hold. (Closes: #300370) * Re-enabled speex codec. (Closes: #300373) * As asterisk-h323 is empty, we are no longer depending on openh323, so we don't have build conflicts between asterisk and zaptel. (Closes: #287260) * debian/rules: Fixed duplicate execution of configure and unrepresentable changes to source. (Closes: #299184) * debian/patches/80_skinny.dpatch: removed. Incorporated in the 1.0.7 release. * debian/patches/97_bristuff.dpatch: fixed problems to build on AMD64 with gcc-4.0 (Closes: #297561) -- Kilian Krause Sat, 19 Mar 2005 22:26:45 +0100 asterisk (1:1.0.6-2) unstable; urgency=low * fixed location of sounds dir in addmailbox (Closes: #298769) -- Kilian Krause Wed, 9 Mar 2005 22:09:05 +0100 asterisk (1:1.0.6-1) unstable; urgency=low * New upstream release. (asterisk 1.0.6, bristuff RC7k, Closes: #298128) * debian/control: explicitly depend on zlib1g-dev. (Closes: #296967) * Make sure we have the newer asterisk-config to not conflict /etc/default/asterisk. (Closes: #297719) * as there is no longer a conflict with libnewt-dev, it was added to the build deps for astman * debian/control: add astman and cdr_sqlite (Closes: #259342) * asterisk.default, asterisk.init: removed hack to load zaphfc correctly. We'll leave this to zaptel and it's modprobe.d features. -- Kilian Krause Sat, 5 Mar 2005 20:03:42 +0100 asterisk (1:1.0.5-4) unstable; urgency=low * debian/patches/00list,debian/control: Enable bristuff RC7f by default. * debian/asterisk.init, debian/asterisk.default: Cleanup zaphfc preloading as inspired by Tzafrir Cohen. * debian/control: Remove speex as B-D, it's broken when imported from debian. Added autotools-dev for editline. * deiban/rules: fix asterisk.8.gz error in lintian. Bring new autotools for editline's configure. * reintroduce chan_zap (Closes: #296656) -- Kilian Krause Thu, 24 Feb 2005 01:24:45 +0100 asterisk (1:1.0.5-3) unstable; urgency=low * debian/patches/08_debian-zaptel.dpatch, debian/control: fixed zaptel.h include to take zaptel-source's version. * debian/patches/97_bristuff.dpatch: include bristuff from junghanns.net (not enabled by default now, would close: #286797). We need libpri and zaptel with bristuff patch first. * 18_debian-libedit.dpatch: removed due to command history problem. (Closes:#281690) * debian/asterisk.init: Added grace timeout of 2 secs before hard shutting down running daemons to don't scatter incorrect warnings. Don't run the asterisk daemon unless RUNASTERISK=yes. (Will not bind ports from chroots) * debian/asterisk-config.default: Disabled autostart - especially when installing in chroots this was quite annoying. * debian/rules: Remove the asterisk.8.gz recompression. (Closes: #295220) * debian/README.Debian: Added first version. Thanks to Tzafrir Cohen for the template! (Closes: #270072) * debian/asterisk.deafult: moved the /etc/default to the asterisk package, as /etc/init.d/asterisk in there needs it. * debian/80_skinny.dpatch: Added http://bugs.digium.com/bug_view_page.php?bug_id=0003496. Thanks to Johan Thelmén . (Closes:#295658) * debian/control: remove chan_h323 from being built for now. For now it's being replaced by asterisk-oh323 until chan_h323 does build and work ok with latest OpenH323 again. -- Kilian Krause Mon, 21 Feb 2005 23:13:57 +0100 asterisk (1:1.0.5-2) unstable; urgency=low * Debian VoIP Team upload. * asterisk.init, asterisk-config.default: probably fixed start-as-user-with- multiple-groups-problem. * patches/40_initgroups.dpatch: added patch from Florian Weimer . Thanks! (Closes: #293124) * debian/postinst: Make asterisk user's home /var/lib/asterisk upon user request. * debian/control: Bump libpri build-depends to 1.0.4-1. (Closes: #293990) -- Kilian Krause Tue, 8 Feb 2005 11:40:43 +0100 asterisk (1:1.0.5-1) unstable; urgency=low * Debian VoIP Team upload. * New upstream release. * Kilian Krause: - debian/asterisk.init: fixed multiple GID problem when starting asterisk (as reported by Raoul Bönisch and Simon Peter). Unfortunatelly this does remove the chance to run as real-time prio. - debian/asterisk.init: fixed stale stop by using start-stop-server after soft shutdown (Closes: #263879) - debian/asterisk.init: Fixed running as root problem for #279052. At least through the /etc/init.d/asterisk you won't be able to run asterisk as root (not even with another username). (Closes: #279052) - debian/asterisk.init: Added switch to run asterisk via safe_asterisk optionally for automatic restart (Closes: #266805) - debian/patches/01_security_hotfix_287851.dpatch: Removed, as is incorporated in 1.0.4 upstream release. * Jose Carlos - debian/rules: add a check at build time for fpm sounds. If they exist, abort, as we must remember to remove those from sources in each new upstream release. - debian/patches: 20_Makefile.dpatch: updated -- Jose Carlos Garcia Sogo Fri, 28 Jan 2005 23:31:14 +0100 asterisk (1:1.0.3-2) unstable; urgency=low * Apply missing 25_subdirs_Makefile patch. -- Jose Carlos Garcia Sogo Sat, 15 Jan 2005 18:23:40 +0100 asterisk (1:1.0.3-1) unstable; urgency=high * Debian VoIP Team upload. * New upstream version. (Closes: #284889) * Kilian Krause: - ACK NMU. (Thanks Steve!): + debian/patches/01_security_hotfix_287851.dpatch: Patched to fix logging strings vulnerability. (Closes: #287851) * Jose Carlos Garcia Sogo - Using again dpatch. - debian/patches: populated with different patches. - 08_debian-zaptel: Using zaptel.h file from version 1:1.0.0-2 of zaptel-source package. - removed sounds licensed from FreePlayMusic from source, as the license for them is not DFSG compliant (Closes: #288429) - applied patch to make asterisk compile on amd64 with gcc-4.0 (Closes: #288831) - debian/asterisk.init: + Changed how daemon is restarted in init file. (Closes: #287025) + Using -r in checks in init file. (Closes: #287456) - debian/asterisk-config.default + Run by default as group asterisk. - Fix some lintian warnings and errors: + Description: should start with lowercase letter. + Bumped Standars-Version to 3.6.1. No changes needed. + Removed duplicate dependencies. + Recompress asterisk.8 manpage with max level (--best option) -- Jose Carlos Garcia Sogo Sat, 15 Jan 2005 13:11:49 +0100 asterisk (1:1.0.2-3.1) unstable; urgency=high * Non-maintainer upload. * High-urgency upload for sarge-targetted RC bugfix * Fix multiple format string vulnerabilities, reported by Jan Niehusmann. Closes: #287851. -- Steve Langasek Sat, 8 Jan 2005 02:54:45 -0800 asterisk (1:1.0.2-3) unstable; urgency=low * Closes: #281524: running asterisk with realtime priority * Include changes from Tzafrir Cohen -- Mark Purcell Thu, 2 Dec 2004 02:10:12 +1100 asterisk (1:1.0.2-2) unstable; urgency=low * fixup init.d/asterisk to logger reload. Thanks Daniel Pocock * Closes: #260575: chan_zap.so: undefined symbol * Build-Depends: libpri1 >= 0.6 * Closes: #279905: dependency issue breaks voicemail setup * Build-Depends: asterisk-sounds-main (>= 1.0.2) * Closes: #269942: package Debian asterisk-sounds * Rename asterisk-sounds to asterisk-sounds-main to avoid upstream conflict * Closes: #277404: Please split out GTK console * Split off asterisk-gtk-console package to contain all X11 dependancies -- Mark Purcell Sat, 6 Nov 2004 13:20:33 +1100 asterisk (1:1.0.2-1) unstable; urgency=low * New upstream release * Closes: #279540: Please package newer version of asterisk * Closes: #275808: logrotate errors and emails -- Mark Purcell Thu, 4 Nov 2004 18:19:09 +1100 asterisk (1:1.0.1-2) unstable; urgency=low * Closes: #275808: logrotate errors and emails * Add init.d/asterisk logger-reload|extensions-reload options & use logger reload in asterisk.logrotate. Thanks Daniel Pocock -- Mark Purcell Wed, 13 Oct 2004 22:31:22 +1000 asterisk (1:1.0.1-1) unstable; urgency=low * New upstream release -- Mark Purcell Wed, 6 Oct 2004 14:39:12 +1000 asterisk (1:1.0.0-4) unstable; urgency=high * Urgency high for sarge release * Closes: #273570: asterisk-sounds: sounds/letters directory is missing -- Mark Purcell Wed, 29 Sep 2004 07:48:16 +1000 asterisk (1:1.0.0-3) unstable; urgency=low * Closes: #273780: under ALSA, infinite-loops immediately on installation * Comment out autoload of chan_oss from modules.conf * Closes: #272999: asterisk_1:0.9.1+1.0RC2-2_hppa: FTBFS: [anaFilter.o] Error 1 * Version 1.0.0 now builds on hppa * Closes: #273576: chan_zap.so module is missing * check for ../include/linux/zaptel.h in channels/Makefile * Closes: #273572: Music on hold has wrong default directory * refer to correct /usr/share/asterisk/mohmp3 directory -- Mark Purcell Tue, 28 Sep 2004 23:06:03 +1000 asterisk (1:1.0.0-2) unstable; urgency=medium * Rebuild with zaptel.h_1.0.0 and libpri-dev_1.0.0 -- Mark Purcell Sun, 26 Sep 2004 08:32:11 +1000 asterisk (1:1.0.0-1) unstable; urgency=low * New upstream release -- Mark Purcell Fri, 24 Sep 2004 20:23:31 +1000 asterisk (1:0.9.1+1.0RC2-2) unstable; urgency=low * Use asterisk.8.gz man page * Remove back PROC optomizations from Makefile, enable build on hppa -- Mark Purcell Thu, 23 Sep 2004 18:20:45 +1000 asterisk (1:0.9.1+1.0RC2-1) unstable; urgency=low * New upstream release * Back out dpatch (Makes new upstream release straight forward) -- Mark Purcell Thu, 23 Sep 2004 08:35:08 +1000 asterisk (1:0.9.1+1.0RC1-9) unstable; urgency=low * Breakup monolithic patch into components. -- Mark Purcell Wed, 22 Sep 2004 18:47:31 +1000 asterisk (1:0.9.1+1.0RC1-8) unstable; urgency=medium * debian/patches/11_makefile-sanitize.dpatch: fixed patch to make gsm work again. (Closes: #266167) -- Kilian Krause Tue, 17 Aug 2004 15:34:21 +0200 asterisk (1:0.9.1+1.0RC1-7) unstable; urgency=low * debian/rules, debian/patches/10_rollup-1.0-1.dpatch, debian/patches/11_makefile-sanitize.dpatch: Incorporate fixes proposed by Thiemo Seufer . Should fix the FTBFS on hppa. -- Kilian Krause Sun, 15 Aug 2004 20:16:26 +0200 asterisk (1:0.9.1+1.0RC1-6) unstable; urgency=low * debian/control: suggest gnomemeeting. (At least tell people, which clients they need) Also add dpatch as Build-Dep. (Closes: #265036) * Closes: #262011: SIP cancels fail due to Request-URI mismatch * debian/patches/20_chan_sip.dpatch: Apply chan_sip patch from Jan Niehusmann -- Kilian Krause Sat, 14 Aug 2004 14:05:36 +0000 asterisk (1:0.9.1+1.0RC1-5) unstable; urgency=low * debian/control: make sure we're rebuilding with rtti enabled openh323 * debian/rules: make svn-buildpacakge not choke on failing clean target -- Kilian Krause Mon, 9 Aug 2004 14:37:38 +0200 asterisk (1:0.9.1+1.0RC1-4) unstable; urgency=low * Cleanup wierd .diff.gz file -- Mark Purcell Wed, 28 Jul 2004 19:00:32 +1000 asterisk (1:0.9.1+1.0RC1-3) unstable; urgency=low * Rebuild with existing libtonezone1 -- Mark Purcell Wed, 28 Jul 2004 18:10:52 +1000 asterisk (1:0.9.1+1.0RC1-2) unstable; urgency=low * Cleanup codecs/ilbc/Makefile to remove -march sillyness (which is already defined above anyway * Debian already has libedit.a Don't build, fails on mips anyway due to old config.guess -- Mark Purcell Wed, 21 Jul 2004 19:21:51 +1000 asterisk (1:0.9.1+1.0RC1-1) unstable; urgency=low * New upstream release (Closes: Bug#260370) * Closes: #247401: doesn't upgrade cleanly - initscript problems ? -- Mark Purcell Tue, 20 Jul 2004 19:20:37 +1000 asterisk (1:0.9.1-3) unstable; urgency=low * allow init.d/asterisk distribution via GPL * Remove -I/usr/include/ptlib/unix from h323 Makefile, Thanks Ray Dassen (Closes: Bug#259564) * Closes: #259572: Unmet dependencies * Maintainer: Debian VoIP Team Uploaders: Mark Purcell , Kilian Krause , Jose Carlos Garcia Sogo , Goedson Teixeira Paixao , Santiago Garcia Mantinan * Next step. Get this all back into svn! -- Mark Purcell Sun, 18 Jul 2004 10:40:22 +1000 asterisk (1:0.9.1-2) unstable; urgency=low * Rebuild with libopenh323-dev (1.12.2-4) from sarge for H.323 support -- Mark Purcell Wed, 14 Jul 2004 18:35:42 +1000 asterisk (1:0.9.1-1) unstable; urgency=low * New upstream release. Previous version WAS tagged as 1.0 in CVS :-( * Closes: #249046: no ring indication * Closes: #254654: init.d/asterisk restart kills asterisk * Build-Depends: libgtk1.2-dev, libspeex-dev (Closes: Bug#253639) * Turn off broken H.323 support (Closes: Bug#255662) * Closes: #250302: Package description is slightly outdated and incorrect * Closes: #255685: Syntax error in configuration file, /etc/asterisk/sip.conf * Closes: #228722: please add postgres support for asterisk -- Mark Purcell Sat, 3 Jul 2004 22:47:41 +1000 asterisk (1.0-2) unstable; urgency=low * Rebuild for new libopenh323-dev -- Mark Purcell Sat, 3 Jul 2004 21:56:58 +1000 asterisk (1.0-2) unstable; urgency=low * Merged 1.0-1 and 0.9.0-2 -- Jose Carlos Garcia Sogo Tue, 8 Jun 2004 00:10:16 +0200 asterisk (1.0-1) unstable; urgency=low * New upstream release -- Mark Purcell Mon, 31 May 2004 21:51:18 +1000 asterisk (0.9.0-1) unstable; urgency=low * New upstream release -- Mark Purcell Sun, 18 Apr 2004 22:51:59 +1000 asterisk (0.7.2-4) unstable; urgency=low * Update channels/h323/Makefile Closes: #235010: asterisk_0.7.2-3(unstable/sparc): arch-dependent CFLAGS -- Mark Purcell Fri, 27 Feb 2004 12:14:26 +1100 asterisk (0.7.2-3) unstable; urgency=low * Add Build-Depends: libopenh323-dev (Closes: Bug#233649) -- Mark Purcell Tue, 24 Feb 2004 11:55:57 +1100 asterisk (0.7.2-2) unstable; urgency=low * Build-Depends: libpri-dev (Closes:Bug#199548) * Include Suggests: rate-engine -- Mark Purcell Thu, 5 Feb 2004 17:26:02 +1100 asterisk (0.7.2-1) unstable; urgency=low * New upstream release -- Mark Purcell Thu, 5 Feb 2004 16:25:28 +1100 asterisk (0.7.1-3) unstable; urgency=low * Build with libopenh323 support (Closes: Bug#195233) * Include Suggests: ohphone -- Mark Purcell Tue, 3 Feb 2004 08:47:47 +1100 asterisk (0.7.1-2) unstable; urgency=low * Remove ppc fixup in codecs/lpc10/Makefile again. Prevents build on ia64, mk68 et al -- Mark Purcell Fri, 16 Jan 2004 11:46:57 +1100 asterisk (0.7.1-1) unstable; urgency=low * New upstream release * i686 optomised build -- Mark Purcell Thu, 15 Jan 2004 23:06:01 +1100 asterisk (0.7.0-1) unstable; urgency=low * LCA2004 release. Thanks Internode for the wireless access * New upstream release * Clean up bad symlinks in vm (Closes: Bug#220714) * Apply restart gracefully patch from Nick Estes (Closes: Bug#217004) * Fixup permission/ ownership problems in /etc/asterisk (Closes: Bug#216995) * Fixup master call log issues (Closes: Bug#217003) * Remove Build-Depends: libmysql-dev - see doc/README.mysql (Closes: Bug#222255) * Build with include/linux/zaptel.h from zaptel-0.8.0.tar.gz * Include Build-Depends: postgresql-dev * Include Build-Depends: unixodbc-dev -- Mark Purcell Wed, 14 Jan 2004 10:10:02 +1100 asterisk (0.5.0-3) unstable; urgency=low * Remove Suggests: gnophone (Orphaned and removed) * Clean up bad symlinks in vm (Closes: Bug#220714) * Apply restart gracefully patch from Nick Estes (Closes: Bug#217004) * Fixup permission/ ownership problems in /etc/asterisk (Closes: Bug#216995) * Fixup master call log issues (Closes: Bug#217003) -- Mark Purcell Tue, 13 Jan 2004 21:01:16 +1100 asterisk (0.5.0-2) unstable; urgency=low * Build-Depends: debhelper (>= 4.0.4) (Closes: Bug#216725) -- Mark Purcell Fri, 31 Oct 2003 06:59:11 +1100 asterisk (0.5.0-1) unstable; urgency=low * New upstream release (Closes: Bug#196761) * Build with include/linux/zaptel.h from zaptel-0.7.0.tar.gz -- Mark Purcell Tue, 16 Sep 2003 23:40:05 +1000 asterisk (0.4.0-6) unstable; urgency=low * Include dh_install in debian/rules (Closes: Bug#207879) -- Mark Purcell Wed, 10 Sep 2003 23:07:37 +1000 asterisk (0.4.0-5) unstable; urgency=low * Rebuild for libnewt-utf8-0 (NOT AVAILABLE) * Build-Depend: libnewt-dev -- Mark Purcell Sat, 5 Jul 2003 15:17:57 +1000 asterisk (0.4.0-4) unstable; urgency=low * include Build-Depends: libgtk1.2-dev (Closes: Bug#194489) -- Mark Purcell Sat, 5 Jul 2003 15:12:02 +1000 asterisk (0.4.0-3) unstable; urgency=low * Rebuild for libtonezone-0.60, libzaptel-0.60 * Change codecs/codec_gsm.c:#include (Closes: Bug#190082) * Start after isdnactivecards debian/rules dh_installinit (Closes: Bug#191062) * Change to Build-Depends: libnetw-utf8-dev * Update Tormenta URL in debian/control -- Mark Purcell Sat, 10 May 2003 16:58:03 +1000 asterisk (0.4.0-2) unstable; urgency=low * Remove ppc 'fixup' in codecs/lpc10/Makefile (Closes: Bug#189743) * Updated description (Closes: Bug#168779) -- Mark Purcell Sun, 20 Apr 2003 08:37:49 +1000 asterisk (0.4.0-1) unstable; urgency=low * New upstream release * cdr/Makefile CFLAGS+=-fPIC -DPIC (Closes: Bug#188915) * Include include/linux/zaptel.h from zaptel-0.6.0.tar.gz -- Mark Purcell Sat, 19 Apr 2003 21:11:45 +1000 asterisk (0.3.0-2) unstable; urgency=low * Build-Depends: libmysqlclient-dev, libgtk2.0-dev (Closes: Bug#188188) -- Mark Purcell Thu, 10 Apr 2003 20:08:38 +1000 asterisk (0.3.0-1) unstable; urgency=low * New upstream release * channels/chan_zap_new.c is depreciated * Debian patches to upstream Makefile are a lot cleaner!! * Update /etc/init.d/asterisk stop to use 'stop now' command * Hack AST_DATA_DIR to provide asterisk-sounds under /usr/share/asterisk * `chown asterisk.asterisk /var/lib/asterisk` on install * Remove dh_undocumented * chan_oss failing again :-( * Force Depends: libspeex1 (dpkg-shlibs bug?) -- Mark Purcell Tue, 8 Apr 2003 21:27:52 +1000 asterisk (0.2.0-cvs20030103-3) unstable; urgency=low * Include Build-Depends: libasounds2-dev * Update channels/Makefile to include Debian zaptel.h dir (Closes: Bug#178868) * Thanks to mdz for the new libzap-dev and other patches -- Mark Purcell Sat, 8 Mar 2003 15:45:40 +1100 asterisk (0.2.0-cvs20030103-2) unstable; urgency=low * Revert -march in codecs/lpc10/Makefile -- Mark Purcell Sat, 25 Jan 2003 08:38:51 +1100 asterisk (0.2.0-cvs20030103-1) unstable; urgency=low * New upstream release * Use invoke-rc.d in logrotate script (Closes: Bug#174633) -- Mark Purcell Fri, 24 Jan 2003 21:57:43 +1100 asterisk (0.2.0-4) unstable; urgency=low * Add Build-Depends: bison (Closes: Bug#169312) -- Mark Purcell Sun, 17 Nov 2002 09:03:01 +1100 asterisk (0.2.0-3) unstable; urgency=low * Fixed bison problems. ThanksMartijn * Move gethostname in app_voicemail.c (Closes: Bug#168936) * Move 0.2.0 to unstable. If you have OSS problems use asterisk/testing. -- Mark Purcell Fri, 15 Nov 2002 20:36:03 +1100 asterisk (0.2.0-2) experimental; urgency=low * Incorporate changes from mdz (Remove graphviz, build astman) * Force Build-Deps: bison-1.35 :( -- Mark Purcell Sat, 26 Oct 2002 12:59:12 +1000 asterisk (0.2.0-1) experimental; urgency=low * New upstream release (Closes: Bug#163852) * Uploaded to experimental as I am having problems with the chan_oss driver which is a critial component. -- Mark Purcell Wed, 9 Oct 2002 08:02:38 +1000 asterisk (0.1.12-5) unstable; urgency=low * Remove chown against /var/lib/asterisk (Closes: Bug#154774) * Fixup vm symlink (Closes: Bug#158800) * Fixup location of iaxtel.pub keys -- Mark Purcell Sun, 8 Sep 2002 20:56:24 +1000 asterisk (0.1.12-4) unstable; urgency=low * Seperate into indep packages; asterisk, asterisk-[sounds,dev,doc] * Sounds & images from /var/lib/asterisk to FHS compliant /usr/share/asterisk * Remove DEBUG options from normal build * Include Build-Depends: doxygen -- Mark Purcell Wed, 24 Jul 2002 15:07:51 +1000 asterisk (0.1.12-3) unstable; urgency=low * Update Description * Use dpkg-architecture to set processor optimisations (Closes: #153175) -- Mark Purcell Wed, 17 Jul 2002 21:23:33 +1000 asterisk (0.1.12-2) unstable; urgency=low * Fixup build check for /etc/asterisk -- Mark Purcell Tue, 9 Jul 2002 07:32:17 +1000 asterisk (0.1.12-1) unstable; urgency=low * New upstream release * Fixup typo in /etc/init.d/asterisk * Include [cdr_mysql.so] => (MySQL CDR Backend) * Use excellent init.d script idea from Sim IJskes * Fixup broken postinst & postinst scripts -- Mark Purcell Mon, 8 Jul 2002 23:07:27 +1000 asterisk (0.1.11-5) unstable; urgency=low * Include zaptel support (Closes: Bug#151274) -- Mark Purcell Fri, 5 Jul 2002 23:59:17 +1000 asterisk (0.1.11-4) unstable; urgency=low * Add init.d from Matt Zimmerman (Closes: Bug#150573) * More updates from Matt Zimmerman: (Closes: Bug#151201) - place socket and fifo in /var/run/asterisk instead of /var/run - fix mkfifo call (bug uncovered by running as non-root), patch sent upstream also - create postinst with necessary adduser and chown calls * Install logrotate from Matt Zimmerman (Closes: Bug#151198) * Disable geteuid check to allow running as non-root * Add asterisk to audio group by default -- Mark Purcell Sat, 29 Jun 2002 01:34:56 +1000 asterisk (0.1.11-3) unstable; urgency=high * Update cdr/Makefile to include CFLAGS+=-fPIC -DPIC (Closes: Bug#144052) -- Mark Purcell Sat, 27 Apr 2002 21:19:32 +1000 asterisk (0.1.11-2) unstable; urgency=low * Move from non-us to main/comm * Update copyright file to reflect upstream CVS LICENCE change to permit linking with OpenSSL/ OpenH323 (Closes: Bug#141164) -- Mark Purcell Fri, 19 Apr 2002 20:11:58 +1000 asterisk (0.1.11-1) unstable; urgency=low * New upstream release * Update debian/control * Include README.cdr & README.iax -- Mark Purcell Mon, 18 Mar 2002 15:46:39 +1100 asterisk (0.1.10-3) unstable; urgency=low * Include CFLAGS+=-fPIC -DPIC in res/Makefile for hppa build -- Mark Purcell Fri, 1 Mar 2002 20:58:02 +1100 asterisk (0.1.10-2) unstable; urgency=low * Change Build-Depends: libssl-dev (Closes: Bug#134821) -- Mark Purcell Wed, 20 Feb 2002 22:28:35 +1100 asterisk (0.1.10-1) unstable; urgency=low * New upstream release -- Mark Purcell Wed, 20 Feb 2002 22:28:00 +1100 asterisk (0.1.9-5) unstable; urgency=low * Better make that Architecture: any if I want this to autobuild :-) -- Mark Purcell Wed, 2 Jan 2002 13:00:09 +1100 asterisk (0.1.9-4) unstable; urgency=low * Exclude MMX optimsed asm codecs/gsm/src/k6opt.s to enable non-x86 & non-k6 builds (Closes: Bug#127225) -- Mark Purcell Wed, 2 Jan 2002 12:59:38 +1100 asterisk (0.1.9-3) unstable; urgency=low * New maintainer (Closes: Bug#123497) * Set Arch to i386 as this contains x86 assember code -- Mark Purcell Sat, 29 Dec 2001 10:25:21 +1100 asterisk (0.1.9-2) unstable; urgency=high * apps/Makefile, codecs/gsm/Makefile: Missed an -mpentium in CFLAGS. Closes: #126552. -- Matej Vela Thu, 27 Dec 2001 04:00:50 +0100 asterisk (0.1.9-1) unstable; urgency=medium * QA upload. * New upstream version. * Package is orphaned; maintainer set to Debian QA Group. * debian/postrm: Ensure correct exit status. Closes: #105523. * debian/control: s/API's/APIs/ Closes: #124423. * debian/conffiles: Already handled by debhelper; removed. * Conforms to Standards version 3.5.6: * debian/copyright: Include module licensing exception and GSM and ADPCM copyrights. * debian/rules: * Use dh_undocumented rather than a verbatim copy of undocumented.7. * Pass ChangeLog to dh_installchangelogs. * Support DEB_BUILD_OPTIONS. -- Matej Vela Tue, 25 Dec 2001 19:16:48 +0100 asterisk (0.1.6-1.2) unstable; urgency=low * NMU * Fix makefiles, add -fPIC to builds. Closes: #104779 -- LaMont Jones Sun, 15 Jul 2001 15:15:46 -0600 asterisk (0.1.6-1.1) unstable; urgency=low * NMU with permission of Raphael Bossek. * Corrected an error in channels/adtranvofr.h that prevented big endian from compiling. (closes: #87273, #89868, #93913) * Added build dependencies. * Added the location of the upstream source to debian/copyright. -- Adrian Bunk Tue, 15 May 2001 00:22:31 +0200 asterisk (0.1.6-1) unstable; urgency=low * New upstream version. -- Raphael Bossek Mon, 19 Feb 2001 15:48:43 +0100 debian/NEWS0000664000000000000000000000563712254353233007704 0ustar asterisk (1:11.6.0~dfsg-3) unstable; urgency=medium The cdr_radius.so and cel_radius.so modules are now linked against libfreeradius-client2 instead of libradiusclient-ng2 so the default RADIUS configuration file has changed to /etc/radiusclient/radiusclient.conf. If you use a custom RADIUS configuration file, please update it so that it is compatible with libfreeradius-client2 by adding: radius_deadtime 0 If you do not take this step you are likely to encounter a SEGFAULT when asterisk starts up. -- Jeremy Lainé Fri, 13 Dec 2013 10:10:50 +0100 asterisk (1:11.6.0~dfsg-2) unstable; urgency=medium A number of Asterisk modules have been moved to their own packages: * asterisk-dahdi: chan_dahdi and other modules that depend on DAHDI. * asterisk-vpb: chan_vpb. If you have DAHDI devices or VoiceTronix devices that use chan_vpb, you need one of those two respective packagees installed. -- Tzafrir Cohen Wed, 11 Dec 2013 18:11:16 +0200 asterisk (1:1.6.2.0~dfsg~rc1-1) unstable; urgency=low The fix for AST-2009-006 breaks IAX2 line protocol by adding an extra step in the IAX2 handshaking. To allow working with unmodified IAX2 implementations, add the following two lines under [general] in iax.conf: calltokenoptional = 0.0.0.0/0.0.0.0 maxcallnumbers = 16382 -- Tzafrir Cohen Sun, 13 Sep 2009 00:25:09 +0300 asterisk (1:1.4.13~dfsg-1) unstable; urgency=medium Since this version, ODBC and IMAP storage for Voicemail are provided. As this could not be done as a runtime option, app_voicemail_odbc.so and app_voicemail_imap.so are provided. However, these conflict app_voicemail.so and each other. If you use a modified modules.conf and you have autoload enabled, you *must* add explicit noload entries for two of the three voicemail modules. -- Faidon Liambotis Mon, 03 Dec 2007 18:36:55 +0200 asterisk (1:1.4.2~dfsg-5) unstable; urgency=low There are significant configuration differences between asterisk 1.2.x & 1.4.x, please refer to the file /usr/share/doc/asterisk/UPGRADE.txt.gz for details. -- Mark Purcell Sat, 14 Apr 2007 16:44:18 +0100 asterisk (1:1.2.10.dfsg-1) unstable; urgency=low The iLBC codec library code has been removed from the Debian asterisk package as it does not conform with the DFSG. -- Mark Purcell Mon, 17 Jul 2006 21:15:50 +0100 asterisk (1:1.0.7.dfsg.1-1) unstable; urgency=low The Debian version of the upstream asterisk source has had the fpm Music on Hold removed as this music has only been licenced for use within asterisk which is incompatible with the Debian Free Software Guildlines . Please drop your alternative Music on Hold into the directory /usr/share/asterisk/mohmp3/ -- Mark Purcell Sun, 20 Mar 2005 10:30:44 +0000 debian/asterisk-ooh323.install0000664000000000000000000000005012254353232013414 0ustar usr/lib/asterisk/modules/chan_ooh323.so debian/safe_asterisk.80000664000000000000000000000347012254353233012112 0ustar .TH SAFE_ASTERISK 8 "Jun 30th, 2005" "Asterisk" "Linux Programmer's Manual" .SH NAME .B safe_asterisk \(em A wrapper to run the asterisk executable in a loop .SH SYNOPSIS .PP .B safe_asterisk .I [ asterisk_params ] .SH DESCRIPTION .B safe_asterisk is a script that runs asterisk in a loop, which can be useful if you fear asterisk may crash. The script does not run in the background like a standard service. Rather, it runs in its own linux virtual console (9, by default). It also uses the option '-c' of asterisk(8) to avoid detaching asterisk from that terminal. safe_asterisk also runs asterisk with unlimited core file size, and thus asterisk will dump core in case of a crash. To get a "picture" of console 9, from another terminal (e.g: from a remote shell session) you can use: screendump 9 The init script of the Debian package should be able to run safe_asterisk as the asterisk service, if so configured. See coments in /etc/default/asterisk .SH FILES .B /tmp .RS safe_asterisk runs in that directory, rather than in / as usual. .RE .B /tmp/core .RS If core files were generated there, they may be .RE .SH BUGS While showing the output on a console is useful, using screen(1) as the terminal may be better. The script does not read configuration from standard location under /etc It uses fixed locations under /tmp , and thus may be exposed to a symlink attacks. .SH SEE ALSO asterisk(8), screendump(9) .SH "AUTHOR" This manual page was written by Tzafrir Cohen Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. debian/README.Debian0000664000000000000000000002734312254353232011243 0ustar Welcome to the world of telephone switch owners. Asterisk is a quite powerful and probably one of the feature-richest open-source PBXes out there. To get you a brief impression where to start tweaking, we've included this doc. (Thanks to Tzafrir Cohen for a proposal of this) File Locations ============== See /etc/asterisk/asterisk.conf for pathnames. All the configuration is done from the *.conf files there. The astdatadir defaults to /usr/share/asterisk . This means that sounds reside at /usr/share/asterisk/sounds , music-on-hold files default to /usr/share/asterisk/moh ("directory=moh" in musiconhold.conf is relative to the astdatadir) and likewise for images. User, Groups, Permissions ========================= By default the package will create user and group 'asterisk' and will run as them. It will run with real-time priority (-p) by default. It will also add itself to the group audio to enable the daemon to access sound cards and to the group dialout to access Zaptel devices. Running as root is disabled in /etc/init.d/asterisk for security reasons. To change those values you can edit /etc/default/asterisk. Alternatively, edit /etc/asterisk/asterisk.conf . init.d Script Commands ====================== In addition to reload, that runs the asterisk CLI command 'reload' there are also extensions-reload ('extensions reload') and logger-reload ('logger-reload') to load only parts of the configuration file. Asterisk supports a number of non-default parameters at startup. For debugging it is often useful to run 'asterisk -U asterisk -vvvgc' from the console. Add more -v for even higher verbosity. You can attach a remote console to a running asterisk daemon with 'asterisk -vcr'. When testing, make sure to use the "-U asterisk", or asterisk may write files with root ownership. In that case you might not be able to restart the daemon without altering permissions to the files first. Alternatively use '/etc/init.d/asterisk debug'. Asterisk is run with a umask of 007 by default, to allow writing group-owned voicemail files. To change this value, set the value if 'UMASK' in /etc/default/asterisk . Getting started with config and more features ============================================= Of course the default config is far from a plug'n'play for every environment. You need to setup a proper dialplan in extensions.conf, remove the demo entries and maybe remove FreeWorldDialup too in case you don't participate there. For more info on how to setup a proper dialplan, fax, enum and configuration of asterisk, please checkout http://www.voip-info.org/wiki-Asterisk+quickstart http://www.voip-info.org/wiki-Asterisk+config+files or the larger HowTos at: http://www.automated.it/guidetoasterisk.htm or http://www.asteriskdocs.org/ (Asterisk Handbook) Open Files Limit ================ Asterisk uses one file-handle (and sometimes more) per call. Hence if you have many simultaneous calls, you often bump into the per-process limit of 1024 file handles, and get the error: "Too man open files". To enlarge that limit, set: MAXFILES in /etc/default/asterisk . As all settings from there, apply it with: /etc/init.d/asterisk restart International Sound Files ========================= This section is for those who use an alternative set of sound files rather than the default English ones recorded by Allison Smith. If you use those, and never needed to set LANGUAGE/language and such - all should work just fine. When Asterisk is asked to play 'some/file' it will search in the the following places on a Debian system (in whish the datadir is set to /usr/share/asterisk) /usr/share/sounds/${LANG_FULL}/some/file.TYPE /usr/share/sounds/${LANG}/some/file.TYPE /usr/share/sounds/some/file.TYPE /usr/share/sounds/en/some/file.TYPE TYPE is "the best available type" - the one that will take least encoding/decoding effort. This is why you normally don't specify the type of file to play. LANG_FULL is a complete name of a language. For instance "fr_FR", "de_CH" or "en_US". LANG is just the "major language" part of FULL_LANG -- only up to the first "_", if any. So in the above examples we would get "fr", "de" and "en". If the language is not set, only the last two are searched. Thus various sound file packages place their files under /usr/share/sounds/asterisk/xx_YY_g_Foobar, for sound files of set Foobar of language 'xx' and country 'YY', being voices of gender g ('m' for male and 'f' for female). They also provide the alternatives 'asterisk-prompt-xx' and 'asterisk-prompt-xx-yy' for the symlinks /usr/share/asterisk/sounds/xx and /usr/share/asterisk/sounds/xx_YY . If you have multiple such packages and want to change that selection, use: update-alternatives --config asterisk-prompt-xx Or: update-alternatives --config asterisk-prompt-xx-yy (TODO: document using an empty alternative directory for 'en' to have no fallback sounds) Voicemail ========= Asterisk has two separate implementations of the voicemail system: the original app_voicemail, and the newer minivm. Minivm is more modular (you can define your own voicemail IVRs). Though it only supports the simple files-backed voicemail storage. Voicemail has three separate backends: the simple files-based storage, a database storage ("ODBC") and a mail-server-backed one (IMAP). The latter two have some advantages of their own, but are more complicated to set up. Originally those three were three build-time variants. One of them had to be selected at build time. As of Wheezy (1.8), Debian provides those variants as three separate and conflicting sub-packages: astrisk-voicemail, astrisk-voicemail-imapstorage and asterisk-voicemail-odbcstorage. Each of them includes app_voicemail.so, though built with different options. Note that some previous versions (specifically the Squeeze 1.6.2 versions) included all three modules in the main package with different names. This required explicit 'noload' lines in /etc/asterisk/modules.conf . Those are no longer needed. Though you should make sure you have no leftover line 'noload => app_voicemail.so'. Also note that the debug information for the IMAP and ODBC voicemail modules has an incorrect name. This may mean that traces using them may have invalid information. Recommended and Suggested ========================= Asterisk includes various optional modules. The package asterisk-modules includes most of them (you can disable their load using noload in /etc/asterisk/modules.conf) yet some are still in their own sub-packages. Recommended ----------- * sox: Recommended as it is used by MoxMonitor - the default command for mixing the two recorded streams to a single audio file, and by app_voicemail/app_minivm to change gains of a mail message. * asterisk-voicemail: Seprated out to sub-packages as there are several implementations of app_voicemail (plain files storage, ODBC-interfaced database storage, IMAP-interfaced mail storage). Only one of those three could be installed. app_voicemail is normally expected to exist on an installation of Asterisk and hence it is recommended to include one of them. The simple file-based stoorage requires no extra setup, and hence is the defaulr. * asterisk-moh-opsound-gsm: Some relatively long and not too annoying music files in a format readable to Asterisk should reside in /usr/share/asterisk/moh . Asterisk will then play them when putting a call on hold for whatever reason (extra tuning: musiconhold.conf). This package is one such example sounds set. It is recommended in order for Asterisk to properly function as an elevator. Suggested --------- * asterisk-doc: Extra documentation. Including the sample config files. * asterisk-dev: Can be used to build external modules. * asterisk-ooh323: chan_ooh323c.so. A module for support of the H.323 protocol. An alternative to chan_h323.so. Seems to be in better shape and has a much smaller dependency set. * asterisk-dahdi: chan_dahdi.so and anything else that depends on DAHDI (MeetMe, res_timing_dahdi, codec_dahdi, and such). You should install this if you have DAHDI support (kernel-level) on your system. Others ------ * asterisk-h323: chan_h323.so. Maybe consider this instead of asterisk-ooh323, which upstream seems to prefer. * asterisk-mysql: Direct (non-ODBC) support for MySQL. * asterisk-mp3: Support for playing mp3 files * asterisk-mobile: chan_mobile: support for interfacing with bluetooth headsets/phones. Has its limitations. Missing Modules =============== The following modules are included in the source tree of Asterisk but were not built: * apps/app_fax.c: Disabled by default. Obsolete. res_fax does this now. * apps/app_ivrdemo.c: Disabled by default. Demo code. * apps/app_osplookup.c: osptk needed. * apps/app_rpt.c: Disabled by default. Not popular. Potential quality issues. * apps/app_saycounted.c: Disabled by default. * apps/app_skel.c: Disabled by default. Demo code. * channels/chan_misdn.c: mISDN (1.x) only included in Experimental. See package misdn-user. * channels/chan_nbs: NBS not included. Never packaged. Looks quite Asterisk specific and not really useful. * channels/chan_usbradio: Disabled by default. Not popular. Potential quality issues. * codecs/codec_ilbc.c: Disabled by default. Patent issues. * res/res_pktccops.c: Disabled by default. * res/res_timing_kqueue.c: Wrong kernel. You can compare that to the list of modules disabled by the Asterisk build system at build time, that is copied to /usr/share/doc/asterisk/menuselect.makeopts . Missing Documentation ===================== AST.pdf and AST.txt cannot be included due to incompatible license. You can get their content from http://wiki.asterisk.org . The standard reference is included, as always in the "sample" configuration files and in the help from the Asterisk command-line prompt. DAHDI PtMP NT ============= Short version: it doesn't work. This package includes an experimental patch to test the support for PtMP NT in chan_dahdi. This is needed to e.g. connect ISDN phones. Originally the code merely printed out "How cool would it be if someone implemented this mode!" and bailed out. This patch merely overrides it. At the moment it seems to provide at least basic support of ISDN phones (that is: of dialing out from a single ISDN phone). Likewise, on a loopback connection you can call from a TE port to the NT port but not vice versa. I figure that this would still be useful enough for some people, though. But in any case, please see http://bugs.digium.com/view.php?id=15048 . A Separate Instance =================== Upstream maintainers are not always so keen on helping users of binary packages. Sometimes a source build can be handy. However a simplistic 'make install' from a source distribution may not play along nicely with your existing packages. As a workaround for that, Asterisk includes a script called 'live_ast' to "install" Asterisk under the build root itself. # For the sake of this example, I assume you work under /home/getafisk . # get a version of asterisk: tarball, svn, whatever svn co http://svn.asterisk.org/svn/asterisk/trunk asterisk-svn cd asterisk-svn # grab the script. It's already in 1.6.2 and trunk, but let's get the # latest: wget http://svn.asterisk.org/svn/asterisk/trunk/contrib/scripts/live_ast chmod +x live_ast ./live_ast conf-file # edit live/live.conf . Unrem 'LIVE_AST_FOR_SYSTEM=yes' ./live_ast configure # ./configure ./live_ast install # make; make install DESTDIR=$PWD/live ./live_ast samples # As root: echo "DAEMON=/home/getafisk/live/asterisk" >> /etc/default/asterisk The last line makes your private copy the actual one to use. The magic is in /home/getafisk/live/etc/asterisk/asterisk.conf . If you need to update something in the source, just re-run the 'install' command. live/asterisk is a wrapper to that private copy of Asterisk. Enjoy your PBX! -- Lionel Elie Mamane , Fri, 29 Jul 2011 19:21:06 +0200 debian/copyright0000664000000000000000000004754412254353233011143 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: http://downloads.asterisk.org/pub/asterisk Upstream-Name: Asterisk Files: * Copyright: 1999-2012, Digium, Inc License: GPL-2-Asterisk Comment: This specifies the license used for most of Asterisk's files. Informally: GPL-2 with exceptions for linking with OpenSSL, OpenH323 and UW-Imap. Files: apps/app_fax.c Copyright: 2007-2008, Dmitry Andrianov License: GPL-2-Asterisk Files: utils/ael_main.c Copyright: 2006, Steve Murphy License: GPL-2-Asterisk Files: formats/msgsm.h Copyright: 1999, License: UNKNOWN Comment: Not clear. Created by Mark Specer (?) but derived from code by guido@sienanet.it. License should be GPL-2-Asterisk. Files: utils/frame.c utils/frame.h utils/stereorize.c Copyright: Mark Roberts Michael Labuschke License: GPL-2-Asterisk Comment: stereorize.c, frame.c and frame.h: originally from markdsp: http://web.archive.org/web/20060525134915/http://www.manumark.de/markdsp.html . Author notified by private mail: > Have you intended for that package to be released under a Free Software > license (basically: one that allows distribution and modification)? If > so, could you please provide a version of that source package licensed > under some standard free software license (GPL? LGPL? MIT?) . Thank you for your trouble. I intended the software to be free. GPL is fine. Please add the appropriate text to the file for me, in my name. Files: agi/eagi-sphinx-test.c agi/eagi-test.c Copyright: - License: public-domain This code is released into public domain without any warranty of any kind. Files: channels/console_gui.c Copyright: 2007-2008 Luigi Rizzo License: GPL-2-Asterisk Files: cdr/cdr_pgsql.c Copyright: 2003-2012 Matthew D. Hardeman License: GPL-2-Asterisk Files: apps/app_jack.c menuselect/menuselect.h menuselect/menuselect_curses.c menuselect/menuselect_stub.c Copyright: 2005-2006, Russell Bryant 2007-2008, Russell Bryant License: GPL-2-Asterisk Files: cdr/cdr_adaptive_odbc.c funcs/func_dialgroup.c funcs/func_global.c funcs/func_lock.c Copyright: 2006, Tilghman Lesher 2007, Tilghman Lesher License: GPL-2-Asterisk Files: addons/chan_ooh323.c addons/chan_ooh323.h addons/ooh323cDriver.c addons/ooh323cDriver.h Copyright: 2004-2005, Objective Systems, Inc License: GPL-2 This software is furnished under an open source license and may be used and copied only in accordance with the terms of this license. The text of the license may generally be found in the root directory of this installation in the COPYING file. . (On Debian systems you will find a copy of the GPL (version 2) at /usr/share/common-licenses/GPL-2). Files: apps/app_morsecode.c apps/app_verbose.c funcs/func_curl.c funcs/func_cut.c res/res_limit.c apps/app_sayunixtime.c Copyright: 2003-2006, Tilghman Lesher. License: GPL-2-Asterisk Comment: Files carry a different license. Author verified in private mail the new license. Should be updated in Upstream soon (and anyway, Digium has the legal right to relicense this code). Files: apps/app_exec.c Copyright: 2004-2005, Tilghman Lesher. 2006, Philipp Dunkel License: GPL-2-Asterisk Comment: See above comment. Files: apps/app_dictate.c apps/app_dumpchan.c main/slinfactory.c Copyright: 2004-2005, Anthony Minessale II 2005, Anthony Minessale II License: GPL-2-Asterisk Files: apps/app_mixmonitor.c funcs/func_cdr.c funcs/func_logic.c Copyright: 1999, - 2006, Digium, Inc 1999-2006, Digium, Inc 2005, Anthony Minessale II 2005-2006, Digium, Inc License: GPL-2-Asterisk Files: formats/format_g719.c formats/format_siren14.c formats/format_siren7.c Copyright: 1999, - 2008, Anthony Minessale and Digium, Inc 1999, - 2010, Anthony Minessale and Digium, Inc License: GPL-2-Asterisk Files: funcs/func_base64.c funcs/func_rand.c funcs/func_sha1.c Copyright: 2005, Claude Patry 2005-2006, Digium, Inc 2006, Claude Patry 2006, Digium, Inc License: GPL-2-Asterisk Files: main/data.c main/xml.c main/xmldoc.c Copyright: 2008, Eliel C. Sardanons (LU1ALY) 2009, Eliel C. Sardanons (LU1ALY) License: GPL-2-Asterisk Files: tests/test_abstract_jb.c tests/test_jitterbuf.c tests/test_voicemail_api.c Copyright: 2012, Matt Jordan License: GPL-2-Asterisk Files: addons/cdr_mysql.c Copyright: 2003 Tilghman Lesher 2005 Joseph Benden 2006 Martin Portmann License: GPL-2-Asterisk Files: addons/format_mp3.c Copyright: Anthony Minessale License: GPL-2-Asterisk Files: apps/app_skel.c tests/test_skel.c Copyright: , License: GPL-2-Asterisk Files: funcs/func_sprintf.c funcs/func_strings.c Copyright: 2005, Anthony Minessale II 2005, Tilghman Lesher. 2005-2006, Digium, Inc License: GPL-2-Asterisk Files: res/res_config_odbc.c res/res_odbc.c Copyright: 1999, - 2012, Digium, Inc 2004-2005, Anthony Minessale II License: GPL-2-Asterisk Files: main/abstract_jb.c main/fixedjitterbuf.c Copyright: 2005, Attractel OOD License: GPL-2-Asterisk Files: channels/chan_misdn.c channels/misdn_config.c Copyright: 2004, - 2006, Christian Richter 2005, Christian Richter License: GPL-2-Asterisk Files: tests/test_astobj2_thrash.c tests/test_hashtab_thrash.c Copyright: 2012, David M. Lee, II License: GPL-2-Asterisk Files: main/features.c res/res_corosync.c Copyright: 1999, - 2012, Digium, Inc 2007, Digium, Inc 2012, Russell Bryant License: GPL-2-Asterisk Files: channels/console_video.h channels/vgrabbers.c Copyright: 2007, Luigi Rizzo License: GPL-2-Asterisk Files: tests/test_dlinklists.c utils/refcounter.c Copyright: 2008, Steve Murphy License: GPL-2-Asterisk Files: res/res_config_sqlite3.c tests/test_linkedlists.c Copyright: 2011, Terry Wilson License: GPL-2-Asterisk Files: apps/app_readexten.c apps/app_saycounted.c Copyright: 2007-2008, Trinity College Computing Center 2008, Trinity College Computing Center License: GPL-2-Asterisk Files: cdr/cdr_syslog.c main/syslog.c Copyright: 2009, malleable, LLC License: GPL-2-Asterisk Files: main/ast_expr2.c main/ast_expr2.h Copyright: 1984, 1989-1990, 2000-2006 License: GPL-3+ with bison exception This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. . This special exception was added by the Free Software Foundation in version 2.2 of Bison. Files: apps/enter.h apps/leave.h Copyright: 1999, Mark Spencer and Linux Support Services License: UNKNOWN Comment: See https://issues.asterisk.org/jira/browse/ASTERISK-22568 . License should be GPL-2 by the count of being included in the source tree. The source is missing but could be programmatically reproduced: raw signed-linear audio file. Files: main/sha1.c include/asterisk/sha1.h Copyright: 2011 IETF Trust and the persons identified as authors of the code. License: BSD-3-clause - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . - Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: addons/mp3/* Copyright: 1995,1996,1997 by Michael Hipp License: GPL-2 you may use this source under GPL terms! . (On Debian systems you will find a copy of the GPL (version 2) at /usr/share/common-licenses/GPL-2). Comment: included in the patch mpglib Files: apps/app_sms.c Copyright: 2004-2005, Adrian Kennard, rights assigned to Digium License: GPL-2-Asterisk Files: apps/app_amd.c Copyright: 2003, - 2006, Aheeva Technology License: GPL-2-Asterisk Files: funcs/func_math.c Copyright: 2004, - 2006, Andy Powell License: GPL-2-Asterisk Files: addons/app_saycountpl.c Copyright: 2004, Andy Powell & TAAN Softworks Corp License: GPL-2-Asterisk Files: formats/format_sln.c Copyright: 1999, - 2005, Anthony Minessale License: GPL-2-Asterisk Files: apps/app_while.c Copyright: 2004-2005, Anthony Minessale License: GPL-2-Asterisk Files: apps/app_chanspy.c Copyright: 2005, - 2008, Digium, Inc 2005, Anthony Minessale II (anthmct@yahoo.com) License: GPL-2-Asterisk Files: apps/app_forkcdr.c Copyright: 1999, - 2005, Anthony Minessale anthmct@yahoo.com License: GPL-2-Asterisk Files: res/res_pktccops.c Copyright: 2009, Attila Domjan License: GPL-2-Asterisk Files: main/fixedjitterbuf.h Copyright: 2005, Attractel OOD on this file is disclaimed to Digium for inclusion in Asterisk License: GPL-2-Asterisk Files: channels/chan_vpb.cc Copyright: 2003, Paul Bagyenda 2004-2005, Ben Kramer License: GPL-2-Asterisk Files: channels/chan_unistim.c Copyright: 2005, - 2007, Cedric Hans License: GPL-2-Asterisk Files: apps/app_festival.c Copyright: 2002, Christos Ricudis License: GPL-2-Asterisk Files: addons/app_mysql.c Copyright: 2004, Constantine Filin and Christos Ricudis License: GPL-2 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. . (On Debian systems you will find a copy of the GPL (version 2) at /usr/share/common-licenses/GPL-2). Files: cel/cel_odbc.c Copyright: 2008, Digium License: GPL-2-Asterisk Files: apps/app_db.c Copyright: 1999, - 2005, Digium, Inc 2003, Jefferson Noxon License: GPL-2-Asterisk Files: funcs/func_md5.c Copyright: 2005, Olle E. Johansson, Edvina.net 2005, Russell Bryant 2005-2006, Digium, Inc License: GPL-2-Asterisk Files: res/res_config_ldap.c Copyright: 2005, Oxymium sarl 2007, Digium, Inc License: GPL-2-Asterisk Files: main/indications.c Copyright: 2002, Pauline Middelink 2009, Digium, Inc License: GPL-2-Asterisk Files: apps/app_originate.c Copyright: 2008, Digium, Inc 2008, Roberto Casas License: GPL-2-Asterisk Files: funcs/func_pitchshift.c Copyright: 1999-2009, Stephan M. Bernsee License: GPL-2-Asterisk Files: main/udptl.c Copyright: 1999-2009, Digium, Inc 2005, Steve Underwood, partly based on RTP code which is License: GPL-2-Asterisk Files: codecs/codec_ilbc.c Copyright: 1999, - 2005, Digium, Inc The Internet Society (2004) License: GPL-2-Asterisk Files: funcs/func_odbc.c Copyright: 2005-2006, Tilghman Lesher 2008-2009, Digium, Inc License: GPL-2-Asterisk Files: apps/app_directed_pickup.c Copyright: 2005, Joshua Colp 2008, Gary Cook License: GPL-2-Asterisk Files: cdr/cdr_sqlite.c Copyright: 2004-2005, Holger Schurig License: GPL-2-Asterisk Files: main/jitterbuf.c Copyright: 2004-2005, Horizon Wimba, Inc License: GPL-2-Asterisk Files: formats/format_ogg_vorbis.c Copyright: 2005, Jeff Ollie License: GPL-2-Asterisk Files: funcs/func_db.c Copyright: 2003, Jefferson Noxon 2005, Mark Spencer 2005-2006, Russell Bryant the following people License: GPL-2-Asterisk Files: main/dnsmgr.c Copyright: 2005-2006, Kevin P. Fleming License: GPL-2-Asterisk Files: tests/test_stringfields.c Copyright: 2009, Mark Michelson License: GPL-2-Asterisk Files: channels/console_board.c Copyright: 2007-2008, Marta Carbone, Luigi Rizzo License: GPL-2-Asterisk Files: main/astobj2.c Copyright: 2006, Marta Carbone, Luigi Rizzo - Univ. di Pisa, Italy License: GPL-2-Asterisk Files: channels/console_video.c Copyright: 2007-2008, Marta Carbone, Sergio Fadda, Luigi Rizzo License: GPL-2-Asterisk Files: res/res_srtp.c Copyright: 2005, Mikael Magnusson License: GPL-2-Asterisk Files: res/res_mutestream.c Copyright: 2009, Olle E. Johansson License: GPL-2-Asterisk Files: res/res_config_sqlite.c Copyright: 2006, Proformatique License: GPL-2-Asterisk Files: apps/app_waituntil.c Copyright: 2007, Redfish Solutions License: GPL-2-Asterisk Files: menuselect/menuselect_newt.c Copyright: 2008, Sean Bright License: GPL-2-Asterisk Files: apps/app_channelredirect.c Copyright: 2006, Sergey Basmanov License: GPL-2-Asterisk Files: channels/vcodecs.c Copyright: 2007-2008, Sergio Fadda, Luigi Rizzo License: GPL-2-Asterisk Files: apps/app_alarmreceiver.c Copyright: 2004-2005, Steve Rodgers License: GPL-2-Asterisk Files: main/plc.c Copyright: 2004, Steve Underwood License: GPL-2-Asterisk Files: funcs/func_iconv.c Copyright: 2005-2007, Sven Slezak License: GPL-2-Asterisk Files: main/dns.c Copyright: 1999, - 2006, Thorsten Lockert License: GPL-2-Asterisk Files: apps/app_stack.c Copyright: 2004-2006, Tilghman Lesher License: GPL-2-Asterisk Files: apps/app_followme.c funcs/func_realtime.c Copyright: 2005-2006, BJ Weschke. License: This code is released by the author with no restrictions on usage. Likewise here author clarified on private mail: "No limitations on redistribution and or redistribution of modified copies." and likewise Digium is allowed to relicense the code. Files: funcs/func_vmcount.c Copyright: 2006, Tilghman Lesher. License: GPL-2-Asterisk Files: res/res_snmp.c Copyright: 2006, Voop as License: GPL-2-Asterisk Files: formats/format_g726.c Copyright: 2004-2005, inAccess Networks License: GPL-2-Asterisk Files: main/md5.c Copyright: - License: public-domain This code implements the MD5 message-digest algorithm. The algorithm is due to Ron Rivest. This code was written by Colin Plumb in 1993, no copyright is claimed. This code is in the public domain; do with it what you wish. Files: main/poll.c Copyright: 1995-2002, Brian M. Clapper License: BSD-3-clause Redistribution and use in source and binary forms are permitted provided that: (1) source distributions retain this entire copyright notice and comment; (2) modifications made to the software are prominently mentioned, and a copy of the original software (or a pointer to its location) are included; and (3) distributions including binaries display the following acknowledgement: "This product includes software developed by Brian M. Clapper " in the documentation or other materials provided with the distribution. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Files: include/jitterbuf.h Copyright: 2004-2005, Horizon Wimba, Inc on this file is disclaimed to Digium for inclusion in Asterisk License: LGPL-2.1 This program is free software, distributed under the terms of the GNU Lesser (Library) General Public License . Copyright on this file is disclaimed to Digium for inclusion in Asterisk . (On Debian systems you will find a copy of the LGPL (version 2) at /usr/share/common-licenses/LGPL-2.1). Files: menuselect/menuselect_gtk.c Copyright: 2007\n"); License: UNKNOWN Comment: Likely GPL-2-Asterisk, according to VCS, as it was created by Digium employees. License: GPL-2-Asterisk Asterisk is distributed under the GNU General Public License version 2 and is also available under alternative licenses negotiated directly with Digium, Inc. If you obtained Asterisk under the GPL, then the GPL applies to all loadable Asterisk modules used on your system as well, except as defined below. The GPL (version 2) is included in this source tree in the file COPYING. . (On Debian systems you will find a copy of the GPL (version 2) at /usr/share/common-licenses/GPL-2). . This package also includes various components that are not part of Asterisk itself; these components are in the 'contrib' directory and its subdirectories. These components are also distributed under the GPL version 2 as well. . Digium, Inc. (formerly Linux Support Services) holds copyright and/or sufficient licenses to all components of the Asterisk package, and therefore can grant, at its sole discretion, the ability for companies, individuals, or organizations to create proprietary or Open Source (even if not GPL) modules which may be dynamically linked at runtime with the portions of Asterisk which fall under our copyright/license umbrella, or are distributed under more flexible licenses than GPL. . If you wish to use our code in other GPL programs, don't worry -- there is no requirement that you provide the same exception in your GPL'd products (although if you've written a module for Asterisk we would strongly encourage you to make the same exception that we do). . Specific permission is also granted to link Asterisk with OpenSSL, OpenH323 and/or the UW IMAP Toolkit and distribute the resulting binary files. . In addition, Asterisk implements two management/control protocols: the Asterisk Manager Interface (AMI) and the Asterisk Gateway Interface (AGI). It is our belief that applications using these protocols to manage or control an Asterisk instance do not have to be licensed under the GPL or a compatible license, as we believe these protocols do not create a 'derivative work' as referred to in the GPL. However, should any court or other judiciary body find that these protocols do fall under the terms of the GPL, then we hereby grant you a license to use these protocols in combination with Asterisk in external applications licensed under any license you wish. . The 'Asterisk' name and logos are trademarks owned by Digium, Inc., and use of them is subject to our trademark licensing policies. If you wish to use these trademarks for purposes other than simple redistribution of Asterisk source code obtained from Digium, you should contact our licensing department to determine the necessary steps you must take. For more information on this policy, please read: . http://www.digium.com/en/company/profile/trademarkpolicy.php debian/asterisk-vpb.install0000664000000000000000000000004512254353232013172 0ustar usr/lib/asterisk/modules/chan_vpb.so debian/astman.10000664000000000000000000000457212254353233010547 0ustar .\" $Header: /aolnet/dev/src/CVS/sgml/docbook-to-man/cmd/docbook-to-man.sh,v 1.1.1.1 1998/11/13 21:31:59 db3l Exp $ .\" .\" transcript compatibility for postscript use. .\" .\" synopsis: .P! .\" .de P! .fl \!!1 setgray .fl \\&.\" .fl \!!0 setgray .fl \" force out current output buffer \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog .sy sed \-e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" '\" t .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH ASTMAN 1 "Jun 12th, 2005" "astman" "Linux Programmer's Manual" .SH NAME .B astman -- a client to asterisk's manager interface .SH SYNOPSIS .PP .B astman .I hostname .SH DESCRIPTION .B astman This program is a full-screen (terminal) client for Asterisk's manager interface. .SH OPTIONS .B hostname The host name or IP address to connect to (TCP port 5038). If astman fails to connect it will exit immidiately. .SH USAGE If \fBastman\fR has successfully cunnected to the manager port it will prompt the user for a username and a secret (password) for the manager interface on the remote Asterisk manager interface. It will then be able to report existing channels (calls). You will then be able to redirect calls to or terminate them. .SH "SEE ALSO" asterisk(8) http://www.voip-info.org/wiki-Asterisk+astman .SH BUGS The hostname does not default to localhost. Impossible to use a port other than 5038. The username and password cannot be defined from the command-line. I mean, what's the point in a man page if the syntax is so simple? .SH "AUTHOR" This manual page was written by Tzafrir Cohen Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. debian/asterisk-voicemail.install0000664000000000000000000000005212254353233014352 0ustar usr/lib/asterisk/modules/app_voicemail.so debian/astgenkey.80000664000000000000000000000550012254353233011255 0ustar .\" $Header: /aolnet/dev/src/CVS/sgml/docbook-to-man/cmd/docbook-to-man.sh,v 1.1.1.1 1998/11/13 21:31:59 db3l Exp $ .\" .\" transcript compatibility for postscript use. .\" .\" synopsis: .P! .\" .de P! .fl \!!1 setgray .fl \\&.\" .fl \!!0 setgray .fl \" force out current output buffer \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog .sy sed \-e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" '\" t .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH ASTGENKEY 8 "May 14th, 2005" "Asterisk" "Linux Programmer's Manual" .SH NAME .B astgenkey -- generates keys for for Asterisk IAX2 RSA authentication .SH SYNOPSIS .PP .B astgenkey [ -q ] [ -n ] [ \fIkeyname\fP ] .SH DESCRIPTION .B genzaptelconf This script generates an RSA private and public key pair in PEM format for use by Asterisk. The private key should be kept a secret, as it can be used to fake your system's identity. Thus by default (without the option .I -n ) the script will create a passphrase-encrypted copy of your secret key: without entering the passphrase you won't be able to use it. However if you want to use such a key with Asterisk, you'll have to start it interactively, because the scripts that start asterisk can't use that encrypted key. The key is identified by a name. If you don't write the name on the command-line you'll be prompted for one. The outputs of the script are: .I name\fB.pub .RS The public key: not secret. Send this to the other side. .RE .I name\fB.key .RS The private key: secret. .RE Those files should be copied to .I /var/lib/asterisk/keys (The private key: on your system. The public key: on other systems) To see the currently-installed keys from the asterisk CLI, use the command .RS show keys .RE .SH OPTIONS .B -q .RS Run quietly. .RE .B -n .RS Don't encrypt the private key. .RE .SH FILES .I /var/lib/asterisk/keys .RS .RE .SH "SEE ALSO" asterisk(8), genrsa(1), rsa(1), http://www.voip-info.org/wiki-Asterisk+iax+rsa+auth .SH "AUTHOR" This manual page was written by Tzafrir Cohen Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. debian/asterisk.lintian-overrides0000664000000000000000000000022212254353232014372 0ustar asterisk: package-contains-empty-directory # astcanary is not supposed to be invoked manually asterisk: binary-without-manpage usr/sbin/astcanary debian/asterisk-mobile.install0000664000000000000000000000005012254353232013646 0ustar usr/lib/asterisk/modules/chan_mobile.so debian/asterisk.logrotate0000664000000000000000000000045112254353232012740 0ustar /var/log/asterisk/debug /var/log/asterisk/messages /var/log/asterisk/full /var/log/asterisk/*_log { weekly missingok rotate 4 sharedscripts postrotate /usr/sbin/invoke-rc.d asterisk logger-reload > /dev/null 2> /dev/null endscript } debian/backports/0000775000000000000000000000000012254353236011165 5ustar debian/backports/squeeze0000775000000000000000000000042512254353233012572 0ustar #!/bin/sh # Backport current Asterisk to (Squeeze + pkg-voip packages): # Remove any trace for Multi-Arch: sed -i -e 's/ \?\[linux-any\]//g' -e 's/linux-any/any/' debian/control # libgmime 2.6 -> 2.4 sed -i -e 's/libgmime-2.6-dev/libgmime-2.4-dev/g' debian/control exit 0 debian/backports/lenny0000775000000000000000000000051612254353233012237 0ustar #!/bin/sh # Backport current Asterisk to (Lenny + pkg-voip packages): sed -i -e 's#^ libcap-dev# libcap2-dev#' debian/control sed -i -e '/libresample1-dev/d' debian/control sed -i -e '/libsrtp0-dev/d' debian/control # Remove any trace for Multi-Arch: sed -i -e 's/ \?\[linux-any\]//g' -e 's/linux-any/any/' debian/control exit 0 debian/asterisk-voicemail-odbcstorage.install0000664000000000000000000000006612254353233016651 0ustar usr/lib/asterisk/modules/app_voicemail_odbcstorage.so debian/asterisk-dev.install0000664000000000000000000000010312254353233013155 0ustar usr/include/asterisk ../../include/asterisk.h usr/include/asterisk debian/asterisk.init0000664000000000000000000001265212254353233011712 0ustar #!/bin/sh # # asterisk start the asterisk PBX # (c) Mark Purcell # (c) Tzafrir Cohen # (c) Faidon Liambotis # # This package is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # ### BEGIN INIT INFO # Provides: asterisk # Required-Start: $remote_fs # Required-Stop: $remote_fs # Should-Start: $syslog $network $named mysql postgresql dahdi # Should-Stop: $syslog $network $named mysql postgresql # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Asterisk PBX # Description: Controls the Asterisk PBX ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin NAME=asterisk USER=$NAME GROUP=$USER DAEMON=/usr/sbin/$NAME CANARY=/usr/sbin/astcanary DESC="Asterisk PBX" PIDFILE="/var/run/asterisk/asterisk.pid" ASTSAFE_PIDFILE="/var/run/asterisk/asterisk_safe.pid" UMASK=007 # by default #MAXFILES=1024 # (the system default) . /lib/lsb/init-functions # by default: use real-time priority PARAMS="" CHDIR_PARM="" AST_REALTIME="yes" RUNASTERISK="yes" AST_DUMPCORE="no" AST_DUMPCORE_DIR="/var/spool/asterisk" # only used if AST_DUMPCORE != no # core_pattern. See: http://lxr.linux.no/source/Documentation/sysctl/kernel.txt #CORE_PATTERN= if [ -r /etc/default/$NAME ]; then . /etc/default/$NAME; fi if [ "$RUNASTERISK" != "yes" ];then echo "Asterisk not yet configured. Edit /etc/default/asterisk first." exit 0 fi if [ "$AST_REALTIME" != "no" ] then PARAMS="$PARAMS -p" fi if [ "$AST_DUMPCORE" != "no" ] then PARAMS="$PARAMS -g" if [ "$CORE_PATTERN" != '' ] then echo "$CORE_PATTERN" >/proc/sys/kernel/core_pattern fi if [ -d "$AST_DUMPCORE_DIR" ] then CHDIR_PARM="--chdir $AST_DUMPCORE_DIR" fi fi if [ "x$USER" = "x" ] then echo "Error: empty USER name" exit 1 fi if [ `id -u "$USER"` = 0 ] then echo "Starting as root not supported." exit 1 fi PARAMS="$PARAMS -U $USER" if [ "x$AST_DEBUG_PARAMS" = x ] then AST_DEBUG_PARAMS=-cvvvvvddddd fi if [ "$RUNASTSAFE" = "yes" ];then # The value of WRAPPER_DAEMON in can be set in /etc/default/asterisk WRAPPER_DAEMON=${WRAPPER_DAEMON:-/usr/sbin/safe_asterisk} REALDAEMON="$WRAPPER_DAEMON" else REALDAEMON="$DAEMON" fi test -x $DAEMON || exit 0 for dir in /var/run/asterisk /var/log/asterisk /var/log/asterisk/cdr-csv /var/log/asterisk/cdr-custom; do [ -d $dir ] || install -d -o $USER -g $GROUP $dir [ -x /sbin/restorecon ] && /sbin/restorecon $dir done #Make the device belong to the right user if [ -e /dev/dahdi ];then chown $USER:$GROUP /dev/dahdi/* fi set -e if [ "$UMASK" != '' ] then umask $UMASK fi # allow changing the per-process open files limit: if [ "$MAXFILES" != '' ] then ulimit -n $MAXFILES fi status() { status_of_proc -p "$PIDFILE" "$NAME" "$DESC" && return 0 || return $? } asterisk_rx() { if ! status >/dev/null; then return 0; fi # if $HOME is set, asterisk -rx writes a .asterisk_history there ( unset HOME $DAEMON -rx "$1" ) } case "$1" in debug) # we add too many special parameters that I don't want to skip # accidentally. I'm afraid that skipping -U once may cause # confusing results. I also want to maintain the user's choice # of -p echo "Debugging $DESC: " $DAEMON $PARAMS $AST_DEBUG_PARAMS exit 0 ;; start) if status > /dev/null; then echo "$DESC is already running. Use restart." exit 0 fi echo -n "Starting $DESC: " if [ "$RUNASTSAFE" != "yes" ];then # TODO: what if we cought the wrapper just as its asterisk # was killed? status should check for the wrapper if we're in # "safe mode" if status > /dev/null; then echo "$DESC is already running. Use restart." exit 0 fi export SAFE_AST_BACKGROUND=1 start-stop-daemon --start --group $GROUP --pidfile "$PIDFILE" \ $CHDIR_PARM \ --exec $REALDAEMON -- $PARAMS > /dev/null else start-stop-daemon --start --group $GROUP \ --background --make-pidfile \ $CHDIR_PARM --pidfile "$ASTSAFE_PIDFILE" \ --exec $REALDAEMON -- $PARAMS fi echo "$NAME." ;; stop) echo -n "Stopping $DESC: $NAME" # Try gracefully. # this may hang in some cases. Specifically, when the asterisk # processes is stopped. No bother to worry about cleanup: # it will either fail or die when asterisk dies. ( asterisk_rx 'core stop now' > /dev/null 2>&1 & ) & if [ "$RUNASTSAFE" = "yes" ];then start-stop-daemon --stop --quiet --oknodo \ --pidfile $ASTSAFE_PIDFILE rm -f $ASTSAFE_PIDFILE fi # just making sure it's really, really dead. # KILL is necessary just in case there's an asterisk -r in the background start-stop-daemon --stop --quiet --oknodo --retry=0/2/TERM/2/KILL/5 --exec $DAEMON start-stop-daemon --stop --quiet --oknodo --retry=0/2/TERM/2/KILL/5 --exec $CANARY echo "." ;; reload) echo "Reloading $DESC configuration files." asterisk_rx 'module reload' ;; logger-reload) asterisk_rx 'logger reload' ;; extensions-reload|dialplan-reload) echo "Reloading $DESC configuration files." asterisk_rx 'dialplan reload' ;; restart-convenient) asterisk_rx 'core restart when convenient' ;; restart|force-reload) $0 stop $0 start ;; status) status exit $? ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload}" >&2 exit 1 ;; esac exit 0 debian/asterisk.links0000664000000000000000000000030512254353233012057 0ustar usr/share/man/man8/asterisk.8 usr/share/man/man8/rasterisk.8 usr/local/share/asterisk/sounds usr/share/asterisk/sounds/custom var/lib/asterisk/sounds/custom usr/share/asterisk/sounds/recordings debian/asterisk-dahdi.install0000664000000000000000000000031312254353233013453 0ustar usr/lib/asterisk/modules/app_flash.so usr/lib/asterisk/modules/app_dahdiras.so usr/lib/asterisk/modules/chan_dahdi.so usr/lib/asterisk/modules/codec_dahdi.so usr/lib/asterisk/modules/res_timing_dahdi.so debian/clean0000664000000000000000000000016312254353233010177 0ustar aclocal.m4 doc/core-en_US.xml utils/poll.c menuselect/mxml/mxml.pc menuselect.makeopts menuselect/configure.lineno debian/asterisk-mysql.install0000664000000000000000000000017112254353233013551 0ustar usr/lib/asterisk/modules/app_mysql.so usr/lib/asterisk/modules/cdr_mysql.so usr/lib/asterisk/modules/res_config_mysql.so debian/dummyprogs/0000775000000000000000000000000012254353236011403 5ustar debian/dummyprogs/fetch0000775000000000000000000000055512254353233012424 0ustar #!/bin/sh # a dummy script that can serve as 'fetch' to pass for autoconf tests # but always returns false to make sure it is never used. # # Note: the configure script will look for wget first. If you actually # want to download sound tarballs or whatever at build time, make sure # you have wget installed, and this script should cause you no problems. exit 1 debian/ast_config/0000775000000000000000000000000012254353236011311 5ustar debian/ast_config/manager.conf0000664000000000000000000000055312254353233013572 0ustar ; ; Asterisk Call Management support ; ; By default asterisk will listen on localhost only. [general] enabled = yes port = 5038 bindaddr = 127.0.0.1 ; No access is allowed by default. ; To set a password, create a file in /etc/asterisk/manager.d ; use creative permission games to allow other serivces to create their own ; files #include "manager.d/*.conf" debian/ast_config/modules.conf0000664000000000000000000000361212254353233013627 0ustar ; ; Asterisk configuration file ; ; Module Loader configuration file ; [modules] autoload=yes ; ; Any modules that need to be loaded before the Asterisk core has been ; initialized (just after the logger has been initialized) can be loaded ; using 'preload'. This will frequently be needed if you wish to map all ; module configuration files into Realtime storage, since the Realtime ; driver will need to be loaded before the modules using those configuration ; files are initialized. ; ; An example of loading ODBC support would be: ;preload => res_odbc.so ;preload => res_config_odbc.so ; ; If you want, load the GTK console right away. ; Don't load the KDE console since ; it's not as sophisticated right now. ; noload => pbx_gtkconsole.so ;load => pbx_gtkconsole.so noload => pbx_kdeconsole.so ; ; Intercom application is obsoleted by ; chan_oss. Don't load it. ; noload => app_intercom.so ; ; The 'modem' channel driver and its subdrivers are ; obsolete, don't load them. ; noload => chan_modem.so noload => chan_modem_aopen.so noload => chan_modem_bestdata.so noload => chan_modem_i4l.so ; ; Comment this out (after installing CAPI middleware and hardware ; drivers) if you have CAPI-able hardware and wish to use it in ; Asterisk. ; noload => chan_capi.so ; load => res_musiconhold.so ; ; Load either OSS or ALSA, not both ; By default, load OSS only (automatically) and do not load ALSA ; noload => chan_alsa.so ;noload => chan_oss.so ; ; Disable CDR logging to SQLite by default since it writes unconditionally to ; cdr.db without a way to rotate it. ; noload => cdr_sqlite.so ; ; These conflict with app_directory.so and each other. noload => app_directory_odbc.so ; ; Enable these if you want to configure Asterisk in a database ; noload => res_config_odbc.so noload => res_config_pgsql.so ; ; Module names listed in "global" section will have symbols globally ; exported to modules loaded after them. ; [global] debian/asterisk-modules.install0000664000000000000000000000002112254353232014045 0ustar usr/lib/asterisk debian/asterisk.startup.conf0000664000000000000000000000211412254353233013365 0ustar # asterisk # # Upstart control file for the Asterisk PBX # # To install, rename this file to 'asterisk' and copy it to /etc/event.d/ # On Debian: copy to /etc/init/ # # To start asterisk manually: # sudo start asterisk # # To stop asterisk manually: # sudo stop asterisk # # Asterisk is started with an "interactive console", though redirected # to/from /dev/null . The concept of a main console is bad. OTOH, the main # process should not detach from the console if we work with upstart and # alike. # # The username 'asterisk' is currently hardwired here, and likewise the # varrundir. # description "Asterisk PBX" #version "1.6.3" start on runlevel [2345] stop on runlevel [!2345] pre-start script # Since Ubuntu clears /var/run on reboot, create this before we try to start if [ ! -d /var/run/asterisk ]; then mkdir -p asterisk /var/run/asterisk chown asterisk: /var/run/asterisk fi end script #console output respawn exec /usr/sbin/asterisk -U asterisk -g -f post-stop script # Might as well clean up after ourselves, too. rm -rf /var/run/asterisk end script debian/compat0000664000000000000000000000000212254353233010370 0ustar 8 debian/autosupport.80000664000000000000000000000246012254353232011671 0ustar .TH AUTOSUPPORT 8 "Jul 5th, 2005" "Asterisk" "Linux Programmer's Manual" .SH NAME .B autosupport \(em interactive script to provide Digium[tm]'s support with information .SH SYNOPSIS .PP .B autosupport .SH DESCRIPTION .B autoasupport is a script that is normally run by a user contacting Digium's support to automate gathering support information. It will probe the system for some configuration and run-time information, and will also prompt the user for some optional access information (IP address, login and password). The information is written to /root/digiuminfo which the user is expected to attach to a support ticket to Digium. The script must be run as root as it reads Asterisk's configuration and the disk information using hdparm(8). .SH FILES .B /root/digiuminfo .RS The output of the script goes there .RE .SH SEE ALSO asterisk(8) .SH "AUTHOR" autosupport was written by John Bigelow . This manual page was written by Tzafrir Cohen Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. debian/asterisk-config.postinst0000664000000000000000000000247012254353233014072 0ustar #! /bin/sh set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # case "$1" in configure) set +e # ignore errors temporarily # find conffiles under /etc/asterisk belonging to asterisk-config # and chown them to user asterisk. dpkg-query -W -f='${Conffiles}\n' asterisk-config 2>/dev/null | \ sed -nr -e 's; (/etc/asterisk/.*) [0-9a-f]*;\1;p' | \ while read conffile; do chown asterisk: ${conffile} 2>/dev/null done # handle them in the end with a glob since it's way faster dpkg-statoverride --quiet --list '/etc/asterisk/*' | while read STAT; do chown `echo $STAT | cut -d' ' -f 1,2,4 | sed 's/ /:/'` \ 2>/dev/null done set -e ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/asterisk-dev.links0000664000000000000000000000007012254353233012632 0ustar usr/include/asterisk/asterisk.h usr/include/asterisk.h