asterisk-13.x: introduce new package
Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
This commit is contained in:
parent
b9d9d712bc
commit
cbd99498fd
7 changed files with 580 additions and 0 deletions
365
net/asterisk-13.x/Makefile
Normal file
365
net/asterisk-13.x/Makefile
Normal file
|
@ -0,0 +1,365 @@
|
||||||
|
#
|
||||||
|
# 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.2.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
|
||||||
|
PKG_MD5SUM:=36033a5faa2f0f9ac3bc34b799e823a2
|
||||||
|
|
||||||
|
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 <slachta@cesnet.cz>
|
||||||
|
|
||||||
|
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,$(6),/etc/asterisk/$(c))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/asterisk13-$(1)/description
|
||||||
|
$$(call Package/asterisk13/Default/description)
|
||||||
|
This package provides support $(3) in Asterisk.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/asterisk13-$(1)/install
|
||||||
|
$(foreach c,$(6),$(call Package/asterisk13/install/conffile,$$(1),$(c));)
|
||||||
|
$(foreach m,$(7),$(call Package/asterisk13/install/module,$$(1),$(m));)
|
||||||
|
$(foreach s,$(8),$(call Package/asterisk13/install/sounds,$$(1),$(s));)
|
||||||
|
$(foreach b,$(9),$(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 +libsqlite3 +libstdcpp +libuuid +libxml2 +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/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
|
||||||
|
|
||||||
|
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
|
||||||
|
$(call Package/asterisk13/Default/description)
|
||||||
|
This package provides sounds for Asterisk.
|
||||||
|
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 \
|
||||||
|
--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
|
||||||
|
|
||||||
|
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))
|
||||||
|
|
||||||
|
################################
|
||||||
|
# AST modules
|
||||||
|
# Params:
|
||||||
|
# 1 - Package subname
|
||||||
|
# 2 - Package title
|
||||||
|
# 3 - Module description
|
||||||
|
# 4 - Module dependencies
|
||||||
|
# 5 - Configuration 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-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-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-minivm,Minimal voicemail system,a voicemail system in small building blocks working together based on the Comedian Mail voicemail,,/etc/asterisk/extensions_minivm.conf /etc/asterisk/minivm.conf,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,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.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,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-ulaw,Signed linear to ulaw translation,translation between signed linear and ulaw codecs,,,,codec_ulaw,))
|
||||||
|
$(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,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-sln,Raw slinear format,support for raw slinear format,,,,format_sln,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,format-pcm,PCM format,support for PCM format,,,,format_pcm,))
|
||||||
|
$(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-cut,CUT function,CUT function,,,,func_cut,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,func-db,Database interaction,functions for interaction with the database,,,,func_db,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,func-devstate,Blinky lights control,functions for manually controlled blinky lights,,,,func_devstate,))
|
||||||
|
$(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-channel,Channel info,Channel info dialplan function,,,,func_channel,))
|
||||||
|
$(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,chan-iax2,IAX2 channel,IAX support,+asterisk13-res-timing-timerfd,/etc/asterisk/iax.conf /etc/asterisk/iaxprov.conf,iax.conf iaxprov.conf,chan_iax2,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,pjsip,pjsip channel,the channel pjsip,+asterisk13-res-sorcery +libpjsip +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsua +libpjsua2,/etc/asterisk/pjsip.conf /etc/asterisk/pjsip_notify.conf,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,chan-skinny,Skinny channel,the channel chan_skinny,,/etc/asterisk/skinny.conf,skinny.conf,chan_skinny,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,chan-sip,SIP channel,the channel chan_sip,,/etc/asterisk/sip.conf /etc/asterisk/sip_notify.conf,sip.conf sip_notify.conf,chan_sip,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,chan-unistim,Unistim channel,channel driver for the UNISTIM (Unified Networks IP Stimulus) protocol,,/etc/asterisk/unistim.conf,unistim.conf,chan_unistim,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,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.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,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 BuildAsterisk13Module,pbx-ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic,,,extensions.ael,pbx_ael,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,pbx-spool,Call Spool,outgoing call spool support,,,,pbx_spool,))
|
||||||
|
$(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-clioriginate,Calls via CLI,Originate calls via the CLI,,,,res_clioriginate,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-monitor,Provide Monitor,Cryptographic Signature capability,,,,res_monitor,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-phoneprov,Phone Provisioning,Phone provisioning application for the asterisk internal http server,,/etc/asterisk/phoneprov.conf,phoneprov.conf,res_phoneprov,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-smdi,Provide SMDI,Simple Message Desk Interface capability,,/etc/asterisk/smdi.conf,smdi.conf,res_smdi,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-fax,FAX modules,Generic FAX resource for FAX technology resource modules,+asterisk13-res-timing-pthread,/etc/asterisk/res_fax.conf /etc/asterisk/udptl.conf,udptl.conf res_fax.conf,res_fax,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-musiconhold,MOH,Music On Hold support,,/etc/asterisk/musiconhold.conf,musiconhold.conf,res_musiconhold,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-http-websocket,HTTP websocket support,,,,,res_http_websocket,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-rtp-asterisk,RTP stack,,+libpjsip +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsua +libpjsua2,/etc/asterisk/rtp.conf,rtp.conf,res_rtp_asterisk,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-rtp-multicast,RTP multicast engine,,,,,res_rtp_multicast,))
|
||||||
|
$(eval $(call BuildAsterisk13Module,res-sorcery,Sorcery data layer,,,,,res_sorcery_astdb res_sorcery_config res_sorcery_memory res_sorcery_realtime,))
|
||||||
|
$(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,,/etc/asterisk/voicemail.conf,voicemail.conf,app_voicemail res_adsi res_smdi,vm-*))
|
4
net/asterisk-13.x/files/asterisk.default
Normal file
4
net/asterisk-13.x/files/asterisk.default
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
## startup options for /etc/init.d/asterisk
|
||||||
|
|
||||||
|
ENABLE_ASTERISK="yes"
|
||||||
|
OPTIONS=""
|
34
net/asterisk-13.x/files/asterisk.init
Normal file
34
net/asterisk-13.x/files/asterisk.init
Normal file
|
@ -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
|
||||||
|
}
|
22
net/asterisk-13.x/patches/001-disable-semaphores-check.patch
Normal file
22
net/asterisk-13.x/patches/001-disable-semaphores-check.patch
Normal file
|
@ -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 <semaphore.h>],
|
||||||
|
- [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
|
10
net/asterisk-13.x/patches/002-undef-res-ninit.patch
Normal file
10
net/asterisk-13.x/patches/002-undef-res-ninit.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -1177,7 +1177,6 @@ AC_LINK_IFELSE(
|
||||||
|
#include <resolv.h>],
|
||||||
|
[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(
|
13
net/asterisk-13.x/patches/003-disable-ast-xml-docs.patch
Normal file
13
net/asterisk-13.x/patches/003-disable-ast-xml-docs.patch
Normal file
|
@ -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 */
|
||||||
|
|
132
net/asterisk-13.x/patches/004-ifdef-missing-execinfo.patch
Normal file
132
net/asterisk-13.x/patches/004-ifdef-missing-execinfo.patch
Normal file
|
@ -0,0 +1,132 @@
|
||||||
|
--- a/include/asterisk/lock.h
|
||||||
|
+++ b/include/asterisk/lock.h
|
||||||
|
@@ -51,9 +51,11 @@
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
+#ifndef __UCLIBC__
|
||||||
|
#ifdef HAVE_BKTR
|
||||||
|
#include <execinfo.h>
|
||||||
|
#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) */
|
||||||
|
--- a/include/asterisk/utils.h
|
||||||
|
+++ b/include/asterisk/utils.h
|
||||||
|
@@ -25,7 +25,9 @@
|
||||||
|
|
||||||
|
#include "asterisk/network.h"
|
||||||
|
|
||||||
|
+#ifndef __UCLIBC__
|
||||||
|
#include <execinfo.h>
|
||||||
|
+#endif
|
||||||
|
#include <time.h> /* we want to override localtime_r */
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
@@ -514,13 +516,17 @@ extern void *_ast_mem_backtrace_buffer[_
|
||||||
|
* Ok, this sucks. But if we're already out of mem, we don't
|
||||||
|
* want the logger to create infinite recursion (and a crash).
|
||||||
|
*/
|
||||||
|
+#ifndef __UCLIBC__
|
||||||
|
#define MALLOC_FAILURE_MSG \
|
||||||
|
do { \
|
||||||
|
if (backtrace(_ast_mem_backtrace_buffer, _AST_MEM_BACKTRACE_BUFLEN) < _AST_MEM_BACKTRACE_BUFLEN) { \
|
||||||
|
ast_log(LOG_ERROR, "Memory Allocation Failure in function %s at line %d of %s\n", func, lineno, file); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
-
|
||||||
|
+#else
|
||||||
|
+#define MALLOC_FAILURE_MSG \
|
||||||
|
+ ast_log(LOG_ERROR, "Memory Allocation Failure (compiled without backtrace support)");
|
||||||
|
+#endif
|
||||||
|
/*!
|
||||||
|
* \brief A wrapper for malloc()
|
||||||
|
*
|
Loading…
Reference in a new issue