diff options
author | sobomax <sobomax@FreeBSD.org> | 2010-03-21 13:36:40 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2010-03-21 13:36:40 +0800 |
commit | 17471e9a53e2b541b2fe3936248b3a9b166ae740 (patch) | |
tree | c205ae5258430c270a2ed9a313af4c1cf801597e /net | |
parent | 94529480b32159ff213f5815f72d9eab20a120ba (diff) | |
download | freebsd-ports-gnome-17471e9a53e2b541b2fe3936248b3a9b166ae740.tar.gz freebsd-ports-gnome-17471e9a53e2b541b2fe3936248b3a9b166ae740.tar.zst freebsd-ports-gnome-17471e9a53e2b541b2fe3936248b3a9b166ae740.zip |
Update to 1.4.29.
Diffstat (limited to 'net')
39 files changed, 1254 insertions, 519 deletions
diff --git a/net/asterisk/Makefile b/net/asterisk/Makefile index 035e291fa93c..90cbd55a5c21 100644 --- a/net/asterisk/Makefile +++ b/net/asterisk/Makefile @@ -6,8 +6,7 @@ # PORTNAME= asterisk -PORTVERSION= 1.4.26.2 -PORTREVISION= 1 +PORTVERSION= 1.4.29 CATEGORIES= net MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \ http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ @@ -32,14 +31,13 @@ CPPFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/openh323 USE_GMAKE= yes USE_BISON= build USE_RC_SUBR= asterisk.sh -MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ - PTHREAD_LIBS="${PTHREAD_LIBS}" \ - MKDIR="${MKDIR}" \ +MAKE_ENV= MKDIR="${MKDIR}" \ PWLIBDIR=${LOCALBASE}/share/pwlib \ OPENH323DIR=${LOCALBASE}/share/openh323 \ OSVERSION=${OSVERSION} \ NOISY_BUILD=YES \ - ASTCFLAGS="${CFLAGS}" + ASTCFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}" \ + ASTLDFLAGS="${PTHREAD_LIBS} -L${LOCALBASE}/lib" MAN8= asterisk.8 astgenkey.8 autosupport.8 safe_asterisk.8 CONFLICTS= asterisk*-1.2* asterisk*-1.6* @@ -171,7 +169,7 @@ EXTRA_PATCHES+= ${PATCHDIR}/ilbc_enable.diff .endif .if defined(WITH_CODEC_PATCH) -PATCHFILES= asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz +PATCHFILES= asterisk-1.4.27-codec-negotiation-20091120.diff.gz PATCH_SITES= http://b2bua.org/chrome/site/ EXTRA_PATCHES+= ${PATCHDIR}/codecnego-patch-Makefile .else diff --git a/net/asterisk/distinfo b/net/asterisk/distinfo index 3efa703cbbc7..1c21b1a25ead 100644 --- a/net/asterisk/distinfo +++ b/net/asterisk/distinfo @@ -1,6 +1,6 @@ -MD5 (asterisk-1.4.26.2.tar.gz) = 58181c29d998f883f567dc9757a04167 -SHA256 (asterisk-1.4.26.2.tar.gz) = 384e080e359ae28ca9323800a3fa0586210342039b96ecbdced9ea285516efe9 -SIZE (asterisk-1.4.26.2.tar.gz) = 21436723 -MD5 (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = ae433b0c9574e0616cf014703641f62a -SHA256 (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = 65bd0d773a2ddc56bfa60a1bd9269eded2edf0062adf4f8afe393c6d41f27039 -SIZE (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = 40621 +MD5 (asterisk-1.4.29.tar.gz) = b49d0a269e11b6e85c75edce577b5103 +SHA256 (asterisk-1.4.29.tar.gz) = ecb1202f50fc5d7738d1b5bf6451b28e356f3469266dd64bcd637be71f91bd09 +SIZE (asterisk-1.4.29.tar.gz) = 21534219 +MD5 (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 4dedd23b3c9c00bcdcc69b8be878f15c +SHA256 (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 68f895de29f30296a47d32a5eaab8df367d92ae87b01ea9f2262556a1f1e5cbb +SIZE (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 40455 diff --git a/net/asterisk/files/codecnego-patch-Makefile b/net/asterisk/files/codecnego-patch-Makefile index e19ba9db1f69..e39dd6f62082 100644 --- a/net/asterisk/files/codecnego-patch-Makefile +++ b/net/asterisk/files/codecnego-patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2009-10-20 14:49:16.000000000 -0700 -+++ Makefile 2009-10-20 14:49:55.000000000 -0700 -@@ -95,7 +95,7 @@ +--- Makefile.orig 2009-11-20 17:48:05.000000000 +0200 ++++ Makefile 2009-11-20 17:50:33.000000000 +0200 +@@ -101,7 +101,7 @@ OVERWRITE=y # Include debug and macro symbols in the executables (-g) and profiling info (-pg) @@ -9,7 +9,7 @@ # Staging directory # Files are copied here temporarily during the install process -@@ -129,7 +129,7 @@ +@@ -135,7 +135,7 @@ ASTMANDIR=$(mandir) ifneq ($(findstring BSD,$(OSARCH)),) ASTVARLIBDIR=$(prefix)/share/asterisk @@ -18,33 +18,28 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif -@@ -219,9 +219,11 @@ - ASTLDFLAGS+=-L/usr/local/lib +@@ -225,9 +225,11 @@ + _ASTLDFLAGS+=-L/usr/local/lib endif +ifneq ($(OSARCH),FreeBSD) ifneq ($(PROC),ultrasparc) - ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) endif +endif ifeq ($(PROC),ppc) - ASTCFLAGS+=-fsigned-char -@@ -229,7 +231,7 @@ + _ASTCFLAGS+=-fsigned-char +@@ -235,7 +237,7 @@ ifeq ($(OSARCH),FreeBSD) # -V is understood by BSD Make, not by GNU make. - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) + BSDVERSION=$(OSVERSION) - ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) + _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) endif -@@ -404,19 +406,19 @@ - rm -f build_tools/menuselect-deps - - datafiles: _all -- if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi -+ #if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi +@@ -416,15 +418,15 @@ # Should static HTTP be installed during make samples or even with its own target ala # webvoicemail? There are portions here that *could* be customized but might also be # improved a lot. I'll put it here for now. @@ -65,7 +60,7 @@ $(MAKE) -C sounds install update: -@@ -437,47 +439,47 @@ +@@ -445,47 +447,47 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) installdirs: @@ -145,7 +140,7 @@ fi $(SUBDIRS_INSTALL): -@@ -513,7 +515,7 @@ +@@ -521,7 +523,7 @@ @exit 1 endif @@ -154,7 +149,7 @@ @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -@@ -551,31 +553,23 @@ +@@ -559,31 +561,23 @@ upgrade: bininstall adsi: @@ -194,7 +189,7 @@ ( \ echo "[directories]" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -662,20 +656,23 @@ +@@ -670,20 +664,23 @@ echo "; Default: strict"; \ echo ";"; \ echo ";translation_algorithm = strict"; \ diff --git a/net/asterisk/files/dtmf_debug.diff b/net/asterisk/files/dtmf_debug.diff index 968554880ac3..2a5b6bc9ea33 100644 --- a/net/asterisk/files/dtmf_debug.diff +++ b/net/asterisk/files/dtmf_debug.diff @@ -49,9 +49,9 @@ /*! \brief Set rtp timeout */ void ast_rtp_set_rtptimeout(struct ast_rtp *rtp, int timeout); /*! \brief Set rtp hold timeout */ ---- main/rtp.c.orig 2009-05-13 16:38:01.000000000 +0300 -+++ main/rtp.c 2009-05-26 12:52:30.000000000 +0300 -@@ -80,6 +80,7 @@ +--- main/rtp.c.orig 2009-11-20 17:51:49.000000000 +0200 ++++ main/rtp.c 2009-11-20 17:53:11.000000000 +0200 +@@ -81,6 +81,7 @@ static int rtpstart; /*!< First port for RTP sessions (set in rtp.conf) */ static int rtpend; /*!< Last port for RTP sessions (set in rtp.conf) */ static int rtpdebug; /*!< Are we debugging? */ @@ -59,16 +59,16 @@ static int rtcpdebug; /*!< Are we debugging RTCP? */ static int rtcpstats; /*!< Are we debugging RTCP? */ static int rtcpinterval = RTCP_DEFAULT_INTERVALMS; /*!< Time between rtcp reports in millisecs */ -@@ -173,6 +174,8 @@ - struct ast_codec_pref pref; +@@ -170,6 +171,8 @@ struct ast_rtp *bridged; /*!< Who we are Packet bridged to */ int set_marker_bit:1; /*!< Whether to set the marker bit or not */ -+ char chan_name[100]; -+ char chan_id[100]; + unsigned int constantssrc:1; ++ char chan_name[100]; ++ char chan_id[100]; }; /* Forward declarations */ -@@ -673,8 +676,8 @@ +@@ -676,8 +679,8 @@ struct ast_frame *f = NULL; event = ntohl(*((unsigned int *)(data))); event &= 0x001F; @@ -79,7 +79,7 @@ if (event < 10) { resp = '0' + event; } else if (event < 11) { -@@ -688,12 +691,25 @@ +@@ -691,12 +694,25 @@ } if (rtp->resp && (rtp->resp != resp)) { f = send_dtmf(rtp, AST_FRAME_DTMF_END); @@ -105,7 +105,7 @@ /*! * \brief Process RTP DTMF and events according to RFC 2833. * -@@ -1090,6 +1106,10 @@ +@@ -1101,6 +1117,10 @@ struct rtpPayloadType rtpPT; int reconstruct = ntohl(rtpheader[0]); @@ -116,7 +116,7 @@ /* Get fields from packet */ payload = (reconstruct & 0x7f0000) >> 16; mark = (((reconstruct & 0x800000) >> 23) != 0); -@@ -1097,10 +1117,6 @@ +@@ -1108,10 +1128,6 @@ /* Check what the payload value should be */ rtpPT = ast_rtp_lookup_pt(rtp, payload); @@ -127,7 +127,7 @@ /* Otherwise adjust bridged payload to match */ bridged_payload = ast_rtp_lookup_code(bridged, rtpPT.isAstFormat, rtpPT.code); -@@ -1293,11 +1309,12 @@ +@@ -1306,11 +1322,12 @@ /* This is special in-band data that's not one of our codecs */ if (rtpPT.code == AST_RTP_DTMF) { /* It's special -- rfc2833 process it */ @@ -141,7 +141,7 @@ data = rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen; event = ntohl(*((unsigned int *)(data))); event >>= 24; -@@ -1306,9 +1323,12 @@ +@@ -1319,9 +1336,12 @@ event_end >>= 24; duration = ntohl(*((unsigned int *)(data))); duration &= 0xFFFF; @@ -155,7 +155,7 @@ } else if (rtpPT.code == AST_RTP_CISCO_DTMF) { /* It's really special -- process it the Cisco way */ if (rtp->lastevent <= seqno || (rtp->lastevent >= 65530 && seqno <= 6)) { -@@ -2272,8 +2292,9 @@ +@@ -2287,8 +2307,9 @@ ast_log(LOG_ERROR, "RTP Transmission error to %s:%u: %s\n", ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), strerror(errno)); @@ -167,7 +167,7 @@ ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); /* Increment sequence number */ -@@ -2316,8 +2337,9 @@ +@@ -2331,8 +2352,9 @@ ast_log(LOG_ERROR, "RTP Transmission error to %s:%d: %s\n", ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), strerror(errno)); @@ -179,7 +179,7 @@ ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); -@@ -3609,6 +3631,16 @@ +@@ -3621,6 +3643,16 @@ return RESULT_SUCCESS; } @@ -196,7 +196,7 @@ static int rtp_do_debug(int fd, int argc, char *argv[]) { if (argc != 2) { -@@ -3669,6 +3701,7 @@ +@@ -3681,6 +3713,7 @@ if (argc != 3) return RESULT_SHOWUSAGE; rtpdebug = 0; @@ -204,7 +204,7 @@ ast_cli(fd,"RTP Debugging Disabled\n"); return RESULT_SUCCESS; } -@@ -3729,7 +3762,7 @@ +@@ -3741,7 +3774,7 @@ } static char debug_usage[] = @@ -213,7 +213,7 @@ " Enable dumping of all RTP packets to and from host.\n"; static char no_debug_usage[] = -@@ -3804,6 +3837,10 @@ +@@ -3816,6 +3849,10 @@ rtp_do_debug, "Enable RTP debugging", debug_usage }, diff --git a/net/asterisk/files/nocodecnego-patch-Makefile b/net/asterisk/files/nocodecnego-patch-Makefile index 78a3b3b45d23..c5df459f1b2c 100644 --- a/net/asterisk/files/nocodecnego-patch-Makefile +++ b/net/asterisk/files/nocodecnego-patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2009-06-11 15:20:31.000000000 -0700 -+++ Makefile 2009-09-18 02:47:39.000000000 -0700 -@@ -95,7 +95,7 @@ +--- Makefile.orig 2009-10-23 17:00:01.000000000 +0300 ++++ Makefile 2009-11-23 16:44:36.000000000 +0200 +@@ -101,7 +101,7 @@ OVERWRITE=y # Include debug and macro symbols in the executables (-g) and profiling info (-pg) @@ -9,7 +9,7 @@ # Staging directory # Files are copied here temporarily during the install process -@@ -129,7 +129,7 @@ +@@ -135,7 +135,7 @@ ASTMANDIR=$(mandir) ifneq ($(findstring BSD,$(OSARCH)),) ASTVARLIBDIR=$(prefix)/share/asterisk @@ -18,33 +18,37 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif -@@ -219,9 +219,11 @@ - ASTLDFLAGS+=-L/usr/local/lib +@@ -225,9 +225,11 @@ + _ASTLDFLAGS+=-L/usr/local/lib endif +ifneq ($(OSARCH),FreeBSD) ifneq ($(PROC),ultrasparc) - ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) endif +endif ifeq ($(PROC),ppc) - ASTCFLAGS+=-fsigned-char -@@ -229,7 +231,7 @@ + _ASTCFLAGS+=-fsigned-char +@@ -235,7 +237,7 @@ ifeq ($(OSARCH),FreeBSD) # -V is understood by BSD Make, not by GNU make. - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) + BSDVERSION=$(OSVERSION) - ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) + _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) endif -@@ -404,19 +406,19 @@ +@@ -410,21 +412,21 @@ rm -f build_tools/menuselect-deps datafiles: _all -- if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi -+ #if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi +- if [ `$(ID) -u` = 0 ]; then \ +- CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \ +- fi ++ #if [ `$(ID) -u` = 0 ]; then \ ++ # CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \ ++ #fi # Should static HTTP be installed during make samples or even with its own target ala # webvoicemail? There are portions here that *could* be customized but might also be # improved a lot. I'll put it here for now. @@ -65,7 +69,7 @@ $(MAKE) -C sounds install update: -@@ -437,47 +439,47 @@ +@@ -445,47 +447,47 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) installdirs: @@ -145,7 +149,7 @@ fi $(SUBDIRS_INSTALL): -@@ -513,7 +515,7 @@ +@@ -521,7 +523,7 @@ @exit 1 endif @@ -154,7 +158,7 @@ @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -@@ -551,31 +553,23 @@ +@@ -559,31 +561,23 @@ upgrade: bininstall adsi: @@ -194,7 +198,7 @@ ( \ echo "[directories]" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -621,20 +615,23 @@ +@@ -629,20 +623,23 @@ echo ";astctlowner = root" ; \ echo ";astctlgroup = apache" ; \ echo ";astctl = asterisk.ctl" ; \ diff --git a/net/asterisk/files/patch-Makefile.rules b/net/asterisk/files/patch-Makefile.rules index d129d9784b3c..f90430ec9ddd 100644 --- a/net/asterisk/files/patch-Makefile.rules +++ b/net/asterisk/files/patch-Makefile.rules @@ -1,21 +1,16 @@ - -$FreeBSD$ - ---- Makefile.rules -+++ Makefile.rules -@@ -27,6 +27,7 @@ - CMD_PREFIX= - endif +--- Makefile.rules.orig 2009-09-28 22:09:25.000000000 +0300 ++++ Makefile.rules 2009-11-23 16:15:23.000000000 +0200 +@@ -37,11 +37,13 @@ + + OPTIMIZE?=-O6 +ifneq ($(OSARCH),FreeBSD) ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) - # More GSM codec optimization - # Uncomment to enable MMXTM optimizations for x86 architecture CPU's -@@ -37,6 +38,7 @@ - OPTIMIZE?=-O6 - ASTCFLAGS+=$(OPTIMIZE) + _ASTCFLAGS+=$(OPTIMIZE) + else + _ASTCFLAGS+=-O0 endif +endif - %.o: %.c - $(ECHO_PREFIX) echo " [CC] $< -> $@" + # shortcuts for common combinations of flags; these must be recursively expanded so that + # per-target settings will be applied diff --git a/net/asterisk/files/patch-channels::Makefile b/net/asterisk/files/patch-channels::Makefile index fa5a90a988fa..bb9d20047899 100644 --- a/net/asterisk/files/patch-channels::Makefile +++ b/net/asterisk/files/patch-channels::Makefile @@ -1,8 +1,5 @@ - -$FreeBSD$ - ---- channels/Makefile.orig -+++ channels/Makefile +--- channels/Makefile.orig 2009-07-21 16:04:44.000000000 +0300 ++++ channels/Makefile 2009-11-20 18:05:45.000000000 +0200 @@ -32,9 +32,10 @@ endif @@ -36,16 +33,16 @@ $FreeBSD$ endif dist-clean:: -@@ -113,8 +115,12 @@ +@@ -111,8 +113,12 @@ else chan_h323.so: chan_h323.o h323/libchanh323.a $(ECHO_PREFIX) echo " [LD] $^ -> $@" +ifeq ($(OSARCH),FreeBSD) + $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) $(CHANH323LIB) +else - $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat + $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat $(ASTLDFLAGS) endif +endif - chan_misdn.o: ASTCFLAGS+=-Imisdn + chan_misdn.o: _ASTCFLAGS+=-Imisdn diff --git a/net/asterisk/files/patch-configure b/net/asterisk/files/patch-configure index 0782453c279b..93432489e415 100644 --- a/net/asterisk/files/patch-configure +++ b/net/asterisk/files/patch-configure @@ -1,6 +1,9 @@ ---- configure.orig 2009-04-27 22:29:46.000000000 +0300 -+++ configure 2009-05-26 12:59:22.000000000 +0300 -@@ -4064,8 +4064,6 @@ + +$FreeBSD$ + +--- configure.orig ++++ configure +@@ -4308,8 +4308,6 @@ case "${host_os}" in freebsd*) ac_default_prefix=/usr/local @@ -9,7 +12,7 @@ ;; darwin*) -@@ -27145,7 +27143,7 @@ +@@ -16837,7 +16835,7 @@ fi @@ -17,20 +20,4 @@ + PLATFORM_OPENH323="h323_${OPENH323_SUFFIX}" if test "${HAS_OPENH323:-unset}" != "unset"; then - { $as_echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5 -@@ -31624,6 +31622,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default -+#include <ptlib.h> - #include <h323.h> - _ACEOF - rm -f conftest.$ac_objext -@@ -31665,6 +31664,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <ptlib.h> - #include <h323.h> - _ACEOF - if { (ac_try="$ac_cpp conftest.$ac_ext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 installation validity" >&5 diff --git a/net/asterisk/files/patch-main::Makefile b/net/asterisk/files/patch-main::Makefile index 418714ab7f21..a4758b78bdc9 100644 --- a/net/asterisk/files/patch-main::Makefile +++ b/net/asterisk/files/patch-main::Makefile @@ -1,13 +1,13 @@ ---- main/Makefile.orig 2009-04-09 07:31:38.000000000 +0300 -+++ main/Makefile 2009-05-26 13:07:50.000000000 +0300 +--- main/Makefile.orig 2009-08-01 03:52:00.000000000 +0300 ++++ main/Makefile 2009-11-20 18:09:06.000000000 +0200 @@ -92,8 +92,8 @@ - cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(ASTCFLAGS:-Werror=))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR) + cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS:-Werror=)) $(ASTCFLAGS)" LDFLAGS="$(_ASTLDFLAGS) $(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR) $(MAKE) -C editline libedit.a -db1-ast/libdb1.a: -- CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a +- _ASTCFLAGS="$(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS) -Wno-strict-aliasing" $(MAKE) -C db1-ast libdb1.a +#db1-ast/libdb1.a: -+# CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a ++# _ASTCFLAGS="$(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS) -Wno-strict-aliasing" $(MAKE) -C db1-ast libdb1.a ast_expr2.c ast_expr2.h: bison -o $@ -d --name-prefix=ast_yy ast_expr2.y @@ -22,15 +22,15 @@ mv $(ASTTOPDIR)/include/asterisk/build.h.tmp $(ASTTOPDIR)/include/asterisk/build.h ; \ fi @rm -f $(ASTTOPDIR)/include/asterisk/build.h.tmp - @$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c + @$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS) - $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@" + $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) -> $@" ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),) -- $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) -+ $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) +- $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(ASTLDFLAGS) ++ $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(ASTLDFLAGS) else -- $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) -+ $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) +- $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(ASTLDFLAGS) ++ $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(ASTLDFLAGS) endif clean:: diff --git a/net/asterisk/files/patch-suppress_log_dups.diff b/net/asterisk/files/patch-suppress_log_dups.diff new file mode 100644 index 000000000000..115b69f21ca1 --- /dev/null +++ b/net/asterisk/files/patch-suppress_log_dups.diff @@ -0,0 +1,270 @@ +Index: main/logger.c +=================================================================== +--- main/logger.c (revision 188505) ++++ main/logger.c (working copy) +@@ -140,6 +140,17 @@ + AST_THREADSTORAGE(log_buf, log_buf_init); + #define LOG_BUF_INIT_SIZE 128 + ++/* ++ * Storage for previous log message to prevent log storms ++ */ ++static int stored_log_level; ++static int stored_log_dup_count = 0; ++static char *stored_log_msg = NULL; ++static const char *stored_log_file; ++static int stored_log_line; ++static const char *stored_log_function; ++static ast_mutex_t stored_log_msg_lock; ++ + static int make_components(char *s, int lineno) + { + char *w; +@@ -591,6 +602,8 @@ + char tmp[256]; + int res = 0; + ++ ast_mutex_init(&stored_log_msg_lock); ++ + /* auto rotate if sig SIGXFSZ comes a-knockin */ + (void) signal(SIGXFSZ,(void *) handle_SIGXFSZ); + +@@ -655,14 +668,14 @@ + return; + } + +-static void __attribute__((format(printf, 5, 0))) ast_log_vsyslog(int level, const char *file, int line, const char *function, const char *fmt, va_list args) ++static void ast_log_syslog(int level, const char *file, int line, const char *function, const char *msg) + { + char buf[BUFSIZ]; + char *s; + + if (level >= SYSLOG_NLEVELS) { + /* we are locked here, so cannot ast_log() */ +- fprintf(stderr, "ast_log_vsyslog called with bogus level: %d\n", level); ++ fprintf(stderr, "ast_log_syslog called with bogus level: %d\n", level); + return; + } + if (level == __LOG_VERBOSE) { +@@ -676,27 +689,20 @@ + levels[level], (long)GETTID(), file, line, function); + } + s = buf + strlen(buf); +- vsnprintf(s, sizeof(buf) - strlen(buf), fmt, args); ++ snprintf(s, sizeof(buf) - strlen(buf), "%s", msg); + term_strip(s, s, strlen(s) + 1); + syslog(syslog_level_map[level], "%s", buf); + } + +-/*! +- * \brief send log messages to syslog and/or the console +- */ +-void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) ++static void __ast_log(int level, const char *file, int line, const char *function, char *msg, int msglen) + { + struct logchannel *chan; +- struct ast_dynamic_str *buf; + time_t t; + struct tm tm; + char date[256]; ++ char buf[2048]; ++ int res; + +- va_list ap; +- +- if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE))) +- return; +- + if (AST_LIST_EMPTY(&logchannels)) + { + /* +@@ -704,35 +710,12 @@ + * so just log to stdout + */ + if (level != __LOG_VERBOSE) { +- int res; +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) { +- term_filter_escapes(buf->str); +- fputs(buf->str, stdout); +- } ++ term_filter_escapes(msg); ++ fputs(msg, stdout); + } + return; + } + +- /* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug +- are non-zero; LOG_DEBUG messages can still be displayed if option_debug +- is zero, if option_verbose is non-zero (this allows for 'level zero' +- LOG_DEBUG messages to be displayed, if the logmask on any channel +- allows it) +- */ +- if (!option_verbose && !option_debug && (level == __LOG_DEBUG)) +- return; +- +- /* Ignore anything that never gets logged anywhere */ +- if (!(global_logmask & (1 << level))) +- return; +- +- /* Ignore anything other than the currently debugged file if there is one */ +- if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file)) +- return; +- + time(&t); + ast_localtime(&t, &tm, NULL); + strftime(date, sizeof(date), dateformat, &tm); +@@ -740,13 +723,8 @@ + AST_LIST_LOCK(&logchannels); + + if (logfiles.event_log && level == __LOG_EVENT) { +- va_start(ap, fmt); +- +- fprintf(eventlog, "%s asterisk[%ld]: ", date, (long)getpid()); +- vfprintf(eventlog, fmt, ap); ++ fprintf(eventlog, "%s asterisk[%ld]: %s", date, (long)getpid(), msg); + fflush(eventlog); +- +- va_end(ap); + AST_LIST_UNLOCK(&logchannels); + return; + } +@@ -756,18 +734,15 @@ + break; + /* Check syslog channels */ + if (chan->type == LOGTYPE_SYSLOG && (chan->logmask & (1 << level))) { +- va_start(ap, fmt); +- ast_log_vsyslog(level, file, line, function, fmt, ap); +- va_end(ap); ++ ast_log_syslog(level, file, line, function, msg); + /* Console channels */ + } else if ((chan->logmask & (1 << level)) && (chan->type == LOGTYPE_CONSOLE)) { + char linestr[128]; + char tmp1[80], tmp2[80], tmp3[80], tmp4[80]; + + if (level != __LOG_VERBOSE) { +- int res; + sprintf(linestr, "%d", line); +- ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf, ++ snprintf(buf, sizeof(buf), + "[%s] %s[%ld]: %s:%s %s: ", + date, + term_color(tmp1, levels[level], colors[level], 0, sizeof(tmp1)), +@@ -776,23 +751,17 @@ + term_color(tmp3, linestr, COLOR_BRWHITE, 0, sizeof(tmp3)), + term_color(tmp4, function, COLOR_BRWHITE, 0, sizeof(tmp4))); + /*filter to the console!*/ +- term_filter_escapes(buf->str); +- ast_console_puts_mutable(buf->str); +- +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) +- ast_console_puts_mutable(buf->str); ++ term_filter_escapes(buf); ++ ast_console_puts_mutable(buf); ++ ast_console_puts_mutable(msg); + } + /* File channels */ + } else if ((chan->logmask & (1 << level)) && (chan->fileptr)) { +- int res; +- ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf, ++ snprintf(buf, sizeof(buf), + "[%s] %s[%ld] %s: ", + date, levels[level], (long)GETTID(), file); +- res = fprintf(chan->fileptr, "%s", buf->str); +- if (res <= 0 && !ast_strlen_zero(buf->str)) { /* Error, no characters printed */ ++ res = fprintf(chan->fileptr, "%s", buf); ++ if (res <= 0 && !ast_strlen_zero(buf)) { /* Error, no characters printed */ + fprintf(stderr,"**** Asterisk Logging Error: ***********\n"); + if (errno == ENOMEM || errno == ENOSPC) { + fprintf(stderr, "Asterisk logging error: Out of disk space, can't log to log file %s\n", chan->filename); +@@ -801,16 +770,10 @@ + manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: No\r\nReason: %d - %s\r\n", chan->filename, errno, strerror(errno)); + chan->disabled = 1; + } else { +- int res; + /* No error message, continue printing */ +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) { +- term_strip(buf->str, buf->str, buf->len); +- fputs(buf->str, chan->fileptr); +- fflush(chan->fileptr); +- } ++ term_strip(msg, msg, msglen); ++ fputs(msg, chan->fileptr); ++ fflush(chan->fileptr); + } + } + } +@@ -825,6 +788,65 @@ + } + } + ++/*! ++ * \brief send log messages to syslog and/or the console ++ */ ++void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) ++{ ++ struct ast_dynamic_str *buf; ++ int res; ++ va_list ap; ++ ++ if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE))) ++ return; ++ ++ va_start(ap, fmt); ++ res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); ++ va_end(ap); ++ if (res == AST_DYNSTR_BUILD_FAILED) ++ return; ++ ++ /* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug ++ are non-zero; LOG_DEBUG messages can still be displayed if option_debug ++ is zero, if option_verbose is non-zero (this allows for 'level zero' ++ LOG_DEBUG messages to be displayed, if the logmask on any channel ++ allows it) ++ */ ++ if (!option_verbose && !option_debug && (level == __LOG_DEBUG)) ++ return; ++ ++ /* Ignore anything that never gets logged anywhere */ ++ if (!(global_logmask & (1 << level))) ++ return; ++ ++ /* Ignore anything other than the currently debugged file if there is one */ ++ if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file)) ++ return; ++ ++ ast_mutex_lock(&stored_log_msg_lock); ++ if (stored_log_msg == NULL || stored_log_level != level || strcmp(buf->str, stored_log_msg) != 0) { ++ if (stored_log_dup_count > 0) { ++ char buf2[1024]; ++ ++ snprintf(buf2, sizeof(buf2), "Last message repeated %d times\n", stored_log_dup_count); ++ __ast_log(stored_log_level, stored_log_file, stored_log_line, stored_log_function, buf2, strlen(buf2)); ++ } ++ if (stored_log_msg != NULL) ++ ast_free(stored_log_msg); ++ stored_log_msg = ast_strdup(buf->str); ++ stored_log_level = level; ++ stored_log_dup_count = 0; ++ stored_log_file = file; ++ stored_log_line = line; ++ stored_log_function = function; ++ __ast_log(level, file, line, function, buf->str, buf->len); ++ } ++ else ++ ++stored_log_dup_count; ++ ++ ast_mutex_unlock(&stored_log_msg_lock); ++} ++ + void ast_backtrace(void) + { + #ifdef linux diff --git a/net/asterisk/files/rtp_force_dtmf-codecnego.diff b/net/asterisk/files/rtp_force_dtmf-codecnego.diff index 723bd8703c06..a670364ba603 100644 --- a/net/asterisk/files/rtp_force_dtmf-codecnego.diff +++ b/net/asterisk/files/rtp_force_dtmf-codecnego.diff @@ -1,6 +1,6 @@ ---- channels/chan_sip.c.orig 2008-03-12 17:37:00.000000000 +0200 -+++ channels/chan_sip.c 2008-03-12 18:17:33.000000000 +0200 -@@ -554,6 +554,9 @@ +--- channels/chan_sip.c.orig 2009-11-20 17:56:30.000000000 +0200 ++++ channels/chan_sip.c 2009-11-20 17:59:43.000000000 +0200 +@@ -565,6 +565,9 @@ static unsigned int global_tos_sip; /*!< IP type of service for SIP packets */ static unsigned int global_tos_audio; /*!< IP type of service for audio RTP packets */ static unsigned int global_tos_video; /*!< IP type of service for video RTP packets */ @@ -10,37 +10,37 @@ static int compactheaders; /*!< send compact sip headers */ static int recordhistory; /*!< Record SIP history. Off by default */ static int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */ -@@ -4983,6 +4986,8 @@ - int codec_index = 0; - int codec_pt_order[256]; +@@ -5329,6 +5332,7 @@ + int x; + int codec_index = 0; + int codec_pt_order[256]; ++ int dtmf_present = 0; -+ int dtmf_present = 0; + /* Host information */ + struct ast_hostent audiohp; +@@ -5600,12 +5604,21 @@ + for (x = 0; x < codec_index; ++x) { + struct rtpPayloadType pt; + pt = ast_rtp_lookup_pt(p->rtp, codec_pt_order[x]); ++ if (pt.code == AST_RTP_DTMF) ++ dtmf_present = 1; + if (!pt.isAstFormat && !pt.code && p->vrtp) + pt = ast_rtp_lookup_pt(p->vrtp, codec_pt_order[x]); + if (pt.isAstFormat) + ast_codec_pref_append(&p->formats, pt.code); + } + ast_codec_pref_remove2(&p->formats, ~p->usercapability); ++ if (!dtmf_present && global_force_dtmf_relay) { ++ newnoncodeccapability |= AST_RTP_DTMF; ++ ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); ++ codec_pt_order[codec_index++] = global_force_dtmf_relay_pt; ++ ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); ++ } + - if (!p->rtp) { - ast_log(LOG_ERROR, "Got SDP but have no RTP session allocated.\n"); - return -1; -@@ -5408,12 +5413,20 @@ - for (x = 0; x < codec_index; ++x) { - struct rtpPayloadType pt; - pt = ast_rtp_lookup_pt(p->rtp, codec_pt_order[x]); -+ if (pt.code == AST_RTP_DTMF) -+ dtmf_present = 1; - if (!pt.isAstFormat && !pt.code && p->vrtp) - pt = ast_rtp_lookup_pt(p->vrtp, codec_pt_order[x]); - if (pt.isAstFormat) - ast_codec_pref_append(&p->formats, pt.code); - } - ast_codec_pref_remove2(&p->formats, ~p->usercapability); -+ if (!dtmf_present && global_force_dtmf_relay) { -+ newnoncodeccapability |= AST_RTP_DTMF; -+ ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); -+ codec_pt_order[codec_index++] = global_force_dtmf_relay_pt; -+ ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); -+ } - + /* Now gather all of the codecs that we are asked for: */ ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); -@@ -16845,6 +16858,9 @@ +@@ -18369,6 +18382,9 @@ global_matchexterniplocally = FALSE; @@ -50,7 +50,7 @@ /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); -@@ -16901,6 +16917,18 @@ +@@ -18431,6 +18447,18 @@ } } else if (!strcasecmp(v->name, "vmexten")) { ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten)); @@ -67,7 +67,7 @@ + } else + ast_log(LOG_WARNING, "RTP forced DTMF relay payload type is %d\n", global_force_dtmf_relay_pt); } else if (!strcasecmp(v->name, "rtptimeout")) { - if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { + if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno); --- configs/sip.conf.sample.orig 2008-04-25 08:53:52.000000000 -0700 +++ configs/sip.conf.sample 2008-06-10 00:45:37.000000000 -0700 diff --git a/net/asterisk/files/rtp_force_dtmf-nocodecnego.diff b/net/asterisk/files/rtp_force_dtmf-nocodecnego.diff index 9b1d521fa0e3..9dcb7d8b134f 100644 --- a/net/asterisk/files/rtp_force_dtmf-nocodecnego.diff +++ b/net/asterisk/files/rtp_force_dtmf-nocodecnego.diff @@ -1,6 +1,6 @@ ---- channels/chan_sip.c.orig 2008-09-09 00:10:10.000000000 +0300 -+++ channels/chan_sip.c 2008-12-12 17:02:05.000000000 +0200 -@@ -557,6 +557,9 @@ +--- channels/chan_sip.c.orig 2009-11-23 17:28:47.000000000 +0200 ++++ channels/chan_sip.c 2009-11-23 17:29:29.000000000 +0200 +@@ -565,6 +565,9 @@ static unsigned int global_tos_sip; /*!< IP type of service for SIP packets */ static unsigned int global_tos_audio; /*!< IP type of service for audio RTP packets */ static unsigned int global_tos_video; /*!< IP type of service for video RTP packets */ @@ -10,21 +10,20 @@ static int compactheaders; /*!< send compact sip headers */ static int recordhistory; /*!< Record SIP history. Off by default */ static int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */ -@@ -5504,6 +5507,13 @@ - +@@ -5593,6 +5596,12 @@ + /* Now gather all of the codecs that we are asked for: */ ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); + /* Add telephone-event */ + if (global_force_dtmf_relay && !(peernoncodeccapability & AST_RTP_DTMF)) { + ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); -+ found_rtpmap_codecs[last_rtpmap_codec++] = global_force_dtmf_relay_pt; + ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); + peernoncodeccapability |= AST_RTP_DTMF; + } ast_rtp_get_current_formats(newvideortp, &vpeercapability, &vpeernoncodeccapability); newjointcapability = p->capability & (peercapability | vpeercapability); -@@ -17440,6 +17450,9 @@ +@@ -18366,6 +18375,9 @@ global_matchexterniplocally = FALSE; @@ -34,7 +33,7 @@ /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); -@@ -17496,6 +17509,18 @@ +@@ -18428,6 +18440,18 @@ } } else if (!strcasecmp(v->name, "vmexten")) { ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten)); @@ -51,7 +50,7 @@ + } else + ast_log(LOG_WARNING, "RTP forced DTMF relay payload type is %d\n", global_force_dtmf_relay_pt); } else if (!strcasecmp(v->name, "rtptimeout")) { - if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { + if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno); --- configs/sip.conf.sample.orig 2008-08-16 01:33:42.000000000 +0300 +++ configs/sip.conf.sample 2008-12-12 17:03:11.000000000 +0200 diff --git a/net/asterisk/pkg-plist b/net/asterisk/pkg-plist index 465dbb095d9d..fa747b6e8a6e 100644 --- a/net/asterisk/pkg-plist +++ b/net/asterisk/pkg-plist @@ -435,23 +435,22 @@ share/asterisk/agi-bin/agi-test.agi share/asterisk/agi-bin/eagi-sphinx-test share/asterisk/agi-bin/eagi-test share/asterisk/agi-bin/jukebox.agi -share/asterisk/firmware/iax/iaxy.bin share/asterisk/images/asterisk-intro.jpg share/asterisk/keys/freeworlddialup.pub share/asterisk/keys/iaxtel.pub -share/asterisk/moh/.asterisk-moh-freeplay-wav -share/asterisk/moh/CHANGES-asterisk-moh-opsound-2.01 -share/asterisk/moh/CREDITS-asterisk-moh-opsound-2.01 -share/asterisk/moh/LICENSE-asterisk-moh-opsound-2.01 +share/asterisk/moh/.asterisk-moh-opsound-wav +share/asterisk/moh/CHANGES-asterisk-moh-opsound-wav +share/asterisk/moh/CREDITS-asterisk-moh-opsound-wav +share/asterisk/moh/LICENSE-asterisk-moh-opsound-wav share/asterisk/moh/macroform-cold_day.wav share/asterisk/moh/macroform-robot_dity.wav share/asterisk/moh/macroform-the_simplicity.wav share/asterisk/moh/manolo_camp-morning_coffee.wav share/asterisk/moh/reno_project-system.wav -share/asterisk/sounds/.asterisk-core-sounds-en-gsm-1.4.15 -share/asterisk/sounds/CHANGES-asterisk-core-en-1.4.15 -share/asterisk/sounds/CREDITS-asterisk-core-en-1.4.15 -share/asterisk/sounds/LICENSE-asterisk-core-en-1.4.15 +share/asterisk/sounds/.asterisk-core-sounds-en-gsm-1.4.17 +share/asterisk/sounds/CHANGES-asterisk-core-en-1.4.17 +share/asterisk/sounds/CREDITS-asterisk-core-en-1.4.17 +share/asterisk/sounds/LICENSE-asterisk-core-en-1.4.17 share/asterisk/sounds/agent-alreadyon.gsm share/asterisk/sounds/agent-incorrect.gsm share/asterisk/sounds/agent-loggedoff.gsm @@ -842,6 +841,7 @@ share/asterisk/sounds/vm-opts.gsm share/asterisk/sounds/vm-opts-full.gsm share/asterisk/sounds/vm-passchanged.gsm share/asterisk/sounds/vm-password.gsm +share/asterisk/sounds/vm-pls-try-again.gsm share/asterisk/sounds/vm-press.gsm share/asterisk/sounds/vm-prev.gsm share/asterisk/sounds/vm-reachoper.gsm diff --git a/net/asterisk10/Makefile b/net/asterisk10/Makefile index 035e291fa93c..90cbd55a5c21 100644 --- a/net/asterisk10/Makefile +++ b/net/asterisk10/Makefile @@ -6,8 +6,7 @@ # PORTNAME= asterisk -PORTVERSION= 1.4.26.2 -PORTREVISION= 1 +PORTVERSION= 1.4.29 CATEGORIES= net MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \ http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ @@ -32,14 +31,13 @@ CPPFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/openh323 USE_GMAKE= yes USE_BISON= build USE_RC_SUBR= asterisk.sh -MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ - PTHREAD_LIBS="${PTHREAD_LIBS}" \ - MKDIR="${MKDIR}" \ +MAKE_ENV= MKDIR="${MKDIR}" \ PWLIBDIR=${LOCALBASE}/share/pwlib \ OPENH323DIR=${LOCALBASE}/share/openh323 \ OSVERSION=${OSVERSION} \ NOISY_BUILD=YES \ - ASTCFLAGS="${CFLAGS}" + ASTCFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}" \ + ASTLDFLAGS="${PTHREAD_LIBS} -L${LOCALBASE}/lib" MAN8= asterisk.8 astgenkey.8 autosupport.8 safe_asterisk.8 CONFLICTS= asterisk*-1.2* asterisk*-1.6* @@ -171,7 +169,7 @@ EXTRA_PATCHES+= ${PATCHDIR}/ilbc_enable.diff .endif .if defined(WITH_CODEC_PATCH) -PATCHFILES= asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz +PATCHFILES= asterisk-1.4.27-codec-negotiation-20091120.diff.gz PATCH_SITES= http://b2bua.org/chrome/site/ EXTRA_PATCHES+= ${PATCHDIR}/codecnego-patch-Makefile .else diff --git a/net/asterisk10/distinfo b/net/asterisk10/distinfo index 3efa703cbbc7..1c21b1a25ead 100644 --- a/net/asterisk10/distinfo +++ b/net/asterisk10/distinfo @@ -1,6 +1,6 @@ -MD5 (asterisk-1.4.26.2.tar.gz) = 58181c29d998f883f567dc9757a04167 -SHA256 (asterisk-1.4.26.2.tar.gz) = 384e080e359ae28ca9323800a3fa0586210342039b96ecbdced9ea285516efe9 -SIZE (asterisk-1.4.26.2.tar.gz) = 21436723 -MD5 (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = ae433b0c9574e0616cf014703641f62a -SHA256 (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = 65bd0d773a2ddc56bfa60a1bd9269eded2edf0062adf4f8afe393c6d41f27039 -SIZE (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = 40621 +MD5 (asterisk-1.4.29.tar.gz) = b49d0a269e11b6e85c75edce577b5103 +SHA256 (asterisk-1.4.29.tar.gz) = ecb1202f50fc5d7738d1b5bf6451b28e356f3469266dd64bcd637be71f91bd09 +SIZE (asterisk-1.4.29.tar.gz) = 21534219 +MD5 (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 4dedd23b3c9c00bcdcc69b8be878f15c +SHA256 (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 68f895de29f30296a47d32a5eaab8df367d92ae87b01ea9f2262556a1f1e5cbb +SIZE (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 40455 diff --git a/net/asterisk10/files/codecnego-patch-Makefile b/net/asterisk10/files/codecnego-patch-Makefile index e19ba9db1f69..e39dd6f62082 100644 --- a/net/asterisk10/files/codecnego-patch-Makefile +++ b/net/asterisk10/files/codecnego-patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2009-10-20 14:49:16.000000000 -0700 -+++ Makefile 2009-10-20 14:49:55.000000000 -0700 -@@ -95,7 +95,7 @@ +--- Makefile.orig 2009-11-20 17:48:05.000000000 +0200 ++++ Makefile 2009-11-20 17:50:33.000000000 +0200 +@@ -101,7 +101,7 @@ OVERWRITE=y # Include debug and macro symbols in the executables (-g) and profiling info (-pg) @@ -9,7 +9,7 @@ # Staging directory # Files are copied here temporarily during the install process -@@ -129,7 +129,7 @@ +@@ -135,7 +135,7 @@ ASTMANDIR=$(mandir) ifneq ($(findstring BSD,$(OSARCH)),) ASTVARLIBDIR=$(prefix)/share/asterisk @@ -18,33 +18,28 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif -@@ -219,9 +219,11 @@ - ASTLDFLAGS+=-L/usr/local/lib +@@ -225,9 +225,11 @@ + _ASTLDFLAGS+=-L/usr/local/lib endif +ifneq ($(OSARCH),FreeBSD) ifneq ($(PROC),ultrasparc) - ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) endif +endif ifeq ($(PROC),ppc) - ASTCFLAGS+=-fsigned-char -@@ -229,7 +231,7 @@ + _ASTCFLAGS+=-fsigned-char +@@ -235,7 +237,7 @@ ifeq ($(OSARCH),FreeBSD) # -V is understood by BSD Make, not by GNU make. - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) + BSDVERSION=$(OSVERSION) - ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) + _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) endif -@@ -404,19 +406,19 @@ - rm -f build_tools/menuselect-deps - - datafiles: _all -- if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi -+ #if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi +@@ -416,15 +418,15 @@ # Should static HTTP be installed during make samples or even with its own target ala # webvoicemail? There are portions here that *could* be customized but might also be # improved a lot. I'll put it here for now. @@ -65,7 +60,7 @@ $(MAKE) -C sounds install update: -@@ -437,47 +439,47 @@ +@@ -445,47 +447,47 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) installdirs: @@ -145,7 +140,7 @@ fi $(SUBDIRS_INSTALL): -@@ -513,7 +515,7 @@ +@@ -521,7 +523,7 @@ @exit 1 endif @@ -154,7 +149,7 @@ @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -@@ -551,31 +553,23 @@ +@@ -559,31 +561,23 @@ upgrade: bininstall adsi: @@ -194,7 +189,7 @@ ( \ echo "[directories]" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -662,20 +656,23 @@ +@@ -670,20 +664,23 @@ echo "; Default: strict"; \ echo ";"; \ echo ";translation_algorithm = strict"; \ diff --git a/net/asterisk10/files/dtmf_debug.diff b/net/asterisk10/files/dtmf_debug.diff index 968554880ac3..2a5b6bc9ea33 100644 --- a/net/asterisk10/files/dtmf_debug.diff +++ b/net/asterisk10/files/dtmf_debug.diff @@ -49,9 +49,9 @@ /*! \brief Set rtp timeout */ void ast_rtp_set_rtptimeout(struct ast_rtp *rtp, int timeout); /*! \brief Set rtp hold timeout */ ---- main/rtp.c.orig 2009-05-13 16:38:01.000000000 +0300 -+++ main/rtp.c 2009-05-26 12:52:30.000000000 +0300 -@@ -80,6 +80,7 @@ +--- main/rtp.c.orig 2009-11-20 17:51:49.000000000 +0200 ++++ main/rtp.c 2009-11-20 17:53:11.000000000 +0200 +@@ -81,6 +81,7 @@ static int rtpstart; /*!< First port for RTP sessions (set in rtp.conf) */ static int rtpend; /*!< Last port for RTP sessions (set in rtp.conf) */ static int rtpdebug; /*!< Are we debugging? */ @@ -59,16 +59,16 @@ static int rtcpdebug; /*!< Are we debugging RTCP? */ static int rtcpstats; /*!< Are we debugging RTCP? */ static int rtcpinterval = RTCP_DEFAULT_INTERVALMS; /*!< Time between rtcp reports in millisecs */ -@@ -173,6 +174,8 @@ - struct ast_codec_pref pref; +@@ -170,6 +171,8 @@ struct ast_rtp *bridged; /*!< Who we are Packet bridged to */ int set_marker_bit:1; /*!< Whether to set the marker bit or not */ -+ char chan_name[100]; -+ char chan_id[100]; + unsigned int constantssrc:1; ++ char chan_name[100]; ++ char chan_id[100]; }; /* Forward declarations */ -@@ -673,8 +676,8 @@ +@@ -676,8 +679,8 @@ struct ast_frame *f = NULL; event = ntohl(*((unsigned int *)(data))); event &= 0x001F; @@ -79,7 +79,7 @@ if (event < 10) { resp = '0' + event; } else if (event < 11) { -@@ -688,12 +691,25 @@ +@@ -691,12 +694,25 @@ } if (rtp->resp && (rtp->resp != resp)) { f = send_dtmf(rtp, AST_FRAME_DTMF_END); @@ -105,7 +105,7 @@ /*! * \brief Process RTP DTMF and events according to RFC 2833. * -@@ -1090,6 +1106,10 @@ +@@ -1101,6 +1117,10 @@ struct rtpPayloadType rtpPT; int reconstruct = ntohl(rtpheader[0]); @@ -116,7 +116,7 @@ /* Get fields from packet */ payload = (reconstruct & 0x7f0000) >> 16; mark = (((reconstruct & 0x800000) >> 23) != 0); -@@ -1097,10 +1117,6 @@ +@@ -1108,10 +1128,6 @@ /* Check what the payload value should be */ rtpPT = ast_rtp_lookup_pt(rtp, payload); @@ -127,7 +127,7 @@ /* Otherwise adjust bridged payload to match */ bridged_payload = ast_rtp_lookup_code(bridged, rtpPT.isAstFormat, rtpPT.code); -@@ -1293,11 +1309,12 @@ +@@ -1306,11 +1322,12 @@ /* This is special in-band data that's not one of our codecs */ if (rtpPT.code == AST_RTP_DTMF) { /* It's special -- rfc2833 process it */ @@ -141,7 +141,7 @@ data = rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen; event = ntohl(*((unsigned int *)(data))); event >>= 24; -@@ -1306,9 +1323,12 @@ +@@ -1319,9 +1336,12 @@ event_end >>= 24; duration = ntohl(*((unsigned int *)(data))); duration &= 0xFFFF; @@ -155,7 +155,7 @@ } else if (rtpPT.code == AST_RTP_CISCO_DTMF) { /* It's really special -- process it the Cisco way */ if (rtp->lastevent <= seqno || (rtp->lastevent >= 65530 && seqno <= 6)) { -@@ -2272,8 +2292,9 @@ +@@ -2287,8 +2307,9 @@ ast_log(LOG_ERROR, "RTP Transmission error to %s:%u: %s\n", ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), strerror(errno)); @@ -167,7 +167,7 @@ ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); /* Increment sequence number */ -@@ -2316,8 +2337,9 @@ +@@ -2331,8 +2352,9 @@ ast_log(LOG_ERROR, "RTP Transmission error to %s:%d: %s\n", ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), strerror(errno)); @@ -179,7 +179,7 @@ ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); -@@ -3609,6 +3631,16 @@ +@@ -3621,6 +3643,16 @@ return RESULT_SUCCESS; } @@ -196,7 +196,7 @@ static int rtp_do_debug(int fd, int argc, char *argv[]) { if (argc != 2) { -@@ -3669,6 +3701,7 @@ +@@ -3681,6 +3713,7 @@ if (argc != 3) return RESULT_SHOWUSAGE; rtpdebug = 0; @@ -204,7 +204,7 @@ ast_cli(fd,"RTP Debugging Disabled\n"); return RESULT_SUCCESS; } -@@ -3729,7 +3762,7 @@ +@@ -3741,7 +3774,7 @@ } static char debug_usage[] = @@ -213,7 +213,7 @@ " Enable dumping of all RTP packets to and from host.\n"; static char no_debug_usage[] = -@@ -3804,6 +3837,10 @@ +@@ -3816,6 +3849,10 @@ rtp_do_debug, "Enable RTP debugging", debug_usage }, diff --git a/net/asterisk10/files/nocodecnego-patch-Makefile b/net/asterisk10/files/nocodecnego-patch-Makefile index 78a3b3b45d23..c5df459f1b2c 100644 --- a/net/asterisk10/files/nocodecnego-patch-Makefile +++ b/net/asterisk10/files/nocodecnego-patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2009-06-11 15:20:31.000000000 -0700 -+++ Makefile 2009-09-18 02:47:39.000000000 -0700 -@@ -95,7 +95,7 @@ +--- Makefile.orig 2009-10-23 17:00:01.000000000 +0300 ++++ Makefile 2009-11-23 16:44:36.000000000 +0200 +@@ -101,7 +101,7 @@ OVERWRITE=y # Include debug and macro symbols in the executables (-g) and profiling info (-pg) @@ -9,7 +9,7 @@ # Staging directory # Files are copied here temporarily during the install process -@@ -129,7 +129,7 @@ +@@ -135,7 +135,7 @@ ASTMANDIR=$(mandir) ifneq ($(findstring BSD,$(OSARCH)),) ASTVARLIBDIR=$(prefix)/share/asterisk @@ -18,33 +18,37 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif -@@ -219,9 +219,11 @@ - ASTLDFLAGS+=-L/usr/local/lib +@@ -225,9 +225,11 @@ + _ASTLDFLAGS+=-L/usr/local/lib endif +ifneq ($(OSARCH),FreeBSD) ifneq ($(PROC),ultrasparc) - ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) endif +endif ifeq ($(PROC),ppc) - ASTCFLAGS+=-fsigned-char -@@ -229,7 +231,7 @@ + _ASTCFLAGS+=-fsigned-char +@@ -235,7 +237,7 @@ ifeq ($(OSARCH),FreeBSD) # -V is understood by BSD Make, not by GNU make. - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) + BSDVERSION=$(OSVERSION) - ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) + _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) endif -@@ -404,19 +406,19 @@ +@@ -410,21 +412,21 @@ rm -f build_tools/menuselect-deps datafiles: _all -- if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi -+ #if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi +- if [ `$(ID) -u` = 0 ]; then \ +- CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \ +- fi ++ #if [ `$(ID) -u` = 0 ]; then \ ++ # CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \ ++ #fi # Should static HTTP be installed during make samples or even with its own target ala # webvoicemail? There are portions here that *could* be customized but might also be # improved a lot. I'll put it here for now. @@ -65,7 +69,7 @@ $(MAKE) -C sounds install update: -@@ -437,47 +439,47 @@ +@@ -445,47 +447,47 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) installdirs: @@ -145,7 +149,7 @@ fi $(SUBDIRS_INSTALL): -@@ -513,7 +515,7 @@ +@@ -521,7 +523,7 @@ @exit 1 endif @@ -154,7 +158,7 @@ @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -@@ -551,31 +553,23 @@ +@@ -559,31 +561,23 @@ upgrade: bininstall adsi: @@ -194,7 +198,7 @@ ( \ echo "[directories]" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -621,20 +615,23 @@ +@@ -629,20 +623,23 @@ echo ";astctlowner = root" ; \ echo ";astctlgroup = apache" ; \ echo ";astctl = asterisk.ctl" ; \ diff --git a/net/asterisk10/files/patch-Makefile.rules b/net/asterisk10/files/patch-Makefile.rules index d129d9784b3c..f90430ec9ddd 100644 --- a/net/asterisk10/files/patch-Makefile.rules +++ b/net/asterisk10/files/patch-Makefile.rules @@ -1,21 +1,16 @@ - -$FreeBSD$ - ---- Makefile.rules -+++ Makefile.rules -@@ -27,6 +27,7 @@ - CMD_PREFIX= - endif +--- Makefile.rules.orig 2009-09-28 22:09:25.000000000 +0300 ++++ Makefile.rules 2009-11-23 16:15:23.000000000 +0200 +@@ -37,11 +37,13 @@ + + OPTIMIZE?=-O6 +ifneq ($(OSARCH),FreeBSD) ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) - # More GSM codec optimization - # Uncomment to enable MMXTM optimizations for x86 architecture CPU's -@@ -37,6 +38,7 @@ - OPTIMIZE?=-O6 - ASTCFLAGS+=$(OPTIMIZE) + _ASTCFLAGS+=$(OPTIMIZE) + else + _ASTCFLAGS+=-O0 endif +endif - %.o: %.c - $(ECHO_PREFIX) echo " [CC] $< -> $@" + # shortcuts for common combinations of flags; these must be recursively expanded so that + # per-target settings will be applied diff --git a/net/asterisk10/files/patch-channels::Makefile b/net/asterisk10/files/patch-channels::Makefile index fa5a90a988fa..bb9d20047899 100644 --- a/net/asterisk10/files/patch-channels::Makefile +++ b/net/asterisk10/files/patch-channels::Makefile @@ -1,8 +1,5 @@ - -$FreeBSD$ - ---- channels/Makefile.orig -+++ channels/Makefile +--- channels/Makefile.orig 2009-07-21 16:04:44.000000000 +0300 ++++ channels/Makefile 2009-11-20 18:05:45.000000000 +0200 @@ -32,9 +32,10 @@ endif @@ -36,16 +33,16 @@ $FreeBSD$ endif dist-clean:: -@@ -113,8 +115,12 @@ +@@ -111,8 +113,12 @@ else chan_h323.so: chan_h323.o h323/libchanh323.a $(ECHO_PREFIX) echo " [LD] $^ -> $@" +ifeq ($(OSARCH),FreeBSD) + $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) $(CHANH323LIB) +else - $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat + $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat $(ASTLDFLAGS) endif +endif - chan_misdn.o: ASTCFLAGS+=-Imisdn + chan_misdn.o: _ASTCFLAGS+=-Imisdn diff --git a/net/asterisk10/files/patch-configure b/net/asterisk10/files/patch-configure index 0782453c279b..93432489e415 100644 --- a/net/asterisk10/files/patch-configure +++ b/net/asterisk10/files/patch-configure @@ -1,6 +1,9 @@ ---- configure.orig 2009-04-27 22:29:46.000000000 +0300 -+++ configure 2009-05-26 12:59:22.000000000 +0300 -@@ -4064,8 +4064,6 @@ + +$FreeBSD$ + +--- configure.orig ++++ configure +@@ -4308,8 +4308,6 @@ case "${host_os}" in freebsd*) ac_default_prefix=/usr/local @@ -9,7 +12,7 @@ ;; darwin*) -@@ -27145,7 +27143,7 @@ +@@ -16837,7 +16835,7 @@ fi @@ -17,20 +20,4 @@ + PLATFORM_OPENH323="h323_${OPENH323_SUFFIX}" if test "${HAS_OPENH323:-unset}" != "unset"; then - { $as_echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5 -@@ -31624,6 +31622,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default -+#include <ptlib.h> - #include <h323.h> - _ACEOF - rm -f conftest.$ac_objext -@@ -31665,6 +31664,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <ptlib.h> - #include <h323.h> - _ACEOF - if { (ac_try="$ac_cpp conftest.$ac_ext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 installation validity" >&5 diff --git a/net/asterisk10/files/patch-main::Makefile b/net/asterisk10/files/patch-main::Makefile index 418714ab7f21..a4758b78bdc9 100644 --- a/net/asterisk10/files/patch-main::Makefile +++ b/net/asterisk10/files/patch-main::Makefile @@ -1,13 +1,13 @@ ---- main/Makefile.orig 2009-04-09 07:31:38.000000000 +0300 -+++ main/Makefile 2009-05-26 13:07:50.000000000 +0300 +--- main/Makefile.orig 2009-08-01 03:52:00.000000000 +0300 ++++ main/Makefile 2009-11-20 18:09:06.000000000 +0200 @@ -92,8 +92,8 @@ - cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(ASTCFLAGS:-Werror=))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR) + cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS:-Werror=)) $(ASTCFLAGS)" LDFLAGS="$(_ASTLDFLAGS) $(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR) $(MAKE) -C editline libedit.a -db1-ast/libdb1.a: -- CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a +- _ASTCFLAGS="$(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS) -Wno-strict-aliasing" $(MAKE) -C db1-ast libdb1.a +#db1-ast/libdb1.a: -+# CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a ++# _ASTCFLAGS="$(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS) -Wno-strict-aliasing" $(MAKE) -C db1-ast libdb1.a ast_expr2.c ast_expr2.h: bison -o $@ -d --name-prefix=ast_yy ast_expr2.y @@ -22,15 +22,15 @@ mv $(ASTTOPDIR)/include/asterisk/build.h.tmp $(ASTTOPDIR)/include/asterisk/build.h ; \ fi @rm -f $(ASTTOPDIR)/include/asterisk/build.h.tmp - @$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c + @$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS) - $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@" + $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) -> $@" ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),) -- $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) -+ $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) +- $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(ASTLDFLAGS) ++ $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(ASTLDFLAGS) else -- $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) -+ $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) +- $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(ASTLDFLAGS) ++ $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(ASTLDFLAGS) endif clean:: diff --git a/net/asterisk10/files/patch-suppress_log_dups.diff b/net/asterisk10/files/patch-suppress_log_dups.diff new file mode 100644 index 000000000000..115b69f21ca1 --- /dev/null +++ b/net/asterisk10/files/patch-suppress_log_dups.diff @@ -0,0 +1,270 @@ +Index: main/logger.c +=================================================================== +--- main/logger.c (revision 188505) ++++ main/logger.c (working copy) +@@ -140,6 +140,17 @@ + AST_THREADSTORAGE(log_buf, log_buf_init); + #define LOG_BUF_INIT_SIZE 128 + ++/* ++ * Storage for previous log message to prevent log storms ++ */ ++static int stored_log_level; ++static int stored_log_dup_count = 0; ++static char *stored_log_msg = NULL; ++static const char *stored_log_file; ++static int stored_log_line; ++static const char *stored_log_function; ++static ast_mutex_t stored_log_msg_lock; ++ + static int make_components(char *s, int lineno) + { + char *w; +@@ -591,6 +602,8 @@ + char tmp[256]; + int res = 0; + ++ ast_mutex_init(&stored_log_msg_lock); ++ + /* auto rotate if sig SIGXFSZ comes a-knockin */ + (void) signal(SIGXFSZ,(void *) handle_SIGXFSZ); + +@@ -655,14 +668,14 @@ + return; + } + +-static void __attribute__((format(printf, 5, 0))) ast_log_vsyslog(int level, const char *file, int line, const char *function, const char *fmt, va_list args) ++static void ast_log_syslog(int level, const char *file, int line, const char *function, const char *msg) + { + char buf[BUFSIZ]; + char *s; + + if (level >= SYSLOG_NLEVELS) { + /* we are locked here, so cannot ast_log() */ +- fprintf(stderr, "ast_log_vsyslog called with bogus level: %d\n", level); ++ fprintf(stderr, "ast_log_syslog called with bogus level: %d\n", level); + return; + } + if (level == __LOG_VERBOSE) { +@@ -676,27 +689,20 @@ + levels[level], (long)GETTID(), file, line, function); + } + s = buf + strlen(buf); +- vsnprintf(s, sizeof(buf) - strlen(buf), fmt, args); ++ snprintf(s, sizeof(buf) - strlen(buf), "%s", msg); + term_strip(s, s, strlen(s) + 1); + syslog(syslog_level_map[level], "%s", buf); + } + +-/*! +- * \brief send log messages to syslog and/or the console +- */ +-void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) ++static void __ast_log(int level, const char *file, int line, const char *function, char *msg, int msglen) + { + struct logchannel *chan; +- struct ast_dynamic_str *buf; + time_t t; + struct tm tm; + char date[256]; ++ char buf[2048]; ++ int res; + +- va_list ap; +- +- if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE))) +- return; +- + if (AST_LIST_EMPTY(&logchannels)) + { + /* +@@ -704,35 +710,12 @@ + * so just log to stdout + */ + if (level != __LOG_VERBOSE) { +- int res; +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) { +- term_filter_escapes(buf->str); +- fputs(buf->str, stdout); +- } ++ term_filter_escapes(msg); ++ fputs(msg, stdout); + } + return; + } + +- /* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug +- are non-zero; LOG_DEBUG messages can still be displayed if option_debug +- is zero, if option_verbose is non-zero (this allows for 'level zero' +- LOG_DEBUG messages to be displayed, if the logmask on any channel +- allows it) +- */ +- if (!option_verbose && !option_debug && (level == __LOG_DEBUG)) +- return; +- +- /* Ignore anything that never gets logged anywhere */ +- if (!(global_logmask & (1 << level))) +- return; +- +- /* Ignore anything other than the currently debugged file if there is one */ +- if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file)) +- return; +- + time(&t); + ast_localtime(&t, &tm, NULL); + strftime(date, sizeof(date), dateformat, &tm); +@@ -740,13 +723,8 @@ + AST_LIST_LOCK(&logchannels); + + if (logfiles.event_log && level == __LOG_EVENT) { +- va_start(ap, fmt); +- +- fprintf(eventlog, "%s asterisk[%ld]: ", date, (long)getpid()); +- vfprintf(eventlog, fmt, ap); ++ fprintf(eventlog, "%s asterisk[%ld]: %s", date, (long)getpid(), msg); + fflush(eventlog); +- +- va_end(ap); + AST_LIST_UNLOCK(&logchannels); + return; + } +@@ -756,18 +734,15 @@ + break; + /* Check syslog channels */ + if (chan->type == LOGTYPE_SYSLOG && (chan->logmask & (1 << level))) { +- va_start(ap, fmt); +- ast_log_vsyslog(level, file, line, function, fmt, ap); +- va_end(ap); ++ ast_log_syslog(level, file, line, function, msg); + /* Console channels */ + } else if ((chan->logmask & (1 << level)) && (chan->type == LOGTYPE_CONSOLE)) { + char linestr[128]; + char tmp1[80], tmp2[80], tmp3[80], tmp4[80]; + + if (level != __LOG_VERBOSE) { +- int res; + sprintf(linestr, "%d", line); +- ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf, ++ snprintf(buf, sizeof(buf), + "[%s] %s[%ld]: %s:%s %s: ", + date, + term_color(tmp1, levels[level], colors[level], 0, sizeof(tmp1)), +@@ -776,23 +751,17 @@ + term_color(tmp3, linestr, COLOR_BRWHITE, 0, sizeof(tmp3)), + term_color(tmp4, function, COLOR_BRWHITE, 0, sizeof(tmp4))); + /*filter to the console!*/ +- term_filter_escapes(buf->str); +- ast_console_puts_mutable(buf->str); +- +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) +- ast_console_puts_mutable(buf->str); ++ term_filter_escapes(buf); ++ ast_console_puts_mutable(buf); ++ ast_console_puts_mutable(msg); + } + /* File channels */ + } else if ((chan->logmask & (1 << level)) && (chan->fileptr)) { +- int res; +- ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf, ++ snprintf(buf, sizeof(buf), + "[%s] %s[%ld] %s: ", + date, levels[level], (long)GETTID(), file); +- res = fprintf(chan->fileptr, "%s", buf->str); +- if (res <= 0 && !ast_strlen_zero(buf->str)) { /* Error, no characters printed */ ++ res = fprintf(chan->fileptr, "%s", buf); ++ if (res <= 0 && !ast_strlen_zero(buf)) { /* Error, no characters printed */ + fprintf(stderr,"**** Asterisk Logging Error: ***********\n"); + if (errno == ENOMEM || errno == ENOSPC) { + fprintf(stderr, "Asterisk logging error: Out of disk space, can't log to log file %s\n", chan->filename); +@@ -801,16 +770,10 @@ + manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: No\r\nReason: %d - %s\r\n", chan->filename, errno, strerror(errno)); + chan->disabled = 1; + } else { +- int res; + /* No error message, continue printing */ +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) { +- term_strip(buf->str, buf->str, buf->len); +- fputs(buf->str, chan->fileptr); +- fflush(chan->fileptr); +- } ++ term_strip(msg, msg, msglen); ++ fputs(msg, chan->fileptr); ++ fflush(chan->fileptr); + } + } + } +@@ -825,6 +788,65 @@ + } + } + ++/*! ++ * \brief send log messages to syslog and/or the console ++ */ ++void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) ++{ ++ struct ast_dynamic_str *buf; ++ int res; ++ va_list ap; ++ ++ if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE))) ++ return; ++ ++ va_start(ap, fmt); ++ res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); ++ va_end(ap); ++ if (res == AST_DYNSTR_BUILD_FAILED) ++ return; ++ ++ /* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug ++ are non-zero; LOG_DEBUG messages can still be displayed if option_debug ++ is zero, if option_verbose is non-zero (this allows for 'level zero' ++ LOG_DEBUG messages to be displayed, if the logmask on any channel ++ allows it) ++ */ ++ if (!option_verbose && !option_debug && (level == __LOG_DEBUG)) ++ return; ++ ++ /* Ignore anything that never gets logged anywhere */ ++ if (!(global_logmask & (1 << level))) ++ return; ++ ++ /* Ignore anything other than the currently debugged file if there is one */ ++ if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file)) ++ return; ++ ++ ast_mutex_lock(&stored_log_msg_lock); ++ if (stored_log_msg == NULL || stored_log_level != level || strcmp(buf->str, stored_log_msg) != 0) { ++ if (stored_log_dup_count > 0) { ++ char buf2[1024]; ++ ++ snprintf(buf2, sizeof(buf2), "Last message repeated %d times\n", stored_log_dup_count); ++ __ast_log(stored_log_level, stored_log_file, stored_log_line, stored_log_function, buf2, strlen(buf2)); ++ } ++ if (stored_log_msg != NULL) ++ ast_free(stored_log_msg); ++ stored_log_msg = ast_strdup(buf->str); ++ stored_log_level = level; ++ stored_log_dup_count = 0; ++ stored_log_file = file; ++ stored_log_line = line; ++ stored_log_function = function; ++ __ast_log(level, file, line, function, buf->str, buf->len); ++ } ++ else ++ ++stored_log_dup_count; ++ ++ ast_mutex_unlock(&stored_log_msg_lock); ++} ++ + void ast_backtrace(void) + { + #ifdef linux diff --git a/net/asterisk10/files/rtp_force_dtmf-codecnego.diff b/net/asterisk10/files/rtp_force_dtmf-codecnego.diff index 723bd8703c06..a670364ba603 100644 --- a/net/asterisk10/files/rtp_force_dtmf-codecnego.diff +++ b/net/asterisk10/files/rtp_force_dtmf-codecnego.diff @@ -1,6 +1,6 @@ ---- channels/chan_sip.c.orig 2008-03-12 17:37:00.000000000 +0200 -+++ channels/chan_sip.c 2008-03-12 18:17:33.000000000 +0200 -@@ -554,6 +554,9 @@ +--- channels/chan_sip.c.orig 2009-11-20 17:56:30.000000000 +0200 ++++ channels/chan_sip.c 2009-11-20 17:59:43.000000000 +0200 +@@ -565,6 +565,9 @@ static unsigned int global_tos_sip; /*!< IP type of service for SIP packets */ static unsigned int global_tos_audio; /*!< IP type of service for audio RTP packets */ static unsigned int global_tos_video; /*!< IP type of service for video RTP packets */ @@ -10,37 +10,37 @@ static int compactheaders; /*!< send compact sip headers */ static int recordhistory; /*!< Record SIP history. Off by default */ static int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */ -@@ -4983,6 +4986,8 @@ - int codec_index = 0; - int codec_pt_order[256]; +@@ -5329,6 +5332,7 @@ + int x; + int codec_index = 0; + int codec_pt_order[256]; ++ int dtmf_present = 0; -+ int dtmf_present = 0; + /* Host information */ + struct ast_hostent audiohp; +@@ -5600,12 +5604,21 @@ + for (x = 0; x < codec_index; ++x) { + struct rtpPayloadType pt; + pt = ast_rtp_lookup_pt(p->rtp, codec_pt_order[x]); ++ if (pt.code == AST_RTP_DTMF) ++ dtmf_present = 1; + if (!pt.isAstFormat && !pt.code && p->vrtp) + pt = ast_rtp_lookup_pt(p->vrtp, codec_pt_order[x]); + if (pt.isAstFormat) + ast_codec_pref_append(&p->formats, pt.code); + } + ast_codec_pref_remove2(&p->formats, ~p->usercapability); ++ if (!dtmf_present && global_force_dtmf_relay) { ++ newnoncodeccapability |= AST_RTP_DTMF; ++ ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); ++ codec_pt_order[codec_index++] = global_force_dtmf_relay_pt; ++ ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); ++ } + - if (!p->rtp) { - ast_log(LOG_ERROR, "Got SDP but have no RTP session allocated.\n"); - return -1; -@@ -5408,12 +5413,20 @@ - for (x = 0; x < codec_index; ++x) { - struct rtpPayloadType pt; - pt = ast_rtp_lookup_pt(p->rtp, codec_pt_order[x]); -+ if (pt.code == AST_RTP_DTMF) -+ dtmf_present = 1; - if (!pt.isAstFormat && !pt.code && p->vrtp) - pt = ast_rtp_lookup_pt(p->vrtp, codec_pt_order[x]); - if (pt.isAstFormat) - ast_codec_pref_append(&p->formats, pt.code); - } - ast_codec_pref_remove2(&p->formats, ~p->usercapability); -+ if (!dtmf_present && global_force_dtmf_relay) { -+ newnoncodeccapability |= AST_RTP_DTMF; -+ ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); -+ codec_pt_order[codec_index++] = global_force_dtmf_relay_pt; -+ ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); -+ } - + /* Now gather all of the codecs that we are asked for: */ ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); -@@ -16845,6 +16858,9 @@ +@@ -18369,6 +18382,9 @@ global_matchexterniplocally = FALSE; @@ -50,7 +50,7 @@ /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); -@@ -16901,6 +16917,18 @@ +@@ -18431,6 +18447,18 @@ } } else if (!strcasecmp(v->name, "vmexten")) { ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten)); @@ -67,7 +67,7 @@ + } else + ast_log(LOG_WARNING, "RTP forced DTMF relay payload type is %d\n", global_force_dtmf_relay_pt); } else if (!strcasecmp(v->name, "rtptimeout")) { - if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { + if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno); --- configs/sip.conf.sample.orig 2008-04-25 08:53:52.000000000 -0700 +++ configs/sip.conf.sample 2008-06-10 00:45:37.000000000 -0700 diff --git a/net/asterisk10/files/rtp_force_dtmf-nocodecnego.diff b/net/asterisk10/files/rtp_force_dtmf-nocodecnego.diff index 9b1d521fa0e3..9dcb7d8b134f 100644 --- a/net/asterisk10/files/rtp_force_dtmf-nocodecnego.diff +++ b/net/asterisk10/files/rtp_force_dtmf-nocodecnego.diff @@ -1,6 +1,6 @@ ---- channels/chan_sip.c.orig 2008-09-09 00:10:10.000000000 +0300 -+++ channels/chan_sip.c 2008-12-12 17:02:05.000000000 +0200 -@@ -557,6 +557,9 @@ +--- channels/chan_sip.c.orig 2009-11-23 17:28:47.000000000 +0200 ++++ channels/chan_sip.c 2009-11-23 17:29:29.000000000 +0200 +@@ -565,6 +565,9 @@ static unsigned int global_tos_sip; /*!< IP type of service for SIP packets */ static unsigned int global_tos_audio; /*!< IP type of service for audio RTP packets */ static unsigned int global_tos_video; /*!< IP type of service for video RTP packets */ @@ -10,21 +10,20 @@ static int compactheaders; /*!< send compact sip headers */ static int recordhistory; /*!< Record SIP history. Off by default */ static int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */ -@@ -5504,6 +5507,13 @@ - +@@ -5593,6 +5596,12 @@ + /* Now gather all of the codecs that we are asked for: */ ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); + /* Add telephone-event */ + if (global_force_dtmf_relay && !(peernoncodeccapability & AST_RTP_DTMF)) { + ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); -+ found_rtpmap_codecs[last_rtpmap_codec++] = global_force_dtmf_relay_pt; + ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); + peernoncodeccapability |= AST_RTP_DTMF; + } ast_rtp_get_current_formats(newvideortp, &vpeercapability, &vpeernoncodeccapability); newjointcapability = p->capability & (peercapability | vpeercapability); -@@ -17440,6 +17450,9 @@ +@@ -18366,6 +18375,9 @@ global_matchexterniplocally = FALSE; @@ -34,7 +33,7 @@ /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); -@@ -17496,6 +17509,18 @@ +@@ -18428,6 +18440,18 @@ } } else if (!strcasecmp(v->name, "vmexten")) { ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten)); @@ -51,7 +50,7 @@ + } else + ast_log(LOG_WARNING, "RTP forced DTMF relay payload type is %d\n", global_force_dtmf_relay_pt); } else if (!strcasecmp(v->name, "rtptimeout")) { - if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { + if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno); --- configs/sip.conf.sample.orig 2008-08-16 01:33:42.000000000 +0300 +++ configs/sip.conf.sample 2008-12-12 17:03:11.000000000 +0200 diff --git a/net/asterisk10/pkg-plist b/net/asterisk10/pkg-plist index 465dbb095d9d..fa747b6e8a6e 100644 --- a/net/asterisk10/pkg-plist +++ b/net/asterisk10/pkg-plist @@ -435,23 +435,22 @@ share/asterisk/agi-bin/agi-test.agi share/asterisk/agi-bin/eagi-sphinx-test share/asterisk/agi-bin/eagi-test share/asterisk/agi-bin/jukebox.agi -share/asterisk/firmware/iax/iaxy.bin share/asterisk/images/asterisk-intro.jpg share/asterisk/keys/freeworlddialup.pub share/asterisk/keys/iaxtel.pub -share/asterisk/moh/.asterisk-moh-freeplay-wav -share/asterisk/moh/CHANGES-asterisk-moh-opsound-2.01 -share/asterisk/moh/CREDITS-asterisk-moh-opsound-2.01 -share/asterisk/moh/LICENSE-asterisk-moh-opsound-2.01 +share/asterisk/moh/.asterisk-moh-opsound-wav +share/asterisk/moh/CHANGES-asterisk-moh-opsound-wav +share/asterisk/moh/CREDITS-asterisk-moh-opsound-wav +share/asterisk/moh/LICENSE-asterisk-moh-opsound-wav share/asterisk/moh/macroform-cold_day.wav share/asterisk/moh/macroform-robot_dity.wav share/asterisk/moh/macroform-the_simplicity.wav share/asterisk/moh/manolo_camp-morning_coffee.wav share/asterisk/moh/reno_project-system.wav -share/asterisk/sounds/.asterisk-core-sounds-en-gsm-1.4.15 -share/asterisk/sounds/CHANGES-asterisk-core-en-1.4.15 -share/asterisk/sounds/CREDITS-asterisk-core-en-1.4.15 -share/asterisk/sounds/LICENSE-asterisk-core-en-1.4.15 +share/asterisk/sounds/.asterisk-core-sounds-en-gsm-1.4.17 +share/asterisk/sounds/CHANGES-asterisk-core-en-1.4.17 +share/asterisk/sounds/CREDITS-asterisk-core-en-1.4.17 +share/asterisk/sounds/LICENSE-asterisk-core-en-1.4.17 share/asterisk/sounds/agent-alreadyon.gsm share/asterisk/sounds/agent-incorrect.gsm share/asterisk/sounds/agent-loggedoff.gsm @@ -842,6 +841,7 @@ share/asterisk/sounds/vm-opts.gsm share/asterisk/sounds/vm-opts-full.gsm share/asterisk/sounds/vm-passchanged.gsm share/asterisk/sounds/vm-password.gsm +share/asterisk/sounds/vm-pls-try-again.gsm share/asterisk/sounds/vm-press.gsm share/asterisk/sounds/vm-prev.gsm share/asterisk/sounds/vm-reachoper.gsm diff --git a/net/asterisk14/Makefile b/net/asterisk14/Makefile index 035e291fa93c..90cbd55a5c21 100644 --- a/net/asterisk14/Makefile +++ b/net/asterisk14/Makefile @@ -6,8 +6,7 @@ # PORTNAME= asterisk -PORTVERSION= 1.4.26.2 -PORTREVISION= 1 +PORTVERSION= 1.4.29 CATEGORIES= net MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \ http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ @@ -32,14 +31,13 @@ CPPFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/openh323 USE_GMAKE= yes USE_BISON= build USE_RC_SUBR= asterisk.sh -MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ - PTHREAD_LIBS="${PTHREAD_LIBS}" \ - MKDIR="${MKDIR}" \ +MAKE_ENV= MKDIR="${MKDIR}" \ PWLIBDIR=${LOCALBASE}/share/pwlib \ OPENH323DIR=${LOCALBASE}/share/openh323 \ OSVERSION=${OSVERSION} \ NOISY_BUILD=YES \ - ASTCFLAGS="${CFLAGS}" + ASTCFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}" \ + ASTLDFLAGS="${PTHREAD_LIBS} -L${LOCALBASE}/lib" MAN8= asterisk.8 astgenkey.8 autosupport.8 safe_asterisk.8 CONFLICTS= asterisk*-1.2* asterisk*-1.6* @@ -171,7 +169,7 @@ EXTRA_PATCHES+= ${PATCHDIR}/ilbc_enable.diff .endif .if defined(WITH_CODEC_PATCH) -PATCHFILES= asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz +PATCHFILES= asterisk-1.4.27-codec-negotiation-20091120.diff.gz PATCH_SITES= http://b2bua.org/chrome/site/ EXTRA_PATCHES+= ${PATCHDIR}/codecnego-patch-Makefile .else diff --git a/net/asterisk14/distinfo b/net/asterisk14/distinfo index 3efa703cbbc7..1c21b1a25ead 100644 --- a/net/asterisk14/distinfo +++ b/net/asterisk14/distinfo @@ -1,6 +1,6 @@ -MD5 (asterisk-1.4.26.2.tar.gz) = 58181c29d998f883f567dc9757a04167 -SHA256 (asterisk-1.4.26.2.tar.gz) = 384e080e359ae28ca9323800a3fa0586210342039b96ecbdced9ea285516efe9 -SIZE (asterisk-1.4.26.2.tar.gz) = 21436723 -MD5 (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = ae433b0c9574e0616cf014703641f62a -SHA256 (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = 65bd0d773a2ddc56bfa60a1bd9269eded2edf0062adf4f8afe393c6d41f27039 -SIZE (asterisk-1.4.26.2-codec-negotiation-20090916.diff.gz) = 40621 +MD5 (asterisk-1.4.29.tar.gz) = b49d0a269e11b6e85c75edce577b5103 +SHA256 (asterisk-1.4.29.tar.gz) = ecb1202f50fc5d7738d1b5bf6451b28e356f3469266dd64bcd637be71f91bd09 +SIZE (asterisk-1.4.29.tar.gz) = 21534219 +MD5 (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 4dedd23b3c9c00bcdcc69b8be878f15c +SHA256 (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 68f895de29f30296a47d32a5eaab8df367d92ae87b01ea9f2262556a1f1e5cbb +SIZE (asterisk-1.4.27-codec-negotiation-20091120.diff.gz) = 40455 diff --git a/net/asterisk14/files/codecnego-patch-Makefile b/net/asterisk14/files/codecnego-patch-Makefile index e19ba9db1f69..e39dd6f62082 100644 --- a/net/asterisk14/files/codecnego-patch-Makefile +++ b/net/asterisk14/files/codecnego-patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2009-10-20 14:49:16.000000000 -0700 -+++ Makefile 2009-10-20 14:49:55.000000000 -0700 -@@ -95,7 +95,7 @@ +--- Makefile.orig 2009-11-20 17:48:05.000000000 +0200 ++++ Makefile 2009-11-20 17:50:33.000000000 +0200 +@@ -101,7 +101,7 @@ OVERWRITE=y # Include debug and macro symbols in the executables (-g) and profiling info (-pg) @@ -9,7 +9,7 @@ # Staging directory # Files are copied here temporarily during the install process -@@ -129,7 +129,7 @@ +@@ -135,7 +135,7 @@ ASTMANDIR=$(mandir) ifneq ($(findstring BSD,$(OSARCH)),) ASTVARLIBDIR=$(prefix)/share/asterisk @@ -18,33 +18,28 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif -@@ -219,9 +219,11 @@ - ASTLDFLAGS+=-L/usr/local/lib +@@ -225,9 +225,11 @@ + _ASTLDFLAGS+=-L/usr/local/lib endif +ifneq ($(OSARCH),FreeBSD) ifneq ($(PROC),ultrasparc) - ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) endif +endif ifeq ($(PROC),ppc) - ASTCFLAGS+=-fsigned-char -@@ -229,7 +231,7 @@ + _ASTCFLAGS+=-fsigned-char +@@ -235,7 +237,7 @@ ifeq ($(OSARCH),FreeBSD) # -V is understood by BSD Make, not by GNU make. - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) + BSDVERSION=$(OSVERSION) - ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) + _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) endif -@@ -404,19 +406,19 @@ - rm -f build_tools/menuselect-deps - - datafiles: _all -- if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi -+ #if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi +@@ -416,15 +418,15 @@ # Should static HTTP be installed during make samples or even with its own target ala # webvoicemail? There are portions here that *could* be customized but might also be # improved a lot. I'll put it here for now. @@ -65,7 +60,7 @@ $(MAKE) -C sounds install update: -@@ -437,47 +439,47 @@ +@@ -445,47 +447,47 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) installdirs: @@ -145,7 +140,7 @@ fi $(SUBDIRS_INSTALL): -@@ -513,7 +515,7 @@ +@@ -521,7 +523,7 @@ @exit 1 endif @@ -154,7 +149,7 @@ @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -@@ -551,31 +553,23 @@ +@@ -559,31 +561,23 @@ upgrade: bininstall adsi: @@ -194,7 +189,7 @@ ( \ echo "[directories]" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -662,20 +656,23 @@ +@@ -670,20 +664,23 @@ echo "; Default: strict"; \ echo ";"; \ echo ";translation_algorithm = strict"; \ diff --git a/net/asterisk14/files/dtmf_debug.diff b/net/asterisk14/files/dtmf_debug.diff index 968554880ac3..2a5b6bc9ea33 100644 --- a/net/asterisk14/files/dtmf_debug.diff +++ b/net/asterisk14/files/dtmf_debug.diff @@ -49,9 +49,9 @@ /*! \brief Set rtp timeout */ void ast_rtp_set_rtptimeout(struct ast_rtp *rtp, int timeout); /*! \brief Set rtp hold timeout */ ---- main/rtp.c.orig 2009-05-13 16:38:01.000000000 +0300 -+++ main/rtp.c 2009-05-26 12:52:30.000000000 +0300 -@@ -80,6 +80,7 @@ +--- main/rtp.c.orig 2009-11-20 17:51:49.000000000 +0200 ++++ main/rtp.c 2009-11-20 17:53:11.000000000 +0200 +@@ -81,6 +81,7 @@ static int rtpstart; /*!< First port for RTP sessions (set in rtp.conf) */ static int rtpend; /*!< Last port for RTP sessions (set in rtp.conf) */ static int rtpdebug; /*!< Are we debugging? */ @@ -59,16 +59,16 @@ static int rtcpdebug; /*!< Are we debugging RTCP? */ static int rtcpstats; /*!< Are we debugging RTCP? */ static int rtcpinterval = RTCP_DEFAULT_INTERVALMS; /*!< Time between rtcp reports in millisecs */ -@@ -173,6 +174,8 @@ - struct ast_codec_pref pref; +@@ -170,6 +171,8 @@ struct ast_rtp *bridged; /*!< Who we are Packet bridged to */ int set_marker_bit:1; /*!< Whether to set the marker bit or not */ -+ char chan_name[100]; -+ char chan_id[100]; + unsigned int constantssrc:1; ++ char chan_name[100]; ++ char chan_id[100]; }; /* Forward declarations */ -@@ -673,8 +676,8 @@ +@@ -676,8 +679,8 @@ struct ast_frame *f = NULL; event = ntohl(*((unsigned int *)(data))); event &= 0x001F; @@ -79,7 +79,7 @@ if (event < 10) { resp = '0' + event; } else if (event < 11) { -@@ -688,12 +691,25 @@ +@@ -691,12 +694,25 @@ } if (rtp->resp && (rtp->resp != resp)) { f = send_dtmf(rtp, AST_FRAME_DTMF_END); @@ -105,7 +105,7 @@ /*! * \brief Process RTP DTMF and events according to RFC 2833. * -@@ -1090,6 +1106,10 @@ +@@ -1101,6 +1117,10 @@ struct rtpPayloadType rtpPT; int reconstruct = ntohl(rtpheader[0]); @@ -116,7 +116,7 @@ /* Get fields from packet */ payload = (reconstruct & 0x7f0000) >> 16; mark = (((reconstruct & 0x800000) >> 23) != 0); -@@ -1097,10 +1117,6 @@ +@@ -1108,10 +1128,6 @@ /* Check what the payload value should be */ rtpPT = ast_rtp_lookup_pt(rtp, payload); @@ -127,7 +127,7 @@ /* Otherwise adjust bridged payload to match */ bridged_payload = ast_rtp_lookup_code(bridged, rtpPT.isAstFormat, rtpPT.code); -@@ -1293,11 +1309,12 @@ +@@ -1306,11 +1322,12 @@ /* This is special in-band data that's not one of our codecs */ if (rtpPT.code == AST_RTP_DTMF) { /* It's special -- rfc2833 process it */ @@ -141,7 +141,7 @@ data = rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen; event = ntohl(*((unsigned int *)(data))); event >>= 24; -@@ -1306,9 +1323,12 @@ +@@ -1319,9 +1336,12 @@ event_end >>= 24; duration = ntohl(*((unsigned int *)(data))); duration &= 0xFFFF; @@ -155,7 +155,7 @@ } else if (rtpPT.code == AST_RTP_CISCO_DTMF) { /* It's really special -- process it the Cisco way */ if (rtp->lastevent <= seqno || (rtp->lastevent >= 65530 && seqno <= 6)) { -@@ -2272,8 +2292,9 @@ +@@ -2287,8 +2307,9 @@ ast_log(LOG_ERROR, "RTP Transmission error to %s:%u: %s\n", ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), strerror(errno)); @@ -167,7 +167,7 @@ ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); /* Increment sequence number */ -@@ -2316,8 +2337,9 @@ +@@ -2331,8 +2352,9 @@ ast_log(LOG_ERROR, "RTP Transmission error to %s:%d: %s\n", ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), strerror(errno)); @@ -179,7 +179,7 @@ ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); -@@ -3609,6 +3631,16 @@ +@@ -3621,6 +3643,16 @@ return RESULT_SUCCESS; } @@ -196,7 +196,7 @@ static int rtp_do_debug(int fd, int argc, char *argv[]) { if (argc != 2) { -@@ -3669,6 +3701,7 @@ +@@ -3681,6 +3713,7 @@ if (argc != 3) return RESULT_SHOWUSAGE; rtpdebug = 0; @@ -204,7 +204,7 @@ ast_cli(fd,"RTP Debugging Disabled\n"); return RESULT_SUCCESS; } -@@ -3729,7 +3762,7 @@ +@@ -3741,7 +3774,7 @@ } static char debug_usage[] = @@ -213,7 +213,7 @@ " Enable dumping of all RTP packets to and from host.\n"; static char no_debug_usage[] = -@@ -3804,6 +3837,10 @@ +@@ -3816,6 +3849,10 @@ rtp_do_debug, "Enable RTP debugging", debug_usage }, diff --git a/net/asterisk14/files/nocodecnego-patch-Makefile b/net/asterisk14/files/nocodecnego-patch-Makefile index 78a3b3b45d23..c5df459f1b2c 100644 --- a/net/asterisk14/files/nocodecnego-patch-Makefile +++ b/net/asterisk14/files/nocodecnego-patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2009-06-11 15:20:31.000000000 -0700 -+++ Makefile 2009-09-18 02:47:39.000000000 -0700 -@@ -95,7 +95,7 @@ +--- Makefile.orig 2009-10-23 17:00:01.000000000 +0300 ++++ Makefile 2009-11-23 16:44:36.000000000 +0200 +@@ -101,7 +101,7 @@ OVERWRITE=y # Include debug and macro symbols in the executables (-g) and profiling info (-pg) @@ -9,7 +9,7 @@ # Staging directory # Files are copied here temporarily during the install process -@@ -129,7 +129,7 @@ +@@ -135,7 +135,7 @@ ASTMANDIR=$(mandir) ifneq ($(findstring BSD,$(OSARCH)),) ASTVARLIBDIR=$(prefix)/share/asterisk @@ -18,33 +18,37 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif -@@ -219,9 +219,11 @@ - ASTLDFLAGS+=-L/usr/local/lib +@@ -225,9 +225,11 @@ + _ASTLDFLAGS+=-L/usr/local/lib endif +ifneq ($(OSARCH),FreeBSD) ifneq ($(PROC),ultrasparc) - ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) + _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) endif +endif ifeq ($(PROC),ppc) - ASTCFLAGS+=-fsigned-char -@@ -229,7 +231,7 @@ + _ASTCFLAGS+=-fsigned-char +@@ -235,7 +237,7 @@ ifeq ($(OSARCH),FreeBSD) # -V is understood by BSD Make, not by GNU make. - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) + BSDVERSION=$(OSVERSION) - ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) + _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) endif -@@ -404,19 +406,19 @@ +@@ -410,21 +412,21 @@ rm -f build_tools/menuselect-deps datafiles: _all -- if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi -+ #if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi +- if [ `$(ID) -u` = 0 ]; then \ +- CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \ +- fi ++ #if [ `$(ID) -u` = 0 ]; then \ ++ # CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \ ++ #fi # Should static HTTP be installed during make samples or even with its own target ala # webvoicemail? There are portions here that *could* be customized but might also be # improved a lot. I'll put it here for now. @@ -65,7 +69,7 @@ $(MAKE) -C sounds install update: -@@ -437,47 +439,47 @@ +@@ -445,47 +447,47 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) installdirs: @@ -145,7 +149,7 @@ fi $(SUBDIRS_INSTALL): -@@ -513,7 +515,7 @@ +@@ -521,7 +523,7 @@ @exit 1 endif @@ -154,7 +158,7 @@ @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -@@ -551,31 +553,23 @@ +@@ -559,31 +561,23 @@ upgrade: bininstall adsi: @@ -194,7 +198,7 @@ ( \ echo "[directories]" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -621,20 +615,23 @@ +@@ -629,20 +623,23 @@ echo ";astctlowner = root" ; \ echo ";astctlgroup = apache" ; \ echo ";astctl = asterisk.ctl" ; \ diff --git a/net/asterisk14/files/patch-Makefile.rules b/net/asterisk14/files/patch-Makefile.rules index d129d9784b3c..f90430ec9ddd 100644 --- a/net/asterisk14/files/patch-Makefile.rules +++ b/net/asterisk14/files/patch-Makefile.rules @@ -1,21 +1,16 @@ - -$FreeBSD$ - ---- Makefile.rules -+++ Makefile.rules -@@ -27,6 +27,7 @@ - CMD_PREFIX= - endif +--- Makefile.rules.orig 2009-09-28 22:09:25.000000000 +0300 ++++ Makefile.rules 2009-11-23 16:15:23.000000000 +0200 +@@ -37,11 +37,13 @@ + + OPTIMIZE?=-O6 +ifneq ($(OSARCH),FreeBSD) ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) - # More GSM codec optimization - # Uncomment to enable MMXTM optimizations for x86 architecture CPU's -@@ -37,6 +38,7 @@ - OPTIMIZE?=-O6 - ASTCFLAGS+=$(OPTIMIZE) + _ASTCFLAGS+=$(OPTIMIZE) + else + _ASTCFLAGS+=-O0 endif +endif - %.o: %.c - $(ECHO_PREFIX) echo " [CC] $< -> $@" + # shortcuts for common combinations of flags; these must be recursively expanded so that + # per-target settings will be applied diff --git a/net/asterisk14/files/patch-channels::Makefile b/net/asterisk14/files/patch-channels::Makefile index fa5a90a988fa..bb9d20047899 100644 --- a/net/asterisk14/files/patch-channels::Makefile +++ b/net/asterisk14/files/patch-channels::Makefile @@ -1,8 +1,5 @@ - -$FreeBSD$ - ---- channels/Makefile.orig -+++ channels/Makefile +--- channels/Makefile.orig 2009-07-21 16:04:44.000000000 +0300 ++++ channels/Makefile 2009-11-20 18:05:45.000000000 +0200 @@ -32,9 +32,10 @@ endif @@ -36,16 +33,16 @@ $FreeBSD$ endif dist-clean:: -@@ -113,8 +115,12 @@ +@@ -111,8 +113,12 @@ else chan_h323.so: chan_h323.o h323/libchanh323.a $(ECHO_PREFIX) echo " [LD] $^ -> $@" +ifeq ($(OSARCH),FreeBSD) + $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) $(CHANH323LIB) +else - $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat + $(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(_ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat $(ASTLDFLAGS) endif +endif - chan_misdn.o: ASTCFLAGS+=-Imisdn + chan_misdn.o: _ASTCFLAGS+=-Imisdn diff --git a/net/asterisk14/files/patch-configure b/net/asterisk14/files/patch-configure index 0782453c279b..93432489e415 100644 --- a/net/asterisk14/files/patch-configure +++ b/net/asterisk14/files/patch-configure @@ -1,6 +1,9 @@ ---- configure.orig 2009-04-27 22:29:46.000000000 +0300 -+++ configure 2009-05-26 12:59:22.000000000 +0300 -@@ -4064,8 +4064,6 @@ + +$FreeBSD$ + +--- configure.orig ++++ configure +@@ -4308,8 +4308,6 @@ case "${host_os}" in freebsd*) ac_default_prefix=/usr/local @@ -9,7 +12,7 @@ ;; darwin*) -@@ -27145,7 +27143,7 @@ +@@ -16837,7 +16835,7 @@ fi @@ -17,20 +20,4 @@ + PLATFORM_OPENH323="h323_${OPENH323_SUFFIX}" if test "${HAS_OPENH323:-unset}" != "unset"; then - { $as_echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5 -@@ -31624,6 +31622,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default -+#include <ptlib.h> - #include <h323.h> - _ACEOF - rm -f conftest.$ac_objext -@@ -31665,6 +31664,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <ptlib.h> - #include <h323.h> - _ACEOF - if { (ac_try="$ac_cpp conftest.$ac_ext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenH323 installation validity" >&5 diff --git a/net/asterisk14/files/patch-main::Makefile b/net/asterisk14/files/patch-main::Makefile index 418714ab7f21..a4758b78bdc9 100644 --- a/net/asterisk14/files/patch-main::Makefile +++ b/net/asterisk14/files/patch-main::Makefile @@ -1,13 +1,13 @@ ---- main/Makefile.orig 2009-04-09 07:31:38.000000000 +0300 -+++ main/Makefile 2009-05-26 13:07:50.000000000 +0300 +--- main/Makefile.orig 2009-08-01 03:52:00.000000000 +0300 ++++ main/Makefile 2009-11-20 18:09:06.000000000 +0200 @@ -92,8 +92,8 @@ - cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(ASTCFLAGS:-Werror=))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR) + cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS:-Werror=)) $(ASTCFLAGS)" LDFLAGS="$(_ASTLDFLAGS) $(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR) $(MAKE) -C editline libedit.a -db1-ast/libdb1.a: -- CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a +- _ASTCFLAGS="$(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS) -Wno-strict-aliasing" $(MAKE) -C db1-ast libdb1.a +#db1-ast/libdb1.a: -+# CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a ++# _ASTCFLAGS="$(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS) -Wno-strict-aliasing" $(MAKE) -C db1-ast libdb1.a ast_expr2.c ast_expr2.h: bison -o $@ -d --name-prefix=ast_yy ast_expr2.y @@ -22,15 +22,15 @@ mv $(ASTTOPDIR)/include/asterisk/build.h.tmp $(ASTTOPDIR)/include/asterisk/build.h ; \ fi @rm -f $(ASTTOPDIR)/include/asterisk/build.h.tmp - @$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c + @$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS) - $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@" + $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) -> $@" ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),) -- $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) -+ $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) +- $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(ASTLDFLAGS) ++ $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(ASTLDFLAGS) else -- $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) -+ $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) +- $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(ASTLDFLAGS) ++ $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(ASTLDFLAGS) endif clean:: diff --git a/net/asterisk14/files/patch-suppress_log_dups.diff b/net/asterisk14/files/patch-suppress_log_dups.diff new file mode 100644 index 000000000000..115b69f21ca1 --- /dev/null +++ b/net/asterisk14/files/patch-suppress_log_dups.diff @@ -0,0 +1,270 @@ +Index: main/logger.c +=================================================================== +--- main/logger.c (revision 188505) ++++ main/logger.c (working copy) +@@ -140,6 +140,17 @@ + AST_THREADSTORAGE(log_buf, log_buf_init); + #define LOG_BUF_INIT_SIZE 128 + ++/* ++ * Storage for previous log message to prevent log storms ++ */ ++static int stored_log_level; ++static int stored_log_dup_count = 0; ++static char *stored_log_msg = NULL; ++static const char *stored_log_file; ++static int stored_log_line; ++static const char *stored_log_function; ++static ast_mutex_t stored_log_msg_lock; ++ + static int make_components(char *s, int lineno) + { + char *w; +@@ -591,6 +602,8 @@ + char tmp[256]; + int res = 0; + ++ ast_mutex_init(&stored_log_msg_lock); ++ + /* auto rotate if sig SIGXFSZ comes a-knockin */ + (void) signal(SIGXFSZ,(void *) handle_SIGXFSZ); + +@@ -655,14 +668,14 @@ + return; + } + +-static void __attribute__((format(printf, 5, 0))) ast_log_vsyslog(int level, const char *file, int line, const char *function, const char *fmt, va_list args) ++static void ast_log_syslog(int level, const char *file, int line, const char *function, const char *msg) + { + char buf[BUFSIZ]; + char *s; + + if (level >= SYSLOG_NLEVELS) { + /* we are locked here, so cannot ast_log() */ +- fprintf(stderr, "ast_log_vsyslog called with bogus level: %d\n", level); ++ fprintf(stderr, "ast_log_syslog called with bogus level: %d\n", level); + return; + } + if (level == __LOG_VERBOSE) { +@@ -676,27 +689,20 @@ + levels[level], (long)GETTID(), file, line, function); + } + s = buf + strlen(buf); +- vsnprintf(s, sizeof(buf) - strlen(buf), fmt, args); ++ snprintf(s, sizeof(buf) - strlen(buf), "%s", msg); + term_strip(s, s, strlen(s) + 1); + syslog(syslog_level_map[level], "%s", buf); + } + +-/*! +- * \brief send log messages to syslog and/or the console +- */ +-void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) ++static void __ast_log(int level, const char *file, int line, const char *function, char *msg, int msglen) + { + struct logchannel *chan; +- struct ast_dynamic_str *buf; + time_t t; + struct tm tm; + char date[256]; ++ char buf[2048]; ++ int res; + +- va_list ap; +- +- if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE))) +- return; +- + if (AST_LIST_EMPTY(&logchannels)) + { + /* +@@ -704,35 +710,12 @@ + * so just log to stdout + */ + if (level != __LOG_VERBOSE) { +- int res; +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) { +- term_filter_escapes(buf->str); +- fputs(buf->str, stdout); +- } ++ term_filter_escapes(msg); ++ fputs(msg, stdout); + } + return; + } + +- /* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug +- are non-zero; LOG_DEBUG messages can still be displayed if option_debug +- is zero, if option_verbose is non-zero (this allows for 'level zero' +- LOG_DEBUG messages to be displayed, if the logmask on any channel +- allows it) +- */ +- if (!option_verbose && !option_debug && (level == __LOG_DEBUG)) +- return; +- +- /* Ignore anything that never gets logged anywhere */ +- if (!(global_logmask & (1 << level))) +- return; +- +- /* Ignore anything other than the currently debugged file if there is one */ +- if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file)) +- return; +- + time(&t); + ast_localtime(&t, &tm, NULL); + strftime(date, sizeof(date), dateformat, &tm); +@@ -740,13 +723,8 @@ + AST_LIST_LOCK(&logchannels); + + if (logfiles.event_log && level == __LOG_EVENT) { +- va_start(ap, fmt); +- +- fprintf(eventlog, "%s asterisk[%ld]: ", date, (long)getpid()); +- vfprintf(eventlog, fmt, ap); ++ fprintf(eventlog, "%s asterisk[%ld]: %s", date, (long)getpid(), msg); + fflush(eventlog); +- +- va_end(ap); + AST_LIST_UNLOCK(&logchannels); + return; + } +@@ -756,18 +734,15 @@ + break; + /* Check syslog channels */ + if (chan->type == LOGTYPE_SYSLOG && (chan->logmask & (1 << level))) { +- va_start(ap, fmt); +- ast_log_vsyslog(level, file, line, function, fmt, ap); +- va_end(ap); ++ ast_log_syslog(level, file, line, function, msg); + /* Console channels */ + } else if ((chan->logmask & (1 << level)) && (chan->type == LOGTYPE_CONSOLE)) { + char linestr[128]; + char tmp1[80], tmp2[80], tmp3[80], tmp4[80]; + + if (level != __LOG_VERBOSE) { +- int res; + sprintf(linestr, "%d", line); +- ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf, ++ snprintf(buf, sizeof(buf), + "[%s] %s[%ld]: %s:%s %s: ", + date, + term_color(tmp1, levels[level], colors[level], 0, sizeof(tmp1)), +@@ -776,23 +751,17 @@ + term_color(tmp3, linestr, COLOR_BRWHITE, 0, sizeof(tmp3)), + term_color(tmp4, function, COLOR_BRWHITE, 0, sizeof(tmp4))); + /*filter to the console!*/ +- term_filter_escapes(buf->str); +- ast_console_puts_mutable(buf->str); +- +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) +- ast_console_puts_mutable(buf->str); ++ term_filter_escapes(buf); ++ ast_console_puts_mutable(buf); ++ ast_console_puts_mutable(msg); + } + /* File channels */ + } else if ((chan->logmask & (1 << level)) && (chan->fileptr)) { +- int res; +- ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf, ++ snprintf(buf, sizeof(buf), + "[%s] %s[%ld] %s: ", + date, levels[level], (long)GETTID(), file); +- res = fprintf(chan->fileptr, "%s", buf->str); +- if (res <= 0 && !ast_strlen_zero(buf->str)) { /* Error, no characters printed */ ++ res = fprintf(chan->fileptr, "%s", buf); ++ if (res <= 0 && !ast_strlen_zero(buf)) { /* Error, no characters printed */ + fprintf(stderr,"**** Asterisk Logging Error: ***********\n"); + if (errno == ENOMEM || errno == ENOSPC) { + fprintf(stderr, "Asterisk logging error: Out of disk space, can't log to log file %s\n", chan->filename); +@@ -801,16 +770,10 @@ + manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: No\r\nReason: %d - %s\r\n", chan->filename, errno, strerror(errno)); + chan->disabled = 1; + } else { +- int res; + /* No error message, continue printing */ +- va_start(ap, fmt); +- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); +- va_end(ap); +- if (res != AST_DYNSTR_BUILD_FAILED) { +- term_strip(buf->str, buf->str, buf->len); +- fputs(buf->str, chan->fileptr); +- fflush(chan->fileptr); +- } ++ term_strip(msg, msg, msglen); ++ fputs(msg, chan->fileptr); ++ fflush(chan->fileptr); + } + } + } +@@ -825,6 +788,65 @@ + } + } + ++/*! ++ * \brief send log messages to syslog and/or the console ++ */ ++void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) ++{ ++ struct ast_dynamic_str *buf; ++ int res; ++ va_list ap; ++ ++ if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE))) ++ return; ++ ++ va_start(ap, fmt); ++ res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); ++ va_end(ap); ++ if (res == AST_DYNSTR_BUILD_FAILED) ++ return; ++ ++ /* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug ++ are non-zero; LOG_DEBUG messages can still be displayed if option_debug ++ is zero, if option_verbose is non-zero (this allows for 'level zero' ++ LOG_DEBUG messages to be displayed, if the logmask on any channel ++ allows it) ++ */ ++ if (!option_verbose && !option_debug && (level == __LOG_DEBUG)) ++ return; ++ ++ /* Ignore anything that never gets logged anywhere */ ++ if (!(global_logmask & (1 << level))) ++ return; ++ ++ /* Ignore anything other than the currently debugged file if there is one */ ++ if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file)) ++ return; ++ ++ ast_mutex_lock(&stored_log_msg_lock); ++ if (stored_log_msg == NULL || stored_log_level != level || strcmp(buf->str, stored_log_msg) != 0) { ++ if (stored_log_dup_count > 0) { ++ char buf2[1024]; ++ ++ snprintf(buf2, sizeof(buf2), "Last message repeated %d times\n", stored_log_dup_count); ++ __ast_log(stored_log_level, stored_log_file, stored_log_line, stored_log_function, buf2, strlen(buf2)); ++ } ++ if (stored_log_msg != NULL) ++ ast_free(stored_log_msg); ++ stored_log_msg = ast_strdup(buf->str); ++ stored_log_level = level; ++ stored_log_dup_count = 0; ++ stored_log_file = file; ++ stored_log_line = line; ++ stored_log_function = function; ++ __ast_log(level, file, line, function, buf->str, buf->len); ++ } ++ else ++ ++stored_log_dup_count; ++ ++ ast_mutex_unlock(&stored_log_msg_lock); ++} ++ + void ast_backtrace(void) + { + #ifdef linux diff --git a/net/asterisk14/files/rtp_force_dtmf-codecnego.diff b/net/asterisk14/files/rtp_force_dtmf-codecnego.diff index 723bd8703c06..a670364ba603 100644 --- a/net/asterisk14/files/rtp_force_dtmf-codecnego.diff +++ b/net/asterisk14/files/rtp_force_dtmf-codecnego.diff @@ -1,6 +1,6 @@ ---- channels/chan_sip.c.orig 2008-03-12 17:37:00.000000000 +0200 -+++ channels/chan_sip.c 2008-03-12 18:17:33.000000000 +0200 -@@ -554,6 +554,9 @@ +--- channels/chan_sip.c.orig 2009-11-20 17:56:30.000000000 +0200 ++++ channels/chan_sip.c 2009-11-20 17:59:43.000000000 +0200 +@@ -565,6 +565,9 @@ static unsigned int global_tos_sip; /*!< IP type of service for SIP packets */ static unsigned int global_tos_audio; /*!< IP type of service for audio RTP packets */ static unsigned int global_tos_video; /*!< IP type of service for video RTP packets */ @@ -10,37 +10,37 @@ static int compactheaders; /*!< send compact sip headers */ static int recordhistory; /*!< Record SIP history. Off by default */ static int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */ -@@ -4983,6 +4986,8 @@ - int codec_index = 0; - int codec_pt_order[256]; +@@ -5329,6 +5332,7 @@ + int x; + int codec_index = 0; + int codec_pt_order[256]; ++ int dtmf_present = 0; -+ int dtmf_present = 0; + /* Host information */ + struct ast_hostent audiohp; +@@ -5600,12 +5604,21 @@ + for (x = 0; x < codec_index; ++x) { + struct rtpPayloadType pt; + pt = ast_rtp_lookup_pt(p->rtp, codec_pt_order[x]); ++ if (pt.code == AST_RTP_DTMF) ++ dtmf_present = 1; + if (!pt.isAstFormat && !pt.code && p->vrtp) + pt = ast_rtp_lookup_pt(p->vrtp, codec_pt_order[x]); + if (pt.isAstFormat) + ast_codec_pref_append(&p->formats, pt.code); + } + ast_codec_pref_remove2(&p->formats, ~p->usercapability); ++ if (!dtmf_present && global_force_dtmf_relay) { ++ newnoncodeccapability |= AST_RTP_DTMF; ++ ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); ++ codec_pt_order[codec_index++] = global_force_dtmf_relay_pt; ++ ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); ++ } + - if (!p->rtp) { - ast_log(LOG_ERROR, "Got SDP but have no RTP session allocated.\n"); - return -1; -@@ -5408,12 +5413,20 @@ - for (x = 0; x < codec_index; ++x) { - struct rtpPayloadType pt; - pt = ast_rtp_lookup_pt(p->rtp, codec_pt_order[x]); -+ if (pt.code == AST_RTP_DTMF) -+ dtmf_present = 1; - if (!pt.isAstFormat && !pt.code && p->vrtp) - pt = ast_rtp_lookup_pt(p->vrtp, codec_pt_order[x]); - if (pt.isAstFormat) - ast_codec_pref_append(&p->formats, pt.code); - } - ast_codec_pref_remove2(&p->formats, ~p->usercapability); -+ if (!dtmf_present && global_force_dtmf_relay) { -+ newnoncodeccapability |= AST_RTP_DTMF; -+ ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); -+ codec_pt_order[codec_index++] = global_force_dtmf_relay_pt; -+ ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); -+ } - + /* Now gather all of the codecs that we are asked for: */ ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); -@@ -16845,6 +16858,9 @@ +@@ -18369,6 +18382,9 @@ global_matchexterniplocally = FALSE; @@ -50,7 +50,7 @@ /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); -@@ -16901,6 +16917,18 @@ +@@ -18431,6 +18447,18 @@ } } else if (!strcasecmp(v->name, "vmexten")) { ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten)); @@ -67,7 +67,7 @@ + } else + ast_log(LOG_WARNING, "RTP forced DTMF relay payload type is %d\n", global_force_dtmf_relay_pt); } else if (!strcasecmp(v->name, "rtptimeout")) { - if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { + if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno); --- configs/sip.conf.sample.orig 2008-04-25 08:53:52.000000000 -0700 +++ configs/sip.conf.sample 2008-06-10 00:45:37.000000000 -0700 diff --git a/net/asterisk14/files/rtp_force_dtmf-nocodecnego.diff b/net/asterisk14/files/rtp_force_dtmf-nocodecnego.diff index 9b1d521fa0e3..9dcb7d8b134f 100644 --- a/net/asterisk14/files/rtp_force_dtmf-nocodecnego.diff +++ b/net/asterisk14/files/rtp_force_dtmf-nocodecnego.diff @@ -1,6 +1,6 @@ ---- channels/chan_sip.c.orig 2008-09-09 00:10:10.000000000 +0300 -+++ channels/chan_sip.c 2008-12-12 17:02:05.000000000 +0200 -@@ -557,6 +557,9 @@ +--- channels/chan_sip.c.orig 2009-11-23 17:28:47.000000000 +0200 ++++ channels/chan_sip.c 2009-11-23 17:29:29.000000000 +0200 +@@ -565,6 +565,9 @@ static unsigned int global_tos_sip; /*!< IP type of service for SIP packets */ static unsigned int global_tos_audio; /*!< IP type of service for audio RTP packets */ static unsigned int global_tos_video; /*!< IP type of service for video RTP packets */ @@ -10,21 +10,20 @@ static int compactheaders; /*!< send compact sip headers */ static int recordhistory; /*!< Record SIP history. Off by default */ static int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */ -@@ -5504,6 +5507,13 @@ - +@@ -5593,6 +5596,12 @@ + /* Now gather all of the codecs that we are asked for: */ ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); + /* Add telephone-event */ + if (global_force_dtmf_relay && !(peernoncodeccapability & AST_RTP_DTMF)) { + ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); -+ found_rtpmap_codecs[last_rtpmap_codec++] = global_force_dtmf_relay_pt; + ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); + peernoncodeccapability |= AST_RTP_DTMF; + } ast_rtp_get_current_formats(newvideortp, &vpeercapability, &vpeernoncodeccapability); newjointcapability = p->capability & (peercapability | vpeercapability); -@@ -17440,6 +17450,9 @@ +@@ -18366,6 +18375,9 @@ global_matchexterniplocally = FALSE; @@ -34,7 +33,7 @@ /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); -@@ -17496,6 +17509,18 @@ +@@ -18428,6 +18440,18 @@ } } else if (!strcasecmp(v->name, "vmexten")) { ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten)); @@ -51,7 +50,7 @@ + } else + ast_log(LOG_WARNING, "RTP forced DTMF relay payload type is %d\n", global_force_dtmf_relay_pt); } else if (!strcasecmp(v->name, "rtptimeout")) { - if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { + if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno); --- configs/sip.conf.sample.orig 2008-08-16 01:33:42.000000000 +0300 +++ configs/sip.conf.sample 2008-12-12 17:03:11.000000000 +0200 diff --git a/net/asterisk14/pkg-plist b/net/asterisk14/pkg-plist index 465dbb095d9d..fa747b6e8a6e 100644 --- a/net/asterisk14/pkg-plist +++ b/net/asterisk14/pkg-plist @@ -435,23 +435,22 @@ share/asterisk/agi-bin/agi-test.agi share/asterisk/agi-bin/eagi-sphinx-test share/asterisk/agi-bin/eagi-test share/asterisk/agi-bin/jukebox.agi -share/asterisk/firmware/iax/iaxy.bin share/asterisk/images/asterisk-intro.jpg share/asterisk/keys/freeworlddialup.pub share/asterisk/keys/iaxtel.pub -share/asterisk/moh/.asterisk-moh-freeplay-wav -share/asterisk/moh/CHANGES-asterisk-moh-opsound-2.01 -share/asterisk/moh/CREDITS-asterisk-moh-opsound-2.01 -share/asterisk/moh/LICENSE-asterisk-moh-opsound-2.01 +share/asterisk/moh/.asterisk-moh-opsound-wav +share/asterisk/moh/CHANGES-asterisk-moh-opsound-wav +share/asterisk/moh/CREDITS-asterisk-moh-opsound-wav +share/asterisk/moh/LICENSE-asterisk-moh-opsound-wav share/asterisk/moh/macroform-cold_day.wav share/asterisk/moh/macroform-robot_dity.wav share/asterisk/moh/macroform-the_simplicity.wav share/asterisk/moh/manolo_camp-morning_coffee.wav share/asterisk/moh/reno_project-system.wav -share/asterisk/sounds/.asterisk-core-sounds-en-gsm-1.4.15 -share/asterisk/sounds/CHANGES-asterisk-core-en-1.4.15 -share/asterisk/sounds/CREDITS-asterisk-core-en-1.4.15 -share/asterisk/sounds/LICENSE-asterisk-core-en-1.4.15 +share/asterisk/sounds/.asterisk-core-sounds-en-gsm-1.4.17 +share/asterisk/sounds/CHANGES-asterisk-core-en-1.4.17 +share/asterisk/sounds/CREDITS-asterisk-core-en-1.4.17 +share/asterisk/sounds/LICENSE-asterisk-core-en-1.4.17 share/asterisk/sounds/agent-alreadyon.gsm share/asterisk/sounds/agent-incorrect.gsm share/asterisk/sounds/agent-loggedoff.gsm @@ -842,6 +841,7 @@ share/asterisk/sounds/vm-opts.gsm share/asterisk/sounds/vm-opts-full.gsm share/asterisk/sounds/vm-passchanged.gsm share/asterisk/sounds/vm-password.gsm +share/asterisk/sounds/vm-pls-try-again.gsm share/asterisk/sounds/vm-press.gsm share/asterisk/sounds/vm-prev.gsm share/asterisk/sounds/vm-reachoper.gsm |