Merge pull request #177 from micmac1/master
authorJiri Slachta <jiri.slachta@gmail.com>
Thu, 10 Aug 2017 07:32:30 +0000 (09:32 +0200)
committerGitHub <noreply@github.com>
Thu, 10 Aug 2017 07:32:30 +0000 (09:32 +0200)
New PR: asterisk + pjproject

libs/pjproject/Makefile
libs/pjproject/patches/150-config_site.patch [new file with mode: 0644]
net/asterisk-13.x/Makefile
net/asterisk-13.x/patches/054-pjsip_unresolved_symbol.patch [new file with mode: 0644]
net/asterisk-g72x/Makefile
net/chan-sccp-b/Makefile

index 34eb86711a4e5a2a0f71f868ef471067b8c1486b..0d2a299bd36d46ba2f9d41adcc33f126e79debce 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pjproject
 PKG_VERSION:=2.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
@@ -32,7 +32,7 @@ define Package/pjproject/Default
   CATEGORY:=Libraries
   SUBMENU:=Telephony
   URL:=http://www.pjsip.org/
-  DEPENDS:=+libuuid +libstdcpp +libpthread
+  DEPENDS:=+libopenssl +libuuid +libstdcpp +libpthread
 endef
 
 define Package/pjproject/install/lib
@@ -55,37 +55,36 @@ $(call Package/pjproject/install/lib,$$(1),$2)
 endef
 
 CONFIGURE_ARGS += \
-       --enable-shared \
-       --disable-floating-point \
-       --enable-g711-codec \
-       --disable-l16-codec \
+       $(if $(CONFIG_SOFT_FLOAT),--disable-floating-point) \
+       --disable-ext-sound \
+       --disable-ffmpeg \
+       --disable-g711-codec \
        --disable-g722-codec \
        --disable-g7221-codec \
        --disable-gsm-codec \
-       --disable-ilbc-coder \
+       --disable-ilbc-codec \
        --disable-ipp \
-       --disable-ssl \
-       --disable-oss \
-       --disable-sound \
+       --disable-l16-codec \
        --disable-libwebrtc \
        --disable-libyuv \
-       --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-opencore-amr \
+       --disable-openh264 \
        --disable-opus \
-       --disable-resample-dll \
+       --disable-oss \
+       --disable-resample \
        --disable-sdl \
-       --disable-ffmpeg \
-       --disable-v4l2
+       --disable-silk \
+       --disable-sound \
+       --disable-speex-aec \
+       --disable-speex-codec \
+       --disable-v4l2 \
+       --disable-video \
+       --enable-shared \
+       --with-external-srtp="$(STAGING_DIR)/usr" \
+       --with-ssl="$(STAGING_DIR)/usr" \
+       --without-external-gsm \
+       --without-external-pa \
+       --without-external-webrtc
 
 TARGET_LDFLAGS+=-lc $(LIBGCC) -lm
 TARGET_CFLAGS+=$(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)
@@ -96,7 +95,7 @@ endef
 
 PJPROJECT_LIBS = \
        libpj libpjlib-util libpjmedia libpjnath libpjsip-simple \
