Index: head/net/asterisk13/Makefile =================================================================== --- head/net/asterisk13/Makefile (revision 427102) +++ head/net/asterisk13/Makefile (revision 427103) @@ -1,297 +1,294 @@ # $FreeBSD$ PORTNAME= asterisk -PORTVERSION= 13.12.2 +PORTVERSION= 13.13.0 CATEGORIES= net MASTER_SITES= http://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729 MASTER_SITE_SUBDIR= asterisk/ \ asterisk/old-releases/ \ sounds/releases/:g729 PKGNAMESUFFIX= 13 DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= madpilot@FreeBSD.org COMMENT= Open Source PBX and telephony toolkit LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid \ libjansson.so:devel/jansson EXTRACT_ONLY:= ${DISTNAME}${EXTRACT_SUFX} ONLY_FOR_ARCHS= i386 amd64 powerpc sparc64 armv6 USES= bison cpe gmake iconv libedit localbase \ shebangfix sqlite ssl ncurses USE_CSTD= gnu89 USE_GNOME= libxml2 USE_LDCONFIG= yes USE_RC_SUBR= asterisk GNU_CONFIGURE= yes CONFIGURE_ARGS+= --datarootdir=${DATADIR} \ --with-ilbc=internal \ --with-crypto=${OPENSSLBASE} \ --with-ssl=${OPENSSLBASE} CPE_VENDOR= digium SHEBANG_FILES= agi/agi-test.agi \ agi/jukebox.agi \ contrib/scripts/astversion MAKE_ENV= PTHREAD_LIBS="-lpthread" \ MKDIR="${MKDIR}" \ PWLIBDIR=${LOCALBASE}/share/pwlib \ OSVERSION=${OSVERSION} \ DOCSDIR=${DOCSDIR} \ ASTCFLAGS="${CFLAGS}" \ ASTLDFLAGS="${LDFLAGS}" MAKE_ARGS+= NOISY_BUILD=yes \ ASTDATADIR=${DATADIR} CONFLICTS= ossp-uuid-[0-9]* CONFLICTS_BUILD= linuxthreads-* CONFLICTS_INSTALL= asterisk*-1.8* asterisk*-11* OPTIONS_DEFINE= ASTVERSION BACKTRACE CURL EXCHANGE FREETDS LDAP LUA \ MP3PLAYER OOH323 OPTIMIZED_CFLAGS PJSIP PORTAUDIO RADIUS SNMP \ SPANDSP SRTP SYSINFO XMPP OPTIONS_DEFAULT= CURL FREETDS GSM LUA MP3PLAYER NEWT ODBC MYSQL PGSQL PJSIP \ PORTAUDIO RADIUS SNMP SPANDSP SPEEX SQLITE2 VORBIS OPTIONS_DEFINE_i386= DAHDI OPTIONS_DEFINE_amd64= DAHDI OPTIONS_DEFINE_sparc64= DAHDI OPTIONS_DEFAULT_i386= DAHDI BASE XMPP OPTIONS_DEFAULT_amd64= DAHDI BASE XMPP OPTIONS_DEFAULT_sparc64= DAHDI GCC XMPP OPTIONS_DEFAULT_powerpc= GCC XMPP OPTIONS_DEFAULT_armv6= BASE OPTIONS_GROUP= CODECS OPTIONS_GROUP_CODECS= GSM NEWG711 SPEEX VORBIS CODECS_DESC= Encoder/Decoder (Codec) Support OPTIONS_SINGLE= COMPILER OPTIONS_SINGLE_COMPILER= BASE GCC COMPILER_DESC= Compiler to use OPTIONS_GROUP+= DATABASE OPTIONS_GROUP_DATABASE= MYSQL ODBC PGSQL SQLITE2 DATABASE_DESC= Database Support OPTIONS_MULTI= MENU OPTIONS_MULTI_MENU= NCURSES NEWT MENU_DESC= Menuselect Interface Backend NEWT_DESC= Newt User Interface OPTIONS_GROUP+= SOUNDS OPTIONS_GROUP_SOUNDS= G729 SOUNDS_DESC= Core and Music-on-Hold (MoH) Sound Files G729_DESC= Install G.729 format sounds ASTERISK_CORE_G729_SOUNDS= asterisk-core-sounds-en-g729-1.5.tar.gz ASTERISK_MOH_G729_SOUNDS= asterisk-moh-opsound-g729-2.03.tar.gz G729_DISTFILES= ${ASTERISK_CORE_G729_SOUNDS}:g729 \ ${ASTERISK_MOH_G729_SOUNDS}:g729 ASTVERSION_DESC?= Install astversion (requires bash) BACKTRACE_DESC?= Stack backtrace support via (lib)execinfo BASE_DESC= Use base compiler (experimental) DAHDI_DESC?= DAHDI support EXCHANGE_DESC?= Exchange calendar support MP3PLAYER_DESC= Install MP3 Player for Music-On-Hold (mpg123) NEWG711_DESC?= New G711 Codec OOH323_DESC?= ooh323 support PJSIP_DESC?= Build the PJSIP based SIP channel SRTP_DESC?= SecureRTP support SYSINFO_DESC?= Use devel/libsysinfo to get system information XMPP_DESC?= XMPP/GTALK support OPTIONS_SUB= yes ASTVERSION_RUN_DEPENDS= bash:shells/bash BACKTRACE_CONFIGURE_WITH= execinfo BACKTRACE_USES= execinfo CURL_CONFIGURE_ON= --with-libcurl CURL_CONFIGURE_OFF= --with-libcurl=no CURL_LIB_DEPENDS= libcurl.so:ftp/curl DAHDI_CONFIGURE_ON= --with-dahdi --with-openr2 DAHDI_CONFIGURE_OFF= --without-dahdi --without-openr2 DAHDI_LIB_DEPENDS= libpri.so:misc/libpri \ libopenr2.so:misc/openr2 \ libtonezone.so:misc/dahdi EXCHANGE_CONFIGURE_OFF= --without-neon --without-neon29 EXCHANGE_LIB_DEPENDS= libneon.so:www/neon FREETDS_CONFIGURE_ON= --with-tds=${LOCALBASE} FREETDS_CONFIGURE_OFF= --without-tds FREETDS_LIB_DEPENDS= libsybdb.so:databases/freetds GCC_USE= GCC=yes GSM_CONFIGURE_WITH= gsm GSM_LIB_DEPENDS= libgsm.so:audio/gsm LDAP_CONFIGURE_WITH= ldap LDAP_USE= OPENLDAP=yes LUA_CONFIGURE_WITH= lua LUA_USES= lua:51 LUA_CFLAGS= -I${LUA_INCDIR} LUA_LDFLAGS= -L${LUA_LIBDIR} MYSQL_CONFIGURE_WITH= mysqlclient MYSQL_USES= mysql MP3PLAYER_RUN_DEPENDS= mpg123:audio/mpg123 NCURSES_USES= ncurses NEWT_LIB_DEPENDS= libnewt.so:devel/newt ODBC_CONFIGURE_WITH= unixodbc ODBC_CONFIGURE_ON= --with-ltdl ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC \ libltdl.so:devel/libltdl OOH323_CPPFLAGS= -I${LOCALBASE}/include/openh323 OOH323_LIB_DEPENDS= libpt_r.so:devel/pwlib \ libh323_r.so:net/openh323 OOH323_MAKE_ENV= OPENH323DIR=${LOCALBASE}/share/openh323 PGSQL_CONFIGURE_WITH= postgres PGSQL_USES= pgsql PJSIP_CONFIGURE_WITH= pjproject PJSIP_USES= pkgconfig PORTAUDIO_CONFIGURE_WITH= portaudio PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio RADIUS_CONFIGURE_WITH= radius RADIUS_LIB_DEPENDS= libradiusclient-ng.so:net/radiusclient SNMP_CONFIGURE_WITH= netsnmp SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp SPANDSP_CONFIGURE_WITH= spandsp SPANDSP_LIB_DEPENDS= libspandsp.so:comms/spandsp SPEEX_CONFIGURE_WITH= speex SPEEX_LIB_DEPENDS= libspeex.so:audio/speex SQLITE2_CONFIGURE_WITH= sqlite SQLITE2_LIB_DEPENDS= libsqlite.so:databases/sqlite2 SRTP_CONFIGURE_WITH= srtp SYSINFO_LIB_DEPENDS= libsysinfo.so:devel/libsysinfo VORBIS_CONFIGURE_WITH= ogg VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis XMPP_CONFIGURE_WITH= iksemel XMPP_LIB_DEPENDS= libiksemel.so:textproc/iksemel ASTERISK_USER?= asterisk ASTERISK_GROUP?= asterisk USERS= ${ASTERISK_USER} GROUPS= ${ASTERISK_GROUP} dahdi .include .if ${PORT_OPTIONS:MPJSIP} && ${PORT_OPTIONS:MSRTP} LIB_DEPENDS+= libpj.so:net/pjsip-extsrtp .elif ${PORT_OPTIONS:MPJSIP} && ! ${PORT_OPTIONS:MSRTP} LIB_DEPENDS+= libpj.so:net/pjsip .elif ! ${PORT_OPTIONS:MPJSIP} && ${PORT_OPTIONS:MSRTP} LIB_DEPENDS+= libsrtp.so:net/libsrtp .endif .include .if empty(ICONV_LIB) CONFIGURE_ARGS+=ac_cv_lib_iconv_iconv_open=no \ ac_cv_lib_iconv_libiconv_open=no .endif .if ${PREFIX} == ${LOCALBASE} VARDIR=/var .else VARDIR=${PREFIX}/var .endif SUB_LIST+= ASTERISK_USER=${ASTERISK_USER} PLIST_SUB+= ASTERISK_USER=${ASTERISK_USER} \ ASTERISK_GROUP=${ASTERISK_GROUP} \ VARDIR=${VARDIR} post-extract: @${FIND} ${WRKSRC} -name '*.d' -delete post-extract-G729-on: ${CP} ${DISTDIR}/${ASTERISK_CORE_G729_SOUNDS} ${WRKSRC}/sounds ${CP} ${DISTDIR}/${ASTERISK_MOH_G729_SOUNDS} ${WRKSRC}/sounds post-patch: @${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/samples/musiconhold.conf.sample post-patch-SYSINFO-on: @${REINPLACE_CMD} -e 's/%%LIBSYSINFO%%/-lsysinfo/' ${WRKSRC}/main/Makefile post-patch-SYSINFO-off: @${REINPLACE_CMD} -e '/#define HAVE_SYSINFO 1/d' ${WRKSRC}/configure @${REINPLACE_CMD} -e '/%%LIBSYSINFO%%/d' ${WRKSRC}/main/Makefile - .if exists(${FILESDIR}/.asterisk.makeopts) -USER_MAKEOPTS_FILE=${FILESDIR}/.asterisk.makeopts -.else -USER_MAKEOPTS_FILE= + ${CP} ${USER_MAKEOPTS_FILE} ${WRKSRC}/menuselect.makeopts .endif post-configure: - @cd ${WRKSRC} && ${MAKE_CMD} menuselect.makeopts USER_MAKEOPTS="${USER_MAKEOPTS_FILE}" + @cd ${WRKSRC} && ${MAKE_CMD} menuselect.makeopts @cd ${WRKSRC} && ./menuselect/menuselect --disable res_timing_kqueue menuselect.makeopts @cd ${WRKSRC} && ./menuselect/menuselect --enable chan_mgcp menuselect.makeopts @cd ${WRKSRC} && ./menuselect/menuselect --enable res_pktccops menuselect.makeopts post-configure-MYSQL-on: @cd ${WRKSRC} && ./menuselect/menuselect --enable res_config_mysql menuselect.makeopts @cd ${WRKSRC} && ./menuselect/menuselect --enable app_mysql menuselect.makeopts @cd ${WRKSRC} && ./menuselect/menuselect --enable cdr_mysql menuselect.makeopts post-configure-OOH323-on: @cd ${WRKSRC} && ./menuselect/menuselect --enable chan_ooh323 menuselect.makeopts post-configure-NEWG711-on: @cd ${WRKSRC} && ./menuselect/menuselect --enable G711_NEW_ALGORITHM menuselect.makeopts post-configure-OPTIMIZED_CFLAGS-off: @cd ${WRKSRC} && ./menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts post-install: @${RM} ${STAGEDIR}${ETCDIR}/*.conf ${STAGEDIR}${ETCDIR}/extensions.ael ${STAGEDIR}${ETCDIR}/extensions.lua ${FIND} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules -type f -name '*.so' | ${SED} "s,^${STAGEDIR}${PREFIX}/,," >> ${TMPPLIST} ${FIND} ${STAGEDIR}${DATADIR}/sounds -type f | ${SED} "s,^${STAGEDIR}${DATADIR},${DATADIR}," >> ${TMPPLIST} ${FIND} ${STAGEDIR}${DATADIR}/moh -type f | ${SED} "s,^${STAGEDIR}${DATADIR},${DATADIR}," >> ${TMPPLIST} (cd ${STAGEDIR} && \ ${ECHO} "@owner ${ASTERISK_USER}" >> ${TMPPLIST} && \ ${ECHO} "@group ${ASTERISK_GROUP}" >> ${TMPPLIST} && \ ${FIND} var/spool/${PORTNAME}/voicemail/default -type f | ${SED} "s,^,/," >> ${TMPPLIST} && \ ${FIND} var/spool/${PORTNAME}/voicemail/ -type d | ${SED} "s,^,@dir /," >> ${TMPPLIST} && \ ${ECHO} "@owner" >> ${TMPPLIST} && \ ${ECHO} "@group" >> ${TMPPLIST}); post-install-ASTVERSION-off: @${RM} ${STAGEDIR}${PREFIX}/sbin/astversion .include Index: head/net/asterisk13/distinfo =================================================================== --- head/net/asterisk13/distinfo (revision 427102) +++ head/net/asterisk13/distinfo (revision 427103) @@ -1,7 +1,7 @@ -TIMESTAMP = 1478858927 -SHA256 (asterisk-13.12.2.tar.gz) = ceb13d09180824cc3925ff7c713ef4b82575710c1fbe72e96844a37c8780b89f -SIZE (asterisk-13.12.2.tar.gz) = 32701699 +TIMESTAMP = 1479921761 +SHA256 (asterisk-13.13.0.tar.gz) = e35064b5d4c5c766661b34794f4e5fdf15ad683c3121b35e03c9e9f2a3fa9738 +SIZE (asterisk-13.13.0.tar.gz) = 32761401 SHA256 (asterisk-core-sounds-en-g729-1.5.tar.gz) = 8b28a59cfa53b59c76e0a191704f0708e3d83acffab8c5e6f25dfc599f0123f9 SIZE (asterisk-core-sounds-en-g729-1.5.tar.gz) = 1551123 SHA256 (asterisk-moh-opsound-g729-2.03.tar.gz) = 0147ca9a97f0c550227aacb7793499057c4d2c64e021c95f93722f27d5549585 SIZE (asterisk-moh-opsound-g729-2.03.tar.gz) = 1103000 Index: head/net/asterisk13/files/patch-main_udptl.c =================================================================== --- head/net/asterisk13/files/patch-main_udptl.c (nonexistent) +++ head/net/asterisk13/files/patch-main_udptl.c (revision 427103) @@ -0,0 +1,65 @@ +--- main/udptl.c.orig 2016-11-23 15:26:01 UTC ++++ main/udptl.c +@@ -1016,6 +1016,9 @@ struct ast_udptl *ast_udptl_new_with_bin + int i; + long int flags; + RAII_VAR(struct udptl_config *, cfg, ao2_global_obj_ref(globals), ao2_cleanup); ++#if defined(__FreeBSD__) ++ int portretryipv4 = 1; ++#endif + + if (!cfg || !cfg->general) { + ast_log(LOG_ERROR, "Could not access global udptl options!\n"); +@@ -1039,8 +1042,18 @@ struct ast_udptl *ast_udptl_new_with_bin + udptl->tx[i].buf_len = -1; + } + +- if ((udptl->fd = socket(ast_sockaddr_is_ipv6(addr) ? +- AF_INET6 : AF_INET, SOCK_DGRAM, 0)) < 0) { ++#if defined(__FreeBSD__) ++ udptl->fd = socket(AF_INET6, SOCK_DGRAM, 0); ++ if (udptl->fd < 0) { ++ ast_sockaddr_parse(addr, "0.0.0.0", 0); ++ udptl->fd = socket(AF_INET, SOCK_DGRAM, 0); ++ portretryipv4 = 0; ++ } ++#else ++ udptl->fd = socket(ast_sockaddr_is_ipv6(addr) ? ++ AF_INET6 : AF_INET, SOCK_DGRAM, 0); ++#endif ++ if (udptl->fd < 0) { + ast_free(udptl); + ast_log(LOG_WARNING, "Unable to allocate socket: %s\n", strerror(errno)); + return NULL; +@@ -1079,8 +1092,30 @@ struct ast_udptl *ast_udptl_new_with_bin + if (x > cfg->general->end) + x = cfg->general->start; + if (x == startplace) { ++#if defined(__FreeBSD__) ++ /* Try again with IPv4 if not IPv6 port could be found */ ++ if (portretryipv4 == 1) { ++ close(udptl->fd); ++ ast_sockaddr_parse(addr, "0.0.0.0", 0); ++ udptl->fd = socket(AF_INET, SOCK_DGRAM, 0); ++ if (udptl->fd >= 0) { ++ flags = fcntl(udptl->fd, F_GETFL); ++ fcntl(udptl->fd, F_SETFL, flags | O_NONBLOCK); ++ /* Reset the RTP port search parameters */ ++ x = (cfg->general->start == cfg->general->end) ? cfg->general->start : (ast_random() % (cfg->general->end - cfg->general->start)) + cfg->general->start; ++ if (cfg->general->use_even_ports && (x & 1)) { ++ ++x; ++ } ++ startplace = x; ++ portretryipv4 = 0; ++ continue; ++ } ++ } ++#endif + ast_log(LOG_WARNING, "No UDPTL ports remaining\n"); +- close(udptl->fd); ++ if (udptl->fd >= 0) { ++ close(udptl->fd); ++ } + ast_free(udptl); + return NULL; + } Property changes on: head/net/asterisk13/files/patch-main_udptl.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/asterisk13/files/patch-res_res__rtp__asterisk.c =================================================================== --- head/net/asterisk13/files/patch-res_res__rtp__asterisk.c (revision 427102) +++ head/net/asterisk13/files/patch-res_res__rtp__asterisk.c (revision 427103) @@ -1,15 +1,65 @@ -$OpenBSD: patch-res_res_rtp_asterisk_c,v 1.1 2016/07/30 21:12:15 sthen Exp $ - -Obtained from OpenBSD cvs - ---- res/res_rtp_asterisk.c.orig 2016-07-21 14:54:02 UTC +--- res/res_rtp_asterisk.c.orig 2016-11-23 15:26:01 UTC +++ res/res_rtp_asterisk.c -@@ -1357,7 +1357,7 @@ static int ast_rtp_dtls_set_configuratio - return 0; +@@ -2638,6 +2638,9 @@ static int ast_rtp_new(struct ast_rtp_in + { + struct ast_rtp *rtp = NULL; + int x, startplace; ++#if defined(__FreeBSD__) ++ int portretryipv4 = 1; ++#endif + + /* Create a new RTP structure to hold all of our data */ + if (!(rtp = ast_calloc(1, sizeof(*rtp)))) { +@@ -2658,10 +2661,20 @@ static int ast_rtp_new(struct ast_rtp_in } --#if OPENSSL_VERSION_NUMBER < 0x10002000L -+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) - rtp->ssl_ctx = SSL_CTX_new(DTLSv1_method()); - #else - rtp->ssl_ctx = SSL_CTX_new(DTLS_method()); + /* Create a new socket for us to listen on and use */ +- if ((rtp->s = +- create_new_socket("RTP", +- ast_sockaddr_is_ipv4(addr) ? AF_INET : +- ast_sockaddr_is_ipv6(addr) ? AF_INET6 : -1)) < 0) { ++#if defined(__FreeBSD__) ++ rtp->s = create_new_socket("RTP", AF_INET6); ++ if (rtp->s < 0) { ++ /* create correct addr structure for AF_INET */ ++ ast_sockaddr_parse(addr, "0.0.0.0", 0); ++ rtp->s = create_new_socket("RTP", AF_INET); ++ portretryipv4 = 0; ++ } ++#else ++ rtp->s = create_new_socket("RTP", ++ ast_sockaddr_is_ipv4(addr) ? AF_INET : ++ ast_sockaddr_is_ipv6(addr) ? AF_INET6 : -1); ++#endif ++ if (rtp->s < 0) { + ast_log(LOG_WARNING, "Failed to create a new socket for RTP instance '%p'\n", instance); + ast_free(rtp); + return -1; +@@ -2688,8 +2701,26 @@ static int ast_rtp_new(struct ast_rtp_in + + /* See if we ran out of ports or if the bind actually failed because of something other than the address being in use */ + if (x == startplace || (errno != EADDRINUSE && errno != EACCES)) { ++#if defined(__FreeBSD__) ++ /* Try again with IPv4 if not IPv6 port could be found */ ++ if (portretryipv4 == 1) { ++ close(rtp->s); ++ ast_sockaddr_parse(addr, "0.0.0.0", 0); ++ rtp->s = create_new_socket("RTP", AF_INET); ++ if (rtp->s >= 0) { ++ /* Reset the RTP port search parameters */ ++ x = (rtpend == rtpstart) ? rtpstart : (ast_random() % (rtpend - rtpstart)) + rtpstart; ++ x = x & ~1; ++ startplace = x; ++ portretryipv4 = 0; ++ continue; ++ } ++ } ++#endif + ast_log(LOG_ERROR, "Oh dear... we couldn't allocate a port for RTP instance '%p'\n", instance); +- close(rtp->s); ++ if (rtp->s >= 0) { ++ close(rtp->s); ++ } + ast_free(rtp); + return -1; + }