|
From: <kr...@us...> - 2009-03-24 20:57:17
|
Revision: 2583
http://astlinux.svn.sourceforge.net/astlinux/?rev=2583&view=rev
Author: krisk84
Date: 2009-03-24 20:57:08 +0000 (Tue, 24 Mar 2009)
Log Message:
-----------
update to Asterisk 1.4.24 to fix CANCEL
Modified Paths:
--------------
branches/s2s/package/asterisk/asterisk.mk
Removed Paths:
-------------
branches/s2s/package/asterisk/asterisk-app_page.patch
Deleted: branches/s2s/package/asterisk/asterisk-app_page.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-app_page.patch 2009-03-23 00:41:20 UTC (rev 2582)
+++ branches/s2s/package/asterisk/asterisk-app_page.patch 2009-03-24 20:57:08 UTC (rev 2583)
@@ -1,22 +0,0 @@
---- asterisk-1.4.23.orig/apps/app_page.c 2009/01/25 04:17:33 170978
-+++ asterisk-1.4.23/apps/app_page.c 2009/01/25 13:33:20 170979
-@@ -120,12 +120,15 @@
- /* Count number of extensions in list by number of ampersands + 1 */
- num_dials = 1;
- tmp2 = tmp;
-- while (*tmp2 && *tmp2++ == '&') {
-- num_dials++;
-+ while (*tmp2) {
-+ if (*tmp2 == '&') {
-+ num_dials++;
-+ }
-+ tmp2++;
- }
-
-- if (!(dial_list = ast_calloc(num_dials, sizeof(void *)))) {
-- ast_log(LOG_ERROR, "Can't allocate %ld bytes for dial list\n", (long)(sizeof(void *) * num_dials));
-+ if (!(dial_list = ast_calloc(num_dials, sizeof(struct ast_dial *)))) {
-+ ast_log(LOG_ERROR, "Can't allocate %ld bytes for dial list\n", (long)(sizeof(struct ast_dial *) * num_dials));
- ast_module_user_remove(u);
- return -1;
- }
Modified: branches/s2s/package/asterisk/asterisk.mk
===================================================================
--- branches/s2s/package/asterisk/asterisk.mk 2009-03-23 00:41:20 UTC (rev 2582)
+++ branches/s2s/package/asterisk/asterisk.mk 2009-03-24 20:57:08 UTC (rev 2583)
@@ -3,7 +3,7 @@
# asterisk
#
##############################################################
-ASTERISK_VERSION := 1.4.23
+ASTERISK_VERSION := 1.4.24
ASTERISK_SOURCE := asterisk-$(ASTERISK_VERSION).tar.gz
ASTERISK_SITE := http://downloads.digium.com/pub/asterisk/releases
ASTERISK_DIR := $(BUILD_DIR)/asterisk-$(ASTERISK_VERSION)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kr...@us...> - 2011-12-06 21:00:32
|
Revision: 5288
http://astlinux.svn.sourceforge.net/astlinux/?rev=5288&view=rev
Author: krisk84
Date: 2011-12-06 21:00:25 +0000 (Tue, 06 Dec 2011)
Log Message:
-----------
enable asterisk debug build
Modified Paths:
--------------
branches/s2s/package/asterisk/Config.in
branches/s2s/package/asterisk/asterisk.mk
Added Paths:
-----------
branches/s2s/package/asterisk/asterisk-debug.init
Modified: branches/s2s/package/asterisk/Config.in
===================================================================
--- branches/s2s/package/asterisk/Config.in 2011-12-06 20:20:38 UTC (rev 5287)
+++ branches/s2s/package/asterisk/Config.in 2011-12-06 21:00:25 UTC (rev 5288)
@@ -9,6 +9,12 @@
help
Asterisk - the Open Source PBX
+config BR2_PACKAGE_ASTERISK_OPTIMIZED
+ bool "asterisk-optimized"
+ default y
+ help
+ Install optimized Asterisk version
+
config BR2_PACKAGE_ASTERISK-GUI
bool "asterisk-gui"
default n
Added: branches/s2s/package/asterisk/asterisk-debug.init
===================================================================
--- branches/s2s/package/asterisk/asterisk-debug.init (rev 0)
+++ branches/s2s/package/asterisk/asterisk-debug.init 2011-12-06 21:00:25 UTC (rev 5288)
@@ -0,0 +1,281 @@
+#!/bin/sh
+
+. /etc/rc.conf
+
+if [ "$EXTENSIONS" ]
+then
+if `echo $EXTENSIONS | grep -qi pbxware`
+then
+exit
+fi
+fi
+
+init () {
+mkdir /var/run/asterisk
+
+if [ ! -d /var/log/asterisk ]
+then
+mkdir /var/log/asterisk
+fi
+
+mkdir /var/spool/asterisk
+cp -a /stat/var/spool/asterisk/* /var/spool/asterisk/
+ln -s /stat/var/lib/asterisk /var/lib/asterisk
+
+if [ -d /mnt/kd/voicemail ]
+then
+rm -rf /var/spool/asterisk/voicemail
+ln -s /mnt/kd/voicemail /var/spool/asterisk/voicemail
+fi
+
+if [ -d /mnt/kd/monitor ]
+then
+rm -rf /var/spool/asterisk/monitor
+ln -s /mnt/kd/monitor /var/spool/asterisk/monitor
+fi
+
+if [ -d /mnt/kd/asterisk ]
+then
+ln -s /mnt/kd/asterisk /tmp/etc/asterisk
+fi
+
+if [ ! -r /tmp/etc/asterisk ]
+then
+mkdir /tmp/etc/asterisk
+cp -a /stat/etc/asterisk/* /tmp/etc/asterisk/
+# ln -s /stat/etc/asterisk /tmp/etc/asterisk
+fi
+
+if [ -f /mnt/kd/astdb ]
+then
+ln -s /mnt/kd/astdb /tmp/astdb
+fi
+
+if [ -d /mnt/kd/cdr-csv ]
+then
+ln -s /mnt/kd/cdr-csv /var/log/asterisk/cdr-csv
+else
+mkdir -p /var/log/asterisk/cdr-csv
+fi
+
+if [ -d /mnt/kd/cdr-custom ]
+then
+ln -s /mnt/kd/cdr-custom /var/log/asterisk/cdr-custom
+else
+mkdir -p /var/log/asterisk/cdr-custom
+fi
+
+if [ "$ASTMANPROXY_USER" ]
+then
+echo "; Auto generated
+host = 127.0.0.1, 5038, $ASTMANPROXY_USER, $ASTMANPROXY_PASS, on, off
+retryinterval = 2
+maxretries = 10
+listenaddress = *
+listenport = 5039
+proc_user = nobody
+proc_group = nobody
+acceptencryptedconnection = yes
+acceptunencryptedconnection = yes
+certfile = /etc/ssl/mini_httpd.pem
+authrequired = yes
+inputformat = standard
+outputformat = standard
+autofilter = off
+logfile = /dev/null" > /tmp/etc/astmanproxy.conf
+fi
+
+if `which pikacf > /dev/null 2> /dev/null`
+then
+if [ -r /usr/share/pika/montecarlo/conf/pikaconfig.xml ]
+then
+echo "PikaInline already configured..."
+else
+if `cat /proc/cmdline | grep -q asturw`
+then
+echo "Running initial configuration for PikaInline..."
+pikacf -a /dev/null 1>/dev/null &
+else
+mount -o rw,remount /
+echo "Running initial configuration for PikaInline..."
+pikacf -a /dev/null 1>/dev/null &
+mount -o ro,remount /
+fi
+fi
+fi
+}
+
+start () {
+echo "Starting Asterisk..."
+if [ "$ISDN_MODPROBE" -o "$MISDN" ]
+then
+echo "Starting mISDN"
+if [ -d /mnt/kd ]
+then
+ln -s /mnt/kd/misdn-init.conf /tmp/etc/misdn-init.conf
+fi
+if [ -r /mnt/kd/misdn-init.conf ]
+then
+echo "misdn-init.conf already exists on /mnt/kd, skipping config."
+else
+/usr/sbin/misdn-init scan
+/usr/sbin/misdn-init config
+fi
+/usr/sbin/misdn-init start
+# Not needed
+#mknod /dev/mISDN c 46 0
+#modprobe mISDN_core
+#modprobe mISDN_l1 debug=0
+#modprobe mISDN_l2 debug=0
+#modprobe l3udss1
+#modprobe mISDN_capi
+#modprobe mISDN_isac
+#modprobe mISDN_dsp debug=0 options=0x0
+#modprobe $ISDN_MODPROBE
+if [ "$ISDN_MODPROBE2" ]
+then
+#modprobe $ISDN_MODPROBE2
+echo "ISDN_MODPROBE and ISDN_MODPROBE2 are deprecated"
+fi
+sleep 2
+fi
+
+if `grep -A1 "[admin]" /etc/asterisk/manager.conf | grep -q astlinux`
+then
+echo "
+WARNING WARNING WARNING
+
+YOU STILL HAVE NOT CHANGED YOUR ASTERISK MANAGER PASSWORD
+ANYONE THAT KNOWS YOU ARE USING ASTLINUX CAN DESTROY YOUR
+SYSTEM. PLEASE CHANGE THIS IN /etc/asterisk/manager.conf
+IMMEDIATELY!
+
+WARNING WARNING WARNING
+"
+fi
+
+if [ -r /etc/asterisk/extensions.conf ]
+then
+# Work around uclibc bug
+ulimit -s unlimited
+# Debug Asterisk - unlimited core dump
+ulimit -c unlimited
+
+if `grep -q geni586 /proc/cmdline`; then
+ # Increase limits
+ ulimit -n 65535
+fi
+
+asterisk -p -g -I
+fi
+
+if [ "$ASTVERBOSE" ]
+then
+asterisk -rx "core set verbose $ASTVERBOSE" > /dev/null
+fi
+
+if [ "$ASTG729" ]
+then
+G729MODULE=$ASTG729
+
+if [ "$ASTG729" = "auto" ]
+then
+# Pentium 1 has tsc
+if `grep -q tsc /proc/cpuinfo`
+then
+G729MODULE="codec_g729a-p1.so"
+fi
+
+# Pentium 2 has cmov
+if `grep -q cmov /proc/cpuinfo`
+then
+G729MODULE="codec_g729a-p2.so"
+fi
+
+# Pentium 3 has sse
+if `grep -q sse /proc/cpuinfo`
+then
+G729MODULE="codec_g729a-p3.so"
+fi
+
+# Pentium 4 has sse2
+if `grep -q sse2 /proc/cpuinfo`
+then
+G729MODULE="codec_g729a-p4.so"
+fi
+
+# Some P4s have sse3
+if `grep -q sse3 /proc/cpuinfo`
+then
+G729MODULE="codec_g729a-p4-sse3.so"
+fi
+
+# SSE3 has many names - pni is another one
+if `grep -q pni /proc/cpuinfo`
+then
+G729MODULE="codec_g729a-p4-sse3.so"
+fi
+
+fi
+
+if [ -r /usr/lib/asterisk/modules/g729/$G729MODULE ]
+then
+
+if [ -r /usr/lib/asterisk/modules/codec_g729a.so ]
+then
+/usr/sbin/asterisk -rx "module unload codec_g729a.so" 2> /dev/null > /dev/null
+fi
+/usr/sbin/asterisk -rx "module load g729/$G729MODULE"
+else
+echo "Error: Asterisk G729 module $G729MODULE not found"
+fi
+
+fi
+
+if [ -r /tmp/etc/astmanproxy.conf ]
+then
+echo "Starting astmanproxy..."
+/usr/sbin/astmanproxy
+fi
+}
+
+stop () {
+if [ -r /var/run/asterisk/asterisk.pid ]
+then
+echo "Stopping Asterisk..."
+kill `cat /var/run/asterisk/asterisk.pid`
+fi
+
+if `ps | grep -q astmanproxy`
+then
+echo "Stopping astmanproxy..."
+killall astmanproxy 2> /dev/null
+fi
+}
+
+case $1 in
+
+init)
+init
+start
+;;
+
+start)
+start
+;;
+
+stop)
+stop
+;;
+
+restart)
+stop
+sleep 2
+start
+;;
+
+*)
+echo "Usage: start|stop|restart"
+;;
+
+esac
Property changes on: branches/s2s/package/asterisk/asterisk-debug.init
___________________________________________________________________
Added: svn:executable
+ *
Modified: branches/s2s/package/asterisk/asterisk.mk
===================================================================
--- branches/s2s/package/asterisk/asterisk.mk 2011-12-06 20:20:38 UTC (rev 5287)
+++ branches/s2s/package/asterisk/asterisk.mk 2011-12-06 21:00:25 UTC (rev 5288)
@@ -10,6 +10,12 @@
ASTERISK_BINARY := main/asterisk
ASTERISK_TARGET_BINARY := usr/sbin/asterisk
+ifeq ($(strip $(BR2_PACKAGE_ASTERISK_OPTIMIZED)),y)
+ASTERISK_MENUSELECT_CFLAGS := LOADABLE_MODULES
+else
+ASTERISK_MENUSELECT_CFLAGS := LOADABLE_MODULES DONT_OPTIMIZE
+endif
+
ifeq ($(strip $(BR2_PACKAGE_LIBPRI)),y)
ASTERISK_EXTRAS :=$(ASTERISK_EXTRAS)
ASTERISK_EXTRAS+=libpri
@@ -130,19 +136,27 @@
$(ASTERISK_DIR)/$(ASTERISK_BINARY): $(ASTERISK_DIR)/.configured
cp $(STAGING_DIR)/include/dlfcn.h $(STAGING_DIR)/usr/include/dlfcn.h # Can I do this?
- ASTCFLAGS="-I$(STAGING_DIR)/usr/include" $(MAKE) -C $(ASTERISK_DIR) $(TARGET_CONFIGURE_OPTS) ASTVARRUNDIR=/var/run/asterisk HOSTCC=gcc
+ ASTCFLAGS="-I$(STAGING_DIR)/usr/include" $(MAKE) -C $(ASTERISK_DIR) $(TARGET_CONFIGURE_OPTS) \
+ ASTVARRUNDIR=/var/run/asterisk HOSTCC=gcc MENUSELECT_CFLAGS="$(ASTERISK_MENUSELECT_CFLAGS)" \
+ NOISY_BUILD=yes
$(TARGET_DIR)/$(ASTERISK_TARGET_BINARY): $(ASTERISK_DIR)/$(ASTERISK_BINARY)
# mkdir -p $(TARGET_DIR)/usr/lib/asterisk/modules
$(MAKE1) -C $(ASTERISK_DIR) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \
ASTVARRUNDIR=/var/run/asterisk HOSTCC=gcc install samples
+ifeq ($(strip $(BR2_PACKAGE_ASTERISK_OPTIMIZED)),y)
$(STRIP) $(TARGET_DIR)/usr/sbin/asterisk
$(STRIP) $(TARGET_DIR)/usr/sbin/stereorize
$(STRIP) $(TARGET_DIR)/usr/sbin/streamplayer
$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/asterisk/modules/*.so
+endif
mv $(TARGET_DIR)/usr/include/asterisk $(STAGING_DIR)/usr/include/
rm -Rf $(TARGET_DIR)/usr/share/man
+ifeq ($(strip $(BR2_PACKAGE_ASTERISK_OPTIMIZED)),y)
$(INSTALL) -D -m 0755 package/asterisk/asterisk.init $(TARGET_DIR)/etc/init.d/asterisk
+else
+ $(INSTALL) -D -m 0755 package/asterisk/asterisk-debug.init $(TARGET_DIR)/etc/init.d/asterisk
+endif
mkdir -p $(TARGET_DIR)/stat/var/lib/asterisk
cp -a $(TARGET_DIR)/var/lib/asterisk/* $(TARGET_DIR)/stat/var/lib/asterisk/
-cp -a package/asterisk/moh/* $(TARGET_DIR)/stat/var/lib/asterisk/moh/ && rm -f $(TARGET_DIR)/stat/var/lib/asterisk/moh/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kr...@us...> - 2012-04-06 15:53:21
|
Revision: 5501
http://astlinux.svn.sourceforge.net/astlinux/?rev=5501&view=rev
Author: krisk84
Date: 2012-04-06 15:53:11 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
update to Asterisk 1.4.44
Modified Paths:
--------------
branches/s2s/package/asterisk/asterisk-log-rtpip.patch
branches/s2s/package/asterisk/asterisk-recording.patch
branches/s2s/package/asterisk/asterisk-sounds-Makefile.patch
branches/s2s/package/asterisk/asterisk.mk
branches/s2s/package/asterisk/sounds.xml
Removed Paths:
-------------
branches/s2s/package/asterisk/asterisk-1.4-bugid17688.patch
branches/s2s/package/asterisk/asterisk-chan_local.patch
branches/s2s/package/asterisk/asterisk-chansip-loop-crash.patch
Deleted: branches/s2s/package/asterisk/asterisk-1.4-bugid17688.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-1.4-bugid17688.patch 2012-04-06 13:31:49 UTC (rev 5500)
+++ branches/s2s/package/asterisk/asterisk-1.4-bugid17688.patch 2012-04-06 15:53:11 UTC (rev 5501)
@@ -1,18 +0,0 @@
-diff -urN asterisk-1.4.26.3.orig/codecs/gsm/Makefile asterisk-1.4.26.3/codecs/gsm/Makefile
---- asterisk-1.4.26.3.orig/codecs/gsm/Makefile 2008-11-19 16:34:47.000000000 -0500
-+++ asterisk-1.4.26.3/codecs/gsm/Makefile 2011-02-15 16:48:01.000000000 -0500
-@@ -37,6 +37,14 @@
- ######### ppro's, etc, as well as the AMD K6 and K7. The compile will
- ######### probably require gcc.
-
-+# Due to the gsm codec beeing broken when compiled with gcc version 4.2
-+# and optimization higher than -O2 we are checking for that version and
-+# set the optimization to -O2 in this case.
-+
-+ifeq ($(shell $(CC) -v 2>&1 | awk '/^gcc version/ { split($$3, v, "."); printf "%s.%s\n", v[1], v[2]; }' ),4.2)
-+OPTIMIZE=-O2
-+endif
-+
- ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
- ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm armv5b armeb hppa2.0 ppc powerpc ppc64 ia64 s390 bfin mipsel mips))
- ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
Deleted: branches/s2s/package/asterisk/asterisk-chan_local.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-chan_local.patch 2012-04-06 13:31:49 UTC (rev 5500)
+++ branches/s2s/package/asterisk/asterisk-chan_local.patch 2012-04-06 15:53:11 UTC (rev 5501)
@@ -1,105 +0,0 @@
-diff -urN asterisk-1.4.26.3.orig/channels/chan_local.c asterisk-1.4.26.3/channels/chan_local.c
---- asterisk-1.4.26.3.orig/channels/chan_local.c 2009-04-23 15:13:18.000000000 -0400
-+++ asterisk-1.4.26.3/channels/chan_local.c 2011-11-17 10:31:14.000000000 -0500
-@@ -27,7 +27,7 @@
-
- #include "asterisk.h"
-
--ASTERISK_FILE_VERSION(__FILE__, "$Revision: 190286 $")
-+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
- #include <stdio.h>
- #include <string.h>
-@@ -120,6 +120,7 @@
- #define LOCAL_ALREADY_MASQED (1 << 2) /*!< Already masqueraded */
- #define LOCAL_LAUNCHED_PBX (1 << 3) /*!< PBX was launched */
- #define LOCAL_NO_OPTIMIZATION (1 << 4) /*!< Do not optimize using masquerading */
-+#define LOCAL_MOH_PASSTHRU (1 << 5) /*!< Pass through music on hold start/stop frames */
-
- static AST_LIST_HEAD_STATIC(locals, local_pvt);
-
-@@ -204,6 +205,9 @@
- return and destroy p. */
- ast_mutex_unlock(&p->lock);
- p = local_pvt_destroy(p);
-+ if (other) {
-+ ast_channel_unlock(other);
-+ }
- return -1;
- }
-
-@@ -371,9 +375,9 @@
- return -1;
-
- /* If this is an MOH hold or unhold, do it on the Local channel versus real channel */
-- if (condition == AST_CONTROL_HOLD) {
-+ if (!ast_test_flag(p, LOCAL_MOH_PASSTHRU) && condition == AST_CONTROL_HOLD) {
- ast_moh_start(ast, data, NULL);
-- } else if (condition == AST_CONTROL_UNHOLD) {
-+ } else if (!ast_test_flag(p, LOCAL_MOH_PASSTHRU) && condition == AST_CONTROL_UNHOLD) {
- ast_moh_stop(ast);
- } else {
- /* Queue up a frame representing the indication as a control frame */
-@@ -570,11 +574,11 @@
- ast_clear_flag(p, LOCAL_LAUNCHED_PBX);
- ast_module_user_remove(p->u_chan);
- } else {
-- p->owner = NULL;
- ast_module_user_remove(p->u_owner);
- while (p->chan && ast_channel_trylock(p->chan)) {
- DEADLOCK_AVOIDANCE(&p->lock);
- }
-+ p->owner = NULL;
- if (p->chan) {
- ast_queue_hangup(p->chan);
- ast_channel_unlock(p->chan);
-@@ -631,6 +635,8 @@
- *opts++ = '\0';
- if (strchr(opts, 'n'))
- ast_set_flag(tmp, LOCAL_NO_OPTIMIZATION);
-+ if (strchr(opts, 'm'))
-+ ast_set_flag(tmp, LOCAL_MOH_PASSTHRU);
- }
-
- /* Look for a context */
-diff -urN asterisk-1.4.26.3.orig/main/channel.c asterisk-1.4.26.3/main/channel.c
---- asterisk-1.4.26.3.orig/main/channel.c 2009-08-10 16:14:34.000000000 -0400
-+++ asterisk-1.4.26.3/main/channel.c 2011-11-21 15:01:13.000000000 -0500
-@@ -938,22 +938,22 @@
- }
- }
-
-- if ((queued_frames + new_frames) > 128) {
-- ast_log(LOG_WARNING, "Exceptionally long queue length queuing to %s\n", chan->name);
-- while ((f = AST_LIST_REMOVE_HEAD(&frames, frame_list))) {
-- ast_frfree(f);
-- }
-- ast_channel_unlock(chan);
-- return 0;
-- }
--
-- if ((queued_voice_frames + new_voice_frames) > 96) {
-- ast_log(LOG_WARNING, "Exceptionally long voice queue length queuing to %s\n", chan->name);
-- while ((f = AST_LIST_REMOVE_HEAD(&frames, frame_list))) {
-- ast_frfree(f);
-+ if ((queued_frames + new_frames > 128 || queued_voice_frames + new_voice_frames > 96)) {
-+ int count = 0;
-+ ast_log(LOG_WARNING, "Exceptionally long %squeue length queuing to %s\n", queued_frames + new_frames > 128 ? "" : "voice ", chan->name);
-+ AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->readq, cur, frame_list) {
-+ /* Save the most recent frame */
-+ if (!AST_LIST_NEXT(cur, frame_list)) {
-+ break;
-+ } else if (cur->frametype == AST_FRAME_VOICE || cur->frametype == AST_FRAME_VIDEO || cur->frametype == AST_FRAME_NULL) {
-+ if (++count > 64) {
-+ break;
-+ }
-+ AST_LIST_REMOVE_CURRENT(&chan->readq, frame_list);
-+ ast_frfree(cur);
-+ }
- }
-- ast_channel_unlock(chan);
-- return 0;
-+ AST_LIST_TRAVERSE_SAFE_END;
- }
-
- if (after) {
Deleted: branches/s2s/package/asterisk/asterisk-chansip-loop-crash.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-chansip-loop-crash.patch 2012-04-06 13:31:49 UTC (rev 5500)
+++ branches/s2s/package/asterisk/asterisk-chansip-loop-crash.patch 2012-04-06 15:53:11 UTC (rev 5501)
@@ -1,15 +0,0 @@
-diff -ur asterisk-1.4.26.3.orig/channels/chan_sip.c asterisk-1.4.26.3/channels/chan_sip.c
---- asterisk-1.4.26.3.orig/channels/chan_sip.c 2010-03-01 13:46:30.000000000 -0500
-+++ asterisk-1.4.26.3/channels/chan_sip.c 2010-03-01 13:47:05.000000000 -0500
-@@ -1807,11 +1807,6 @@
- res = XMIT_ERROR; /* Don't bother with trying to transmit again */
- }
-
-- if (p->registry && p->registry->regstate < REG_STATE_REGISTERED) {
-- AST_SCHED_DEL(sched, p->registry->timeout);
-- p->registry->needdns = TRUE;
-- p->registry->timeout = ast_sched_add(sched, 1, sip_reg_timeout, p->registry);
-- }
- }
-
- if (res != len)
Modified: branches/s2s/package/asterisk/asterisk-log-rtpip.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-log-rtpip.patch 2012-04-06 13:31:49 UTC (rev 5500)
+++ branches/s2s/package/asterisk/asterisk-log-rtpip.patch 2012-04-06 15:53:11 UTC (rev 5501)
@@ -1,23 +1,13 @@
-diff -ur asterisk-1.4.20.orig/channels/chan_sip.c asterisk-1.4.20/channels/chan_sip.c
---- asterisk-1.4.20.orig/channels/chan_sip.c 2008-05-14 08:51:06.000000000 -0400
-+++ asterisk-1.4.20/channels/chan_sip.c 2008-05-21 00:12:25.000000000 -0400
-@@ -5216,8 +5216,7 @@
- if (portno > 0) {
+diff -urN asterisk-1.4.44.orig/channels/chan_sip.c asterisk-1.4.44/channels/chan_sip.c
+--- asterisk-1.4.44.orig/channels/chan_sip.c 2011-11-21 14:54:07.000000000 -0500
++++ asterisk-1.4.44/channels/chan_sip.c 2012-04-06 11:30:39.000000000 -0400
+@@ -6030,8 +6030,7 @@
sin.sin_port = htons(portno);
+ memcpy(&sin.sin_addr, hp->h_addr, sizeof(sin.sin_addr));
ast_rtp_set_peer(p->rtp, &sin);
- if (debug)
- ast_verbose("Peer audio RTP is at port %s:%d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
+ ast_verbose("Peer audio RTP is at port %s:%d (name=%s, callid=%s)\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port), (((p->owner != NULL) && (p->owner->name != NULL)) ? p->owner->name : "unknown"), ((p->callid != NULL) ? p->callid : "unknown"));
- } else {
- if (udptlportno > 0) {
- if (debug)
-@@ -5533,8 +5532,7 @@
- /* Setup audio port number */
- if (p->rtp && sin.sin_port) {
- ast_rtp_set_peer(p->rtp, &sin);
-- if (debug)
-- ast_verbose("Peer audio RTP is at port %s:%d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
-+ ast_verbose("Peer audio RTP is at port %s:%d (name=%s, callid=%s)\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port), (((p->owner != NULL) && (p->owner->name != NULL)) ? p->owner->name : "unknown"), ((p->callid != NULL) ? p->callid : "unknown"));
- }
-
- /* Setup video port number */
+ } else if (udptlportno > 0) {
+ if (debug)
+ ast_verbose("Got T.38 Re-invite without audio. Keeping RTP active during T.38 session.\n");
Modified: branches/s2s/package/asterisk/asterisk-recording.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-recording.patch 2012-04-06 13:31:49 UTC (rev 5500)
+++ branches/s2s/package/asterisk/asterisk-recording.patch 2012-04-06 15:53:11 UTC (rev 5501)
@@ -1,7 +1,7 @@
-diff -urN asterisk-1.4.26.3.orig/formats/format_wav.c asterisk-1.4.26.3/formats/format_wav.c
---- asterisk-1.4.26.3.orig/formats/format_wav.c 2009-04-07 20:09:04.000000000 -0400
-+++ asterisk-1.4.26.3/formats/format_wav.c 2011-09-19 14:24:10.000000000 -0400
-@@ -345,6 +345,8 @@
+diff -ur asterisk-1.4.44.orig/formats/format_wav.c asterisk-1.4.44/formats/format_wav.c
+--- asterisk-1.4.44.orig/formats/format_wav.c 2011-04-25 15:28:41.000000000 -0400
++++ asterisk-1.4.44/formats/format_wav.c 2012-04-06 11:36:12.000000000 -0400
+@@ -339,6 +339,8 @@
{
char zero = 0;
struct wav_desc *fs = (struct wav_desc *)s->_private;
@@ -10,7 +10,7 @@
/* Pad to even length */
if (fs->bytes & 0x1) {
if (!fwrite(&zero, 1, 1, s->f)) {
-@@ -458,8 +460,7 @@
+@@ -452,8 +454,7 @@
}
s->bytes += f->datalen;
@@ -20,545 +20,10 @@
return 0;
}
-diff -urN asterisk-1.4.26.3.orig/formats/format_wav.c.orig asterisk-1.4.26.3/formats/format_wav.c.orig
---- asterisk-1.4.26.3.orig/formats/format_wav.c.orig 1969-12-31 19:00:00.000000000 -0500
-+++ asterisk-1.4.26.3/formats/format_wav.c.orig 2009-04-07 20:09:04.000000000 -0400
-@@ -0,0 +1,531 @@
-+/*
-+ * Asterisk -- An open source telephony toolkit.
-+ *
-+ * Copyright (C) 1999 - 2005, Digium, Inc.
-+ *
-+ * Mark Spencer <mar...@di...>
-+ *
-+ * See http://www.asterisk.org for more information about
-+ * the Asterisk project. Please do not directly contact
-+ * any of the maintainers of this project for assistance;
-+ * the project provides a web site, mailing lists and IRC
-+ * channels for your use.
-+ *
-+ * This program is free software, distributed under the terms of
-+ * the GNU General Public License Version 2. See the LICENSE file
-+ * at the top of the source tree.
-+ */
-+
-+/*! \file
-+ *
-+ * \brief Work with WAV in the proprietary Microsoft format.
-+ * Microsoft WAV format (8000hz Signed Linear)
-+ * \arg File name extension: wav (lower case)
-+ * \ingroup formats
-+ */
-+
-+#include "asterisk.h"
-+
-+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 186841 $")
-+
-+#include <unistd.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <stdlib.h>
-+#include <sys/time.h>
-+#include <stdio.h>
-+#include <errno.h>
-+#include <string.h>
-+
-+#include "asterisk/lock.h"
-+#include "asterisk/channel.h"
-+#include "asterisk/file.h"
-+#include "asterisk/logger.h"
-+#include "asterisk/sched.h"
-+#include "asterisk/module.h"
-+#include "asterisk/endian.h"
-+
-+/* Some Ideas for this code came from makewave.c by Jeffrey Chilton */
-+
-+/* Portions of the conversion code are by gu...@si... */
-+
-+#define WAV_BUF_SIZE 320
-+
-+struct wav_desc { /* format-specific parameters */
-+ int bytes;
-+ int needsgain;
-+ int lasttimeout;
-+ int maxlen;
-+ struct timeval last;
-+};
-+
-+#define BLOCKSIZE 160
-+
-+#define GAIN 0 /* 2^GAIN is the multiple to increase the volume by. The original value of GAIN was 2, or 4x (12 dB),
-+ * but there were many reports of the clipping of loud signal peaks (issue 5823 for example). */
-+
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+#define htoll(b) (b)
-+#define htols(b) (b)
-+#define ltohl(b) (b)
-+#define ltohs(b) (b)
-+#else
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+#define htoll(b) \
-+ (((((b) ) & 0xFF) << 24) | \
-+ ((((b) >> 8) & 0xFF) << 16) | \
-+ ((((b) >> 16) & 0xFF) << 8) | \
-+ ((((b) >> 24) & 0xFF) ))
-+#define htols(b) \
-+ (((((b) ) & 0xFF) << 8) | \
-+ ((((b) >> 8) & 0xFF) ))
-+#define ltohl(b) htoll(b)
-+#define ltohs(b) htols(b)
-+#else
-+#error "Endianess not defined"
-+#endif
-+#endif
-+
-+
-+static int check_header(FILE *f)
-+{
-+ int type, size, formtype;
-+ int fmt, hsize;
-+ short format, chans, bysam, bisam;
-+ int bysec;
-+ int freq;
-+ int data;
-+ if (fread(&type, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (type)\n");
-+ return -1;
-+ }
-+ if (fread(&size, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (size)\n");
-+ return -1;
-+ }
-+ size = ltohl(size);
-+ if (fread(&formtype, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (formtype)\n");
-+ return -1;
-+ }
-+ if (memcmp(&type, "RIFF", 4)) {
-+ ast_log(LOG_WARNING, "Does not begin with RIFF\n");
-+ return -1;
-+ }
-+ if (memcmp(&formtype, "WAVE", 4)) {
-+ ast_log(LOG_WARNING, "Does not contain WAVE\n");
-+ return -1;
-+ }
-+ if (fread(&fmt, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (fmt)\n");
-+ return -1;
-+ }
-+ if (memcmp(&fmt, "fmt ", 4)) {
-+ ast_log(LOG_WARNING, "Does not say fmt\n");
-+ return -1;
-+ }
-+ if (fread(&hsize, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (formtype)\n");
-+ return -1;
-+ }
-+ if (ltohl(hsize) < 16) {
-+ ast_log(LOG_WARNING, "Unexpected header size %d\n", ltohl(hsize));
-+ return -1;
-+ }
-+ if (fread(&format, 1, 2, f) != 2) {
-+ ast_log(LOG_WARNING, "Read failed (format)\n");
-+ return -1;
-+ }
-+ if (ltohs(format) != 1) {
-+ ast_log(LOG_WARNING, "Not a wav file %d\n", ltohs(format));
-+ return -1;
-+ }
-+ if (fread(&chans, 1, 2, f) != 2) {
-+ ast_log(LOG_WARNING, "Read failed (format)\n");
-+ return -1;
-+ }
-+ if (ltohs(chans) != 1) {
-+ ast_log(LOG_WARNING, "Not in mono %d\n", ltohs(chans));
-+ return -1;
-+ }
-+ if (fread(&freq, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (freq)\n");
-+ return -1;
-+ }
-+ if (ltohl(freq) != DEFAULT_SAMPLE_RATE) {
-+ ast_log(LOG_WARNING, "Unexpected frequency %d\n", ltohl(freq));
-+ return -1;
-+ }
-+ /* Ignore the byte frequency */
-+ if (fread(&bysec, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (BYTES_PER_SECOND)\n");
-+ return -1;
-+ }
-+ /* Check bytes per sample */
-+ if (fread(&bysam, 1, 2, f) != 2) {
-+ ast_log(LOG_WARNING, "Read failed (BYTES_PER_SAMPLE)\n");
-+ return -1;
-+ }
-+ if (ltohs(bysam) != 2) {
-+ ast_log(LOG_WARNING, "Can only handle 16bits per sample: %d\n", ltohs(bysam));
-+ return -1;
-+ }
-+ if (fread(&bisam, 1, 2, f) != 2) {
-+ ast_log(LOG_WARNING, "Read failed (Bits Per Sample): %d\n", ltohs(bisam));
-+ return -1;
-+ }
-+ /* Skip any additional header */
-+ if (fseek(f,ltohl(hsize)-16,SEEK_CUR) == -1 ) {
-+ ast_log(LOG_WARNING, "Failed to skip remaining header bytes: %d\n", ltohl(hsize)-16 );
-+ return -1;
-+ }
-+ /* Skip any facts and get the first data block */
-+ for(;;)
-+ {
-+ char buf[4];
-+
-+ /* Begin data chunk */
-+ if (fread(&buf, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (data)\n");
-+ return -1;
-+ }
-+ /* Data has the actual length of data in it */
-+ if (fread(&data, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Read failed (data)\n");
-+ return -1;
-+ }
-+ data = ltohl(data);
-+ if(memcmp(buf, "data", 4) == 0 )
-+ break;
-+ if(memcmp(buf, "fact", 4) != 0 ) {
-+ ast_log(LOG_WARNING, "Unknown block - not fact or data\n");
-+ return -1;
-+ }
-+ if (fseek(f,data,SEEK_CUR) == -1 ) {
-+ ast_log(LOG_WARNING, "Failed to skip fact block: %d\n", data );
-+ return -1;
-+ }
-+ }
-+#if 0
-+ curpos = lseek(fd, 0, SEEK_CUR);
-+ truelength = lseek(fd, 0, SEEK_END);
-+ lseek(fd, curpos, SEEK_SET);
-+ truelength -= curpos;
-+#endif
-+ return data;
-+}
-+
-+static int update_header(FILE *f)
-+{
-+ off_t cur,end;
-+ int datalen,filelen,bytes;
-+
-+ cur = ftello(f);
-+ fseek(f, 0, SEEK_END);
-+ end = ftello(f);
-+ /* data starts 44 bytes in */
-+ bytes = end - 44;
-+ datalen = htoll(bytes);
-+ /* chunk size is bytes of data plus 36 bytes of header */
-+ filelen = htoll(36 + bytes);
-+
-+ if (cur < 0) {
-+ ast_log(LOG_WARNING, "Unable to find our position\n");
-+ return -1;
-+ }
-+ if (fseek(f, 4, SEEK_SET)) {
-+ ast_log(LOG_WARNING, "Unable to set our position\n");
-+ return -1;
-+ }
-+ if (fwrite(&filelen, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to set write file size\n");
-+ return -1;
-+ }
-+ if (fseek(f, 40, SEEK_SET)) {
-+ ast_log(LOG_WARNING, "Unable to set our position\n");
-+ return -1;
-+ }
-+ if (fwrite(&datalen, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to set write datalen\n");
-+ return -1;
-+ }
-+ if (fseeko(f, cur, SEEK_SET)) {
-+ ast_log(LOG_WARNING, "Unable to return to position\n");
-+ return -1;
-+ }
-+ return 0;
-+}
-+
-+static int write_header(FILE *f)
-+{
-+ unsigned int hz=htoll(8000);
-+ unsigned int bhz = htoll(16000);
-+ unsigned int hs = htoll(16);
-+ unsigned short fmt = htols(1);
-+ unsigned short chans = htols(1);
-+ unsigned short bysam = htols(2);
-+ unsigned short bisam = htols(16);
-+ unsigned int size = htoll(0);
-+ /* Write a wav header, ignoring sizes which will be filled in later */
-+ fseek(f,0,SEEK_SET);
-+ if (fwrite("RIFF", 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&size, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite("WAVEfmt ", 1, 8, f) != 8) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&hs, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&fmt, 1, 2, f) != 2) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&chans, 1, 2, f) != 2) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&hz, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&bhz, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&bysam, 1, 2, f) != 2) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&bisam, 1, 2, f) != 2) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite("data", 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ if (fwrite(&size, 1, 4, f) != 4) {
-+ ast_log(LOG_WARNING, "Unable to write header\n");
-+ return -1;
-+ }
-+ return 0;
-+}
-+
-+static int wav_open(struct ast_filestream *s)
-+{
-+ /* We don't have any header to read or anything really, but
-+ if we did, it would go here. We also might want to check
-+ and be sure it's a valid file. */
-+ struct wav_desc *tmp = (struct wav_desc *)s->_private;
-+ if ((tmp->maxlen = check_header(s->f)) < 0)
-+ return -1;
-+ return 0;
-+}
-+
-+static int wav_rewrite(struct ast_filestream *s, const char *comment)
-+{
-+ /* We don't have any header to read or anything really, but
-+ if we did, it would go here. We also might want to check
-+ and be sure it's a valid file. */
-+
-+ if (write_header(s->f))
-+ return -1;
-+ return 0;
-+}
-+
-+static void wav_close(struct ast_filestream *s)
-+{
-+ char zero = 0;
-+ struct wav_desc *fs = (struct wav_desc *)s->_private;
-+ /* Pad to even length */
-+ if (fs->bytes & 0x1) {
-+ if (!fwrite(&zero, 1, 1, s->f)) {
-+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
-+ }
-+ }
-+}
-+
-+static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext)
-+{
-+ int res;
-+ int samples; /* actual samples read */
-+ int x;
-+ short *tmp;
-+ int bytes = WAV_BUF_SIZE; /* in bytes */
-+ off_t here;
-+ /* Send a frame from the file to the appropriate channel */
-+ struct wav_desc *fs = (struct wav_desc *)s->_private;
-+
-+ here = ftello(s->f);
-+ if (fs->maxlen - here < bytes) /* truncate if necessary */
-+ bytes = fs->maxlen - here;
-+ if (bytes < 0)
-+ bytes = 0;
-+/* ast_log(LOG_DEBUG, "here: %d, maxlen: %d, bytes: %d\n", here, s->maxlen, bytes); */
-+ s->fr.frametype = AST_FRAME_VOICE;
-+ s->fr.subclass = AST_FORMAT_SLINEAR;
-+ s->fr.mallocd = 0;
-+ AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, bytes);
-+
-+ if ( (res = fread(s->fr.data, 1, s->fr.datalen, s->f)) <= 0 ) {
-+ if (res)
-+ ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
-+ return NULL;
-+ }
-+ s->fr.datalen = res;
-+ s->fr.samples = samples = res / 2;
-+
-+ tmp = (short *)(s->fr.data);
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+ /* file format is little endian so we need to swap */
-+ for( x = 0; x < samples; x++)
-+ tmp[x] = (tmp[x] << 8) | ((tmp[x] & 0xff00) >> 8);
-+#endif
-+
-+ if (fs->needsgain) {
-+ for (x=0; x < samples; x++) {
-+ if (tmp[x] & ((1 << GAIN) - 1)) {
-+ /* If it has data down low, then it's not something we've artificially increased gain
-+ on, so we don't need to gain adjust it */
-+ fs->needsgain = 0;
-+ break;
-+ }
-+ }
-+ if (fs->needsgain) {
-+ for (x=0; x < samples; x++)
-+ tmp[x] = tmp[x] >> GAIN;
-+ }
-+ }
-+
-+ *whennext = samples;
-+ return &s->fr;
-+}
-+
-+static int wav_write(struct ast_filestream *fs, struct ast_frame *f)
-+{
-+ int x;
-+ short tmp[8000], *tmpi;
-+ float tmpf;
-+ struct wav_desc *s = (struct wav_desc *)fs->_private;
-+ int res;
-+
-+ if (f->frametype != AST_FRAME_VOICE) {
-+ ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
-+ return -1;
-+ }
-+ if (f->subclass != AST_FORMAT_SLINEAR) {
-+ ast_log(LOG_WARNING, "Asked to write non-SLINEAR frame (%d)!\n", f->subclass);
-+ return -1;
-+ }
-+ if (f->datalen > sizeof(tmp)) {
-+ ast_log(LOG_WARNING, "Data length is too long\n");
-+ return -1;
-+ }
-+ if (!f->datalen)
-+ return -1;
-+
-+#if 0
-+ printf("Data Length: %d\n", f->datalen);
-+#endif
-+
-+ tmpi = f->data;
-+ /* Volume adjust here to accomodate */
-+ for (x=0;x<f->datalen/2;x++) {
-+ tmpf = ((float)tmpi[x]) * ((float)(1 << GAIN));
-+ if (tmpf > 32767.0)
-+ tmpf = 32767.0;
-+ if (tmpf < -32768.0)
-+ tmpf = -32768.0;
-+ tmp[x] = tmpf;
-+ tmp[x] &= ~((1 << GAIN) - 1);
-+
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+ tmp[x] = (tmp[x] << 8) | ((tmp[x] & 0xff00) >> 8);
-+#endif
-+
-+ }
-+ if ((res = fwrite(tmp, 1, f->datalen, fs->f)) != f->datalen ) {
-+ ast_log(LOG_WARNING, "Bad write (%d): %s\n", res, strerror(errno));
-+ return -1;
-+ }
-+
-+ s->bytes += f->datalen;
-+ update_header(fs->f);
-+
-+ return 0;
-+
-+}
-+
-+static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
-+{
-+ off_t min, max, cur, offset = 0, samples;
-+
-+ samples = sample_offset * 2; /* SLINEAR is 16 bits mono, so sample_offset * 2 = bytes */
-+ min = 44; /* wav header is 44 bytes */
-+ cur = ftello(fs->f);
-+ fseeko(fs->f, 0, SEEK_END);
-+ max = ftello(fs->f);
-+ if (whence == SEEK_SET)
-+ offset = samples + min;
-+ else if (whence == SEEK_CUR || whence == SEEK_FORCECUR)
-+ offset = samples + cur;
-+ else if (whence == SEEK_END)
-+ offset = max - samples;
-+ if (whence != SEEK_FORCECUR) {
-+ offset = (offset > max)?max:offset;
-+ }
-+ /* always protect the header space. */
-+ offset = (offset < min)?min:offset;
-+ return fseeko(fs->f, offset, SEEK_SET);
-+}
-+
-+static int wav_trunc(struct ast_filestream *fs)
-+{
-+ if (ftruncate(fileno(fs->f), ftello(fs->f)))
-+ return -1;
-+ return update_header(fs->f);
-+}
-+
-+static off_t wav_tell(struct ast_filestream *fs)
-+{
-+ off_t offset;
-+ offset = ftello(fs->f);
-+ /* subtract header size to get samples, then divide by 2 for 16 bit samples */
-+ return (offset - 44)/2;
-+}
-+
-+static const struct ast_format wav_f = {
-+ .name = "wav",
-+ .exts = "wav",
-+ .format = AST_FORMAT_SLINEAR,
-+ .open = wav_open,
-+ .rewrite = wav_rewrite,
-+ .write = wav_write,
-+ .seek = wav_seek,
-+ .trunc = wav_trunc,
-+ .tell = wav_tell,
-+ .read = wav_read,
-+ .close = wav_close,
-+ .buf_size = WAV_BUF_SIZE + AST_FRIENDLY_OFFSET,
-+ .desc_size = sizeof(struct wav_desc),
-+};
-+
-+static int load_module(void)
-+{
-+ return ast_format_register(&wav_f);
-+}
-+
-+static int unload_module(void)
-+{
-+ return ast_format_unregister(wav_f.name);
-+}
-+
-+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Microsoft WAV format (8000Hz Signed Linear)");
-diff -urN asterisk-1.4.26.3.orig/include/asterisk/file.h asterisk-1.4.26.3/include/asterisk/file.h
---- asterisk-1.4.26.3.orig/include/asterisk/file.h 2008-11-20 13:06:48.000000000 -0500
-+++ asterisk-1.4.26.3/include/asterisk/file.h 2011-09-19 14:24:10.000000000 -0400
-@@ -140,6 +140,7 @@
+diff -ur asterisk-1.4.44.orig/include/asterisk/file.h asterisk-1.4.44/include/asterisk/file.h
+--- asterisk-1.4.44.orig/include/asterisk/file.h 2010-05-21 16:59:14.000000000 -0400
++++ asterisk-1.4.44/include/asterisk/file.h 2012-04-06 11:36:12.000000000 -0400
+@@ -142,6 +142,7 @@
#endif
};
const char *orig_chan_name;
@@ -566,10 +31,10 @@
};
#define SEEK_FORCECUR 10
-diff -urN asterisk-1.4.26.3.orig/main/file.c asterisk-1.4.26.3/main/file.c
---- asterisk-1.4.26.3.orig/main/file.c 2009-06-26 17:16:39.000000000 -0400
-+++ asterisk-1.4.26.3/main/file.c 2011-09-19 14:24:10.000000000 -0400
-@@ -334,20 +334,22 @@
+diff -ur asterisk-1.4.44.orig/main/file.c asterisk-1.4.44/main/file.c
+--- asterisk-1.4.44.orig/main/file.c 2010-09-11 12:59:20.000000000 -0400
++++ asterisk-1.4.44/main/file.c 2012-04-06 11:36:12.000000000 -0400
+@@ -335,20 +335,22 @@
ast_safe_system(cmd);
}
@@ -596,7 +61,7 @@
ast_module_unref(f->fmt->module);
}
-@@ -1132,6 +1134,10 @@
+@@ -1155,6 +1157,10 @@
}
fs->vfs = NULL;
/* If truncated, we'll be at the beginning; if not truncated, then append */
Modified: branches/s2s/package/asterisk/asterisk-sounds-Makefile.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-sounds-Makefile.patch 2012-04-06 13:31:49 UTC (rev 5500)
+++ branches/s2s/package/asterisk/asterisk-sounds-Makefile.patch 2012-04-06 15:53:11 UTC (rev 5501)
@@ -1,7 +1,7 @@
-diff -ur asterisk-1.4.26.1.orig/sounds/Makefile asterisk-1.4.26.1/sounds/Makefile
---- asterisk-1.4.26.1.orig/sounds/Makefile 2009-03-26 18:17:32.000000000 -0400
-+++ asterisk-1.4.26.1/sounds/Makefile 2009-08-11 12:56:03.000000000 -0400
-@@ -80,7 +80,7 @@
+diff -urN asterisk-1.4.44.orig/sounds/Makefile asterisk-1.4.44/sounds/Makefile
+--- asterisk-1.4.44.orig/sounds/Makefile 2010-10-18 17:47:25.000000000 -0400
++++ asterisk-1.4.44/sounds/Makefile 2012-04-06 11:39:08.000000000 -0400
+@@ -82,7 +82,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
@@ -9,8 +9,17 @@
+ (cd $(SOUNDS_DIR); cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
touch $@
+ $(SOUNDS_DIR)/.asterisk-core-sounds-en_AU-%: have_download
+@@ -90,7 +90,7 @@
+ if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
+- (cd $(SOUNDS_DIR)/en_AU; cat $(PWD)/$${PACKAGE} | gzip -d | tar xof -) && \
++ (cd $(SOUNDS_DIR)/en_AU; cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
+ touch $@
+
$(SOUNDS_DIR)/.asterisk-core-sounds-es-%: have_download
-@@ -88,7 +88,7 @@
+@@ -98,7 +98,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
@@ -19,7 +28,7 @@
touch $@
$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: have_download
-@@ -96,7 +96,7 @@
+@@ -106,7 +106,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
@@ -28,7 +37,7 @@
touch $@
$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%: have_download
-@@ -104,7 +104,7 @@
+@@ -114,7 +114,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
@@ -37,7 +46,7 @@
touch $@
$(SOUNDS_DIR)/.asterisk-extra-sounds-es-%: have_download
-@@ -112,7 +112,7 @@
+@@ -122,7 +122,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
@@ -46,7 +55,7 @@
touch $@
$(SOUNDS_DIR)/.asterisk-extra-sounds-fr-%: have_download
-@@ -120,14 +120,14 @@
+@@ -130,7 +130,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
@@ -55,9 +64,10 @@
touch $@
$(MOH_DIR)/.asterisk-moh-%: have_download
- @PACKAGE=$(subst $(MOH_DIR)/.asterisk,asterisk,$@).tar.gz; \
+@@ -138,7 +138,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(su...
[truncated message content] |
|
From: <kr...@us...> - 2012-06-20 16:56:29
|
Revision: 5578
http://astlinux.svn.sourceforge.net/astlinux/?rev=5578&view=rev
Author: krisk84
Date: 2012-06-20 16:56:18 +0000 (Wed, 20 Jun 2012)
Log Message:
-----------
revert asterisk to rev 5500
Revision Links:
--------------
http://astlinux.svn.sourceforge.net/astlinux/?rev=5500&view=rev
Modified Paths:
--------------
branches/s2s/package/asterisk/asterisk-log-rtpip.patch
branches/s2s/package/asterisk/asterisk-recording.patch
branches/s2s/package/asterisk/asterisk-sounds-Makefile.patch
branches/s2s/package/asterisk/asterisk.mk
branches/s2s/package/asterisk/sounds.xml
Added Paths:
-----------
branches/s2s/package/asterisk/asterisk-1.4-bugid17688.patch
branches/s2s/package/asterisk/asterisk-chan_local.patch
branches/s2s/package/asterisk/asterisk-chansip-loop-crash.patch
Added: branches/s2s/package/asterisk/asterisk-1.4-bugid17688.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-1.4-bugid17688.patch (rev 0)
+++ branches/s2s/package/asterisk/asterisk-1.4-bugid17688.patch 2012-06-20 16:56:18 UTC (rev 5578)
@@ -0,0 +1,18 @@
+diff -urN asterisk-1.4.26.3.orig/codecs/gsm/Makefile asterisk-1.4.26.3/codecs/gsm/Makefile
+--- asterisk-1.4.26.3.orig/codecs/gsm/Makefile 2008-11-19 16:34:47.000000000 -0500
++++ asterisk-1.4.26.3/codecs/gsm/Makefile 2011-02-15 16:48:01.000000000 -0500
+@@ -37,6 +37,14 @@
+ ######### ppro's, etc, as well as the AMD K6 and K7. The compile will
+ ######### probably require gcc.
+
++# Due to the gsm codec beeing broken when compiled with gcc version 4.2
++# and optimization higher than -O2 we are checking for that version and
++# set the optimization to -O2 in this case.
++
++ifeq ($(shell $(CC) -v 2>&1 | awk '/^gcc version/ { split($$3, v, "."); printf "%s.%s\n", v[1], v[2]; }' ),4.2)
++OPTIMIZE=-O2
++endif
++
+ ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
+ ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm armv5b armeb hppa2.0 ppc powerpc ppc64 ia64 s390 bfin mipsel mips))
+ ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
Added: branches/s2s/package/asterisk/asterisk-chan_local.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-chan_local.patch (rev 0)
+++ branches/s2s/package/asterisk/asterisk-chan_local.patch 2012-06-20 16:56:18 UTC (rev 5578)
@@ -0,0 +1,105 @@
+diff -urN asterisk-1.4.26.3.orig/channels/chan_local.c asterisk-1.4.26.3/channels/chan_local.c
+--- asterisk-1.4.26.3.orig/channels/chan_local.c 2009-04-23 15:13:18.000000000 -0400
++++ asterisk-1.4.26.3/channels/chan_local.c 2011-11-17 10:31:14.000000000 -0500
+@@ -27,7 +27,7 @@
+
+ #include "asterisk.h"
+
+-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 190286 $")
++ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+ #include <stdio.h>
+ #include <string.h>
+@@ -120,6 +120,7 @@
+ #define LOCAL_ALREADY_MASQED (1 << 2) /*!< Already masqueraded */
+ #define LOCAL_LAUNCHED_PBX (1 << 3) /*!< PBX was launched */
+ #define LOCAL_NO_OPTIMIZATION (1 << 4) /*!< Do not optimize using masquerading */
++#define LOCAL_MOH_PASSTHRU (1 << 5) /*!< Pass through music on hold start/stop frames */
+
+ static AST_LIST_HEAD_STATIC(locals, local_pvt);
+
+@@ -204,6 +205,9 @@
+ return and destroy p. */
+ ast_mutex_unlock(&p->lock);
+ p = local_pvt_destroy(p);
++ if (other) {
++ ast_channel_unlock(other);
++ }
+ return -1;
+ }
+
+@@ -371,9 +375,9 @@
+ return -1;
+
+ /* If this is an MOH hold or unhold, do it on the Local channel versus real channel */
+- if (condition == AST_CONTROL_HOLD) {
++ if (!ast_test_flag(p, LOCAL_MOH_PASSTHRU) && condition == AST_CONTROL_HOLD) {
+ ast_moh_start(ast, data, NULL);
+- } else if (condition == AST_CONTROL_UNHOLD) {
++ } else if (!ast_test_flag(p, LOCAL_MOH_PASSTHRU) && condition == AST_CONTROL_UNHOLD) {
+ ast_moh_stop(ast);
+ } else {
+ /* Queue up a frame representing the indication as a control frame */
+@@ -570,11 +574,11 @@
+ ast_clear_flag(p, LOCAL_LAUNCHED_PBX);
+ ast_module_user_remove(p->u_chan);
+ } else {
+- p->owner = NULL;
+ ast_module_user_remove(p->u_owner);
+ while (p->chan && ast_channel_trylock(p->chan)) {
+ DEADLOCK_AVOIDANCE(&p->lock);
+ }
++ p->owner = NULL;
+ if (p->chan) {
+ ast_queue_hangup(p->chan);
+ ast_channel_unlock(p->chan);
+@@ -631,6 +635,8 @@
+ *opts++ = '\0';
+ if (strchr(opts, 'n'))
+ ast_set_flag(tmp, LOCAL_NO_OPTIMIZATION);
++ if (strchr(opts, 'm'))
++ ast_set_flag(tmp, LOCAL_MOH_PASSTHRU);
+ }
+
+ /* Look for a context */
+diff -urN asterisk-1.4.26.3.orig/main/channel.c asterisk-1.4.26.3/main/channel.c
+--- asterisk-1.4.26.3.orig/main/channel.c 2009-08-10 16:14:34.000000000 -0400
++++ asterisk-1.4.26.3/main/channel.c 2011-11-21 15:01:13.000000000 -0500
+@@ -938,22 +938,22 @@
+ }
+ }
+
+- if ((queued_frames + new_frames) > 128) {
+- ast_log(LOG_WARNING, "Exceptionally long queue length queuing to %s\n", chan->name);
+- while ((f = AST_LIST_REMOVE_HEAD(&frames, frame_list))) {
+- ast_frfree(f);
+- }
+- ast_channel_unlock(chan);
+- return 0;
+- }
+-
+- if ((queued_voice_frames + new_voice_frames) > 96) {
+- ast_log(LOG_WARNING, "Exceptionally long voice queue length queuing to %s\n", chan->name);
+- while ((f = AST_LIST_REMOVE_HEAD(&frames, frame_list))) {
+- ast_frfree(f);
++ if ((queued_frames + new_frames > 128 || queued_voice_frames + new_voice_frames > 96)) {
++ int count = 0;
++ ast_log(LOG_WARNING, "Exceptionally long %squeue length queuing to %s\n", queued_frames + new_frames > 128 ? "" : "voice ", chan->name);
++ AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->readq, cur, frame_list) {
++ /* Save the most recent frame */
++ if (!AST_LIST_NEXT(cur, frame_list)) {
++ break;
++ } else if (cur->frametype == AST_FRAME_VOICE || cur->frametype == AST_FRAME_VIDEO || cur->frametype == AST_FRAME_NULL) {
++ if (++count > 64) {
++ break;
++ }
++ AST_LIST_REMOVE_CURRENT(&chan->readq, frame_list);
++ ast_frfree(cur);
++ }
+ }
+- ast_channel_unlock(chan);
+- return 0;
++ AST_LIST_TRAVERSE_SAFE_END;
+ }
+
+ if (after) {
Added: branches/s2s/package/asterisk/asterisk-chansip-loop-crash.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-chansip-loop-crash.patch (rev 0)
+++ branches/s2s/package/asterisk/asterisk-chansip-loop-crash.patch 2012-06-20 16:56:18 UTC (rev 5578)
@@ -0,0 +1,15 @@
+diff -ur asterisk-1.4.26.3.orig/channels/chan_sip.c asterisk-1.4.26.3/channels/chan_sip.c
+--- asterisk-1.4.26.3.orig/channels/chan_sip.c 2010-03-01 13:46:30.000000000 -0500
++++ asterisk-1.4.26.3/channels/chan_sip.c 2010-03-01 13:47:05.000000000 -0500
+@@ -1807,11 +1807,6 @@
+ res = XMIT_ERROR; /* Don't bother with trying to transmit again */
+ }
+
+- if (p->registry && p->registry->regstate < REG_STATE_REGISTERED) {
+- AST_SCHED_DEL(sched, p->registry->timeout);
+- p->registry->needdns = TRUE;
+- p->registry->timeout = ast_sched_add(sched, 1, sip_reg_timeout, p->registry);
+- }
+ }
+
+ if (res != len)
Modified: branches/s2s/package/asterisk/asterisk-log-rtpip.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-log-rtpip.patch 2012-06-18 16:21:44 UTC (rev 5577)
+++ branches/s2s/package/asterisk/asterisk-log-rtpip.patch 2012-06-20 16:56:18 UTC (rev 5578)
@@ -1,13 +1,23 @@
-diff -urN asterisk-1.4.44.orig/channels/chan_sip.c asterisk-1.4.44/channels/chan_sip.c
---- asterisk-1.4.44.orig/channels/chan_sip.c 2011-11-21 14:54:07.000000000 -0500
-+++ asterisk-1.4.44/channels/chan_sip.c 2012-04-06 11:30:39.000000000 -0400
-@@ -6030,8 +6030,7 @@
+diff -ur asterisk-1.4.20.orig/channels/chan_sip.c asterisk-1.4.20/channels/chan_sip.c
+--- asterisk-1.4.20.orig/channels/chan_sip.c 2008-05-14 08:51:06.000000000 -0400
++++ asterisk-1.4.20/channels/chan_sip.c 2008-05-21 00:12:25.000000000 -0400
+@@ -5216,8 +5216,7 @@
+ if (portno > 0) {
sin.sin_port = htons(portno);
- memcpy(&sin.sin_addr, hp->h_addr, sizeof(sin.sin_addr));
ast_rtp_set_peer(p->rtp, &sin);
- if (debug)
- ast_verbose("Peer audio RTP is at port %s:%d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
+ ast_verbose("Peer audio RTP is at port %s:%d (name=%s, callid=%s)\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port), (((p->owner != NULL) && (p->owner->name != NULL)) ? p->owner->name : "unknown"), ((p->callid != NULL) ? p->callid : "unknown"));
- } else if (udptlportno > 0) {
- if (debug)
- ast_verbose("Got T.38 Re-invite without audio. Keeping RTP active during T.38 session.\n");
+ } else {
+ if (udptlportno > 0) {
+ if (debug)
+@@ -5533,8 +5532,7 @@
+ /* Setup audio port number */
+ if (p->rtp && sin.sin_port) {
+ ast_rtp_set_peer(p->rtp, &sin);
+- if (debug)
+- ast_verbose("Peer audio RTP is at port %s:%d\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
++ ast_verbose("Peer audio RTP is at port %s:%d (name=%s, callid=%s)\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port), (((p->owner != NULL) && (p->owner->name != NULL)) ? p->owner->name : "unknown"), ((p->callid != NULL) ? p->callid : "unknown"));
+ }
+
+ /* Setup video port number */
Modified: branches/s2s/package/asterisk/asterisk-recording.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-recording.patch 2012-06-18 16:21:44 UTC (rev 5577)
+++ branches/s2s/package/asterisk/asterisk-recording.patch 2012-06-20 16:56:18 UTC (rev 5578)
@@ -1,7 +1,7 @@
-diff -ur asterisk-1.4.44.orig/formats/format_wav.c asterisk-1.4.44/formats/format_wav.c
---- asterisk-1.4.44.orig/formats/format_wav.c 2011-04-25 15:28:41.000000000 -0400
-+++ asterisk-1.4.44/formats/format_wav.c 2012-04-06 11:36:12.000000000 -0400
-@@ -339,6 +339,8 @@
+diff -urN asterisk-1.4.26.3.orig/formats/format_wav.c asterisk-1.4.26.3/formats/format_wav.c
+--- asterisk-1.4.26.3.orig/formats/format_wav.c 2009-04-07 20:09:04.000000000 -0400
++++ asterisk-1.4.26.3/formats/format_wav.c 2011-09-19 14:24:10.000000000 -0400
+@@ -345,6 +345,8 @@
{
char zero = 0;
struct wav_desc *fs = (struct wav_desc *)s->_private;
@@ -10,7 +10,7 @@
/* Pad to even length */
if (fs->bytes & 0x1) {
if (!fwrite(&zero, 1, 1, s->f)) {
-@@ -452,8 +454,7 @@
+@@ -458,8 +460,7 @@
}
s->bytes += f->datalen;
@@ -20,10 +20,545 @@
return 0;
}
-diff -ur asterisk-1.4.44.orig/include/asterisk/file.h asterisk-1.4.44/include/asterisk/file.h
---- asterisk-1.4.44.orig/include/asterisk/file.h 2010-05-21 16:59:14.000000000 -0400
-+++ asterisk-1.4.44/include/asterisk/file.h 2012-04-06 11:36:12.000000000 -0400
-@@ -142,6 +142,7 @@
+diff -urN asterisk-1.4.26.3.orig/formats/format_wav.c.orig asterisk-1.4.26.3/formats/format_wav.c.orig
+--- asterisk-1.4.26.3.orig/formats/format_wav.c.orig 1969-12-31 19:00:00.000000000 -0500
++++ asterisk-1.4.26.3/formats/format_wav.c.orig 2009-04-07 20:09:04.000000000 -0400
+@@ -0,0 +1,531 @@
++/*
++ * Asterisk -- An open source telephony toolkit.
++ *
++ * Copyright (C) 1999 - 2005, Digium, Inc.
++ *
++ * Mark Spencer <mar...@di...>
++ *
++ * See http://www.asterisk.org for more information about
++ * the Asterisk project. Please do not directly contact
++ * any of the maintainers of this project for assistance;
++ * the project provides a web site, mailing lists and IRC
++ * channels for your use.
++ *
++ * This program is free software, distributed under the terms of
++ * the GNU General Public License Version 2. See the LICENSE file
++ * at the top of the source tree.
++ */
++
++/*! \file
++ *
++ * \brief Work with WAV in the proprietary Microsoft format.
++ * Microsoft WAV format (8000hz Signed Linear)
++ * \arg File name extension: wav (lower case)
++ * \ingroup formats
++ */
++
++#include "asterisk.h"
++
++ASTERISK_FILE_VERSION(__FILE__, "$Revision: 186841 $")
++
++#include <unistd.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <stdlib.h>
++#include <sys/time.h>
++#include <stdio.h>
++#include <errno.h>
++#include <string.h>
++
++#include "asterisk/lock.h"
++#include "asterisk/channel.h"
++#include "asterisk/file.h"
++#include "asterisk/logger.h"
++#include "asterisk/sched.h"
++#include "asterisk/module.h"
++#include "asterisk/endian.h"
++
++/* Some Ideas for this code came from makewave.c by Jeffrey Chilton */
++
++/* Portions of the conversion code are by gu...@si... */
++
++#define WAV_BUF_SIZE 320
++
++struct wav_desc { /* format-specific parameters */
++ int bytes;
++ int needsgain;
++ int lasttimeout;
++ int maxlen;
++ struct timeval last;
++};
++
++#define BLOCKSIZE 160
++
++#define GAIN 0 /* 2^GAIN is the multiple to increase the volume by. The original value of GAIN was 2, or 4x (12 dB),
++ * but there were many reports of the clipping of loud signal peaks (issue 5823 for example). */
++
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++#define htoll(b) (b)
++#define htols(b) (b)
++#define ltohl(b) (b)
++#define ltohs(b) (b)
++#else
++#if __BYTE_ORDER == __BIG_ENDIAN
++#define htoll(b) \
++ (((((b) ) & 0xFF) << 24) | \
++ ((((b) >> 8) & 0xFF) << 16) | \
++ ((((b) >> 16) & 0xFF) << 8) | \
++ ((((b) >> 24) & 0xFF) ))
++#define htols(b) \
++ (((((b) ) & 0xFF) << 8) | \
++ ((((b) >> 8) & 0xFF) ))
++#define ltohl(b) htoll(b)
++#define ltohs(b) htols(b)
++#else
++#error "Endianess not defined"
++#endif
++#endif
++
++
++static int check_header(FILE *f)
++{
++ int type, size, formtype;
++ int fmt, hsize;
++ short format, chans, bysam, bisam;
++ int bysec;
++ int freq;
++ int data;
++ if (fread(&type, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (type)\n");
++ return -1;
++ }
++ if (fread(&size, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (size)\n");
++ return -1;
++ }
++ size = ltohl(size);
++ if (fread(&formtype, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (formtype)\n");
++ return -1;
++ }
++ if (memcmp(&type, "RIFF", 4)) {
++ ast_log(LOG_WARNING, "Does not begin with RIFF\n");
++ return -1;
++ }
++ if (memcmp(&formtype, "WAVE", 4)) {
++ ast_log(LOG_WARNING, "Does not contain WAVE\n");
++ return -1;
++ }
++ if (fread(&fmt, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (fmt)\n");
++ return -1;
++ }
++ if (memcmp(&fmt, "fmt ", 4)) {
++ ast_log(LOG_WARNING, "Does not say fmt\n");
++ return -1;
++ }
++ if (fread(&hsize, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (formtype)\n");
++ return -1;
++ }
++ if (ltohl(hsize) < 16) {
++ ast_log(LOG_WARNING, "Unexpected header size %d\n", ltohl(hsize));
++ return -1;
++ }
++ if (fread(&format, 1, 2, f) != 2) {
++ ast_log(LOG_WARNING, "Read failed (format)\n");
++ return -1;
++ }
++ if (ltohs(format) != 1) {
++ ast_log(LOG_WARNING, "Not a wav file %d\n", ltohs(format));
++ return -1;
++ }
++ if (fread(&chans, 1, 2, f) != 2) {
++ ast_log(LOG_WARNING, "Read failed (format)\n");
++ return -1;
++ }
++ if (ltohs(chans) != 1) {
++ ast_log(LOG_WARNING, "Not in mono %d\n", ltohs(chans));
++ return -1;
++ }
++ if (fread(&freq, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (freq)\n");
++ return -1;
++ }
++ if (ltohl(freq) != DEFAULT_SAMPLE_RATE) {
++ ast_log(LOG_WARNING, "Unexpected frequency %d\n", ltohl(freq));
++ return -1;
++ }
++ /* Ignore the byte frequency */
++ if (fread(&bysec, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (BYTES_PER_SECOND)\n");
++ return -1;
++ }
++ /* Check bytes per sample */
++ if (fread(&bysam, 1, 2, f) != 2) {
++ ast_log(LOG_WARNING, "Read failed (BYTES_PER_SAMPLE)\n");
++ return -1;
++ }
++ if (ltohs(bysam) != 2) {
++ ast_log(LOG_WARNING, "Can only handle 16bits per sample: %d\n", ltohs(bysam));
++ return -1;
++ }
++ if (fread(&bisam, 1, 2, f) != 2) {
++ ast_log(LOG_WARNING, "Read failed (Bits Per Sample): %d\n", ltohs(bisam));
++ return -1;
++ }
++ /* Skip any additional header */
++ if (fseek(f,ltohl(hsize)-16,SEEK_CUR) == -1 ) {
++ ast_log(LOG_WARNING, "Failed to skip remaining header bytes: %d\n", ltohl(hsize)-16 );
++ return -1;
++ }
++ /* Skip any facts and get the first data block */
++ for(;;)
++ {
++ char buf[4];
++
++ /* Begin data chunk */
++ if (fread(&buf, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (data)\n");
++ return -1;
++ }
++ /* Data has the actual length of data in it */
++ if (fread(&data, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Read failed (data)\n");
++ return -1;
++ }
++ data = ltohl(data);
++ if(memcmp(buf, "data", 4) == 0 )
++ break;
++ if(memcmp(buf, "fact", 4) != 0 ) {
++ ast_log(LOG_WARNING, "Unknown block - not fact or data\n");
++ return -1;
++ }
++ if (fseek(f,data,SEEK_CUR) == -1 ) {
++ ast_log(LOG_WARNING, "Failed to skip fact block: %d\n", data );
++ return -1;
++ }
++ }
++#if 0
++ curpos = lseek(fd, 0, SEEK_CUR);
++ truelength = lseek(fd, 0, SEEK_END);
++ lseek(fd, curpos, SEEK_SET);
++ truelength -= curpos;
++#endif
++ return data;
++}
++
++static int update_header(FILE *f)
++{
++ off_t cur,end;
++ int datalen,filelen,bytes;
++
++ cur = ftello(f);
++ fseek(f, 0, SEEK_END);
++ end = ftello(f);
++ /* data starts 44 bytes in */
++ bytes = end - 44;
++ datalen = htoll(bytes);
++ /* chunk size is bytes of data plus 36 bytes of header */
++ filelen = htoll(36 + bytes);
++
++ if (cur < 0) {
++ ast_log(LOG_WARNING, "Unable to find our position\n");
++ return -1;
++ }
++ if (fseek(f, 4, SEEK_SET)) {
++ ast_log(LOG_WARNING, "Unable to set our position\n");
++ return -1;
++ }
++ if (fwrite(&filelen, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to set write file size\n");
++ return -1;
++ }
++ if (fseek(f, 40, SEEK_SET)) {
++ ast_log(LOG_WARNING, "Unable to set our position\n");
++ return -1;
++ }
++ if (fwrite(&datalen, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to set write datalen\n");
++ return -1;
++ }
++ if (fseeko(f, cur, SEEK_SET)) {
++ ast_log(LOG_WARNING, "Unable to return to position\n");
++ return -1;
++ }
++ return 0;
++}
++
++static int write_header(FILE *f)
++{
++ unsigned int hz=htoll(8000);
++ unsigned int bhz = htoll(16000);
++ unsigned int hs = htoll(16);
++ unsigned short fmt = htols(1);
++ unsigned short chans = htols(1);
++ unsigned short bysam = htols(2);
++ unsigned short bisam = htols(16);
++ unsigned int size = htoll(0);
++ /* Write a wav header, ignoring sizes which will be filled in later */
++ fseek(f,0,SEEK_SET);
++ if (fwrite("RIFF", 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&size, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite("WAVEfmt ", 1, 8, f) != 8) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&hs, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&fmt, 1, 2, f) != 2) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&chans, 1, 2, f) != 2) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&hz, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&bhz, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&bysam, 1, 2, f) != 2) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&bisam, 1, 2, f) != 2) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite("data", 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ if (fwrite(&size, 1, 4, f) != 4) {
++ ast_log(LOG_WARNING, "Unable to write header\n");
++ return -1;
++ }
++ return 0;
++}
++
++static int wav_open(struct ast_filestream *s)
++{
++ /* We don't have any header to read or anything really, but
++ if we did, it would go here. We also might want to check
++ and be sure it's a valid file. */
++ struct wav_desc *tmp = (struct wav_desc *)s->_private;
++ if ((tmp->maxlen = check_header(s->f)) < 0)
++ return -1;
++ return 0;
++}
++
++static int wav_rewrite(struct ast_filestream *s, const char *comment)
++{
++ /* We don't have any header to read or anything really, but
++ if we did, it would go here. We also might want to check
++ and be sure it's a valid file. */
++
++ if (write_header(s->f))
++ return -1;
++ return 0;
++}
++
++static void wav_close(struct ast_filestream *s)
++{
++ char zero = 0;
++ struct wav_desc *fs = (struct wav_desc *)s->_private;
++ /* Pad to even length */
++ if (fs->bytes & 0x1) {
++ if (!fwrite(&zero, 1, 1, s->f)) {
++ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
++ }
++ }
++}
++
++static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext)
++{
++ int res;
++ int samples; /* actual samples read */
++ int x;
++ short *tmp;
++ int bytes = WAV_BUF_SIZE; /* in bytes */
++ off_t here;
++ /* Send a frame from the file to the appropriate channel */
++ struct wav_desc *fs = (struct wav_desc *)s->_private;
++
++ here = ftello(s->f);
++ if (fs->maxlen - here < bytes) /* truncate if necessary */
++ bytes = fs->maxlen - here;
++ if (bytes < 0)
++ bytes = 0;
++/* ast_log(LOG_DEBUG, "here: %d, maxlen: %d, bytes: %d\n", here, s->maxlen, bytes); */
++ s->fr.frametype = AST_FRAME_VOICE;
++ s->fr.subclass = AST_FORMAT_SLINEAR;
++ s->fr.mallocd = 0;
++ AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, bytes);
++
++ if ( (res = fread(s->fr.data, 1, s->fr.datalen, s->f)) <= 0 ) {
++ if (res)
++ ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
++ return NULL;
++ }
++ s->fr.datalen = res;
++ s->fr.samples = samples = res / 2;
++
++ tmp = (short *)(s->fr.data);
++#if __BYTE_ORDER == __BIG_ENDIAN
++ /* file format is little endian so we need to swap */
++ for( x = 0; x < samples; x++)
++ tmp[x] = (tmp[x] << 8) | ((tmp[x] & 0xff00) >> 8);
++#endif
++
++ if (fs->needsgain) {
++ for (x=0; x < samples; x++) {
++ if (tmp[x] & ((1 << GAIN) - 1)) {
++ /* If it has data down low, then it's not something we've artificially increased gain
++ on, so we don't need to gain adjust it */
++ fs->needsgain = 0;
++ break;
++ }
++ }
++ if (fs->needsgain) {
++ for (x=0; x < samples; x++)
++ tmp[x] = tmp[x] >> GAIN;
++ }
++ }
++
++ *whennext = samples;
++ return &s->fr;
++}
++
++static int wav_write(struct ast_filestream *fs, struct ast_frame *f)
++{
++ int x;
++ short tmp[8000], *tmpi;
++ float tmpf;
++ struct wav_desc *s = (struct wav_desc *)fs->_private;
++ int res;
++
++ if (f->frametype != AST_FRAME_VOICE) {
++ ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
++ return -1;
++ }
++ if (f->subclass != AST_FORMAT_SLINEAR) {
++ ast_log(LOG_WARNING, "Asked to write non-SLINEAR frame (%d)!\n", f->subclass);
++ return -1;
++ }
++ if (f->datalen > sizeof(tmp)) {
++ ast_log(LOG_WARNING, "Data length is too long\n");
++ return -1;
++ }
++ if (!f->datalen)
++ return -1;
++
++#if 0
++ printf("Data Length: %d\n", f->datalen);
++#endif
++
++ tmpi = f->data;
++ /* Volume adjust here to accomodate */
++ for (x=0;x<f->datalen/2;x++) {
++ tmpf = ((float)tmpi[x]) * ((float)(1 << GAIN));
++ if (tmpf > 32767.0)
++ tmpf = 32767.0;
++ if (tmpf < -32768.0)
++ tmpf = -32768.0;
++ tmp[x] = tmpf;
++ tmp[x] &= ~((1 << GAIN) - 1);
++
++#if __BYTE_ORDER == __BIG_ENDIAN
++ tmp[x] = (tmp[x] << 8) | ((tmp[x] & 0xff00) >> 8);
++#endif
++
++ }
++ if ((res = fwrite(tmp, 1, f->datalen, fs->f)) != f->datalen ) {
++ ast_log(LOG_WARNING, "Bad write (%d): %s\n", res, strerror(errno));
++ return -1;
++ }
++
++ s->bytes += f->datalen;
++ update_header(fs->f);
++
++ return 0;
++
++}
++
++static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
++{
++ off_t min, max, cur, offset = 0, samples;
++
++ samples = sample_offset * 2; /* SLINEAR is 16 bits mono, so sample_offset * 2 = bytes */
++ min = 44; /* wav header is 44 bytes */
++ cur = ftello(fs->f);
++ fseeko(fs->f, 0, SEEK_END);
++ max = ftello(fs->f);
++ if (whence == SEEK_SET)
++ offset = samples + min;
++ else if (whence == SEEK_CUR || whence == SEEK_FORCECUR)
++ offset = samples + cur;
++ else if (whence == SEEK_END)
++ offset = max - samples;
++ if (whence != SEEK_FORCECUR) {
++ offset = (offset > max)?max:offset;
++ }
++ /* always protect the header space. */
++ offset = (offset < min)?min:offset;
++ return fseeko(fs->f, offset, SEEK_SET);
++}
++
++static int wav_trunc(struct ast_filestream *fs)
++{
++ if (ftruncate(fileno(fs->f), ftello(fs->f)))
++ return -1;
++ return update_header(fs->f);
++}
++
++static off_t wav_tell(struct ast_filestream *fs)
++{
++ off_t offset;
++ offset = ftello(fs->f);
++ /* subtract header size to get samples, then divide by 2 for 16 bit samples */
++ return (offset - 44)/2;
++}
++
++static const struct ast_format wav_f = {
++ .name = "wav",
++ .exts = "wav",
++ .format = AST_FORMAT_SLINEAR,
++ .open = wav_open,
++ .rewrite = wav_rewrite,
++ .write = wav_write,
++ .seek = wav_seek,
++ .trunc = wav_trunc,
++ .tell = wav_tell,
++ .read = wav_read,
++ .close = wav_close,
++ .buf_size = WAV_BUF_SIZE + AST_FRIENDLY_OFFSET,
++ .desc_size = sizeof(struct wav_desc),
++};
++
++static int load_module(void)
++{
++ return ast_format_register(&wav_f);
++}
++
++static int unload_module(void)
++{
++ return ast_format_unregister(wav_f.name);
++}
++
++AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Microsoft WAV format (8000Hz Signed Linear)");
+diff -urN asterisk-1.4.26.3.orig/include/asterisk/file.h asterisk-1.4.26.3/include/asterisk/file.h
+--- asterisk-1.4.26.3.orig/include/asterisk/file.h 2008-11-20 13:06:48.000000000 -0500
++++ asterisk-1.4.26.3/include/asterisk/file.h 2011-09-19 14:24:10.000000000 -0400
+@@ -140,6 +140,7 @@
#endif
};
const char *orig_chan_name;
@@ -31,10 +566,10 @@
};
#define SEEK_FORCECUR 10
-diff -ur asterisk-1.4.44.orig/main/file.c asterisk-1.4.44/main/file.c
---- asterisk-1.4.44.orig/main/file.c 2010-09-11 12:59:20.000000000 -0400
-+++ asterisk-1.4.44/main/file.c 2012-04-06 11:36:12.000000000 -0400
-@@ -335,20 +335,22 @@
+diff -urN asterisk-1.4.26.3.orig/main/file.c asterisk-1.4.26.3/main/file.c
+--- asterisk-1.4.26.3.orig/main/file.c 2009-06-26 17:16:39.000000000 -0400
++++ asterisk-1.4.26.3/main/file.c 2011-09-19 14:24:10.000000000 -0400
+@@ -334,20 +334,22 @@
ast_safe_system(cmd);
}
@@ -61,7 +596,7 @@
ast_module_unref(f->fmt->module);
}
-@@ -1155,6 +1157,10 @@
+@@ -1132,6 +1134,10 @@
}
fs->vfs = NULL;
/* If truncated, we'll be at the beginning; if not truncated, then append */
Modified: branches/s2s/package/asterisk/asterisk-sounds-Makefile.patch
===================================================================
--- branches/s2s/package/asterisk/asterisk-sounds-Makefile.patch 2012-06-18 16:21:44 UTC (rev 5577)
+++ branches/s2s/package/asterisk/asterisk-sounds-Makefile.patch 2012-06-20 16:56:18 UTC (rev 5578)
@@ -1,7 +1,7 @@
-diff -urN asterisk-1.4.44.orig/sounds/Makefile asterisk-1.4.44/sounds/Makefile
---- asterisk-1.4.44.orig/sounds/Makefile 2010-10-18 17:47:25.000000000 -0400
-+++ asterisk-1.4.44/sounds/Makefile 2012-04-06 11:39:08.000000000 -0400
-@@ -82,7 +82,7 @@
+diff -ur asterisk-1.4.26.1.orig/sounds/Makefile asterisk-1.4.26.1/sounds/Makefile
+--- asterisk-1.4.26.1.orig/sounds/Makefile 2009-03-26 18:17:32.000000000 -0400
++++ asterisk-1.4.26.1/sounds/Makefile 2009-08-11 12:56:03.000000000 -0400
+@@ -80,7 +80,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
@@ -9,17 +9,8 @@
+ (cd $(SOUNDS_DIR); cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
touch $@
- $(SOUNDS_DIR)/.asterisk-core-sounds-en_AU-%: have_download
-@@ -90,7 +90,7 @@
- if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
- if test ! -f $${PACKAGE}; then exit 1; fi; \
- rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
-- (cd $(SOUNDS_DIR)/en_AU; cat $(PWD)/$${PACKAGE} | gzip -d | tar xof -) && \
-+ (cd $(SOUNDS_DIR)/en_AU; cat $(PWD)/$${PACKAGE} | gzip -d | tar xf -) && \
- touch $@
-
$(SOUNDS_DIR)/.asterisk-core-sounds-es-%: have_download
-@@ -98,7 +98,7 @@
+@@ -88,7 +88,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
@@ -28,7 +19,7 @@
touch $@
$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: have_download
-@@ -106,7 +106,7 @@
+@@ -96,7 +96,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
@@ -37,7 +28,7 @@
touch $@
$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%: have_download
-@@ -114,7 +114,7 @@
+@@ -104,7 +104,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
@@ -46,7 +37,7 @@
touch $@
$(SOUNDS_DIR)/.asterisk-extra-sounds-es-%: have_download
-@@ -122,7 +122,7 @@
+@@ -112,7 +112,7 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
@@ -55,7 +46,7 @@
touch $@
$(SOUNDS_DIR)/.asterisk-extra-sounds-fr-%: have_download
-@@ -130,7 +130,7 @@
+@@ -120,14 +120,14 @@
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
if test ! -f $${PACKAGE}; then exit 1; fi; \
rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
@@ -64,10 +55,9 @@
touch $@
$(MOH_DIR)/.asterisk-moh-%: have_download
-@@ -138,7 +138,7 @@
+ @PACKAGE=$(subst $(MOH_DIR)/.asterisk,asterisk,$@).tar.gz; \
if test ! -f $${PACKAGE}; then $(DOWNLOAD) $(WGET_ARGS) $(SOUNDS_UR...
[truncated message content] |