-       libpjsip-ua libpjsip libpjsua libpjsua2 libresample
+       libpjsip-ua libpjsip libpjsua libpjsua2
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/{include,lib}
@@ -110,11 +109,10 @@ 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,libpjmedia,libpjmedia*,+libpj +libpjlib-util +libpjnath +librt +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,))
+$(eval $(call PJSIPpackage,libpjsip-simple,libpjsip-simple,+libpj +libpjlib-util +libpjsip +librt))
+$(eval $(call PJSIPpackage,libpjsip-ua,libpjsip-ua,+libpj +libpjlib-util +libpjmedia +libpjsip-simple +libpjsip +librt))
+$(eval $(call PJSIPpackage,libpjsip,libpjsip,+libpj +libpjlib-util +librt +libsrtp))
+$(eval $(call PJSIPpackage,libpjsua,libpjsua,+libpj +libpjlib-util +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +librt))
+$(eval $(call PJSIPpackage,libpjsua2,libpjsua2,+libpj +libpjlib-util +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +librt +libpjsua))
diff --git a/libs/pjproject/patches/150-config_site.patch b/libs/pjproject/patches/150-config_site.patch
new file mode 100644 (file)
index 0000000..5805137
--- /dev/null
@@ -0,0 +1,95 @@
+--- /dev/null
++++ b/pjlib/include/pj/config_site.h
+@@ -0,0 +1,92 @@
++/*
++ * Asterisk config_site.h
++ */
++
++#include <sys/select.h>
++
++/*
++ * Since both pjproject and asterisk source files will include config_site.h,
++ * we need to make sure that only pjproject source files include asterisk_malloc_debug.h.
++ */
++
++/* #if defined(MALLOC_DEBUG) && !defined(_ASTERISK_ASTMM_H)
++ * #include "asterisk_malloc_debug.h"
++ * #endif
++ */
++
++/*
++ * Defining PJMEDIA_HAS_SRTP to 0 does NOT disable Asterisk's ability to use srtp.
++ * It only disables the pjmedia srtp transport which Asterisk doesn't use.
++ * The reason for the disable is that while Asterisk works fine with older libsrtp
++ * versions, newer versions of pjproject won't compile with them.
++ */
++
++/*
++ * This doesn't disable SRTP completely, so we have to keep using the external
++ * libsrtp, otherwise pjsip would just build the internal one.
++ */
++
++#define PJMEDIA_HAS_SRTP 0
++
++/*
++ * Defining PJMEDIA_HAS_WEBRTC_AEC to 0 does NOT disable Asterisk's ability to use
++ * webrtc.  It only disables the pjmedia webrtc transport which Asterisk doesn't use.
++ */
++#define PJMEDIA_HAS_WEBRTC_AEC 0
++
++#define PJ_HAS_IPV6 1
++#define NDEBUG 1
++#define PJ_MAX_HOSTNAME (256)
++#define PJSIP_MAX_URL_SIZE (512)
++#ifdef PJ_HAS_LINUX_EPOLL
++#define PJ_IOQUEUE_MAX_HANDLES        (5000)
++#else
++#define PJ_IOQUEUE_MAX_HANDLES        (FD_SETSIZE)
++#endif
++#define PJ_IOQUEUE_HAS_SAFE_UNREG 1
++#define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL (16)
++
++#define PJ_SCANNER_USE_BITWISE        0
++#define PJ_OS_HAS_CHECK_STACK 0
++
++#ifndef PJ_LOG_MAX_LEVEL
++#define PJ_LOG_MAX_LEVEL              6
++#endif
++
++#define PJ_ENABLE_EXTRA_CHECK 1
++#define PJSIP_MAX_TSX_COUNT           ((64*1024)-1)
++#define PJSIP_MAX_DIALOG_COUNT        ((64*1024)-1)
++#define PJSIP_UDP_SO_SNDBUF_SIZE      (512*1024)
++#define PJSIP_UDP_SO_RCVBUF_SIZE      (512*1024)
++#define PJ_DEBUG                      0
++#define PJSIP_SAFE_MODULE             0
++#define PJ_HAS_STRICMP_ALNUM          0
++
++/*
++ * Do not ever enable PJ_HASH_USE_OWN_TOLOWER because the algorithm is
++ * inconsistently used when calculating the hash value and doesn't
++ * convert the same characters as pj_tolower()/tolower().  Thus you
++ * can get different hash values if the string hashed has certain
++ * characters in it.  (ASCII '@', '[', '\\', ']', '^', and '_')
++ */
++#undef PJ_HASH_USE_OWN_TOLOWER
++
++/*
++  It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined.
++  Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
++*/
++#undef PJSIP_UNESCAPE_IN_PLACE
++#define PJSIP_MAX_PKT_LEN                     6000
++
++#undef PJ_TODO
++#define PJ_TODO(x)
++
++/* Defaults too low for WebRTC */
++#define PJ_ICE_MAX_CAND 32
++#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)
++
++/* Increase limits to allow more formats */
++#define       PJMEDIA_MAX_SDP_FMT   64
++#define       PJMEDIA_MAX_SDP_BANDW   4
++#define       PJMEDIA_MAX_SDP_ATTR   (PJMEDIA_MAX_SDP_FMT*2 + 4)
++#define       PJMEDIA_MAX_SDP_MEDIA   16
index 49e0718da6a2d451244fc1a688f2efa0269f791d..a4b0cf6f9c034ffa18d54827ecd04d9356b0d9bf 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk13
 PKG_VERSION:=13.17.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
