diff --git a/MAINTAINERS b/MAINTAINERS index 72bc91572d9..15f6e095cf1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7,6 +7,7 @@ # People listed here are managing the OpenWrt telephony feed. Use # alphabetical order when updating the list. +Daniel Golle Jiri Slachta Luka Perkov Mazi Lo diff --git a/README.md b/README.md new file mode 100644 index 00000000000..54fb978a9ca --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Telephony packages feed + +## Description + +This is an OpenWrt package feed containing community maintained telephony packages. + +## Usage + +To use these packages, add the following line to the feeds.conf +in the OpenWrt buildroot: + +``` +src-git telephony https://github.com/openwrt/telephony.git +``` + +This feed should be included and enabled by default in the OpenWrt buildroot. To install all its package definitions, run: + +``` +./scripts/feeds update telephony +./scripts/feeds install -a -p telephony +``` + +The telephony packages should now appear in menuconfig. diff --git a/admin/asterisk11-gui/Makefile b/admin/asterisk11-gui/Makefile deleted file mode 100644 index c21e43b20b6..00000000000 --- a/admin/asterisk11-gui/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=asterisk11-gui -PKG_VERSION:=2.1.0-rc1 -PKG_RELEASE:=4 - -PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk-gui/releases/ -PKG_SOURCE:=asterisk-gui-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=055bf2aaba365e696198925d039ac3cb -PKG_BUILD_DIR:=$(BUILD_DIR)/asterisk11-gui-$(PKG_VERSION) - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/asterisk11-gui - SECTION:=admin - CATEGORY:=Administration - TITLE:=Asterisk GUI for Asterisk 11.x - DEPENDS:=+@PACKAGE_asterisk11 +asterisk11-app-exec +asterisk11-app-system - VERSION:=$(PKG_VERSION) -endef - -define Package/asterisk11-gui/description - Asterisk11 GUI is a framework for the creation of graphical interfaces - for configuring Asterisk-11.x package. -endef - -EXTRA_CFLAGS:=$(TARGET_CPPFLAGS) -EXTRA_LDFLAGS:=$(TARGET_LDFLAGS) - -define Build/Prepare - rm -rf $(PKG_BUILD_DIR)/ - mkdir -p $(PKG_BUILD_DIR)/ - $(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1 - $(Build/Patch) -endef - -define Build/Configure - ( cd $(PKG_BUILD_DIR); ./bootstrap.sh ) - $(call Build/Configure/Default, \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --target=$(GNU_TARGET_NAME) \ - --prefix=/usr \ - --disable-nls \ - --disable-static \ - --localstatedir="/usr" \ - --sysconfdir="/etc" \ - ) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install -endef - -define Package/asterisk11-gui/install - $(INSTALL_DIR) $(1)/etc/asterisk/ - $(CP) ./files/gui_* $(1)/etc/asterisk/ - $(INSTALL_DIR) $(1)/usr/lib/asterisk/static-http - $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/static-http/* $(1)/usr/lib/asterisk/static-http - $(INSTALL_DIR) $(1)/usr/lib/asterisk/scripts - $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/scripts/* $(1)/usr/lib/asterisk/scripts - $(INSTALL_DIR) $(1)/usr/lib/asterisk/gui_backups -endef - -$(eval $(call BuildPackage,asterisk11-gui)) diff --git a/admin/asterisk11-gui/files/gui_http.conf b/admin/asterisk11-gui/files/gui_http.conf deleted file mode 100644 index 8679e3691ee..00000000000 --- a/admin/asterisk11-gui/files/gui_http.conf +++ /dev/null @@ -1,41 +0,0 @@ -; -; Asterisk Builtin mini-HTTP server -; -; -[general] -; -; Whether HTTP interface is enabled or not. Default is no. -; -enabled=yes -; -; Whether Asterisk should serve static content from http-static -; Default is no. -; -enablestatic=yes -; -; Address to bind to. Default is 0.0.0.0 -; -bindaddr=0.0.0.0 -; -; Port to bind to (default is 8088) -; -bindport=8088 -; -; Prefix allows you to specify a prefix for all requests -; to the server. The default is "asterisk" so that all -; requests must begin with /asterisk -; -;prefix=asterisk - -; The post_mappings section maps URLs to real paths on the filesystem. If a -; POST is done from within an authenticated manager session to one of the -; configured POST mappings, then any files in the POST will be placed in the -; configured directory. -; -;[post_mappings] -; -; In this example, if the prefix option is set to "asterisk", then using the -; POST URL: /asterisk/uploads will put files in /var/lib/asterisk/uploads/. -;uploads = /var/lib/asterisk/uploads/ -; - diff --git a/admin/asterisk11-gui/files/gui_manager.conf b/admin/asterisk11-gui/files/gui_manager.conf deleted file mode 100644 index 14fd58a6f18..00000000000 --- a/admin/asterisk11-gui/files/gui_manager.conf +++ /dev/null @@ -1,21 +0,0 @@ -; -; Asterisk Call Management support -; - -; By default asterisk will listen on localhost only. -[general] -enabled = yes -webenabled=yes -port = 5038 -bindaddr = 0.0.0.0 - -; 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 - -#[admin] -# secret = securePassword -# read = system,call,log,verbose,command,agent,config -# write = system,call,log,verbose,command,agent,config - diff --git a/admin/asterisk11-gui/files/gui_users.conf b/admin/asterisk11-gui/files/gui_users.conf deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/admin/asterisk18-gui/Makefile b/admin/asterisk18-gui/Makefile deleted file mode 100644 index 31dd22109d8..00000000000 --- a/admin/asterisk18-gui/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=asterisk18-gui -PKG_VERSION:=2.1.0-rc1 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk-gui/releases/ -PKG_SOURCE:=asterisk-gui-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=055bf2aaba365e696198925d039ac3cb -PKG_BUILD_DIR:=$(BUILD_DIR)/asterisk18-gui-$(PKG_VERSION) - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/asterisk18-gui - SECTION:=admin - CATEGORY:=Administration - TITLE:=Asterisk GUI for Asterisk 1.8.x - DEPENDS:=+@PACKAGE_asterisk18 +asterisk18-chan-local +asterisk18-app-exec +asterisk18-app-system - VERSION:=$(PKG_VERSION) -endef - -define Package/asterisk18-gui/description - Asterisk18 GUI is a framework for the creation of graphical interfaces - for configuring Asterisk-1.8.x package. -endef - -EXTRA_CFLAGS:=$(TARGET_CPPFLAGS) -EXTRA_LDFLAGS:=$(TARGET_LDFLAGS) - -define Build/Prepare - rm -rf $(PKG_BUILD_DIR)/ - mkdir -p $(PKG_BUILD_DIR)/ - $(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1 - $(Build/Patch) -endef - -define Build/Configure - ( cd $(PKG_BUILD_DIR); ./bootstrap.sh ) - $(call Build/Configure/Default, \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --target=$(GNU_TARGET_NAME) \ - --prefix=/usr \ - --disable-nls \ - --disable-static \ - --localstatedir="/usr" \ - --sysconfdir="/etc" \ - ) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install -endef - -define Package/asterisk18-gui/install - $(INSTALL_DIR) $(1)/etc/asterisk/ - $(CP) ./files/gui_* $(1)/etc/asterisk/ - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/asterisk-gui.init $(1)/etc/init.d/asterisk-gui - $(INSTALL_DIR) $(1)/usr/lib/asterisk/static-http - $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/static-http/* $(1)/usr/lib/asterisk/static-http - $(INSTALL_DIR) $(1)/usr/lib/asterisk/scripts - $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/scripts/* $(1)/usr/lib/asterisk/scripts - $(INSTALL_DIR) $(1)/usr/lib/asterisk/gui_backups -endef - -$(eval $(call BuildPackage,asterisk18-gui)) diff --git a/admin/asterisk18-gui/files/asterisk-gui.init b/admin/asterisk18-gui/files/asterisk-gui.init deleted file mode 100644 index b3e24d4c129..00000000000 --- a/admin/asterisk18-gui/files/asterisk-gui.init +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh /etc/rc.common -START=99 -start() { - [ ! -L /var/lib/asterisk ] && { - mkdir /var/lib -p - ln -sf /usr/lib/asterisk /var/lib/asterisk - } - } - -stop() { - [ -L /var/lib/asterisk ] && { - rm /var/lib/asterisk - } - } - -restart() { - stop - start - } - diff --git a/admin/asterisk18-gui/files/gui_http.conf b/admin/asterisk18-gui/files/gui_http.conf deleted file mode 100644 index 8679e3691ee..00000000000 --- a/admin/asterisk18-gui/files/gui_http.conf +++ /dev/null @@ -1,41 +0,0 @@ -; -; Asterisk Builtin mini-HTTP server -; -; -[general] -; -; Whether HTTP interface is enabled or not. Default is no. -; -enabled=yes -; -; Whether Asterisk should serve static content from http-static -; Default is no. -; -enablestatic=yes -; -; Address to bind to. Default is 0.0.0.0 -; -bindaddr=0.0.0.0 -; -; Port to bind to (default is 8088) -; -bindport=8088 -; -; Prefix allows you to specify a prefix for all requests -; to the server. The default is "asterisk" so that all -; requests must begin with /asterisk -; -;prefix=asterisk - -; The post_mappings section maps URLs to real paths on the filesystem. If a -; POST is done from within an authenticated manager session to one of the -; configured POST mappings, then any files in the POST will be placed in the -; configured directory. -; -;[post_mappings] -; -; In this example, if the prefix option is set to "asterisk", then using the -; POST URL: /asterisk/uploads will put files in /var/lib/asterisk/uploads/. -;uploads = /var/lib/asterisk/uploads/ -; - diff --git a/admin/asterisk18-gui/files/gui_manager.conf b/admin/asterisk18-gui/files/gui_manager.conf deleted file mode 100644 index 14fd58a6f18..00000000000 --- a/admin/asterisk18-gui/files/gui_manager.conf +++ /dev/null @@ -1,21 +0,0 @@ -; -; Asterisk Call Management support -; - -; By default asterisk will listen on localhost only. -[general] -enabled = yes -webenabled=yes -port = 5038 -bindaddr = 0.0.0.0 - -; 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 - -#[admin] -# secret = securePassword -# read = system,call,log,verbose,command,agent,config -# write = system,call,log,verbose,command,agent,config - diff --git a/admin/asterisk18-gui/files/gui_users.conf b/admin/asterisk18-gui/files/gui_users.conf deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libs/bcg729/Makefile b/libs/bcg729/Makefile index 7104a006f18..6a36c58bff4 100644 --- a/libs/bcg729/Makefile +++ b/libs/bcg729/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/linphone/plugins/sources/ -PKG_MD5SUM:=45e127a9a309aff94d3262d97b5aeab0 +PKG_MD5SUM:=5d0c160129c0850c43dd66c78efe429b PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL:=1 diff --git a/libs/dahdi-linux/Makefile b/libs/dahdi-linux/Makefile new file mode 100644 index 00000000000..7ae57bd30fd --- /dev/null +++ b/libs/dahdi-linux/Makefile @@ -0,0 +1,120 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=dahdi-linux +PKG_VERSION:=2.10.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/ +PKG_MD5SUM:=0281de245f4fa056f765ae2a6e1f1a4b + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Vittorio Gambaletta + +DAHDI_MODULES_EXTRA:= + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/dahdi + SUBMENU:=Voice over IP + TITLE:=DAHDI basic infrastructure + DEPENDS:=@USB_SUPPORT +kmod-lib-crc-ccitt + URL:=http://www.asterisk.org/ + FILES:= $(PKG_BUILD_DIR)/drivers/dahdi/dahdi.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoProbe,dahdi) +endef + +define KernelPackage/dahdi/description + This package contains DAHDI basic infrastructure. +endef + +define KernelPackage/dahdi-echocan-oslec + SUBMENU:=Voice over IP + TITLE:=DAHDI OSLEC echo canceller support + DEPENDS:=kmod-dahdi +kmod-echo + URL:=http://www.asterisk.org/ + FILES:=$(PKG_BUILD_DIR)/drivers/dahdi/dahdi_echocan_oslec.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoProbe,dahdi_echocan_oslec) +endef + +define KernelPackage/dahdi-echocan-oslec/description + This package contains DAHDI OSLEC echo canceller support. +endef + +define KernelPackage/dahdi-hfcs + SUBMENU:=Voice over IP + TITLE:=DAHDI driver for HFC-S PCI + DEPENDS:=@PCI_SUPPORT kmod-dahdi + URL:=http://sourceforge.net/projects/dahdi-hfcs/ + FILES:= $(PKG_BUILD_DIR)/drivers/dahdi/hfcs/dahdi_hfcs.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoProbe,dahdi_hfcs) +endef + +define KernelPackage/dahdi-hfcs/description + This package contains DAHDI driver for HFC-S based PCI BRI adapters. +endef + +define KernelPackage/dahdi-dummy + SUBMENU:=Voice over IP + TITLE:=dummy DAHDI driver + DEPENDS:=kmod-dahdi + URL:=http://www.asterisk.org/ + FILES:= $(PKG_BUILD_DIR)/drivers/dahdi/dahdi_dummy.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoProbe,dahdi_dummy) +endef + +define KernelPackage/dahdi-dummy/description + This package contains the dummy DAHDI driver providing only DAHDI timing + without any real telephony hardware. +endef + + +define Build/Configure +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Prepare + $(Build/Prepare/Default) + mkdir -p $(PKG_BUILD_DIR)/drivers/staging/echo/ + $(CP) ./files/oslec.h $(PKG_BUILD_DIR)/drivers/staging/echo/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + $(TARGET_CONFIGURE_OPTS) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + KERNELVERSION="$(KERNEL)" \ + KERNEL_VERSION="$(LINUX_VERSION)" \ + KERNELDIR="$(LINUX_DIR)" \ + KSRC:="$(LINUX_DIR)" \ + KVERS:="$(LINUX_VERSION)" \ + TOPDIR:="$(TOPDIR)" \ + INCLUDE_DIR:="$(INCLUDE_DIR)" \ + PWD:="$(PKG_BUILD_DIR)" \ + MODULES_EXTRA:="$(DAHDI_MODULES_EXTRA)" +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include/dahdi + $(CP) $(PKG_BUILD_DIR)/include/dahdi/dahdi_config.h $(1)/usr/include/dahdi/ + $(CP) $(PKG_BUILD_DIR)/include/dahdi/fasthdlc.h $(1)/usr/include/dahdi/ + $(CP) $(PKG_BUILD_DIR)/include/dahdi/kernel.h $(1)/usr/include/dahdi/ + $(CP) $(PKG_BUILD_DIR)/include/dahdi/user.h $(1)/usr/include/dahdi/ + $(CP) $(PKG_BUILD_DIR)/include/dahdi/wctdm_user.h $(1)/usr/include/dahdi/ +endef + +$(eval $(call KernelPackage,dahdi)) +$(eval $(call KernelPackage,dahdi-echocan-oslec)) +$(eval $(call KernelPackage,dahdi-dummy)) +$(eval $(call KernelPackage,dahdi-hfcs)) diff --git a/libs/dahdi-linux/files/oslec.h b/libs/dahdi-linux/files/oslec.h new file mode 100644 index 00000000000..f4175360ce2 --- /dev/null +++ b/libs/dahdi-linux/files/oslec.h @@ -0,0 +1,94 @@ +/* + * OSLEC - A line echo canceller. This code is being developed + * against and partially complies with G168. Using code from SpanDSP + * + * Written by Steve Underwood + * and David Rowe + * + * Copyright (C) 2001 Steve Underwood and 2007-2008 David Rowe + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, as + * published by the Free Software Foundation. + * + * 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, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifndef __OSLEC_H +#define __OSLEC_H + +/* Mask bits for the adaption mode */ +#define ECHO_CAN_USE_ADAPTION 0x01 +#define ECHO_CAN_USE_NLP 0x02 +#define ECHO_CAN_USE_CNG 0x04 +#define ECHO_CAN_USE_CLIP 0x08 +#define ECHO_CAN_USE_TX_HPF 0x10 +#define ECHO_CAN_USE_RX_HPF 0x20 +#define ECHO_CAN_DISABLE 0x40 + +/** + * oslec_state: G.168 echo canceller descriptor. + * + * This defines the working state for a line echo canceller. + */ +struct oslec_state; + +/** + * oslec_create - Create a voice echo canceller context. + * @len: The length of the canceller, in samples. + * @return: The new canceller context, or NULL if the canceller could not be + * created. + */ +struct oslec_state *oslec_create(int len, int adaption_mode); + +/** + * oslec_free - Free a voice echo canceller context. + * @ec: The echo canceller context. + */ +void oslec_free(struct oslec_state *ec); + +/** + * oslec_flush - Flush (reinitialise) a voice echo canceller context. + * @ec: The echo canceller context. + */ +void oslec_flush(struct oslec_state *ec); + +/** + * oslec_adaption_mode - set the adaption mode of a voice echo canceller context. + * @ec The echo canceller context. + * @adaption_mode: The mode. + */ +void oslec_adaption_mode(struct oslec_state *ec, int adaption_mode); + +void oslec_snapshot(struct oslec_state *ec); + +/** + * oslec_update: Process a sample through a voice echo canceller. + * @ec: The echo canceller context. + * @tx: The transmitted audio sample. + * @rx: The received audio sample. + * + * The return value is the clean (echo cancelled) received sample. + */ +int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx); + +/** + * oslec_hpf_tx: Process to high pass filter the tx signal. + * @ec: The echo canceller context. + * @tx: The transmitted auio sample. + * + * The return value is the HP filtered transmit sample, send this to your D/A. + */ +int16_t oslec_hpf_tx(struct oslec_state *ec, int16_t tx); + +#endif /* __OSLEC_H */ diff --git a/libs/dahdi-linux/patches/001-include-slab-h-in-oct612x-user-c.patch b/libs/dahdi-linux/patches/001-include-slab-h-in-oct612x-user-c.patch new file mode 100644 index 00000000000..4099cc093c7 --- /dev/null +++ b/libs/dahdi-linux/patches/001-include-slab-h-in-oct612x-user-c.patch @@ -0,0 +1,10 @@ +--- a/drivers/dahdi/oct612x/oct612x-user.c ++++ b/drivers/dahdi/oct612x/oct612x-user.c +@@ -22,6 +22,7 @@ + + #include + #include ++#include + + #include + diff --git a/libs/dahdi-linux/patches/003-fix-oslec-build.patch b/libs/dahdi-linux/patches/003-fix-oslec-build.patch new file mode 100644 index 00000000000..e052235b0a8 --- /dev/null +++ b/libs/dahdi-linux/patches/003-fix-oslec-build.patch @@ -0,0 +1,13 @@ +--- a/drivers/dahdi/Kbuild ++++ b/drivers/dahdi/Kbuild +@@ -61,9 +61,8 @@ obj-m += $(DAHDI_MODULES_EXTRA) + # If you want to build OSLEC, include the code in the standard location: + # drivers/staging/echo . The DAHDI OSLEC echo canceller will be built as + # well: +-ifneq (,$(wildcard $(src)/../staging/echo/echo.c)) ++ifneq (,$(wildcard $(src)/../staging/echo/oslec.h)) + obj-m += dahdi_echocan_oslec.o +-obj-m += ../staging/echo/echo.o + endif + + CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) diff --git a/libs/dahdi-linux/patches/050-re-enable-ztdummy.patch b/libs/dahdi-linux/patches/050-re-enable-ztdummy.patch new file mode 100644 index 00000000000..5db2dfe494f --- /dev/null +++ b/libs/dahdi-linux/patches/050-re-enable-ztdummy.patch @@ -0,0 +1,9 @@ +--- a/drivers/dahdi/Kbuild ++++ b/drivers/dahdi/Kbuild +@@ -1,5 +1,5 @@ + obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI) += dahdi.o +-#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DUMMY) += dahdi_dummy.o ++obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DUMMY) += dahdi_dummy.o + obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC) += dahdi_dynamic.o + obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_LOC) += dahdi_dynamic_loc.o + obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETH) += dahdi_dynamic_eth.o diff --git a/libs/dahdi-linux/patches/100-add-support-for-hfc-s-pci.patch b/libs/dahdi-linux/patches/100-add-support-for-hfc-s-pci.patch new file mode 100644 index 00000000000..b5535dd3a9a --- /dev/null +++ b/libs/dahdi-linux/patches/100-add-support-for-hfc-s-pci.patch @@ -0,0 +1,2732 @@ +--- a/drivers/dahdi/Kbuild ++++ b/drivers/dahdi/Kbuild +@@ -13,6 +13,7 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT + obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp/ + obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE12XP) += wcte12xp/ + obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE13XP) += wcte13xp.o ++obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_HFCS) += hfcs/ + + wcte13xp-objs := wcte13xp-base.o wcxb_spi.o wcxb.o wcxb_flash.o + CFLAGS_wcte13xp-base.o += -I$(src)/oct612x -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi -I$(src)/oct612x/octdeviceapi/oct6100api +--- a/drivers/dahdi/Kconfig ++++ b/drivers/dahdi/Kconfig +@@ -291,4 +291,14 @@ config DAHDI_WCTE11XP + + If unsure, say Y. + ++config DAHDI_HFCS ++ tristate "Support for various HFC-S PCI BRI adapters" ++ depends on DAHDI && PCI ++ default DAHDI ++ ---help--- ++ To compile this driver as a module, choose M here: the ++ module will be called dahdi_hfcs. ++ ++ If unsure, say Y. ++ + source "drivers/dahdi/xpp/Kconfig" +--- /dev/null ++++ b/drivers/dahdi/hfcs/base.c +@@ -0,0 +1,1742 @@ ++/* ++ * dahdi_hfcs.c - Dahdi driver for HFC-S PCI A based ISDN BRI cards ++ * ++ * Dahdi rewrite in hardhdlc mode ++ * Jose A. Deniz ++ * ++ * Copyright (C) 2011, Raoul Bönisch ++ * Copyright (C) 2009, Jose A. Deniz ++ * Copyright (C) 2006, headissue GmbH; Jens Wilke ++ * Copyright (C) 2004 Daniele Orlandi ++ * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH ++ * ++ * Jens Wilke ++ * ++ * Original author of this code is ++ * Daniele "Vihai" Orlandi ++ * ++ * Major rewrite of the driver made by ++ * Klaus-Peter Junghanns ++ * ++ * This program is free software and may be modified and ++ * distributed under the terms of the GNU Public License. ++ * ++ * Please read the README file for important infos. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32)) ++#include ++#endif ++#include ++#include ++ ++#include ++ ++#include "dahdi_hfcs.h" ++#include "fifo.h" ++ ++#if CONFIG_PCI ++ ++#define DAHDI_B1 0 ++#define DAHDI_B2 1 ++#define DAHDI_D 2 ++ ++#define D 0 ++#define B1 1 ++#define B2 2 ++ ++/* ++ * Mode Te for all ++ */ ++static int modes; ++static int nt_modes[hfc_MAX_BOARDS]; ++static int nt_modes_count; ++static int force_l1_up; ++static struct proc_dir_entry *hfc_proc_dahdi_hfcs_dir; ++ ++#define DEBUG ++#ifdef DEBUG ++int debug_level; ++#endif ++ ++#ifndef FALSE ++#define FALSE 0 ++#endif ++#ifndef TRUE ++#define TRUE (!FALSE) ++#endif ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) ++#define SET_PROC_DIRENTRY_OWNER(p) do { (p)->owner = THIS_MODULE; } while(0); ++#else ++#define SET_PROC_DIRENTRY_OWNER(p) do { } while(0); ++#endif ++ ++static DEFINE_PCI_DEVICE_TABLE(hfc_pci_ids) = { ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_2BD0, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B000, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B006, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B007, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B008, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B009, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00A, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_A1T, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_ANIGMA, PCI_DEVICE_ID_ANIGMA_MC145575, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_ZOLTRIX, PCI_DEVICE_ID_ZOLTRIX_2BD0, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_E, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_E, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_A, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_A, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {PCI_VENDOR_ID_SITECOM, PCI_DEVICE_ID_SITECOM_3069, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ++ {0,} ++}; ++ ++MODULE_DEVICE_TABLE(pci, hfc_pci_ids); ++ ++static int __devinit hfc_probe(struct pci_dev *dev ++ , const struct pci_device_id *ent); ++static void __devexit hfc_remove(struct pci_dev *dev); ++ ++static struct pci_driver hfc_driver = { ++ .name = hfc_DRIVER_NAME, ++ .id_table = hfc_pci_ids, ++ .probe = hfc_probe, ++ .remove = __devexit_p(hfc_remove), ++}; ++ ++/****************************************** ++ * HW routines ++ ******************************************/ ++ ++static void hfc_softreset(struct hfc_card *card) ++{ ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ "card %d: " ++ "resetting\n", ++ card->cardnum); ++ ++/* ++ * Softreset procedure. Put it on, wait and off again ++ */ ++ hfc_outb(card, hfc_CIRM, hfc_CIRM_RESET); ++ udelay(6); ++ hfc_outb(card, hfc_CIRM, 0); ++ ++ set_current_state(TASK_UNINTERRUPTIBLE); ++ schedule_timeout((hfc_RESET_DELAY * HZ) / 1000); ++} ++ ++static void hfc_resetCard(struct hfc_card *card) ++{ ++ card->regs.m1 = 0; ++ hfc_outb(card, hfc_INT_M1, card->regs.m1); ++ ++ card->regs.m2 = 0; ++ hfc_outb(card, hfc_INT_M2, card->regs.m2); ++ ++ hfc_softreset(card); ++ ++ card->regs.trm = 0; ++ hfc_outb(card, hfc_TRM, card->regs.trm); ++ ++ /* ++ * Select the non-capacitive line mode for the S/T interface ++ */ ++ card->regs.sctrl = hfc_SCTRL_NONE_CAP; ++ ++ if (card->nt_mode) { ++ /* ++ * ST-Bit delay for NT-Mode ++ */ ++ hfc_outb(card, hfc_CLKDEL, hfc_CLKDEL_NT); ++ ++ card->regs.sctrl |= hfc_SCTRL_MODE_NT; ++ } else { ++ /* ++ * ST-Bit delay for TE-Mode ++ */ ++ hfc_outb(card, hfc_CLKDEL, hfc_CLKDEL_TE); ++ ++ card->regs.sctrl |= hfc_SCTRL_MODE_TE; ++ } ++ ++ hfc_outb(card, hfc_SCTRL, card->regs.sctrl); ++ ++ /* ++ * S/T Auto awake ++ */ ++ card->regs.sctrl_e = hfc_SCTRL_E_AUTO_AWAKE; ++ hfc_outb(card, hfc_SCTRL_E, card->regs.sctrl_e); ++ ++ /* ++ * No B-channel enabled at startup ++ */ ++ card->regs.sctrl_r = 0; ++ hfc_outb(card, hfc_SCTRL_R, card->regs.sctrl_r); ++ ++ /* ++ * HFC Master Mode ++ */ ++ hfc_outb(card, hfc_MST_MODE, hfc_MST_MODE_MASTER); ++ ++ /* ++ * Connect internal blocks ++ */ ++ card->regs.connect = ++ hfc_CONNECT_B1_HFC_from_ST | ++ hfc_CONNECT_B1_ST_from_HFC | ++ hfc_CONNECT_B1_GCI_from_HFC | ++ hfc_CONNECT_B2_HFC_from_ST | ++ hfc_CONNECT_B2_ST_from_HFC | ++ hfc_CONNECT_B2_GCI_from_HFC; ++ hfc_outb(card, hfc_CONNECT, card->regs.connect); ++ ++ /* ++ * All bchans are HDLC by default, not useful, actually ++ * since mode is set during open() ++ */ ++ hfc_outb(card, hfc_CTMT, 0); ++ ++ /* ++ * bit order ++ */ ++ hfc_outb(card, hfc_CIRM, 0); ++ ++ /* ++ * Enable D-rx FIFO. At least one FIFO must be enabled (by specs) ++ */ ++ card->regs.fifo_en = hfc_FIFOEN_DRX; ++ hfc_outb(card, hfc_FIFO_EN, card->regs.fifo_en); ++ ++ card->late_irqs = 0; ++ ++ /* ++ * Clear already pending ints ++ */ ++ hfc_inb(card, hfc_INT_S1); ++ hfc_inb(card, hfc_INT_S2); ++ ++ /* ++ * Enable IRQ output ++ */ ++ card->regs.m1 = hfc_INTS_DREC | hfc_INTS_L1STATE | hfc_INTS_TIMER; ++ hfc_outb(card, hfc_INT_M1, card->regs.m1); ++ ++ card->regs.m2 = hfc_M2_IRQ_ENABLE; ++ hfc_outb(card, hfc_INT_M2, card->regs.m2); ++ ++ /* ++ * Unlocks the states machine ++ */ ++ hfc_outb(card, hfc_STATES, 0); ++ ++ /* ++ * There's no need to explicitly activate L1 now. ++ * Activation is managed inside the interrupt routine. ++ */ ++} ++ ++static void hfc_update_fifo_state(struct hfc_card *card) ++{ ++ /* ++ * I'm not sure if irqsave is needed but there could be a race ++ * condition since hfc_update_fifo_state could be called from ++ * both the IRQ handler and the *_(open|close) functions ++ */ ++ ++ unsigned long flags; ++ spin_lock_irqsave(&card->chans[B1].lock, flags); ++ if (!card->fifo_suspended && ++ (card->chans[B1].status == open_framed || ++ card->chans[B1].status == open_voice)) { ++ ++ if (!(card->regs.fifo_en & hfc_FIFOEN_B1RX)) { ++ card->regs.fifo_en |= hfc_FIFOEN_B1RX; ++ hfc_clear_fifo_rx(&card->chans[B1].rx); ++ } ++ ++ if (!(card->regs.fifo_en & hfc_FIFOEN_B1TX)) { ++ card->regs.fifo_en |= hfc_FIFOEN_B1TX; ++ hfc_clear_fifo_tx(&card->chans[B1].tx); ++ } ++ } else { ++ if (card->regs.fifo_en & hfc_FIFOEN_B1RX) ++ card->regs.fifo_en &= ~hfc_FIFOEN_B1RX; ++ if (card->regs.fifo_en & hfc_FIFOEN_B1TX) ++ card->regs.fifo_en &= ~hfc_FIFOEN_B1TX; ++ } ++ spin_unlock_irqrestore(&card->chans[B1].lock, flags); ++ ++ spin_lock_irqsave(&card->chans[B2].lock, flags); ++ if (!card->fifo_suspended && ++ (card->chans[B2].status == open_framed || ++ card->chans[B2].status == open_voice || ++ card->chans[B2].status == sniff_aux)) { ++ ++ if (!(card->regs.fifo_en & hfc_FIFOEN_B2RX)) { ++ card->regs.fifo_en |= hfc_FIFOEN_B2RX; ++ hfc_clear_fifo_rx(&card->chans[B2].rx); ++ } ++ ++ if (!(card->regs.fifo_en & hfc_FIFOEN_B2TX)) { ++ card->regs.fifo_en |= hfc_FIFOEN_B2TX; ++ hfc_clear_fifo_tx(&card->chans[B2].tx); ++ } ++ } else { ++ if (card->regs.fifo_en & hfc_FIFOEN_B2RX) ++ card->regs.fifo_en &= ~hfc_FIFOEN_B2RX; ++ if (card->regs.fifo_en & hfc_FIFOEN_B2TX) ++ card->regs.fifo_en &= ~hfc_FIFOEN_B2TX; ++ } ++ spin_unlock_irqrestore(&card->chans[B2].lock, flags); ++ ++ spin_lock_irqsave(&card->chans[D].lock, flags); ++ if (!card->fifo_suspended && ++ card->chans[D].status == open_framed) { ++ ++ if (!(card->regs.fifo_en & hfc_FIFOEN_DTX)) { ++ card->regs.fifo_en |= hfc_FIFOEN_DTX; ++ ++ card->chans[D].tx.ugly_framebuf_size = 0; ++ card->chans[D].tx.ugly_framebuf_off = 0; ++ } ++ } else { ++ if (card->regs.fifo_en & hfc_FIFOEN_DTX) ++ card->regs.fifo_en &= ~hfc_FIFOEN_DTX; ++ } ++ spin_unlock_irqrestore(&card->chans[D].lock, flags); ++ ++ hfc_outb(card, hfc_FIFO_EN, card->regs.fifo_en); ++} ++ ++static inline void hfc_suspend_fifo(struct hfc_card *card) ++{ ++ card->fifo_suspended = TRUE; ++ ++ hfc_update_fifo_state(card); ++ ++ /* ++ * When L1 goes down D rx receives garbage; it is nice to ++ * clear it to avoid a CRC error on reactivation ++ * udelay is needed because the FIFO deactivation happens ++ * in 250us ++ */ ++ udelay(250); ++ hfc_clear_fifo_rx(&card->chans[D].rx); ++ ++#ifdef DEBUG ++ if (debug_level >= 3) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "FIFOs suspended\n", ++ card->cardnum); ++ } ++#endif ++} ++ ++static inline void hfc_resume_fifo(struct hfc_card *card) ++{ ++ card->fifo_suspended = FALSE; ++ ++ hfc_update_fifo_state(card); ++ ++#ifdef DEBUG ++ if (debug_level >= 3) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "FIFOs resumed\n", ++ card->cardnum); ++ } ++#endif ++} ++ ++static void hfc_check_l1_up(struct hfc_card *card) ++{ ++ if ((!card->nt_mode && card->l1_state != 7) ++ || (card->nt_mode && card->l1_state != 3)) { ++ ++ hfc_outb(card, hfc_STATES, hfc_STATES_DO_ACTION | ++ hfc_STATES_ACTIVATE| ++ hfc_STATES_NT_G2_G3); ++ ++ /* ++ * 0 because this is quite verbose when an inferface is unconnected, jaw ++ */ ++#if 0 ++ if (debug_level >= 1) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "L1 is down, bringing up L1.\n", ++ card->cardnum); ++ } ++#endif ++ } ++} ++ ++ ++/******************* ++ * Dahdi interface * ++ *******************/ ++ ++static int hfc_dahdi_open(struct dahdi_chan *dahdi_chan) ++{ ++ struct hfc_chan_duplex *chan = dahdi_chan->pvt; ++ struct hfc_card *card = chan->card; ++ ++ spin_lock(&chan->lock); ++ ++ switch (chan->number) { ++ case D: ++ if (chan->status != free && ++ chan->status != open_framed) { ++ spin_unlock(&chan->lock); ++ return -EBUSY; ++ } ++ chan->status = open_framed; ++ break; ++ ++ case B1: ++ case B2: ++ if (chan->status != free) { ++ spin_unlock(&chan->lock); ++ return -EBUSY; ++ } ++ chan->status = open_voice; ++ break; ++ } ++ ++ chan->open_by_dahdi = TRUE; ++ try_module_get(THIS_MODULE); ++ spin_unlock(&chan->lock); ++ ++ switch (chan->number) { ++ case D: ++ break; ++ ++ case B1: ++ card->regs.m2 |= hfc_M2_PROC_TRANS; ++ /* ++ * Enable transparent mode ++ */ ++ card->regs.ctmt |= hfc_CTMT_TRANSB1; ++ /* ++ * Reversed bit order ++ */ ++ card->regs.cirm |= hfc_CIRM_B1_REV; ++ /* ++ * Enable transmission ++ */ ++ card->regs.sctrl |= hfc_SCTRL_B1_ENA; ++ /* ++ * Enable reception ++ */ ++ card->regs.sctrl_r |= hfc_SCTRL_R_B1_ENA; ++ break; ++ ++ case B2: ++ card->regs.m2 |= hfc_M2_PROC_TRANS; ++ card->regs.ctmt |= hfc_CTMT_TRANSB2; ++ card->regs.cirm |= hfc_CIRM_B2_REV; ++ card->regs.sctrl |= hfc_SCTRL_B2_ENA; ++ card->regs.sctrl_r |= hfc_SCTRL_R_B2_ENA; ++ break; ++ ++ } ++ ++ /* ++ * If not already enabled, enable processing transition (8KHz) ++ * interrupt ++ */ ++ hfc_outb(card, hfc_INT_M2, card->regs.m2); ++ hfc_outb(card, hfc_CTMT, card->regs.ctmt); ++ hfc_outb(card, hfc_CIRM, card->regs.cirm); ++ hfc_outb(card, hfc_SCTRL, card->regs.sctrl); ++ hfc_outb(card, hfc_SCTRL_R, card->regs.sctrl_r); ++ ++ hfc_update_fifo_state(card); ++ ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s opened as %s.\n", ++ card->cardnum, ++ chan->name, ++ dahdi_chan->name); ++ ++ return 0; ++} ++ ++static int hfc_dahdi_close(struct dahdi_chan *dahdi_chan) ++{ ++ struct hfc_chan_duplex *chan = dahdi_chan->pvt; ++ struct hfc_card *card = chan->card; ++ ++ if (!card) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "hfc_dahdi_close called with NULL card\n"); ++ return -1; ++ } ++ ++ spin_lock(&chan->lock); ++ ++ if (chan->status == free) { ++ spin_unlock(&chan->lock); ++ return -EINVAL; ++ } ++ ++ chan->status = free; ++ chan->open_by_dahdi = FALSE; ++ ++ spin_unlock(&chan->lock); ++ ++ switch (chan->number) { ++ case D: ++ break; ++ ++ case B1: ++ card->regs.ctmt &= ~hfc_CTMT_TRANSB1; ++ card->regs.cirm &= ~hfc_CIRM_B1_REV; ++ card->regs.sctrl &= ~hfc_SCTRL_B1_ENA; ++ card->regs.sctrl_r &= ~hfc_SCTRL_R_B1_ENA; ++ break; ++ ++ case B2: ++ card->regs.ctmt &= ~hfc_CTMT_TRANSB2; ++ card->regs.cirm &= ~hfc_CIRM_B2_REV; ++ card->regs.sctrl &= ~hfc_SCTRL_B2_ENA; ++ card->regs.sctrl_r &= ~hfc_SCTRL_R_B2_ENA; ++ break; ++ } ++ ++ if (card->chans[B1].status == free && ++ card->chans[B2].status == free) ++ card->regs.m2 &= ~hfc_M2_PROC_TRANS; ++ ++ hfc_outb(card, hfc_INT_M2, card->regs.m2); ++ hfc_outb(card, hfc_CTMT, card->regs.ctmt); ++ hfc_outb(card, hfc_CIRM, card->regs.cirm); ++ hfc_outb(card, hfc_SCTRL, card->regs.sctrl); ++ hfc_outb(card, hfc_SCTRL_R, card->regs.sctrl_r); ++ ++ hfc_update_fifo_state(card); ++ ++ module_put(THIS_MODULE); ++ ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s closed as %s.\n", ++ card->cardnum, ++ chan->name, ++ dahdi_chan->name); ++ ++ return 0; ++} ++ ++static int hfc_dahdi_rbsbits(struct dahdi_chan *chan, int bits) ++{ ++ return 0; ++} ++ ++static int hfc_dahdi_ioctl(struct dahdi_chan *chan, ++ unsigned int cmd, unsigned long data) ++{ ++ switch (cmd) { ++ ++ default: ++ return -ENOTTY; ++ } ++ ++ return 0; ++} ++ ++static void hfc_hdlc_hard_xmit(struct dahdi_chan *d_chan) ++{ ++ struct hfc_chan_duplex *chan = d_chan->pvt; ++ struct hfc_card *card = chan->card; ++ struct dahdi_hfc *hfccard = card->dahdi_dev; ++ ++ atomic_inc(&hfccard->hdlc_pending); ++ ++} ++ ++static int hfc_dahdi_startup(struct file *file, struct dahdi_span *span) ++{ ++ struct dahdi_hfc *dahdi_hfcs = dahdi_hfc_from_span(span); ++ struct hfc_card *hfctmp = dahdi_hfcs->card; ++ int alreadyrunning; ++ ++ if (!hfctmp) { ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ "card %d: " ++ "no card for span at startup!\n", ++ hfctmp->cardnum); ++ } ++ ++ alreadyrunning = span->flags & DAHDI_FLAG_RUNNING; ++ ++ if (!alreadyrunning) ++ span->flags |= DAHDI_FLAG_RUNNING; ++ ++ return 0; ++} ++ ++static int hfc_dahdi_shutdown(struct dahdi_span *span) ++{ ++ return 0; ++} ++ ++static int hfc_dahdi_maint(struct dahdi_span *span, int cmd) ++{ ++ return 0; ++} ++ ++static int hfc_dahdi_chanconfig(struct file *file, struct dahdi_chan *d_chan, int sigtype) ++{ ++ struct hfc_chan_duplex *chan = d_chan->pvt; ++ struct hfc_card *card = chan->card; ++ struct dahdi_hfc *hfccard = card->dahdi_dev; ++ ++ if ((sigtype == DAHDI_SIG_HARDHDLC) && (hfccard->sigchan == d_chan)) { ++ hfccard->sigactive = 0; ++ atomic_set(&hfccard->hdlc_pending, 0); ++ } ++ ++ return 0; ++} ++ ++static int hfc_dahdi_spanconfig(struct file *file, struct dahdi_span *span, ++ struct dahdi_lineconfig *lc) ++{ ++ span->lineconfig = lc->lineconfig; ++ ++ return 0; ++} ++ ++static const struct dahdi_span_ops hfc_dahdi_span_ops = { ++ .owner = THIS_MODULE, ++ .chanconfig = hfc_dahdi_chanconfig, ++ .spanconfig = hfc_dahdi_spanconfig, ++ .startup = hfc_dahdi_startup, ++ .shutdown = hfc_dahdi_shutdown, ++ .maint = hfc_dahdi_maint, ++ .rbsbits = hfc_dahdi_rbsbits, ++ .open = hfc_dahdi_open, ++ .close = hfc_dahdi_close, ++ .ioctl = hfc_dahdi_ioctl, ++ .hdlc_hard_xmit = hfc_hdlc_hard_xmit ++}; ++ ++static int hfc_dahdi_initialize(struct dahdi_hfc *hfccard) ++{ ++ struct hfc_card *hfctmp = hfccard->card; ++ int i; ++ ++ hfccard->ddev = dahdi_create_device(); ++ if (!hfccard->ddev) ++ return -ENOMEM; ++ ++ memset(&hfccard->span, 0x0, sizeof(struct dahdi_span)); ++ ++ /* ++ * ZTHFC ++ * ++ * Cards' and channels' names shall contain "ZTHFC" ++ * as the dahdi-tools look for this string to guess framing. ++ * We don't want to modify dahdi-tools only in order to change this. ++ * ++ * So we choose for a span name: DAHDI HFC-S formerly known as ZTHFC. :-) ++ */ ++ ++ sprintf(hfccard->span.name, "DAHDI_HFCS_FKA_ZTHFC%d", hfctmp->cardnum + 1); ++ sprintf(hfccard->span.desc, ++ "HFC-S PCI A ISDN card %d [%s] ", ++ hfctmp->cardnum, ++ hfctmp->nt_mode ? "NT" : "TE"); ++ hfccard->span.spantype = hfctmp->nt_mode ? SPANTYPE_DIGITAL_BRI_NT : ++ SPANTYPE_DIGITAL_BRI_TE; ++ hfccard->ddev->manufacturer = "Cologne Chips"; ++ hfccard->span.flags = 0; ++ hfccard->span.ops = &hfc_dahdi_span_ops; ++ hfccard->ddev->devicetype = kasprintf(GFP_KERNEL, "HFC-S PCI-A ISDN"); ++ hfccard->ddev->location = kasprintf(GFP_KERNEL, "PCI Bus %02d Slot %02d", ++ hfctmp->pcidev->bus->number, ++ PCI_SLOT(hfctmp->pcidev->devfn) + 1); ++ hfccard->span.chans = hfccard->_chans; ++ hfccard->span.channels = 3; ++ for (i = 0; i < hfccard->span.channels; i++) ++ hfccard->_chans[i] = &hfccard->chans[i]; ++ hfccard->span.deflaw = DAHDI_LAW_ALAW; ++ hfccard->span.linecompat = DAHDI_CONFIG_AMI | DAHDI_CONFIG_CCS; ++ hfccard->span.offset = 0; ++ ++ for (i = 0; i < hfccard->span.channels; i++) { ++ memset(&hfccard->chans[i], 0x0, sizeof(struct dahdi_chan)); ++ ++ sprintf(hfccard->chans[i].name, ++ "DAHDI_HFCS_FKA_ZTHFC%d/%d/%d", ++ hfctmp->cardnum + 1, 0, i + 1); ++ ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ "card %d: " ++ "registered %s\n", ++ hfctmp->cardnum, ++ hfccard->chans[i].name); ++ ++ if (i == hfccard->span.channels - 1) { ++ hfccard->chans[i].sigcap = DAHDI_SIG_HARDHDLC; ++ hfccard->sigchan = &hfccard->chans[DAHDI_D]; ++ hfccard->sigactive = 0; ++ atomic_set(&hfccard->hdlc_pending, 0); ++ } else { ++ hfccard->chans[i].sigcap = ++ DAHDI_SIG_CLEAR | DAHDI_SIG_DACS; ++ } ++ ++ hfccard->chans[i].chanpos = i + 1; ++ } ++ ++ hfccard->chans[DAHDI_D].readchunk = ++ hfctmp->chans[D].rx.dahdi_buffer; ++ ++ hfccard->chans[DAHDI_D].writechunk = ++ hfctmp->chans[D].tx.dahdi_buffer; ++ ++ hfccard->chans[DAHDI_D].pvt = &hfctmp->chans[D]; ++ ++ hfccard->chans[DAHDI_B1].readchunk = ++ hfctmp->chans[B1].rx.dahdi_buffer; ++ ++ hfccard->chans[DAHDI_B1].writechunk = ++ hfctmp->chans[B1].tx.dahdi_buffer; ++ ++ hfccard->chans[DAHDI_B1].pvt = &hfctmp->chans[B1]; ++ ++ hfccard->chans[DAHDI_B2].readchunk = ++ hfctmp->chans[B2].rx.dahdi_buffer; ++ ++ hfccard->chans[DAHDI_B2].writechunk = ++ hfctmp->chans[B2].tx.dahdi_buffer; ++ ++ hfccard->chans[DAHDI_B2].pvt = &hfctmp->chans[B2]; ++ ++ list_add_tail(&hfccard->span.device_node, &hfccard->ddev->spans); ++ if (dahdi_register_device(hfccard->ddev, &hfccard->card->pcidev->dev)) { ++ printk(KERN_NOTICE "Unable to register device with DAHDI\n"); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++static void hfc_dahdi_transmit(struct hfc_chan_simplex *chan) ++{ ++ hfc_fifo_put(chan, chan->dahdi_buffer, DAHDI_CHUNKSIZE); ++} ++ ++static void hfc_dahdi_receive(struct hfc_chan_simplex *chan) ++{ ++ hfc_fifo_get(chan, chan->dahdi_buffer, DAHDI_CHUNKSIZE); ++} ++ ++/****************************************** ++ * Interrupt Handler ++ ******************************************/ ++ ++static void hfc_handle_timer_interrupt(struct hfc_card *card); ++static void hfc_handle_state_interrupt(struct hfc_card *card); ++static void hfc_handle_processing_interrupt(struct hfc_card *card); ++static void hfc_frame_arrived(struct hfc_chan_duplex *chan); ++static void hfc_handle_voice(struct hfc_card *card); ++ ++#if (KERNEL_VERSION(2, 6, 24) < LINUX_VERSION_CODE) ++static irqreturn_t hfc_interrupt(int irq, void *dev_id) ++#else ++static irqreturn_t hfc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ++#endif ++{ ++ struct hfc_card *card = dev_id; ++ unsigned long flags; ++ u8 status, s1, s2; ++ ++ if (!card) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "spurious interrupt (IRQ %d)\n", ++ irq); ++ return IRQ_NONE; ++ } ++ ++ spin_lock_irqsave(&card->lock, flags); ++ status = hfc_inb(card, hfc_STATUS); ++ if (!(status & hfc_STATUS_ANYINT)) { ++ /* ++ * maybe we are sharing the irq ++ */ ++ spin_unlock_irqrestore(&card->lock, flags); ++ return IRQ_NONE; ++ } ++ ++ /* We used to ingore the IRQ when the card was in processing ++ * state but apparently there is no restriction to access the ++ * card in such state: ++ * ++ * Joerg Ciesielski wrote: ++ * > There is no restriction for the IRQ handler to access ++ * > HFC-S PCI during processing phase. A IRQ latency of 375 us ++ * > is also no problem since there are no interrupt sources in ++ * > HFC-S PCI which must be handled very fast. ++ * > Due to its deep fifos the IRQ latency can be several ms with ++ * > out the risk of loosing data. Even the S/T state interrupts ++ * > must not be handled with a latency less than <5ms. ++ * > ++ * > The processing phase only indicates that HFC-S PCI is ++ * > processing the Fifos as PCI master so that data is read and ++ * > written in the 32k memory window. But there is no restriction ++ * > to access data in the memory window during this time. ++ * ++ * // if (status & hfc_STATUS_PCI_PROC) { ++ * // return IRQ_HANDLED; ++ * // } ++ */ ++ ++ s1 = hfc_inb(card, hfc_INT_S1); ++ s2 = hfc_inb(card, hfc_INT_S2); ++ ++ if (s1 != 0) { ++ if (s1 & hfc_INTS_TIMER) { ++ /* ++ * timer (bit 7) ++ */ ++ hfc_handle_timer_interrupt(card); ++ } ++ ++ if (s1 & hfc_INTS_L1STATE) { ++ /* ++ * state machine (bit 6) ++ */ ++ hfc_handle_state_interrupt(card); ++ } ++ ++ if (s1 & hfc_INTS_DREC) { ++ /* ++ * D chan RX (bit 5) ++ */ ++ hfc_frame_arrived(&card->chans[D]); ++ } ++ ++ if (s1 & hfc_INTS_B1REC) { ++ /* ++ * B1 chan RX (bit 3) ++ */ ++ hfc_frame_arrived(&card->chans[B1]); ++ } ++ ++ if (s1 & hfc_INTS_B2REC) { ++ /* ++ * B2 chan RX (bit 4) ++ */ ++ hfc_frame_arrived(&card->chans[B2]); ++ } ++ ++ if (s1 & hfc_INTS_DTRANS) { ++ /* ++ * D chan TX (bit 2) ++ */ ++ } ++ ++ if (s1 & hfc_INTS_B1TRANS) { ++ /* ++ * B1 chan TX (bit 0) ++ */ ++ } ++ ++ if (s1 & hfc_INTS_B2TRANS) { ++ /* ++ * B2 chan TX (bit 1) ++ */ ++ } ++ ++ } ++ ++ if (s2 != 0) { ++ if (s2 & hfc_M2_PMESEL) { ++ /* ++ * kaboom irq (bit 7) ++ * ++ * CologneChip says: ++ * ++ * the meaning of this fatal error bit is that HFC-S ++ * PCI as PCI master could not access the PCI bus ++ * within 125us to finish its data processing. If this ++ * happens only very seldom it does not cause big ++ * problems but of course some B-channel or D-channel ++ * data will be corrupted due to this event. ++ * ++ * Unfortunately this bit is only set once after the ++ * problem occurs and can only be reseted by a ++ * software reset. That means it is not easily ++ * possible to check how often this fatal error ++ * happens. ++ * ++ */ ++ ++ if (!card->sync_loss_reported) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "sync lost, pci performance too low!\n", ++ card->cardnum); ++ ++ card->sync_loss_reported = TRUE; ++ } ++ } ++ ++ if (s2 & hfc_M2_GCI_MON_REC) { ++ /* ++ * RxR monitor channel (bit 2) ++ */ ++ } ++ ++ if (s2 & hfc_M2_GCI_I_CHG) { ++ /* ++ * GCI I-change (bit 1) ++ */ ++ } ++ ++ if (s2 & hfc_M2_PROC_TRANS) { ++ /* ++ * processing/non-processing transition (bit 0) ++ */ ++ hfc_handle_processing_interrupt(card); ++ } ++ ++ } ++ ++ spin_unlock_irqrestore(&card->lock, flags); ++ ++ return IRQ_HANDLED; ++} ++ ++static void hfc_handle_timer_interrupt(struct hfc_card *card) ++{ ++ if (card->ignore_first_timer_interrupt) { ++ card->ignore_first_timer_interrupt = FALSE; ++ return; ++ } ++ ++ if ((card->nt_mode && card->l1_state == 3) || ++ (!card->nt_mode && card->l1_state == 7)) { ++ ++ card->regs.ctmt &= ~hfc_CTMT_TIMER_MASK; ++ hfc_outb(card, hfc_CTMT, card->regs.ctmt); ++ ++ hfc_resume_fifo(card); ++ } ++} ++ ++static void hfc_handle_state_interrupt(struct hfc_card *card) ++{ ++ u8 new_state = hfc_inb(card, hfc_STATES) & hfc_STATES_STATE_MASK; ++ ++#ifdef DEBUG ++ if (debug_level >= 1) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "layer 1 state = %c%d\n", ++ card->cardnum, ++ card->nt_mode ? 'G' : 'F', ++ new_state); ++ } ++#endif ++ ++ if (card->nt_mode) { ++ /* ++ * NT mode ++ */ ++ ++ if (new_state == 3) { ++ /* ++ * fix to G3 state (see specs) ++ */ ++ hfc_outb(card, hfc_STATES, hfc_STATES_LOAD_STATE | 3); ++ } ++ ++ if (new_state == 3 && card->l1_state != 3) ++ hfc_resume_fifo(card); ++ ++ if (new_state != 3 && card->l1_state == 3) ++ hfc_suspend_fifo(card); ++ ++ } else { ++ if (new_state == 3) { ++ /* ++ * Keep L1 up... zaptel & libpri expects ++ * a always up L1... ++ * Enable only when using an unpatched libpri ++ * ++ * Are we still using unpatched libpri? Is this tested at runtime??? ++ * Does it only affect zaptel or DAHDI, too? ++ */ ++ ++ if (force_l1_up) { ++ hfc_outb(card, hfc_STATES, ++ hfc_STATES_DO_ACTION | ++ hfc_STATES_ACTIVATE| ++ hfc_STATES_NT_G2_G3); ++ } ++ } ++ ++ if (new_state == 7 && card->l1_state != 7) { ++ /* ++ * TE is now active, schedule FIFO activation after ++ * some time, otherwise the first frames are lost ++ */ ++ ++ card->regs.ctmt |= hfc_CTMT_TIMER_50 | ++ hfc_CTMT_TIMER_CLEAR; ++ hfc_outb(card, hfc_CTMT, card->regs.ctmt); ++ ++ /* ++ * Activating the timer firest an ++ * interrupt immediately, we ++ * obviously need to ignore it ++ */ ++ card->ignore_first_timer_interrupt = TRUE; ++ } ++ ++ if (new_state != 7 && card->l1_state == 7) { ++ /* ++ * TE has become inactive, disable FIFO ++ */ ++ hfc_suspend_fifo(card); ++ } ++ } ++ ++ card->l1_state = new_state; ++} ++ ++static void hfc_handle_processing_interrupt(struct hfc_card *card) ++{ ++ int available_bytes = 0; ++ ++ /* ++ * Synchronize with the first enabled channel ++ */ ++ if (card->regs.fifo_en & hfc_FIFOEN_B1RX) ++ available_bytes = hfc_fifo_used_rx(&card->chans[B1].rx); ++ if (card->regs.fifo_en & hfc_FIFOEN_B2RX) ++ available_bytes = hfc_fifo_used_rx(&card->chans[B2].rx); ++ else ++ available_bytes = -1; ++ ++ if ((available_bytes == -1 && card->ticks == 8) || ++ available_bytes >= DAHDI_CHUNKSIZE + hfc_RX_FIFO_PRELOAD) { ++ card->ticks = 0; ++ ++ if (available_bytes > DAHDI_CHUNKSIZE*2 + hfc_RX_FIFO_PRELOAD) { ++ card->late_irqs++; ++ /* ++ * we are out of sync, clear fifos, jaw ++ */ ++ hfc_clear_fifo_rx(&card->chans[B1].rx); ++ hfc_clear_fifo_tx(&card->chans[B1].tx); ++ hfc_clear_fifo_rx(&card->chans[B2].rx); ++ hfc_clear_fifo_tx(&card->chans[B2].tx); ++ ++#ifdef DEBUG ++ if (debug_level >= 4) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "late IRQ, %d bytes late\n", ++ card->cardnum, ++ available_bytes - ++ (DAHDI_CHUNKSIZE + ++ hfc_RX_FIFO_PRELOAD)); ++ } ++#endif ++ } else { ++ hfc_handle_voice(card); ++ } ++ } ++ ++ card->ticks++; ++} ++ ++ ++static void hfc_handle_voice(struct hfc_card *card) ++{ ++ struct dahdi_hfc *hfccard = card->dahdi_dev; ++ int frame_left, res; ++ unsigned char buf[hfc_HDLC_BUF_LEN]; ++ unsigned int size = sizeof(buf) / sizeof(buf[0]); ++ ++ ++ if (card->chans[B1].status != open_voice && ++ card->chans[B2].status != open_voice) ++ return; ++ ++ dahdi_transmit(&hfccard->span); ++ ++ if (card->regs.fifo_en & hfc_FIFOEN_B1TX) ++ hfc_dahdi_transmit(&card->chans[B1].tx); ++ if (card->regs.fifo_en & hfc_FIFOEN_B2TX) ++ hfc_dahdi_transmit(&card->chans[B2].tx); ++ ++ /* ++ * dahdi hdlc frame tx ++ */ ++ ++ if (atomic_read(&hfccard->hdlc_pending)) { ++ hfc_check_l1_up(card); ++ res = dahdi_hdlc_getbuf(hfccard->sigchan, buf, &size); ++ if (size > 0) { ++ hfccard->sigactive = 1; ++ memcpy(card->chans[D].tx.ugly_framebuf + ++ card->chans[D].tx.ugly_framebuf_size, ++ buf, size); ++ card->chans[D].tx.ugly_framebuf_size += size; ++ if (res != 0) { ++ hfc_fifo_put_frame(&card->chans[D].tx, ++ card->chans[D].tx.ugly_framebuf, ++ card->chans[D].tx.ugly_framebuf_size); ++ ++hfccard->frames_out; ++ hfccard->sigactive = 0; ++ card->chans[D].tx.ugly_framebuf_size ++ = 0; ++ atomic_dec(&hfccard->hdlc_pending); ++ } ++ } ++ } ++ /* ++ * dahdi hdlc frame tx done ++ */ ++ ++ if (card->regs.fifo_en & hfc_FIFOEN_B1RX) ++ hfc_dahdi_receive(&card->chans[B1].rx); ++ else ++ memset(&card->chans[B1].rx.dahdi_buffer, 0x7f, ++ sizeof(card->chans[B1].rx.dahdi_buffer)); ++ ++ if (card->regs.fifo_en & hfc_FIFOEN_B2RX) ++ hfc_dahdi_receive(&card->chans[B2].rx); ++ else ++ memset(&card->chans[B2].rx.dahdi_buffer, 0x7f, ++ sizeof(card->chans[B1].rx.dahdi_buffer)); ++ ++ /* ++ * Echo cancellation ++ */ ++ dahdi_ec_chunk(&hfccard->chans[DAHDI_B1], ++ card->chans[B1].rx.dahdi_buffer, ++ card->chans[B1].tx.dahdi_buffer); ++ dahdi_ec_chunk(&hfccard->chans[DAHDI_B2], ++ card->chans[B2].rx.dahdi_buffer, ++ card->chans[B2].tx.dahdi_buffer); ++ ++ /* ++ * dahdi hdlc frame rx ++ */ ++ if (hfc_fifo_has_frames(&card->chans[D].rx)) ++ hfc_frame_arrived(&card->chans[D]); ++ ++ if (card->chans[D].rx.ugly_framebuf_size) { ++ frame_left = card->chans[D].rx.ugly_framebuf_size - ++ card->chans[D].rx.ugly_framebuf_off ; ++ if (frame_left > hfc_HDLC_BUF_LEN) { ++ dahdi_hdlc_putbuf(hfccard->sigchan, ++ card->chans[D].rx.ugly_framebuf + ++ card->chans[D].rx.ugly_framebuf_off, ++ hfc_HDLC_BUF_LEN); ++ card->chans[D].rx.ugly_framebuf_off += ++ hfc_HDLC_BUF_LEN; ++ } else { ++ dahdi_hdlc_putbuf(hfccard->sigchan, ++ card->chans[D].rx.ugly_framebuf + ++ card->chans[D].rx.ugly_framebuf_off, ++ frame_left); ++ dahdi_hdlc_finish(hfccard->sigchan); ++ card->chans[D].rx.ugly_framebuf_size = 0; ++ card->chans[D].rx.ugly_framebuf_off = 0; ++ } ++ } ++ /* ++ * dahdi hdlc frame rx done ++ */ ++ ++ if (hfccard->span.flags & DAHDI_FLAG_RUNNING) ++ dahdi_receive(&hfccard->span); ++ ++} ++ ++static void hfc_frame_arrived(struct hfc_chan_duplex *chan) ++{ ++ struct hfc_card *card = chan->card; ++ int antiloop = 16; ++ struct sk_buff *skb; ++ ++ while (hfc_fifo_has_frames(&chan->rx) && --antiloop) { ++ int frame_size = hfc_fifo_get_frame_size(&chan->rx); ++ ++ if (frame_size < 3) { ++#ifdef DEBUG ++ if (debug_level >= 2) ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "invalid frame received, " ++ "just %d bytes\n", ++ card->cardnum, ++ chan->name, ++ frame_size); ++#endif ++ ++ hfc_fifo_drop_frame(&chan->rx); ++ ++ ++ continue; ++ } else if (frame_size == 3) { ++#ifdef DEBUG ++ if (debug_level >= 2) ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "empty frame received\n", ++ card->cardnum, ++ chan->name); ++#endif ++ ++ hfc_fifo_drop_frame(&chan->rx); ++ ++ ++ continue; ++ } ++ ++ if (chan->open_by_dahdi && ++ card->chans[D].rx.ugly_framebuf_size) { ++ ++ /* ++ * We have to wait for Dahdi to transmit the ++ * frame... wait for next time ++ */ ++ ++ break; ++ } ++ ++ skb = dev_alloc_skb(frame_size - 3); ++ ++ if (!skb) { ++ printk(KERN_ERR hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "cannot allocate skb: frame dropped\n", ++ card->cardnum, ++ chan->name); ++ ++ hfc_fifo_drop_frame(&chan->rx); ++ ++ ++ continue; ++ } ++ ++ ++ /* ++ * HFC does the checksum ++ */ ++#ifndef CHECKSUM_HW ++ skb->ip_summed = CHECKSUM_COMPLETE; ++#else ++ skb->ip_summed = CHECKSUM_HW; ++#endif ++ ++ if (chan->open_by_dahdi) { ++ card->chans[D].rx.ugly_framebuf_size = frame_size - 1; ++ ++ if (hfc_fifo_get_frame(&card->chans[D].rx, ++ card->chans[D].rx.ugly_framebuf, ++ frame_size - 1) == -1) { ++ dev_kfree_skb(skb); ++ continue; ++ } ++ ++ memcpy(skb_put(skb, frame_size - 3), ++ card->chans[D].rx.ugly_framebuf, ++ frame_size - 3); ++ } else { ++ if (hfc_fifo_get_frame(&chan->rx, ++ skb_put(skb, frame_size - 3), ++ frame_size - 3) == -1) { ++ dev_kfree_skb(skb); ++ continue; ++ } ++ } ++ } ++ ++ if (!antiloop) ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "Infinite loop detected\n", ++ card->cardnum); ++} ++ ++/****************************************** ++ * Module initialization and cleanup ++ ******************************************/ ++ ++static int __devinit hfc_probe(struct pci_dev *pci_dev, ++ const struct pci_device_id *ent) ++{ ++ static int cardnum; ++ int err; ++ int i; ++ ++ struct hfc_card *card = NULL; ++ struct dahdi_hfc *dahdi_hfcs = NULL; ++ card = kmalloc(sizeof(struct hfc_card), GFP_KERNEL); ++ if (!card) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "unable to kmalloc!\n"); ++ err = -ENOMEM; ++ goto err_alloc_hfccard; ++ } ++ ++ memset(card, 0x00, sizeof(struct hfc_card)); ++ card->cardnum = cardnum; ++ card->pcidev = pci_dev; ++ spin_lock_init(&card->lock); ++ ++ pci_set_drvdata(pci_dev, card); ++ ++ err = pci_enable_device(pci_dev); ++ if (err) ++ goto err_pci_enable_device; ++ ++ err = pci_set_dma_mask(pci_dev, PCI_DMA_32BIT); ++ if (err) { ++ printk(KERN_ERR hfc_DRIVER_PREFIX ++ "card %d: " ++ "No suitable DMA configuration available.\n", ++ card->cardnum); ++ goto err_pci_set_dma_mask; ++ } ++ ++ pci_write_config_word(pci_dev, PCI_COMMAND, PCI_COMMAND_MEMORY); ++ err = pci_request_regions(pci_dev, hfc_DRIVER_NAME); ++ if (err) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "cannot request I/O memory region\n", ++ card->cardnum); ++ goto err_pci_request_regions; ++ } ++ ++ pci_set_master(pci_dev); ++ ++ if (!pci_dev->irq) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "no irq!\n", ++ card->cardnum); ++ err = -ENODEV; ++ goto err_noirq; ++ } ++ ++ card->io_bus_mem = pci_resource_start(pci_dev, 1); ++ if (!card->io_bus_mem) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "no iomem!\n", ++ card->cardnum); ++ err = -ENODEV; ++ goto err_noiobase; ++ } ++ ++ card->io_mem = ioremap(card->io_bus_mem, hfc_PCI_MEM_SIZE); ++ if (!(card->io_mem)) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "cannot ioremap I/O memory\n", ++ card->cardnum); ++ err = -ENODEV; ++ goto err_ioremap; ++ } ++ ++ /* ++ * pci_alloc_consistent guarantees alignment ++ * (Documentation/DMA-mapping.txt) ++ */ ++ card->fifo_mem = pci_alloc_consistent(pci_dev, ++ hfc_FIFO_SIZE, &card->fifo_bus_mem); ++ if (!card->fifo_mem) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "unable to allocate FIFO DMA memory!\n", ++ card->cardnum); ++ err = -ENOMEM; ++ goto err_alloc_fifo; ++ } ++ ++ memset(card->fifo_mem, 0x00, hfc_FIFO_SIZE); ++ ++ card->fifos = card->fifo_mem; ++ ++ pci_write_config_dword(card->pcidev, hfc_PCI_MWBA, card->fifo_bus_mem); ++ ++ err = request_irq(card->pcidev->irq, &hfc_interrupt, ++ ++#if (KERNEL_VERSION(2, 6, 23) < LINUX_VERSION_CODE) ++ IRQF_SHARED, hfc_DRIVER_NAME, card); ++#else ++ SA_SHIRQ, hfc_DRIVER_NAME, card); ++#endif ++ ++ if (err) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "unable to register irq\n", ++ card->cardnum); ++ goto err_request_irq; ++ } ++ ++ card->nt_mode = FALSE; ++ ++ if (modes & (1 << card->cardnum)) ++ card->nt_mode = TRUE; ++ ++ for (i = 0; i < nt_modes_count; i++) { ++ if (nt_modes[i] == card->cardnum) ++ card->nt_mode = TRUE; ++ } ++ ++ /* ++ * D Channel ++ */ ++ card->chans[D].card = card; ++ card->chans[D].name = "D"; ++ card->chans[D].status = free; ++ card->chans[D].number = D; ++ spin_lock_init(&card->chans[D].lock); ++ ++ card->chans[D].rx.chan = &card->chans[D]; ++ card->chans[D].rx.fifo_base = card->fifos + 0x4000; ++ card->chans[D].rx.z_base = card->fifos + 0x4000; ++ card->chans[D].rx.z1_base = card->fifos + 0x6080; ++ card->chans[D].rx.z2_base = card->fifos + 0x6082; ++ card->chans[D].rx.z_min = 0x0000; ++ card->chans[D].rx.z_max = 0x01FF; ++ card->chans[D].rx.f_min = 0x10; ++ card->chans[D].rx.f_max = 0x1F; ++ card->chans[D].rx.f1 = card->fifos + 0x60a0; ++ card->chans[D].rx.f2 = card->fifos + 0x60a1; ++ card->chans[D].rx.fifo_size = card->chans[D].rx.z_max ++ - card->chans[D].rx.z_min + 1; ++ card->chans[D].rx.f_num = card->chans[D].rx.f_max ++ - card->chans[D].rx.f_min + 1; ++ ++ card->chans[D].tx.chan = &card->chans[D]; ++ card->chans[D].tx.fifo_base = card->fifos + 0x0000; ++ card->chans[D].tx.z_base = card->fifos + 0x0000; ++ card->chans[D].tx.z1_base = card->fifos + 0x2080; ++ card->chans[D].tx.z2_base = card->fifos + 0x2082; ++ card->chans[D].tx.z_min = 0x0000; ++ card->chans[D].tx.z_max = 0x01FF; ++ card->chans[D].tx.f_min = 0x10; ++ card->chans[D].tx.f_max = 0x1F; ++ card->chans[D].tx.f1 = card->fifos + 0x20a0; ++ card->chans[D].tx.f2 = card->fifos + 0x20a1; ++ card->chans[D].tx.fifo_size = card->chans[D].tx.z_max - ++ card->chans[D].tx.z_min + 1; ++ card->chans[D].tx.f_num = card->chans[D].tx.f_max - ++ card->chans[D].tx.f_min + 1; ++ ++ /* ++ * B1 Channel ++ */ ++ card->chans[B1].card = card; ++ card->chans[B1].name = "B1"; ++ card->chans[B1].status = free; ++ card->chans[B1].number = B1; ++ card->chans[B1].protocol = 0; ++ spin_lock_init(&card->chans[B1].lock); ++ ++ card->chans[B1].rx.chan = &card->chans[B1]; ++ card->chans[B1].rx.fifo_base = card->fifos + 0x4200; ++ card->chans[B1].rx.z_base = card->fifos + 0x4000; ++ card->chans[B1].rx.z1_base = card->fifos + 0x6000; ++ card->chans[B1].rx.z2_base = card->fifos + 0x6002; ++ card->chans[B1].rx.z_min = 0x0200; ++ card->chans[B1].rx.z_max = 0x1FFF; ++ card->chans[B1].rx.f_min = 0x00; ++ card->chans[B1].rx.f_max = 0x1F; ++ card->chans[B1].rx.f1 = card->fifos + 0x6080; ++ card->chans[B1].rx.f2 = card->fifos + 0x6081; ++ card->chans[B1].rx.fifo_size = card->chans[B1].rx.z_max - ++ card->chans[B1].rx.z_min + 1; ++ card->chans[B1].rx.f_num = card->chans[B1].rx.f_max - ++ card->chans[B1].rx.f_min + 1; ++ ++ card->chans[B1].tx.chan = &card->chans[B1]; ++ card->chans[B1].tx.fifo_base = card->fifos + 0x0200; ++ card->chans[B1].tx.z_base = card->fifos + 0x0000; ++ card->chans[B1].tx.z1_base = card->fifos + 0x2000; ++ card->chans[B1].tx.z2_base = card->fifos + 0x2002; ++ card->chans[B1].tx.z_min = 0x0200; ++ card->chans[B1].tx.z_max = 0x1FFF; ++ card->chans[B1].tx.f_min = 0x00; ++ card->chans[B1].tx.f_max = 0x1F; ++ card->chans[B1].tx.f1 = card->fifos + 0x2080; ++ card->chans[B1].tx.f2 = card->fifos + 0x2081; ++ card->chans[B1].tx.fifo_size = card->chans[B1].tx.z_max - ++ card->chans[B1].tx.z_min + 1; ++ card->chans[B1].tx.f_num = card->chans[B1].tx.f_max - ++ card->chans[B1].tx.f_min + 1; ++ ++ /* ++ * B2 Channel ++ */ ++ card->chans[B2].card = card; ++ card->chans[B2].name = "B2"; ++ card->chans[B2].status = free; ++ card->chans[B2].number = B2; ++ card->chans[B2].protocol = 0; ++ spin_lock_init(&card->chans[B2].lock); ++ ++ card->chans[B2].rx.chan = &card->chans[B2]; ++ card->chans[B2].rx.fifo_base = card->fifos + 0x6200, ++ card->chans[B2].rx.z_base = card->fifos + 0x6000; ++ card->chans[B2].rx.z1_base = card->fifos + 0x6100; ++ card->chans[B2].rx.z2_base = card->fifos + 0x6102; ++ card->chans[B2].rx.z_min = 0x0200; ++ card->chans[B2].rx.z_max = 0x1FFF; ++ card->chans[B2].rx.f_min = 0x00; ++ card->chans[B2].rx.f_max = 0x1F; ++ card->chans[B2].rx.f1 = card->fifos + 0x6180; ++ card->chans[B2].rx.f2 = card->fifos + 0x6181; ++ card->chans[B2].rx.fifo_size = card->chans[B2].rx.z_max - ++ card->chans[B2].rx.z_min + 1; ++ card->chans[B2].rx.f_num = card->chans[B2].rx.f_max - ++ card->chans[B2].rx.f_min + 1; ++ ++ card->chans[B2].tx.chan = &card->chans[B2]; ++ card->chans[B2].tx.fifo_base = card->fifos + 0x2200; ++ card->chans[B2].tx.z_base = card->fifos + 0x2000; ++ card->chans[B2].tx.z1_base = card->fifos + 0x2100; ++ card->chans[B2].tx.z2_base = card->fifos + 0x2102; ++ card->chans[B2].tx.z_min = 0x0200; ++ card->chans[B2].tx.z_max = 0x1FFF; ++ card->chans[B2].tx.f_min = 0x00; ++ card->chans[B2].tx.f_max = 0x1F; ++ card->chans[B2].tx.f1 = card->fifos + 0x2180; ++ card->chans[B2].tx.f2 = card->fifos + 0x2181; ++ card->chans[B2].tx.fifo_size = card->chans[B2].tx.z_max - ++ card->chans[B2].tx.z_min + 1; ++ card->chans[B2].tx.f_num = card->chans[B2].tx.f_max - ++ card->chans[B2].tx.f_min + 1; ++ ++ /* ++ * All done ++ */ ++ ++ dahdi_hfcs = kmalloc(sizeof(struct dahdi_hfc), GFP_KERNEL); ++ if (!dahdi_hfcs) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "unable to kmalloc!\n"); ++ goto err_request_irq; ++ } ++ memset(dahdi_hfcs, 0x0, sizeof(struct dahdi_hfc)); ++ ++ dahdi_hfcs->card = card; ++ hfc_dahdi_initialize(dahdi_hfcs); ++ card->dahdi_dev = dahdi_hfcs; ++ ++ snprintf(card->proc_dir_name, ++ sizeof(card->proc_dir_name), ++ "%d", card->cardnum); ++ card->proc_dir = proc_mkdir(card->proc_dir_name, hfc_proc_dahdi_hfcs_dir); ++ SET_PROC_DIRENTRY_OWNER(card->proc_dir); ++ ++ hfc_resetCard(card); ++ ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ "card %d configured for %s mode at mem %#lx (0x%p) IRQ %u\n", ++ card->cardnum, ++ card->nt_mode ? "NT" : "TE", ++ card->io_bus_mem, ++ card->io_mem, ++ card->pcidev->irq); ++ ++ cardnum++; ++ ++ return 0; ++ ++err_request_irq: ++ pci_free_consistent(pci_dev, hfc_FIFO_SIZE, ++ card->fifo_mem, card->fifo_bus_mem); ++err_alloc_fifo: ++ iounmap(card->io_mem); ++err_ioremap: ++err_noiobase: ++err_noirq: ++ pci_release_regions(pci_dev); ++err_pci_request_regions: ++err_pci_set_dma_mask: ++err_pci_enable_device: ++ kfree(card); ++err_alloc_hfccard: ++ return err; ++} ++ ++static void __devexit hfc_remove(struct pci_dev *pci_dev) ++{ ++ struct hfc_card *card = pci_get_drvdata(pci_dev); ++ ++ ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ "card %d: " ++ "shutting down card at %p.\n", ++ card->cardnum, ++ card->io_mem); ++ ++ if (!card) { ++ return; ++ } ++ ++ hfc_softreset(card); ++ ++ dahdi_unregister_device(card->dahdi_dev->ddev); ++ ++ ++ /* ++ * disable memio and bustmaster ++ */ ++ pci_write_config_word(pci_dev, PCI_COMMAND, 0); ++ ++/* ++BUG: these proc entries just cause Call traces, so removed. ++ remove_proc_entry("bufs", card->proc_dir); ++ remove_proc_entry("fifos", card->proc_dir); ++ remove_proc_entry("info", card->proc_dir); ++*/ ++ remove_proc_entry(card->proc_dir_name, hfc_proc_dahdi_hfcs_dir); ++ ++ free_irq(pci_dev->irq, card); ++ ++ pci_free_consistent(pci_dev, hfc_FIFO_SIZE, ++ card->fifo_mem, card->fifo_bus_mem); ++ ++ iounmap(card->io_mem); ++ ++ pci_release_regions(pci_dev); ++ ++ pci_disable_device(pci_dev); ++ ++ kfree(card); ++} ++ ++/****************************************** ++ * Module stuff ++ ******************************************/ ++ ++static int __init hfc_init_module(void) ++{ ++ int ret; ++ ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ hfc_DRIVER_STRING " loading\n"); ++#ifdef DEBUG ++printk(KERN_INFO hfc_DRIVER_PREFIX "Check /var/log/kern-debug.log for debugging output level %d.", debug_level); ++printk(KERN_DEBUG hfc_DRIVER_PREFIX "base.c is debugging."); ++#endif ++ ++#if (KERNEL_VERSION(2, 6, 26) <= LINUX_VERSION_CODE) ++ hfc_proc_dahdi_hfcs_dir = proc_mkdir(hfc_DRIVER_NAME, NULL); ++#else ++ hfc_proc_dahdi_hfcs_dir = proc_mkdir(hfc_DRIVER_NAME, proc_root_driver); ++#endif ++ ++ ret = dahdi_pci_module(&hfc_driver); ++ return ret; ++} ++ ++module_init(hfc_init_module); ++ ++static void __exit hfc_module_exit(void) ++{ ++ pci_unregister_driver(&hfc_driver); ++ ++#if (KERNEL_VERSION(2, 6, 26) <= LINUX_VERSION_CODE) ++ remove_proc_entry(hfc_DRIVER_NAME, NULL); ++#else ++ remove_proc_entry(hfc_DRIVER_NAME, proc_root_driver); ++#endif ++ ++ printk(KERN_INFO hfc_DRIVER_PREFIX ++ hfc_DRIVER_STRING " unloaded\n"); ++} ++ ++module_exit(hfc_module_exit); ++ ++#endif ++ ++MODULE_DESCRIPTION(hfc_DRIVER_DESCR); ++MODULE_AUTHOR("Jens Wilke , " ++ "Daniele (Vihai) Orlandi , " ++ "Jose A. Deniz "); ++MODULE_ALIAS("dahdi_hfcs"); ++#ifdef MODULE_LICENSE ++MODULE_LICENSE("GPL"); ++#endif ++ ++ ++module_param(modes, int, 0444); ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10) ++module_param_array(nt_modes, int, &nt_modes_count, 0444); ++#else ++module_param_array(nt_modes, int, nt_modes_count, 0444); ++#endif ++ ++module_param(force_l1_up, int, 0444); ++#ifdef DEBUG ++module_param(debug_level, int, 0444); ++#endif ++ ++MODULE_PARM_DESC(modes, "[Deprecated] bit-mask to configure NT mode"); ++MODULE_PARM_DESC(nt_modes, ++ "Comma-separated list of card IDs to configure in NT mode"); ++MODULE_PARM_DESC(force_l1_up, "Don't allow L1 to go down"); ++#ifdef DEBUG ++MODULE_PARM_DESC(debug_level, "Debug verbosity level"); ++#endif +--- /dev/null ++++ b/drivers/dahdi/hfcs/dahdi_hfcs.h +@@ -0,0 +1,419 @@ ++/* ++ * dahdi_hfcs.h - Dahdi driver for HFC-S PCI A based ISDN BRI cards ++ * ++ * Dahdi port by Jose A. Deniz ++ * ++ * Copyright (C) 2009 Jose A. Deniz ++ * Copyright (C) 2006 headissue GmbH; Jens Wilke ++ * Copyright (C) 2004 Daniele Orlandi ++ * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH ++ * ++ * Jens Wilke ++ * ++ * Orginal author of this code is ++ * Daniele "Vihai" Orlandi ++ * ++ * Major rewrite of the driver made by ++ * Klaus-Peter Junghanns ++ * ++ * This program is free software and may be modified and ++ * distributed under the terms of the GNU Public License. ++ * ++ */ ++ ++#ifndef _HFC_ZAPHFC_H ++#define _HFC_ZAPHFC_H ++ ++#include ++ ++#define hfc_DRIVER_NAME "dahdi_hfcs" ++#define hfc_DRIVER_PREFIX hfc_DRIVER_NAME ": " ++#define hfc_DRIVER_DESCR "HFC-S PCI A ISDN" ++#define hfc_DRIVER_VERSION "1.42" ++#define hfc_DRIVER_STRING hfc_DRIVER_DESCR " (V" hfc_DRIVER_VERSION ")" ++ ++#define hfc_MAX_BOARDS 32 ++ ++#ifndef PCI_DMA_32BIT ++#define PCI_DMA_32BIT 0x00000000ffffffffULL ++#endif ++ ++#ifndef PCI_VENDOR_ID_SITECOM ++#define PCI_VENDOR_ID_SITECOM 0x182D ++#endif ++ ++#ifndef PCI_DEVICE_ID_SITECOM_3069 ++#define PCI_DEVICE_ID_SITECOM_3069 0x3069 ++#endif ++ ++#define hfc_RESET_DELAY 20 ++ ++#define hfc_CLKDEL_TE 0x0f /* CLKDEL in TE mode */ ++#define hfc_CLKDEL_NT 0x6c /* CLKDEL in NT mode */ ++ ++/* PCI memory mapped I/O */ ++ ++#define hfc_PCI_MEM_SIZE 0x0100 ++#define hfc_PCI_MWBA 0x80 ++ ++/* GCI/IOM bus monitor registers */ ++ ++#define hfc_C_I 0x08 ++#define hfc_TRxR 0x0C ++#define hfc_MON1_D 0x28 ++#define hfc_MON2_D 0x2C ++ ++ ++/* GCI/IOM bus timeslot registers */ ++ ++#define hfc_B1_SSL 0x80 ++#define hfc_B2_SSL 0x84 ++#define hfc_AUX1_SSL 0x88 ++#define hfc_AUX2_SSL 0x8C ++#define hfc_B1_RSL 0x90 ++#define hfc_B2_RSL 0x94 ++#define hfc_AUX1_RSL 0x98 ++#define hfc_AUX2_RSL 0x9C ++ ++/* GCI/IOM bus data registers */ ++ ++#define hfc_B1_D 0xA0 ++#define hfc_B2_D 0xA4 ++#define hfc_AUX1_D 0xA8 ++#define hfc_AUX2_D 0xAC ++ ++/* GCI/IOM bus configuration registers */ ++ ++#define hfc_MST_EMOD 0xB4 ++#define hfc_MST_MODE 0xB8 ++#define hfc_CONNECT 0xBC ++ ++ ++/* Interrupt and status registers */ ++ ++#define hfc_FIFO_EN 0x44 ++#define hfc_TRM 0x48 ++#define hfc_B_MODE 0x4C ++#define hfc_CHIP_ID 0x58 ++#define hfc_CIRM 0x60 ++#define hfc_CTMT 0x64 ++#define hfc_INT_M1 0x68 ++#define hfc_INT_M2 0x6C ++#define hfc_INT_S1 0x78 ++#define hfc_INT_S2 0x7C ++#define hfc_STATUS 0x70 ++ ++/* S/T section registers */ ++ ++#define hfc_STATES 0xC0 ++#define hfc_SCTRL 0xC4 ++#define hfc_SCTRL_E 0xC8 ++#define hfc_SCTRL_R 0xCC ++#define hfc_SQ 0xD0 ++#define hfc_CLKDEL 0xDC ++#define hfc_B1_REC 0xF0 ++#define hfc_B1_SEND 0xF0 ++#define hfc_B2_REC 0xF4 ++#define hfc_B2_SEND 0xF4 ++#define hfc_D_REC 0xF8 ++#define hfc_D_SEND 0xF8 ++#define hfc_E_REC 0xFC ++ ++/* Bits and values in various HFC PCI registers */ ++ ++/* bits in status register (READ) */ ++#define hfc_STATUS_PCI_PROC 0x02 ++#define hfc_STATUS_NBUSY 0x04 ++#define hfc_STATUS_TIMER_ELAP 0x10 ++#define hfc_STATUS_STATINT 0x20 ++#define hfc_STATUS_FRAMEINT 0x40 ++#define hfc_STATUS_ANYINT 0x80 ++ ++/* bits in CTMT (Write) */ ++#define hfc_CTMT_TRANSB1 0x01 ++#define hfc_CTMT_TRANSB2 0x02 ++#define hfc_CTMT_TIMER_CLEAR 0x80 ++#define hfc_CTMT_TIMER_MASK 0x1C ++#define hfc_CTMT_TIMER_3_125 (0x01 << 2) ++#define hfc_CTMT_TIMER_6_25 (0x02 << 2) ++#define hfc_CTMT_TIMER_12_5 (0x03 << 2) ++#define hfc_CTMT_TIMER_25 (0x04 << 2) ++#define hfc_CTMT_TIMER_50 (0x05 << 2) ++#define hfc_CTMT_TIMER_400 (0x06 << 2) ++#define hfc_CTMT_TIMER_800 (0x07 << 2) ++#define hfc_CTMT_AUTO_TIMER 0x20 ++ ++/* bits in CIRM (Write) */ ++#define hfc_CIRM_AUX_MSK 0x07 ++#define hfc_CIRM_RESET 0x08 ++#define hfc_CIRM_B1_REV 0x40 ++#define hfc_CIRM_B2_REV 0x80 ++ ++/* bits in INT_M1 and INT_S1 */ ++#define hfc_INTS_B1TRANS 0x01 ++#define hfc_INTS_B2TRANS 0x02 ++#define hfc_INTS_DTRANS 0x04 ++#define hfc_INTS_B1REC 0x08 ++#define hfc_INTS_B2REC 0x10 ++#define hfc_INTS_DREC 0x20 ++#define hfc_INTS_L1STATE 0x40 ++#define hfc_INTS_TIMER 0x80 ++ ++/* bits in INT_M2 */ ++#define hfc_M2_PROC_TRANS 0x01 ++#define hfc_M2_GCI_I_CHG 0x02 ++#define hfc_M2_GCI_MON_REC 0x04 ++#define hfc_M2_IRQ_ENABLE 0x08 ++#define hfc_M2_PMESEL 0x80 ++ ++/* bits in STATES */ ++#define hfc_STATES_STATE_MASK 0x0F ++#define hfc_STATES_LOAD_STATE 0x10 ++#define hfc_STATES_ACTIVATE 0x20 ++#define hfc_STATES_DO_ACTION 0x40 ++#define hfc_STATES_NT_G2_G3 0x80 ++ ++/* bits in HFCD_MST_MODE */ ++#define hfc_MST_MODE_MASTER 0x01 ++#define hfc_MST_MODE_SLAVE 0x00 ++/* remaining bits are for codecs control */ ++ ++/* bits in HFCD_SCTRL */ ++#define hfc_SCTRL_B1_ENA 0x01 ++#define hfc_SCTRL_B2_ENA 0x02 ++#define hfc_SCTRL_MODE_TE 0x00 ++#define hfc_SCTRL_MODE_NT 0x04 ++#define hfc_SCTRL_LOW_PRIO 0x08 ++#define hfc_SCTRL_SQ_ENA 0x10 ++#define hfc_SCTRL_TEST 0x20 ++#define hfc_SCTRL_NONE_CAP 0x40 ++#define hfc_SCTRL_PWR_DOWN 0x80 ++ ++/* bits in SCTRL_E */ ++#define hfc_SCTRL_E_AUTO_AWAKE 0x01 ++#define hfc_SCTRL_E_DBIT_1 0x04 ++#define hfc_SCTRL_E_IGNORE_COL 0x08 ++#define hfc_SCTRL_E_CHG_B1_B2 0x80 ++ ++/* bits in SCTRL_R */ ++#define hfc_SCTRL_R_B1_ENA 0x01 ++#define hfc_SCTRL_R_B2_ENA 0x02 ++ ++/* bits in FIFO_EN register */ ++#define hfc_FIFOEN_B1TX 0x01 ++#define hfc_FIFOEN_B1RX 0x02 ++#define hfc_FIFOEN_B2TX 0x04 ++#define hfc_FIFOEN_B2RX 0x08 ++#define hfc_FIFOEN_DTX 0x10 ++#define hfc_FIFOEN_DRX 0x20 ++ ++#define hfc_FIFOEN_B1 (hfc_FIFOEN_B1TX|hfc_FIFOEN_B1RX) ++#define hfc_FIFOEN_B2 (hfc_FIFOEN_B2TX|hfc_FIFOEN_B2RX) ++#define hfc_FIFOEN_D (hfc_FIFOEN_DTX|hfc_FIFOEN_DRX) ++ ++/* bits in the CONNECT register */ ++#define hfc_CONNECT_B1_HFC_from_ST 0x00 ++#define hfc_CONNECT_B1_HFC_from_GCI 0x01 ++#define hfc_CONNECT_B1_ST_from_HFC 0x00 ++#define hfc_CONNECT_B1_ST_from_GCI 0x02 ++#define hfc_CONNECT_B1_GCI_from_HFC 0x00 ++#define hfc_CONNECT_B1_GCI_from_ST 0x04 ++ ++#define hfc_CONNECT_B2_HFC_from_ST 0x00 ++#define hfc_CONNECT_B2_HFC_from_GCI 0x08 ++#define hfc_CONNECT_B2_ST_from_HFC 0x00 ++#define hfc_CONNECT_B2_ST_from_GCI 0x10 ++#define hfc_CONNECT_B2_GCI_from_HFC 0x00 ++#define hfc_CONNECT_B2_GCI_from_ST 0x20 ++ ++/* bits in the TRM register */ ++#define hfc_TRM_TRANS_INT_00 0x00 ++#define hfc_TRM_TRANS_INT_01 0x01 ++#define hfc_TRM_TRANS_INT_10 0x02 ++#define hfc_TRM_TRANS_INT_11 0x04 ++#define hfc_TRM_ECHO 0x20 ++#define hfc_TRM_B1_PLUS_B2 0x40 ++#define hfc_TRM_IOM_TEST_LOOP 0x80 ++ ++/* bits in the __SSL and __RSL registers */ ++#define hfc_SRSL_STIO 0x40 ++#define hfc_SRSL_ENABLE 0x80 ++#define hfc_SRCL_SLOT_MASK 0x1f ++ ++/* FIFO memory definitions */ ++ ++#define hfc_FIFO_SIZE 0x8000 ++ ++#define hfc_UGLY_FRAMEBUF 0x2000 ++ ++#define hfc_TX_FIFO_PRELOAD (DAHDI_CHUNKSIZE + 2) ++#define hfc_RX_FIFO_PRELOAD 4 ++ ++/* HDLC STUFF */ ++#define hfc_HDLC_BUF_LEN 32 ++/* arbitrary, just the max # of byts we will send to DAHDI per call */ ++ ++ ++/* NOTE: FIFO pointers are not declared volatile because accesses to the ++ * FIFOs are inherently safe. ++ */ ++ ++#ifdef DEBUG ++extern int debug_level; ++#endif ++ ++struct hfc_chan; ++ ++struct hfc_chan_simplex { ++ struct hfc_chan_duplex *chan; ++ ++ u8 dahdi_buffer[DAHDI_CHUNKSIZE]; ++ ++ u8 ugly_framebuf[hfc_UGLY_FRAMEBUF]; ++ int ugly_framebuf_size; ++ u16 ugly_framebuf_off; ++ ++ void *z1_base, *z2_base; ++ void *fifo_base; ++ void *z_base; ++ u16 z_min; ++ u16 z_max; ++ u16 fifo_size; ++ ++ u8 *f1, *f2; ++ u8 f_min; ++ u8 f_max; ++ u8 f_num; ++ ++ unsigned long long frames; ++ unsigned long long bytes; ++ unsigned long long fifo_full; ++ unsigned long long crc; ++ unsigned long long fifo_underrun; ++}; ++ ++enum hfc_chan_status { ++ free, ++ open_framed, ++ open_voice, ++ sniff_aux, ++ loopback, ++}; ++ ++struct hfc_chan_duplex { ++ struct hfc_card *card; ++ ++ char *name; ++ int number; ++ ++ enum hfc_chan_status status; ++ int open_by_netdev; ++ int open_by_dahdi; ++ ++ unsigned short protocol; ++ ++ spinlock_t lock; ++ ++ struct hfc_chan_simplex rx; ++ struct hfc_chan_simplex tx; ++ ++}; ++ ++typedef struct hfc_card { ++ int cardnum; ++ struct pci_dev *pcidev; ++ struct dahdi_hfc *dahdi_dev; ++ struct proc_dir_entry *proc_dir; ++ char proc_dir_name[32]; ++ ++ struct proc_dir_entry *proc_info; ++ struct proc_dir_entry *proc_fifos; ++ struct proc_dir_entry *proc_bufs; ++ ++ unsigned long io_bus_mem; ++ void __iomem *io_mem; ++ ++ dma_addr_t fifo_bus_mem; ++ void *fifo_mem; ++ void *fifos; ++ ++ int nt_mode; ++ int sync_loss_reported; ++ int late_irqs; ++ ++ u8 l1_state; ++ int fifo_suspended; ++ int ignore_first_timer_interrupt; ++ ++ struct { ++ u8 m1; ++ u8 m2; ++ u8 fifo_en; ++ u8 trm; ++ u8 connect; ++ u8 sctrl; ++ u8 sctrl_r; ++ u8 sctrl_e; ++ u8 ctmt; ++ u8 cirm; ++ } regs; ++ ++ struct hfc_chan_duplex chans[3]; ++ int echo_enabled; ++ ++ ++ ++ int debug_event; ++ ++ spinlock_t lock; ++ unsigned int irq; ++ unsigned int iomem; ++ int ticks; ++ int clicks; ++ unsigned char *pci_io; ++ void *fifomem; /* start of the shared mem */ ++ ++ unsigned int pcibus; ++ unsigned int pcidevfn; ++ ++ int drecinframe; ++ ++ unsigned char cardno; ++ struct hfc_card *next; ++ ++} hfc_card; ++ ++typedef struct dahdi_hfc { ++ unsigned int usecount; ++ struct dahdi_device *ddev; ++ struct dahdi_span span; ++ struct dahdi_chan chans[3]; ++ struct dahdi_chan *_chans[3]; ++ struct hfc_card *card; ++ ++ /* pointer to the signalling channel for this span */ ++ struct dahdi_chan *sigchan; ++ /* nonzero means we're in the middle of sending an HDLC frame */ ++ int sigactive; ++ /* hdlc_hard_xmit() increments, hdlc_tx_frame() decrements */ ++ atomic_t hdlc_pending; ++ int frames_out; ++ int frames_in; ++ ++} dahdi_hfc; ++ ++static inline struct dahdi_hfc* dahdi_hfc_from_span(struct dahdi_span *span) { ++ return container_of(span, struct dahdi_hfc, span); ++} ++ ++static inline u8 hfc_inb(struct hfc_card *card, int offset) ++{ ++ return readb(card->io_mem + offset); ++} ++ ++static inline void hfc_outb(struct hfc_card *card, int offset, u8 value) ++{ ++ writeb(value, card->io_mem + offset); ++} ++ ++#endif +--- /dev/null ++++ b/drivers/dahdi/hfcs/fifo.c +@@ -0,0 +1,380 @@ ++/* ++ * fifo.c - HFC FIFO management routines ++ * ++ * Copyright (C) 2006 headissue GmbH; Jens Wilke ++ * Copyright (C) 2004 Daniele Orlandi ++ * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH ++ * ++ * Original author of this code is ++ * Daniele "Vihai" Orlandi ++ * ++ * This program is free software and may be modified and ++ * distributed under the terms of the GNU Public License. ++ * ++ */ ++ ++#define DEBUG ++#ifdef DEBUG ++extern int debug_level; ++#endif ++ ++#include ++ ++#include ++ ++#include "fifo.h" ++ ++static void hfc_fifo_mem_read(struct hfc_chan_simplex *chan, ++ int z_start, ++ void *data, int size) ++{ ++ int bytes_to_boundary = chan->z_max - z_start + 1; ++ if (bytes_to_boundary >= size) { ++ memcpy(data, ++ chan->z_base + z_start, ++ size); ++ } else { ++ /* ++ * Buffer wrap ++ */ ++ memcpy(data, ++ chan->z_base + z_start, ++ bytes_to_boundary); ++ ++ memcpy(data + bytes_to_boundary, ++ chan->fifo_base, ++ size - bytes_to_boundary); ++ } ++} ++ ++static void hfc_fifo_mem_write(struct hfc_chan_simplex *chan, ++ void *data, int size) ++{ ++ int bytes_to_boundary = chan->z_max - *Z1_F1(chan) + 1; ++ if (bytes_to_boundary >= size) { ++ memcpy(chan->z_base + *Z1_F1(chan), ++ data, ++ size); ++ } else { ++ /* ++ * FIFO wrap ++ */ ++ ++ memcpy(chan->z_base + *Z1_F1(chan), ++ data, ++ bytes_to_boundary); ++ ++ memcpy(chan->fifo_base, ++ data + bytes_to_boundary, ++ size - bytes_to_boundary); ++ } ++} ++ ++int hfc_fifo_get(struct hfc_chan_simplex *chan, ++ void *data, int size) ++{ ++ int available_bytes; ++ ++ /* ++ * Some useless statistic ++ */ ++ chan->bytes += size; ++ ++ available_bytes = hfc_fifo_used_rx(chan); ++ ++ if (available_bytes < size && !chan->fifo_underrun++) { ++ /* ++ * print the warning only once ++ */ ++ printk(KERN_WARNING hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "RX FIFO not enough (%d) bytes to receive!\n", ++ chan->chan->card->cardnum, ++ chan->chan->name, ++ available_bytes); ++ return -1; ++ } ++ ++ hfc_fifo_mem_read(chan, *Z2_F2(chan), data, size); ++ *Z2_F2(chan) = Z_inc(chan, *Z2_F2(chan), size); ++ return available_bytes - size; ++} ++ ++void hfc_fifo_put(struct hfc_chan_simplex *chan, ++ void *data, int size) ++{ ++ struct hfc_card *card = chan->chan->card; ++ int used_bytes = hfc_fifo_used_tx(chan); ++ int free_bytes = hfc_fifo_free_tx(chan); ++ ++ if (!used_bytes && !chan->fifo_underrun++) { ++ /* ++ * print warning only once, to make timing not worse ++ */ ++ printk(KERN_WARNING hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "TX FIFO has become empty\n", ++ card->cardnum, ++ chan->chan->name); ++ } ++ if (free_bytes < size) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "TX FIFO full!\n", ++ chan->chan->card->cardnum, ++ chan->chan->name); ++ chan->fifo_full++; ++ hfc_clear_fifo_tx(chan); ++ } ++ ++ hfc_fifo_mem_write(chan, data, size); ++ chan->bytes += size; ++ *Z1_F1(chan) = Z_inc(chan, *Z1_F1(chan), size); ++} ++ ++int hfc_fifo_get_frame(struct hfc_chan_simplex *chan, void *data, int max_size) ++{ ++ int frame_size; ++ u16 newz2 ; ++ ++ if (*chan->f1 == *chan->f2) { ++ /* ++ * nothing received, strange uh? ++ */ ++ printk(KERN_WARNING hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "get_frame called with no frame in FIFO.\n", ++ chan->chan->card->cardnum, ++ chan->chan->name); ++ ++ return -1; ++ } ++ ++ /* ++ * frame_size includes CRC+CRC+STAT ++ */ ++ frame_size = hfc_fifo_get_frame_size(chan); ++ ++#ifdef DEBUG ++ if (debug_level == 3) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "RX len %2d: ", ++ chan->chan->card->cardnum, ++ chan->chan->name, ++ frame_size); ++ } else if (debug_level >= 4) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "RX (f1=%02x, f2=%02x, z1=%04x, z2=%04x) len %2d: ", ++ chan->chan->card->cardnum, ++ chan->chan->name, ++ *chan->f1, *chan->f2, *Z1_F2(chan), *Z2_F2(chan), ++ frame_size); ++ } ++ ++ if (debug_level >= 3) { ++ int i; ++ for (i = 0; i < frame_size; i++) { ++ printk("%02x", hfc_fifo_u8(chan, ++ Z_inc(chan, *Z2_F2(chan), i))); ++ } ++ ++ printk("\n"); ++ } ++#endif ++ ++ if (frame_size <= 0) { ++#ifdef DEBUG ++ if (debug_level >= 2) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "invalid (empty) frame received.\n", ++ chan->chan->card->cardnum, ++ chan->chan->name); ++ } ++#endif ++ ++ hfc_fifo_drop_frame(chan); ++ return -1; ++ } ++ ++ /* ++ * STAT is not really received ++ */ ++ chan->bytes += frame_size - 1; ++ ++ /* ++ * Calculate beginning of the next frame ++ */ ++ newz2 = Z_inc(chan, *Z2_F2(chan), frame_size); ++ ++ /* ++ * We cannot use hfc_fifo_get because of different semantic of ++ * "available bytes" and to avoid useless increment of Z2 ++ */ ++ hfc_fifo_mem_read(chan, *Z2_F2(chan), data, ++ frame_size < max_size ? frame_size : max_size); ++ ++ if (hfc_fifo_u8(chan, Z_inc(chan, *Z2_F2(chan), ++ frame_size - 1)) != 0x00) { ++ /* ++ * CRC not ok, frame broken, skipping ++ */ ++#ifdef DEBUG ++ if (debug_level >= 2) { ++ printk(KERN_WARNING hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "Received frame with wrong CRC\n", ++ chan->chan->card->cardnum, ++ chan->chan->name); ++ } ++#endif ++ ++ chan->crc++; ++ ++ hfc_fifo_drop_frame(chan); ++ return -1; ++ } ++ ++ chan->frames++; ++ ++ *chan->f2 = F_inc(chan, *chan->f2, 1); ++ ++ /* ++ * Set Z2 for the next frame we're going to receive ++ */ ++ *Z2_F2(chan) = newz2; ++ ++ return frame_size; ++} ++ ++void hfc_fifo_drop_frame(struct hfc_chan_simplex *chan) ++{ ++ int available_bytes; ++ u16 newz2; ++ ++ if (*chan->f1 == *chan->f2) { ++ /* ++ * nothing received, strange eh? ++ */ ++ printk(KERN_WARNING hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "skip_frame called with no frame in FIFO.\n", ++ chan->chan->card->cardnum, ++ chan->chan->name); ++ ++ return; ++ } ++ ++ available_bytes = hfc_fifo_used_rx(chan) + 1; ++ ++ /* ++ * Calculate beginning of the next frame ++ */ ++ newz2 = Z_inc(chan, *Z2_F2(chan), available_bytes); ++ ++ *chan->f2 = F_inc(chan, *chan->f2, 1); ++ ++ /* ++ * Set Z2 for the next frame we're going to receive ++ */ ++ *Z2_F2(chan) = newz2; ++} ++ ++void hfc_fifo_put_frame(struct hfc_chan_simplex *chan, ++ void *data, int size) ++{ ++ u16 newz1; ++ int available_frames; ++ ++#ifdef DEBUG ++ if (debug_level == 3) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "TX len %2d: ", ++ chan->chan->card->cardnum, ++ chan->chan->name, ++ size); ++ } else if (debug_level >= 4) { ++ printk(KERN_DEBUG hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "TX (f1=%02x, f2=%02x, z1=%04x, z2=%04x) len %2d: ", ++ chan->chan->card->cardnum, ++ chan->chan->name, ++ *chan->f1, *chan->f2, *Z1_F1(chan), *Z2_F1(chan), ++ size); ++ } ++ ++ if (debug_level >= 3) { ++ int i; ++ for (i = 0; i < size; i++) ++ printk("%02x", ((u8 *)data)[i]); ++ ++ printk("\n"); ++ } ++#endif ++ ++ available_frames = hfc_fifo_free_frames(chan); ++ ++ if (available_frames >= chan->f_num) { ++ printk(KERN_CRIT hfc_DRIVER_PREFIX ++ "card %d: " ++ "chan %s: " ++ "TX FIFO total number of frames exceeded!\n", ++ chan->chan->card->cardnum, ++ chan->chan->name); ++ ++ chan->fifo_full++; ++ ++ return; ++ } ++ ++ hfc_fifo_put(chan, data, size); ++ ++ newz1 = *Z1_F1(chan); ++ ++ *chan->f1 = F_inc(chan, *chan->f1, 1); ++ ++ *Z1_F1(chan) = newz1; ++ ++ chan->frames++; ++} ++ ++void hfc_clear_fifo_rx(struct hfc_chan_simplex *chan) ++{ ++ *chan->f2 = *chan->f1; ++ *Z2_F2(chan) = *Z1_F2(chan); ++} ++ ++void hfc_clear_fifo_tx(struct hfc_chan_simplex *chan) ++{ ++ *chan->f1 = *chan->f2; ++ *Z1_F1(chan) = *Z2_F1(chan); ++ ++ if (chan->chan->status == open_voice) { ++ /* ++ * Make sure that at least hfc_TX_FIFO_PRELOAD bytes are ++ * present in the TX FIFOs ++ * Create hfc_TX_FIFO_PRELOAD bytes of empty data ++ * (0x7f is mute audio) ++ */ ++ u8 empty_fifo[hfc_TX_FIFO_PRELOAD + ++ DAHDI_CHUNKSIZE + hfc_RX_FIFO_PRELOAD]; ++ memset(empty_fifo, 0x7f, sizeof(empty_fifo)); ++ ++ hfc_fifo_put(chan, empty_fifo, sizeof(empty_fifo)); ++ } ++} ++ +--- /dev/null ++++ b/drivers/dahdi/hfcs/fifo.h +@@ -0,0 +1,139 @@ ++/* ++ * fifo.h - Dahdi driver for HFC-S PCI A based ISDN BRI cards ++ * ++ * Copyright (C) 2004 Daniele Orlandi ++ * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH ++ * ++ * Daniele "Vihai" Orlandi ++ * ++ * Major rewrite of the driver made by ++ * Klaus-Peter Junghanns ++ * ++ * This program is free software and may be modified and ++ * distributed under the terms of the GNU Public License. ++ * ++ */ ++ ++#ifndef _HFC_FIFO_H ++#define _HFC_FIFO_H ++ ++#include "dahdi_hfcs.h" ++ ++static inline u16 *Z1_F1(struct hfc_chan_simplex *chan) ++{ ++ return chan->z1_base + (*chan->f1 * 4); ++} ++ ++static inline u16 *Z2_F1(struct hfc_chan_simplex *chan) ++{ ++ return chan->z2_base + (*chan->f1 * 4); ++} ++ ++static inline u16 *Z1_F2(struct hfc_chan_simplex *chan) ++{ ++ return chan->z1_base + (*chan->f2 * 4); ++} ++ ++static inline u16 *Z2_F2(struct hfc_chan_simplex *chan) ++{ ++ return chan->z2_base + (*chan->f2 * 4); ++} ++ ++static inline u16 Z_inc(struct hfc_chan_simplex *chan, u16 z, u16 inc) ++{ ++ /* ++ * declared as u32 in order to manage overflows ++ */ ++ u32 newz = z + inc; ++ if (newz > chan->z_max) ++ newz -= chan->fifo_size; ++ ++ return newz; ++} ++ ++static inline u8 F_inc(struct hfc_chan_simplex *chan, u8 f, u8 inc) ++{ ++ /* ++ * declared as u16 in order to manage overflows ++ */ ++ u16 newf = f + inc; ++ if (newf > chan->f_max) ++ newf -= chan->f_num; ++ ++ return newf; ++} ++ ++static inline u16 hfc_fifo_used_rx(struct hfc_chan_simplex *chan) ++{ ++ return (*Z1_F2(chan) - *Z2_F2(chan) + ++ chan->fifo_size) % chan->fifo_size; ++} ++ ++static inline u16 hfc_fifo_get_frame_size(struct hfc_chan_simplex *chan) ++{ ++ /* ++ * This +1 is needed because in frame mode the available bytes are Z2-Z1+1 ++ * while in transparent mode I wouldn't consider the byte pointed by Z2 to ++ * be available, otherwise, the FIFO would always contain one byte, even ++ * when Z1==Z2 ++ */ ++ ++ return hfc_fifo_used_rx(chan) + 1; ++} ++ ++static inline u8 hfc_fifo_u8(struct hfc_chan_simplex *chan, u16 z) ++{ ++ return *((u8 *)(chan->z_base + z)); ++} ++ ++static inline u16 hfc_fifo_used_tx(struct hfc_chan_simplex *chan) ++{ ++ return (*Z1_F1(chan) - *Z2_F1(chan) + ++ chan->fifo_size) % chan->fifo_size; ++} ++ ++static inline u16 hfc_fifo_free_rx(struct hfc_chan_simplex *chan) ++{ ++ u16 free_bytes = *Z2_F1(chan) - *Z1_F1(chan); ++ ++ if (free_bytes > 0) ++ return free_bytes; ++ else ++ return free_bytes + chan->fifo_size; ++} ++ ++static inline u16 hfc_fifo_free_tx(struct hfc_chan_simplex *chan) ++{ ++ u16 free_bytes = *Z2_F1(chan) - *Z1_F1(chan); ++ ++ if (free_bytes > 0) ++ return free_bytes; ++ else ++ return free_bytes + chan->fifo_size; ++} ++ ++static inline int hfc_fifo_has_frames(struct hfc_chan_simplex *chan) ++{ ++ return *chan->f1 != *chan->f2; ++} ++ ++static inline u8 hfc_fifo_used_frames(struct hfc_chan_simplex *chan) ++{ ++ return (*chan->f1 - *chan->f2 + chan->f_num) % chan->f_num; ++} ++ ++static inline u8 hfc_fifo_free_frames(struct hfc_chan_simplex *chan) ++{ ++ return (*chan->f2 - *chan->f1 + chan->f_num) % chan->f_num; ++} ++ ++int hfc_fifo_get(struct hfc_chan_simplex *chan, void *data, int size); ++void hfc_fifo_put(struct hfc_chan_simplex *chan, void *data, int size); ++void hfc_fifo_drop(struct hfc_chan_simplex *chan, int size); ++int hfc_fifo_get_frame(struct hfc_chan_simplex *chan, void *data, int max_size); ++void hfc_fifo_drop_frame(struct hfc_chan_simplex *chan); ++void hfc_fifo_put_frame(struct hfc_chan_simplex *chan, void *data, int size); ++void hfc_clear_fifo_rx(struct hfc_chan_simplex *chan); ++void hfc_clear_fifo_tx(struct hfc_chan_simplex *chan); ++ ++#endif +--- /dev/null ++++ b/drivers/dahdi/hfcs/Kbuild +@@ -0,0 +1,10 @@ ++obj-m += dahdi_hfcs.o ++ ++EXTRA_CFLAGS := -I$(src)/.. -Wno-undef ++ ++dahdi_hfcs-objs := base.o fifo.o ++ ++$(obj)/base.o: $(src)/dahdi_hfcs.h ++$(obj)/fifo.o: $(src)/fifo.h ++ ++ diff --git a/libs/dahdi-tools/Makefile b/libs/dahdi-tools/Makefile new file mode 100644 index 00000000000..7dca3193f28 --- /dev/null +++ b/libs/dahdi-tools/Makefile @@ -0,0 +1,97 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dahdi-tools +PKG_VERSION:=2.10.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/ +PKG_MD5SUM:=6928cdf6f7710299ecbcacbac20d5c92 + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Vittorio Gambaletta + +include $(INCLUDE_DIR)/package.mk + +define Package/dahdi-cfg/Default + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Telephony + DEPENDS=+kmod-dahdi +endef + +define Package/dahdi-cfg + $(call Package/dahdi-cfg/Default) + DEPENDS+=+libpthread + TITLE:=DAHDI tools dahdi_cfg, dahdi_scan and fxotune +endef + +define Package/dahdi-monitor + $(call Package/dahdi-cfg/Default) + TITLE:=DAHDI tools dahdi_monitor, dahdi_speed and dahdi_test +endef + +define Package/dahdi-tools-libtonezone + $(call Package/dahdi-cfg/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE:=DAHDI tonezone library +endef + +TARGET_CFLAGS += $(FPIC) +EXTRA_CFLAGS:= $(TARGET_CPPFLAGS) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + HOSTCC="$(HOSTCC)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CFLAGS="$(TARGET_CFLAGS) -I. -DBUILDING_TONEZONE -I$(STAGING_DIR)/usr/include" \ + KSRC="$(LINUX_DIR)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + DAHDI_INCLUDE="$(STAGING_DIR)/usr/include" \ + CONFIGURE_SILENT="--silent" \ + dahdi_cfg dahdi_monitor dahdi_scan dahdi_speed dahdi_test fxotune libs +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libtonezone.so $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libtonezone.a $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/include/dahdi + $(CP) $(PKG_BUILD_DIR)/tonezone.h $(1)/usr/include/dahdi/ +endef + +define Package/dahdi-cfg/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/dahdi_cfg $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/dahdi_scan $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/fxotune $(1)/usr/sbin/ +endef + +define Package/dahdi-monitor/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/dahdi_monitor $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/dahdi_speed $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/dahdi_test $(1)/usr/sbin/ +endef + +define Package/dahdi-tools-libtonezone/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libtonezone.so $(1)/usr/lib/ + cd $(1)/usr/lib/; ln -s libtonezone.so libtonezone.so.2.0 +endef + +$(eval $(call BuildPackage,dahdi-cfg)) +$(eval $(call BuildPackage,dahdi-monitor)) +$(eval $(call BuildPackage,dahdi-tools-libtonezone)) diff --git a/libs/iksemel/patches/002-use-of-newer-gnutls_priority_set_direct-api.patch b/libs/iksemel/patches/002-use-of-newer-gnutls_priority_set_direct-api.patch new file mode 100644 index 00000000000..8f91d10ccb2 --- /dev/null +++ b/libs/iksemel/patches/002-use-of-newer-gnutls_priority_set_direct-api.patch @@ -0,0 +1,65 @@ +From 6b213b593c5b499679506a8c169ff3f0f4d6a34f Mon Sep 17 00:00:00 2001 +From: John Papandriopoulos +Date: Thu, 20 Aug 2015 16:55:39 -0700 +Subject: [PATCH] Use of newer gnutls_priority_set_direct API + +--- + configure.ac | 1 + + src/stream.c | 13 +++++++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 91e69e3..281a044 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -46,6 +46,7 @@ AC_CHECK_FUNCS(getopt_long) + AC_CHECK_FUNCS(getaddrinfo) + + AM_PATH_LIBGNUTLS(,AC_DEFINE(HAVE_GNUTLS,,"Use libgnutls")) ++AM_PATH_LIBGNUTLS(,AC_CHECK_FUNCS(gnutls_priority_set_direct)) + + dnl Check -Wall flag of GCC + if test "x$GCC" = "xyes"; then +diff --git a/src/stream.c b/src/stream.c +index e8a1e8c..7d19a82 100644 +--- a/src/stream.c ++++ b/src/stream.c +@@ -63,11 +63,20 @@ tls_pull (iksparser *prs, char *buffer, size_t len) + static int + handshake (struct stream_data *data) + { ++#if HAVE_GNUTLS_PRIORITY_SET_DIRECT ++ const char *priorities = ++ "NONE" ++ ":+VERS-TLS1.0:+VERS-SSL3.0" ++ ":+RSA" ++ ":+3DES-CBC:+ARCFOUR-128" ++ ":+SHA1:+SHA256:+SHA384:+MD5"; ++#else + const int protocol_priority[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 }; + const int kx_priority[] = { GNUTLS_KX_RSA, 0 }; + const int cipher_priority[] = { GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR, 0}; + const int comp_priority[] = { GNUTLS_COMP_ZLIB, GNUTLS_COMP_NULL, 0 }; + const int mac_priority[] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 }; ++#endif + int ret; + + if (gnutls_global_init () != 0) +@@ -80,11 +89,15 @@ handshake (struct stream_data *data) + gnutls_certificate_free_credentials (data->cred); + return IKS_NOMEM; + } ++#if HAVE_GNUTLS_PRIORITY_SET_DIRECT ++ gnutls_priority_set_direct (data->sess, priorities, NULL); ++#else + gnutls_protocol_set_priority (data->sess, protocol_priority); + gnutls_cipher_set_priority(data->sess, cipher_priority); + gnutls_compression_set_priority(data->sess, comp_priority); + gnutls_kx_set_priority(data->sess, kx_priority); + gnutls_mac_set_priority(data->sess, mac_priority); ++#endif + gnutls_credentials_set (data->sess, GNUTLS_CRD_CERTIFICATE, data->cred); + + gnutls_transport_set_push_function (data->sess, (gnutls_push_func) tls_push); +-- +2.1.4 diff --git a/libs/libsrtp/Makefile b/libs/libsrtp/Makefile index ac09f557f86..4d7d5a61795 100644 --- a/libs/libsrtp/Makefile +++ b/libs/libsrtp/Makefile @@ -41,6 +41,11 @@ Protocol (SRTP) originally authored by Cisco Systems, Inc. It is available under a BSD-style license. endef +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) uninstall + $(call Build/Install/Default) +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/srtp $(1)/usr/include/ diff --git a/libs/ortp/Makefile b/libs/ortp/Makefile new file mode 100644 index 00000000000..29a7f52158b --- /dev/null +++ b/libs/ortp/Makefile @@ -0,0 +1,80 @@ +# +# Copyright (C) 2010-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ortp +PKG_VERSION:=0.23.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SAVANNAH/linphone/ortp/sources +PKG_MD5SUM:=fb833cc7a66ec1a0c1b75016130e7e6d + +PKG_LICENSE:=LGPL-2.1 +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Nicolas Thill + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libortp + SUBMENU:=Telephony + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Real-time Transport Protocol (RTP) library + URL:=http://www.linphone.org/technical-corner/ortp/overview + DEPENDS:= +libpthread +librt +endef + +ifneq ($(CONFIG_avr32),) + TARGET_CFLAGS += -fsigned-char +endif + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-debug \ + --enable-ipv6 \ + --enable-perf \ + --disable-ssl-hmac \ + --disable-tests \ + --without-srtp \ + +CONFIGURE_VARS += \ + ac_cv_header_srtp_srtp_h=no \ + ac_cv_lib_srtp_srtp_init=no \ + ac_cv_path_DOXYGEN= \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + ( cd $(PKG_INSTALL_DIR); $(CP) \ + ./usr/include/ortp \ + $(1)/usr/include/ \ + ) + $(INSTALL_DIR) $(1)/usr/lib + ( cd $(PKG_INSTALL_DIR); $(CP) \ + ./usr/lib/libortp.{a,so*} \ + $(1)/usr/lib/ \ + ) + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + ( cd $(PKG_INSTALL_DIR); $(CP) \ + ./usr/lib/pkgconfig/ortp.pc \ + $(1)/usr/lib/pkgconfig/ \ + ) +endef + +define Package/libortp/install + $(INSTALL_DIR) $(1)/usr/lib + ( cd $(PKG_INSTALL_DIR); $(CP) \ + ./usr/lib/libortp.so.* \ + $(1)/usr/lib/ \ + ) +endef + +$(eval $(call BuildPackage,libortp)) diff --git a/libs/pjproject/Makefile b/libs/pjproject/Makefile new file mode 100644 index 00000000000..f02af26f24c --- /dev/null +++ b/libs/pjproject/Makefile @@ -0,0 +1,117 @@ +# +# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015 Cesnet, z.s.p.o. +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pjproject +PKG_VERSION:=2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/ +PKG_MD5SUM:=39629ca3fcedbdc7dbd8c5a707060095 +PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Jiri Slachta + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/pjproject/Default + SECTION:=lib + CATEGORY:=Libraries + SUBMENU:=Telephony + URL:=http://www.pjsip.org/ + DEPENDS:=+libuuid +libstdcpp +libpthread +endef + +define Package/pjproject/install/lib + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(2).so* $(1)/usr/lib/ +endef + +define PJSIPpackage + define Package/$(1) + $$(call Package/pjproject/Default) + TITLE:=$(1) library + DEPENDS+=$(3) + endef + + define Package/$(1)/install +$(call Package/pjproject/install/lib,$$(1),$2) + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-floating-point \ + --enable-g711-codec \ + --disable-l16-codec \ + --disable-g722-codec \ + --disable-g7221-codec \ + --disable-gsm-codec \ + --disable-ilbc-coder \ + --disable-ipp \ + --disable-ssl \ + --disable-oss \ + --disable-sound \ + --with-external-srtp="$(STAGING_DIR)/usr" \ + --without-external-gsm \ + --disable-small-filter \ + --disable-large-filter \ + --disable-speex-aec \ + --disable-g711-codec \ + --disable-l16-codec \ + --disable-gsm-codec \ + --disable-g722-codec \ + --disable-g7221-codec \ + --disable-speex-codec \ + --disable-ilbc-codec \ + --disable-resample-dll \ + --disable-sdl \ + --disable-ffmpeg \ + --disable-v4l2 + +TARGET_LDFLAGS+=-lc $(LIBGCC) -lm +TARGET_CFLAGS+=$(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS) + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) +endef + +PJPROJECT_LIBS = \ + libpj libpjlib-util libpjmedia-audiodev libpjmedia-codec \ + libpjmedia-videodev libpjmedia libpjnath libpjsip-simple \ + libpjsip-ua libpjsip libpjsua libpjsua2 libresample + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{include,lib} + + $(CP) -R $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + + $(foreach m,$(PJPROJECT_LIBS),$(CP) $(PKG_INSTALL_DIR)/usr/lib/$(m)* $(1)/usr/lib/;) + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpjproject.pc $(1)/usr/lib/pkgconfig/ +endef + +$(eval $(call PJSIPpackage,libpj,libpj,+librt)) +$(eval $(call PJSIPpackage,libpjlib-util,libpjlib-util,+libpj +librt)) +$(eval $(call PJSIPpackage,libpjmedia,libpjmedia*,+libpj +libpjlib-util +libpjnath +libresample +librt +libspeex +libsrtp)) +$(eval $(call PJSIPpackage,libpjnath,libpjnath,+libpj +libpjlib-util +librt)) +$(eval $(call PJSIPpackage,libpjsip-simple,libpjsip-simple,+libpj +libpjlib-util +libpjsip +libresample +librt +libspeex +libsrtp)) +$(eval $(call PJSIPpackage,libpjsip-ua,libpjsip-ua,+libpj +libpjlib-util +libpjmedia +libpjsip-simple +libpjsip +libresample +librt +libspeex +libsrtp)) +$(eval $(call PJSIPpackage,libpjsip,libpjsip,+libpj +libpjlib-util +libresample +librt +libspeex +libsrtp)) +$(eval $(call PJSIPpackage,libpjsua,libpjsua,+libpj +libpjlib-util +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +libresample +librt +libspeex +libsrtp)) +$(eval $(call PJSIPpackage,libpjsua2,libpjsua2,+libpj +libpjlib-util +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +libresample +librt +libspeex +libsrtp +libpjsua)) +$(eval $(call PJSIPpackage,libresample,libresample,)) diff --git a/libs/pjproject/patches/001-change_linker.patch b/libs/pjproject/patches/001-change_linker.patch new file mode 100644 index 00000000000..5fd15030440 --- /dev/null +++ b/libs/pjproject/patches/001-change_linker.patch @@ -0,0 +1,11 @@ +--- a/build/cc-auto.mak.in ++++ b/build/cc-auto.mak.in +@@ -2,7 +2,7 @@ export CC = @CC@ -c + export CXX = @CXX@ -c + export AR = @AR@ + export AR_FLAGS = @AR_FLAGS@ +-export LD = @LD@ ++export LD = @CXX@ + export LDOUT = -o + export RANLIB = @RANLIB@ + diff --git a/libs/pjproject/patches/100-uclibc-linker-unrecognized-options.patch b/libs/pjproject/patches/100-uclibc-linker-unrecognized-options.patch new file mode 100644 index 00000000000..9930cef9b67 --- /dev/null +++ b/libs/pjproject/patches/100-uclibc-linker-unrecognized-options.patch @@ -0,0 +1,11 @@ +--- a/build/rules.mak ++++ b/build/rules.mak +@@ -13,7 +13,7 @@ SHLIB = $($(APP)_SHLIB) + SONAME = $($(APP)_SONAME) + + ifeq ($(SHLIB_SUFFIX),so) +-SHLIB_OPT := -shared -Wl,-soname,$(SHLIB) ++SHLIB_OPT := -shared + else ifeq ($(SHLIB_SUFFIX),dylib) + SHLIB_OPT := -dynamiclib -undefined dynamic_lookup -flat_namespace + else ifeq ($(SHLIB_SUFFIX),dll) diff --git a/libs/pjproject/patches/120-non-gnu-pthreads.patch b/libs/pjproject/patches/120-non-gnu-pthreads.patch new file mode 100644 index 00000000000..e01b542e8bf --- /dev/null +++ b/libs/pjproject/patches/120-non-gnu-pthreads.patch @@ -0,0 +1,66 @@ +Index: pjproject-2.4/pjlib/src/pj/os_core_unix.c +=================================================================== +--- pjproject-2.4.orig/pjlib/src/pj/os_core_unix.c ++++ pjproject-2.4/pjlib/src/pj/os_core_unix.c +@@ -1123,7 +1123,7 @@ static pj_status_t init_mutex(pj_mutex_t + return PJ_RETURN_OS_ERROR(rc); + + if (type == PJ_MUTEX_SIMPLE) { +-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \ ++#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \ + defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE) + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP); + #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \ +@@ -1133,7 +1133,7 @@ static pj_status_t init_mutex(pj_mutex_t + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL); + #endif + } else { +-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \ ++#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \ + defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE) + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); + #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \ +Index: pjproject-2.4/pjsip-apps/src/samples/siprtp.c +=================================================================== +--- pjproject-2.4.orig/pjsip-apps/src/samples/siprtp.c ++++ pjproject-2.4/pjsip-apps/src/samples/siprtp.c +@@ -1134,7 +1134,7 @@ static void boost_priority(void) + PJ_RETURN_OS_ERROR(rc)); + return; + } +- tp.__sched_priority = max_prio; ++ tp.sched_priority = max_prio; + + rc = sched_setscheduler(0, POLICY, &tp); + if (rc != 0) { +@@ -1143,7 +1143,7 @@ static void boost_priority(void) + } + + PJ_LOG(4, (THIS_FILE, "New process policy=%d, priority=%d", +- policy, tp.__sched_priority)); ++ policy, tp.sched_priority)); + + /* + * Adjust thread scheduling algorithm and priority +@@ -1156,10 +1156,10 @@ static void boost_priority(void) + } + + PJ_LOG(4, (THIS_FILE, "Old thread policy=%d, priority=%d", +- policy, tp.__sched_priority)); ++ policy, tp.sched_priority)); + + policy = POLICY; +- tp.__sched_priority = max_prio; ++ tp.sched_priority = max_prio; + + rc = pthread_setschedparam(pthread_self(), policy, &tp); + if (rc != 0) { +@@ -1169,7 +1169,7 @@ static void boost_priority(void) + } + + PJ_LOG(4, (THIS_FILE, "New thread policy=%d, priority=%d", +- policy, tp.__sched_priority)); ++ policy, tp.sched_priority)); + } + + #else diff --git a/libs/re/Makefile b/libs/re/Makefile index 07c133d04af..64e55aa7759 100644 --- a/libs/re/Makefile +++ b/libs/re/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010-2014 OpenWrt.org +# Copyright (C) 2010-2015 OpenWrt.org # Copyright (C) 2010 Alfred E. Heggestad # # This is free software, licensed under the GNU General Public License v2. @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=re -PKG_VERSION:=0.4.10 +PKG_VERSION:=0.4.13 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.creytiv.com/pub -PKG_MD5SUM:=2966ad3db2ca34ea865825533e7b7d55 +PKG_MD5SUM:=d5405878ca66c09d5e2e3b4e3d0c4c26 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=docs/COPYING @@ -33,7 +33,7 @@ endef TARGET_CFLAGS += $(FPIC) -ifneq ($(CONFIG_USE_EGLIBC),) +ifneq ($(CONFIG_USE_GLIBC)$(CONFIG_USE_MUSL),) TARGET_CFLAGS += -D_GNU_SOURCE endif diff --git a/libs/rem/patches/100-no-pthread_rwlockattr_setkind_np-on-musl.patch b/libs/rem/patches/100-no-pthread_rwlockattr_setkind_np-on-musl.patch new file mode 100644 index 00000000000..43e6d32e246 --- /dev/null +++ b/libs/rem/patches/100-no-pthread_rwlockattr_setkind_np-on-musl.patch @@ -0,0 +1,13 @@ +Index: rem-0.4.6/src/vidmix/vidmix.c +=================================================================== +--- rem-0.4.6.orig/src/vidmix/vidmix.c ++++ rem-0.4.6/src/vidmix/vidmix.c +@@ -343,7 +343,7 @@ int vidmix_alloc(struct vidmix **mixp) + return err; + } + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + err = pthread_rwlockattr_setkind_np(&attr, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); + if (err) diff --git a/net/asterisk-1.8.x-chan-sccp-b/Makefile b/net/asterisk-1.8.x-chan-sccp-b/Makefile deleted file mode 100644 index 4e557c7b7f3..00000000000 --- a/net/asterisk-1.8.x-chan-sccp-b/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=asterisk18-chan-sccp-b -PKG_REV:=5738 -PKG_VERSION:=v4.2-r$(PKG_REV) -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/tags/openwrt -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=svn - -PKG_FIXUP:=autoreconf -fi - -PKG_LICENSE:=GPL-1.0 -PKG_LICENSE_FILES:=COPYING LICENSE -PKG_MAINTAINER:=Jiri Slachta - -include $(INCLUDE_DIR)/package.mk - -define Package/asterisk18-chan-sccp-b - SUBMENU:=Telephony - SECTION:=net - CATEGORY:=Network - TITLE:=SCCP channel provider support - URL:=http://chan-sccp-b.sourceforge.net/ - DEPENDS:=asterisk18 +libltdl -endef - -define Package/asterisk18-chan-sccp-b/description - SCCP channel provider for asterisk. It delivers extended functionality for SCCP phones over chan_skinny delivered - by asterisk by default. -endef - -define Build/Configure - $(call Build/Configure/Default,--with-asterisk=$(STAGING_DIR)/usr/include/asterisk-1.8) -endef - -define Build/Compile - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - CFLAGS="$(CFLAGS) -I$(PKG_BUILD_DIR)/src -DLOW_MEMORY" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Package/asterisk18-chan-sccp-b/conffiles -/etc/asterisk/sccp.conf -endef - -define Package/asterisk18-chan-sccp-b/install - $(INSTALL_DIR) $(1)/etc/asterisk - $(CP) ./files/sccp.openwrt.conf $(1)/etc/asterisk/sccp.conf - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_sccp.so $(1)/usr/lib/asterisk/modules/ -endef - -$(eval $(call BuildPackage,asterisk18-chan-sccp-b)) diff --git a/net/asterisk-1.8.x-codec-g729/Makefile b/net/asterisk-1.8.x-codec-g729/Makefile deleted file mode 100644 index e789f28cf9e..00000000000 --- a/net/asterisk-1.8.x-codec-g729/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=asterisk18-codec-g729 -PKG_VERSION:=1.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=asterisk-g72x-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://asterisk.hosting.lv/src/ -PKG_MD5SUM:=a830aefa27634787f41ff8b209ba585b - -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME) -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=README.md -PKG_MAINTAINER:=Alex Samorukov - -include $(INCLUDE_DIR)/package.mk - -define Package/asterisk18-codec-g729 - SUBMENU:=Telephony - SECTION:=net - CATEGORY:=Network - URL:=http://asterisk.hosting.lv - DEPENDS:= asterisk18 +bcg729 - TITLE:=G.729 codec for Asterisk open source PBX -endef - -define Package/asterisk11-codec-g729/description - Asterisk G.729 codec based on bcg729 implementation. -endef - -MAKE_ARGS:= \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_LD)" \ - CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-1.8/include -DHAVE_CONFIG_H -I. -fPIC" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" - -CONFIGURE_ARGS+=\ - --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-11/include \ - --with-asterisk18 \ - --with-bcg729 \ - --enable-shared \ - $(MAKE_ARGS) - -define Build/Prepare - rm -rf $(PKG_BUILD_DIR)/ - mkdir -p $(PKG_BUILD_DIR)/ - $(TAR) -xvjf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1 - $(Build/Patch) -endef - -define Package/asterisk18-codec-g729/install - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_g729.so $(1)/usr/lib/asterisk/modules/ -endef - -$(eval $(call BuildPackage,asterisk18-codec-g729)) diff --git a/net/asterisk-1.8.x/Makefile b/net/asterisk-1.8.x/Makefile index 60333f0ae69..020ab32867d 100644 --- a/net/asterisk-1.8.x/Makefile +++ b/net/asterisk-1.8.x/Makefile @@ -1,5 +1,6 @@ # -# Copyright (C) 2014 OpenWrt.org +# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015 Cesnet, z.s.p.o. # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk18 -PKG_VERSION:=1.8.32.0 -PKG_RELEASE:=1 +PKG_VERSION:=1.8.32.3 +PKG_RELEASE:=3 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/ -PKG_MD5SUM:=ef5b0b9c49fcb9964e93b45cfe25882d +PKG_MD5SUM:=f13f126e7730710223f2fbbc8832966f PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) @@ -60,8 +61,7 @@ $(5) endef define Package/asterisk18-$(1)/description - $$(call Package/asterisk18/Default/description) -This package provides support $(3) in Asterisk. +This package provides support for '$(3)' in Asterisk. endef define Package/asterisk18-$(1)/install @@ -111,7 +111,6 @@ define Package/asterisk18/conffiles /etc/asterisk/logger.conf /etc/asterisk/manager.conf /etc/asterisk/rtp.conf -/etc/default/asterisk /etc/init.d/asterisk endef @@ -126,8 +125,6 @@ define Package/asterisk18/install $(call Package/asterisk18/install/sbin,$(1),asterisk) $(foreach m,$(AST_CFG_FILES),$(call Package/asterisk18/install/conffile,$(1),$(m));) $(foreach m,$(AST_EMB_MODULES),$(call Package/asterisk18/install/module,$(1),$(m));) - $(INSTALL_DIR) $(1)/etc/default - $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk endef @@ -139,8 +136,7 @@ $(call Package/asterisk18/Default) endef define Package/asterisk18-sounds/description -$(call Package/asterisk18/Default/description) -This package provides sounds for Asterisk. +This package provides sound-files for Asterisk-1.8.x. endef define Package/asterisk18-sounds/install @@ -170,7 +166,7 @@ endif ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mysql),) CONFIGURE_ARGS+= \ - --with-mysqlclient + --with-mysqlclient="$(STAGING_DIR)/usr" else CONFIGURE_ARGS+= \ --without-mysqlclient @@ -222,6 +218,8 @@ CONFIGURE_ARGS+= \ --without-misdn \ --without-nbs \ --with-ncurses="$(STAGING_DIR)/usr" \ + --without-neon \ + --without-neon29 \ --without-netsnmp \ --without-newt \ --without-ogg \ @@ -243,8 +241,10 @@ CONFIGURE_ARGS+= \ define Build/Prepare $(call Build/Prepare/Default) ifneq ($(CONFIG_TARGET_lantiq),) +ifneq ($(CONFIG_TARGET_lantiq_xrx200),y) $(CP) ./src-lantiq/* $(PKG_BUILD_DIR)/ endif +endif endef define Build/Configure @@ -317,8 +317,8 @@ $(eval $(call BuildAsterisk18Module,app-talkdetect,File playback with audio dete $(eval $(call BuildAsterisk18Module,app-verbose,Verbose logging,Verbose logging application,,,,app_verbose,)) $(eval $(call BuildAsterisk18Module,app-waituntil,Sleep,support sleeping until the given epoch,,,,app_waituntil,)) $(eval $(call BuildAsterisk18Module,app-while,While loop,a while loop implementation,,,,app_while,)) -$(eval $(call BuildAsterisk18Module,cdr,Provides CDR,Call Detail Record,,/etc/asterisk/cdr.conf /etc/asterisk/cdr_custom.conf /etc/asterisk/cdr_manager.conf /etc/asterisk/cdr_syslog.conf,cdr cdr_custom cdr_manager cdr_syslog,app_cdr app_forkcdr cdr_custom cdr_manager cdr_syslog func_cdr,)) $(eval $(call BuildAsterisk18Module,cdr-csv,Provides CDR CSV,Call Detail Record with CSV support,,,,cdr_csv,)) +$(eval $(call BuildAsterisk18Module,cdr,Provides CDR,Call Detail Record,,/etc/asterisk/cdr.conf /etc/asterisk/cdr_custom.conf /etc/asterisk/cdr_manager.conf /etc/asterisk/cdr_syslog.conf,cdr cdr_custom cdr_manager cdr_syslog,app_cdr app_forkcdr cdr_custom cdr_manager cdr_syslog func_cdr,)) $(eval $(call BuildAsterisk18Module,codec-a-mu,Alaw to ulaw translation,translation between alaw and ulaw codecs,,,,codec_a_mu,)) $(eval $(call BuildAsterisk18Module,codec-alaw,Signed linear to alaw translation,translation between signed linear and alaw codecs,,,,codec_alaw,)) $(eval $(call BuildAsterisk18Module,codec-g722,G.722,a high bit rate 48/56/64Kbps ITU standard codec,,,,codec_g722,)) @@ -328,44 +328,50 @@ $(eval $(call BuildAsterisk18Module,format-g726,G.726,support for headerless G.7 $(eval $(call BuildAsterisk18Module,format-g729,G.729,support for raw headerless G729 data,,,,format_g729,)) $(eval $(call BuildAsterisk18Module,format-sln,Raw slinear format,support for raw slinear format,,,,format_sln,)) $(eval $(call BuildAsterisk18Module,format-sln16,Raw slinear 16 format,support for raw slinear 16 format,,,,format_sln16,)) -$(eval $(call BuildAsterisk18Module,func-blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted,,,,func_blacklist,)) $(eval $(call BuildAsterisk18Module,func-base64,base64 support,support of base64 function,,,,func_base64,)) +$(eval $(call BuildAsterisk18Module,func-blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted,,,,func_blacklist,)) $(eval $(call BuildAsterisk18Module,func-cut,CUT function,CUT function,,,,func_cut,)) -$(eval $(call BuildAsterisk18Module,func-db,Database interaction,functions for interaction with the database,,,,func_db,)) +$(eval $(call BuildAsterisk18Module,func-db,Database interaction,functions for interaction with the database,,,,func_db app_db,)) $(eval $(call BuildAsterisk18Module,func-devstate,Blinky lights control,functions for manually controlled blinky lights,,,,func_devstate,)) +$(eval $(call BuildAsterisk18Module,func-enum,ENUM,ENUM,,/etc/asterisk/enum.conf,enum.conf,func_enum,)) +$(eval $(call BuildAsterisk18Module,func-env,Environment functions,Environment dialplan functions,,,,func_env,)) $(eval $(call BuildAsterisk18Module,func-extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control,,,,func_extstate,)) $(eval $(call BuildAsterisk18Module,func-global,Global variable,global variable dialplan functions,,,,func_global,)) $(eval $(call BuildAsterisk18Module,func-groupcount,Group count,for counting number of channels in the specified group,,,,func_groupcount,)) $(eval $(call BuildAsterisk18Module,func-channel,Channel info,Channel info dialplan function,,,,func_channel,)) +$(eval $(call BuildAsterisk18Module,func-math,Math functions,Math functions,,,,func_math,)) +$(eval $(call BuildAsterisk18Module,func-module,Simple module check function,Simple module check function,,,,func_module,)) $(eval $(call BuildAsterisk18Module,func-shell,Shell,support for shell execution,,,,func_shell,)) $(eval $(call BuildAsterisk18Module,func-uri,URI encoding and decoding,Encodes and decodes URI-safe strings,,,,func_uri,)) $(eval $(call BuildAsterisk18Module,func-vmcount,vmcount dialplan,a vmcount dialplan function,,,,func_vmcount,)) $(eval $(call BuildAsterisk18Module,chan-agent,Agents proxy channel,An implementation of agents proxy channel,,,,chan_agent,)) $(eval $(call BuildAsterisk18Module,chan-gtalk,GTalk,An implementation of chan_gtalk and res_jabber for GTalk support,+libiksemel,/etc/asterisk/gtalk.conf /etc/asterisk/jabber.conf,gtalk.conf jabber.conf,chan_gtalk res_jabber,)) $(eval $(call BuildAsterisk18Module,chan-iax2,IAX2 channel,An implementation of IAX2 channel,+asterisk18-res-timing-timerfd,/etc/asterisk/iax.conf /etc/asterisk/iaxprov.conf,iax.conf iaxprov.conf,chan_iax2,)) -$(eval $(call BuildAsterisk18Module,chan-lantiq,Lantiq TAPI channel,An implementation of Lantiq TAPI channel,+kmod-ltq-vmmc,/etc/asterisk/lantiq.conf,lantiq.conf,chan_lantiq,)) +$(eval $(call BuildAsterisk18Module,chan-lantiq,Lantiq TAPI channel,An implementation of Lantiq TAPI channel,@TARGET_lantiq @!TARGET_lantiq_xrx200 +kmod-ltq-vmmc,/etc/asterisk/lantiq.conf,lantiq.conf,chan_lantiq,)) $(eval $(call BuildAsterisk18Module,chan-local,Local proxy channel,An implementation of local proxy channel,,,,chan_local,)) $(eval $(call BuildAsterisk18Module,chan-mgcp,MGCP channel,the channel chan_mgcp,,/etc/asterisk/mgcp.conf,mgcp.conf,chan_mgcp,)) $(eval $(call BuildAsterisk18Module,chan-ooh323,ooH323 channel,the channel chan_ooh323,,/etc/asterisk/ooh323.conf,ooh323.conf,chan_ooh323,)) $(eval $(call BuildAsterisk18Module,chan-skinny,Skinny channel,the channel chan_skinny,,/etc/asterisk/skinny.conf,skinny.conf,chan_skinny,)) $(eval $(call BuildAsterisk18Module,mysql,MySQL,MySQL support,+libmysqlclient,/etc/asterisk/res_config_mysql.conf,res_config_mysql.conf,res_config_mysql,)) $(eval $(call BuildAsterisk18Module,odbc,ODBC,ODBC support,+libpthread +libc +unixodbc,/etc/asterisk/cdr_adaptive_odbc.conf /etc/asterisk/cdr_odbc.conf /etc/asterisk/cel_odbc.conf /etc/asterisk/func_odbc.conf /etc/asterisk/res_odbc.conf,cdr_adaptive_odbc cdr_odbc cel_odbc func_odbc res_odbc,cdr_adaptive_odbc cdr_odbc cel_odbc func_odbc res_config_odbc res_odbc,)) -$(eval $(call BuildAsterisk18Module,pgsql,PostgreSQL,PostgreSQL support,+libpq,/etc/asterisk/cel_pgsql.conf /etc/asterisk/cdr_pgsql.conf /etc/asterisk/res_pgsql.conf,cel_pgsql.conf cdr_pgsql.conf res_pgsql.conf,cel_pgsql cdr_pgsql res_config_pgsql,)) $(eval $(call BuildAsterisk18Module,pbx-ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic,,,extensions.ael,pbx_ael,)) -$(eval $(call BuildAsterisk18Module,pbx-spool,Call Spool,Outgoing call spool support,,,,pbx_spool,)) +$(eval $(call BuildAsterisk18Module,pbx-dundi,Dundi,provides Dundi Lookup service for Asterisk,,/etc/asterisk/dundi.conf,dundi.conf,pbx_dundi,)) $(eval $(call BuildAsterisk18Module,pbx-lua,Lua,provides Lua resources for Asterisk,+libpthread +libc +liblua,/etc/asterisk/extensions.lua,extensions.lua,pbx_lua,)) +$(eval $(call BuildAsterisk18Module,pbx-spool,Call Spool,Outgoing call spool support,,,,pbx_spool,)) +$(eval $(call BuildAsterisk18Module,pgsql,PostgreSQL,PostgreSQL support,+libpq,/etc/asterisk/cel_pgsql.conf /etc/asterisk/cdr_pgsql.conf /etc/asterisk/res_pgsql.conf,cel_pgsql.conf cdr_pgsql.conf res_pgsql.conf,cel_pgsql cdr_pgsql res_config_pgsql,)) $(eval $(call BuildAsterisk18Module,res-ael-share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules,,,,res_ael_share,)) $(eval $(call BuildAsterisk18Module,res-agi,Asterisk Gateway Interface,support for the Asterisk Gateway Interface extension,,,,res_agi,)) $(eval $(call BuildAsterisk18Module,res-clioriginate,Calls via CLI,Originate calls via the CLI,,,,res_clioriginate,)) $(eval $(call BuildAsterisk18Module,res-crypto,Provides Crypto,Cryptographic Signature capability,,,,res_crypto,)) +$(eval $(call BuildAsterisk18Module,res-fax-spandsp,Spandsp T.38 and G.711,Spandsp T.38 and G.711 FAX Resource,+asterisk18-res-fax +libspandsp +libtiff,,,res_fax_spandsp,)) +$(eval $(call BuildAsterisk18Module,res-fax,FAX modules,Generic FAX resource for FAX technology resource modules,+asterisk18-res-timing-pthread,/etc/asterisk/res_fax.conf /etc/asterisk/udptl.conf,udptl.conf res_fax.conf,res_fax,)) $(eval $(call BuildAsterisk18Module,res-monitor,Provides Monitor,Cryptographic Signature capability,,,,res_monitor,)) +$(eval $(call BuildAsterisk18Module,res-musiconhold,MOH,Music On Hold support,,/etc/asterisk/musiconhold.conf,musiconhold.conf,res_musiconhold,)) $(eval $(call BuildAsterisk18Module,res-phoneprov,Phone Provisioning,Phone provisioning application for the asterisk internal http server,,/etc/asterisk/phoneprov.conf,phoneprov.conf,res_phoneprov,)) $(eval $(call BuildAsterisk18Module,res-pktccops,Provide PacketCable COPS,simple client/server model for supporting policy control over QoS signaling protocols,,/etc/asterisk/res_pktccops.conf,res_pktccops.conf,res_pktccops,)) $(eval $(call BuildAsterisk18Module,res-smdi,Provide SMDI,Simple Message Desk Interface capability,,/etc/asterisk/smdi.conf,smdi.conf,res_smdi,)) -$(eval $(call BuildAsterisk18Module,res-fax,FAX modules,Generic FAX resource for FAX technology resource modules,+asterisk18-res-timing-pthread,/etc/asterisk/res_fax.conf /etc/asterisk/udptl.conf,udptl.conf res_fax.conf,res_fax,)) -$(eval $(call BuildAsterisk18Module,res-fax-spandsp,Spandsp T.38 and G.711,Spandsp T.38 and G.711 FAX Resource,+asterisk18-res-fax +libspandsp +libtiff,,,res_fax_spandsp,)) -$(eval $(call BuildAsterisk18Module,res-musiconhold,MOH,Music On Hold support,,/etc/asterisk/musiconhold.conf,musiconhold.conf,res_musiconhold,)) $(eval $(call BuildAsterisk18Module,res-srtp,SRTP,Secure RTP,+libsrtp,,,res_srtp,)) $(eval $(call BuildAsterisk18Module,res-timing-pthread,pthread Timing Interface,,,,,res_timing_pthread,)) $(eval $(call BuildAsterisk18Module,res-timing-timerfd,Timerfd Timing Interface,,,,,res_timing_timerfd,)) $(eval $(call BuildAsterisk18Module,voicemail,Voicemail,voicemail related modules,,/etc/asterisk/voicemail.conf,voicemail.conf,*voicemail res_adsi res_smdi,vm-*)) + diff --git a/net/asterisk-1.8.x/files/asterisk.init b/net/asterisk-1.8.x/files/asterisk.init index ec3b60bf033..cce8a096197 100644 --- a/net/asterisk-1.8.x/files/asterisk.init +++ b/net/asterisk-1.8.x/files/asterisk.init @@ -5,12 +5,10 @@ START=99 APP=asterisk OPTIONS= DEST= -DEFAULT=$DEST/etc/default/$APP BIN_FILE=$DEST/usr/sbin/$APP PID_FILE=$DEST/var/run/$APP/$APP.pid start() { - [ -f $DEFAULT ] && . $DEFAULT [ -d $DEST/var/run/asterisk ] || mkdir -p $DEST/var/run/asterisk [ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk [ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk diff --git a/net/asterisk-1.8.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch b/net/asterisk-1.8.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch new file mode 100644 index 00000000000..739a939ba14 --- /dev/null +++ b/net/asterisk-1.8.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch @@ -0,0 +1,26 @@ +Index: asterisk-1.8.32.3/res/ael/ael.flex +=================================================================== +--- asterisk-1.8.32.3.orig/res/ael/ael.flex ++++ asterisk-1.8.32.3/res/ael/ael.flex +@@ -595,7 +595,7 @@ includes { STORE_POS; return KW_INCLUDES + snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); + ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); + } +-#ifdef SOLARIS ++#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU) + glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); + #else + glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); +Index: asterisk-1.8.32.3/res/ael/ael_lex.c +=================================================================== +--- asterisk-1.8.32.3.orig/res/ael/ael_lex.c ++++ asterisk-1.8.32.3/res/ael/ael_lex.c +@@ -1966,7 +1966,7 @@ YY_RULE_SETUP + snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); + ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); + } +-#ifdef SOLARIS ++#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU) + glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); + #else + glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); diff --git a/net/asterisk-1.8.x/patches/900-revert-r416994.patch b/net/asterisk-1.8.x/patches/900-revert-r416994.patch new file mode 100644 index 00000000000..a1e30e65904 --- /dev/null +++ b/net/asterisk-1.8.x/patches/900-revert-r416994.patch @@ -0,0 +1,162 @@ +Index: asterisk-1.8.32.3/autoconf/ast_ext_tool_check.m4 +=================================================================== +--- asterisk-1.8.32.3.orig/autoconf/ast_ext_tool_check.m4 ++++ asterisk-1.8.32.3/autoconf/ast_ext_tool_check.m4 +@@ -5,37 +5,39 @@ + # AST_EXT_TOOL_CHECK([package], [tool name], [--cflags], [--libs], [includes], [expression]) + AC_DEFUN([AST_EXT_TOOL_CHECK], + [ +- if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then +- PBX_$1=0 +- AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH]) +- if test ! "x${CONFIG_$1}" = xNo; then +- if test x"$3" = x ; then A=--cflags ; else A="$3" ; fi +- $1_INCLUDE=$(${CONFIG_$1} $A) +- $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g") +- +- if test x"$4" = x ; then A=--libs ; else A="$4" ; fi +- $1_LIB=$(${CONFIG_$1} $A) +- $1_LIB=$(echo ${$1_LIB} | $SED -e "s|-L|-L${$1_DIR}|g") +- +- if test x"$5" != x ; then +- saved_cppflags="${CPPFLAGS}" +- CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}" ++ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then ++ PBX_$1=0 ++ AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH]) ++ if test ! "x${CONFIG_$1}" = xNo; then ++ if test x"$3" = x ; then A=--cflags ; else A="$3" ; fi ++ $1_INCLUDE=$(${CONFIG_$1} $A) ++ if test x"$4" = x ; then A=--libs ; else A="$4" ; fi ++ $1_LIB=$(${CONFIG_$1} $A) ++ if test x"$5" != x ; then ++ saved_cppflags="${CPPFLAGS}" ++ if test "x${$1_DIR}" != "x"; then ++ $1_INCLUDE="-I${$1_DIR}/include" ++ fi ++ CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}" + +- saved_libs="${LIBS}" +- LIBS=${$1_LIB} ++ saved_libs="${LIBS}" ++ LIBS="${$1_LIB}" + +- AC_LINK_IFELSE( +- [ AC_LANG_PROGRAM( [ $5 ], [ $6; ])], +- [ PBX_$1=1 AC_DEFINE([HAVE_$1], 1, +- [Define if your system has the $1 headers.])], +- [] +- ) +- CPPFLAGS="${saved_cppflags}" +- LIBS="${saved_libs}" +- else +- PBX_$1=1 +- AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.]) +- fi +- fi ++ AC_LINK_IFELSE( ++ [ AC_LANG_PROGRAM( [ $5 ], ++ [ $6; ] ++ )], ++ [ PBX_$1=1 ++ AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.]) ++ ], ++ [] ++ ) ++ CPPFLAGS="${saved_cppflags}" ++ LIBS="${saved_libs}" ++ else ++ PBX_$1=1 ++ AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.]) ++ fi + fi ++ fi + ]) +Index: asterisk-1.8.32.3/configure +=================================================================== +--- asterisk-1.8.32.3.orig/configure ++++ asterisk-1.8.32.3/configure +@@ -12663,11 +12663,9 @@ fi + if test ! "x${CONFIG_LIBXML2}" = xNo; then + if test x"" = x ; then A=--cflags ; else A="" ; fi + LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A) +- LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g") + + if test x"" = x ; then A=--libs ; else A="" ; fi + LIBXML2_LIB=$(${CONFIG_LIBXML2} $A) +- LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g") + + if test x"#include + #include " != x ; then +@@ -21027,11 +21025,9 @@ fi + if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then + if test x"" = x ; then A=--cflags ; else A="" ; fi + MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} $A) +- MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g") + + if test x"" = x ; then A=--libs ; else A="" ; fi + MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} $A) +- MYSQLCLIENT_LIB=$(echo ${MYSQLCLIENT_LIB} | $SED -e "s|-L|-L${MYSQLCLIENT_DIR}|g") + + if test x"" != x ; then + saved_cppflags="${CPPFLAGS}" +@@ -21281,11 +21277,9 @@ fi + if test ! "x${CONFIG_NEON}" = xNo; then + if test x"" = x ; then A=--cflags ; else A="" ; fi + NEON_INCLUDE=$(${CONFIG_NEON} $A) +- NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g") + + if test x"" = x ; then A=--libs ; else A="" ; fi + NEON_LIB=$(${CONFIG_NEON} $A) +- NEON_LIB=$(echo ${NEON_LIB} | $SED -e "s|-L|-L${NEON_DIR}|g") + + if test x"" != x ; then + saved_cppflags="${CPPFLAGS}" +@@ -21430,11 +21424,9 @@ fi + if test ! "x${CONFIG_NEON29}" = xNo; then + if test x"" = x ; then A=--cflags ; else A="" ; fi + NEON29_INCLUDE=$(${CONFIG_NEON29} $A) +- NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g") + + if test x"--libs" = x ; then A=--libs ; else A="--libs" ; fi + NEON29_LIB=$(${CONFIG_NEON29} $A) +- NEON29_LIB=$(echo ${NEON29_LIB} | $SED -e "s|-L|-L${NEON29_DIR}|g") + + if test x"#include " != x ; then + saved_cppflags="${CPPFLAGS}" +@@ -21581,11 +21573,9 @@ fi + if test ! "x${CONFIG_NETSNMP}" = xNo; then + if test x"" = x ; then A=--cflags ; else A="" ; fi + NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A) +- NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g") + + if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi + NETSNMP_LIB=$(${CONFIG_NETSNMP} $A) +- NETSNMP_LIB=$(echo ${NETSNMP_LIB} | $SED -e "s|-L|-L${NETSNMP_DIR}|g") + + if test x"#include + #include +@@ -28255,11 +28245,9 @@ fi + if test ! "x${CONFIG_GMIME}" = xNo; then + if test x"" = x ; then A=--cflags ; else A="" ; fi + GMIME_INCLUDE=$(${CONFIG_GMIME} $A) +- GMIME_INCLUDE=$(echo ${GMIME_INCLUDE} | $SED -e "s|-I|-I${GMIME_DIR}|g") + + if test x"" = x ; then A=--libs ; else A="" ; fi + GMIME_LIB=$(${CONFIG_GMIME} $A) +- GMIME_LIB=$(echo ${GMIME_LIB} | $SED -e "s|-L|-L${GMIME_DIR}|g") + + if test x"#include " != x ; then + saved_cppflags="${CPPFLAGS}" +@@ -29377,11 +29365,9 @@ fi + if test ! "x${CONFIG_SDL}" = xNo; then + if test x"" = x ; then A=--cflags ; else A="" ; fi + SDL_INCLUDE=$(${CONFIG_SDL} $A) +- SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g") + + if test x"" = x ; then A=--libs ; else A="" ; fi + SDL_LIB=$(${CONFIG_SDL} $A) +- SDL_LIB=$(echo ${SDL_LIB} | $SED -e "s|-L|-L${SDL_DIR}|g") + + if test x"" != x ; then + saved_cppflags="${CPPFLAGS}" diff --git a/net/asterisk-1.8.x/src-lantiq/channels/chan_lantiq.c b/net/asterisk-1.8.x/src-lantiq/channels/chan_lantiq.c index 6e2b5022c03..153730920a3 100644 --- a/net/asterisk-1.8.x/src-lantiq/channels/chan_lantiq.c +++ b/net/asterisk-1.8.x/src-lantiq/channels/chan_lantiq.c @@ -49,6 +49,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: xxx $") #include #include #include +#include #include #ifdef HAVE_LINUX_COMPILER_H #include diff --git a/net/asterisk-11.x-chan-dongle/Makefile b/net/asterisk-11.x-chan-dongle/Makefile index 49278220a45..2d85a49a497 100644 --- a/net/asterisk-11.x-chan-dongle/Makefile +++ b/net/asterisk-11.x-chan-dongle/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk11-chan-dongle PKG_VERSION:=1.1r35 PKG_REV:=28a46567a88cebdc365db6f294e682246fd2dd7b -PKG_RELEASE:=3 +PKG_RELEASE:=6 PKG_SOURCE_SUBDIR:=asterisk11-chan-dongle-$(PKG_VERSION) PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz @@ -44,7 +44,7 @@ endef MAKE_ARGS:= \ CC="$(TARGET_CC)" \ LD="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv-full/include -I$(STAGING_DIR)/usr/include/asterisk-11/include -DHAVE_CONFIG_H -I. -fPIC" \ + CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_GNU_SOURCE -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv-full/include -I$(STAGING_DIR)/usr/include/asterisk-11/include -DHAVE_CONFIG_H -I. -fPIC" \ LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv" \ DESTDIR="$(PKG_INSTALL_DIR)/usr/lib/asterisk/modules" diff --git a/net/asterisk-11.x-chan-dongle/patches/001-add-send-ussd.patch b/net/asterisk-11.x-chan-dongle/patches/001-add-send-ussd.patch index 4ea41b15fcc..bc59bf927c1 100644 --- a/net/asterisk-11.x-chan-dongle/patches/001-add-send-ussd.patch +++ b/net/asterisk-11.x-chan-dongle/patches/001-add-send-ussd.patch @@ -1,6 +1,6 @@ --- a/app.c +++ b/app.c -@@ -114,7 +114,44 @@ +@@ -114,7 +114,44 @@ static int app_send_sms_exec (attribute_ return !status; } @@ -45,7 +45,7 @@ static const struct dongle_application { -@@ -144,7 +181,15 @@ +@@ -144,7 +181,15 @@ static const struct dongle_application " Message - text of the message\n" " Validity - Validity period in minutes\n" " Report - Boolean flag for report request\n" diff --git a/net/asterisk-11.x-chan-dongle/patches/050-add-E1752-to-seven_bit_modems.patch b/net/asterisk-11.x-chan-dongle/patches/050-add-E1752-to-seven_bit_modems.patch new file mode 100644 index 00000000000..a2c490ca359 --- /dev/null +++ b/net/asterisk-11.x-chan-dongle/patches/050-add-E1752-to-seven_bit_modems.patch @@ -0,0 +1,19 @@ +From da5cd41e8554eaf1133f85282c253da2c74ff7eb Mon Sep 17 00:00:00 2001 +From: "bg_one@mail.ru" +Date: Fri, 6 Sep 2013 19:37:05 +0000 +Subject: [PATCH] added E1752 to seven_bit_modems + +--- + at_response.c | 1 + + 1 files changed, 1 insertions(+), 0 deletion(-) + +--- a/at_response.c ++++ b/at_response.c +@@ -1590,6 +1590,7 @@ static int at_response_cgmm (struct pvt* + "E171", + "E153", + "E156B", ++ "E1752", + }; + + ast_copy_string (pvt->model, str, sizeof (pvt->model)); diff --git a/net/asterisk-11.x-chan-dongle/patches/051-bump-package-revision.patch b/net/asterisk-11.x-chan-dongle/patches/051-bump-package-revision.patch new file mode 100644 index 00000000000..3d85dd64df6 --- /dev/null +++ b/net/asterisk-11.x-chan-dongle/patches/051-bump-package-revision.patch @@ -0,0 +1,20 @@ +From da5cd41e8554eaf1133f85282c253da2c74ff7eb Mon Sep 17 00:00:00 2001 +From: "bg_one@mail.ru" +Date: Fri, 6 Sep 2013 19:37:05 +0000 +Subject: [PATCH] added E1752 to seven_bit_modems + +--- + configure.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +--- a/configure.in ++++ b/configure.in +@@ -2,7 +2,7 @@ dnl init + dnl AC_REVISION($Revision: 1.30 $) + AC_PREREQ([2.60]) + AC_INIT([chan_dongle],[1.1],[http://code.google.com/p/asterisk-chan-dongle/issues/list],[chan_dongle],[http://code.google.com/p/asterisk-chan-dongle]) +-PACKAGE_REVISION="34" ++PACKAGE_REVISION="35" + AC_CANONICAL_TARGET + AM_INIT_AUTOMAKE + AC_CONFIG_HEADERS([config.h]) diff --git a/net/asterisk-11.x-chan-dongle/patches/100-fix-audio-on-big-endian-systems.patch b/net/asterisk-11.x-chan-dongle/patches/100-fix-audio-on-big-endian-systems.patch new file mode 100644 index 00000000000..a6b1c07961c --- /dev/null +++ b/net/asterisk-11.x-chan-dongle/patches/100-fix-audio-on-big-endian-systems.patch @@ -0,0 +1,46 @@ +--- a/channel.c ++++ b/channel.c +@@ -495,6 +495,19 @@ again: + } + } + ++// see https://github.com/openwrt/telephony/issues/7 ++static inline void change_audio_endianness_to_le(struct iovec *iov, int iovcnt) ++{ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++ return; // nothing to do ++#else ++ for(;iovcnt-->0;iov++) ++ { ++ ast_swapcopy_samples(iov->iov_base, iov->iov_base, iov->iov_len/2); ++ } ++#endif ++} ++ + #/* */ + static void timing_write (struct pvt* pvt) + { +@@ -522,6 +535,7 @@ static void timing_write (struct pvt* pv + iovcnt = mixb_read_n_iov (&pvt->a_write_mixb, iov, FRAME_SIZE); + mixb_read_n_iov (&pvt->a_write_mixb, iov, FRAME_SIZE); + mixb_read_upd (&pvt->a_write_mixb, FRAME_SIZE); ++ change_audio_endianness_to_le(iov, iovcnt); + } + else if (used > 0) + { +@@ -535,6 +549,7 @@ static void timing_write (struct pvt* pv + iov[iovcnt].iov_base = silence_frame; + iov[iovcnt].iov_len = FRAME_SIZE - used; + iovcnt++; ++ change_audio_endianness_to_le(iov, iovcnt); + } + else + { +@@ -544,6 +559,7 @@ static void timing_write (struct pvt* pv + iov[0].iov_base = silence_frame; + iov[0].iov_len = FRAME_SIZE; + iovcnt = 1; ++ // ignore endianness for zeros + // continue; + } + diff --git a/net/asterisk-11.x-chan-sccp-b/Makefile b/net/asterisk-11.x-chan-sccp-b/Makefile deleted file mode 100644 index 8fb660a116d..00000000000 --- a/net/asterisk-11.x-chan-sccp-b/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=asterisk11-chan-sccp-b -PKG_REV:=5738 -PKG_VERSION:=v4.2-r$(PKG_REV) -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/tags/openwrt -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=svn - -PKG_FIXUP:=autoreconf -fi - -PKG_LICENSE:=GPL-1.0 -PKG_LICENSE_FILES:=COPYRIGHT LICENSE -PKG_MAINTAINER:=Jiri Slachta - -include $(INCLUDE_DIR)/package.mk - -define Package/asterisk11-chan-sccp-b - SUBMENU:=Telephony - SECTION:=net - CATEGORY:=Network - TITLE:=SCCP channel provider support - URL:=http://chan-sccp-b.sourceforge.net/ - DEPENDS:=asterisk11 +libltdl -endef - -define Package/asterisk11-chan-sccp-b/description - SCCP channel provider for asterisk. It delivers extended functionality for SCCP phones over chan_skinny delivered - by asterisk by default. -endef - -define Build/Configure - $(call Build/Configure/Default,--with-asterisk=$(STAGING_DIR)/usr/include/asterisk-11) -endef - -define Build/Compile - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - CFLAGS="$(CFLAGS) -I$(PKG_BUILD_DIR)/src -DLOW_MEMORY" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Package/asterisk11-chan-sccp-b/conffiles -/etc/asterisk/sccp.conf -endef - -define Package/asterisk11-chan-sccp-b/install - $(INSTALL_DIR) $(1)/etc/asterisk - $(CP) ./files/sccp.openwrt.conf $(1)/etc/asterisk/sccp.conf - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_sccp.so $(1)/usr/lib/asterisk/modules/ -endef - -$(eval $(call BuildPackage,asterisk11-chan-sccp-b)) diff --git a/net/asterisk-11.x-chan-sccp-b/files/sccp.openwrt.conf b/net/asterisk-11.x-chan-sccp-b/files/sccp.openwrt.conf deleted file mode 100644 index c59f4cdb1a4..00000000000 --- a/net/asterisk-11.x-chan-sccp-b/files/sccp.openwrt.conf +++ /dev/null @@ -1,89 +0,0 @@ -[general] -servername = Openwrt -keepalive = 60 -debug = core -context = default -dateformat = D/M/Y -bindaddr = 192.168.1.1 -port = 2000 -disallow=all -allow=ulaw -allow=alaw -allow=gsm -firstdigittimeout = 16 -digittimeout = 6 -autoanswer_ring_time = 1 -musicclass=default -language=en -deny=0.0.0.0/0.0.0.0 -permit=192.168.1.0/255.255.255.0 -protocolversion=17 - -hotline_enabled=yes -hotline_context=default -hotline_extension=111 - -[SEP001122334455] -type = device -description = Phone Number One -devicetype = 7940 -button = line, 111 -button = line, 113@01:shared -button = speeddial,Phone 2 Line 1, 112, 112@hint - -[SEP00a1a2a3a4a5] -type = device -description = Phone Number Two -devicetype = 7960 -button = line, 112 -button = line, 113@01:shared -button = speeddial,Phone 1 Line 1, 111, 111@hint - -[111] -id = 1000 -type = line -pin = 1234 -label = Phone 1 Line 1 -description = Line 111 -mailbox = 10111 -cid_name = Phone 1 CID -cid_num = 111 -accountcode=79111 -callgroup=1 -pickupgroup=1 -context = default -incominglimit = 2 -vmnum = 600 -trnsfvm = 1000 - -[112] -id = 1001 -type = line -pin = 1234 -label = Phone 2 Line 1 -description = Line 112 -mailbox = 10112 -cid_name = Phone 2 CID -cid_num = 112 -accountcode=79112 -callgroup=1 -pickupgroup=1 -context = default -incominglimit = 2 -vmnum = 600 -trnsfvm = 1000 - -[113] -id = 1002 -type = line -pin = 1234 -label = SharedLine 1 -description = Line 113 -mailbox = 10113 -cid_name = Shared -cid_num = 113 -accountcode=79113 -incominglimit = 2 -vmnum = 600 -trnsfvm = 1000 - diff --git a/net/asterisk-11.x-codec-g729/Makefile b/net/asterisk-11.x-codec-g729/Makefile deleted file mode 100644 index 62359d9a9ce..00000000000 --- a/net/asterisk-11.x-codec-g729/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=asterisk11-codec-g729 -PKG_VERSION:=1.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=asterisk-g72x-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://asterisk.hosting.lv/src/ -PKG_MD5SUM:=a830aefa27634787f41ff8b209ba585b - -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME) -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=README.md -PKG_MAINTAINER:=Alex Samorukov - -include $(INCLUDE_DIR)/package.mk - -define Package/asterisk11-codec-g729 - SUBMENU:=Telephony - SECTION:=net - CATEGORY:=Network - URL:=http://asterisk.hosting.lv - DEPENDS:= asterisk11 +bcg729 - TITLE:=G.729 codec for Asterisk open source PBX -endef - -define Package/asterisk11-codec-g729/description - Asterisk G.729 codec based on bcg729 implementation. -endef - -MAKE_ARGS:= \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_LD)" \ - CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-11/include -DHAVE_CONFIG_H -I. -fPIC" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" - -CONFIGURE_ARGS+=\ - --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-11/include \ - --with-asterisk100 \ - --with-bcg729 \ - --enable-shared \ - $(MAKE_ARGS) - -define Build/Prepare - rm -rf $(PKG_BUILD_DIR)/ - mkdir -p $(PKG_BUILD_DIR)/ - $(TAR) -xvjf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1 - $(Build/Patch) -endef - -define Package/asterisk11-codec-g729/install - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_g729.so $(1)/usr/lib/asterisk/modules/ -endef - -$(eval $(call BuildPackage,asterisk11-codec-g729)) diff --git a/net/asterisk-11.x/Makefile b/net/asterisk-11.x/Makefile index 2b9e0ccb474..fe3e19bbb7a 100644 --- a/net/asterisk-11.x/Makefile +++ b/net/asterisk-11.x/Makefile @@ -1,5 +1,6 @@ # -# Copyright (C) 2014 OpenWrt.org +# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015 Cesnet, z.s.p.o. # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,19 +9,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk11 -PKG_VERSION:=11.14.0 -PKG_RELEASE:=1 +PKG_VERSION:=11.19.0 +PKG_RELEASE:=2 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/ -PKG_MD5SUM:=7ec6fe5a1ced2e29cc24656df8400e43 +PKG_MD5SUM:=f10259509aeda1e9f47dd57e5cc23680 + +PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=libxml2/host PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING LICENSE PKG_MAINTAINER:=Jiri Slachta -PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) - include $(INCLUDE_DIR)/package.mk define Package/asterisk11/install/module @@ -60,8 +62,7 @@ $(5) endef define Package/asterisk11-$(1)/description - $$(call Package/asterisk11/Default/description) -This package provides support $(3) in Asterisk. +This package provides support for '$(3)' in Asterisk11. endef define Package/asterisk11-$(1)/install @@ -91,7 +92,7 @@ endef define Package/asterisk11 $(call Package/asterisk11/Default) - TITLE:=Complete open source PBX, v11.x + TITLE:=Complete open source PBX, v$(PKG_VERSION) MENU:=1 DEPENDS:=+libopenssl +libncurses +libpopt +libpthread +libsqlite3 +librt +libuuid +zlib @!TARGET_avr32 endef @@ -112,21 +113,24 @@ define Package/asterisk11/conffiles /etc/asterisk/logger.conf /etc/asterisk/manager.conf /etc/asterisk/modules.conf +/etc/asterisk/res_config_sqlite3.conf /etc/asterisk/rtp.conf /etc/asterisk/sip.conf /etc/asterisk/sip_notify.conf /etc/asterisk/udptl.conf /etc/asterisk/users.conf -/etc/default/asterisk /etc/init.d/asterisk endef AST_CFG_FILES:= \ - asterisk.conf acl.conf ccss.conf extconfig.conf extensions.conf features.conf indications.conf logger.conf manager.conf modules.conf \ + asterisk.conf acl.conf ccss.conf extconfig.conf \ + extensions.conf features.conf indications.conf \ + logger.conf manager.conf modules.conf res_config_sqlite3.conf \ rtp.conf sip_notify.conf sip.conf udptl.conf users.conf AST_EMB_MODULES:=\ app_dial app_echo app_macro app_playback codec_ulaw format_pcm func_callerid \ - func_logic func_strings func_timeout chan_sip chan_local pbx_config res_crypto res_http_websocket res_rtp_asterisk res_rtp_multicast + func_logic func_strings func_timeout chan_sip chan_local pbx_config \ + res_crypto res_http_websocket res_rtp_asterisk res_rtp_multicast define Package/asterisk11/install $(call Package/asterisk11/install/lib,$(1),libasteriskssl) @@ -135,8 +139,6 @@ $(call Package/asterisk11/install/sbin,$(1),safe_asterisk) $(call Package/asterisk11/install/sbin,$(1),astgenkey) $(foreach m,$(AST_CFG_FILES),$(call Package/asterisk11/install/conffile,$(1),$(m));) $(foreach m,$(AST_EMB_MODULES),$(call Package/asterisk11/install/module,$(1),$(m));) - $(INSTALL_DIR) $(1)/etc/default - $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk endef @@ -148,8 +150,7 @@ $(call Package/asterisk11/Default) endef define Package/asterisk11-sounds/description -$(call Package/asterisk11/Default/description) -This package provides sounds for Asterisk. +This package provides sounds for Asterisk11. endef define Package/asterisk11-sounds/install @@ -159,6 +160,16 @@ define Package/asterisk11-sounds/install rm -f $(1)/usr/lib/asterisk/sounds/conf-* endef +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk11-chan-dahdi),) + CONFIGURE_ARGS+= \ + --with-dahdi="$(STAGING_DIR)/usr" \ + --with-tonezone="$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= \ + --without-dahdi \ + --without-tonezone +endif + ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk11-curl),) CONFIGURE_ARGS+= \ --with-libcurl="$(STAGING_DIR)/usr" @@ -168,6 +179,8 @@ else endif ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk11-mysql),) + CONFIGURE_VARS+= \ + ac_cv_path_ac_pt_CONFIG_MYSQLCLIENT=$(STAGING_DIR)/usr/bin/mysql_config CONFIGURE_ARGS+= \ --with-mysqlclient else @@ -227,7 +240,6 @@ CONFIGURE_ARGS+= \ --without-bluetooth \ --without-cap \ --without-curses \ - --without-dahdi \ --with-gsm=internal \ --without-gtk2 \ --with-ilbc=internal \ @@ -237,6 +249,8 @@ CONFIGURE_ARGS+= \ --without-nbs \ --with-ncurses="$(STAGING_DIR)/usr" \ --without-netsnmp \ + --without-neon \ + --without-neon29 \ --without-newt \ --without-ogg \ --without-osptk \ @@ -251,7 +265,6 @@ CONFIGURE_ARGS+= \ --without-tds \ --without-termcap \ --without-tinfo \ - --without-tonezone \ --with-uuid="$(STAGING_DIR)/usr" \ --without-vorbis \ --without-vpb \ @@ -259,11 +272,19 @@ CONFIGURE_ARGS+= \ --with-sounds-cache="$(DL_DIR)" \ --disable-xmldoc -define Build/Prepare - $(call Build/Prepare/Default) -endef +CONFIGURE_VARS += \ + ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR)/host/bin/xml2-config + +AST_MENUSELECT_OPTS = \ + --without-newt \ + --without-curses \ + --with-ncurses="$(STAGING_DIR_HOST)/usr" \ + --with-libxml2="$(STAGING_DIR_HOST)/usr" define Build/Configure + (cd $(PKG_BUILD_DIR); \ + ./bootstrap.sh; \ + ); echo "export CFLAGS += $(FPIC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS)"\ " $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)"\ > $(PKG_BUILD_DIR)/res/pjproject/user.mak; @@ -274,11 +295,20 @@ define Build/Configure " $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)"\ >> $(PKG_BUILD_DIR)/res/pjproject/user.mak; $(call Build/Configure/Default,,$(SITE_VARS)) + (cd $(PKG_BUILD_DIR)/menuselect; \ + ./configure \ + $(HOST_CONFIGURE_ARGS) \ + $(AST_MENUSELECT_OPTS) \ + LDFLAGS="$(HOST_LDFLAGS) -lxml2" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOST)/include/libxml2" \ + ); endef define Build/Compile - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - include/asterisk/version.h \ + $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOST)/include/libxml2" \ + LDFLAGS="$(HOST_LDFLAGS) -lxml2" + $(MAKE) -C "$(PKG_BUILD_DIR)" include/asterisk/version.h \ include/asterisk/buildopts.h defaults.h \ makeopts.embed_rules ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" @@ -321,6 +351,8 @@ $(eval $(call BuildPackage,asterisk11-sounds)) $(eval $(call BuildAsterisk11Module,app-alarmreceiver,Alarm receiver,Central Station Alarm receiver for Ademco Contact ID,,,,app_alarmreceiver,)) $(eval $(call BuildAsterisk11Module,app-authenticate,Authenticate commands,Execute arbitrary authenticate commands,,,,app_authenticate,)) $(eval $(call BuildAsterisk11Module,app-confbridge,ConfBridge,Software bridge for multi-party audio conferencing,,/etc/asterisk/confbridge.conf,confbridge.conf,app_confbridge bridge_builtin_features bridge_multiplexed bridge_simple bridge_softmix chan_bridge,)) +$(eval $(call BuildAsterisk11Module,app-dahdiras,Execute an ISDN RAS,support for executing an ISDN RAS using DAHDI,+asterisk11-chan-dahdi,,,app_dahdiras,)) +$(eval $(call BuildAsterisk11Module,app-directory,Provide a directory of extensions,provides a directory of extensions,,,,app_directory,)) $(eval $(call BuildAsterisk11Module,app-directed_pickup,Directed call pickup,support for directed call pickup,,,,app_directed_pickup,)) $(eval $(call BuildAsterisk11Module,app-disa,Direct Inward System Access,Direct Inward System Access,,,,app_disa,)) $(eval $(call BuildAsterisk11Module,app-exec,Exec application,support for application execution,,,,app_exec,)) @@ -342,12 +374,13 @@ $(eval $(call BuildAsterisk11Module,app-talkdetect,File playback with audio dete $(eval $(call BuildAsterisk11Module,app-verbose,Verbose logging,Verbose logging application,,,,app_verbose,)) $(eval $(call BuildAsterisk11Module,app-waituntil,Sleep,support sleeping until the given epoch,,,,app_waituntil,)) $(eval $(call BuildAsterisk11Module,app-while,While loop,a while loop implementation,,,,app_while,)) -$(eval $(call BuildAsterisk11Module,cdr,Provides CDR,Call Detail Record,,/etc/asterisk/cdr.conf /etc/asterisk/cdr_custom.conf /etc/asterisk/cdr_manager.conf /etc/asterisk/cdr_syslog.conf,cdr cdr_custom cdr_manager cdr_syslog,app_cdr app_forkcdr cdr_custom cdr_manager cdr_syslog func_cdr,)) $(eval $(call BuildAsterisk11Module,cdr-csv,Provides CDR CSV,Call Detail Record with CSV support,,,,cdr_csv,)) $(eval $(call BuildAsterisk11Module,cdr-sqlite3,Provides CDR SQLITE3,Call Detail Record with SQLITE3 support,libsqlite3,,,cdr_sqlite3_custom,)) +$(eval $(call BuildAsterisk11Module,cdr,Provides CDR,Call Detail Record,,/etc/asterisk/cdr.conf /etc/asterisk/cdr_custom.conf /etc/asterisk/cdr_manager.conf /etc/asterisk/cdr_syslog.conf,cdr cdr_custom cdr_manager cdr_syslog,app_cdr app_forkcdr cdr_custom cdr_manager cdr_syslog func_cdr,)) $(eval $(call BuildAsterisk11Module,codec-a-mu,Alaw to ulaw translation,translation between alaw and ulaw codecs,,,,codec_a_mu,)) $(eval $(call BuildAsterisk11Module,codec-adpcm,ADPCM text,ADPCM text ,,,,codec_adpcm,)) $(eval $(call BuildAsterisk11Module,codec-alaw,Signed linear to alaw translation,translation between signed linear and alaw codecs,,,,codec_alaw,)) +$(eval $(call BuildAsterisk11Module,codec-dahdi,DAHDI codec,DAHDI native transcoding support,+asterisk11-chan-dahdi,,,codec_dahdi,)) $(eval $(call BuildAsterisk11Module,codec-g722,G.722,a high bit rate 48/56/64Kbps ITU standard codec,,,,codec_g722,)) $(eval $(call BuildAsterisk11Module,codec-g726,Signed linear to G.726 translation,translation between signed linear and ITU G.726-32kbps codecs,,,,codec_g726,)) $(eval $(call BuildAsterisk11Module,codec-gsm,linear to GSM translation,translate between signed linear and GSM,,,,codec_gsm,)) @@ -363,45 +396,57 @@ $(eval $(call BuildAsterisk11Module,format-h264,H264 format,support for H264 for $(eval $(call BuildAsterisk11Module,format-ilbc,ILBC format,support for ILBC format,,,,format_ilbc,)) $(eval $(call BuildAsterisk11Module,format-sln,Raw slinear format,support for raw slinear format,,,,format_sln,)) $(eval $(call BuildAsterisk11Module,format-vox,VOX format,support for ADPCM vox format,,,,format_vox,)) -$(eval $(call BuildAsterisk11Module,format-wav,WAV format (8000hz Signed Linear),support for proprietary Microsoft WAV format (8000hz Signed Linear),,,,format_wav,)) $(eval $(call BuildAsterisk11Module,format-wav-gsm,WAV format (Proprietary GSM),support for proprietary Microsoft WAV format (Proprietary GSM),,,,format_wav_gsm,)) +$(eval $(call BuildAsterisk11Module,format-wav,WAV format (8000hz Signed Linear),support for proprietary Microsoft WAV format (8000hz Signed Linear),,,,format_wav,)) $(eval $(call BuildAsterisk11Module,func-base64,base64 support,support of base64 function,,,,func_base64,)) $(eval $(call BuildAsterisk11Module,func-blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted,,,,func_blacklist,)) $(eval $(call BuildAsterisk11Module,func-cut,CUT function,CUT function,,,,func_cut,)) -$(eval $(call BuildAsterisk11Module,func-db,Database interaction,functions for interaction with the database,,,,func_db,)) +$(eval $(call BuildAsterisk11Module,func-db,Database interaction,functions for interaction with the database,,,,func_db app_db,)) $(eval $(call BuildAsterisk11Module,func-devstate,Blinky lights control,functions for manually controlled blinky lights,,,,func_devstate,)) +$(eval $(call BuildAsterisk11Module,func-enum,ENUM,ENUM,,/etc/asterisk/enum.conf,enum.conf,func_enum,)) +$(eval $(call BuildAsterisk11Module,func-env,Environment functions,Environment dialplan functions,,,,func_env,)) $(eval $(call BuildAsterisk11Module,func-extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control,,,,func_extstate,)) $(eval $(call BuildAsterisk11Module,func-global,Global variable,global variable dialplan functions,,,,func_global,)) $(eval $(call BuildAsterisk11Module,func-groupcount,Group count,for counting number of channels in the specified group,,,,func_groupcount,)) $(eval $(call BuildAsterisk11Module,func-channel,Channel info,Channel info dialplan function,,,,func_channel,)) +$(eval $(call BuildAsterisk11Module,func-math,Math functions,Math functions,,,,func_math,)) +$(eval $(call BuildAsterisk11Module,func-module,Simple module check function,Simple module check function,,,,func_module,)) $(eval $(call BuildAsterisk11Module,func-shell,Shell,support for shell execution,,,,func_shell,)) $(eval $(call BuildAsterisk11Module,func-uri,URI encoding and decoding,Encodes and decodes URI-safe strings,,,,func_uri,)) $(eval $(call BuildAsterisk11Module,func-vmcount,vmcount dialplan,a vmcount dialplan function,,,,func_vmcount,)) +$(eval $(call BuildAsterisk11Module,func-realtime,realtime dialplan,the realtime dialplan function,,,,func_realtime,)) $(eval $(call BuildAsterisk11Module,chan-agent,Agents proxy channel,an implementation of agents proxy channel,,,,chan_agent,)) +$(eval $(call BuildAsterisk11Module,chan-dahdi,DAHDI channel,DAHDI channel support,+dahdi-tools-libtonezone +kmod-dahdi,/etc/asterisk/chan_dahdi.conf,chan_dahdi.conf,chan_dahdi,)) $(eval $(call BuildAsterisk11Module,chan-iax2,IAX2 channel,IAX support,+asterisk11-res-timing-timerfd,/etc/asterisk/iax.conf /etc/asterisk/iaxprov.conf,iax.conf iaxprov.conf,chan_iax2,)) -$(eval $(call BuildAsterisk11Module,chan-motif,Jingle channel,Motif Jingle Channel Driver,+asterisk11-res-xmpp,/etc/asterisk/motif.conf /etc/asterisk/jingle.conf,motif.conf jingle.conf,chan_motif,)) $(eval $(call BuildAsterisk11Module,chan-mgcp,MGCP channel,the channel chan_mgcp,,/etc/asterisk/mgcp.conf,mgcp.conf,chan_mgcp,)) +$(eval $(call BuildAsterisk11Module,chan-motif,Jingle channel,Motif Jingle Channel Driver,+asterisk11-res-xmpp,/etc/asterisk/motif.conf /etc/asterisk/jingle.conf,motif.conf jingle.conf,chan_motif,)) $(eval $(call BuildAsterisk11Module,chan-ooh323,ooH323 channel,the channel chan_ooh323,,/etc/asterisk/ooh323.conf,ooh323.conf,chan_ooh323,)) $(eval $(call BuildAsterisk11Module,chan-skinny,Skinny channel,the channel chan_skinny,,/etc/asterisk/skinny.conf,skinny.conf,chan_skinny,)) $(eval $(call BuildAsterisk11Module,chan-unistim,Unistim channel,channel driver for the UNISTIM (Unified Networks IP Stimulus) protocol,,/etc/asterisk/unistim.conf,unistim.conf,chan_unistim,)) $(eval $(call BuildAsterisk11Module,mysql,MySQL,MySQL support,+libmysqlclient,/etc/asterisk/res_config_mysql.conf,res_config_mysql.conf,res_config_mysql,)) $(eval $(call BuildAsterisk11Module,odbc,ODBC,ODBC support,+libpthread +libc +unixodbc,/etc/asterisk/cdr_adaptive_odbc.conf /etc/asterisk/cdr_odbc.conf /etc/asterisk/cel_odbc.conf /etc/asterisk/func_odbc.conf /etc/asterisk/res_odbc.conf,cdr_adaptive_odbc cdr_odbc cel_odbc func_odbc res_odbc,cdr_adaptive_odbc cdr_odbc cel_odbc func_odbc res_config_odbc res_odbc,)) -$(eval $(call BuildAsterisk11Module,pgsql,PostgreSQL,PostgreSQL support,+libpq,/etc/asterisk/cel_pgsql.conf /etc/asterisk/cdr_pgsql.conf /etc/asterisk/res_pgsql.conf,cel_pgsql.conf cdr_pgsql.conf res_pgsql.conf,cel_pgsql cdr_pgsql res_config_pgsql,)) $(eval $(call BuildAsterisk11Module,pbx-ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic,,,extensions.ael,pbx_ael,)) -$(eval $(call BuildAsterisk11Module,pbx-spool,Call Spool,outgoing call spool support,,,,pbx_spool,)) +$(eval $(call BuildAsterisk11Module,pbx-dundi,Dundi,provides Dundi Lookup service for Asterisk,,/etc/asterisk/dundi.conf,dundi.conf,pbx_dundi,)) $(eval $(call BuildAsterisk11Module,pbx-lua,Lua,provides Lua resources for Asterisk,+libpthread +libc +liblua,/etc/asterisk/extensions.lua,extensions.lua,pbx_lua,)) +$(eval $(call BuildAsterisk11Module,pbx-spool,Call Spool,outgoing call spool support,,,,pbx_spool,)) +$(eval $(call BuildAsterisk11Module,pbx-realtime,Realtime Switch,realtime switch support,,,,pbx_realtime,)) +$(eval $(call BuildAsterisk11Module,pgsql,PostgreSQL,PostgreSQL support,+libpq,/etc/asterisk/cel_pgsql.conf /etc/asterisk/cdr_pgsql.conf /etc/asterisk/res_pgsql.conf,cel_pgsql.conf cdr_pgsql.conf res_pgsql.conf,cel_pgsql cdr_pgsql res_config_pgsql,)) +$(eval $(call BuildAsterisk11Module,res-adsi,Provide ADSI,Analog Display Services Interface capability,,,,res_adsi,)) $(eval $(call BuildAsterisk11Module,res-ael-share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules,,,,res_ael_share,)) $(eval $(call BuildAsterisk11Module,res-agi,Asterisk Gateway Interface,Support for the Asterisk Gateway Interface extension,,,,res_agi,)) +$(eval $(call BuildAsterisk11Module,res-calendar,Calendaring API,Calendaring support (ICal and Google Calendar),,/etc/asterisk/calendar.conf,calendar.conf,res_calendar,,)) $(eval $(call BuildAsterisk11Module,res-clioriginate,Calls via CLI,Originate calls via the CLI,,,,res_clioriginate,)) +$(eval $(call BuildAsterisk11Module,res-fax-spandsp,Spandsp T.38 and G.711,Spandsp T.38 and G.711 FAX Resource,+asterisk11-res-fax +libspandsp +libtiff,,,res_fax_spandsp,)) +$(eval $(call BuildAsterisk11Module,res-fax,FAX modules,Generic FAX resource for FAX technology resource modules,+asterisk11-res-timing-pthread,/etc/asterisk/res_fax.conf /etc/asterisk/udptl.conf,udptl.conf res_fax.conf,res_fax,)) $(eval $(call BuildAsterisk11Module,res-monitor,Provide Monitor,Cryptographic Signature capability,,,,res_monitor,)) +$(eval $(call BuildAsterisk11Module,res-musiconhold,MOH,Music On Hold support,,/etc/asterisk/musiconhold.conf,musiconhold.conf,res_musiconhold,)) $(eval $(call BuildAsterisk11Module,res-phoneprov,Phone Provisioning,Phone provisioning application for the asterisk internal http server,,/etc/asterisk/phoneprov.conf,phoneprov.conf,res_phoneprov,)) $(eval $(call BuildAsterisk11Module,res-pktccops,Provide PacketCable COPS,simple client/server model for supporting policy control over QoS signaling protocols,,/etc/asterisk/res_pktccops.conf,res_pktccops.conf,res_pktccops,)) $(eval $(call BuildAsterisk11Module,res-smdi,Provide SMDI,Simple Message Desk Interface capability,,/etc/asterisk/smdi.conf,smdi.conf,res_smdi,)) -$(eval $(call BuildAsterisk11Module,res-fax,FAX modules,Generic FAX resource for FAX technology resource modules,+asterisk11-res-timing-pthread,/etc/asterisk/res_fax.conf /etc/asterisk/udptl.conf,udptl.conf res_fax.conf,res_fax,)) -$(eval $(call BuildAsterisk11Module,res-fax-spandsp,Spandsp T.38 and G.711,Spandsp T.38 and G.711 FAX Resource,+asterisk11-res-fax +libspandsp +libtiff,,,res_fax_spandsp,)) -$(eval $(call BuildAsterisk11Module,res-musiconhold,MOH,Music On Hold support,,/etc/asterisk/musiconhold.conf,musiconhold.conf,res_musiconhold,)) $(eval $(call BuildAsterisk11Module,res-srtp,SRTP,Secure RTP,+libsrtp,,,res_srtp,)) +$(eval $(call BuildAsterisk11Module,res-timing-dahdi,DAHDI Timing Interface,,+asterisk11-chan-dahdi,,,res_timing_dahdi,)) $(eval $(call BuildAsterisk11Module,res-timing-pthread,pthread Timing Interface,,,,,res_timing_pthread,)) $(eval $(call BuildAsterisk11Module,res-timing-timerfd,Timerfd Timing Interface,,,,,res_timing_timerfd,)) $(eval $(call BuildAsterisk11Module,res-xmpp,XMPP client and component module,reference module for interfacting Asterisk directly as a client or component with XMPP server,+libiksemel +libopenssl,/etc/asterisk/xmpp.conf,xmpp.conf,res_xmpp,)) -$(eval $(call BuildAsterisk11Module,voicemail,Voicemail,voicemail related modules,,/etc/asterisk/voicemail.conf,voicemail.conf,*voicemail res_adsi res_smdi,vm-*)) +$(eval $(call BuildAsterisk11Module,res-realtime,Realtime Interface,,,,,res_realtime,)) +$(eval $(call BuildAsterisk11Module,voicemail,Voicemail,voicemail related modules,+asterisk11-res-adsi +asterisk11-res-smdi,/etc/asterisk/voicemail.conf,voicemail.conf,*voicemail,vm-*)) diff --git a/net/asterisk-11.x/files/asterisk.init b/net/asterisk-11.x/files/asterisk.init index 78e891383c2..269915b2802 100644 --- a/net/asterisk-11.x/files/asterisk.init +++ b/net/asterisk-11.x/files/asterisk.init @@ -5,12 +5,10 @@ START=99 APP=asterisk OPTIONS= DEST= -DEFAULT=$DEST/etc/default/$APP BIN_FILE=$DEST/usr/sbin/$APP PID_FILE=$DEST/var/run/$APP/$APP.pid start() { - [ -f $DEFAULT ] && . $DEFAULT [ -d $DEST/var/run/asterisk ] || mkdir -p $DEST/var/run/asterisk [ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk [ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk diff --git a/net/asterisk-11.x/patches/001-pjproject-change-configure-args.patch b/net/asterisk-11.x/patches/001-pjproject-change-configure-args.patch index 85dbfa3c194..335a6bde053 100644 --- a/net/asterisk-11.x/patches/001-pjproject-change-configure-args.patch +++ b/net/asterisk-11.x/patches/001-pjproject-change-configure-args.patch @@ -1,6 +1,6 @@ ---- asterisk-11.4.0/res/Makefile 2013-02-04 20:50:52.000000000 +0100 -+++ asterisk11-new/res/Makefile 2013-06-02 13:51:22.269684111 +0200 -@@ -75,7 +75,7 @@ dist-clean:: +--- a/res/Makefile ++++ b/res/Makefile +@@ -78,7 +78,7 @@ distclean:: rm -f pjproject/build.mak pjproject/build.mak: pjproject/aconfigure diff --git a/net/asterisk-11.x/patches/010-asterisk-configure-undef-res-ninit.patch b/net/asterisk-11.x/patches/010-asterisk-configure-undef-res-ninit.patch index 49d2604e2a1..6ed9d071bf4 100644 --- a/net/asterisk-11.x/patches/010-asterisk-configure-undef-res-ninit.patch +++ b/net/asterisk-11.x/patches/010-asterisk-configure-undef-res-ninit.patch @@ -1,10 +1,10 @@ ---- a/configure -+++ b/configure -@@ -16464,7 +16464,6 @@ if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - $as_echo "yes" >&6; } - --$as_echo "#define HAVE_RES_NINIT 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_ndestroy" >&5 - $as_echo_n "checking for library containing res_9_ndestroy... " >&6; } +--- a/configure.ac ++++ b/configure.ac +@@ -1110,7 +1110,6 @@ AC_LINK_IFELSE( + #include ], + [int foo = res_ninit(NULL);])], + AC_MSG_RESULT(yes) +- AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.]) + AC_SEARCH_LIBS(res_9_ndestroy, resolv) + AC_MSG_CHECKING(for res_ndestroy) + AC_LINK_IFELSE( diff --git a/net/asterisk-11.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch b/net/asterisk-11.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch new file mode 100644 index 00000000000..bf1ffdfaaaa --- /dev/null +++ b/net/asterisk-11.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch @@ -0,0 +1,22 @@ +--- a/res/ael/ael.flex ++++ b/res/ael/ael.flex +@@ -595,7 +595,7 @@ includes { STORE_POS; return KW_INCLUDES + snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); + ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); + } +-#ifdef SOLARIS ++#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU) + glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); + #else + glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); +--- a/res/ael/ael_lex.c ++++ b/res/ael/ael_lex.c +@@ -1976,7 +1967,7 @@ YY_RULE_SETUP + snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); + ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); + } +-#ifdef SOLARIS ++#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU) + glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); + #else + glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); diff --git a/net/asterisk-11.x/patches/035-pjproject-non-gnu-mutex-type.patch b/net/asterisk-11.x/patches/035-pjproject-non-gnu-mutex-type.patch new file mode 100644 index 00000000000..7a70858ea6c --- /dev/null +++ b/net/asterisk-11.x/patches/035-pjproject-non-gnu-mutex-type.patch @@ -0,0 +1,26 @@ +Index: asterisk-11.18.0/res/pjproject/pjlib/src/pj/os_core_unix.c +=================================================================== +--- asterisk-11.18.0.orig/res/pjproject/pjlib/src/pj/os_core_unix.c ++++ asterisk-11.18.0/res/pjproject/pjlib/src/pj/os_core_unix.c +@@ -1091,7 +1091,7 @@ static pj_status_t init_mutex(pj_mutex_t + return PJ_RETURN_OS_ERROR(rc); + + if (type == PJ_MUTEX_SIMPLE) { +-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \ ++#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \ + defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE) + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP); + #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \ +@@ -1101,10 +1101,10 @@ static pj_status_t init_mutex(pj_mutex_t + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL); + #endif + } else { +-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \ ++#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \ + defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE) + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); +-#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \ ++#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0 && defined(__GLIBC__)) || \ + defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE) + // Phil Torre : + // The RTEMS implementation of POSIX mutexes doesn't include diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile new file mode 100644 index 00000000000..b15375513d0 --- /dev/null +++ b/net/asterisk-13.x/Makefile @@ -0,0 +1,388 @@ +# +# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015 Cesnet, z.s.p.o. +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=asterisk13 +PKG_VERSION:=13.4.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/ +PKG_MD5SUM:=8cd729d481f0b3d9aadcf5a607c25803 + +PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=libxml2/host + +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING LICENSE +PKG_MAINTAINER:=Jiri Slachta + +include $(INCLUDE_DIR)/package.mk + +define Package/asterisk13/install/module + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*$(2).so* $(1)/usr/lib/asterisk/modules/ +endef + +define Package/asterisk13/install/conffile + $(INSTALL_DIR) $(1)/etc/asterisk + $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$(2) $(1)/etc/asterisk/ +endef + +define Package/asterisk13/install/lib + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(2).so* $(1)/usr/lib/ +endef + +define Package/asterisk13/install/sbin + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/$(2) $(1)/usr/sbin/ +endef + +define Package/asterisk13/install/sounds + $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/$(2) $(1)/usr/lib/asterisk/sounds/ +endef + +define BuildAsterisk13Module + define Package/asterisk13-$(1) + $$(call Package/asterisk13/Default) + TITLE:=$(2) support + DEPENDS:= asterisk13 $(patsubst +%,+PACKAGE_asterisk13-$(1):%,$(4)) + endef + + define Package/asterisk13-$(1)/conffiles +$(foreach c,$(5),/etc/asterisk/$(c)) + endef + + define Package/asterisk13-$(1)/description +This package provides support for '$(3)' in Asterisk. + endef + + define Package/asterisk13-$(1)/install +$(foreach c,$(5),$(call Package/asterisk13/install/conffile,$$(1),$(c));) +$(foreach m,$(6),$(call Package/asterisk13/install/module,$$(1),$(m));) +$(foreach s,$(7),$(call Package/asterisk13/install/sounds,$$(1),$(s));) +$(foreach b,$(8),$(call Package/asterisk13/install/sbin,$$(1),$(b));) + endef + + $$(eval $$(call BuildPackage,asterisk13-$(1))) +endef + +define Package/asterisk13/Default + SUBMENU:=Telephony + SECTION:=net + CATEGORY:=Network + URL:=http://www.asterisk.org/ +endef + +define Package/asterisk13/Default/description + Asterisk is a complete PBX in software. It provides all of the features + you would expect from a PBX and more. Asterisk does voice over IP in three + protocols, and can interoperate with almost all standards-based telephony + equipment using relatively inexpensive hardware. +endef + +define Package/asterisk13 +$(call Package/asterisk13/Default) + TITLE:=Complete open source PBX, v$(PKG_VERSION) + MENU:=1 + DEPENDS:=+jansson +libncurses +libopenssl +libpopt +libsqlite3 +libstdcpp +libuuid +libxml2 +libxslt +zlib +endef + +define Package/asterisk13/description +$(call Package/asterisk13/Default/description) +endef + +define Package/asterisk13/conffiles +/etc/asterisk/asterisk.conf +/etc/asterisk/acl.conf +/etc/asterisk/ccss.conf +/etc/asterisk/modules.conf +/etc/asterisk/extconfig.conf +/etc/asterisk/extensions.conf +/etc/asterisk/features.conf +/etc/asterisk/indications.conf +/etc/asterisk/logger.conf +/etc/asterisk/manager.conf +/etc/asterisk/modules.conf +/etc/asterisk/res_config_sqlite3.conf +/etc/asterisk/rtp.conf +/etc/asterisk/udptl.conf +/etc/asterisk/users.conf +/etc/default/asterisk +/etc/init.d/asterisk +endef + +AST_CFG_FILES:= \ + asterisk.conf acl.conf ccss.conf extconfig.conf \ + extensions.conf features.conf indications.conf \ + logger.conf manager.conf modules.conf udptl.conf \ + users.conf res_config_sqlite3.conf + +AST_EMB_MODULES:=\ + app_dial app_echo app_macro app_playback \ + func_callerid func_logic func_strings func_timeout \ + pbx_config res_crypto + +define Package/asterisk13/install +$(call Package/asterisk13/install/lib,$(1),libasteriskssl) +$(call Package/asterisk13/install/sbin,$(1),asterisk) +$(call Package/asterisk13/install/sbin,$(1),safe_asterisk) +$(call Package/asterisk13/install/sbin,$(1),astgenkey) +$(foreach m,$(AST_CFG_FILES),$(call Package/asterisk13/install/conffile,$(1),$(m));) +$(foreach m,$(AST_EMB_MODULES),$(call Package/asterisk13/install/module,$(1),$(m));) + $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/ + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk +endef + +define Package/asterisk13-sounds +$(call Package/asterisk13/Default) + TITLE:=Sounds support + DEPENDS:=asterisk13 +endef + +define Package/asterisk13-sounds/description +This package provides the sound-files for Asterisk-13. +endef + +define Package/asterisk13-sounds/install + $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/ + rm -f $(1)/usr/lib/asterisk/sounds/vm-* + rm -f $(1)/usr/lib/asterisk/sounds/conf-* +endef + +TARGET_LDFLAGS+= \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pbx-lua),-ldl -lcrypt) + +EXTRA_CFLAGS+=$(TARGET_CPPFLAGS) +EXTRA_LDFLAGS+=$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + +CONFIGURE_ARGS+= \ + --without-execinfo \ + --without-bluetooth \ + --without-cap \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-curl),--with-libcurl="$(STAGING_DIR)/usr",--without-curl) \ + --without-curses \ + --without-dahdi \ + --with-gsm=internal \ + --without-gtk2 \ + --with-ilbc=internal \ + --without-isdnnet \ + --without-misdn \ + --without-nbs \ + --without-neon \ + --without-neon29 \ + --with-libxml2 \ + --with-ncurses="$(STAGING_DIR)/usr" \ + --without-netsnmp \ + --without-newt \ + --without-ogg \ + --without-osptk \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pbx-lua),--with-lua="$(STAGING_DIR)/usr",--without-lua) \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgres="$(STAGING_DIR)/usr",--without-postgres) \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pjsip),--with-pjproject,--without-pjproject) \ + --with-popt="$(STAGING_DIR)/usr" \ + --without-pri \ + --without-pwlib \ + --without-radius \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-res-fax-spandsp),--with-spandsp="$(STAGING_DIR)/usr",--without-spandsp) \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-res-xmpp),--with-iksemel="$(STAGING_DIR)/usr",--without-iksemel) \ + --without-sdl \ + --without-sqlite \ + --with-sqlite3="$(STAGING_DIR)/usr" \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-res-srtp),--with-srtp="$(STAGING_DIR)/usr",--without-srtp) \ + --without-suppserv \ + --without-tds \ + --without-termcap \ + --without-tinfo \ + --without-tonezone \ + --with-uuid="$(STAGING_DIR)/usr" \ + --without-vorbis \ + --without-vpb \ + --with-z="$(STAGING_DIR)/usr" \ + --with-sounds-cache="$(DL_DIR)" \ + --enable-xmldoc + +CONFIGURE_VARS += \ + ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR)/host/bin/xml2-config + +AST_MENUSELECT_OPTS = \ + --without-newt \ + --without-curses \ + --with-ncurses="$(STAGING_DIR_HOST)/usr" \ + --with-libxml2="$(STAGING_DIR_HOST)/usr" + +define Build/Configure + (cd $(PKG_BUILD_DIR); \ + ./bootstrap.sh; \ + ); + $(call Build/Configure/Default,,$(SITE_VARS)) + (cd $(PKG_BUILD_DIR)/menuselect; \ + ./bootstrap.sh; \ + ./configure \ + $(HOST_CONFIGURE_ARGS) \ + $(AST_MENUSELECT_OPTS) \ + LDFLAGS="$(HOST_LDFLAGS) -lxml2" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOST)/include/libxml2" \ + ); +endef + +define Build/Compile + $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOST)/include/libxml2" \ + LDFLAGS="$(HOST_LDFLAGS) -lxml2" + $(MAKE) -C "$(PKG_BUILD_DIR)" \ + include/asterisk/version.h \ + include/asterisk/buildopts.h defaults.h \ + makeopts.embed_rules + ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" + ASTLDFLAGS="$(EXTRA_LDFLAGS)" + $(MAKE) -C "$(PKG_BUILD_DIR)" \ + ASTVARLIBDIR="/usr/lib/asterisk" \ + ASTDATADIR="/usr/lib/asterisk" \ + ASTKEYDIR="/usr/lib/asterisk" \ + ASTDBDIR="/usr/lib/asterisk" \ + NOISY_BUILD="yes" \ + DEBUG="" \ + OPTIMIZE="" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install samples +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/asterisk-13/include/asterisk/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-13/include/asterisk/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-13/include/ +endef + +$(eval $(call BuildPackage,asterisk13)) +$(eval $(call BuildPackage,asterisk13-sounds)) + +################################ +# AST modules +# Params: +# 1 - Package subname +# 2 - Package title +# 3 - Module description +# 4 - Module dependencies +# 5 - conf files +# 6 - module files +# 7 - sound files +# 8 - binary files +################################ +#$(eval $(call BuildAsterisk13Module,subname,title,module description,module dependencies,conf files,module files,sound files,binary files)) + +$(eval $(call BuildAsterisk13Module,app-alarmreceiver,Alarm receiver,Central Station Alarm receiver for Ademco Contact ID,,,app_alarmreceiver,,)) +$(eval $(call BuildAsterisk13Module,app-authenticate,Authenticate commands,Execute arbitrary authenticate commands,,,app_authenticate,,)) +$(eval $(call BuildAsterisk13Module,app-chanisavail,Channel availability check,support for checking if a channel is available,,,app_chanisavail,,)) +$(eval $(call BuildAsterisk13Module,app-chanspy,Channel listen in,support for listening in on any channel,,,app_chanspy,,)) +$(eval $(call BuildAsterisk13Module,app-confbridge,ConfBridge,Software bridge for multi-party audio conferencing,+asterisk13-bridge-builtin-features +asterisk13-bridge-simple +asterisk13-bridge-softmix,confbridge.conf,app_confbridge,,)) +$(eval $(call BuildAsterisk13Module,app-directed_pickup,Directed call pickup,support for directed call pickup,,,app_directed_pickup,,)) +$(eval $(call BuildAsterisk13Module,app-disa,Direct Inward System Access,Direct Inward System Access,,,app_disa,,)) +$(eval $(call BuildAsterisk13Module,app-exec,Exec application,support for application execution,,,app_exec,,)) +$(eval $(call BuildAsterisk13Module,app-minivm,Minimal voicemail system,a voicemail system in small building blocks working together based on the Comedian Mail voicemail,,extensions_minivm.conf minivm.conf,app_minivm,,)) +$(eval $(call BuildAsterisk13Module,app-mixmonitor,Record a call and mix the audio,record a call and mix the audio during the recording,,,app_mixmonitor,,)) +$(eval $(call BuildAsterisk13Module,app-originate,Originate a call,originating an outbound call and connecting it to a specified extension or application,,,app_originate,,)) +$(eval $(call BuildAsterisk13Module,app-playtones,Playtones application,play a tone list,,,app_playtones,,)) +$(eval $(call BuildAsterisk13Module,app-read,Variable read,a trivial application to read a variable,,,app_read,,)) +$(eval $(call BuildAsterisk13Module,app-readexten,Extension to variable,a trivial application to read an extension into a variable,,,app_readexten,,)) +$(eval $(call BuildAsterisk13Module,app-record,Record sound file,to record a sound file,,,app_record,,)) +$(eval $(call BuildAsterisk13Module,app-sayunixtime,Say Unix time,an application to say Unix time,,,app_sayunixtime,,)) +$(eval $(call BuildAsterisk13Module,app-senddtmf,Send DTMF digits,Sends arbitrary DTMF digits,,,app_senddtmf,,)) +$(eval $(call BuildAsterisk13Module,app-sms,SMS,SMS support (ETSI ES 201 912 protocol 1),+libpopt +libstdcpp,,app_sms,,)) +$(eval $(call BuildAsterisk13Module,app-stack,Stack applications,Stack applications Gosub Return etc.,+asterisk13-res-agi,,app_stack,,)) +$(eval $(call BuildAsterisk13Module,app-system,System exec,support for executing system commands,,,app_system,,)) +$(eval $(call BuildAsterisk13Module,app-talkdetect,File playback with audio detect,for file playback with audio detect,,,app_talkdetect,,)) +$(eval $(call BuildAsterisk13Module,app-verbose,Verbose logging,Verbose logging application,,,app_verbose,,)) +$(eval $(call BuildAsterisk13Module,app-waituntil,Sleep,support sleeping until the given epoch,,,app_waituntil,,)) +$(eval $(call BuildAsterisk13Module,app-while,While loop,a while loop implementation,,,app_while,,)) +$(eval $(call BuildAsterisk13Module,bridge-builtin-features,Bridging features,built in bridging features,,,bridge_builtin_features)) +$(eval $(call BuildAsterisk13Module,bridge-builtin-interval-features,Built in bridging interval features,built in bridging interval features,,,bridge_builtin_interval_features)) +$(eval $(call BuildAsterisk13Module,bridge-holding,Bridging for storing channels in a bridge,bridging technology for storing channels in a bridge,,,bridge_holding)) +$(eval $(call BuildAsterisk13Module,bridge-native-rtp,Native RTP bridging technology module,native RTP bridging technology module,,,bridge_native_rtp)) +$(eval $(call BuildAsterisk13Module,bridge-simple,Simple two channel bridging module,simple two channel bridging module,,,bridge_simple)) +$(eval $(call BuildAsterisk13Module,bridge-softmix,Multi-party software based channel mixing,multi-party software based channel mixing,,,bridge_softmix)) +$(eval $(call BuildAsterisk13Module,cdr,Provides CDR,Call Detail Record,,cdr.conf cdr_custom.conf cdr_manager.conf cdr_syslog.conf,app_cdr app_forkcdr cdr_custom cdr_manager cdr_syslog func_cdr,,)) +$(eval $(call BuildAsterisk13Module,cdr-csv,Provides CDR CSV,Call Detail Record with CSV support,,,cdr_csv,,)) +$(eval $(call BuildAsterisk13Module,cdr-sqlite3,Provides CDR SQLITE3,Call Detail Record with SQLITE3 support,libsqlite3,,cdr_sqlite3_custom,,)) +$(eval $(call BuildAsterisk13Module,chan-iax2,IAX2 channel,IAX support,+asterisk13-res-timing-timerfd,iax.conf iaxprov.conf,chan_iax2,,)) +$(eval $(call BuildAsterisk13Module,chan-sip,SIP channel,the channel chan_sip,+asterisk13-app-confbridge,sip.conf sip_notify.conf,chan_sip,,)) +$(eval $(call BuildAsterisk13Module,chan-skinny,Skinny channel,the channel chan_skinny,,skinny.conf,chan_skinny,,)) +$(eval $(call BuildAsterisk13Module,chan-unistim,Unistim channel,channel driver for the UNISTIM (Unified Networks IP Stimulus) protocol,,unistim.conf,chan_unistim,,)) +$(eval $(call BuildAsterisk13Module,codec-a-mu,Alaw to ulaw translation,translation between alaw and ulaw codecs,,,codec_a_mu,,)) +$(eval $(call BuildAsterisk13Module,codec-adpcm,ADPCM text,ADPCM text ,,,codec_adpcm,,)) +$(eval $(call BuildAsterisk13Module,codec-alaw,Signed linear to alaw translation,translation between signed linear and alaw codecs,,,codec_alaw,,)) +$(eval $(call BuildAsterisk13Module,codec-g722,G.722,a high bit rate 48/56/64Kbps ITU standard codec,,,codec_g722,,)) +$(eval $(call BuildAsterisk13Module,codec-g726,Signed linear to G.726 translation,translation between signed linear and ITU G.726-32kbps codecs,,,codec_g726,,)) +$(eval $(call BuildAsterisk13Module,codec-gsm,linear to GSM translation,translate between signed linear and GSM,,,codec_gsm,,)) +$(eval $(call BuildAsterisk13Module,codec-ilbc,linear to ILBC translation,translate between signed linear and ILBC,,,codec_ilbc,,)) +$(eval $(call BuildAsterisk13Module,codec-lpc10,Linear to LPC10 translation,translate between signed linear and LPC10,,,codec_lpc10,,)) +$(eval $(call BuildAsterisk13Module,codec-resample,resample sLinear audio,resample sLinear audio,,,codec_resample,,)) +$(eval $(call BuildAsterisk13Module,codec-ulaw,Signed linear to ulaw translation,translation between signed linear and ulaw codecs,,,codec_ulaw,,)) +$(eval $(call BuildAsterisk13Module,curl,CURL,CURL support,+libcurl,,func_curl res_curl,,)) +$(eval $(call BuildAsterisk13Module,format-g726,G.726,support for headerless G.726 16/24/32/40kbps data format,,,format_g726,,)) +$(eval $(call BuildAsterisk13Module,format-g729,G.729,support for raw headerless G729 data,,,format_g729,,)) +$(eval $(call BuildAsterisk13Module,format-gsm,GSM format,support for GSM format,,,format_gsm,,)) +$(eval $(call BuildAsterisk13Module,format-h263,H263 format,support for H264 format,,,format_h263,,)) +$(eval $(call BuildAsterisk13Module,format-h264,H264 format,support for H264 format,,,format_h264,,)) +$(eval $(call BuildAsterisk13Module,format-ilbc,ILBC format,support for ILBC format,,,format_ilbc,,)) +$(eval $(call BuildAsterisk13Module,format-pcm,PCM format,support for PCM format,,,format_pcm,,)) +$(eval $(call BuildAsterisk13Module,format-sln,Raw slinear format,support for raw slinear format,,,format_sln,,)) +$(eval $(call BuildAsterisk13Module,format-vox,VOX format,support for ADPCM vox format,,,format_vox,,)) +$(eval $(call BuildAsterisk13Module,format-wav,WAV format (8000hz Signed Linear),support for proprietary Microsoft WAV format (8000hz Signed Linear),,,format_wav,,)) +$(eval $(call BuildAsterisk13Module,format-wav-gsm,WAV format (Proprietary GSM),support for proprietary Microsoft WAV format (Proprietary GSM),,,format_wav_gsm,,)) +$(eval $(call BuildAsterisk13Module,func-base64,base64 support,support of base64 function,,,func_base64,,)) +$(eval $(call BuildAsterisk13Module,func-blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted,,,func_blacklist,,)) +$(eval $(call BuildAsterisk13Module,func-channel,Channel info,Channel info dialplan function,,,func_channel,,)) +$(eval $(call BuildAsterisk13Module,func-cut,CUT function,CUT function,,,func_cut,,)) +$(eval $(call BuildAsterisk13Module,func-db,Database interaction,functions for interaction with the database,,,func_db app_db,)) +$(eval $(call BuildAsterisk13Module,func-devstate,Blinky lights control,functions for manually controlled blinky lights,,,func_devstate,,)) +$(eval $(call BuildAsterisk13Module,func-enum,ENUM,ENUM,,enum.conf,func_enum,)) +$(eval $(call BuildAsterisk13Module,func-env,Environment functions,Environment dialplan functions,,,func_env,)) +$(eval $(call BuildAsterisk13Module,func-extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control,,,func_extstate,,)) +$(eval $(call BuildAsterisk13Module,func-global,Global variable,global variable dialplan functions,,,func_global,,)) +$(eval $(call BuildAsterisk13Module,func-groupcount,Group count,for counting number of channels in the specified group,,,func_groupcount,,)) +$(eval $(call BuildAsterisk13Module,func-math,Math functions,Math functions,,,func_math,)) +$(eval $(call BuildAsterisk13Module,func-module,Simple module check function,Simple module check function,,,func_module,)) +$(eval $(call BuildAsterisk13Module,func-realtime,realtime,the realtime dialplan function,,,func_realtime,,)) +$(eval $(call BuildAsterisk13Module,func-shell,Shell,support for shell execution,,,func_shell,,)) +$(eval $(call BuildAsterisk13Module,func-uri,URI encoding and decoding,Encodes and decodes URI-safe strings,,,func_uri,,)) +$(eval $(call BuildAsterisk13Module,func-vmcount,vmcount dialplan,a vmcount dialplan function,,,func_vmcount,,)) +$(eval $(call BuildAsterisk13Module,odbc,ODBC,ODBC support,+libpthread +libc +unixodbc,cdr_adaptive_odbc.conf cdr_odbc.conf cel_odbc.conf func_odbc.conf res_odbc.conf,cdr_adaptive_odbc cdr_odbc cel_odbc func_odbc res_config_odbc res_odbc,,)) +$(eval $(call BuildAsterisk13Module,pbx-ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic,,extensions.ael,pbx_ael,,)) +$(eval $(call BuildAsterisk13Module,pbx-dundi,Dundi,provides Dundi Lookup service for Asterisk,,dundi.conf,pbx_dundi,,)) +$(eval $(call BuildAsterisk13Module,pbx-realtime,Realtime Switch,realtime switch support,,,pbx_realtime,,)) +$(eval $(call BuildAsterisk13Module,pbx-spool,Call Spool,outgoing call spool support,,,pbx_spool,,)) +$(eval $(call BuildAsterisk13Module,pgsql,PostgreSQL,PostgreSQL support,+libpq,cel_pgsql.conf cdr_pgsql.conf res_pgsql.conf,cel_pgsql cdr_pgsql res_config_pgsql,,)) +$(eval $(call BuildAsterisk13Module,pjsip,pjsip channel,the channel pjsip,+asterisk13-res-sorcery +libpjsip +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsua +libpjsua2,pjsip.conf pjsip_notify.conf,func_pjsip_endpoint chan_pjsip res_pjsip_acl res_pjsip_authenticator_digest res_pjsip_caller_id res_pjsip_dialog_info_body_generator res_pjsip_diversion res_pjsip_dtmf_info res_pjsip_endpoint_identifier_anonymous res_pjsip_endpoint_identifier_ip res_pjsip_endpoint_identifier_user res_pjsip_exten_state res_pjsip_header_funcs res_pjsip_log_forwarder res_pjsip_logger res_pjsip_messaging res_pjsip_multihomed res_pjsip_mwi_body_generator res_pjsip_mwi res_pjsip_nat res_pjsip_notify res_pjsip_one_touch_record_info res_pjsip_outbound_authenticator_digest res_pjsip_outbound_publish res_pjsip_outbound_registration res_pjsip_path res_pjsip_pidf_body_generator res_pjsip_pidf_digium_body_supplement res_pjsip_pidf_eyebeam_body_supplement res_pjsip_publish_asterisk res_pjsip_pubsub res_pjsip_refer res_pjsip_registrar_expire res_pjsip_registrar res_pjsip_rfc3326 res_pjsip_sdp_rtp res_pjsip_send_to_voicemail res_pjsip_session res_pjsip res_pjsip_transport_websocket res_pjsip_t38 res_pjsip_xpidf_body_generator,,)) +$(eval $(call BuildAsterisk13Module,res-adsi,Provide ADSI,Analog Display Services Interface capability,,,res_adsi,,)) +$(eval $(call BuildAsterisk13Module,res-ael-share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules,,,res_ael_share,,)) +$(eval $(call BuildAsterisk13Module,res-agi,Asterisk Gateway Interface,Support for the Asterisk Gateway Interface extension,,,res_agi,,)) +$(eval $(call BuildAsterisk13Module,res-calendar,Calendaring API,Calendaring support (ICal and Google Calendar),,calendar.conf,res_calendar,,)) +$(eval $(call BuildAsterisk13Module,res-clioriginate,Calls via CLI,Originate calls via the CLI,,,res_clioriginate,,)) +$(eval $(call BuildAsterisk13Module,res-fax,FAX modules,Generic FAX resource for FAX technology resource modules,+asterisk13-res-timing-pthread,udptl.conf res_fax.conf,res_fax,,)) +$(eval $(call BuildAsterisk13Module,res-http-websocket,HTTP websocket support,,,,res_http_websocket,,)) +$(eval $(call BuildAsterisk13Module,res-monitor,Provide Monitor,Cryptographic Signature capability,,,res_monitor,,)) +$(eval $(call BuildAsterisk13Module,res-musiconhold,MOH,Music On Hold support,,musiconhold.conf,res_musiconhold,,)) +$(eval $(call BuildAsterisk13Module,res-parking,Phone Parking,Phone Parking application,,res_parking.conf,res_parking,,)) +$(eval $(call BuildAsterisk13Module,res-phoneprov,Phone Provisioning,Phone provisioning application for the asterisk internal http server,,phoneprov.conf,res_phoneprov,,)) +$(eval $(call BuildAsterisk13Module,res-realtime,Realtime,Realtime Interface,,,res_realtime,,)) +$(eval $(call BuildAsterisk13Module,res-rtp-asterisk,RTP stack,,+libpjsip +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsua +libpjsua2,rtp.conf,res_rtp_asterisk,,)) +$(eval $(call BuildAsterisk13Module,res-rtp-multicast,RTP multicast engine,,,,res_rtp_multicast,,)) +$(eval $(call BuildAsterisk13Module,res-smdi,Provide SMDI,Simple Message Desk Interface capability,,smdi.conf,res_smdi,,)) +$(eval $(call BuildAsterisk13Module,res-sorcery,Sorcery data layer,,,,res_sorcery_astdb res_sorcery_config res_sorcery_memory res_sorcery_realtime,,)) +$(eval $(call BuildAsterisk13Module,res-srtp,SRTP Support,Secure RTP connection,+libsrtp,,res_srtp,,)) +$(eval $(call BuildAsterisk13Module,res-timing-pthread,pthread Timing Interface,,,,res_timing_pthread,,)) +$(eval $(call BuildAsterisk13Module,res-timing-timerfd,Timerfd Timing Interface,,,,res_timing_timerfd,,)) +$(eval $(call BuildAsterisk13Module,voicemail,Voicemail,voicemail related modules,+asterisk13-res-adsi +asterisk13-res-smdi,voicemail.conf,app_voicemail res_adsi res_smdi,vm-*,)) diff --git a/net/asterisk-11.x/files/asterisk.default b/net/asterisk-13.x/files/asterisk.default similarity index 100% rename from net/asterisk-11.x/files/asterisk.default rename to net/asterisk-13.x/files/asterisk.default diff --git a/net/asterisk-13.x/files/asterisk.init b/net/asterisk-13.x/files/asterisk.init new file mode 100644 index 00000000000..78e891383c2 --- /dev/null +++ b/net/asterisk-13.x/files/asterisk.init @@ -0,0 +1,34 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2014 OpenWrt.org + +START=99 +APP=asterisk +OPTIONS= +DEST= +DEFAULT=$DEST/etc/default/$APP +BIN_FILE=$DEST/usr/sbin/$APP +PID_FILE=$DEST/var/run/$APP/$APP.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + [ -d $DEST/var/run/asterisk ] || mkdir -p $DEST/var/run/asterisk + [ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk + [ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk + [ -d $DEST/var/lib ] || mkdir -p $DEST/var/lib + [ -h $DEST/var/lib/asterisk ] || ln -s /usr/lib/asterisk /var/lib/asterisk + [ -d $DEST/var/lib/asterisk/keys ] || mkdir -p $DEST/var/lib/asterisk/keys + [ -d $DEST/var/log/asterisk/cdr-csv ] || mkdir -p $DEST/var/log/asterisk/cdr-csv + + SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \ + service_start $BIN_FILE $OPTIONS +} + +stop() { + SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \ + service_stop $BIN_FILE +} + +reload() { + SERVICE_PID_FILE="/var/run/asterisk/asterisk.pid" \ + service_reload $BIN_FILE +} diff --git a/net/asterisk-13.x/patches/001-disable-semaphores-check.patch b/net/asterisk-13.x/patches/001-disable-semaphores-check.patch new file mode 100644 index 00000000000..05713a14286 --- /dev/null +++ b/net/asterisk-13.x/patches/001-disable-semaphores-check.patch @@ -0,0 +1,22 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -896,19 +896,6 @@ AC_LINK_IFELSE( + ] + ) + +-# Some platforms define sem_init(), but only support sem_open(). joyous. +-AC_MSG_CHECKING(for working unnamed semaphores) +-AC_RUN_IFELSE( +- [AC_LANG_PROGRAM([#include ], +- [sem_t sem; return sem_init(&sem, 0, 0);])], +- AC_MSG_RESULT(yes) +- AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.]), +- AC_MSG_RESULT(no), +- AC_MSG_RESULT(cross-compile) +- AC_MSG_NOTICE([WARNING: result yes guessed because of cross compilation]) +- AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.]) +-) +- + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then diff --git a/net/asterisk-13.x/patches/002-undef-res-ninit.patch b/net/asterisk-13.x/patches/002-undef-res-ninit.patch new file mode 100644 index 00000000000..de73db810ec --- /dev/null +++ b/net/asterisk-13.x/patches/002-undef-res-ninit.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1177,7 +1177,6 @@ AC_LINK_IFELSE( + #include ], + [int foo = res_ninit(NULL);])], + AC_MSG_RESULT(yes) +- AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.]) + AC_SEARCH_LIBS(res_9_ndestroy, resolv) + AC_MSG_CHECKING(for res_ndestroy) + AC_LINK_IFELSE( diff --git a/net/asterisk-13.x/patches/003-disable-ast-xml-docs.patch b/net/asterisk-13.x/patches/003-disable-ast-xml-docs.patch new file mode 100644 index 00000000000..12b3f730250 --- /dev/null +++ b/net/asterisk-13.x/patches/003-disable-ast-xml-docs.patch @@ -0,0 +1,13 @@ +--- a/include/asterisk/xml.h ++++ b/include/asterisk/xml.h +@@ -246,10 +246,5 @@ struct ast_xml_node *ast_xml_xpath_get_f + */ + struct ast_xml_xpath_results *ast_xml_query(struct ast_xml_doc *doc, const char *xpath_str); + +-/* Features using ast_xml_ */ +-#ifdef HAVE_LIBXML2 +-#define AST_XML_DOCS +-#endif +- + #endif /* _ASTERISK_XML_H */ + diff --git a/net/asterisk-13.x/patches/004-ifdef-missing-execinfo.patch b/net/asterisk-13.x/patches/004-ifdef-missing-execinfo.patch new file mode 100644 index 00000000000..20e5c669b57 --- /dev/null +++ b/net/asterisk-13.x/patches/004-ifdef-missing-execinfo.patch @@ -0,0 +1,103 @@ +Index: asterisk-13.4.0/include/asterisk/lock.h +=================================================================== +--- asterisk-13.4.0.orig/include/asterisk/lock.h ++++ asterisk-13.4.0/include/asterisk/lock.h +@@ -51,9 +51,11 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #ifdef HAVE_BKTR + #include + #endif ++#endif + + #ifndef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK + #include "asterisk/time.h" +@@ -86,11 +88,15 @@ + #define __AST_RWLOCK_INIT_VALUE {0} + #endif /* HAVE_PTHREAD_RWLOCK_INITIALIZER */ + ++#ifndef __UCLIBC__ + #ifdef HAVE_BKTR + #define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, {{{ 0 }}}, PTHREAD_MUTEX_INIT_VALUE } + #else + #define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE } + #endif ++#else ++#define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE } ++#endif + + #define AST_MUTEX_INIT_VALUE { PTHREAD_MUTEX_INIT_VALUE, NULL, 1 } + #define AST_MUTEX_INIT_VALUE_NOTRACKING { PTHREAD_MUTEX_INIT_VALUE, NULL, 0 } +@@ -114,9 +120,11 @@ struct ast_lock_track { + int reentrancy; + const char *func[AST_MAX_REENTRANCY]; + pthread_t thread[AST_MAX_REENTRANCY]; ++#ifndef __UCLIBC__ + #ifdef HAVE_BKTR + struct ast_bt backtrace[AST_MAX_REENTRANCY]; + #endif ++#endif + pthread_mutex_t reentr_mutex; + }; + +@@ -241,6 +249,7 @@ enum ast_lock_type { + * on the lock. ast_mark_lock_acquired() will mark it as held by this thread. + */ + #if !defined(LOW_MEMORY) ++#ifndef HAVE_BKTR + #ifdef HAVE_BKTR + void ast_store_lock_info(enum ast_lock_type type, const char *filename, + int line_num, const char *func, const char *lock_name, void *lock_addr, struct ast_bt *bt); +@@ -248,14 +257,22 @@ void ast_store_lock_info(enum ast_lock_t + void ast_store_lock_info(enum ast_lock_type type, const char *filename, + int line_num, const char *func, const char *lock_name, void *lock_addr); + #endif /* HAVE_BKTR */ ++#else ++void ast_store_lock_info(enum ast_lock_type type, const char *filename, ++ int line_num, const char *func, const char *lock_name, void *lock_addr); ++#endif + + #else + ++#ifndef __UCLIBC__ + #ifdef HAVE_BKTR + #define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS,BUD) + #else + #define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS) + #endif /* HAVE_BKTR */ ++#else ++#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS) ++#endif + #endif /* !defined(LOW_MEMORY) */ + + /*! +@@ -283,19 +300,27 @@ void ast_mark_lock_failed(void *lock_add + * be removed from the current thread's lock info struct. + */ + #if !defined(LOW_MEMORY) ++#ifndef __UCLIBC__ + #ifdef HAVE_BKTR + void ast_remove_lock_info(void *lock_addr, struct ast_bt *bt); + #else + void ast_remove_lock_info(void *lock_addr); + #endif /* HAVE_BKTR */ ++#else ++void ast_remove_lock_info(void *lock_addr); ++#endif + void ast_suspend_lock_info(void *lock_addr); + void ast_restore_lock_info(void *lock_addr); + #else ++#ifndef __UCLIBC + #ifdef HAVE_BKTR + #define ast_remove_lock_info(ignore,me) + #else + #define ast_remove_lock_info(ignore) + #endif /* HAVE_BKTR */ ++#else ++#define ast_remove_lock_info(ignore) ++#endif + #define ast_suspend_lock_info(ignore); + #define ast_restore_lock_info(ignore); + #endif /* !defined(LOW_MEMORY) */ diff --git a/net/asterisk-13.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch b/net/asterisk-13.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch new file mode 100644 index 00000000000..bf1ffdfaaaa --- /dev/null +++ b/net/asterisk-13.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch @@ -0,0 +1,22 @@ +--- a/res/ael/ael.flex ++++ b/res/ael/ael.flex +@@ -595,7 +595,7 @@ includes { STORE_POS; return KW_INCLUDES + snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); + ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); + } +-#ifdef SOLARIS ++#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU) + glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); + #else + glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); +--- a/res/ael/ael_lex.c ++++ b/res/ael/ael_lex.c +@@ -1976,7 +1967,7 @@ YY_RULE_SETUP + snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf); + ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf)); + } +-#ifdef SOLARIS ++#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU) + glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); + #else + glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); diff --git a/net/asterisk-g72x/Makefile b/net/asterisk-g72x/Makefile new file mode 100644 index 00000000000..1422719483f --- /dev/null +++ b/net/asterisk-g72x/Makefile @@ -0,0 +1,122 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=asterisk-g72x +PKG_VERSION:=1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=asterisk-g72x-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://asterisk.hosting.lv/src/ +PKG_MD5SUM:=05825dfbe4959dc5c90b2f7b91e3d4e3 + +PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-g72x-$(PKG_VERSION) +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILES:=README.md +PKG_MAINTAINER:=Alex Samorukov + +include $(INCLUDE_DIR)/package.mk + +define Package/asterisk-g72x/Default + SUBMENU:=Telephony + SECTION:=net + CATEGORY:=Network + TITLE:=G.729 codec for Asterisk open source PBX + URL:=http://asterisk.hosting.lv + DEPENDS:= +bcg729 +endef + +define Package/asterisk18-codec-g729 +$(call Package/asterisk-g72x/Default) + DEPENDS+= asterisk18 + VARIANT:=asterisk18 +endef + +define Package/asterisk11-codec-g729 +$(call Package/asterisk-g72x/Default) + DEPENDS+= asterisk11 + VARIANT:=asterisk11 +endef + +define Package/asterisk13-codec-g729 +$(call Package/asterisk-g72x/Default) + DEPENDS+= asterisk13 + VARIANT:=asterisk13 +endef + +define Package/description/Default + Asterisk G.729 codec based on bcg729 implementation. +endef + +Package/asterisk18-codec-g729/description = $(Package/description/Default) +Package/asterisk11-codec-g729/description = $(Package/description/Default) +Package/asterisk13-codec-g729/description = $(Package/description/Default) + +ifeq ($(BUILD_VARIANT),asterisk18) + MAKE_ARGS:= \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-1.8/include -DHAVE_CONFIG_H -I. -fPIC" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" + + CONFIGURE_ARGS+=\ + --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-1.8/include \ + --with-asterisk18 \ + --with-bcg729 \ + --enable-shared \ + $(MAKE_ARGS) +endif + +ifeq ($(BUILD_VARIANT),asterisk11) + MAKE_ARGS:= \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=110000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-11/include -DHAVE_CONFIG_H -I. -fPIC" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" + + CONFIGURE_ARGS+=\ + --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-11/include \ + --with-asterisk100 \ + --with-bcg729 \ + --enable-shared \ + $(MAKE_ARGS) +endif + +ifeq ($(BUILD_VARIANT),asterisk13) + MAKE_ARGS:= \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + CFLAGS="$(TARGET_CFLAGS) -DASTERISK_VERSION_NUM=130000 -DLOW_MEMORY -D_XOPEN_SOURCE=600 $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/asterisk-13/include -DHAVE_CONFIG_H -I. -fPIC" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" + + CONFIGURE_ARGS+=\ + --with-asterisk-includes=$(STAGING_DIR)/usr/include/asterisk-13/include \ + --with-asterisk130 \ + --with-bcg729 \ + --enable-shared \ + $(MAKE_ARGS) +endif + +define Package/Install/Default + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_g729.so $(1)/usr/lib/asterisk/modules/ +endef + +Package/asterisk18-codec-g729/install = $(Package/Install/Default) +Package/asterisk11-codec-g729/install = $(Package/Install/Default) +Package/asterisk13-codec-g729/install = $(Package/Install/Default) + +$(eval $(call BuildPackage,asterisk18-codec-g729)) +$(eval $(call BuildPackage,asterisk11-codec-g729)) +$(eval $(call BuildPackage,asterisk13-codec-g729)) diff --git a/net/baresip/Makefile b/net/baresip/Makefile index 87bf2367abb..116c0a5ca49 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=baresip -PKG_VERSION:=0.4.11 -PKG_RELEASE:=3 +PKG_VERSION:=0.4.14 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.creytiv.com/pub/ -PKG_MD5SUM:=bf25d14749ca286716c9b23108472c8a +PKG_MD5SUM:=06e0aea9ba3dbbbe834285a8c7e7df83 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=docs/COPYING @@ -28,10 +28,12 @@ baresip-mods:= \ evdev \ g711 \ g722 \ + g726 \ oss \ speex \ + speex-aec \ + speex-pp \ stdio \ - uuid \ v4l \ v4l2 \ @@ -55,24 +57,27 @@ $(call Package/baresip/Default) endef baresip-mod-alsa := USE_ALSA -baresip-mod-avcodec := USE_FFMPEG -baresip-mod-avformat := USE_FFMPEG_AVFORMAT +baresip-mod-avcodec := USE_AVCODEC +baresip-mod-avformat := USE_AVFORMAT baresip-mod-cons := USE_CONS baresip-mod-evdev := USE_EVDEV baresip-mod-g711 := USE_G711 baresip-mod-g722 := USE_G722 +baresip-mod-g726 := USE_G726 baresip-mod-oss := USE_OSS baresip-mod-speex := USE_SPEEX +baresip-mod-speex-aec := USE_SPEEX_AEC +baresip-mod-speex-pp := USE_SPEEX_PP baresip-mod-stdio := USE_STDIO -baresip-mod-uuid := USE_UUID baresip-mod-v4l := USE_V4L baresip-mod-v4l2 := USE_V4L2 BARESIP_MOD_OPTIONS:= \ MOD_AUTODETECT= \ + EXTRA_MODULES="dtmfio" \ $(foreach m,$(baresip-mods),$(baresip-mod-$(m))=$(if $(CONFIG_PACKAGE_baresip-mod-$(m)),1)) -TARGET_CFLAGS += $(FPIC) +TARGET_CFLAGS += $(FPIC) -D_GNU_SOURCE define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -105,13 +110,14 @@ define Package/baresip/install $(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip endef - -# +################## +# Baresip modules # 1. Name # 2. Title # 3. Files -# 4. Depends -# +# 4. Dependencies +################## + define BuildPlugin define Package/baresip-mod-$(1) @@ -132,7 +138,6 @@ define BuildPlugin $$(eval $$(call BuildPackage,baresip-mod-$(1))) endef - $(eval $(call BuildPackage,baresip)) $(eval $(call BuildPlugin,alsa,ALSA audio driver,alsa,+PACKAGE_baresip-mod-alsa:alsa-lib)) @@ -142,9 +147,12 @@ $(eval $(call BuildPlugin,cons,console UI,cons,)) $(eval $(call BuildPlugin,evdev,input event device UI,evdev,)) $(eval $(call BuildPlugin,g711,G.711 audio codec,g711,)) $(eval $(call BuildPlugin,g722,G.722 audio codec,g722,+PACKAGE_baresip-mod-g722:libspandsp)) +$(eval $(call BuildPlugin,g726,G.726 audio codec,g726,+PACKAGE_baresip-mod-g726:libspandsp)) +$(eval $(call BuildPlugin,httpd,Webserver UI module,httpd,)) $(eval $(call BuildPlugin,oss,OSS audio driver,oss,)) $(eval $(call BuildPlugin,speex,Speex audio codec,speex,+PACKAGE_baresip-mod-speex:libspeex)) +$(eval $(call BuildPlugin,speex-aec,Speex Acoustic Echo Cancellation,speex_aec,+PACKAGE_baresip-mod-speex-aec:libspeex)) +$(eval $(call BuildPlugin,speex-pp,Speex Pre-processor,speex_pp,+PACKAGE_baresip-mod-speex-pp:libspeex)) $(eval $(call BuildPlugin,stdio,standard I/O UI,stdio,)) -$(eval $(call BuildPlugin,uuid,UUID,uuid,+libuuid)) $(eval $(call BuildPlugin,v4l,Video4Linux video source,v4l,+PACKAGE_baresip-mod-v4l:libv4l)) $(eval $(call BuildPlugin,v4l2,Video4Linux2 video source,v4l2,+PACKAGE_baresip-mod-v4l2:libv4l)) diff --git a/net/chan-sccp-b/Makefile b/net/chan-sccp-b/Makefile new file mode 100644 index 00000000000..f2d7fc126be --- /dev/null +++ b/net/chan-sccp-b/Makefile @@ -0,0 +1,114 @@ +# +# Copyright (C) 2015 OpenWrt.org +# Copyright (C) 2015 Cesnet, z.s.p.o. +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=chan-sccp-b +PKG_REV:=6139 +PKG_VERSION:=v4.2-r$(PKG_REV) +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/branches/V4.2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_PROTO:=svn + +PKG_FIXUP:=autoreconf -fi + +PKG_LICENSE:=GPL-1.0 +PKG_LICENSE_FILES:=COPYING LICENSE +PKG_MAINTAINER:=Jiri Slachta + +include $(INCLUDE_DIR)/package.mk + +define Package/chan-sccp-b/Default + SUBMENU:=Telephony + SECTION:=net + CATEGORY:=Network + TITLE:=SCCP channel provider support + URL:=http://chan-sccp-b.sourceforge.net/ + DEPENDS:= +libltdl +endef + +define Package/asterisk18-chan-sccp-b +$(call Package/chan-sccp-b/Default) + DEPENDS+= asterisk18 + VARIANT:=asterisk18 +endef + +define Package/asterisk13-chan-sccp-b +$(call Package/chan-sccp-b/Default) + DEPENDS+= asterisk13 + VARIANT:=asterisk13 +endef + +define Package/asterisk11-chan-sccp-b +$(call Package/chan-sccp-b/Default) + DEPENDS+= asterisk11 + VARIANT:=asterisk11 +endef + +define Package/description/Default + SCCP channel provider for asterisk. It delivers extended functionality for SCCP phones over chan_skinny delivered + by asterisk by default. +endef + +Package/asterisk18-chan-sccp-b/description = $(Package/description/Default) +Package/asterisk11-chan-sccp-b/description = $(Package/description/Default) +Package/asterisk13-chan-sccp-b/description = $(Package/description/Default) + +ifeq ($(BUILD_VARIANT),asterisk13) + CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-13 +endif + +ifeq ($(BUILD_VARIANT),asterisk11) + CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-11 +endif + +ifeq ($(BUILD_VARIANT),asterisk18) + CONFIGURE_ARGS += --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-1.8 +endif + +define Package/conffiles/Default +/etc/asterisk/sccp.conf +/etc/asterisk/extconfig.conf.sccp_sample +/etc/asterisk/res_config_sqlite3.conf.sccp_sample +/etc/asterisk/sccp_sqlite3.sql +/etc/asterisk/sccp.conf.realtime_sample +endef + +Package/asterisk18-chan-sccp-b/conffiles = $(Package/conffiles/Default) +Package/asterisk11-chan-sccp-b/conffiles = $(Package/conffiles/Default) +Package/asterisk13-chan-sccp-b/conffiles = $(Package/conffiles/Default) + +define Build/Compile + $(MAKE) -C "$(PKG_BUILD_DIR)" \ + CFLAGS="$(CFLAGS) -I$(PKG_BUILD_DIR)/src -DLOW_MEMORY" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/Install/Default + $(INSTALL_DIR) $(1)/etc/asterisk + $(CP) ./files/sccp.conf $(1)/etc/asterisk/sccp.conf + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_sccp.so $(1)/usr/lib/asterisk/modules/ + $(INSTALL_DATA) ./files/extconfig.conf.sccp_sample $(1)/etc/asterisk/extconfig.conf.sccp_sample + $(INSTALL_DATA) ./files/res_config_sqlite3.conf.sccp_sample $(1)/etc/asterisk/res_config_sqlite3.conf.sccp_sample + $(INSTALL_DATA) ./files/sccp_sqlite3.sql $(1)/etc/asterisk/sccp_sqlite3.sql + $(INSTALL_DATA) ./files/sccp.conf.realtime_sample $(1)/etc/asterisk/sccp.conf.realtime_sample +endef + +Package/asterisk18-chan-sccp-b/install = $(Package/Install/Default) +Package/asterisk11-chan-sccp-b/install = $(Package/Install/Default) +Package/asterisk13-chan-sccp-b/install = $(Package/Install/Default) + +$(eval $(call BuildPackage,asterisk18-chan-sccp-b)) +$(eval $(call BuildPackage,asterisk11-chan-sccp-b)) +$(eval $(call BuildPackage,asterisk13-chan-sccp-b)) diff --git a/net/chan-sccp-b/files/extconfig.conf.sccp_sample b/net/chan-sccp-b/files/extconfig.conf.sccp_sample new file mode 100644 index 00000000000..18b0e343c42 --- /dev/null +++ b/net/chan-sccp-b/files/extconfig.conf.sccp_sample @@ -0,0 +1,3 @@ +[settings] +sccpdevice => sqlite3,asterisk,sccpdeviceconfig +sccpline => sqlite3,asterisk,sccpline diff --git a/net/chan-sccp-b/files/res_config_sqlite3.conf.sccp_sample b/net/chan-sccp-b/files/res_config_sqlite3.conf.sccp_sample new file mode 100644 index 00000000000..a237d47bc15 --- /dev/null +++ b/net/chan-sccp-b/files/res_config_sqlite3.conf.sccp_sample @@ -0,0 +1,5 @@ +[asterisk] +dbfile => /usr/lib/asterisk/realtime.sqlite3 +debug=yes +requirements=warn +;batch=1000 diff --git a/net/asterisk-1.8.x-chan-sccp-b/files/sccp.openwrt.conf b/net/chan-sccp-b/files/sccp.conf similarity index 63% rename from net/asterisk-1.8.x-chan-sccp-b/files/sccp.openwrt.conf rename to net/chan-sccp-b/files/sccp.conf index c59f4cdb1a4..abc57f98f7e 100644 --- a/net/asterisk-1.8.x-chan-sccp-b/files/sccp.openwrt.conf +++ b/net/chan-sccp-b/files/sccp.conf @@ -4,45 +4,60 @@ keepalive = 60 debug = core context = default dateformat = D/M/Y -bindaddr = 192.168.1.1 +bindaddr = :: port = 2000 -disallow=all -allow=ulaw -allow=alaw -allow=gsm +disallow = all +allow = ulaw +allow = alaw +allow = gsm firstdigittimeout = 16 digittimeout = 6 autoanswer_ring_time = 1 -musicclass=default -language=en -deny=0.0.0.0/0.0.0.0 -permit=192.168.1.0/255.255.255.0 -protocolversion=17 +transfer_on_hangup = off +musicclass = default +language = en +deny = 0.0.0.0/0.0.0.0 +permit = internal +dndFeature = on +echocancel = off +silencesuppression = off -hotline_enabled=yes -hotline_context=default -hotline_extension=111 +hotline_enabled = yes +hotline_context = default +hotline_extension = 111 [SEP001122334455] type = device description = Phone Number One -devicetype = 7940 +devicetype = 7970 +#addon = 7915, 7915 button = line, 111 button = line, 113@01:shared button = speeddial,Phone 2 Line 1, 112, 112@hint +deny = 0.0.0.0/0.0.0.0 +permit = internal +disallow = all +#allow = g722 +#allow = g729 +allow = ulaw +allow = alaw +allow = gsm +directrtp = on -[SEP00a1a2a3a4a5] +[SEP00A1B2C3D4E5] type = device description = Phone Number Two devicetype = 7960 button = line, 112 button = line, 113@01:shared button = speeddial,Phone 1 Line 1, 111, 111@hint +directrtp = on [111] id = 1000 type = line pin = 1234 +context = default label = Phone 1 Line 1 description = Line 111 mailbox = 10111 @@ -60,23 +75,25 @@ trnsfvm = 1000 id = 1001 type = line pin = 1234 +context = default label = Phone 2 Line 1 description = Line 112 mailbox = 10112 cid_name = Phone 2 CID cid_num = 112 accountcode=79112 -callgroup=1 -pickupgroup=1 +callgroup=1,2 +pickupgroup=1,2 context = default -incominglimit = 2 +incominglimit = 4 vmnum = 600 trnsfvm = 1000 [113] id = 1002 type = line -pin = 1234 +pin = 5522 +context = default label = SharedLine 1 description = Line 113 mailbox = 10113 @@ -84,6 +101,8 @@ cid_name = Shared cid_num = 113 accountcode=79113 incominglimit = 2 +callgroup=2 +pickupgroup=2 vmnum = 600 trnsfvm = 1000 - +dnd = silent diff --git a/net/chan-sccp-b/files/sccp.conf.realtime_sample b/net/chan-sccp-b/files/sccp.conf.realtime_sample new file mode 100644 index 00000000000..cb65e8516f2 --- /dev/null +++ b/net/chan-sccp-b/files/sccp.conf.realtime_sample @@ -0,0 +1,30 @@ +[general] +servername = Openwrt +keepalive = 60 +debug = core +context = default +dateformat = D/M/Y +bindaddr = :: +port = 2000 +disallow = all +allow = ulaw +allow = alaw +allow = g729 +firstdigittimeout = 16 +digittimeout = 6 +autoanswer_ring_time = 1 +transfer_on_hangup = off +musicclass = default +language = en +deny = 0.0.0.0/0.0.0.0 +permit = internal +dndFeature = on +echocancel = off +silencesuppression = off + +hotline_enabled = yes +hotline_context = default +hotline_extension = 111 + +devicetable = sccpdevice +linetable = sccpline diff --git a/net/chan-sccp-b/files/sccp_sqlite3.sql b/net/chan-sccp-b/files/sccp_sqlite3.sql new file mode 100644 index 00000000000..60e2adb2741 --- /dev/null +++ b/net/chan-sccp-b/files/sccp_sqlite3.sql @@ -0,0 +1,123 @@ +/* + * this is for users how like to sepatet device and button configuration + * You have to change the table names to: + * + * sccpdevices -> sccpdeviceconfig + * sccplines -> sccpline +*/ + +PRAGMA auto_vacuum=2; +-- +-- Table with line-configuration +-- +CREATE TABLE sccpdevice ( + type varchar(45) DEFAULT NULL, + addon varchar(45) DEFAULT NULL, + description varchar(45) DEFAULT NULL, + tzoffset varchar(5) DEFAULT NULL, + transfer varchar(5) DEFAULT 'on', + cfwdall varchar(5) DEFAULT 'on', + cfwdbusy varchar(5) DEFAULT 'on', + imageversion varchar(45) DEFAULT NULL, + deny varchar(45) DEFAULT NULL, + permit varchar(45) DEFAULT NULL, + dndFeature varchar(5) DEFAULT 'on', + directrtp varchar(3) DEFAULT 'off', + earlyrtp varchar(8) DEFAULT 'off', + mwilamp varchar(5) DEFAULT 'on', + mwioncall varchar(5) DEFAULT 'off', + pickupexten varchar(5) DEFAULT 'on', + pickupcontext varchar(100) DEFAULT '', + pickupmodeanswer varchar(5) DEFAULT 'on', + private varchar(5) DEFAULT 'off', + privacy varchar(100) DEFAULT 'full', + nat varchar(4) DEFAULT 'auto', + softkeyset varchar(100) DEFAULT '', + audio_tos varchar(11) DEFAULT NULL, + audio_cos varchar(1) DEFAULT NULL, + video_tos varchar(11) DEFAULT NULL, + video_cos varchar(1) DEFAULT NULL, + conf_allow varchar(3) DEFAULT 'on', + conf_play_general_announce varchar(3) DEFAULT 'on', + conf_play_part_announce varchar(3) DEFAULT 'on', + conf_mute_on_entry varchar(3) DEFAULT 'off', + conf_music_on_hold_class varchar(80) DEFAULT 'default', + conf_show_conflist varchar(3) DEFAULT 'on', + backgroundImage varchar(255) DEFAULT '', + ringtone varchar(255) DEFAULT '', + setvar varchar(100) DEFAULT NULL, + disallow varchar(255) DEFAULT NULL, + allow varchar(255) DEFAULT NULL, + name varchar(15) NOT NULL DEFAULT '', + PRIMARY KEY (name) +); + +-- +-- Table with device-configuration +-- +CREATE TABLE sccpline ( + id varchar(4) DEFAULT NULL, + pin varchar(45) DEFAULT NULL, + label varchar(45) DEFAULT NULL, + description varchar(45) DEFAULT NULL, + context varchar(45) DEFAULT NULL, + incominglimit varchar(45) DEFAULT NULL, + transfer varchar(45) DEFAULT NULL, + mailbox varchar(45) DEFAULT NULL, + vmnum varchar(45) DEFAULT NULL, + cid_name varchar(45) DEFAULT NULL, + cid_num varchar(45) DEFAULT NULL, + trnsfvm varchar(45) DEFAULT NULL, + secondary_dialtone_digits varchar(45) DEFAULT NULL, + secondary_dialtone_tone varchar(45) DEFAULT NULL, + musicclass varchar(45) DEFAULT NULL, + language varchar(45) DEFAULT NULL, + accountcode varchar(45) DEFAULT NULL, + echocancel varchar(45) DEFAULT NULL, + silencesuppression varchar(45) DEFAULT NULL, + callgroup varchar(45) DEFAULT NULL, + pickupgroup varchar(45) DEFAULT NULL, + namedcallgroup varchar(45) DEFAULT NULL, + namedpickupgroup varchar(45) DEFAULT NULL, + dnd varchar(7) DEFAULT 'reject', + amaflags varchar(45) DEFAULT NULL, + defaultSubscriptionId_number varchar(5) DEFAULT NULL, + setvar varchar(50) DEFAULT NULL, + name varchar(45) NOT NULL DEFAULT '', + PRIMARY KEY (name) +); + +CREATE TABLE buttontype ( + type varchar(9) DEFAULT NULL, + PRIMARY KEY (type) +); + +INSERT INTO buttontype (type) VALUES ('line'); +INSERT INTO buttontype (type) VALUES ('speeddial'); +INSERT INTO buttontype (type) VALUES ('service'); +INSERT INTO buttontype (type) VALUES ('feature'); +INSERT INTO buttontype (type) VALUES ('empty'); +-- +-- Table with button-configuration for device +-- +CREATE TABLE buttonconfig ( + device varchar(15) NOT NULL DEFAULT '', + instance tinyint(4) NOT NULL DEFAULT '0', + type varchar(9), + name varchar(36) DEFAULT NULL, + options varchar(100) DEFAULT NULL, + PRIMARY KEY (device,instance), + FOREIGN KEY (device) REFERENCES sccpdevice (device), + FOREIGN KEY (type) REFERENCES buttontype (type) +); + +-- +-- View for merging device and button configuration +-- +CREATE VIEW sccpdeviceconfig AS + SELECT sccpdevice.*, + group_concat(buttonconfig.type||","||buttonconfig.name||","||buttonconfig.options,";") as button + FROM buttonconfig, sccpdevice + WHERE buttonconfig.device=sccpdevice.name + GROUP BY sccpdevice.name + ORDER BY sccpdevice.name, buttonconfig.instance; diff --git a/net/freeswitch/Config.in b/net/freeswitch/Config.in index b72f2bf7daa..21a61eabfba 100644 --- a/net/freeswitch/Config.in +++ b/net/freeswitch/Config.in @@ -77,6 +77,11 @@ menu "Configuration" help Compile libs/apr-util with PostgreSQL support. + config FS_WITH_SQLITE2 + bool "SQLITE2" + help + Compile libs/apr-util with SQLITE2 support. + config FS_WITH_SQLITE3 bool "SQLITE3" help @@ -214,11 +219,18 @@ menu "Configuration" help Use OpenSSL crypto primitives. + config FS_WITH_PYTHON + depends on PACKAGE_freeswitch-mod-python + bool "Enable to use system provided version of python" + default n + help + Enable to use system provided version of python. + config FS_WITH_STUN bool "Enable stun module" - default n + default y help - Enable stun module + Enable stun module. config FS_WITH_ERLANG depends on PACKAGE_freeswitch-mod-erlang-event diff --git a/net/freeswitch/Makefile b/net/freeswitch/Makefile index 1948ebb2203..1148884d81a 100644 --- a/net/freeswitch/Makefile +++ b/net/freeswitch/Makefile @@ -6,20 +6,21 @@ # # include $(TOPDIR)/rules.mk +-include perlmod.mk PKG_NAME:=freeswitch PKG_SOURCE_PROTO:=git PKG_DISTNAME:=$(PKG_NAME)_$(PKG_SOURCE_PROTO) -PKG_VERSION:=1.5.15b +PKG_VERSION:=1.5.final # # The latest FS git hash in PKG_SOURCE_VERSION can be obtained from # http://fisheye.freeswitch.org # -FS_WITH_DEFAULT_HEAD:=12b6940644a68ea444c0e430412d419ae368d4a8 -PKG_SOURCE_URL:=https://stash.$(PKG_NAME).org/scm/fs/$(PKG_NAME).git +FS_WITH_DEFAULT_HEAD:=16d600c0350a79c2532c739dd1432f7ed318ea09 +PKG_SOURCE_URL:=https://$(PKG_NAME).org/stash/scm/fs/$(PKG_NAME).git PKG_SOURCE_VERSION:=$(if $(CONFIG_FS_WITH_LATEST_HEAD),$(shell git ls-remote $(PKG_SOURCE_URL) HEAD|cut -f1),$(FS_WITH_DEFAULT_HEAD)) FS_WITH_DEFAULT_HEAD_SHORT:=$(shell echo $(FS_WITH_DEFAULT_HEAD)|cut -b -7) PKG_SOURCE_VERSION_SHORT:=$(shell echo $(PKG_SOURCE_VERSION)|cut -b -7) @@ -29,7 +30,10 @@ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(if $(CONFIG_FS_WITH_LOCAL_SOURCE),$(FS_WITH_D PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_FIXUP:=libtool autoreconf +PATCH_DIR=./patches/$(CONFIG_LIBC) + + +PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=0 PKG_LICENSE:=MPL-1.1 @@ -44,6 +48,7 @@ PKG_BUILD_DEPENDS:= \ FS_WITH_CORE_LIBEDIT_SUPPORT:libedit \ FS_WITH_MYSQL:libmysqlclient \ FS_WITH_POSTGRESQL:libpq \ + FS_WITH_SQLITE2:libsqlite2 \ FS_WITH_SQLITE3:libsqlite3 \ FS_WITH_APR_SCTP:sctp \ @@ -56,6 +61,7 @@ FS_MOD_AVAILABLE:= \ alsa \ amr \ amrwb \ + av \ avmd \ basic \ bert \ @@ -66,7 +72,6 @@ FS_MOD_AVAILABLE:= \ cdr-mongodb \ cdr-pg-csv \ cdr-sqlite \ - celt \ cepstral \ cidlookup \ cluechoo \ @@ -75,6 +80,7 @@ FS_MOD_AVAILABLE:= \ conference \ console \ curl \ + cv \ dahdi-codec \ db \ dialplan-asterisk \ @@ -88,6 +94,7 @@ FS_MOD_AVAILABLE:= \ enum \ erlang-event \ esf \ + esl \ event-multicast \ event-socket \ event-zmq \ @@ -105,6 +112,7 @@ FS_MOD_AVAILABLE:= \ h26x \ h323 \ hash \ + hiredis \ html5 \ httapi \ http-cache \ @@ -112,6 +120,7 @@ FS_MOD_AVAILABLE:= \ isac \ java \ json-cdr \ + kazoo \ lcr \ ldap \ local-stream \ @@ -157,9 +166,9 @@ FS_MOD_AVAILABLE:= \ skel \ skinny \ skypopen \ + smpp \ sms \ snapshot \ - snipe-hunt \ sndfile \ snmp \ snom \ @@ -185,7 +194,7 @@ FS_MOD_AVAILABLE:= \ vmd \ voicemail \ voicemail-ivr \ - vp8 \ + vpx \ xml-cdr \ xml-curl \ xml-ldap \ @@ -217,7 +226,9 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_FS_WITH_OPENWRT_SOURCE \ CONFIG_FS_WITH_OPT \ CONFIG_FS_WITH_POSTGRESQL \ + CONFIG_FS_WITH_PYTHON \ CONFIG_FS_WITH_SILENT_RULES \ + CONFIG_FS_WITH_SQLITE2 \ CONFIG_FS_WITH_SQLITE3 \ CONFIG_FS_WITH_SRTP \ CONFIG_FS_WITH_SRTP_GENERIC_AESICM \ @@ -257,7 +268,7 @@ define Package/$(PKG_NAME) $(call Package/$(PKG_NAME)/Default) MENU:=1 TITLE:=FreeSWITCH open source telephony platform ($(PKG_SOURCE_VERSION_SHORT)) - DEPENDS:=+FS_WITH_CORE_LIBEDIT_SUPPORT:libedit +FS_WITH_OPENSSL:libopenssl +libcurl +libdb47 +libgdbm $(ICONV_DEPENDS) $(INTL_DEPENDS) +libjpeg +libncurses +libopenldap +libpcre +libpthread +librt +libspeex +libspeexdsp +FS_WITH_SQLITE3:libsqlite3 +FS_WITH_SRTP:libsrtp +SSP_SUPPORT:libssp +libstdcpp +libuuid +PACKAGE_$(PKG_NAME)-mod-perl:perl + DEPENDS:=+FS_WITH_CORE_LIBEDIT_SUPPORT:libedit +FS_WITH_OPENSSL:libopenssl +libcurl +libdb47 +libfreetype +libgdbm $(ICONV_DEPENDS) $(INTL_DEPENDS) +libjpeg +libncurses +libopenldap +libpcre +libpng +libpthread +librt +libspeex +libspeexdsp +FS_WITH_SQLITE2:libsqlite2 +FS_WITH_SQLITE3:libsqlite3 +FS_WITH_SRTP:libsrtp +SSP_SUPPORT:libssp +libstdcpp +libuuid +PACKAGE_$(PKG_NAME)-mod-perl:perl +libvpx endef @@ -458,11 +469,6 @@ endef MAKE_INSTALL_TARGETS:=install -ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),) - $(eval $(call Download/files,celt,celt-0.10.0.tar.gz,a656f6176e9be84027c0e51ceedd710f,,downloads/libs/,libs/)) -endif - - ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl),) $(eval $(call Download/files,json-cdr,json-c-0.9.tar.gz,4653b3b9c568bb9c782178abfaac128d,,downloads/libs/,libs/)) endif @@ -473,26 +479,11 @@ ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),) endif -ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-flite),) - $(eval $(call Download/files,flite,flite-1.5.4-current.tar.bz2,f3a2d88b1059f6f4ff3c20a8169bc0f4,,downloads/libs/,libs/)) -endif - - ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-mongo),) $(eval $(call Download/files,mongo,mongo-c-driver-0.92.2.tar.gz,afab25a33abd3f1e0ba79c5a9da92651,,downloads/libs/,libs/)) endif -ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-opus),) - $(eval $(call Download/files,opus,opus-1.1-p2.tar.gz,5da7cb39925bfb7dd60ea2e810f71357,,downloads/libs/,libs/)) -endif - - -ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-ldap)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-ldap),) - $(eval $(call Download/files,ldap,openldap-2.4.19.tar.gz,4a6dab2711fcf141f19bb680bc335887,,downloads/libs/,libs/)) -endif - - ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-08KHz),) $(eval $(call Download/files,sounds-en-08KHz,$(PKG_NAME)-sounds-en-us-callie-8000-1.0.50.tar.gz,14cccba7b5c56f027fea391f1e0ee2d6,,,)) MAKE_INSTALL_TARGETS+= sounds-install @@ -557,21 +548,24 @@ ifneq ($(CONFIG_USE_EGLIBC),) endif -FS_TARGET_CFLAGS:= $(TARGET_CFLAGS) -DLUA_USE_LINUX $(FPIC) -std=gnu99 -Wno-format -Wno-unused-variable -Wno-unused-but-set-variable -Wno-implicit-function-declaration -FS_TARGET_CXXFLAGS:= $(TARGET_CXXFLAGS) -FS_TARGET_CPPFLAGS:= -I. -I./lua $(TARGET_CPPFLAGS) $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-json-cdr),-Wno-error) -I`ls -d $(PKG_BUILD_DIR)/libs/*|grep tiff`/libtiff -I$(PKG_BUILD_DIR)/libs/spandsp/src +ifeq ($(CONFIG_LIBC),musl) + TARGET_CFLAGS += -D_GNU_SOURCE +endif +#FS_TARGET_CFLAGS:= $(TARGET_CFLAGS) -DLUA_USE_LINUX $(FPIC) -std=gnu99 -Wno-format -Wno-unused-variable -Wno-unused-but-set-variable -Wno-implicit-function-declaration +#FS_TARGET_CXXFLAGS:= $(TARGET_CXXFLAGS) +#FS_TARGET_CPPFLAGS:= -I. -I./lua $(TARGET_CPPFLAGS) $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-json-cdr),-Wno-error) -I`ls -d $(PKG_BUILD_DIR)/libs/*|grep tiff`/libtiff -I$(PKG_BUILD_DIR)/libs/spandsp/src #MAKE_FLAGS += \ # OPT_FLAGS+="$(TARGET_CFLAGS)" -MAKE_VARS += \ - AR="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ar" \ - CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)" \ - CXX="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \ - RANLIB="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ranlib" \ - CC_FOR_BUILD="$(HOSTCC)" \ +#MAKE_VARS += \ +# AR="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ar" \ +# CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)" \ +# CXX="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \ +# RANLIB="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ranlib" \ +# CC_FOR_BUILD="$(HOSTCC)" \ CONFIGURE_ARGS+= \ @@ -581,7 +575,7 @@ CONFIGURE_ARGS+= \ --bindir="/usr/bin" \ --libdir="/usr/lib" \ --srcdir="$(PKG_BUILD_DIR)" \ - --sysconfdir="/etc/$(PKG_NAME)" \ + --sysconfdir="/etc" \ --with-modinstdir="/usr/lib/$(PKG_NAME)" \ --with-random="/dev/urandom" \ $(call autoconf_bool,CONFIG_FS_WITH_BUILTIN_ZRTP,zrtp) \ @@ -607,58 +601,65 @@ CONFIGURE_ARGS+= \ $(if $(CONFIG_FS_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)/usr/lib") \ $(if $(CONFIG_FS_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \ $(if $(CONFIG_FS_WITH_OGG),--with-ogg="$(STAGING_DIR)/usr") \ - $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),--with-ogg="$(STAGING_DIR)/usr",--without-ogg) \ + $(if $(CONFIG_FS_WITH_OPENSSL),--with-openssl="pkg-config") \ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang-event),--with-erlang="$(CONFIG_FS_WITH_ERLANG)",--without-erlang) \ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-java),--with-java="$(STAGING_DIR)/usr",--without-java) \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),--with-python="$(CONFIG_FS_WITH_PYTHON)",--without-python) \ $(if ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-cdr)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-curl)),--with-libcurl="$(STAGING_DIR)/usr",--without-libcurl) \ --with$(if $(CONFIG_FS_WITH_MYSQL),,out)-mysql \ - --with$(if $(CONFIG_FS_WITH_OPENSSL),,out)-openssl \ --with$(if $(CONFIG_FS_WITH_POSTGRESQL),,out)-pgsql \ + --with$(if $(CONFIG_FS_WITH_SQLITE2),,out)-sqlite2 \ --with$(if $(CONFIG_FS_WITH_SQLITE3),,out)-sqlite3 \ -ifeq ($(ARCH),arm) +ifeq ($(CONFIG_TARGET_ARCH_PACKAGES),"kirkwood") CONFIGURE_ARGS+= --enable-arm5e-asm \ endif -CONFIGURE_VARS+= \ - config_TARGET_CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)" \ - config_TARGET_CXX="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \ - config_TARGET_CFLAGS="$(FS_TARGET_CPPFLAGS) $(FS_TARGET_CFLAGS)" \ - config_TARGET_CXXFLAGS="$(FS_TARGET_CPPFLAGS) $(FS_TARGET_CXXFLAGS)" \ - config_TARGET_CPPFLAGS="$(FS_TARGET_CPPFLAGS)" \ - config_TARGET_READLINE_INC="$(FS_TARGET_CPPFLAGS)" \ - config_TARGET_READLINE_LIBS="-lreadline -lncurses" \ - config_TARGET_LIBS="-lpthread -ldl" \ - config_BUILD_CC="$(HOSTCC)" \ - CC_FOR_BUILD="$(HOSTCC)" \ - BUILDTOOL_CC="$(HOSTCC)" \ - BUILDTOOL_CCLD="$(HOSTCC)" \ - CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)" \ - CXX="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \ - AR="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ar" \ - RANLIB="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ranlib" \ - CFLAGS="$(FS_TARGET_CPPFLAGS) $(FS_TARGET_CFLAGS)" \ - CXXFLAGS="$(FS_TARGET_CPPFLAGS) $(FS_TARGET_CXXFLAGS)" \ - CPPFLAGS="$(FS_TARGET_CPPFLAGS)" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib/perl5/5.20/CORE -Wl,-rpath-link=\"$(STAGING_DIR)/usr/lib\" -Wl,-rpath-link=\"$(STAGING_DIR)/usr/lib$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),/perl5/5.20/CORE)\" -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/lib$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),/perl5/5.20/CORE -lperl -lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc)" \ - HOST_CC="/usr/bin/cc" \ - HOST_CXX="/usr/bin/g++" \ - CROSS_COMPILE="1" \ - $(if $(CONFIG_FS_WITH_APR_SCTP),ac_cv_header_netinet_sctp_h="yes") \ +#ifeq ($(CONFIG_LIBC),"uClibc") +ifeq ($(CONFIG_ARCH),"mips") + CONFIGURE_VARS+= \ + ac_cv_file_dbd_apr_dbd_mysql_c="no" \ + +endif +#endif + + +#CONFIGURE_VARS+= \ +# config_TARGET_CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)" \ +# config_TARGET_CXX="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \ +# config_TARGET_CFLAGS="$(FS_TARGET_CPPFLAGS) $(FS_TARGET_CFLAGS)" \ +# config_TARGET_CXXFLAGS="$(FS_TARGET_CPPFLAGS) $(FS_TARGET_CXXFLAGS)" \ +# config_TARGET_CPPFLAGS="$(FS_TARGET_CPPFLAGS)" \ +# config_TARGET_READLINE_INC="$(FS_TARGET_CPPFLAGS)" \ +# config_TARGET_READLINE_LIBS="-lreadline -lncurses" \ +# config_TARGET_LIBS="-lpthread -ldl" \ +# config_BUILD_CC="$(HOSTCC)" \ +# CC_FOR_BUILD="$(HOSTCC)" \ +# BUILDTOOL_CC="$(HOSTCC)" \ +# BUILDTOOL_CCLD="$(HOSTCC)" \ +# CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)" \ +# CXX="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \ +# AR="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ar" \ +# RANLIB="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ranlib" \ +# CFLAGS="$(FS_TARGET_CPPFLAGS) $(FS_TARGET_CFLAGS)" \ +# CXXFLAGS="$(FS_TARGET_CPPFLAGS) $(FS_TARGET_CXXFLAGS)" \ +# CPPFLAGS="$(FS_TARGET_CPPFLAGS)" \ +# LDFLAGS="-L$(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE -Wl,-rpath-link=\"$(STAGING_DIR)/usr/lib\" -Wl,-rpath-link=\"$(STAGING_DIR)/usr/lib$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),/perl5/$(PERL_VERSION)/CORE)\" -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/lib$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),/perl5/$(PERL_VERSION)/CORE -lperl -lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc)" \ +# HOST_CC="/usr/bin/cc" \ +# HOST_CXX="/usr/bin/g++" \ +# CROSS_COMPILE="1" \ +# $(if $(CONFIG_FS_WITH_APR_SCTP),ac_cv_header_netinet_sctp_h="yes") \ +# ac_cv_file_dbd_apr_dbd_mysql_c="no" \ define Build/Prepare $(call Build/Prepare/Default) - $(call Prepare/celt) $(call Prepare/event-zmq) - $(call Prepare/flite) $(call Prepare/json-cdr) - $(call Prepare/ldap) $(call Prepare/mongo) - $(call Prepare/opus) $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-08KHz),$(call Prepare/sounds-en-08KHz)) $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-16KHz),$(call Prepare/sounds-en-16KHz)) $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-32KHz),$(call Prepare/sounds-en-32KHz)) @@ -670,12 +671,11 @@ define Build/Prepare ifeq ($(CONFIG_FS_WITH_LOCAL_SOURCE),y) (cd $(PKG_BUILD_DIR); $(if $(CONFIG_FS_WITH_LATEST_HEAD),if $(QUILT_CMD) top > /dev/null 2>&1 && [ -f $(PKG_BUILD_DIR)/patches/series ]; then $(QUILT_CMD) pop -a; fi; git pull;) if $(QUILT_CMD) next > /dev/null 2>&1; then $(QUILT_CMD) push -a; fi) endif + (cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap.sh) endef define Build/Configure - (cd $(PKG_BUILD_DIR); $(if $(CONFIG_FS_WITH_LATEST_HEAD),if $(QUILT_CMD) top > /dev/null 2>&1 && [ -f $(PKG_BUILD_DIR)/patches/series ]; then $(QUILT_CMD) pop -a; fi; git pull;) if $(QUILT_CMD) next > /dev/null 2>&1; then $(QUILT_CMD) push -a; fi) - (cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap.sh) $(foreach m,$(FS_MOD_AVAILABLE), $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)), $(SED) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR)/modules.conf @@ -697,14 +697,6 @@ define Build/Compile endef -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).{a,so*} $(1)/usr/lib/ -endef - - define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DIR) $(1)/etc/default @@ -713,7 +705,6 @@ define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/etc/hotplug.d/iface $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/include $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) @@ -721,7 +712,6 @@ define Package/$(PKG_NAME)/install $(INSTALL_DATA) ./files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME) $(INSTALL_DATA) ./files/$(PKG_NAME).hotplug $(1)/etc/hotplug.d/iface/90-$(PKG_NAME) $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME)* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/$(PKG_NAME).pc $(1)/usr/lib/pkgconfig/ $(if $(1)/usr/lib/lib$(PKG_NAME).la,$(STAGING_DIR_HOST)/bin/sed -i -re 's|$(STAGING_DIR)||g;s|$(TOOLCHAIN_DIR)||g;s|$(TARGET_CROSS)|usr|g;s|$(REAL_GNU_TARGET_NAME)|usr|g;s|-L$(PKG_BUILD_DIR)(.*)libzrtp ||g;:a;s|((-[IL]/\S+\s).*)\2|\1|;ta' $(1)/usr/lib/lib$(PKG_NAME).la) @@ -863,6 +853,7 @@ define Package/$(PKG_NAME)-tools/install $(CP) $(PKG_INSTALL_DIR)/usr/bin/fsxs $(1)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/bin/gentls_cert $(1)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/bin/tone2wav $(1)/usr/bin/ + $(STAGING_DIR_HOST)/bin/sed -i -re 's|$(ICONV_LDFLAGS)||g;s|$(INTL_LDFLAGS)||g;s|$(PKG_BUILD_DIR)|/usr|g;s|$(STAGING_DIR)||g;s|$(STAGING_DIR_HOST)|/usr|g;s|$(TOOLCHAIN_DIR)||g;s|$(TARGET_CROSS)|usr|g;s|$(REAL_GNU_TARGET_NAME)|usr|g;:a;s|((-[IL]/\S+\s).*)[ ,\n]\1|\1|;ta' $(1)/usr/bin/fsxs endef @@ -968,25 +959,26 @@ $(eval $(call BuildPlugin,abstraction,An Abstraction To API Call,vanilla,,,,)) $(eval $(call BuildPlugin,alsa,Alsa Endpoint,vanilla,,,,+FS_WITH_ALSA:alsa-lib @FS_WITH_ALSA)) $(eval $(call BuildPlugin,amr,Adaptive Multi-Rate On Bandwidth Codec,vanilla,,,,)) $(eval $(call BuildPlugin,amrwb,Wide Band AMR,vanilla,,,,)) +$(eval $(call BuildPlugin,av,FS Video Codec / File Format,vanilla,,,,@BROKEN)) $(eval $(call BuildPlugin,avmd,Advanced Voice Mail Detection,vanilla,,,,)) $(eval $(call BuildPlugin,basic,BASIC,vanilla,,,,)) $(eval $(call BuildPlugin,bert,Naive Bit Error Rate Tester,vanilla,,,,)) $(eval $(call BuildPlugin,blacklist,Blacklist,vanilla,,,,)) -$(eval $(call BuildPlugin,bv,BroadVoice 16/32-bit Audio Codec,vanilla,,,,)) +$(eval $(call BuildPlugin,bv,BroadVoice 16/32-bit Audio Codec,vanilla,,,,@BROKEN)) # Requires unsupported libbroadvoice $(eval $(call BuildPlugin,callcenter,Call Center,vanilla,,,,)) $(eval $(call BuildPlugin,cdr-csv,CSV-CDR Handler,mod,,,,)) # ~/conf $(eval $(call BuildPlugin,cdr-mongodb,MongoDB CDR logger,vanilla,,,,)) $(eval $(call BuildPlugin,cdr-pg-csv,PostgreSQL CDR Handler,vanilla,,,,+coreutils +FS_WITH_POSTGRESQL:libpq @FS_WITH_POSTGRESQL)) $(eval $(call BuildPlugin,cdr-sqlite,SQLite3 CDR Handler,vanilla,,,,@FS_WITH_SQLITE3)) -$(eval $(call BuildPlugin,celt,CELT Ultra-Low Delay Codec,vanilla,,,,+libogg)) $(eval $(call BuildPlugin,cepstral,Cepstral Interface,vanilla,,,,@BROKEN)) # needs $(eval $(call BuildPlugin,cidlookup,Data Query For CID->NAME Services,mod,,,,+libcurl)) # ~/conf $(eval $(call BuildPlugin,cluechoo,Framework Demo,vanilla,,,,)) -$(eval $(call BuildPlugin,codec2,CoDec 2,,,,,)) +$(eval $(call BuildPlugin,codec2,CoDec 2,,,,,@BROKEN)) # Requires unsupported libcodec2 $(eval $(call BuildPlugin,commands,API Commands,vanilla,,,,)) $(eval $(call BuildPlugin,conference,Conference Room,vanilla,,,,)) $(eval $(call BuildPlugin,console,Console Logger,vanilla,,,,)) $(eval $(call BuildPlugin,curl,HTTP Request,vanilla,,,,+libcurl)) +$(eval $(call BuildPlugin,cv,Detect Video motion,vanilla,,,,@BROKEN)) $(eval $(call BuildPlugin,dahdi-codec,DAHDI Codecs,vanilla,,,,)) $(eval $(call BuildPlugin,db,Database Backend,vanilla,,,,+libdb47)) $(eval $(call BuildPlugin,dialplan-asterisk,Asterisk Dialplan Parser,vanilla,,,,)) @@ -997,38 +989,41 @@ $(eval $(call BuildPlugin,directory,Search By Name Directory IVR,vanilla,,,,)) $(eval $(call BuildPlugin,distributor,Simple Robin-Round Load,vanilla,,,,)) $(eval $(call BuildPlugin,dptools,Dialplan Tools,vanilla,,,,)) $(eval $(call BuildPlugin,easyroute,Simple DID Routing,vanilla,,,,)) -$(eval $(call BuildPlugin,enum,ENUM Routing,,,,,+libldns @BROKEN)) +$(eval $(call BuildPlugin,enum,ENUM Routing,,,,,+libldns)) $(eval $(call BuildPlugin,erlang-event,Erlang Event Handler,vanilla,,,,+erlang)) $(eval $(call BuildPlugin,esf,Extra SIP Functionality,vanilla,,,,)) +$(eval $(call BuildPlugin,esl,Allow to generate remote ESL commands,vanilla,,,,@BROKEN)) $(eval $(call BuildPlugin,event-multicast,Multicast Event Handler,vanilla,,,,)) $(eval $(call BuildPlugin,event-socket,Socket Event Handler,vanilla,,,,)) $(eval $(call BuildPlugin,event-zmq,Socket Event Handler By Zero MQ,vanilla,,,,+libuuid)) $(eval $(call BuildPlugin,expr,Expression Evaluation,vanilla,,,,)) $(eval $(call BuildPlugin,fifo,FIFO,vanilla,,,,)) $(eval $(call BuildPlugin,file-string,Streaming Multiple Sound Files Sequentially,vanilla,,,,@OBSOLETE)) # merged into dptools -$(eval $(call BuildPlugin,flite,Festival TTS,vanilla,,,,@(!(armeb||avr32)||BROKEN))) +$(eval $(call BuildPlugin,flite,Festival TTS,vanilla,,,,+flite @BROKEN)) # flite is from old package and/or qi repo $(eval $(call BuildPlugin,format-cdr,XML CDR Module to files or curl,vanilla,,,,)) $(eval $(call BuildPlugin,fsk,Bell-202 1200-Baud FSK Decoder,vanilla,,,,)) -$(eval $(call BuildPlugin,fsv,Video Player / Recorder,vanilla,,,,)) +$(eval $(call BuildPlugin,fsv,Video Player / Recorder,vanilla,,,,+libyuv @BROKEN)) # Requires unsupported libyuv. $(eval $(call BuildPlugin,g723-1,G.723.1 Codec,vanilla,,,,)) $(eval $(call BuildPlugin,g729,G.729 Codec,vanilla,,,,)) $(eval $(call BuildPlugin,gsmopen,GSM Modem compatible Endpoint,mod,,,alsa,+FS_WITH_ALSA:alsa-lib +FS_WITH_LZMA:liblzma @FS_WITH_ALSA @BROKEN)) # needs gsmlib $(eval $(call BuildPlugin,h26x,H26X Linear Codec,vanilla,,,,)) $(eval $(call BuildPlugin,h323,H323 Endpoint,mod,,,,@BROKEN)) # Req. H323Plus v1.24.x or newer $(eval $(call BuildPlugin,hash,API For Manipulating A Hash Table,vanilla,,,,)) +$(eval $(call BuildPlugin,hiredis,Redis DB access,vanilla,,,,+hiredis @BROKEN)) #$(eval $(call BuildPlugin,html5,HTML5 Endpoint Module,vanilla,,,,)) # defunct? $(eval $(call BuildPlugin,httapi,HT Telephony API and HTTP Caching,mod,,,,)) # ~/conf $(eval $(call BuildPlugin,http-cache,HTTP GET With Caching,mod,,,,+libcurl)) # ~/conf -$(eval $(call BuildPlugin,ilbc,ILBC Codec,vanilla,,,,)) +$(eval $(call BuildPlugin,ilbc,ILBC Codec,vanilla,,,,+libilbc @BROKEN)) # Requires unsupported libilbc. $(eval $(call BuildPlugin,isac,iSAC Codec,vanilla,,,,)) $(eval $(call BuildPlugin,java,Java Language Interface,vanilla,,,,@BROKEN)) # needs java $(eval $(call BuildPlugin,json-cdr,JSon-CDR Interface,mod,,,,+libcurl)) +$(eval $(call BuildPlugin,kazoo,Socket Controlled Event Handler,vanilla,,,,+erlang)) $(eval $(call BuildPlugin,ldap,LDAP interface,vanilla,,,,+libopenldap)) $(eval $(call BuildPlugin,lcr,Least Cost Routing,vanilla,,,,)) $(eval $(call BuildPlugin,local-stream,Multi-Channel On Same Stream,vanilla,,,,)) $(eval $(call BuildPlugin,logfile,File Logger,vanilla,,,,)) $(eval $(call BuildPlugin,loopback,Loopback to Dialplan Endpoint,vanilla,,,,)) -$(eval $(call BuildPlugin,lua,LUA Language Interface,vanilla,,,,)) +$(eval $(call BuildPlugin,lua,LUA Language Interface,vanilla,,,,+liblua)) $(eval $(call BuildPlugin,managed,Media Switching Software Library,vanilla,,,,+glib2 @BROKEN)) # needs Mono $(eval $(call BuildPlugin,memcache,MemCached Interface,vanilla,,,,+libmemcached @BROKEN)) # Req host libmemcached $(eval $(call BuildPlugin,mongo,A Document-Oriented Database,vanilla,,,,@BROKEN)) @@ -1036,16 +1031,16 @@ $(eval $(call BuildPlugin,mp4,MP4 File Format Support For Video,vanilla,,,,@BROK $(eval $(call BuildPlugin,mp4v,MP4 CoDec Support For Video,vanilla,,,,)) $(eval $(call BuildPlugin,native-file,WAV Format Sound Player,vanilla,,,,)) $(eval $(call BuildPlugin,nibblebill,Credit / Debit Billing,vanilla,,,,)) -$(eval $(call BuildPlugin,opus,Opus CoDec,vanilla,,,,)) +$(eval $(call BuildPlugin,opus,Opus CoDec,vanilla,,,,+libopus)) $(eval $(call BuildPlugin,oreka,Media Recording with Oreka,vanilla,,,,)) -$(eval $(call BuildPlugin,perl,Perl Language Interface,vanilla,,lib/perl5/5.20/$(PKG_NAME).la lib/perl5/5.20/$(PKG_NAME).pm lib/perl5/5.20/$(PKG_NAME).so,,+perl +libdb47 +libgdbm)) +$(eval $(call BuildPlugin,perl,Perl Language Interface,vanilla,,lib/perl5/$(PERL_VERSION)/$(PKG_NAME).la lib/perl5/$(PERL_VERSION)/$(PKG_NAME).pm lib/perl5/$(PERL_VERSION)/$(PKG_NAME).so,,+perl +libdb47 +libgdbm @BROKEN)) $(eval $(call BuildPlugin,portaudio,Portaudio To Sound Card Interface,vanilla,,,alsa,+FS_WITH_ALSA:alsa-lib @FS_WITH_ALSA @BROKEN)) # needs portaudio $(eval $(call BuildPlugin,portaudio-stream,Portaudio Streaming Interface,vanilla,,,alsa,+FS_WITH_ALSA:alsa-lib @FS_WITH_ALSA @BROKEN)) # needs portaudio $(eval $(call BuildPlugin,posix-timer,POSIX Compliant Soft Timer,vanilla,,,,)) $(eval $(call BuildPlugin,python,Python Language Interface,vanilla,,,,python @BROKEN)) $(eval $(call BuildPlugin,radius-cdr,Radius-CDR interface,vanilla,,,,@BROKEN)) # fails in freeradius-client $(eval $(call BuildPlugin,rayo,Rayo server & node implementation,vanilla,,,,)) -$(eval $(call BuildPlugin,redis,Redis Limited Backend,vanilla,,,,)) +$(eval $(call BuildPlugin,redis,Redis limit backend,vanilla,,,,)) $(eval $(call BuildPlugin,rss,RRS Feeds via TTS,vanilla,,,,)) $(eval $(call BuildPlugin,rtc,RTC endpoint,vanilla,,,,)) $(eval $(call BuildPlugin,rtmp,RTMP Protocol Handler,vanilla,,,,)) @@ -1063,15 +1058,15 @@ $(eval $(call BuildPlugin,say-ru,Russian Say,vanilla,,,,)) $(eval $(call BuildPlugin,say-th,Thai Say,vanilla,,,,)) $(eval $(call BuildPlugin,say-zh,Chineese Say,vanilla,,,,)) $(eval $(call BuildPlugin,shell-stream,Streaming Audio Through CLI,vanilla,,,,)) -$(eval $(call BuildPlugin,silk,Skype(TM) SILK Codec Module,vanilla,,,,)) -$(eval $(call BuildPlugin,siren,G.722.1 Codec,vanilla,,,,)) +$(eval $(call BuildPlugin,silk,Skype(TM) SILK Codec Module,vanilla,,,,+libsilk @BROKEN)) # Requires unsupported libsilk +$(eval $(call BuildPlugin,siren,G.722.1 Codec,vanilla,,,,+libg7221 @BROKEN)) # Requires unsupported libg7221 $(eval $(call BuildPlugin,skel,Template For New Module,vanilla,,,,)) $(eval $(call BuildPlugin,skinny,Skinny Call Control Protocol (SCCP),vanilla,,,,)) $(eval $(call BuildPlugin,skypopen,Skype Compatible Endpoint,mod,,,,@FEATURE_drawing-backend_libX11)) $(eval $(call BuildPlugin,sms,SMS,vanilla,,,,)) +$(eval $(call BuildPlugin,smpp,smpp client and server implementation,vanilla,,,,@BROKEN)) $(eval $(call BuildPlugin,snapshot,Record Audio Snapshot to File,vanilla,,,,)) -$(eval $(call BuildPlugin,sndfile,Multi-Format Sound File,vanilla,,,,)) -$(eval $(call BuildPlugin,snipe-hunt,Snipe Hunt (Simple Example Module),vanilla,,,,)) +$(eval $(call BuildPlugin,sndfile,Multi-Format Sound File,vanilla,,,,+libsndfile)) $(eval $(call BuildPlugin,snmp,SNMP AgentX Subagent,vanilla,,,,+libnetsnmp)) $(eval $(call BuildPlugin,snom,SNOM specific features,vanilla,,,,)) $(eval $(call BuildPlugin,sofia,SOFIA SIP,mod,,,,)) # ~/conf @@ -1092,15 +1087,15 @@ $(eval $(call BuildPlugin,tone-stream,Tone Generation Stream,vanilla,,,,)) $(eval $(call BuildPlugin,tts-commandline,ASR TTS Command Interface,vanilla,,,,)) $(eval $(call BuildPlugin,unimrcp,UniMRCP (MRCP Client),vanilla,,,,@BROKEN)) $(eval $(call BuildPlugin,valet-parking,Valet Parking Application,vanilla,,,,)) -$(eval $(call BuildPlugin,verto,HTML5 Verto interface,vanilla,,lib/perl5/5.20/MCAST.so lib/perl5/5.20/MCAST.la lib/perl5/5.20/MCAST.pm,perl rtc,)) +$(eval $(call BuildPlugin,verto,HTML5 Verto interface,vanilla,,lib/perl5/$(PERL_VERSION)/MCAST.so lib/perl5/$(PERL_VERSION)/MCAST.la lib/perl5/$(PERL_VERSION)/MCAST.pm,perl rtc,+perl @BROKEN)) $(eval $(call BuildPlugin,vmd,VoiceMail Beep Detection,vanilla,,,,)) $(eval $(call BuildPlugin,voicemail,VoiceMail,vanilla,,,,)) $(eval $(call BuildPlugin,voicemail-ivr,VoiceMail IVR,vanilla,,,,)) -$(eval $(call BuildPlugin,vp8,VP8 Video Codec,vanilla,,,,)) +$(eval $(call BuildPlugin,vpx,VP8/9 Video Codec with transcoding,vanilla,,,,+libvpx)) $(eval $(call BuildPlugin,xml-cdr,XML-CDR Handler,vanilla,,,,+libcurl)) $(eval $(call BuildPlugin,xml-curl,XML-Curl Gateway,vanilla,,,,+libcurl)) $(eval $(call BuildPlugin,xml-ldap,LDAP-XML Gateway,vanilla,,,,+PACKAGE_$(PKG_NAME)-mod-ldap:libopenldap)) $(eval $(call BuildPlugin,xml-rpc,XML-RPC Interface,vanilla,,,,)) $(eval $(call BuildPlugin,xml-radius,Radius authentication and authorization,vanilla,,,,+freeradius-client @BROKEN)) # freeradius-client isn't yet supported by OpenWRT. $(eval $(call BuildPlugin,xml-scgi,SCGI XML Gateway,vanilla,,,,)) -$(eval $(call BuildPlugin,yaml,YAML language,vanilla,,,,+libyaml @BROKEN)) +$(eval $(call BuildPlugin,yaml,YAML language,vanilla,,,,+libyaml)) diff --git a/net/freeswitch/patches/0000010-configure_ac.patch b/net/freeswitch/patches/0000010-configure_ac.patch deleted file mode 100644 index 2bc11fa0ede..00000000000 --- a/net/freeswitch/patches/0000010-configure_ac.patch +++ /dev/null @@ -1,160 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -229,13 +229,16 @@ AX_COMPILER_VENDOR - if test "x${cross_compiling}" = "xyes"; then - CC_FOR_BUILD=${CC_FOR_BUILD-gcc} - case "$host" in -- arm*-linux-gnueabi*|arm*-*-linux-gnueabi*) -+ arm*-linux-gnueabi*|arm*-*-linux-*) - # spandsp modem - ac_cv_file__dev_ptmx=yes - # libjs - export ac_cv_va_copy=yes -+ # sofia-sip -+ export ac_cv_dev_urandom=yes - # srtp - export ac_cv_file__dev_urandom=yes -+ export ac_cv_file___dev_urandom_=yes - # rpl_malloc - export ac_cv_func_realloc_0_nonnull=yes - export ac_cv_func_malloc_0_nonnull=yes -@@ -248,7 +251,7 @@ if test "x${cross_compiling}" = "xyes"; - export apr_cv_mutex_recursive=yes - export ac_cv_func_pthread_rwlock_init=yes - export apr_cv_type_rwlock_t=yes -- export apr_cv_process_shared_works=yes -+ export apr_cv_process_shared_works=no - export apr_cv_mutex_robust_shared=yes - ;; - esac -@@ -378,9 +381,6 @@ elif test "x${ax_cv_c_compiler_vendor}" - elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then - APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC) - APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC) -- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then -- APR_ADDTO(SWITCH_AM_CFLAGS, -Werror) -- fi - if test "${enable_64}" = "yes"; then - case "$host" in - *darwin12.*|*darwin11.*|*darwin10.*|*darwin9.*|*darwin8.*) -@@ -839,7 +839,6 @@ AC_CHECK_LIB(pthread, pthread_setschedpa - - AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket)) - --AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])]) - AC_CHECK_LIB(util, openpty, [AC_DEFINE(HAVE_OPENPTY, 1, [Define if you have openpty()])]) - - AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[ -@@ -1163,14 +1162,14 @@ case $host in - ;; - esac - --if ! (test -x "$PKG_CONFIG" || test -x "$(which pkg-config)"); then -- AC_MSG_ERROR([You need to install pkg-config to configure FreeSWITCH.]) -+if ! test -x "${STAGING_DIR}/../host/bin/pkg-config"; then -+ AC_MSG_ERROR([Missing tools/pkg-config package needed to configure FreeSWITCH.]) - fi - --# temporary workaround for Debian libldns-dev package bug --if test "$cross_compiling" != "yes" && test -f /usr/lib/pkg-config/libldns.pc; then -- path_push_unique PKG_CONFIG_PATH /usr/lib/pkg-config --fi -+# -+# Workaround for OpenWRT pkg-config -+# -+path_push_unique PKG_CONFIG_PATH ${STAGING_DIR}/usr/lib/pkg-config - - module_enabled() { - grep -v -e "\#" -e "^\$" modules.conf | sed -e "s|^.*/||" | grep "^${1}\$" >/dev/null -@@ -1191,7 +1190,7 @@ PKG_CHECK_MODULES([LDNS], [libldns >= 1. - AC_CHECK_LIB([ldns], [ldns_str2rdf_a], [LDNS_LIBS=-lldns]) - AS_IF([test -z "$LDNS_LIBS"],[ - if module_enabled mod_enum; then -- AC_MSG_ERROR([You need to either install libldns-dev or disable mod_enum in modules.conf]) -+ AC_MSG_ERROR([You need to either install libldns or disable mod_enum in modules.conf]) - else - AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_LDNS],[false]) - fi],[ -@@ -1269,18 +1268,18 @@ AM_CONDITIONAL([HAVE_MYSQL],[test "$foun - # perl checks - # - --AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl=yes],[ac_cv_have_perl=no]) -- --# -a "x$ac_cv_have_EXTERN_h" != "xno" -+AC_CHECK_PROG([PERL],[perl],[ac_cv_have_perl=yes],[ac_cv_have_perl=no],[${STAGING_DIR}/../host/usr/bin]) -+PERL=$as_dir/$ac_word$ac_exec_ext - - if test "x$ac_cv_have_perl" != "xno"; then -- PERL=perl -- PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlib}'`" -- PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE" -- PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`" -- PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts | sed -e 's|-arch x86_64 -arch i386||'` -DEMBED_PERL" -- PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e 's|-arch x86_64 -arch i386||'`" -- PERL_INC="`$PERL -MExtUtils::Embed -e perl_inc`" -+ PERL_SITELIB="/usr/lib/perl5/5.20" -+ PERL_SITEDIR="${STAGING_DIR}${PERL_SITELIB}" -+ PERL_COREDIR="${PERL_SITEDIR}/CORE" -+ PERL_INC="-I${PERL_COREDIR}" -+ PERL_CFLAGS="-w -DMULTIPLICITY -fwrapv -fno-strict-aliasing -pipe -fstack-protector ${PERL_INC} -DEMBED_PERL" -+ PERL_LIBDIR="-L${PERL_COREDIR}" -+ PERL_LIBS="-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc " -+ PERL_LDFLAGS="${LDFLAGS} -lpthread ${PERL_LIBS}" - - save_CFLAGS="$CFLAGS" - CFLAGS="$PERL_CFLAGS" -@@ -1293,12 +1292,15 @@ if test "x$ac_cv_have_perl" != "xno"; th - AC_CHECK_LIB([perl], [perl_alloc], ac_cv_use_libperl=yes, ac_cv_use_libperl=no) - LDFLAGS="$save_LDFLAGS" - -- AC_SUBST(PERL_SITEDIR) -- AC_SUBST(PERL_LIBDIR) -- AC_SUBST(PERL_LIBS) -+ AC_SUBST(PERL) - AC_SUBST(PERL_CFLAGS) -- AC_SUBST(PERL_LDFLAGS) -+ AC_SUBST(PERL_COREDIR) - AC_SUBST(PERL_INC) -+ AC_SUBST(PERL_LDFLAGS) -+ AC_SUBST(PERL_LIBDIR) -+ AC_SUBST(PERL_LIBS) -+ AC_SUBST(PERL_SITEDIR) -+ AC_SUBST(PERL_SITELIB) - fi - - AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_have_perl" != "xno" -a "x$ac_cv_have_EXTERN_h" != "xno" -a "x$ac_cv_use_libperl" != "xno"]) -@@ -1307,17 +1309,19 @@ AM_CONDITIONAL([HAVE_PERL],[test "x$ac_c - # php checks - # - --AC_CHECK_PROG(PHP,php,[ac_cv_have_php=yes],[ac_cv_have_php=no]) --AC_CHECK_PROG(PHP_CONFIG,php-config,[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no]) -+AC_CHECK_PROG([PHP],[php],[ac_cv_have_php=yes],[ac_cv_have_php=no],[${STAGING_DIR}/../host/usr/bin:/usr/bin]) -+PHP=$as_dir/$ac_word$ac_exec_ext -+ -+AC_CHECK_PROG([PHP_CONFIG],[php-config],[ac_cv_have_php_config=yes],[ac_cv_have_php_config=no],[${STAGING_DIR}/../host/usr/bin]) -+PHP_CONFIG=$as_dir/$ac_word$ac_exec_ext -+ - AM_CONDITIONAL([HAVE_PHP],[test "x$ac_cv_have_php" != "xno" -a "x$ac_cv_have_php_config" != "xno"]) - - if test "x$ac_cv_have_php" != "xno" -a "x$ac_cv_have_php_config" != "xno"; then -- PHP=php -- PHP_CONFIG=php-config - PHP_LDFLAGS="`$PHP_CONFIG --ldflags`" -- PHP_LIBS="`$PHP_CONFIG --libs | sed -r 's/ ?-l(bz2|pcre|xml2|gssapi_krb5|krb5|k5crypto|com_err|history|z|readline|gmp|ssl|crypto)//g'`" -+ PHP_LIBS="`$PHP_CONFIG --libs | sed -r 's/ ?-l(bz2|pcre|xml2|gssapi_krb5|krb5|k5crypto|com_err|history|z|readline|gmp|ssl|crypt(o|))//g;s/^/-lcrypto/g'`" - PHP_EXT_DIR="`$PHP_CONFIG --extension-dir`" -- PHP_INC_DIR="`$PHP -r 'echo ini_get("include_path");' | cut -d: -f2`" -+ PHP_INC_DIR="`$PHP_CONFIG --include-dir`" - PHP_INI_DIR="`$PHP_CONFIG --configure-options | tr " " "\n" | grep -- --with-config-file-scan-dir | cut -f2 -d=`" - PHP_CFLAGS="`$PHP_CONFIG --includes`" - AC_SUBST(PHP_LDFLAGS) -@@ -1425,6 +1429,7 @@ then - AC_MSG_NOTICE([Your python seems OK, do not forget to enable mod_python in modules.conf]) - AC_SUBST([PYTHON_CFLAGS], [$PYTHON_CFLAGS]) - AC_SUBST([PYTHON_LDFLAGS], [$PYTHON_LDFLAGS]) -+ AC_SUBST([PYTHON_LIB], [$PYTHON_LIB]) - fi - else - AS_IF([test "$with_python" = "try"], diff --git a/net/freeswitch/patches/0000011-Makefile.am.patch b/net/freeswitch/patches/0000011-Makefile.am.patch deleted file mode 100644 index 7814d85da71..00000000000 --- a/net/freeswitch/patches/0000011-Makefile.am.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,3 +1,7 @@ -+BASE=. -+ -+include $(BASE)/build/openwrt_rules.mk -+ - EXTRA_DIST = - SUBDIRS = . src build - AUTOMAKE_OPTIONS = foreign subdir-objects -@@ -172,7 +176,6 @@ ZRTP_LIBS = -lbn -lzrtp - libfreeswitch_la_LDFLAGS += $(ZRTP_LDFLAGS) - libfreeswitch_la_LIBADD += $(ZRTP_LIBS) - CORE_LIBS += libs/libzrtp/libzrtp.a --LIBS += libs/libzrtp/third_party/bnlib/libbn.a - endif - - library_includedir = $(includedir) -@@ -311,7 +314,7 @@ endif - $(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/modules.conf - - src/include/switch_swigable_cpp.h: $(switch_srcdir)/src/include/switch_cpp.h -- cat $(switch_srcdir)/src/include/switch_cpp.h | perl $(switch_srcdir)/build/strip.pl > $(switch_srcdir)/src/include/switch_swigable_cpp.h -+ cat $(switch_srcdir)/src/include/switch_cpp.h | $(STAGING_DIR)/../host/usr/bin/perl $(switch_srcdir)/build/strip.pl > $(switch_srcdir)/src/include/switch_swigable_cpp.h - # $(CC) -E $(switch_srcdir)/src/include/switch_cpp.h \ - # -I$(switch_srcdir)/src/include -I$(switch_srcdir)/libs/libteletone/src \ - # -DSWITCH_DECLARE_CLASS= -DSWITCH_DECLARE\(x\)=x -DSWITCH_DECLARE_CONSTRUCTOR= \ -@@ -374,7 +377,7 @@ fs_ivrd_LDFLAGS = $(AM_LDFLAGS) -lpthrea - nodist_freeswitch_SOURCES = src/include/switch_version.h - freeswitch_SOURCES = src/switch.c - freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS) --freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir) -+freeswitch_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) -lpthread - freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la - - if HAVE_ODBC -@@ -633,7 +636,9 @@ sndfile-reconf: - - tiff-reconf: - cd libs/tiff-4.0.2 && autoreconf -fi -- cd libs/tiff-4.0.2 && sh ./configure.gnu $(MY_DEFAULT_ARGS) -+ cd libs/tiff-4.0.2 && sh ./configure.gnu $(MY_DEFAULT_ARGS) --host="$(GNU_TARGET_NAME)" --prefix="/usr" -+ cd libs/spandsp && autoreconf -fi -+ cd libs/spandsp && sh ./configure.gnu $(MY_DEFAULT_ARGS) --host="$(GNU_TARGET_NAME)" --prefix="/usr" - cd libs/tiff-4.0.2 && make - - python-reconf: -@@ -653,9 +658,6 @@ iks-reconf: - $(MAKE) mod_dingaling-clean - - spandsp-reconf: tiff-reconf -- cd libs/spandsp && $(MAKE) clean || echo -- cd libs/spandsp && autoreconf -fi -- cd libs/spandsp && sh ./configure.gnu $(MY_DEFAULT_ARGS) - cd libs/spandsp && $(MAKE) - - sofia-reconf: diff --git a/net/freeswitch/patches/1114000-libs-libcodec2-src-Makefile_am.patch b/net/freeswitch/patches/1114000-libs-libcodec2-src-Makefile_am.patch deleted file mode 100644 index cb7e3a63fc9..00000000000 --- a/net/freeswitch/patches/1114000-libs-libcodec2-src-Makefile_am.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/libs/libcodec2/src/Makefile.am -+++ b/libs/libcodec2/src/Makefile.am -@@ -88,6 +88,12 @@ codebookge.$(OBJEXT): codebookge.c - - codebook.lo: codebook.c - -+generate_codebook: -+ $(CC_FOR_BUILD) -o generate_codebook generate_codebook.c -lm -+ -+genlspdtcb: -+ $(CC_FOR_BUILD) -o genlspdtcb genlspdtcb.c -lm -+ - codebook.c: generate_codebook $(CODEBOOKS) - ./generate_codebook lsp_cb $(CODEBOOKS) > codebook.c - diff --git a/net/freeswitch/patches/1122000-libs-libzrtp-include-zrtp_config.patch b/net/freeswitch/patches/1122000-libs-libzrtp-include-zrtp_config.patch deleted file mode 100644 index 04638852c6f..00000000000 --- a/net/freeswitch/patches/1122000-libs-libzrtp-include-zrtp_config.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/libs/libzrtp/include/zrtp_config.h -+++ b/libs/libzrtp/include/zrtp_config.h -@@ -68,8 +68,16 @@ - * If the byte order is not specified manually in zrtp_config_user.h - try to detect it automatically - */ - #if !defined(ZRTP_BYTE_ORDER) -+#if defined(linux) || defined(__linux) - --#if defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \ -+#include -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN -+#elif __BYTE_ORDER == __BIG_ENDIAN -+#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN -+#endif -+ -+#elif defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \ - defined(__i386) || defined(_M_IX86) || defined(__I86__) - /* - * Generic i386 processor family, little-endian diff --git a/net/freeswitch/patches/1128080-libs-sofia-sip-configure_gnu.patch b/net/freeswitch/patches/1128080-libs-sofia-sip-configure_gnu.patch deleted file mode 100644 index 73b61728184..00000000000 --- a/net/freeswitch/patches/1128080-libs-sofia-sip-configure_gnu.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/libs/sofia-sip/configure.gnu -+++ b/libs/sofia-sip/configure.gnu -@@ -1,4 +1,4 @@ - #! /bin/sh - srcpath=$(dirname $0 2>/dev/null ) || srcpath="." --$srcpath/configure "$@" --with-pic --with-glib=no --disable-shared --without-doxygen --disable-stun -+$srcpath/configure "$@" --with-pic --with-glib=no --disable-shared --without-doxygen - diff --git a/net/freeswitch/patches/1129000-libs-spandsp-src-spandsp-fast_convert_h.patch b/net/freeswitch/patches/1129000-libs-spandsp-src-spandsp-fast_convert_h.patch deleted file mode 100644 index e2fb3daf288..00000000000 --- a/net/freeswitch/patches/1129000-libs-spandsp-src-spandsp-fast_convert_h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libs/spandsp/src/spandsp/fast_convert.h -+++ b/libs/spandsp/src/spandsp/fast_convert.h -@@ -195,7 +195,7 @@ extern "C" - { - return (long int) (x); - } --#elif defined(__ppc__) || defined(__powerpc__) -+#elif 0 /* defined(__ppc__) || defined(__powerpc__) */ - static __inline__ long int lfastrint(register double x) - { - int res[2]; diff --git a/net/freeswitch/patches/1129100-libs-spandsp-src-t4_rx_c.patch b/net/freeswitch/patches/1129100-libs-spandsp-src-t4_rx_c.patch deleted file mode 100644 index 7fac54049f9..00000000000 --- a/net/freeswitch/patches/1129100-libs-spandsp-src-t4_rx_c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libs/spandsp/src/t4_rx.c -+++ b/libs/spandsp/src/t4_rx.c -@@ -50,7 +50,7 @@ - #include "spandsp/stdbool.h" - #endif - #include "floating_fudge.h" --#include -+#include - - #include "spandsp/telephony.h" - #include "spandsp/alloc.h" diff --git a/net/freeswitch/patches/1129200-libs-spandsp-src-t4_tx_c.patch b/net/freeswitch/patches/1129200-libs-spandsp-src-t4_tx_c.patch deleted file mode 100644 index ed36237548f..00000000000 --- a/net/freeswitch/patches/1129200-libs-spandsp-src-t4_tx_c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libs/spandsp/src/t4_tx.c -+++ b/libs/spandsp/src/t4_tx.c -@@ -50,7 +50,7 @@ - #include "spandsp/stdbool.h" - #endif - #include "floating_fudge.h" --#include -+#include - - #include "spandsp/telephony.h" - #include "spandsp/alloc.h" diff --git a/net/freeswitch/patches/1137000-libs-xmlrpc-c-config_mk_in.patch b/net/freeswitch/patches/1137000-libs-xmlrpc-c-config_mk_in.patch deleted file mode 100644 index 79cb33e5030..00000000000 --- a/net/freeswitch/patches/1137000-libs-xmlrpc-c-config_mk_in.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/libs/xmlrpc-c/config.mk.in -+++ b/libs/xmlrpc-c/config.mk.in -@@ -335,8 +335,8 @@ endif - # The cross compiling user can update config.mk or override - # BUILDTOOL_CC on a make command. - --BUILDTOOL_CC = $(CC) --BUILDTOOL_CCLD = $(CCLD) -+BUILDTOOL_CC = $(HOSTCC) -+BUILDTOOL_CCLD = $(HOSTCC) - - # Here are the commands 'make install' uses to install various kinds of files: - diff --git a/net/freeswitch/patches/1137200-libs-xmlrpc-c-lib-expat-gennmtab-Makefile.patch b/net/freeswitch/patches/1137200-libs-xmlrpc-c-lib-expat-gennmtab-Makefile.patch deleted file mode 100644 index d50d200ad81..00000000000 --- a/net/freeswitch/patches/1137200-libs-xmlrpc-c-lib-expat-gennmtab-Makefile.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/libs/xmlrpc-c/lib/expat/gennmtab/Makefile -+++ b/libs/xmlrpc-c/lib/expat/gennmtab/Makefile -@@ -1,3 +1,5 @@ -+TOPDIR=$(shell (cd $(SRCDIR)/../../../../..; pwd)) -+ - ifeq ($(SRCDIR),) - updir = $(shell echo $(dir $(1)) | sed 's/.$$//') - EXPATDIR := $(call updir,$(CURDIR)) -@@ -7,6 +9,7 @@ ifeq ($(SRCDIR),) - endif - SUBDIR := lib/expat/gennmtab - -+include $(TOPDIR)/rules.mk - include $(BLDDIR)/config.mk - - LDFLAGS = $(LADD) diff --git a/net/freeswitch/patches/1301010-src-include-timerfd_wrap_h.patch b/net/freeswitch/patches/1301010-src-include-timerfd_wrap_h.patch deleted file mode 100644 index dbf995e500f..00000000000 --- a/net/freeswitch/patches/1301010-src-include-timerfd_wrap_h.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/src/include/timerfd_wrap.h -+++ b/src/include/timerfd_wrap.h -@@ -55,20 +55,12 @@ SWITCH_BEGIN_EXTERN_C - - - #ifndef __NR_timerfd --#if defined(__x86_64__) --#define __NR_timerfd_create 283 --#define __NR_timerfd_settime 286 --#define __NR_timerfd_gettime 287 --#elif defined(__i386__) --#define __NR_timerfd_create 322 --#define __NR_timerfd_settime 325 --#define __NR_timerfd_gettime 326 --#else --#error invalid system --#endif -+#include - #endif - --#define TFD_TIMER_ABSTIME (1 << 0) -+#ifndef TFD_TIMER_ABSTIME -+#include -+#endif - - int timerfd_create(int clockid, int flags) - { diff --git a/net/freeswitch/patches/1304050-src-mod-codecs-mod_celt-Makefile_am.patch b/net/freeswitch/patches/1304050-src-mod-codecs-mod_celt-Makefile_am.patch deleted file mode 100644 index 55d349aff31..00000000000 --- a/net/freeswitch/patches/1304050-src-mod-codecs-mod_celt-Makefile_am.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mod/codecs/mod_celt/Makefile.am -+++ b/src/mod/codecs/mod_celt/Makefile.am -@@ -19,7 +19,7 @@ $(CELT_DIR): - - $(CELT_BUILDDIR)/Makefile: $(CELT_DIR) - mkdir -p $(CELT_BUILDDIR) -- cd $(CELT_BUILDDIR) && $(DEFAULT_VARS) $(CELT_DIR)/configure $(DEFAULT_ARGS) --disable-shared --with-pic --srcdir=$(CELT_DIR) -+ cd $(CELT_BUILDDIR) && $(DEFAULT_VARS) $(CELT_DIR)/configure $(DEFAULT_ARGS) --disable-shared --with-pic --srcdir=$(CELT_DIR) --with-ogg=$(STAGING_DIR)/usr - $(TOUCH_TARGET) - - $(CELT_LA): $(CELT_BUILDDIR)/Makefile diff --git a/net/freeswitch/patches/1304130-src-mod-codecs-mod_isac-typedefs_h.patch b/net/freeswitch/patches/1304130-src-mod-codecs-mod_isac-typedefs_h.patch deleted file mode 100644 index 84de2af6ba3..00000000000 --- a/net/freeswitch/patches/1304130-src-mod-codecs-mod_isac-typedefs_h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mod/codecs/mod_isac/typedefs.h -+++ b/src/mod/codecs/mod_isac/typedefs.h -@@ -66,7 +66,7 @@ - #define WEBRTC_ARCH_X86 - #define WEBRTC_ARCH_32_BITS - #define WEBRTC_ARCH_LITTLE_ENDIAN --#elif defined(__ARMEL__) -+#elif defined(__ARMEL__) || defined(__mips__) - // TODO(andrew): We'd prefer to control platform defines here, but this is - // currently provided by the Android makefiles. Commented to avoid duplicate - // definition warnings. diff --git a/net/freeswitch/patches/1304150-src-mod-codecs-mod_opus-Makefile_am.patch b/net/freeswitch/patches/1304150-src-mod-codecs-mod_opus-Makefile_am.patch deleted file mode 100644 index bedf1dfe005..00000000000 --- a/net/freeswitch/patches/1304150-src-mod-codecs-mod_opus-Makefile_am.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mod/codecs/mod_opus/Makefile.am -+++ b/src/mod/codecs/mod_opus/Makefile.am -@@ -19,7 +19,7 @@ $(OPUS_DIR)/configure: - - $(OPUS_BUILDDIR)/Makefile: $(OPUS_DIR)/configure - mkdir -p $(OPUS_BUILDDIR) -- cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure $(MY_DEFAULT_ARGS) -+ cd $(OPUS_BUILDDIR) && $(DEFAULT_VARS) $(OPUS_DIR)/configure $(MY_DEFAULT_ARGS) --host=$(host) --disable-shared --with-pic --srcdir=$(OPUS_DIR) - $(TOUCH_TARGET) - - $(OPUS_LA): $(OPUS_BUILDDIR)/Makefile diff --git a/net/freeswitch/patches/1306000-src-mod-directories-mod_ldap-Makefile_am.patch b/net/freeswitch/patches/1306000-src-mod-directories-mod_ldap-Makefile_am.patch deleted file mode 100644 index 2872754d995..00000000000 --- a/net/freeswitch/patches/1306000-src-mod-directories-mod_ldap-Makefile_am.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mod/directories/mod_ldap/Makefile.am -+++ b/src/mod/directories/mod_ldap/Makefile.am -@@ -13,7 +13,7 @@ mod_ldap_la_CFLAGS = $(AM_CFLAGS) -DWI - mod_ldap_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(LDAPLA) $(LIBLBERLA) - mod_ldap_la_LDFLAGS = -avoid-version -module -no-undefined -shared - --MY_DEFAULT_ARGS= --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --disable-slapd --disable-bdb --disable-hdb -+MY_DEFAULT_ARGS= --build=$(build) --host=$(host) --target=$(target) --prefix="$(prefix)" --exec_prefix="$(exec_prefix)" --libdir="$(libdir)" --with-yielding_select=yes --disable-slapd --disable-bdb --disable-hdb - - $(MODNAME).lo: $(LDAPLA) $(LIBLBERLA) - diff --git a/net/freeswitch/patches/1307000-src-mod-endpoints-mod_gsmopen-Makefile_am.patch b/net/freeswitch/patches/1307000-src-mod-endpoints-mod_gsmopen-Makefile_am.patch deleted file mode 100644 index 1d744220c68..00000000000 --- a/net/freeswitch/patches/1307000-src-mod-endpoints-mod_gsmopen-Makefile_am.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mod/endpoints/mod_gsmopen/Makefile.am -+++ b/src/mod/endpoints/mod_gsmopen/Makefile.am -@@ -12,7 +12,7 @@ SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libsp - mod_LTLIBRARIES = mod_gsmopen.la - mod_gsmopen_la_SOURCES = mod_gsmopen.cpp gsmopen_protocol.cpp - mod_gsmopen_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS) --mod_gsmopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. -+mod_gsmopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. -fpermissive - mod_gsmopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA) - mod_gsmopen_la_LDFLAGS = -avoid-version -module -no-undefined -lctb-0.16 -lgsmme - diff --git a/net/freeswitch/patches/1307010-src-mod-endpoints-mod_gsmopen-gsmlib-gsmlib-1.10-patched-13ubuntu-configure_in.patch b/net/freeswitch/patches/1307010-src-mod-endpoints-mod_gsmopen-gsmlib-gsmlib-1.10-patched-13ubuntu-configure_in.patch deleted file mode 100644 index 1c397c09331..00000000000 --- a/net/freeswitch/patches/1307010-src-mod-endpoints-mod_gsmopen-gsmlib-gsmlib-1.10-patched-13ubuntu-configure_in.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/configure.in -+++ b/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/configure.in -@@ -56,21 +56,6 @@ dnl Checks for programs. - AC_PROG_CPP - AC_PROG_CXX - --dnl check for gcc 2.95.x --AC_TRY_RUN([ --#include --main() --{ --#if defined(__GNUC__) && \ -- ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) -- return 1; --#endif -- return 0; --} --],, --[echo "need at least gcc 2.95 to compile correctly" --exit 1]) -- - dnl check for alloca - AC_FUNC_ALLOCA - diff --git a/net/freeswitch/patches/1307161-src-mod-endpoints-mod_verto-Makefile_am.patch b/net/freeswitch/patches/1307161-src-mod-endpoints-mod_verto-Makefile_am.patch deleted file mode 100644 index e1411aa747f..00000000000 --- a/net/freeswitch/patches/1307161-src-mod-endpoints-mod_verto-Makefile_am.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/mod/endpoints/mod_verto/Makefile.am -+++ b/src/mod/endpoints/mod_verto/Makefile.am -@@ -9,19 +9,19 @@ mod_verto_la_LIBADD = $(switch_builddi - mod_verto_la_LDFLAGS = -avoid-version -module -no-undefined -shared - - if HAVE_PERL --#perldir = $(PERL_SITEDIR) --noinst_LTLIBRARIES = MCAST.la -+perldir = "$(PERL_SITELIB)" -+perl_LTLIBRARIES = MCAST.la - MCAST_la_SOURCES = mcast/mcast_wrap.cpp mcast/perlxsi.c mcast/mcast.c mcast/mcast_cpp.cpp - MCAST_la_CFLAGS = $(CC_CFLAGS) $(CFLAGS) $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS) - MCAST_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC) - MCAST_la_CPPFLAGS = -I$(switch_srcdir)/src/mod/endpoints/mod_verto/mcast - MCAST_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(PERL_LDFLAGS) - --#install-data-local: perlmod-install -+install-data-local: perlmod-install - --#perlmod-install: install-perlLTLIBRARIES --# install -d -m 755 $(DESTDIR)$(PERL_SITEDIR) --# install -m 755 mcast/MCAST.pm $(DESTDIR)$(PERL_SITEDIR) -+perlmod-install: install-perlLTLIBRARIES -+ install -d -m 755 $(DESTDIR)$(perldir) -+ install -m 755 mcast/MCAST.pm $(DESTDIR)$(perldir) - endif - - mcast/esl_wrap.cpp: diff --git a/net/freeswitch/patches/1310040-src-mod-languages-mod_perl-Makefile_am.patch b/net/freeswitch/patches/1310040-src-mod-languages-mod_perl-Makefile_am.patch deleted file mode 100644 index c6a15880461..00000000000 --- a/net/freeswitch/patches/1310040-src-mod-languages-mod_perl-Makefile_am.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/src/mod/languages/mod_perl/Makefile.am -+++ b/src/mod/languages/mod_perl/Makefile.am -@@ -1,22 +1,22 @@ - include $(top_srcdir)/build/modmake.rulesam - MODNAME=mod_perl --PERL = perl --PERL_LIBDIR =-L`perl -MConfig -e 'print $$Config{archlib}'`/CORE --PERL_LIBS =`perl -MConfig -e 'print $$Config{libs}'` - --perldir=$(prefix)/perl -+perldir="$(PERL_SITELIB)" -+ - mod_LTLIBRARIES = mod_perl.la - perl_LTLIBRARIES = freeswitch.la - mod_perl_la_SOURCES = mod_perl.c freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c - mod_perl_la_CFLAGS = $(AM_CFLAGS) - mod_perl_la_CXXFLAGS = $(AM_CXXFLAGS) --mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/ -+mod_perl_la_CPPFLAGS = ${PERL_CFLAGS} -I$(switch_srcdir)/libs/libteletone/src/ - mod_perl_la_LIBADD = $(switch_builddir)/libfreeswitch.la --mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'` -+#mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'` -+mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared ${PERL_LDFLAGS} - - freeswitch_la_SOURCES = freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c - freeswitch_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(LDFLAGS) --freeswitch_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/ -+freeswitch_la_CPPFLAGS = ${PERL_CFLAGS} -I$(switch_srcdir)/libs/libteletone/src/ -+ - reswig: swigclean mod_perl_wrap.cpp - - swigclean: clean diff --git a/net/freeswitch/patches/0000002-build-config-erlang_m4.patch b/net/freeswitch/patches/musl/build-config-erlang_m4.patch similarity index 95% rename from net/freeswitch/patches/0000002-build-config-erlang_m4.patch rename to net/freeswitch/patches/musl/build-config-erlang_m4.patch index ebf79b7b983..5d744f77105 100644 --- a/net/freeswitch/patches/0000002-build-config-erlang_m4.patch +++ b/net/freeswitch/patches/musl/build-config-erlang_m4.patch @@ -8,7 +8,7 @@ # AC_ARG_WITH( [erlang], -@@ -19,22 +19,23 @@ then +@@ -20,22 +20,23 @@ then if test ! -x "$with_erlang" ; then AC_MSG_ERROR([Specified erlang does not exist or is not executable: $with_erlang]) fi @@ -39,7 +39,7 @@ AC_MSG_CHECKING([erlang libdir]) if test -z "`echo $ERLANG_LIBDIR`" ; then AC_MSG_ERROR([failed]) -@@ -42,9 +43,16 @@ then +@@ -43,9 +44,16 @@ then ERLANG_LDFLAGS="-L$ERLANG_LIBDIR $ERLANG_LDFLAGS" LIBS="-L$ERLANG_LIBDIR $LIBS" fi @@ -57,7 +57,7 @@ AC_MSG_CHECKING([erlang incdir]) if test -z "`echo $ERLANG_INCDIR`" ; then AC_MSG_ERROR([failed]) -@@ -58,10 +66,11 @@ then +@@ -59,10 +67,11 @@ then ERLANG_LIB="ei" @@ -71,7 +71,7 @@ if test "$has_libei" = "no" ; then AS_IF([test "$with_erlang" = "try"], -@@ -75,7 +84,7 @@ then +@@ -76,7 +85,7 @@ then ) else ERLANG_LDFLAGS="$ERLANG_LDFLAGS -lei" @@ -79,8 +79,8 @@ + AC_MSG_NOTICE([Your erlang seems OK. You can now use ErLang in your codes.]) AC_SUBST([ERLANG_CFLAGS], [$ERLANG_CFLAGS]) AC_SUBST([ERLANG_LDFLAGS], [$ERLANG_LDFLAGS]) - fi -@@ -85,12 +94,12 @@ then + AM_CONDITIONAL([HAVE_ERLANG],[true]) +@@ -87,12 +96,12 @@ then else AS_IF([test "$with_erlang" = "try"], diff --git a/net/freeswitch/patches/0000001-build-modules_conf_in.patch b/net/freeswitch/patches/musl/build-modules_conf_in.patch similarity index 75% rename from net/freeswitch/patches/0000001-build-modules_conf_in.patch rename to net/freeswitch/patches/musl/build-modules_conf_in.patch index 26aad5b9d84..9db0e8e685a 100644 --- a/net/freeswitch/patches/0000001-build-modules_conf_in.patch +++ b/net/freeswitch/patches/musl/build-modules_conf_in.patch @@ -1,10 +1,10 @@ --- a/build/modules.conf.in +++ b/build/modules.conf.in -@@ -35,6 +35,7 @@ applications/mod_httapi +@@ -38,6 +38,7 @@ applications/mod_httapi #applications/mod_rad_auth #applications/mod_redis #applications/mod_rss +#applications/mod_skel - #applications/mod_sonar applications/mod_sms #applications/mod_snapshot + #applications/mod_snom diff --git a/net/freeswitch/patches/0000000-build-openwrt_rules.mk.patch b/net/freeswitch/patches/musl/build-openwrt_rules.mk.patch similarity index 100% rename from net/freeswitch/patches/0000000-build-openwrt_rules.mk.patch rename to net/freeswitch/patches/musl/build-openwrt_rules.mk.patch diff --git a/net/freeswitch/patches/musl/configure_ac.patch b/net/freeswitch/patches/musl/configure_ac.patch new file mode 100644 index 00000000000..9bd513d8a8c --- /dev/null +++ b/net/freeswitch/patches/musl/configure_ac.patch @@ -0,0 +1,65 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -254,7 +254,7 @@ AX_COMPILER_VENDOR + if test "x${cross_compiling}" = "xyes"; then + CC_FOR_BUILD=${CC_FOR_BUILD-gcc} + case "$host" in +- arm*-linux-gnueabi*|arm*-*-linux-gnueabi*) ++ arm*-linux-gnueabi*|arm*-*-linux-*) + # spandsp modem + ac_cv_file__dev_ptmx=yes + # libjs +@@ -273,7 +273,7 @@ if test "x${cross_compiling}" = "xyes"; + export apr_cv_mutex_recursive=yes + export ac_cv_func_pthread_rwlock_init=yes + export apr_cv_type_rwlock_t=yes +- export apr_cv_process_shared_works=yes ++ export apr_cv_process_shared_works=no + export apr_cv_mutex_robust_shared=yes + ;; + esac +@@ -405,9 +405,6 @@ elif test "x${ax_cv_c_compiler_vendor}" + elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then + APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC) + APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC) +- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then +- APR_ADDTO(SWITCH_AM_CFLAGS, -Werror) +- fi + if test "${enable_64}" = "yes"; then + case "$host" in + *darwin*) +@@ -901,7 +898,6 @@ AC_CHECK_LIB(pthread, pthread_setschedpa + + AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket)) + +-AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])]) + AC_CHECK_LIB(util, openpty, [AC_DEFINE(HAVE_OPENPTY, 1, [Define if you have openpty()])]) + + AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[ +@@ -1474,14 +1470,14 @@ AM_CONDITIONAL([HAVE_MYSQL],[test "$foun + # perl checks + # + +-AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl=yes],[ac_cv_have_perl=no]) ++AC_CHECK_PROG(PERL,[perl],[ac_cv_have_perl=yes],[ac_cv_have_perl=no],[${STAGING_DIR}/../host/usr/bin]) ++PERL=$as_dir/$ac_word$ac_exec_ext + + # -a "x$ac_cv_have_EXTERN_h" != "xno" + + if test "x$ac_cv_have_perl" != "xno"; then +- PERL=perl +- PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlib}'`" +- PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE" ++ PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlibexp}'`" ++ PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlibexp}'`/CORE" + PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`" + PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts | sed -e 's|-arch x86_64 -arch i386||'` -DEMBED_PERL" + PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e 's|-arch x86_64 -arch i386||'`" +@@ -1498,6 +1494,7 @@ if test "x$ac_cv_have_perl" != "xno"; th + AC_CHECK_LIB([perl], [perl_alloc], ac_cv_use_libperl=yes, ac_cv_use_libperl=no) + LDFLAGS="$save_LDFLAGS" + ++ AC_SUBST(PERL) + AC_SUBST(PERL_SITEDIR) + AC_SUBST(PERL_LIBDIR) + AC_SUBST(PERL_LIBS) diff --git a/net/freeswitch/patches/musl/libs-apr-configure_ac.patch b/net/freeswitch/patches/musl/libs-apr-configure_ac.patch new file mode 100644 index 00000000000..c4667ddaebc --- /dev/null +++ b/net/freeswitch/patches/musl/libs-apr-configure_ac.patch @@ -0,0 +1,15 @@ +--- a/libs/apr/configure.ac ++++ b/libs/apr/configure.ac +@@ -1956,7 +1956,11 @@ fi + + APR_CHECK_TCP_NODELAY_INHERITED + APR_CHECK_O_NONBLOCK_INHERITED +-APR_CHECK_TCP_NODELAY_WITH_CORK ++ ++dnl Check TCP_NODELAY_WITH_CORK ONLY when NOT cross compiling ++if test "$cross_compiling" != yes; then ++ APR_CHECK_TCP_NODELAY_WITH_CORK ++fi + + # Look for a way of corking TCP... + APR_CHECK_DEFINE(TCP_CORK, netinet/tcp.h) diff --git a/net/freeswitch/patches/musl/libs-apr-util-configure_gnu.patch b/net/freeswitch/patches/musl/libs-apr-util-configure_gnu.patch new file mode 100644 index 00000000000..b933b3cfda7 --- /dev/null +++ b/net/freeswitch/patches/musl/libs-apr-util-configure_gnu.patch @@ -0,0 +1,8 @@ +--- a/libs/apr-util/configure.gnu ++++ b/libs/apr-util/configure.gnu +@@ -1,4 +1,4 @@ + #! /bin/sh + srcpath=$(dirname $0 2>/dev/null ) || srcpath="." +-$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-pic --without-sqlite2 --without-sqlite3 --with-expat=builtin ++$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-expat=builtin + diff --git a/net/freeswitch/patches/1130800-libs-srtp-configure-ac.patch b/net/freeswitch/patches/musl/libs-srtp-configure_ac.patch similarity index 50% rename from net/freeswitch/patches/1130800-libs-srtp-configure-ac.patch rename to net/freeswitch/patches/musl/libs-srtp-configure_ac.patch index 6fbfeb515db..56c1691486b 100644 --- a/net/freeswitch/patches/1130800-libs-srtp-configure-ac.patch +++ b/net/freeswitch/patches/musl/libs-srtp-configure_ac.patch @@ -1,18 +1,13 @@ --- a/libs/srtp/configure.ac +++ b/libs/srtp/configure.ac -@@ -130,9 +130,12 @@ if test "$enable_kernel_linux" = "yes"; +@@ -130,10 +130,6 @@ if test "$enable_kernel_linux" = "yes"; fi AC_MSG_RESULT($enable_kernel_linux) -dnl Check for /dev/urandom -AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom, - [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)]) -+ -+dnl Check for /dev/urandom ONLY when NOT cross compiling -+if test "$cross_compiling" != yes; then -+ AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom, -+ [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)]) -+fi - +- dnl Checks for header files. AC_HEADER_STDC + AC_CHECK_HEADERS(stdlib.h) diff --git a/net/freeswitch/patches/uClibc/build-config-erlang_m4.patch b/net/freeswitch/patches/uClibc/build-config-erlang_m4.patch new file mode 100644 index 00000000000..5d744f77105 --- /dev/null +++ b/net/freeswitch/patches/uClibc/build-config-erlang_m4.patch @@ -0,0 +1,97 @@ +--- a/build/config/erlang.m4 ++++ b/build/config/erlang.m4 +@@ -1,6 +1,6 @@ + AC_DEFUN([CHECK_ERLANG], [ + # +-# Erlang checks for mod_erlang_event ++# Erlang check + # + AC_ARG_WITH( + [erlang], +@@ -20,22 +20,23 @@ then + if test ! -x "$with_erlang" ; then + AC_MSG_ERROR([Specified erlang does not exist or is not executable: $with_erlang]) + fi +- AC_MSG_RESULT([$with_erlang]) +- AC_SUBST([ERLANG], ["$with_erlang"]) ++ AC_MSG_RESULT(["$with_erlang/bin/erl"]) ++ AC_SUBST([ERL],["$with_erlang/bin/erl"]) + else +- AC_PATH_PROG([ERLANG], ["erl"], ["no"], ["$PATH:/usr/bin:/usr/local/bin"]) ++ AC_ERLANG_NEED_ERL(["$with_erlang/bin"]) + fi + +- if test "$ERLANG" != "no" ; then ++ if test "$ERL" != "no" ; then + AC_MSG_CHECKING([erlang version]) +- ERLANG_VER="`$ERLANG -version 2>&1 | cut -d' ' -f6`" ++ ERLANG_VER="`$ERL -version 2>&1 | cut -d' ' -f6`" + + if test -z "$ERLANG_VER" ; then + AC_MSG_ERROR([Unable to detect erlang version]) ++ else ++ AC_MSG_RESULT([$ERLANG_VER]) + fi +- AC_MSG_RESULT([$ERLANG_VER]) + +- ERLANG_LIBDIR=`$ERLANG -noshell -eval 'io:format("~n~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1` ++ ERLANG_LIBDIR=`$ERL -noshell -eval 'io:format("~n~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1` + AC_MSG_CHECKING([erlang libdir]) + if test -z "`echo $ERLANG_LIBDIR`" ; then + AC_MSG_ERROR([failed]) +@@ -43,9 +44,16 @@ then + ERLANG_LDFLAGS="-L$ERLANG_LIBDIR $ERLANG_LDFLAGS" + LIBS="-L$ERLANG_LIBDIR $LIBS" + fi ++ ++ # ++ # Don't use the above ERLANG_LDFLAGS ++ # ++ ERLANG_LIBDIR="${STAGING_DIR}/usr/lib" ++ ERLANG_LDFLAGS="-L$ERLANG_LIBDIR" ++ LIBS="-L$ERLANG_LIBDIR $LIBS" + AC_MSG_RESULT([$ERLANG_LIBDIR]) + +- ERLANG_INCDIR=`$ERLANG -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1` ++ ERLANG_INCDIR=`$ERL -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1` + AC_MSG_CHECKING([erlang incdir]) + if test -z "`echo $ERLANG_INCDIR`" ; then + AC_MSG_ERROR([failed]) +@@ -59,10 +67,11 @@ then + + ERLANG_LIB="ei" + +- # check liei ++ # check libei + AC_CHECK_LIB([$ERLANG_LIB], [ei_encode_version], [has_libei="yes"], [has_libei="no"]) + # maybe someday ei will actually expose this? +- AC_CHECK_LIB([$ERLANG_LIB], [ei_link_unlink], [ERLANG_CFLAGS="$ERLANG_CFLAGS -DEI_LINK_UNLINK"]) ++ # until then, we comment it out ++ #AC_CHECK_LIB([$ERLANG_LIB], [ei_link_unlink], [ERLANG_CFLAGS="$ERLANG_CFLAGS -DEI_LINK_UNLINK"]) + + if test "$has_libei" = "no" ; then + AS_IF([test "$with_erlang" = "try"], +@@ -76,7 +85,7 @@ then + ) + else + ERLANG_LDFLAGS="$ERLANG_LDFLAGS -lei" +- AC_MSG_NOTICE([Your erlang seems OK, do not forget to enable mod_erlang_event in modules.conf]) ++ AC_MSG_NOTICE([Your erlang seems OK. You can now use ErLang in your codes.]) + AC_SUBST([ERLANG_CFLAGS], [$ERLANG_CFLAGS]) + AC_SUBST([ERLANG_LDFLAGS], [$ERLANG_LDFLAGS]) + AM_CONDITIONAL([HAVE_ERLANG],[true]) +@@ -87,12 +96,12 @@ then + + else + AS_IF([test "$with_erlang" = "try"], +- [AC_MSG_WARN([Could not find erlang, mod_erlang_event will not build, use --with-erlang to specify the location])], ++ [AC_MSG_WARN([Could not find erlang, codes depend on erlang will not build, use --with-erlang to specify the location])], + [AC_MSG_ERROR([Could not find erlang, use --with-erlang to specify the location])] + ) + fi + else +- AC_MSG_WARN([erlang support disabled, building mod_erlang_event will fail!]) ++ AC_MSG_WARN([erlang support disabled!]) + fi + + ]) diff --git a/net/freeswitch/patches/uClibc/build-modules_conf_in.patch b/net/freeswitch/patches/uClibc/build-modules_conf_in.patch new file mode 100644 index 00000000000..86aad2609bb --- /dev/null +++ b/net/freeswitch/patches/uClibc/build-modules_conf_in.patch @@ -0,0 +1,10 @@ +--- a/build/modules.conf.in ++++ b/build/modules.conf.in +@@ -39,6 +39,7 @@ applications/mod_httapi + #applications/mod_rad_auth + #applications/mod_redis + #applications/mod_rss ++#applications/mod_skel + applications/mod_sms + #applications/mod_snapshot + #applications/mod_snom diff --git a/net/freeswitch/patches/uClibc/build-openwrt_rules.mk.patch b/net/freeswitch/patches/uClibc/build-openwrt_rules.mk.patch new file mode 100644 index 00000000000..31fb16fdccd --- /dev/null +++ b/net/freeswitch/patches/uClibc/build-openwrt_rules.mk.patch @@ -0,0 +1,10 @@ +--- /dev/null ++++ b/build/openwrt_rules.mk +@@ -0,0 +1,7 @@ ++OPENWRT_DIR=$(shell (cd $(BASE)/../../..;pwd)) ++STAGING_PREFIX=$(OPENWRT_DIR)/staging_dir/host ++STAGING_DIR=$(OPENWRT_DIR)/staging_dir/$(shell (cd $(BASE)/..;basename `pwd`)) ++ARCH="$(shell grep CONFIG_ARCH $(OPENWRT_DIR)/.config|cut -d= -d'"' -f2)" ++GNU_TARGET_NAME=$(ARCH)-openwrt-linux ++ ++include $(OPENWRT_DIR)/rules.mk diff --git a/net/freeswitch/patches/uClibc/configure_ac.patch b/net/freeswitch/patches/uClibc/configure_ac.patch new file mode 100644 index 00000000000..477af6bbc34 --- /dev/null +++ b/net/freeswitch/patches/uClibc/configure_ac.patch @@ -0,0 +1,65 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -254,7 +254,7 @@ AX_COMPILER_VENDOR + if test "x${cross_compiling}" = "xyes"; then + CC_FOR_BUILD=${CC_FOR_BUILD-gcc} + case "$host" in +- arm*-linux-gnueabi*|arm*-*-linux-gnueabi*) ++ arm*-linux-gnueabi*|arm*-*-linux-*) + # spandsp modem + ac_cv_file__dev_ptmx=yes + # libjs +@@ -273,7 +273,7 @@ if test "x${cross_compiling}" = "xyes"; + export apr_cv_mutex_recursive=yes + export ac_cv_func_pthread_rwlock_init=yes + export apr_cv_type_rwlock_t=yes +- export apr_cv_process_shared_works=yes ++ #export apr_cv_process_shared_works=no + export apr_cv_mutex_robust_shared=yes + ;; + esac +@@ -405,9 +405,6 @@ elif test "x${ax_cv_c_compiler_vendor}" + elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then + APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC) + APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC) +- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then +- APR_ADDTO(SWITCH_AM_CFLAGS, -Werror) +- fi + if test "${enable_64}" = "yes"; then + case "$host" in + *darwin*) +@@ -901,7 +898,6 @@ AC_CHECK_LIB(pthread, pthread_setschedpa + + AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket)) + +-AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])]) + AC_CHECK_LIB(util, openpty, [AC_DEFINE(HAVE_OPENPTY, 1, [Define if you have openpty()])]) + + AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[ +@@ -1478,14 +1474,14 @@ AM_CONDITIONAL([HAVE_MYSQL],[test "$foun + # perl checks + # + +-AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl=yes],[ac_cv_have_perl=no]) ++AC_CHECK_PROG(PERL,[perl],[ac_cv_have_perl=yes],[ac_cv_have_perl=no],[${STAGING_DIR}/../host/usr/bin]) ++PERL=$as_dir/$ac_word$ac_exec_ext + + # -a "x$ac_cv_have_EXTERN_h" != "xno" + + if test "x$ac_cv_have_perl" != "xno"; then +- PERL=perl +- PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlib}'`" +- PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE" ++ PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlibexp}'`" ++ PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlibexp}'`/CORE" + PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`" + PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts | sed -e 's|-arch x86_64 -arch i386||'` -DEMBED_PERL" + PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e 's|-arch x86_64 -arch i386||'`" +@@ -1502,6 +1498,7 @@ if test "x$ac_cv_have_perl" != "xno"; th + AC_CHECK_LIB([perl], [perl_alloc], ac_cv_use_libperl=yes, ac_cv_use_libperl=no) + LDFLAGS="$save_LDFLAGS" + ++ AC_SUBST(PERL) + AC_SUBST(PERL_SITEDIR) + AC_SUBST(PERL_LIBDIR) + AC_SUBST(PERL_LIBS) diff --git a/net/freeswitch/patches/uClibc/libs-apr-configure_ac.patch b/net/freeswitch/patches/uClibc/libs-apr-configure_ac.patch new file mode 100644 index 00000000000..7c0630f9d29 --- /dev/null +++ b/net/freeswitch/patches/uClibc/libs-apr-configure_ac.patch @@ -0,0 +1,55 @@ +--- a/libs/apr/configure.ac ++++ b/libs/apr/configure.ac +@@ -1624,38 +1624,7 @@ if test "$threads" = "1"; then + APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h) + AC_CHECK_FUNCS(pthread_mutexattr_setpshared) + AC_CHECK_LIB(pthread, pthread_setschedparam, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM, 1, [Define if you have pthread_setschedparam()])]) +- +- # Some systems have setpshared and define PROCESS_SHARED, but don't +- # really support PROCESS_SHARED locks. So, we must validate that we +- # can go through the steps without receiving some sort of system error. +- # Linux and older versions of AIX have this problem. +- APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared, [ +- AC_CACHE_CHECK([for working PROCESS_SHARED locks], apr_cv_process_shared_works, [ +- AC_TRY_RUN([ +-#include +-#include +- int main() +- { +- pthread_mutex_t mutex; +- pthread_mutexattr_t attr; +- if (pthread_mutexattr_init(&attr)) +- exit(1); +- if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)) +- exit(2); +- if (pthread_mutex_init(&mutex, &attr)) +- exit(3); +- if (pthread_mutexattr_destroy(&attr)) +- exit(4); +- if (pthread_mutex_destroy(&mutex)) +- exit(5); +- exit(0); +- }], [apr_cv_process_shared_works=yes], [apr_cv_process_shared_works=no])]) +- # Override detection of pthread_mutexattr_setpshared +- ac_cv_func_pthread_mutexattr_setpshared=$apr_cv_process_shared_works]) +- +- if test "$ac_cv_func_pthread_mutexattr_setpshared" = "yes"; then +- APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX +- fi ++ APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX + fi + + # See which lock mechanisms we can support on this system. +@@ -1956,7 +1925,11 @@ fi + + APR_CHECK_TCP_NODELAY_INHERITED + APR_CHECK_O_NONBLOCK_INHERITED +-APR_CHECK_TCP_NODELAY_WITH_CORK ++ ++dnl Check TCP_NODELAY_WITH_CORK ONLY when NOT cross compiling ++if test "$cross_compiling" != yes; then ++ APR_CHECK_TCP_NODELAY_WITH_CORK ++fi + + # Look for a way of corking TCP... + APR_CHECK_DEFINE(TCP_CORK, netinet/tcp.h) diff --git a/net/freeswitch/patches/uClibc/libs-apr-util-configure_gnu.patch b/net/freeswitch/patches/uClibc/libs-apr-util-configure_gnu.patch new file mode 100644 index 00000000000..b933b3cfda7 --- /dev/null +++ b/net/freeswitch/patches/uClibc/libs-apr-util-configure_gnu.patch @@ -0,0 +1,8 @@ +--- a/libs/apr-util/configure.gnu ++++ b/libs/apr-util/configure.gnu +@@ -1,4 +1,4 @@ + #! /bin/sh + srcpath=$(dirname $0 2>/dev/null ) || srcpath="." +-$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-pic --without-sqlite2 --without-sqlite3 --with-expat=builtin ++$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-expat=builtin + diff --git a/net/freeswitch/patches/uClibc/libs-srtp-configure_ac.patch b/net/freeswitch/patches/uClibc/libs-srtp-configure_ac.patch new file mode 100644 index 00000000000..56c1691486b --- /dev/null +++ b/net/freeswitch/patches/uClibc/libs-srtp-configure_ac.patch @@ -0,0 +1,13 @@ +--- a/libs/srtp/configure.ac ++++ b/libs/srtp/configure.ac +@@ -130,10 +130,6 @@ if test "$enable_kernel_linux" = "yes"; + fi + AC_MSG_RESULT($enable_kernel_linux) + +-dnl Check for /dev/urandom +-AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom, +- [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)]) +- + dnl Checks for header files. + AC_HEADER_STDC + AC_CHECK_HEADERS(stdlib.h) diff --git a/net/kamailio-3.x/Makefile b/net/kamailio-3.x/Makefile index 73d76d50ce9..102099293c2 100644 --- a/net/kamailio-3.x/Makefile +++ b/net/kamailio-3.x/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kamailio3 PKG_VERSION:=3.3.7 -PKG_RELEASE:=7 +PKG_RELEASE:=9 PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src/ PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz @@ -144,6 +144,7 @@ $(eval $(call BuildKamailio3Module,dispatcher,Dispatcher,,,modules_s)) $(eval $(call BuildKamailio3Module,diversion,Diversion header insertion,,,modules_s)) $(eval $(call BuildKamailio3Module,domain,Multi-domain support,,,modules_k)) $(eval $(call BuildKamailio3Module,domainpolicy,Domain policy,,,modules_k)) +$(eval $(call BuildKamailio3Module,drouting,Dynamic routing module,,,modules_k)) $(eval $(call BuildKamailio3Module,enum,ENUM lookup,,,modules)) $(eval $(call BuildKamailio3Module,exec,External exec,,,modules_k)) $(eval $(call BuildKamailio3Module,group,Database-backend user-groups,,,modules_k)) @@ -207,6 +208,7 @@ $(eval $(call BuildKamailio3Module,usrloc,User location,,+libxml2,modules_k)) $(eval $(call BuildKamailio3Module,utils,Misc utilities,,+libcurl +libxml2,modules)) $(eval $(call BuildKamailio3Module,xcap_client,XCAP Client,,+libcurl,modules_k)) $(eval $(call BuildKamailio3Module,xlog,Advanced logger,,,modules_k)) +$(eval $(call BuildKamailio3Module,xmlrpc,XML RPC module,,+libxml2,modules)) $(eval $(call BuildKamailio3Module,xmpp,SIP-to-XMPP Gateway,,+kamailio3-mod-tm +libexpat +libxml2,modules_k)) PKG_MAKE_ARGS:= \ diff --git a/net/kamailio-3.x/files/kamailio.init b/net/kamailio-3.x/files/kamailio.init index 6d66c5aee61..38bba51e5e5 100644 --- a/net/kamailio-3.x/files/kamailio.init +++ b/net/kamailio-3.x/files/kamailio.init @@ -21,10 +21,18 @@ start() { echo "[WARNING] Kamailio not yet configured. Edit /etc/default/kamailio first." else start-stop-daemon -S -x $BINFILE -b -- -P $PIDFILE -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY - fi + echo "[INFO] Kamailio has succesfully started." + fi } stop() { - start-stop-daemon -K -x $BINFILE -p $PIDFILE -q - rm -rf $PID_FILE + start-stop-daemon -K -x $BINFILE -p $PIDFILE -q + rm -rf $PID_FILE +} + +restart(){ + echo "[INFO] Restarting kamailio. Waiting 5 seconds before start." + stop + sleep 5 + start } diff --git a/net/kamailio-3.x/patches/110-include-sys-time-h-in-ld_session-h.patch b/net/kamailio-3.x/patches/110-include-sys-time-h-in-ld_session-h.patch new file mode 100644 index 00000000000..a4857cf464d --- /dev/null +++ b/net/kamailio-3.x/patches/110-include-sys-time-h-in-ld_session-h.patch @@ -0,0 +1,12 @@ +Index: kamailio3-3.3.7/modules_k/ldap/ld_session.h +=================================================================== +--- kamailio3-3.3.7.orig/modules_k/ldap/ld_session.h ++++ kamailio3-3.3.7/modules_k/ldap/ld_session.h +@@ -33,6 +33,7 @@ + #ifndef LD_SESSION_H + #define LD_SESSION_H + ++#include + #include + + #include "iniparser.h" diff --git a/net/kamailio-4.x/Makefile b/net/kamailio-4.x/Makefile index 503e1fe9c98..f02ec01506c 100644 --- a/net/kamailio-4.x/Makefile +++ b/net/kamailio-4.x/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2014 OpenWrt.org +# Copyright (C) 2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,21 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kamailio4 -PKG_VERSION:=4.2.1 -PKG_RELEASE:=1 +PKG_VERSION:=4.3.0 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src/ PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz -PKG_MD5SUM:=c2bccebd88156bf02957468e36dda648 +PKG_MD5SUM:=4a6bd2f70f14d94a4ed9a8e6b18f89d7 PKG_USE_MIPS16:=0 PKG_LICENSE:=GPL-2.0+ PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Jiri Slachta -INCL_MODULES:= -KAM_MODULES:= - include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/package.mk @@ -47,7 +44,6 @@ endef define Package/kamailio4/conffiles /etc/default/kamailio /etc/kamailio/kamailio.cfg -/etc/kamailio/kamailio-advanced.cfg /etc/kamailio/dictionary.kamailio /etc/kamailio/kamctlrc endef @@ -63,7 +59,10 @@ define Package/kamailio4/install $(1)/usr/lib/kamailio/ $(INSTALL_DIR) $(1)/etc/kamailio $(CP) \ - $(PKG_INSTALL_DIR)/etc/kamailio/{dictionary.kamailio,kamailio-advanced.cfg,kamailio.cfg,kamctlrc} \ + $(PKG_BUILD_DIR)/etc/{dictionary.kamailio,kamailio.cfg,kamailio-basic.cfg} \ + $(1)/etc/kamailio/ + $(CP) \ + $(PKG_BUILD_DIR)/utils/kamctl/kamctlrc \ $(1)/etc/kamailio/ $(INSTALL_DIR) $(1)/etc/default $(CP) \ @@ -86,7 +85,7 @@ endef define Package/kamailio4/install/module $(INSTALL_DIR) $(1)/usr/lib/kamailio/modules - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/kamailio/modules/*$(2).so* $(1)/usr/lib/kamailio/modules/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/kamailio/modules/$(2).so* $(1)/usr/lib/kamailio/modules/ endef define BuildKamailio4Module @@ -96,10 +95,6 @@ define BuildKamailio4Module DEPENDS:=kamailio4 $(4) endef - define Package/kamailio4-mod-$(subst _,-,$(1))/description -This package provides support for $(3) in Kamailio. - endef - define Package/kamailio4-mod-$(subst _,-,$(1))/install $(call Package/kamailio4/install/module,$$(1),$(1)) $(foreach d,$(5),$(call Package/kamailio4/install/dbfiles,$$(1),$(d));) @@ -124,12 +119,13 @@ $(eval $(call BuildKamailio4Module,alias_db,Database-backend aliases,,+kamailio4 $(eval $(call BuildKamailio4Module,auth,Authentication Framework,,)) $(eval $(call BuildKamailio4Module,auth_db,Database-backend authentication,,+kamailio4-mod-auth +kamailio4-mod-db-sqlite)) $(eval $(call BuildKamailio4Module,auth_diameter,Diameter-backend authentication,,+kamailio4-mod-sl)) +$(eval $(call BuildKamailio4Module,auth_xkeys,Shared-key authentication,,+kamailio4-mod-auth)) $(eval $(call BuildKamailio4Module,avpops,AVP operation,,)) $(eval $(call BuildKamailio4Module,benchmark,Config benchmark,,)) $(eval $(call BuildKamailio4Module,cfgutils,Config utilities,,)) $(eval $(call BuildKamailio4Module,cfg_db,Load core and module parameters from database,,+kamailio4-mod-db-sqlite)) $(eval $(call BuildKamailio4Module,cfg_rpc,Update core and module parameters at runtime via RPC interface,,)) -$(eval $(call BuildKamailio4Module,cnxcc,Limit call duration,,+kamailio4-mod-dialog)) +$(eval $(call BuildKamailio4Module,cnxcc,Limit call duration,,+kamailio4-mod-dialog +libhiredis +libevent2)) $(eval $(call BuildKamailio4Module,corex,Legacy functions,,)) $(eval $(call BuildKamailio4Module,ctl,BINRPC transport interface,,)) $(eval $(call BuildKamailio4Module,db_flatstore,Fast writing-only text database-backed,,)) @@ -138,6 +134,7 @@ $(eval $(call BuildKamailio4Module,db_postgres,PostgreSQL Database-backend,,+lib $(eval $(call BuildKamailio4Module,db_sqlite,Sqlite DB support,,+libsqlite3,db_sqlite)) $(eval $(call BuildKamailio4Module,db_text,Text database-backend,,,dbtext/kamailio)) $(eval $(call BuildKamailio4Module,db_unixodbc,UnixODBC Database-backend,,+unixodbc)) +$(eval $(call BuildKamailio4Module,debugger,Interactive config file debugger,,)) $(eval $(call BuildKamailio4Module,dialog,Dialog support,,+kamailio4-mod-rr +kamailio4-mod-tm)) $(eval $(call BuildKamailio4Module,dialog_ng,Dialog support,,+kamailio4-mod-rr +kamailio4-mod-tm)) $(eval $(call BuildKamailio4Module,dialplan,Dialplan management,,)) @@ -145,14 +142,19 @@ $(eval $(call BuildKamailio4Module,dispatcher,Dispatcher,,)) $(eval $(call BuildKamailio4Module,diversion,Diversion header insertion,,)) $(eval $(call BuildKamailio4Module,domain,Multi-domain support,,)) $(eval $(call BuildKamailio4Module,domainpolicy,Domain policy,,)) +$(eval $(call BuildKamailio4Module,drouting,Dynamic routing module,,)) $(eval $(call BuildKamailio4Module,enum,ENUM lookup,,)) +$(eval $(call BuildKamailio4Module,evapi,push event details via tcp,,+libev)) $(eval $(call BuildKamailio4Module,exec,External exec,,)) $(eval $(call BuildKamailio4Module,group,Database-backend user-groups,,)) $(eval $(call BuildKamailio4Module,h350,H.350,,+kamailio4-mod-ldap +libopenldap)) $(eval $(call BuildKamailio4Module,htable,Hash Table,,)) $(eval $(call BuildKamailio4Module,imc,IM conferencing,,+kamailio4-mod-db-mysql +kamailio4-mod-tm)) $(eval $(call BuildKamailio4Module,ipops,IP and IPv6 operations,,)) -$(eval $(call BuildKamailio4Module,json,Access to JSON document attributes,,+libjson)) +$(eval $(call BuildKamailio4Module,jansson,Alternative access to JSON document attributes,,+jansson)) +$(eval $(call BuildKamailio4Module,janssonrpc-c,Alternative JSONRPC server,,+kamailio4-mod-jansson +libevent2)) +$(eval $(call BuildKamailio4Module,json,Access to JSON document attributes,,+libjson-c)) +$(eval $(call BuildKamailio4Module,jsonrpc-s,JSONRPC server over HTTP,,+kamailio4-mod-json +libevent2)) $(eval $(call BuildKamailio4Module,kex,Core extensions,,)) $(eval $(call BuildKamailio4Module,lcr,Least Cost Routing,,+kamailio4-mod-tm +libpcre)) $(eval $(call BuildKamailio4Module,ldap,LDAP connector,,+libopenldap)) @@ -165,6 +167,7 @@ $(eval $(call BuildKamailio4Module,msilo,SIP message silo,,+kamailio4-mod-tm)) $(eval $(call BuildKamailio4Module,msrp,MSRP routing engine,,+kamailio4-mod-tls)) $(eval $(call BuildKamailio4Module,nathelper,NAT helper,,+kamailio4-mod-usrloc)) $(eval $(call BuildKamailio4Module,nat_traversal,NAT traversal,,+kamailio4-mod-dialog +kamailio4-mod-sl +kamailio4-mod-tm)) +$(eval $(call BuildKamailio4Module,nosip,non-sip package handling,,+kamailio4-mod-rr)) $(eval $(call BuildKamailio4Module,path,SIP path insertion,,+kamailio4-mod-rr)) $(eval $(call BuildKamailio4Module,pdt,Prefix-to-Domain translator,,)) $(eval $(call BuildKamailio4Module,permissions,Permissions control,,)) @@ -190,6 +193,7 @@ $(eval $(call BuildKamailio4Module,rtimer,Routing Timer,,)) $(eval $(call BuildKamailio4Module,rtpengine,RTP engine,,+kamailio4-mod-tm)) $(eval $(call BuildKamailio4Module,rtpproxy,RTP proxy,,+kamailio4-mod-tm)) $(eval $(call BuildKamailio4Module,sanity,SIP sanity checks,,+kamailio4-mod-sl)) +$(eval $(call BuildKamailio4Module,sctp,SCTP support,,+libsctp)) $(eval $(call BuildKamailio4Module,sipcapture,SIP capture,,)) $(eval $(call BuildKamailio4Module,siptrace,SIP trace,,)) $(eval $(call BuildKamailio4Module,siputils,SIP utilities,,+kamailio4-mod-sl)) @@ -200,6 +204,7 @@ $(eval $(call BuildKamailio4Module,sqlops,SQL operations,,)) $(eval $(call BuildKamailio4Module,statistics,Script statistics,,)) $(eval $(call BuildKamailio4Module,stun,STUN server support,,)) $(eval $(call BuildKamailio4Module,sst,SIP Session Timer,,+kamailio4-mod-dialog +kamailio4-mod-sl)) +$(eval $(call BuildKamailio4Module,tcpops,TCP options tweaking operations,,)) $(eval $(call BuildKamailio4Module,textops,Text operations,,)) $(eval $(call BuildKamailio4Module,tls,TLS operations,,+libopenssl)) $(eval $(call BuildKamailio4Module,topoh,Topology hiding,,+kamailio4-mod-rr)) @@ -211,8 +216,10 @@ $(eval $(call BuildKamailio4Module,uri_db,Database-backend SIP URI checking,,)) $(eval $(call BuildKamailio4Module,userblacklist,User blacklists,,)) $(eval $(call BuildKamailio4Module,usrloc,User location,,)) $(eval $(call BuildKamailio4Module,utils,Misc utilities,,+libcurl +libxml2)) +$(eval $(call BuildKamailio4Module,uuid,UUID utilities,,+libuuid)) $(eval $(call BuildKamailio4Module,xcap_client,XCAP Client,,+libcurl)) $(eval $(call BuildKamailio4Module,xlog,Advanced logger,,)) +$(eval $(call BuildKamailio4Module,xmlrpc,XML RPC module,,+libxml2)) $(eval $(call BuildKamailio4Module,xmpp,SIP-to-XMPP Gateway,,+kamailio4-mod-tm +libexpat)) PKG_MAKE_ARGS:= \ @@ -235,14 +242,12 @@ PKG_MAKE_ARGS:= \ CC="$(TARGET_CC)" \ ARCH="$(ARCH)" \ DESTDIR=$(PKG_INSTALL_DIR) \ + EXTRA_LIBS="-L$(STAGING_DIR)/usr/lib/" \ quiet=verbose define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ - EXTRA_LIBS=-L$(STAGING_DIR)/usr/lib/ \ - all - $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ - install + $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) all + $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) install endef $(eval $(call BuildPackage,kamailio4)) diff --git a/net/kamailio-4.x/files/kamailio.init b/net/kamailio-4.x/files/kamailio.init index 6d66c5aee61..38bba51e5e5 100644 --- a/net/kamailio-4.x/files/kamailio.init +++ b/net/kamailio-4.x/files/kamailio.init @@ -21,10 +21,18 @@ start() { echo "[WARNING] Kamailio not yet configured. Edit /etc/default/kamailio first." else start-stop-daemon -S -x $BINFILE -b -- -P $PIDFILE -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY - fi + echo "[INFO] Kamailio has succesfully started." + fi } stop() { - start-stop-daemon -K -x $BINFILE -p $PIDFILE -q - rm -rf $PID_FILE + start-stop-daemon -K -x $BINFILE -p $PIDFILE -q + rm -rf $PID_FILE +} + +restart(){ + echo "[INFO] Restarting kamailio. Waiting 5 seconds before start." + stop + sleep 5 + start } diff --git a/net/kamailio-4.x/patches/110-include-sys-time-h-in-ld_session-h.patch b/net/kamailio-4.x/patches/110-include-sys-time-h-in-ld_session-h.patch new file mode 100644 index 00000000000..2dab8d1a3d3 --- /dev/null +++ b/net/kamailio-4.x/patches/110-include-sys-time-h-in-ld_session-h.patch @@ -0,0 +1,10 @@ +--- a/modules/ldap/ld_session.h ++++ b/modules/ldap/ld_session.h +@@ -33,6 +33,7 @@ + #ifndef LD_SESSION_H + #define LD_SESSION_H + ++#include + #include + + #include "iniparser.h" diff --git a/net/kamailio-4.x/patches/111-include-sys-time-h-in-kamcmd-c.patch b/net/kamailio-4.x/patches/111-include-sys-time-h-in-kamcmd-c.patch new file mode 100644 index 00000000000..461588908d6 --- /dev/null +++ b/net/kamailio-4.x/patches/111-include-sys-time-h-in-kamcmd-c.patch @@ -0,0 +1,10 @@ +--- a/utils/kamcmd/kamcmd.c ++++ b/utils/kamcmd/kamcmd.c +@@ -43,6 +43,7 @@ + #include + #include /* isprint */ + #include ++#include /* struct timeval */ + #include /* unix sock*/ + #include /* udp sock */ + #include /* writev */ diff --git a/net/kamailio-4.x/patches/120-libevent-libs.patch b/net/kamailio-4.x/patches/120-libevent-libs.patch new file mode 100644 index 00000000000..918d27ba16f --- /dev/null +++ b/net/kamailio-4.x/patches/120-libevent-libs.patch @@ -0,0 +1,25 @@ +Index: kamailio4-4.3.0/modules/cnxcc/Makefile +=================================================================== +--- kamailio4-4.3.0.orig/modules/cnxcc/Makefile ++++ kamailio4-4.3.0/modules/cnxcc/Makefile +@@ -8,7 +8,7 @@ include ../../Makefile.defs + auto_gen= + NAME=cnxcc.so + +-LIBS=-lhiredis -levent ++LIBS=-lhiredis -levent $(EXTRA_LIBS) + DEFS+=-DOPENSER_MOD_INTERFACE + SERLIBPATH=../../lib + SER_LIBS+=$(SERLIBPATH)/kmi/kmi +Index: kamailio4-4.3.0/modules/janssonrpc-c/netstring.h +=================================================================== +--- kamailio4-4.3.0.orig/modules/janssonrpc-c/netstring.h ++++ kamailio4-4.3.0/modules/janssonrpc-c/netstring.h +@@ -24,6 +24,7 @@ + #define __NETSTRING_STREAM_H + + #include ++#include + #include + + typedef struct { diff --git a/net/miax/patches/003-musl-fixes.patch b/net/miax/patches/003-musl-fixes.patch new file mode 100644 index 00000000000..86b1c3045c0 --- /dev/null +++ b/net/miax/patches/003-musl-fixes.patch @@ -0,0 +1,142 @@ +--- a/iax/iax.c ++++ b/iax/iax.c +@@ -45,7 +45,6 @@ + + #ifndef MACOSX + #include +-#include + #endif + + #endif +--- a/miax.c ++++ b/miax.c +@@ -31,26 +31,26 @@ + #include "iaxclient_lib.h" + #include "miax.h" + +-FILE *stderr; ++FILE *_stderr; + + int miax_closeall(int n) { + + int l; + +- if (debug > 5 ) { fprintf(stderr,"Miax: status: %d\nMiax: event: %d\n",status, n); } ++ if (debug > 5 ) { fprintf(_stderr,"Miax: status: %d\nMiax: event: %d\n",status, n); } + + if (status >= 0) { + status=-1; + + if (n < 0) { + iaxc_dump_all_calls(); +- if (debug > 5 ) { fprintf(stderr,"Miax: call dumped.\n"); } ++ if (debug > 5 ) { fprintf(_stderr,"Miax: call dumped.\n"); } + } + audio_close(); +- if (debug > 5 ) { fprintf(stderr,"Miax: audio closed.\n"); } ++ if (debug > 5 ) { fprintf(_stderr,"Miax: audio closed.\n"); } + if (m > 0) { + modem_close(); +- if (debug > 5 ) { fprintf(stderr,"Miax: modem closed.\n"); } ++ if (debug > 5 ) { fprintf(_stderr,"Miax: modem closed.\n"); } + } + } + +@@ -63,7 +63,7 @@ int miax_callback(struct iax_event *e, i + switch(e->etype) { + case 0: //IAX_EVENT_CONNECT + strcpy(number,e->ies.called_number); +- fprintf(stderr, "Miax: %s is looking for %s\n", e->ies.calling_number, number); ++ fprintf(_stderr, "Miax: %s is looking for %s\n", e->ies.calling_number, number); + status=100; + break; + case 2: //IAX_EVENT_HANGUP: +@@ -105,7 +105,7 @@ int console_loop(int status, char *numbe + read(0,buf,sizeof(buf)); + if (status == 100) { return 130; } + if (strstr(buf,"h")) { +- fprintf(stderr, "Miax: hanging up.\n"); ++ fprintf(_stderr, "Miax: hanging up.\n"); + return -1; + } + else { +@@ -119,21 +119,21 @@ int console_loop(int status, char *numbe + + + void usage() { +- fprintf(stderr, "Usage: miax [-hndupsragmbil]\n\n"); +- fprintf(stderr, " -h this help\n"); +- fprintf(stderr, " -n source number\n"); +- fprintf(stderr, " -d destination number\n"); +- fprintf(stderr, " -u username\n"); +- fprintf(stderr, " -p password\n"); +- fprintf(stderr, " -s server\n"); +- fprintf(stderr, " -r register\n"); +- fprintf(stderr, " -a audio device\n"); +- fprintf(stderr, " -g gsm codec\n"); +- fprintf(stderr, " -m modem device\n"); +- fprintf(stderr, " -i modem init string\n"); +- fprintf(stderr, " -l log level\n"); +- fprintf(stderr, " -o log output\n"); +- fprintf(stderr, "\nReport bugs to \n"); ++ fprintf(_stderr, "Usage: miax [-hndupsragmbil]\n\n"); ++ fprintf(_stderr, " -h this help\n"); ++ fprintf(_stderr, " -n source number\n"); ++ fprintf(_stderr, " -d destination number\n"); ++ fprintf(_stderr, " -u username\n"); ++ fprintf(_stderr, " -p password\n"); ++ fprintf(_stderr, " -s server\n"); ++ fprintf(_stderr, " -r register\n"); ++ fprintf(_stderr, " -a audio device\n"); ++ fprintf(_stderr, " -g gsm codec\n"); ++ fprintf(_stderr, " -m modem device\n"); ++ fprintf(_stderr, " -i modem init string\n"); ++ fprintf(_stderr, " -l log level\n"); ++ fprintf(_stderr, " -o log output\n"); ++ fprintf(_stderr, "\nReport bugs to \n"); + exit(1); + } + +@@ -216,7 +216,7 @@ int main(int argc, char **argv) { + + printf("miax@eja.it\n"); + +- stderr=fopen(log_output,"w"); ++ _stderr=fopen(log_output,"w"); + + iaxc_initialize(1); + +@@ -233,13 +233,13 @@ int main(int argc, char **argv) { + if (r > 0) { iaxc_register(username,password,hostname); } + + if ( audio_init(audio_dev, compression) < 0) { +- fprintf(stderr,"Miax: cannot initialize audio device!\n"); ++ fprintf(_stderr,"Miax: cannot initialize audio device!\n"); + return -1; + } + + if (m > 0) { + if (modem_init(modem_dev) < 0) { +- fprintf(stderr,"Miax: cannot initialize modem device!\n"); ++ fprintf(_stderr,"Miax: cannot initialize modem device!\n"); + return -1; + } + if (m == 2) { sprintf(buf,"%s\r",modem_i); modem(buf); } +@@ -252,7 +252,7 @@ int main(int argc, char **argv) { + + iaxc_start_processing_thread(); + +- fprintf(stderr, "Miax: ready.\n"); ++ fprintf(_stderr, "Miax: ready.\n"); + + while(status >= 0) { + n = miax_loop(status, number); +@@ -271,7 +271,7 @@ int main(int argc, char **argv) { + break; + } + } +- fprintf(stderr, "Miax: bye! :)\n\n"); ++ fprintf(_stderr, "Miax: bye! :)\n\n"); + + exit(0); + } diff --git a/net/restund/Makefile b/net/restund/Makefile index 46cfe7bb220..ad20e854574 100644 --- a/net/restund/Makefile +++ b/net/restund/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=restund -PKG_VERSION:=0.4.2 -PKG_RELEASE:=3 +PKG_VERSION:=0.4.11 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.creytiv.com/pub/ -PKG_MD5SUM:=dd58fc56c29f812fc14988412a3bf14a +PKG_MD5SUM:=e50e57aa96a19add97193b7765740456 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=docs/COPYING diff --git a/net/rtpproxy/Makefile b/net/rtpproxy/Makefile index 3aed248ede2..7b4fe90e9dc 100644 --- a/net/rtpproxy/Makefile +++ b/net/rtpproxy/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rtpproxy -PKG_VERSION:=1.2.1 +PKG_VERSION:=2.0.0 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://b2bua.org/chrome/site/ -PKG_MD5SUM:=b0b5d6cdce3f17cdbbac473c11a2d0e5 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=git://github.com/sippy/rtpproxy.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=d5926892630139bcbe55d1f3fa36764c881648bc +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_CHECK_FORMAT_SECURITY:=0 PKG_INSTALL:=1 @@ -26,16 +30,20 @@ define Package/rtpproxy SECTION:=net CATEGORY:=Network SUBMENU:=Telephony - DEPENDS:=+libpthread + DEPENDS:=+libpthread +librt TITLE:=RTP (Realtime Transport Protocol) proxy URL:=http://www.rtpproxy.org/ endef -# uses GNU configure - define Package/rtpproxy/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtpproxy $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/rtpproxy.init $(1)/etc/init.d/rtpproxy + + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_BIN) ./files/rtpproxy.config $(1)/etc/config/rtpproxy endef $(eval $(call BuildPackage,rtpproxy)) diff --git a/net/rtpproxy/files/rtpproxy.config b/net/rtpproxy/files/rtpproxy.config new file mode 100644 index 00000000000..70872519164 --- /dev/null +++ b/net/rtpproxy/files/rtpproxy.config @@ -0,0 +1,14 @@ +config rtpproxy global + option enabled 0 # 0 - disabled, 1 - enabled + +config instance 'site1' + option socket 'udp:127.0.0.1:7723' # socket + option ipaddr '127.0.0.1' # IPv4 address + option ip6addr '2001:0db8:0000:0000:0000:0000:1428:57ab' # IPv6 address + option user 'nobody' # userid to run rtpproxy instance from + option opts '' # additional options for rtpproxy instance + +config instance 'site2' + option socket 'udp:127.0.0.1:7724' + option ipaddr '192.168.1.1' + diff --git a/net/rtpproxy/files/rtpproxy.init b/net/rtpproxy/files/rtpproxy.init new file mode 100644 index 00000000000..d1e2b375abb --- /dev/null +++ b/net/rtpproxy/files/rtpproxy.init @@ -0,0 +1,70 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2014 CESNET, z.s.p.o + +START=99 +RTPPROXY_BIN="/usr/bin/rtpproxy" + +run_instance(){ + local params="$1" + + ${RTPPROXY_BIN} $1 + echo "[INFO] rtpproxy instance $2 has started" +} + +check_param(){ + local param="$1" + local value="$2" + local default_value="$3" + + if [ "$value" != "" ]; then + rtpproxy_options=$rtpproxy_options" $param $value" + else + if [ "$default_value" != "" ]; then + rtpproxy_options=$rtpproxy_options" $param $default_value" + fi + fi +} + +check_special_param(){ + local param="$1" + + if [ "$param" != "" ]; then + rtpproxy_options=$rtpproxy_options" $param" + fi +} + +handle_instance() { + local site="$1" + local socket opts ipaddr ip6addr rtpproxy_options + + config_get socket "$site" socket + config_get opts "$site" opts + config_get ipaddr "$site" ipaddr + config_get ip6addr "$site" ip6addr + config_get user "$site" user + + check_param "-s" "$socket" + check_param "-l" "$ipaddr" + check_param "-6" "$ip6addr" + check_param "-u" "$user" "nobody" + check_special_param "$opts" + + run_instance "$rtpproxy_options" "$site" +} + +start(){ + config_load rtpproxy + local section="global" + config_get_bool enabled global enabled 0 + + if [ "$enabled" -eq 1 ]; then + config_foreach handle_instance instance + else + echo "[WARNING] rtpproxy not yet configured. Edit /etc/config/rtpproxy first." + fi +} + +stop() { + killall rtpproxy +} + diff --git a/net/rtpproxy/patches/100-no-sysctl-on-musl.patch b/net/rtpproxy/patches/100-no-sysctl-on-musl.patch new file mode 100644 index 00000000000..f337733a5fb --- /dev/null +++ b/net/rtpproxy/patches/100-no-sysctl-on-musl.patch @@ -0,0 +1,14 @@ +Index: rtpproxy-2.0.0/src/rtpp_util.c +=================================================================== +--- rtpproxy-2.0.0.orig/src/rtpp_util.c ++++ rtpproxy-2.0.0/src/rtpp_util.c +@@ -28,7 +28,9 @@ + + #include + #include ++#ifdef __GLIBC__ + #include ++#endif + #include + #include + #include diff --git a/net/rtpproxy/patches/101-include-endian-h.patch b/net/rtpproxy/patches/101-include-endian-h.patch new file mode 100644 index 00000000000..4a4b39018bc --- /dev/null +++ b/net/rtpproxy/patches/101-include-endian-h.patch @@ -0,0 +1,13 @@ +Index: rtpproxy-2.0.0/src/rtp.h +=================================================================== +--- rtpproxy-2.0.0.orig/src/rtp.h ++++ rtpproxy-2.0.0/src/rtp.h +@@ -29,6 +29,8 @@ + #ifndef _RTP_H_ + #define _RTP_H_ + ++#include ++ + /* + * RTP payload types + */ diff --git a/net/rtpproxy/patches/102-don-t-build-rtpproxy_debug.patch b/net/rtpproxy/patches/102-don-t-build-rtpproxy_debug.patch new file mode 100644 index 00000000000..5d96054a9c5 --- /dev/null +++ b/net/rtpproxy/patches/102-don-t-build-rtpproxy_debug.patch @@ -0,0 +1,23 @@ +Index: rtpproxy-2.0.0/src/Makefile.am +=================================================================== +--- rtpproxy-2.0.0.orig/src/Makefile.am ++++ rtpproxy-2.0.0/src/Makefile.am +@@ -1,4 +1,4 @@ +-bin_PROGRAMS=rtpproxy rtpproxy_debug ++bin_PROGRAMS=rtpproxy + rtpproxy_SOURCES=main.c rtp.h rtp_server.c rtp_server.h \ + rtpp_defines.h rtpp_log.h rtpp_record.c rtpp_record.h rtpp_session.h \ + rtpp_util.c rtpp_util.h rtp.c rtp_resizer.c rtp_resizer.h rtpp_session.c \ +Index: rtpproxy-2.0.0/src/Makefile.in +=================================================================== +--- rtpproxy-2.0.0.orig/src/Makefile.in ++++ rtpproxy-2.0.0/src/Makefile.in +@@ -78,7 +78,7 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-bin_PROGRAMS = rtpproxy$(EXEEXT) rtpproxy_debug$(EXEEXT) ++bin_PROGRAMS = rtpproxy$(EXEEXT) + subdir = src + DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/config.h.in $(top_srcdir)/depcomp diff --git a/net/sipp/Makefile b/net/sipp/Makefile index 967b568e3e6..fe8e1e1002e 100644 --- a/net/sipp/Makefile +++ b/net/sipp/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2013-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sipp PKG_VERSION:=3.3.990 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/sipp diff --git a/net/sipp/patches/100-musl-compat.patch b/net/sipp/patches/100-musl-compat.patch new file mode 100644 index 00000000000..c5e945fd36f --- /dev/null +++ b/net/sipp/patches/100-musl-compat.patch @@ -0,0 +1,12 @@ +--- a/src/auth.c ++++ b/src/auth.c +@@ -22,9 +22,7 @@ + * Frederique Aurouet + */ + +-#if defined( __FreeBSD__) || defined(__DARWIN) || defined(__SUNOS) + #include +-#endif + #include + #include + #include diff --git a/net/siproxd/Makefile b/net/siproxd/Makefile index 57be9c54a3a..a2d58a8ddcc 100644 --- a/net/siproxd/Makefile +++ b/net/siproxd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2014 OpenWrt.org +# Copyright (C) 2014-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=siproxd PKG_VERSION:=0.8.1 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/siproxd diff --git a/net/siproxd/patches/100-musl-compat.patch b/net/siproxd/patches/100-musl-compat.patch new file mode 100644 index 00000000000..5e0c1dab6e3 --- /dev/null +++ b/net/siproxd/patches/100-musl-compat.patch @@ -0,0 +1,31 @@ +--- a/src/resolve.c ++++ b/src/resolve.c +@@ -30,6 +30,7 @@ + + #include + #include ++#include + + #include "log.h" + +--- a/src/dejitter.c ++++ b/src/dejitter.c +@@ -21,6 +21,7 @@ + #include "config.h" + + #include ++#include + + #include + #include +--- a/src/plugins.c ++++ b/src/plugins.c +@@ -20,6 +20,8 @@ + + #include "config.h" + ++#include ++ + #include + #include + #include diff --git a/net/sipsak/Makefile b/net/sipsak/Makefile deleted file mode 100644 index b2357a7ca56..00000000000 --- a/net/sipsak/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sipsak -PKG_VERSION:=0.9.6-1 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/sipsak.berlios -PKG_MD5SUM:=c4eb8e282902e75f4f040f09ea9d99d5 - -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-0.9.6 -PKG_INSTALL:=1 - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/sipsak - SECTION:=net - CATEGORY:=Network - SUBMENU:=Telephony - DEPENDS:=+libopenssl - TITLE:=SIP (Session Initiation Protocol) stress and diagnostics utility - URL:=http://sourceforge.net/projects/sipsak.berlios/ -endef - -define Build/Configure - $(call Build/Configure/Default, \ - --disable-gnutls \ - ) -endef - -define Package/sipsak/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sipsak $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,sipsak)) diff --git a/net/sipsak/patches/001-ssp.patch b/net/sipsak/patches/001-ssp.patch deleted file mode 100644 index 1dda867757a..00000000000 --- a/net/sipsak/patches/001-ssp.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -363,7 +363,7 @@ AC_DEFUN([SIPSAK_GCC_STACK_PROTECT_CC],[ - AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector]) - ssp_old_cflags="$CFLAGS" - CFLAGS="$CFLAGS -fstack-protector" -- AC_TRY_COMPILE(,,, ssp_cc=no) -+ AC_TRY_LINK(,,, ssp_cc=no) - echo $ssp_cc - if test "X$ssp_cc" = "Xno"; then - CFLAGS="$ssp_old_cflags" ---- a/configure -+++ b/configure -@@ -2923,7 +2923,7 @@ main () - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>conftest.er1 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 diff --git a/net/sipsak/patches/002-no_cares_ruli.patch b/net/sipsak/patches/002-no_cares_ruli.patch deleted file mode 100644 index 759ec943334..00000000000 --- a/net/sipsak/patches/002-no_cares_ruli.patch +++ /dev/null @@ -1,276 +0,0 @@ -diff -urN sipsak-0.9.6/configure sipsak-0.9.6.new/configure ---- sipsak-0.9.6/configure 2006-01-28 22:11:34.000000000 +0100 -+++ sipsak-0.9.6.new/configure 2012-08-06 16:45:07.051588486 +0200 -@@ -5954,264 +5954,6 @@ - - - -- echo "$as_me:$LINENO: checking for ares_version.h" >&5 --echo $ECHO_N "checking for ares_version.h... $ECHO_C" >&6 -- -- ares_incdir=NONE -- ares_libdir=NONE -- ares_libcall=NONE -- ares_incdirs="/usr/include /usr/local/include /sw/include" -- ares_libdirs="/usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib" -- ares_libexten=".so .dylib .a" -- -- for dir in $ares_incdirs; do -- try="$dir/ares_version.h" -- if test -f $try; then -- ares_incdir=$dir; -- break; -- fi -- done -- -- if test "$ares_incdir" = "NONE"; then -- echo "$as_me:$LINENO: result: not found" >&5 --echo "${ECHO_T}not found" >&6 -- else -- echo "$as_me:$LINENO: result: found at $ares_incdir" >&5 --echo "${ECHO_T}found at $ares_incdir" >&6 -- -- echo "$as_me:$LINENO: checking for c-ares lib" >&5 --echo $ECHO_N "checking for c-ares lib... $ECHO_C" >&6 -- -- for dir in $ares_libdirs; do -- for extension in $ares_libexten; do -- try="$dir/libcares$extension" -- if test -f $try; then -- ares_libdir=$dir; -- ares_libcall=cares; -- break; -- fi -- done -- if test "$ares_libdir" != "NONE"; then -- break; -- fi -- done -- -- if test "$ares_libdir" = "NONE"; then -- echo "$as_me:$LINENO: result: not found" >&5 --echo "${ECHO_T}not found" >&6 -- else -- echo "$as_me:$LINENO: result: found at $ares_libdir" >&5 --echo "${ECHO_T}found at $ares_libdir" >&6 -- fi -- -- echo "$as_me:$LINENO: checking for ares_version in -lcares" >&5 --echo $ECHO_N "checking for ares_version in -lcares... $ECHO_C" >&6 --if test "${ac_cv_lib_cares_ares_version+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lcares $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char ares_version (); --int --main () --{ --ares_version (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_cares_ares_version=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_cares_ares_version=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_cares_ares_version" >&5 --echo "${ECHO_T}$ac_cv_lib_cares_ares_version" >&6 --if test $ac_cv_lib_cares_ares_version = yes; then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_CARES_H 1 --_ACEOF -- -- LIBS="$LIBS -L$ares_libdir -l$ares_libcall" -- CFLAGS="$CFLAGS -I$ares_incdir" -- SIPSAK_HAVE_ARES="1" -- -- --fi -- -- fi -- --if test "X$SIPSAK_HAVE_ARES" == "X"; then -- -- echo "$as_me:$LINENO: checking for ruli.h" >&5 --echo $ECHO_N "checking for ruli.h... $ECHO_C" >&6 -- -- ruli_incdir=NONE -- ruli_libdir=NONE -- ruli_incdirs="/usr/include /usr/local/include /sw/include" -- ruli_libdirs="/usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib" -- ruli_libexten=".so .dylib .a" -- -- for dir in $ruli_incdirs; do -- try="$dir/ruli.h" -- if test -f $try; then -- ruli_incdir=$dir; -- break; -- fi -- done -- -- if test "$ruli_incdir" = "NONE"; then -- echo "$as_me:$LINENO: result: not found" >&5 --echo "${ECHO_T}not found" >&6 -- else -- echo "$as_me:$LINENO: result: found at $ruli_incdir" >&5 --echo "${ECHO_T}found at $ruli_incdir" >&6 -- -- echo "$as_me:$LINENO: checking for libruli" >&5 --echo $ECHO_N "checking for libruli... $ECHO_C" >&6 -- -- for dir in $ruli_libdirs; do -- for extension in $ruli_libexten; do -- try="$dir/libruli$extension" -- if test -f $try; then -- ruli_libdir=$dir; -- break; -- fi -- done -- if test "$ruli_libdir" != "NONE"; then -- break; -- fi -- done -- -- if test "$ruli_libdir" = "NONE"; then -- echo "$as_me:$LINENO: result: not found" >&5 --echo "${ECHO_T}not found" >&6 -- else -- echo "$as_me:$LINENO: result: found at $ruli_libdir" >&5 --echo "${ECHO_T}found at $ruli_libdir" >&6 -- fi -- -- echo "$as_me:$LINENO: checking for ruli_sync_query in -lruli" >&5 --echo $ECHO_N "checking for ruli_sync_query in -lruli... $ECHO_C" >&6 --if test "${ac_cv_lib_ruli_ruli_sync_query+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lruli $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char ruli_sync_query (); --int --main () --{ --ruli_sync_query (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_ruli_ruli_sync_query=yes --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --ac_cv_lib_ruli_ruli_sync_query=no --fi --rm -f conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:$LINENO: result: $ac_cv_lib_ruli_ruli_sync_query" >&5 --echo "${ECHO_T}$ac_cv_lib_ruli_ruli_sync_query" >&6 --if test $ac_cv_lib_ruli_ruli_sync_query = yes; then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_RULI_H 1 --_ACEOF -- -- LIBS="$LIBS -L$ruli_libdir -lruli" -- CFLAGS="$CFLAGS -I$ruli_incdir" -- --fi -- -- fi -- --else -- - for ac_header in arpa/nameser.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -@@ -6361,7 +6103,6 @@ - - done - --fi - - - # Check for T1 timer value diff --git a/net/yate/Makefile b/net/yate/Makefile index 5933fbd2481..f3b53841ac2 100644 --- a/net/yate/Makefile +++ b/net/yate/Makefile @@ -7,25 +7,27 @@ # include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/uclibc++.mk -RELEASEVER:=5.4.0 +RELEASEVER:=5.5.0 PKG_NAME:=yate PKG_VERSION:=$(RELEASEVER)-1 -PKG_RELEASE:=4 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://yate.null.ro/tarballs/yate5/ -PKG_MD5SUM:=427fd2ffde51116271534f398bf913e8 +PKG_MD5SUM:=c433b3df08a5993e16fadaac279e39a0 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Jiri Slachta +PKG_FIXUP:=autoreconf + PKG_INSTALL:=1 +include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/$(PKG_NAME)/Default @@ -78,6 +80,12 @@ define Package/$(PKG_NAME)-collection-basic TITLE := Basic Yate Server endef +ifneq ($(CONFIG_USE_MUSL),) + LIBNSL:= +else + LIBNSL:=-lnsl +endif + TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include $(if $(CONFIG_BIG_ENDIAN),-DBIGENDIAN,) CONFIGURE_ARGS+= \ @@ -108,7 +116,7 @@ CONFIGURE_ARGS+= \ --with-spandsp="$(STAGING_DIR)/usr/include" \ --without-pwlib \ --without-openh323 \ - --with-openssl="$(STAGING_DIR)/usr" \ + --with-openssl \ --with-zlib="$(STAGING_DIR)/usr" \ --without-libqt4 \ --without-qtstatic \ @@ -118,12 +126,12 @@ CONFIGURE_ARGS+= \ CONFIGURE_VARS+= \ LDFLAGS="$$$$LDFLAGS -nodefaultlibs" \ - LIBS="-lc -luClibc++ -lpthread -lresolv -ldl -lm -lc $(LIBGCC_S)" + LIBS="-lc -luClibc++ -lpthread -lresolv -ldl -lm -lc $(LIBGCC_S) $(LIBNSL)" define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/usr/lib - for yatelib in "" sig mgcp jabber script; do \ + for yatelib in "" asn sig mgcp jabber script; do \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyate$$$${yatelib}.so.$(RELEASEVER) $(1)/usr/lib ;\ $(LN) ./libyate$$$${yatelib}.so.$(RELEASEVER) $(1)/usr/lib/libyate$$$${yatelib}.so ;\ done diff --git a/net/yate/patches/001-ppc-fix.patch b/net/yate/patches/001-ppc-fix.patch deleted file mode 100644 index 6a1315b8974..00000000000 --- a/net/yate/patches/001-ppc-fix.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: yate/libs/miniwebrtc/typedefs.h -=================================================================== ---- yate.orig/libs/miniwebrtc/typedefs.h -+++ yate/libs/miniwebrtc/typedefs.h -@@ -79,6 +79,26 @@ - #elif defined(__mips__) - #define WEBRTC_ARCH_32_BITS - #define WEBRTC_BIG_ENDIAN -+#elif defined(__powerpc64__) -+#define WEBRTC_ARCH_PPC64 1 -+#define WEBRTC_ARCH_64_BITS -+#ifdef __LITTLE_ENDIAN__ -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#define WEBRTC_LITTLE_ENDIAN -+#else -+#define WEBRTC_ARCH_BIG_ENDIAN -+#define WEBRTC_BIG_ENDIAN -+#endif -+#elif defined(__powerpc__) -+#define WEBRTC_ARCH_PPC 1 -+#define WEBRTC_ARCH_32_BITS -+#ifdef __LITTLE_ENDIAN__ -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#define WEBRTC_LITTLE_ENDIAN -+#else -+#define WEBRTC_ARCH_BIG_ENDIAN -+#define WEBRTC_BIG_ENDIAN -+#endif - #else - #error Please add support for your architecture in typedefs.h - #endif diff --git a/net/yate/patches/100-non-gnu-mutex-type.patch b/net/yate/patches/100-non-gnu-mutex-type.patch new file mode 100644 index 00000000000..af5d8b23502 --- /dev/null +++ b/net/yate/patches/100-non-gnu-mutex-type.patch @@ -0,0 +1,28 @@ +Index: yate/engine/Mutex.cpp +=================================================================== +--- yate.orig/engine/Mutex.cpp ++++ yate/engine/Mutex.cpp +@@ -30,6 +30,10 @@ typedef HANDLE HSEMAPHORE; + #include + #include + ++#ifndef PTHREAD_MUTEX_RECURSIVE_NP ++#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE ++#endif ++ + #ifdef MUTEX_HACK + extern "C" { + #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) +Index: yate/configure.ac +=================================================================== +--- yate.orig/configure.ac ++++ yate/configure.ac +@@ -257,7 +257,7 @@ AC_TRY_COMPILE([ + #include + ],[ + pthread_mutexattr_t attr; +-pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE_NP); ++pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); + ], + have_mutex_settype="yes", + have_mutex_settype="no" diff --git a/net/yate/patches/110-no-libnsl.patch b/net/yate/patches/110-no-libnsl.patch new file mode 100644 index 00000000000..1a1660aff37 --- /dev/null +++ b/net/yate/patches/110-no-libnsl.patch @@ -0,0 +1,13 @@ +Index: yate/configure.ac +=================================================================== +--- yate.orig/configure.ac ++++ yate/configure.ac +@@ -689,7 +689,7 @@ if [[ "x$local_lib" != "xlib" -a ! -d "$ + fi + if [[ -f "$ac_cv_use_mysql/include/mysql/mysql.h" -a -d "$ac_cv_use_mysql/$local_lib/mysql" ]]; then + MYSQL_INC="-I$ac_cv_use_mysql/include/mysql" +-MYSQL_LIB="-L$ac_cv_use_mysql/$local_lib/mysql -lmysqlclient_r -lpthread -lz -lcrypt -lnsl -lm" ++MYSQL_LIB="-L$ac_cv_use_mysql/$local_lib/mysql -lmysqlclient_r -lpthread -lz -lcrypt -lm" + MYSQL_VER=`sed -n 's/^.*MYSQL_SERVER_VERSION[[^"]]*"\([[^"]]*\).*$/\1/p' "$ac_cv_use_mysql/include/mysql/mysql_version.h"` + HAVE_MYSQL=yes + fi