From 2aadbfd000bf4c9013392a77adbaed8f1f88c46b Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Tue, 11 Sep 2007 06:37:56 +0000 Subject: [PATCH] update asterisk 1.2.x to 1.2.24, cleanup SVN-Revision: 8739 --- net/asterisk/Makefile | 572 +++++++++++++---------- net/asterisk/files/asterisk.default | 2 +- net/asterisk/files/asterisk.init | 15 +- net/asterisk/files/modules.conf | 24 +- net/asterisk/patches/002-dns.patch | 14 +- net/asterisk/patches/020-chan_h323.patch | 25 +- 6 files changed, 376 insertions(+), 276 deletions(-) diff --git a/net/asterisk/Makefile b/net/asterisk/Makefile index 1561f9b3e5..d048cd9d9e 100644 --- a/net/asterisk/Makefile +++ b/net/asterisk/Makefile @@ -9,355 +9,339 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk -PKG_VERSION:=1.2.16 +PKG_VERSION:=1.2.24 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/old-releases/ \ ftp://ftp.digium.com/pub/asterisk/old-releases -PKG_MD5SUM:=88cfcd5c3b2a8f2504e561cb93546299 -PKG_CAT:=zcat +PKG_MD5SUM:=63dc8b7be4cd10375c5fbda893c780bc -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PKG_BUILD_DEPENDS:= openh323 pwlib include $(INCLUDE_DIR)/package.mk define Package/asterisk/Default + SUBMENU:=asterisk (Complete Open Source PBX), v1.2.x SECTION:=net CATEGORY:=Network - 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. URL:=http://www.asterisk.org/ - SUBMENU:=asterisk (Complete Open Source PBX) endef +define Package/asterisk/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/asterisk - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=+libncurses +libpthread TITLE:=Complete Open Source PBX endef -define Package/asterisk/conffiles -/etc/asterisk/asterisk.conf -/etc/asterisk/agents.conf -/etc/asterisk/alarmreceiver.conf -/etc/asterisk/cdr_manager.conf -/etc/asterisk/codecs.conf -/etc/asterisk/enum.conf -/etc/asterisk/extconfig.conf -/etc/asterisk/extensions.conf -/etc/asterisk/features.conf -/etc/asterisk/iax.conf -/etc/asterisk/iaxprov.conf -/etc/asterisk/indications.conf -/etc/asterisk/logger.conf -/etc/asterisk/manager.conf -/etc/asterisk/modules.conf -/etc/asterisk/musiconhold.conf -/etc/asterisk/osp.conf -/etc/asterisk/privacy.conf -/etc/asterisk/queues.conf -/etc/asterisk/rtp.conf -/etc/asterisk/sip.conf +define Package/asterisk/description +$(call Package/asterisk/Default/description) endef + define Package/asterisk-mini - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=+libncurses +libpthread PROVIDES:=asterisk TITLE:=Minimal Open Source PBX - DESCRIPTION+=\\\ - \\\ - This package contains only the following modules: \\\ - - app_dial\\\ - - chan_iax2\\\ - - chan_local\\\ - - chan_sip\\\ - - codec_gsm\\\ - - codec_ulaw\\\ - - format_gsm\\\ - - format_pcm\\\ - - format_wav\\\ - - format_wav_gsm\\\ - - pbx_config\\\ - - res_features\\\ - - res_musiconhold endef -define Package/asterisk-mini/conffiles -/etc/asterisk/asterisk.conf -/etc/asterisk/enum.conf -/etc/asterisk/extconfig.conf -/etc/asterisk/extensions.conf -/etc/asterisk/features.conf -/etc/asterisk/iax.conf -/etc/asterisk/iaxprov.conf -/etc/asterisk/logger.conf -/etc/asterisk/manager.conf -/etc/asterisk/modules.conf -/etc/asterisk/musiconhold.conf -/etc/asterisk/rtp.conf -/etc/asterisk/sip.conf +define Package/asterisk-mini/description +$(call Package/asterisk/Default/description) + This package contains only the following modules: + - app_dial + - chan_iax2 + - chan_local + - chan_sip + - codec_gsm + - codec_ulaw + - format_gsm + - format_pcm + - format_wav + - format_wav_gsm + - pbx_config + - res_features + - res_musiconhold endef + define Package/asterisk-mysql - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk +libmysqlclient TITLE:=MySQL support - DESCRIPTION+=\\\ - \\\ - This package contains MySQL support modules for Asterisk. endef -define Package/asterisk-mysql/conffiles -/etc/asterisk/cdr_mysql.conf +define Package/asterisk-mysql/description +$(call Package/asterisk/Default/description) + This package contains MySQL support modules for Asterisk. endef + define Package/asterisk-pgsql - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk +libpq TITLE:=PostgreSQL support - DESCRIPTION+=\\\ - \\\ - This package contains PostgreSQL support modules for Asterisk. endef -define Package/asterisk-pgsql/conffiles -/etc/asterisk/cdr_pgsql.conf +define Package/asterisk-pgsql/description +$(call Package/asterisk/Default/description) + This package contains PostgreSQL support modules for Asterisk. endef + define Package/asterisk-sqlite - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk +libsqlite2 TITLE:=SQLite modules - DESCRIPTION+=\\\ - \\\ - This package contains SQLite support modules for Asterisk. endef +define Package/asterisk-sqlite/description +$(call Package/asterisk/Default/description) + This package contains SQLite support modules for Asterisk. +endef + + define Package/asterisk-sounds - $(call Package/asterisk) - MENU:=0 +$(call Package/asterisk/Default) DEPENDS:=asterisk TITLE:=Sound files - DESCRIPTION+=\\\ - \\\ - This package contains sound files for Asterisk. endef +define Package/asterisk-sounds/description +$(call Package/asterisk/Default/description) + This package contains sound files for Asterisk. +endef + + define Package/asterisk-voicemail $(call Package/asterisk/Default) DEPENDS:=asterisk TITLE:=Voicemail support - DESCRIPTION+=\\\ - \\\ - This package contains voicemail related modules for Asterisk. endef -define Package/asterisk-voicemail/conffiles -/etc/asterisk/voicemail.conf +define Package/asterisk-voicemail/description +$(call Package/asterisk/Default/description) + This package contains voicemail related modules for Asterisk. endef + define Package/asterisk-app-meetme - $(call Package/asterisk/Default) - DEPENDS:=asterisk +zaptel-libtonezone +$(call Package/asterisk/Default) + DEPENDS:=asterisk +zaptel-libtonezone @BROKEN TITLE:=MeetMe Confererencing support - DESCRIPTION+=\\\ - \\\ - This package provides the application MeetMe and conferencing support to \\\ - Asterisk. endef -define Package/asterisk-app-meetme/conffiles -/etc/asterisk/meetme.conf +define Package/asterisk-app-meetme/description +$(call Package/asterisk/Default/description) + This package provides the application MeetMe and conferencing support to + Asterisk. endef + define Package/asterisk-chan-bluetooth - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk +bluez-libs - TITLE:=Bluetooth HandsFreeProfile support for Asterisk - DESCRIPTION+=\\\ - \\\ - This package provides Bluetooth HandsFreeProfile support to Asterisk. + TITLE:=Bluetooth HandsFreeProfile support endef -define Package/asterisk-chan-bluetooth/conffiles -/etc/asterisk/bluetooth.conf +define Package/asterisk-chan-bluetooth/description +$(call Package/asterisk/Default/description) + This package provides Bluetooth HandsFreeProfile support to Asterisk. endef + define Package/asterisk-chan-h323 - $(call Package/asterisk/Default) - DEPENDS:=asterisk +libopenh323 +uclibcxx - TITLE:=H.323 support for Asterisk - DESCRIPTION+=\\\ - \\\ - This package provides H.323 support to Asterisk. +$(call Package/asterisk/Default) + DEPENDS:=asterisk +uclibcxx + TITLE:=H.323 support endef -define Package/asterisk-chan-h323/conffiles -/etc/asterisk/h323.conf +define Package/asterisk-chan-h323/description +$(call Package/asterisk/Default/description) + This package provides H.323 support to Asterisk. endef + define Package/asterisk-chan-mgcp - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk TITLE:=MGCP support - DESCRIPTION+=\\\ - \\\ - This package provides MGCP (Media Gateway Control Protocol) support \\\ - to Asterisk. endef -define Package/asterisk-chan-mgcp/conffiles -/etc/asterisk/mgcp.conf +define Package/asterisk-chan-mgcp/description +$(call Package/asterisk/Default/description) + This package provides MGCP (Media Gateway Control Protocol) support + to Asterisk. endef + define Package/asterisk-chan-oss - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk - TITLE:=chan-oss - DESCRIPTION+=\\\ - \\\ - Channel driver for OSS sound cards + TITLE:=OSS soundcards support endef -define Package/asterisk-chan-oss/conffiles -/etc/asterisk/oss.conf +define Package/asterisk-chan-oss/description +$(call Package/asterisk/Default/description) + Channel driver for OSS soundcards endef + define Package/asterisk-chan-skinny - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk TITLE:=Skinny Client Control Protocol support - DESCRIPTION+=\\\ - \\\ - This package provided Skinny Client Control Protocol support to \\\ - Asterisk. endef -define Package/asterisk-chan-skinny/conffiles -/etc/asterisk/skinny.conf +define Package/asterisk-chan-skinny/description +$(call Package/asterisk/Default/description) + This package provided Skinny Client Control Protocol support to + Asterisk. endef + define Package/asterisk-codec-ilbc - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk TITLE:=ILBC Translator - DESCRIPTION+=\\\ - \\\ - This package contains the ILBC (Internet Low Bitrate Codec) translator \\\ - for Asterisk. endef +define Package/asterisk-codec-ilbc/description +$(call Package/asterisk/Default/description) + This package contains the ILBC (Internet Low Bitrate Codec) translator + for Asterisk. +endef + + define Package/asterisk-codec-lpc10 - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk TITLE:=LPC10 2.4kbps voice codec Translator - DESCRIPTION+=\\\ - \\\ - This package contains the LPC10 (Linear Predictor Code) 2.4kbps voice \\\ - codec translator for Asterisk. endef +define Package/asterisk-codec-lpc10/description +$(call Package/asterisk/Default/description) + This package contains the LPC10 (Linear Predictor Code) 2.4kbps voice + codec translator for Asterisk. +endef + + define Package/asterisk-codec-speex - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk +libspeex TITLE:=Speex/PCM16 Codec Translator - DESCRIPTION+=\\\ - \\\ - This package contains the Speex speech compression codec translator for \\\ - Asterisk. endef +define Package/asterisk-codec-speex/description +$(call Package/asterisk/Default/description) + This package contains the Speex speech compression codec translator for + Asterisk. +endef + + define Package/asterisk-pbx-dundi - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk TITLE:=DUNDi support - DESCRIPTION+=\\\ - \\\ - This package provides DUNDi (Distributed Universal Number Discovery) \\\ - support to Asterisk. endef -define Package/asterisk-pbx-dundi/conffiles -/etc/asterisk/dundi.conf +define Package/asterisk-pbx-dundi/description +$(call Package/asterisk/Default/description) + This package provides DUNDi (Distributed Universal Number Discovery) + support to Asterisk. endef + define Package/asterisk-res-agi - $(call Package/asterisk/Default) +$(call Package/asterisk/Default) DEPENDS:=asterisk TITLE:=AGI support - DESCRIPTION+=\\\ - \\\ - This package provides AGI (Asterisk Gateway Interface) support to \\\ - Asterisk. endef +define Package/asterisk-res-agi/description +$(call Package/asterisk/Default/description) + This package provides AGI (Asterisk Gateway Interface) support to + Asterisk. +endef + + define Package/asterisk-res-crypto $(call Package/asterisk/Default) DEPENDS:=asterisk +libopenssl TITLE:=Cryptographic Digital Signatures support - DESCRIPTION+=\\\ - \\\ - This package provides Cryptographic Digital Signatures support to \\\ - Asterisk. endef +define Package/asterisk-res-crypto/description +$(call Package/asterisk/Default/description) + This package provides Cryptographic Digital Signatures support to + Asterisk. +endef -EXTRA_CFLAGS:= -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -EXTRA_LDFLAGS:= -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-mysql),) - EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/mysql - EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql - EXTRA_APP_MODULES+= app_sql_mysql.so - EXTRA_CDR_MODULES+= cdr_mysql.so - EXTRA_RES_MODULES+= res_config_mysql.so -endif -ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-pgsql),) - EXTRA_APP_MODULES+= app_sql_postgres.so - EXTRA_CDR_MODULES+= cdr_pgsql.so -endif -ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-sqlite),) - EXTRA_CDR_MODULES+= cdr_sqlite.so -endif +EXTRA_CFLAGS:= $(TARGET_CPPFLAGS) +EXTRA_LDFLAGS:= $(TARGET_LDFLAGS) + ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-app-meetme),) EXTRA_APP_MODULES+= app_meetme.so endif + ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-chan-bluetooth),) EXTRA_CHAN_MODULES+= chan_bluetooth.so endif + ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-chan-h323),) EXTRA_DEFINES+= \ OPENH323DIR="$(BUILD_DIR)/openh323" \ PWLIBDIR="$(BUILD_DIR)/pwlib" \ - CXXLIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc" + CXXLIBS="-nodefaultlibs -luClibc++" EXTRA_CHAN_MODULES+= chan_h323.so + + define Build/Compile/chan-h323 + $(MAKE) -C "$(PKG_BUILD_DIR)/channels/h323" \ + $(TARGET_CONFIGURE_OPTS) \ + $(EXTRA_DEFINES) \ + optnoshared + endef endif + ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-codec-speex),) EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/speex EXTRA_CODEC_MODULES+= codec_speex.so endif + ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-res-crypto),) EXTRA_RES_MODULES+= res_crypto.so endif -define Build/Configure -endef +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-mysql),) + EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/mysql + EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql + EXTRA_APP_MODULES+= app_sql_mysql.so + EXTRA_CDR_MODULES+= cdr_mysql.so + EXTRA_RES_MODULES+= res_config_mysql.so +endif -ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-chan-h323),) - define Build/Compile/chan-h323 - $(MAKE) -C "$(PKG_BUILD_DIR)/channels/h323" \ - $(TARGET_CONFIGURE_OPTS) \ - $(EXTRA_DEFINES) \ - optnoshared - endef +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-pgsql),) + EXTRA_APP_MODULES+= app_sql_postgres.so + EXTRA_CDR_MODULES+= cdr_pgsql.so +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-sqlite),) + EXTRA_CDR_MODULES+= cdr_sqlite.so endif + +define Build/Configure +endef + define Build/Compile $(call Build/Compile/chan-h323) $(MAKE) -C "$(PKG_BUILD_DIR)" \ @@ -371,7 +355,6 @@ define Build/Compile PROC="$(ARCH)" \ DEBUG="" \ OPTIONS="-DLOW_MEMORY -Dlinux" \ - NOCRYPTO="yes" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ EXTRA_LDFLAGS="$(EXTRA_LDFLAGS)" \ EXTRA_APP_MODULES="$(EXTRA_APP_MODULES)" \ @@ -387,6 +370,41 @@ define Build/Compile rm -f $(PKG_INSTALL_DIR)/etc/asterisk/*.old endef +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk \ + $(STAGING_DIR)/usr/include/ +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/asterisk +endef + + +define Package/asterisk/conffiles +/etc/asterisk/asterisk.conf +/etc/asterisk/agents.conf +/etc/asterisk/alarmreceiver.conf +/etc/asterisk/cdr_manager.conf +/etc/asterisk/codecs.conf +/etc/asterisk/enum.conf +/etc/asterisk/extconfig.conf +/etc/asterisk/extensions.conf +/etc/asterisk/features.conf +/etc/asterisk/iax.conf +/etc/asterisk/iaxprov.conf +/etc/asterisk/indications.conf +/etc/asterisk/logger.conf +/etc/asterisk/manager.conf +/etc/asterisk/modules.conf +/etc/asterisk/musiconhold.conf +/etc/asterisk/osp.conf +/etc/asterisk/privacy.conf +/etc/asterisk/queues.conf +/etc/asterisk/rtp.conf +/etc/asterisk/sip.conf +endef + define Package/asterisk/install $(CP) $(PKG_INSTALL_DIR)/* $(1) rm -rf $(1)/usr/sbin/astgenkey @@ -403,7 +421,7 @@ define Package/asterisk/install cd modules; \ rm -rf *adsi* *festival* *modem* *meetme* *oss* *phone* *intercom* \ *mp3* *nbscat* *mysql* *postgres* *pgsql* *voicemail* *speex* \ - *zapateller* *jpeg*; \ + *zap* *jpeg*; \ rm -f chan_bluetooth.so ; \ rm -f chan_h323.so ; \ rm -f chan_mgcp.so ; \ @@ -432,9 +450,27 @@ define Package/asterisk/install $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk endef + +define Package/asterisk-mini/conffiles +/etc/asterisk/asterisk.conf +/etc/asterisk/enum.conf +/etc/asterisk/extconfig.conf +/etc/asterisk/extensions.conf +/etc/asterisk/features.conf +/etc/asterisk/iax.conf +/etc/asterisk/iaxprov.conf +/etc/asterisk/logger.conf +/etc/asterisk/manager.conf +/etc/asterisk/modules.conf +/etc/asterisk/musiconhold.conf +/etc/asterisk/rtp.conf +/etc/asterisk/sip.conf +endef + define Package/asterisk-mini/install $(INSTALL_DIR) $(1)/etc/asterisk - for f in asterisk enum extconfig extensions features iax iaxprov logger manager modules musiconhold rtp sip; do \ + for f in asterisk enum extconfig extensions features iax iaxprov \ + logger manager modules musiconhold rtp sip; do \ $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \ done $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/ @@ -442,8 +478,9 @@ define Package/asterisk-mini/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(1)/usr/lib/asterisk/ $(INSTALL_DIR) $(1)/usr/lib/asterisk/keys $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - for f in app_dial chan_iax2 chan_local chan_sip codec_gsm codec_ulaw format_gsm format_pcm format_wav \ - format_wav_gsm pbx_config res_features res_musiconhold; do \ + for f in app_dial chan_iax2 chan_local chan_sip codec_gsm \ + codec_ulaw format_gsm format_pcm format_wav format_wav_gsm \ + pbx_config res_features res_musiconhold; do \ $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \ done $(INSTALL_DIR) $(1)/usr/lib/asterisk/mohmp3 @@ -457,42 +494,9 @@ define Package/asterisk-mini/install $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk endef -define Package/asterisk-mysql/install - $(INSTALL_DIR) $(1)/etc/asterisk - $(INSTALL_CONF) $(PKG_BUILD_DIR)/configs/cdr_mysql.conf.sample $(1)/etc/asterisk/cdr_mysql.conf - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/app_sql_mysql.so $(1)/usr/lib/asterisk/modules/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_mysql.so $(1)/usr/lib/asterisk/modules/ -endef - -define Package/asterisk-pgsql/install - $(INSTALL_DIR) $(1)/etc/asterisk - $(INSTALL_CONF) $(PKG_BUILD_DIR)/configs/cdr_pgsql.conf.sample $(1)/etc/asterisk/cdr_pgsql.conf - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/app_sql_postgres.so $(1)/usr/lib/asterisk/modules/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_pgsql.so $(1)/usr/lib/asterisk/modules/ -endef - -define Package/asterisk-sqlite/install - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_sqlite.so $(1)/usr/lib/asterisk/modules/ -endef - -define Package/asterisk-sounds/install - $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds - $(CP) $(PKG_BUILD_DIR)/sounds/* $(1)/usr/lib/asterisk/sounds/ - rm -f $(1)/usr/lib/asterisk/sounds/*.mp3 - rm -f $(1)/usr/lib/asterisk/sounds/vm-* -endef -define Package/asterisk-voicemail/install - $(INSTALL_DIR) $(1)/etc/asterisk - $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/voicemail.conf.sample $(1)/etc/asterisk/voicemail.conf - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/*voicemail.so $(1)/usr/lib/asterisk/modules/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/res/res_adsi.so $(1)/usr/lib/asterisk/modules/ - $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds - $(CP) $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(1)/usr/lib/asterisk/sounds/ +define Package/asterisk-app-meetme/conffiles +/etc/asterisk/meetme.conf endef define Package/asterisk-app-meetme/install @@ -502,6 +506,11 @@ define Package/asterisk-app-meetme/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/app_meetme.so $(1)/usr/lib/asterisk/modules/ endef + +define Package/asterisk-chan-bluetooth/conffiles +/etc/asterisk/bluetooth.conf +endef + define Package/asterisk-chan-bluetooth/install $(INSTALL_DIR) $(1)/etc/asterisk $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/bluetooth.conf $(1)/etc/asterisk/bluetooth.conf @@ -509,6 +518,12 @@ define Package/asterisk-chan-bluetooth/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_bluetooth.so $(1)/usr/lib/asterisk/modules/ endef + +define Package/asterisk-chan-h323/conffiles +/etc/asterisk/h323.conf +endef + + define Package/asterisk-chan-h323/install $(INSTALL_DIR) $(1)/etc/asterisk $(INSTALL_DATA) $(PKG_BUILD_DIR)/channels/h323/h323.conf.sample $(1)/etc/asterisk/h323.conf @@ -516,6 +531,11 @@ define Package/asterisk-chan-h323/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_h323.so $(1)/usr/lib/asterisk/modules/ endef + +define Package/asterisk-chan-mgcp/conffiles +/etc/asterisk/mgcp.conf +endef + define Package/asterisk-chan-mgcp/install $(INSTALL_DIR) $(1)/etc/asterisk $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/mgcp.conf.sample $(1)/etc/asterisk/mgcp.conf @@ -523,6 +543,11 @@ define Package/asterisk-chan-mgcp/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_mgcp.so $(1)/usr/lib/asterisk/modules/ endef + +define Package/asterisk-chan-oss/conffiles +/etc/asterisk/oss.conf +endef + define Package/asterisk-chan-oss/install $(INSTALL_DIR) $(1)/etc/asterisk $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/oss.conf.sample $(1)/etc/asterisk/oss.conf @@ -530,6 +555,11 @@ define Package/asterisk-chan-oss/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_oss.so $(1)/usr/lib/asterisk/modules/ endef + +define Package/asterisk-chan-skinny/conffiles +/etc/asterisk/skinny.conf +endef + define Package/asterisk-chan-skinny/install $(INSTALL_DIR) $(1)/etc/asterisk $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/skinny.conf.sample $(1)/etc/asterisk/skinny.conf @@ -537,22 +567,30 @@ define Package/asterisk-chan-skinny/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_skinny.so $(1)/usr/lib/asterisk/modules/ endef + define Package/asterisk-code-ilbc/install $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules $(INSTALL_BIN) $(PKG_BUILD_DIR)/codecs/codec_ilbc.so $(1)/usr/lib/asterisk/modules/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/formats/format_ilbc.so $(1)/usr/lib/asterisk/modules/ endef + define Package/asterisk-codec-lpc10/install $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules $(INSTALL_BIN) $(PKG_BUILD_DIR)/codecs/codec_lpc10.so $(1)/usr/lib/asterisk/modules/ endef + define Package/asterisk-codec-speex/install $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules $(INSTALL_BIN) $(PKG_BUILD_DIR)/codecs/codec_speex.so $(1)/usr/lib/asterisk/modules/ endef + +define Package/asterisk-pbx-dundi/conffiles +/etc/asterisk/dundi.conf +endef + define Package/asterisk-pbx-dundi/install $(INSTALL_DIR) $(1)/etc/asterisk $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/dundi.conf.sample $(1)/etc/asterisk/dundi.conf @@ -560,33 +598,76 @@ define Package/asterisk-pbx-dundi/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/pbx/pbx_dundi.so $(1)/usr/lib/asterisk/modules/ endef + define Package/asterisk-res-agi/install $(INSTALL_DIR) $(1)/usr/lib/asterisk/agi-bin $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules $(INSTALL_BIN) $(PKG_BUILD_DIR)/res/res_agi.so $(1)/usr/lib/asterisk/modules/ endef + define Package/asterisk-res-crypto/install $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules $(INSTALL_BIN) $(PKG_BUILD_DIR)/res/res_crypto.so $(1)/usr/lib/asterisk/modules/ endef -define Build/InstallDev - mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk \ - $(STAGING_DIR)/usr/include/ + +define Package/asterisk-mysql/conffiles +/etc/asterisk/cdr_mysql.conf endef -define Build/UninstallDev - rm -rf $(STAGING_DIR)/usr/include/asterisk +define Package/asterisk-mysql/install + $(INSTALL_DIR) $(1)/etc/asterisk + $(INSTALL_CONF) $(PKG_BUILD_DIR)/configs/cdr_mysql.conf.sample $(1)/etc/asterisk/cdr_mysql.conf + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/app_sql_mysql.so $(1)/usr/lib/asterisk/modules/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_mysql.so $(1)/usr/lib/asterisk/modules/ +endef + + +define Package/asterisk-pgsql/conffiles +/etc/asterisk/cdr_pgsql.conf +endef + +define Package/asterisk-pgsql/install + $(INSTALL_DIR) $(1)/etc/asterisk + $(INSTALL_CONF) $(PKG_BUILD_DIR)/configs/cdr_pgsql.conf.sample $(1)/etc/asterisk/cdr_pgsql.conf + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/app_sql_postgres.so $(1)/usr/lib/asterisk/modules/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_pgsql.so $(1)/usr/lib/asterisk/modules/ +endef + + +define Package/asterisk-sqlite/install + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_sqlite.so $(1)/usr/lib/asterisk/modules/ +endef + + +define Package/asterisk-sounds/install + $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds + $(CP) $(PKG_BUILD_DIR)/sounds/* $(1)/usr/lib/asterisk/sounds/ + rm -f $(1)/usr/lib/asterisk/sounds/*.mp3 + rm -f $(1)/usr/lib/asterisk/sounds/vm-* +endef + + +define Package/asterisk-voicemail/conffiles +/etc/asterisk/voicemail.conf +endef + +define Package/asterisk-voicemail/install + $(INSTALL_DIR) $(1)/etc/asterisk + $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/voicemail.conf.sample $(1)/etc/asterisk/voicemail.conf + $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules + $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/*voicemail.so $(1)/usr/lib/asterisk/modules/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/res/res_adsi.so $(1)/usr/lib/asterisk/modules/ + $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds + $(CP) $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(1)/usr/lib/asterisk/sounds/ endef + $(eval $(call BuildPackage,asterisk)) -$(eval $(call BuildPackage,asterisk-mysql)) -$(eval $(call BuildPackage,asterisk-pgsql)) -$(eval $(call BuildPackage,asterisk-sqlite)) -$(eval $(call BuildPackage,asterisk-sounds)) -$(eval $(call BuildPackage,asterisk-voicemail)) $(eval $(call BuildPackage,asterisk-app-meetme)) $(eval $(call BuildPackage,asterisk-chan-bluetooth)) $(eval $(call BuildPackage,asterisk-chan-h323)) @@ -600,3 +681,8 @@ $(eval $(call BuildPackage,asterisk-pbx-dundi)) $(eval $(call BuildPackage,asterisk-res-agi)) $(eval $(call BuildPackage,asterisk-res-crypto)) $(eval $(call BuildPackage,asterisk-mini)) +$(eval $(call BuildPackage,asterisk-mysql)) +$(eval $(call BuildPackage,asterisk-pgsql)) +$(eval $(call BuildPackage,asterisk-sqlite)) +$(eval $(call BuildPackage,asterisk-sounds)) +$(eval $(call BuildPackage,asterisk-voicemail)) diff --git a/net/asterisk/files/asterisk.default b/net/asterisk/files/asterisk.default index bbcb3cc86a..c038dcd9f2 100644 --- a/net/asterisk/files/asterisk.default +++ b/net/asterisk/files/asterisk.default @@ -1,4 +1,4 @@ ## startup options for /etc/init.d/asterisk -ENABLE_ASTERISK="no" +DEST="" OPTIONS="" diff --git a/net/asterisk/files/asterisk.init b/net/asterisk/files/asterisk.init index 7abbd754ff..60217d336d 100644 --- a/net/asterisk/files/asterisk.init +++ b/net/asterisk/files/asterisk.init @@ -3,18 +3,19 @@ START=50 DEFAULT=/etc/default/asterisk -OPTIONS="" +DEST= +OPTIONS= start() { [ -f $DEFAULT ] && . $DEFAULT - [ -d /var/run ] || mkdir -p /var/run - [ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk - [ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk - [ -f /usr/lib/asterisk/astdb ] && mv /usr/lib/asterisk/astdb /var/spool/asterisk/astdb - [ -h /usr/lib/asterisk/astdb ] || ln -sf /var/spool/asterisk/astdb /usr/lib/asterisk/astdb + mkdir -p $DEST/var/run + mkdir -p $DEST/var/log/asterisk + mkdir -p $DEST/var/spool/asterisk + [ -f $DEST/usr/lib/asterisk/astdb ] && mv $DEST/usr/lib/asterisk/astdb $DEST/var/spool/asterisk/ + [ -h $DEST/usr/lib/asterisk/astdb ] || ln -sf $DEST/var/spool/asterisk/astdb $DEST/usr/lib/asterisk/ /usr/sbin/asterisk $OPTIONS } stop() { - [ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1 + [ -f $DEST/var/run/asterisk.pid ] && kill $(cat $DEST/var/run/asterisk.pid) >/dev/null 2>&1 } diff --git a/net/asterisk/files/modules.conf b/net/asterisk/files/modules.conf index 39703ac558..4ab93951c0 100644 --- a/net/asterisk/files/modules.conf +++ b/net/asterisk/files/modules.conf @@ -18,12 +18,12 @@ autoload=yes ;preload => res_odbc.so ;preload => res_config_odbc.so ; -noload => res_config_mysql.so ; -; -; load => res_features.so ; Call Parking Resource +noload => res_config_mysql.so ; +noload => res_crypto.so ; Cryptographic Digital Signatures +; load => res_features.so ; Call Parking Resource noload => res_indications.so ; Indications Configuration -noload => res_monitor.so ; Call Monitoring Resource -; load => res_musiconhold.so ; Music On Hold Resource +noload => res_monitor.so ; Call Monitoring Resource +; load => res_musiconhold.so ; Music On Hold Resource noload => cdr_csv.so ; Comma Separated Values CDR Backend noload => cdr_custom.so ; Customizable Comma Separated Values CDR Backend noload => cdr_manager.so ; Asterisk Call Manager CDR Backend @@ -33,6 +33,7 @@ noload => cdr_sqlite.so ; SQLite CDR Backend noload => chan_agent.so ; Agent Proxy Channel ; load => chan_iax2.so ; Inter Asterisk eXchange (Ver 2) ; load => chan_local.so ; Local Proxy Channel +noload => chan_oss.so ; Channel driver for OSS sound cards ; load => chan_sip.so ; Session Initiation Protocol (SIP) noload => codec_a_mu.so ; A-law and Mulaw direct Coder/Decoder noload => codec_adpcm.so ; Adaptive Differential PCM Coder/Decoder @@ -79,15 +80,16 @@ noload => app_groupcount.so ; Group Management Routines noload => app_ices.so ; Encode and Stream via icecast and ices noload => app_image.so ; Image Transmission Application noload => app_lookupblacklist.so ; Look up Caller*ID name/number from black -noload => app_lookupcidname.so ; Look up CallerID Name from local databas +noload => app_lookupcidname.so ; Look up CallerID Name from local database ; load => app_macro.so ; Extension Macros noload => app_math.so ; A simple math Application noload => app_md5.so ; MD5 checksum Application +noload => app_meetme.so ; MeetMe conferencing ; load => app_milliwatt.so ; Digital Milliwatt (mu-law) Test Application noload => app_mixmonitor.so ; Record a call and mix the audio during the recording noload => app_parkandannounce.so ; Call Parking and Announce Application ; load => app_playback.so ; Trivial Playback Application -noload => app_privacy.so ; Require phone number to be entered, if n +noload => app_privacy.so ; Require phone number to be entered noload => app_queue.so ; True Call Queueing noload => app_random.so ; Random goto noload => app_read.so ; Read Variable Application @@ -119,16 +121,16 @@ noload => app_userevent.so ; Custom User Event Application noload => app_waitforring.so ; Waits until first ring after time noload => app_waitforsilence.so ; Wait For Silence Application noload => app_while.so ; While Loops and Conditional Execution +noload => func_callerid.so ; Caller ID related dialplan functions +noload => func_enum.so ; ENUM Functions +noload => func_uri.so ; URI encoding / decoding functions noload => pbx_ael.so ; Asterisk Extension Language Compiler ; load => pbx_config.so ; Text Extension Configuration noload => pbx_functions.so ; Builtin dialplan functions noload => pbx_loopback.so ; Loopback Switch noload => pbx_realtime.so ; Realtime Switch noload => pbx_spool.so ; Outgoing Spool Support -noload => pbx_wilcalu.so ; Wil Cal U (Auto Dialer) -noload => func_callerid.so ; Caller ID related dialplan functions -noload => func_enum.so ; ENUM Functions -noload => func_uri.so ; URI encoding / decoding functions +noload => pbx_wilcalu.so ; Wil Cal U (Auto Dialer) ; ; Module names listed in "global" section will have symbols globally diff --git a/net/asterisk/patches/002-dns.patch b/net/asterisk/patches/002-dns.patch index e44d8d65f4..0a62d45c61 100644 --- a/net/asterisk/patches/002-dns.patch +++ b/net/asterisk/patches/002-dns.patch @@ -1,10 +1,10 @@ -diff -Nru asterisk-1.2.14.org/dns.c asterisk-1.2.14/dns.c ---- asterisk-1.2.14.org/dns.c 2005-11-29 19:24:39.000000000 +0100 -+++ asterisk-1.2.14/dns.c 2006-12-27 08:50:05.000000000 +0100 -@@ -175,7 +175,13 @@ - - #if defined(res_ninit) - #define HAS_RES_NINIT +diff -Nru asterisk-1.2.24.org/dns.c asterisk-1.2.24/dns.c +--- asterisk-1.2.24.org/dns.c 2007-07-16 22:46:58.000000000 +0200 ++++ asterisk-1.2.24/dns.c 2007-09-04 18:53:32.000000000 +0200 +@@ -237,7 +237,13 @@ + #if defined(res_ndestroy) + #define HAS_RES_NDESTROY + #endif -#else +#endif + diff --git a/net/asterisk/patches/020-chan_h323.patch b/net/asterisk/patches/020-chan_h323.patch index 9542452376..982826350b 100644 --- a/net/asterisk/patches/020-chan_h323.patch +++ b/net/asterisk/patches/020-chan_h323.patch @@ -1,15 +1,26 @@ -diff -Nru asterisk-1.2.14.org/channels/h323/Makefile asterisk-1.2.14/channels/h323/Makefile ---- asterisk-1.2.14.org/channels/h323/Makefile 2005-11-29 19:24:39.000000000 +0100 -+++ asterisk-1.2.14/channels/h323/Makefile 2006-12-27 09:22:09.000000000 +0100 -@@ -30,7 +30,7 @@ +diff -Nru asterisk-1.2.24.org/channels/Makefile asterisk-1.2.24/channels/Makefile +--- asterisk-1.2.24.org/channels/h323/Makefile 2007-03-06 16:17:16.000000000 +0100 ++++ asterisk-1.2.24/channels/h323/Makefile 2007-09-04 18:37:58.000000000 +0200 +@@ -21,9 +21,8 @@ + OPENH323DIR=$(HOME)/openh323 + endif + +-clean: +- rm -f *.so *.o .depend +- ++include $(OPENH323DIR)/openh323u.mak ++ + $(SOURCES):: $(SOURCES:.cxx=.cpp) + ln -f $< $@ + +@@ -31,7 +30,6 @@ touch $(SOURCES) libchanh323.a: $(OBJS) -- ar crv $@ $(OBJS) -+ $(AR) crv $@ $(OBJS) +- include $(OPENH323DIR)/openh323u.mak + ar crv $@ $(OBJS) Makefile.ast: FORCE - @echo H323CFLAGS = $(STDCCFLAGS) $(OPTCCFLAGS) $(CFLAGS) >$@.tmp diff -Nru asterisk-1.2.14.org/channels/Makefile asterisk-1.2.14/channels/Makefile --- asterisk-1.2.14.org/channels/Makefile 2006-08-17 23:57:19.000000000 +0200 +++ asterisk-1.2.14/channels/Makefile 2006-12-27 09:22:09.000000000 +0100 -- 2.30.2