@@ -408,7 +408,7 @@ $(eval $(call BuildAsterisk13Module,pbx-dundi,Dundi,provides Dundi Lookup servic
 $(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 @!arc,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 +asterisk13-res-pjproject +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,pjsip,pjsip channel,the channel pjsip,+asterisk13-res-sorcery +asterisk13-res-pjproject +libpjsip +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsua +libpjsua2,pjsip.conf pjsip_notify.conf,chan_pjsip func_pjsip_aor func_pjsip_contact func_pjsip_endpoint res_pjsip res_pjsip_acl res_pjsip_authenticator_digest res_pjsip_caller_id res_pjsip_config_wizard res_pjsip_dialog_info_body_generator res_pjsip_diversion res_pjsip_dlg_options res_pjsip_dtmf_info res_pjsip_empty_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_history res_pjsip_log_forwarder res_pjsip_logger res_pjsip_messaging res_pjsip_multihomed res_pjsip_mwi res_pjsip_mwi_body_generator 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 res_pjsip_registrar_expire res_pjsip_rfc3326 res_pjsip_sdp_rtp res_pjsip_send_to_voicemail res_pjsip_session res_pjsip_sips_contact res_pjsip_t38 res_pjsip_transport_management res_pjsip_transport_websocket 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,+asterisk13-res-speech,,res_agi,,))
@@ -424,7 +424,8 @@ $(eval $(call BuildAsterisk13Module,res-monitor,Provide Monitor,Cryptographic Si
 $(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-pjproject,Bridge PJPROJECT to Asterisk logging,,+libpj +libpjlib-util +libpjmedia +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +libpjsua +libpjsua2 +libresample +libsrtp,pjproject.conf,res_pjproject,,))
+$(eval $(call BuildAsterisk13Module,res-pjsip-phoneprov,PJSIP Phone Provisioning,PJSIP Phone Provisioning,+asterisk13-pjsip +asterisk13-res-phoneprov,,res_pjsip_phoneprov_provider,,))
+$(eval $(call BuildAsterisk13Module,res-pjproject,Bridge PJPROJECT to Asterisk logging,,+libpj +libpjlib-util +libpjmedia +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +libpjsua +libpjsua2 +libsrtp,pjproject.conf,res_pjproject,,))
 $(eval $(call BuildAsterisk13Module,res-realtime,RealTime CLI,RealTime CLI,,,res_realtime,,))
 $(eval $(call BuildAsterisk13Module,res-rtp-asterisk,RTP stack,Supports RTP and RTCP with Symmetric RTP support for NAT traversal,+libpjsip +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsua +libpjsua2,rtp.conf,res_rtp_asterisk,,))
 $(eval $(call BuildAsterisk13Module,res-rtp-multicast,RTP multicast engine,Multicast RTP Engine,,,res_rtp_multicast,,))
diff --git a/net/asterisk-13.x/patches/054-pjsip_unresolved_symbol.patch b/net/asterisk-13.x/patches/054-pjsip_unresolved_symbol.patch
new file mode 100644 (file)
index 0000000..5708c00
--- /dev/null
@@ -0,0 +1,25 @@
+Description: Fix unresolved symbol ast_sip_session_unregister_supplement in PJSIP
+Origin: other, https://issues.asterisk.org/jira/secure/attachment/54695/ast.diff
+Bug: https://issues.asterisk.org/jira/browse/ASTERISK-26518
+
+--- a/res/res_pjsip/pjsip_message_ip_updater.c
++++ b/res/res_pjsip/pjsip_message_ip_updater.c
+@@ -362,15 +362,15 @@ void ast_res_pjsip_cleanup_message_ip_up
+ {
+       ast_sip_unregister_service(&multihomed_module);
+       ast_sip_unregister_supplement(&multihomed_supplement);
+-      ast_sip_session_unregister_supplement(&multihomed_session_supplement);
++      //ast_sip_session_unregister_supplement(&multihomed_session_supplement);
+ }
+ int ast_res_pjsip_init_message_ip_updater(void)
+ {
+-      if (ast_sip_session_register_supplement(&multihomed_session_supplement)) {
++      /*if (ast_sip_session_register_supplement(&multihomed_session_supplement)) {
+               ast_log(LOG_ERROR, "Could not register multihomed session supplement for outgoing requests\n");
+               return -1;
+-      }
++      }*/
+       if (ast_sip_register_supplement(&multihomed_supplement)) {
+               ast_log(LOG_ERROR, "Could not register multihomed supplement for outgoing requests\n");
index a5fd2acdc98cbb2a9389297e2080c45318e058dd..67c7ddbddde6dfd86d4a7e9584c3ff0cf7f6cfad 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk-g72x
 PKG_VERSION:=1.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=asterisk-g72x-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://asterisk.hosting.lv/src/
@@ -23,6 +23,8 @@ PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=README.md
 PKG_MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/asterisk-g72x/Default
index e78e64ad39be749cc4017d05650e96564584a9b0..31a4a147f9cce12dca1713a82c77df7400ed794a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016 OpenWrt.org
+# Copyright (C) 2016 - 2017 OpenWrt.org
 # Copyright (C) 2016 Cesnet, z.s.p.o.
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=chan-sccp-b
 PKG_REV:=6728
 PKG_VERSION:=v4.2.3-r$(PKG_REV)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/branches/v4.2
@@ -27,6 +27,8 @@ PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
 
 PKG_INSTALL:=1
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/chan-sccp-b/Default
@@ -35,7 +37,8 @@ define Package/chan-sccp-b/Default
   CATEGORY:=Network
   TITLE:=SCCP channel provider support
   URL:=http://chan-sccp-b.sourceforge.net/
-  DEPENDS:= +libltdl
+  DEPENDS:=+libltdl
+  PKG_BUILD_DEPENDS:=libiconv
 endef
 
 define Package/asterisk13-chan-sccp-b
@@ -61,8 +64,8 @@ Package/asterisk11-chan-sccp-b/description = $(Package/description/Default)
 Package/asterisk13-chan-sccp-b/description = $(Package/description/Default)
 
 CONFIGURE_ARGS += \
-       --enable-debug=no \
-       --enable-optimization=no \
+       --enable-static \
+       --enable-section-relocation \
        --enable-conference \
        --enable-advanced-functions \
        --enable-video