asterisk/asterisk.patch

changeset 311
263143ec0fb2
parent 310
73d852a30c9a
child 315
75d162df42e8
     1.1 --- a/asterisk/asterisk.patch	Sun Mar 20 20:00:02 2011 +0100
     1.2 +++ b/asterisk/asterisk.patch	Sun Mar 20 20:03:11 2011 +0100
     1.3 @@ -1,83 +1,74 @@
     1.4 -Index: Makefile
     1.5 ---- Makefile.orig	2010-06-10 22:35:06.000000000 +0200
     1.6 -+++ Makefile	2010-07-24 11:16:19.000000000 +0200
     1.7 -@@ -126,40 +126,18 @@
     1.8 +Index: addons/chan_ooh323.c
     1.9 +diff -Nau addons/chan_ooh323.c.orig addons/chan_ooh323.c
    1.10 +--- addons/chan_ooh323.c.orig	2010-10-09 16:02:26.000000000 +0200
    1.11 ++++ addons/chan_ooh323.c	2011-03-13 14:03:42.000000000 +0100
    1.12 +@@ -23,6 +23,12 @@
    1.13   
    1.14 - # Define standard directories for various platforms
    1.15 - # These apply if they are not redefined in asterisk.conf 
    1.16 --ifeq ($(OSARCH),SunOS)
    1.17 --  ASTETCDIR=/var/etc/asterisk
    1.18 --  ASTLIBDIR=/opt/asterisk/lib
    1.19 --  ASTVARLIBDIR=/var/opt/asterisk
    1.20 --  ASTDBDIR=$(ASTVARLIBDIR)
    1.21 --  ASTKEYDIR=$(ASTVARLIBDIR)
    1.22 --  ASTSPOOLDIR=/var/spool/asterisk
    1.23 --  ASTLOGDIR=/var/log/asterisk
    1.24 --  ASTHEADERDIR=/opt/asterisk/include
    1.25 --  ASTSBINDIR=/opt/asterisk/sbin
    1.26 --  ASTVARRUNDIR=/var/run/asterisk
    1.27 --  ASTMANDIR=/opt/asterisk/man
    1.28 --else
    1.29 -   ASTETCDIR=$(sysconfdir)/asterisk
    1.30 -   ASTLIBDIR=$(libdir)/asterisk
    1.31 -   ASTHEADERDIR=$(includedir)/asterisk
    1.32 -   ASTSBINDIR=$(sbindir)
    1.33 --  ASTSPOOLDIR=$(localstatedir)/spool/asterisk
    1.34 --  ASTLOGDIR=$(localstatedir)/log/asterisk
    1.35 --  ASTVARRUNDIR=$(localstatedir)/run/asterisk
    1.36 -+  ASTSPOOLDIR=$(localstatedir)/spool
    1.37 -+  ASTLOGDIR=$(localstatedir)/log
    1.38 -+  ASTVARRUNDIR=$(localstatedir)/run
    1.39 -   ASTMANDIR=$(mandir)
    1.40 --ifneq ($(findstring BSD,$(OSARCH)),)
    1.41 --  ASTVARLIBDIR=$(prefix)/share/asterisk
    1.42 --  ASTVARRUNDIR=$(localstatedir)/run/asterisk
    1.43 --  ASTDBDIR=$(localstatedir)/db/asterisk
    1.44 --else
    1.45 --  ASTVARLIBDIR=$(localstatedir)/lib/asterisk
    1.46 --  ASTDBDIR=$(ASTVARLIBDIR)
    1.47 --endif
    1.48 -+  ASTVARLIBDIR=$(localstatedir)/lib
    1.49 -+  ASTDBDIR=$(localstatedir)/db
    1.50 -   ASTKEYDIR=$(ASTVARLIBDIR)
    1.51 --endif
    1.52 --ifeq ($(ASTDATADIR),)
    1.53 -   ASTDATADIR:=$(ASTVARLIBDIR)
    1.54 --endif
    1.55 + #include "chan_ooh323.h"
    1.56 + #include <math.h>
    1.57 ++#if defined __SVR4 && defined __sun
    1.58 ++#include <sys/sockio.h>
    1.59 ++#ifndef IPTOS_MINCOST
    1.60 ++#define IPTOS_MINCOST 0x02
    1.61 ++#endif
    1.62 ++#endif
    1.63   
    1.64 - # Asterisk.conf is located in ASTETCDIR or by using the -C flag
    1.65 - # when starting Asterisk
    1.66 -@@ -259,12 +237,6 @@
    1.67 -   _ASTCFLAGS+=-fsigned-char
    1.68 - endif
    1.69 + #define FORMAT_STRING_SIZE	512
    1.70   
    1.71 --ifeq ($(OSARCH),FreeBSD)
    1.72 --  # -V is understood by BSD Make, not by GNU make.
    1.73 --  BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
    1.74 --  _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
    1.75 --endif
    1.76 --
    1.77 - ifeq ($(OSARCH),NetBSD)
    1.78 -   _ASTCFLAGS+=-pthread -I/usr/pkg/include
    1.79 - endif
    1.80 -@@ -567,8 +539,7 @@
    1.81 - 	fi
    1.82 - 	mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation
    1.83 - 	mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation/thirdparty
    1.84 --	mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
    1.85 --	mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
    1.86 -+	mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr
    1.87 - 	mkdir -p $(DESTDIR)$(ASTDATADIR)/keys
    1.88 - 	mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware
    1.89 - 	mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax
    1.90 +Index: addons/ooh323c/src/ooCmdChannel.c
    1.91 +diff -Nau addons/ooh323c/src/ooCmdChannel.c.orig addons/ooh323c/src/ooCmdChannel.c
    1.92 +--- addons/ooh323c/src/ooCmdChannel.c.orig	2010-03-26 00:38:58.000000000 +0100
    1.93 ++++ addons/ooh323c/src/ooCmdChannel.c	2011-03-13 14:03:42.000000000 +0100
    1.94 +@@ -25,6 +25,10 @@
    1.95 + #include "ooCalls.h"
    1.96 + #include "ooCmdChannel.h"
    1.97 + 
    1.98 ++#ifndef AF_LOCAL
    1.99 ++#define AF_LOCAL AF_UNIX
   1.100 ++#define PF_LOCAL PF_UNIX
   1.101 ++#endif
   1.102 + 
   1.103 + /** Global endpoint structure */
   1.104 + extern OOH323EndPoint gH323ep;
   1.105 +Index: addons/ooh323c/src/ooSocket.c
   1.106 +diff -Nau addons/ooh323c/src/ooSocket.c.orig addons/ooh323c/src/ooSocket.c
   1.107 +--- addons/ooh323c/src/ooSocket.c.orig	2010-03-25 22:39:04.000000000 +0100
   1.108 ++++ addons/ooh323c/src/ooSocket.c	2011-03-13 14:03:42.000000000 +0100
   1.109 +@@ -24,6 +24,9 @@
   1.110 + 
   1.111 + #include "ooSocket.h"
   1.112 + #include "ootrace.h"
   1.113 ++#if defined __SVR4 && defined __sun
   1.114 ++#include <sys/sockio.h>
   1.115 ++#endif
   1.116 + #if defined(_WIN32_WCE)
   1.117 + static int inited = 0;
   1.118 + #define SEND_FLAGS     0
   1.119 +Index: addons/ooh323cDriver.c
   1.120 +diff -Nau addons/ooh323cDriver.c.orig addons/ooh323cDriver.c
   1.121 +--- addons/ooh323cDriver.c.orig	2010-03-26 00:38:58.000000000 +0100
   1.122 ++++ addons/ooh323cDriver.c	2011-03-13 14:03:42.000000000 +0100
   1.123 +@@ -27,6 +27,11 @@
   1.124 + 
   1.125 + #define SEC_TO_HOLD_THREAD 24
   1.126 + 
   1.127 ++#ifndef AF_LOCAL
   1.128 ++#define AF_LOCAL AF_UNIX
   1.129 ++#define PF_LOCAL PF_UNIX
   1.130 ++#endif
   1.131 ++
   1.132 + extern struct ast_module *myself;
   1.133 + extern OOBOOL gH323Debug;
   1.134 + extern OOH323EndPoint gH323ep;
   1.135  Index: apps/app_backticks.c
   1.136 ---- apps/app_backticks.c.orig	2010-07-24 11:12:31.000000000 +0200
   1.137 -+++ apps/app_backticks.c	2010-07-24 11:12:31.000000000 +0200
   1.138 +diff -Nau apps/app_backticks.c.orig apps/app_backticks.c
   1.139 +--- apps/app_backticks.c.orig	1970-01-01 01:00:00.000000000 +0100
   1.140 ++++ apps/app_backticks.c	2011-03-13 14:03:42.000000000 +0100
   1.141  @@ -0,0 +1,129 @@
   1.142  +
   1.143  +#include "asterisk.h"
   1.144  +
   1.145 -+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.53 $")
   1.146 ++ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.52 $")
   1.147  +
   1.148  +#include <stdio.h> 
   1.149  +#include <asterisk/file.h>
   1.150 @@ -204,37 +195,38 @@
   1.151  +AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "BACKTICKS() dialplan function");
   1.152  +
   1.153  Index: apps/app_meetme.c
   1.154 ---- apps/app_meetme.c.orig	2010-06-23 23:15:53.000000000 +0200
   1.155 -+++ apps/app_meetme.c	2010-07-24 11:12:31.000000000 +0200
   1.156 -@@ -522,6 +522,7 @@
   1.157 +diff -Nau apps/app_meetme.c.orig apps/app_meetme.c
   1.158 +--- apps/app_meetme.c.orig	2011-01-07 21:53:02.000000000 +0100
   1.159 ++++ apps/app_meetme.c	2011-03-13 14:03:42.000000000 +0100
   1.160 +@@ -604,6 +604,7 @@
   1.161   	CONFFLAG_DURATION_LIMIT = (1 << 30),
   1.162   	/*! Do not write any audio to this channel until the state is up. */
   1.163   	CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31),
   1.164 -+	CONFFLAG_USERNAME = (1 << 31),
   1.165 ++	CONFFLAG_USERNAME = (1 << 32),
   1.166   };
   1.167   
   1.168 - enum {
   1.169 -@@ -531,6 +532,7 @@
   1.170 - 	OPT_ARG_DURATION_LIMIT = 3,
   1.171 + /* !If set play an intro announcement at start of conference */
   1.172 +@@ -617,6 +618,7 @@
   1.173   	OPT_ARG_MOH_CLASS = 4,
   1.174 - 	OPT_ARG_ARRAY_SIZE = 5,
   1.175 -+	OPT_ARG_USERNAME = 6,
   1.176 + 	OPT_ARG_INTROMSG = 5,
   1.177 + 	OPT_ARG_ARRAY_SIZE = 6,
   1.178 ++	OPT_ARG_USERNAME = 7,
   1.179   };
   1.180   
   1.181   AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS
   1.182 -@@ -563,6 +565,7 @@
   1.183 +@@ -650,6 +652,7 @@
   1.184   	AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ),
   1.185    	AST_APP_OPTION_ARG('S', CONFFLAG_DURATION_STOP, OPT_ARG_DURATION_STOP),
   1.186   	AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
   1.187  +	AST_APP_OPTION_ARG('n', CONFFLAG_USERNAME, OPT_ARG_USERNAME),
   1.188   END_OPTIONS );
   1.189   
   1.190 - static const char *app = "MeetMe";
   1.191 -@@ -2243,6 +2246,12 @@
   1.192 - 	if (!(confflags & CONFFLAG_QUIET) && ((confflags & CONFFLAG_INTROUSER) || (confflags & CONFFLAG_INTROUSERNOREVIEW))) {
   1.193 + static const char * const app = "MeetMe";
   1.194 +@@ -2429,6 +2432,12 @@
   1.195 + 		ast_test_flag64(confflags, CONFFLAG_INTROUSERNOREVIEW))) {
   1.196   		char destdir[PATH_MAX];
   1.197   
   1.198 -+ 	    if (   (confflags & CONFFLAG_USERNAME)
   1.199 ++ 	    if (!ast_test_flag64(confflags, CONFFLAG_USERNAME)
   1.200  + 		&& !ast_strlen_zero(optargs[OPT_ARG_USERNAME]) 
   1.201  + 		&& ast_fileexists(optargs[OPT_ARG_USERNAME], NULL, NULL))
   1.202  + 		snprintf(destdir, sizeof(destdir), "%s", optargs[OPT_ARG_USERNAME]);
   1.203 @@ -243,7 +235,7 @@
   1.204   		snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR);
   1.205   
   1.206   		if (ast_mkdir(destdir, 0777) != 0) {
   1.207 -@@ -2259,6 +2268,7 @@
   1.208 +@@ -2445,6 +2454,7 @@
   1.209   			res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL);
   1.210   		if (res == -1)
   1.211   			goto outrun;
   1.212 @@ -251,59 +243,142 @@
   1.213   	}
   1.214   
   1.215   	ast_mutex_lock(&conf->playlock);
   1.216 -Index: build_tools/make_defaults_h
   1.217 ---- build_tools/make_defaults_h.orig	2008-01-24 23:58:10.000000000 +0100
   1.218 -+++ build_tools/make_defaults_h	2010-07-24 11:12:31.000000000 +0200
   1.219 -@@ -17,7 +17,7 @@
   1.220 - #define DEFAULT_PID        "${INSTALL_PATH}${ASTVARRUNDIR}/asterisk.pid"
   1.221 - 
   1.222 - #define DEFAULT_VAR_DIR    "${INSTALL_PATH}${ASTVARLIBDIR}"
   1.223 --#define DEFAULT_DB         "${INSTALL_PATH}${ASTDBDIR}/astdb"
   1.224 -+#define DEFAULT_DB         "${INSTALL_PATH}${ASTDBDIR}/asterisk.db"
   1.225 - 
   1.226 - #define DEFAULT_DATA_DIR   "${INSTALL_PATH}${ASTDATADIR}"
   1.227 - #define DEFAULT_KEY_DIR    "${INSTALL_PATH}${ASTDATADIR}/keys"
   1.228 -Index: cdr/cdr_custom.c
   1.229 ---- cdr/cdr_custom.c.orig	2008-11-20 18:48:58.000000000 +0100
   1.230 -+++ cdr/cdr_custom.c	2010-07-24 11:12:31.000000000 +0200
   1.231 -@@ -83,7 +83,7 @@
   1.232 - 					ast_log(LOG_WARNING, "Format string too long, will be truncated, at line %d\n", var->lineno);
   1.233 - 				ast_copy_string(format, var->value, sizeof(format) - 1);
   1.234 - 				strcat(format,"\n");
   1.235 --				snprintf(master, sizeof(master),"%s/%s/%s", ast_config_AST_LOG_DIR, name, var->name);
   1.236 -+				snprintf(master, sizeof(master),"%s/cdr/%s", ast_config_AST_LOG_DIR, var->name);
   1.237 - 				if (var->next) {
   1.238 - 					ast_log(LOG_NOTICE, "Sorry, only one mapping is supported at this time, mapping '%s' will be ignored at line %d.\n", var->next->name, var->next->lineno);
   1.239 - 					break;
   1.240 -Index: cdr/cdr_sqlite3_custom.c
   1.241 ---- cdr/cdr_sqlite3_custom.c.orig	2010-04-13 18:38:41.000000000 +0200
   1.242 -+++ cdr/cdr_sqlite3_custom.c	2010-07-24 11:12:31.000000000 +0200
   1.243 -@@ -300,7 +300,7 @@
   1.244 +Index: apps/app_voicemail.c
   1.245 +diff -Nau apps/app_voicemail.c.orig apps/app_voicemail.c
   1.246 +--- apps/app_voicemail.c.orig	2011-01-07 20:58:30.000000000 +0100
   1.247 ++++ apps/app_voicemail.c	2011-03-13 14:03:42.000000000 +0100
   1.248 +@@ -366,6 +366,7 @@
   1.249 + static char imapport[8];
   1.250 + static char imapflags[128];
   1.251 + static char imapfolder[64];
   1.252 ++static int  imapsubfold = 0;
   1.253 + static char imapparentfolder[64] = "\0";
   1.254 + static char greetingfolder[64];
   1.255 + static char authuser[32];
   1.256 +@@ -2464,7 +2465,7 @@
   1.257   	}
   1.258   
   1.259 - 	/* is the database there? */
   1.260 --	snprintf(filename, sizeof(filename), "%s/master.db", ast_config_AST_LOG_DIR);
   1.261 -+	snprintf(filename, sizeof(filename), "%s/cdr/master.db", ast_config_AST_LOG_DIR);
   1.262 - 	res = sqlite3_open(filename, &db);
   1.263 - 	if (res != SQLITE_OK) {
   1.264 - 		ast_log(LOG_ERROR, "Could not open database %s.\n", filename);
   1.265 -Index: chan_capi-1.1.5/Makefile
   1.266 ---- chan_capi-1.1.5/Makefile.orig	2010-04-06 19:33:25.000000000 +0200
   1.267 -+++ chan_capi-1.1.5/Makefile	2010-07-24 11:12:31.000000000 +0200
   1.268 -@@ -100,6 +100,9 @@
   1.269 - CFLAGS+=-O2
   1.270 - CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
   1.271 - CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi)
   1.272 -+ifeq (${USE_OWN_LIBCAPI},yes)
   1.273 -+CFLAGS+=-DUSE_OWN_LIBCAPI
   1.274 -+endif
   1.275 + 	/* Build up server information */
   1.276 +-	ast_build_string(&t, &left, "{%s:%s/imap", imapserver, imapport);
   1.277 ++	ast_build_string(&t, &left, "{%s:%s", imapserver, imapport);
   1.278   
   1.279 - LIBS=-ldl -lpthread -lm
   1.280 - CC=gcc
   1.281 -Index: chan_capi-1.1.5/chan_capi20.h
   1.282 ---- chan_capi-1.1.5/chan_capi20.h.orig	2005-09-20 20:33:40.000000000 +0200
   1.283 -+++ chan_capi-1.1.5/chan_capi20.h	2010-07-24 11:12:31.000000000 +0200
   1.284 -@@ -8,6 +8,8 @@
   1.285 + 	/* Add authentication user if present */
   1.286 + 	if (!ast_strlen_zero(authuser))
   1.287 +@@ -6035,6 +6036,7 @@
   1.288 + 	/* simple. huh? */
   1.289 + 	char sequence[10];
   1.290 + 	char mailbox[256];
   1.291 ++	char folder[256];
   1.292 + 	int res;
   1.293 + 
   1.294 + 	/* get the real IMAP message number for this message */
   1.295 +@@ -6050,10 +6052,24 @@
   1.296 + 		mail_setflag(vms->mailstream, sequence, "\\Unseen");
   1.297 + 		mail_clearflag(vms->mailstream, sequence, "\\Seen");
   1.298 + 	}
   1.299 +-	if (!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) {
   1.300 +-		ast_mutex_unlock(&vms->lock);
   1.301 ++
   1.302 ++	if ((!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) || \
   1.303 ++		!strcasecmp(mbox(vmu, OLD_FOLDER), vms->curbox)) && \
   1.304 ++		(box == NEW_FOLDER || box == OLD_FOLDER)) {  /* Don't copy data, */
   1.305 ++		ast_mutex_unlock(&vms->lock);                /* just change Seen flag */
   1.306 + 		return 0;
   1.307 ++	} else if (box != NEW_FOLDER && box != OLD_FOLDER) { /* Do copy data */
   1.308 ++		if (imapsubfold == 1)                /* using INBOX or subfolder */
   1.309 ++			snprintf(folder, sizeof(folder), "%s%c%s", imapfolder, delimiter, mbox(vmu, box));
   1.310 ++		else
   1.311 ++			strncpy(folder, mbox(vmu, box), sizeof(folder));
   1.312 ++		int res = !mail_copy(vms->mailstream,sequence,folder);
   1.313 ++		ast_mutex_unlock(&vms->lock);
   1.314 ++		return res;
   1.315 ++	} else {  /* Copy data to INBOX delegating new/old status to Seen flag */
   1.316 ++		int res = !mail_copy(vms->mailstream,sequence,imapfolder);
   1.317 + 	}
   1.318 ++
   1.319 + 	/* Create the folder if it don't exist */
   1.320 + 	imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */
   1.321 + 	ast_debug(5, "Checking if folder exists: %s\n", mailbox);
   1.322 +@@ -10221,6 +10237,10 @@
   1.323 + #ifndef IMAP_STORAGE
   1.324 + 				} else if (!cmd) {
   1.325 + 					vms.deleted[vms.curmsg] = 1;
   1.326 ++#else
   1.327 ++				} else if (!cmd && (folder_int(vms.curbox) > 1  || box > 1)) {
   1.328 ++					vms.deleted[vms.curmsg] = 1;  /* Enforce deletion after */
   1.329 ++					deleted = 1;                  /* successful copy op */
   1.330 + #endif
   1.331 + 				} else {
   1.332 + 					vms.deleted[vms.curmsg] = 0;
   1.333 +@@ -11688,6 +11708,15 @@
   1.334 + 		} else {
   1.335 + 			ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder));
   1.336 + 		}
   1.337 ++		/* IMAP saved (sub)folder location policy */
   1.338 ++		if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) {
   1.339 ++			if (ast_false(val))
   1.340 ++				imapsubfold = 0;
   1.341 ++			else
   1.342 ++				imapsubfold = 1;
   1.343 ++		} else {
   1.344 ++			imapsubfold = 0;
   1.345 ++		}
   1.346 + 		if ((val = ast_variable_retrieve(cfg, "general", "imapparentfolder"))) {
   1.347 + 			ast_copy_string(imapparentfolder, val, sizeof(imapparentfolder));
   1.348 + 		}
   1.349 +Index: apps/.moduleinfo
   1.350 +diff -Nau apps/.moduleinfo.orig apps/.moduleinfo
   1.351 +--- apps/.moduleinfo.orig	2011-02-22 23:50:32.000000000 +0100
   1.352 ++++ apps/.moduleinfo	2011-03-13 14:03:42.000000000 +0100
   1.353 +@@ -72,7 +72,7 @@
   1.354 + <member name="app_image" displayname="Image Transmission Application" remove_on_change="apps/app_image.o apps/app_image.so">
   1.355 + </member>
   1.356 + <member name="app_ivrdemo" displayname="IVR Demo Application" remove_on_change="apps/app_ivrdemo.o apps/app_ivrdemo.so">
   1.357 +-	<defaultenabled>no</defaultenabled>
   1.358 ++	<defaultenabled>yes</defaultenabled>
   1.359 + </member>
   1.360 + <member name="app_jack" displayname="JACK Interface" remove_on_change="apps/app_jack.o apps/app_jack.so">
   1.361 + 	<depend>jack</depend>
   1.362 +@@ -127,10 +127,10 @@
   1.363 + <member name="app_rpt" displayname="Radio Repeater/Remote Base Application" remove_on_change="apps/app_rpt.o apps/app_rpt.so">
   1.364 + 	<depend>dahdi</depend>
   1.365 + 	<depend>tonezone</depend>
   1.366 +-	<defaultenabled>no</defaultenabled>
   1.367 ++	<defaultenabled>yes</defaultenabled>
   1.368 + </member>
   1.369 + <member name="app_saycounted" displayname="Decline words according to channel language" remove_on_change="apps/app_saycounted.o apps/app_saycounted.so">
   1.370 +-	<defaultenabled>no</defaultenabled>
   1.371 ++	<defaultenabled>yes</defaultenabled>
   1.372 + </member>
   1.373 + <member name="app_sayunixtime" displayname="Say time" remove_on_change="apps/app_sayunixtime.o apps/app_sayunixtime.so">
   1.374 + </member>
   1.375 +Index: build_tools/cflags.xml
   1.376 +diff -Nau build_tools/cflags.xml.orig build_tools/cflags.xml
   1.377 +--- build_tools/cflags.xml.orig	2010-02-16 16:36:53.000000000 +0100
   1.378 ++++ build_tools/cflags.xml	2011-03-13 14:03:42.000000000 +0100
   1.379 +@@ -26,10 +26,11 @@
   1.380 + 		<member name="RADIO_RELAX" displayname="Relax DTMF for Radio Applications">
   1.381 + 		</member>
   1.382 + 		<member name="G711_NEW_ALGORITHM" displayname="Use the NEW ulaw/alaw codecs (slower, but cleaner)">
   1.383 +-			<defaultenabled>no</defaultenabled>
   1.384 ++			<defaultenabled>yes</defaultenabled>
   1.385 + 		</member>
   1.386 + 		<member name="G711_REDUCED_BRANCHING" displayname="New ulaw/alaw codec, reduced branching (might help it run faster in some architectures)">
   1.387 + 			<depend>G711_NEW_ALGORITHM</depend>
   1.388 ++			<defaultenabled>yes</defaultenabled>
   1.389 + 		</member>
   1.390 + 		<member name="TEST_CODING_TABLES" displayname="New ulaw/alaw codec, turn on table tests on init">
   1.391 + 			<depend>G711_NEW_ALGORITHM</depend>
   1.392 +Index: chan_capi-1.1.5.919/chan_capi20.h
   1.393 +diff -Nau chan_capi-1.1.5.919/chan_capi20.h.orig chan_capi-1.1.5.919/chan_capi20.h
   1.394 +--- chan_capi-1.1.5.919/chan_capi20.h.orig	2011-01-07 02:29:32.000000000 +0100
   1.395 ++++ chan_capi-1.1.5.919/chan_capi20.h	2011-03-13 14:03:42.000000000 +0100
   1.396 +@@ -4,10 +4,13 @@
   1.397 +  * first. Else the checks below will fail.
   1.398 +  */
   1.399 + 
   1.400 ++#include <stddef.h>
   1.401 + #include <capi20.h>
   1.402   
   1.403   #undef CAPI_OS_HINT
   1.404   
   1.405 @@ -312,7 +387,7 @@
   1.406   #if (defined(__FreeBSD__) || defined(__OpenBSD__) || \
   1.407        defined(__NetBSD__)  || defined(__APPLE__))
   1.408   
   1.409 -@@ -29,6 +31,8 @@
   1.410 +@@ -29,6 +32,8 @@
   1.411   #include <capiutils.h>
   1.412   #endif /* BSD */
   1.413   
   1.414 @@ -321,10 +396,11 @@
   1.415   #ifndef HEADER_CID
   1.416   #define HEADER_CID(x) ((x)->adr.adrNCCI)
   1.417   #endif
   1.418 -Index: chan_capi-1.1.5/chan_capi_utils.c
   1.419 ---- chan_capi-1.1.5/chan_capi_utils.c.orig	2010-04-06 19:33:25.000000000 +0200
   1.420 -+++ chan_capi-1.1.5/chan_capi_utils.c	2010-07-24 11:12:31.000000000 +0200
   1.421 -@@ -1087,6 +1087,9 @@
   1.422 +Index: chan_capi-1.1.5.919/chan_capi_utils.c
   1.423 +diff -Nau chan_capi-1.1.5.919/chan_capi_utils.c.orig chan_capi-1.1.5.919/chan_capi_utils.c
   1.424 +--- chan_capi-1.1.5.919/chan_capi_utils.c.orig	2011-01-07 02:29:32.000000000 +0100
   1.425 ++++ chan_capi-1.1.5.919/chan_capi_utils.c	2011-03-13 14:03:42.000000000 +0100
   1.426 +@@ -1155,6 +1155,9 @@
   1.427   {
   1.428   	MESSAGE_EXCHANGE_ERROR error;
   1.429   	int waitcount = 50;
   1.430 @@ -334,9 +410,10 @@
   1.431   	unsigned char manbuf[CAPI_MANUFACTURER_LEN];
   1.432   	_cmsg CMSG;
   1.433   
   1.434 -Index: chan_capi-1.1.5/libcapi20/capi20.c
   1.435 ---- chan_capi-1.1.5/libcapi20/capi20.c.orig	2010-04-06 19:33:25.000000000 +0200
   1.436 -+++ chan_capi-1.1.5/libcapi20/capi20.c	2010-07-24 11:12:31.000000000 +0200
   1.437 +Index: chan_capi-1.1.5.919/libcapi20/capi20.c
   1.438 +diff -Nau chan_capi-1.1.5.919/libcapi20/capi20.c.orig chan_capi-1.1.5.919/libcapi20/capi20.c
   1.439 +--- chan_capi-1.1.5.919/libcapi20/capi20.c.orig	2011-01-07 02:29:31.000000000 +0100
   1.440 ++++ chan_capi-1.1.5.919/libcapi20/capi20.c	2011-03-13 14:03:42.000000000 +0100
   1.441  @@ -19,8 +19,10 @@
   1.442   #include <stdio.h>
   1.443   #include <ctype.h>
   1.444 @@ -622,26 +699,7 @@
   1.445   }
   1.446   
   1.447   unsigned
   1.448 -@@ -993,7 +1047,7 @@
   1.449 - 			unsigned short* tmp = (unsigned short*)buf;
   1.450 - 
   1.451 - 			if(*tmp == CapiNoError) {
   1.452 --				memcpy(Buf, buf + 2, (Ctrl) ? sizeof(struct capi_profile) : 2);
   1.453 -+				memcpy(Buf, buf + 2, (Ctrl) ? 224 /* sizeof(struct capi_profile) */ : 2);
   1.454 - 			}
   1.455 - 
   1.456 - 			fret = *tmp; 
   1.457 -@@ -1002,6 +1056,9 @@
   1.458 - 		return (fret);
   1.459 - 	}
   1.460 - 
   1.461 -+#if 1
   1.462 -+    return CapiMsgOSResourceErr;
   1.463 -+#else
   1.464 - 	ioctl_data.contr = Ctrl;
   1.465 - 
   1.466 - 	if (ioctl(capi_fd, CAPI_GET_PROFILE, &ioctl_data) < 0) {
   1.467 -@@ -1018,6 +1075,7 @@
   1.468 +@@ -1018,6 +1072,7 @@
   1.469   			sizeof(ioctl_data.profile.ncontroller));
   1.470   	}
   1.471   	return CapiNoError;
   1.472 @@ -649,9 +707,10 @@
   1.473   }
   1.474   /*
   1.475    * functions added to the CAPI2.0 spec
   1.476 -Index: chan_capi-1.1.5/libcapi20/convert.c
   1.477 ---- chan_capi-1.1.5/libcapi20/convert.c.orig	2009-07-23 16:11:08.000000000 +0200
   1.478 -+++ chan_capi-1.1.5/libcapi20/convert.c	2010-07-24 11:12:31.000000000 +0200
   1.479 +Index: chan_capi-1.1.5.919/libcapi20/convert.c
   1.480 +diff -Nau chan_capi-1.1.5.919/libcapi20/convert.c.orig chan_capi-1.1.5.919/libcapi20/convert.c
   1.481 +--- chan_capi-1.1.5.919/libcapi20/convert.c.orig	2011-01-07 02:29:31.000000000 +0100
   1.482 ++++ chan_capi-1.1.5.919/libcapi20/convert.c	2011-03-13 14:03:42.000000000 +0100
   1.483  @@ -11,7 +11,14 @@
   1.484   #include <stddef.h>
   1.485   #include <time.h>
   1.486 @@ -667,9 +726,46 @@
   1.487   
   1.488   #include "capi20.h"
   1.489   
   1.490 +Index: chan_capi-1.1.5.919/Makefile
   1.491 +diff -Nau chan_capi-1.1.5.919/Makefile.orig chan_capi-1.1.5.919/Makefile
   1.492 +--- chan_capi-1.1.5.919/Makefile.orig	2011-01-07 02:29:32.000000000 +0100
   1.493 ++++ chan_capi-1.1.5.919/Makefile	2011-03-13 14:03:42.000000000 +0100
   1.494 +@@ -111,6 +111,9 @@
   1.495 + CFLAGS+=-O2
   1.496 + CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
   1.497 + CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi)
   1.498 ++ifeq (${USE_OWN_LIBCAPI},yes)
   1.499 ++CFLAGS+=-DUSE_OWN_LIBCAPI
   1.500 ++endif
   1.501 + ifeq (${DIVA_STREAMING},1)
   1.502 + CFLAGS += -DDIVA_STREAMING=1
   1.503 + endif
   1.504 +Index: channels/chan_sip.c
   1.505 +diff -Nau channels/chan_sip.c.orig channels/chan_sip.c
   1.506 +--- channels/chan_sip.c.orig	2011-01-14 18:32:52.000000000 +0100
   1.507 ++++ channels/chan_sip.c	2011-03-13 14:03:42.000000000 +0100
   1.508 +@@ -11210,7 +11210,16 @@
   1.509 +  	} else {
   1.510 +  		if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
   1.511 +  			/* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
   1.512 +-			snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
   1.513 ++			if (strncasecmp(p->uri, "sip:", strlen("sip:")))
   1.514 ++				if (strncasecmp(p->uri, "sips:", strlen("sips:")))
   1.515 ++					if (p->socket.type == SIP_TRANSPORT_TLS)
   1.516 ++						snprintf(to, sizeof(to), "<%s%s>;tag=%s", "sips:", p->uri, p->theirtag);
   1.517 ++					else
   1.518 ++						snprintf(to, sizeof(to), "<%s%s>;tag=%s", "sips:", p->uri, p->theirtag);
   1.519 ++				else /* if (strncasecmp(p->uri, "sips:"... */
   1.520 ++					snprintf(to, sizeof(to), "<%s%s>;tag=%s", "", p->uri, p->theirtag);
   1.521 ++			else /* if (strncasecmp(p->uri, "sip:"... */
   1.522 ++				snprintf(to, sizeof(to), "<%s%s>;tag=%s", "", p->uri, p->theirtag);
   1.523 +  		} else if (p->options && p->options->vxml_url) {
   1.524 +  			/* If there is a VXML URL append it to the SIP URL */
   1.525 +  			snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url);
   1.526  Index: channels/console_video.h
   1.527 +diff -Nau channels/console_video.h.orig channels/console_video.h
   1.528  --- channels/console_video.h.orig	2008-06-30 17:45:15.000000000 +0200
   1.529 -+++ channels/console_video.h	2010-07-24 11:12:31.000000000 +0200
   1.530 ++++ channels/console_video.h	2011-03-13 14:03:42.000000000 +0100
   1.531  @@ -28,10 +28,7 @@
   1.532   		"console {device}"
   1.533   #else
   1.534 @@ -683,10 +779,11 @@
   1.535   #define CONSOLE_VIDEO_CMDS			\
   1.536   	"console {videodevice|videocodec"	\
   1.537  Index: configure
   1.538 ---- configure.orig	2010-06-24 01:40:16.000000000 +0200
   1.539 -+++ configure	2010-07-24 11:14:22.000000000 +0200
   1.540 -@@ -4530,11 +4530,6 @@
   1.541 - 	# note- does not work on FreeBSD
   1.542 +diff -Nau configure.orig configure
   1.543 +--- configure.orig	2011-01-09 22:40:34.000000000 +0100
   1.544 ++++ configure	2011-03-13 14:14:50.000000000 +0100
   1.545 +@@ -4700,11 +4700,6 @@
   1.546 + esac
   1.547   
   1.548   case "${host_os}" in
   1.549  -     freebsd*)
   1.550 @@ -697,10 +794,316 @@
   1.551        openbsd*)
   1.552   
   1.553        if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then
   1.554 +@@ -18227,8 +18222,8 @@
   1.555 + 		if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
   1.556 +       		imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
   1.557 + 		fi
   1.558 +-		imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
   1.559 +-	  	imap_include="-I${IMAP_TK_DIR}/c-client"
   1.560 ++		imap_libs="-limap -lssl -lcrypto -lcrypt"
   1.561 ++	  	imap_include="-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap"
   1.562 +       	CPPFLAGS="${CPPFLAGS} ${imap_include}"
   1.563 + 	  	LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
   1.564 + 	  	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.565 +@@ -25461,14 +25456,14 @@
   1.566 +    else
   1.567 +       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
   1.568 +       CFLAGS="${CFLAGS} "
   1.569 +-      as_ac_Lib=`$as_echo "ac_cv_lib_lua5.1_${pbxfuncname}" | $as_tr_sh`
   1.570 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua5.1" >&5
   1.571 +-$as_echo_n "checking for ${pbxfuncname} in -llua5.1... " >&6; }
   1.572 ++      as_ac_Lib=`$as_echo "ac_cv_lib_lua_${pbxfuncname}" | $as_tr_sh`
   1.573 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua" >&5
   1.574 ++$as_echo_n "checking for ${pbxfuncname} in -llua... " >&6; }
   1.575 + if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
   1.576 +   $as_echo_n "(cached) " >&6
   1.577 + else
   1.578 +   ac_check_lib_save_LIBS=$LIBS
   1.579 +-LIBS="-llua5.1 ${pbxlibdir} -lm $LIBS"
   1.580 ++LIBS="-llua ${pbxlibdir} -lm $LIBS"
   1.581 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.582 + /* end confdefs.h.  */
   1.583 + 
   1.584 +@@ -25511,19 +25506,19 @@
   1.585 + 
   1.586 +    # now check for the header.
   1.587 +    if test "${AST_LUA_FOUND}" = "yes"; then
   1.588 +-      LUA_LIB="${pbxlibdir} -llua5.1 -lm"
   1.589 ++      LUA_LIB="${pbxlibdir} -llua -lm"
   1.590 +       # if --with-LUA=DIR has been specified, use it.
   1.591 +       if test "x${LUA_DIR}" != "x"; then
   1.592 +          LUA_INCLUDE="-I${LUA_DIR}/include"
   1.593 +       fi
   1.594 +       LUA_INCLUDE="${LUA_INCLUDE} "
   1.595 +-      if test "xlua5.1/lua.h" = "x" ; then	# no header, assume found
   1.596 ++      if test "xlua/lua.h" = "x" ; then	# no header, assume found
   1.597 +          LUA_HEADER_FOUND="1"
   1.598 +       else				# check for the header
   1.599 +          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
   1.600 +          CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}"
   1.601 +-         ac_fn_c_check_header_mongrel "$LINENO" "lua5.1/lua.h" "ac_cv_header_lua5_1_lua_h" "$ac_includes_default"
   1.602 +-if test "x$ac_cv_header_lua5_1_lua_h" = x""yes; then :
   1.603 ++         ac_fn_c_check_header_mongrel "$LINENO" "lua/lua.h" "ac_cv_header_lua_lua_h" "$ac_includes_default"
   1.604 ++if test "x$ac_cv_header_lua_lua_h" = x""yes; then :
   1.605 +   LUA_HEADER_FOUND=1
   1.606 + else
   1.607 +   LUA_HEADER_FOUND=0
   1.608 +@@ -25551,9 +25546,9 @@
   1.609 + 
   1.610 + if test "x${PBX_LUA}" = "x1" ; then
   1.611 + 	if test x"${LUA_DIR}" = x; then
   1.612 +-		LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1"
   1.613 ++		LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua"
   1.614 + 	else
   1.615 +-		LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1"
   1.616 ++		LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua"
   1.617 + 	fi
   1.618 + fi
   1.619 + 
   1.620 +@@ -26238,7 +26233,7 @@
   1.621 +       	 pbxlibdir="-L${SQLITE_DIR}"
   1.622 +       fi
   1.623 +    fi
   1.624 +-   pbxfuncname="sqlite_exec"
   1.625 ++   pbxfuncname="sqlite3_exec"
   1.626 +    if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
   1.627 +       AST_SQLITE_FOUND=yes
   1.628 +    else
   1.629 +@@ -26953,16 +26948,16 @@
   1.630 +     if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
   1.631 + 	PBX_GMIME=0
   1.632 + 	if test -n "$ac_tool_prefix"; then
   1.633 +-  # Extract the first word of "${ac_tool_prefix}gmime-config", so it can be a program name with args.
   1.634 +-set dummy ${ac_tool_prefix}gmime-config; ac_word=$2
   1.635 ++   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
   1.636 ++ set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
   1.637 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.638 + $as_echo_n "checking for $ac_word... " >&6; }
   1.639 +-if test "${ac_cv_path_CONFIG_GMIME+set}" = set; then :
   1.640 ++if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
   1.641 +   $as_echo_n "(cached) " >&6
   1.642 + else
   1.643 +-  case $CONFIG_GMIME in
   1.644 ++  case $PKGCONFIG in
   1.645 +   [\\/]* | ?:[\\/]*)
   1.646 +-  ac_cv_path_CONFIG_GMIME="$CONFIG_GMIME" # Let the user override the test with a path.
   1.647 ++  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
   1.648 +   ;;
   1.649 +   *)
   1.650 +   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.651 +@@ -26973,7 +26968,7 @@
   1.652 +   test -z "$as_dir" && as_dir=.
   1.653 +     for ac_exec_ext in '' $ac_executable_extensions; do
   1.654 +   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
   1.655 +-    ac_cv_path_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext"
   1.656 ++    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.657 +     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.658 +     break 2
   1.659 +   fi
   1.660 +@@ -26984,10 +26979,10 @@
   1.661 +   ;;
   1.662 + esac
   1.663 + fi
   1.664 +-CONFIG_GMIME=$ac_cv_path_CONFIG_GMIME
   1.665 +-if test -n "$CONFIG_GMIME"; then
   1.666 +-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_GMIME" >&5
   1.667 +-$as_echo "$CONFIG_GMIME" >&6; }
   1.668 ++PKGCONFIG=$ac_cv_path_PKGCONFIG
   1.669 ++if test -n "$PKGCONFIG"; then
   1.670 ++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
   1.671 ++$as_echo "$PKGCONFIG" >&6; }
   1.672 + else
   1.673 +   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.674 + $as_echo "no" >&6; }
   1.675 +@@ -26995,18 +26990,18 @@
   1.676 + 
   1.677 + 
   1.678 + fi
   1.679 +-if test -z "$ac_cv_path_CONFIG_GMIME"; then
   1.680 +-  ac_pt_CONFIG_GMIME=$CONFIG_GMIME
   1.681 +-  # Extract the first word of "gmime-config", so it can be a program name with args.
   1.682 +-set dummy gmime-config; ac_word=$2
   1.683 ++if test -z "$ac_cv_path_PKGCONFIG"; then
   1.684 ++  ac_pt_PKGCONFIG=$PKGCONFIG
   1.685 ++  # Extract the first word of "pkg-config", so it can be a program name with args.
   1.686 ++set dummy pkg-config; ac_word=$2
   1.687 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.688 + $as_echo_n "checking for $ac_word... " >&6; }
   1.689 +-if test "${ac_cv_path_ac_pt_CONFIG_GMIME+set}" = set; then :
   1.690 ++if test "${ac_cv_path_ac_pt_PKGCONFIG+set}" = set; then :
   1.691 +   $as_echo_n "(cached) " >&6
   1.692 + else
   1.693 +-  case $ac_pt_CONFIG_GMIME in
   1.694 ++  case $ac_pt_PKGCONFIG in
   1.695 +   [\\/]* | ?:[\\/]*)
   1.696 +-  ac_cv_path_ac_pt_CONFIG_GMIME="$ac_pt_CONFIG_GMIME" # Let the user override the test with a path.
   1.697 ++  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
   1.698 +   ;;
   1.699 +   *)
   1.700 +   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.701 +@@ -27017,7 +27012,7 @@
   1.702 +   test -z "$as_dir" && as_dir=.
   1.703 +     for ac_exec_ext in '' $ac_executable_extensions; do
   1.704 +   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
   1.705 +-    ac_cv_path_ac_pt_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext"
   1.706 ++    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.707 +     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.708 +     break 2
   1.709 +   fi
   1.710 +@@ -27028,17 +27023,17 @@
   1.711 +   ;;
   1.712 + esac
   1.713 + fi
   1.714 +-ac_pt_CONFIG_GMIME=$ac_cv_path_ac_pt_CONFIG_GMIME
   1.715 +-if test -n "$ac_pt_CONFIG_GMIME"; then
   1.716 +-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_GMIME" >&5
   1.717 +-$as_echo "$ac_pt_CONFIG_GMIME" >&6; }
   1.718 ++ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
   1.719 ++if test -n "$ac_pt_PKGCONFIG"; then
   1.720 ++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
   1.721 ++$as_echo "${ECHO_T}$ac_pt_PKGCONFIG" >&6; }
   1.722 + else
   1.723 +   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.724 + $as_echo "no" >&6; }
   1.725 + fi
   1.726 + 
   1.727 +-  if test "x$ac_pt_CONFIG_GMIME" = x; then
   1.728 +-    CONFIG_GMIME="No"
   1.729 ++  if test "x$ac_pt_PKGCONFIG" = x; then
   1.730 ++    PKGCONFIG="No"
   1.731 +   else
   1.732 +     case $cross_compiling:$ac_tool_warned in
   1.733 + yes:)
   1.734 +@@ -27046,17 +27041,15 @@
   1.735 + $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
   1.736 + ac_tool_warned=yes ;;
   1.737 + esac
   1.738 +-    CONFIG_GMIME=$ac_pt_CONFIG_GMIME
   1.739 ++    PKGCONFIG=$ac_pt_PKGCONFIG
   1.740 +   fi
   1.741 + else
   1.742 +-  CONFIG_GMIME="$ac_cv_path_CONFIG_GMIME"
   1.743 ++  PKGCONFIG="$ac_cv_path_PKGCONFIG"
   1.744 + fi
   1.745 + 
   1.746 +-	if test ! "x${CONFIG_GMIME}" = xNo; then
   1.747 +-	    if test x"" = x ; then A=--cflags ; else A="" ; fi
   1.748 +-	    GMIME_INCLUDE=$(${CONFIG_GMIME} $A)
   1.749 +-	    if test x"" = x ; then A=--libs ; else A="" ; fi
   1.750 +-	    GMIME_LIB=$(${CONFIG_GMIME} $A)
   1.751 ++	if test ! "x${PKGCONFIG}" = xNo; then
   1.752 ++	    GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.4 --cflags 2>/dev/null)
   1.753 ++	    GMIME_LIB=$(${PKGCONFIG} gmime-2.4 --libs)
   1.754 + 	    if test x"#include <gmime/gmime.h>" != x ; then
   1.755 + 		saved_cppflags="${CPPFLAGS}"
   1.756 + 		if test "x${GMIME_DIR}" != "x"; then
   1.757 +Index: formats/format_pcm.c
   1.758 +diff -Nau formats/format_pcm.c.orig formats/format_pcm.c
   1.759 +--- formats/format_pcm.c.orig	2010-07-26 05:27:06.000000000 +0200
   1.760 ++++ formats/format_pcm.c	2011-03-13 14:03:42.000000000 +0100
   1.761 +@@ -350,6 +350,7 @@
   1.762 + 		ast_log(LOG_WARNING, "Unable to write header\n");
   1.763 + 		return -1;
   1.764 + 	}
   1.765 ++    fflush(f);  /* issues.asterisk.org bug 0016610 */
   1.766 + 	return 0;
   1.767 + }
   1.768 + 
   1.769 +Index: formats/format_wav.c
   1.770 +diff -Nau formats/format_wav.c.orig formats/format_wav.c
   1.771 +--- formats/format_wav.c.orig	2010-09-02 18:43:09.000000000 +0200
   1.772 ++++ formats/format_wav.c	2011-03-13 14:03:42.000000000 +0100
   1.773 +@@ -310,6 +310,7 @@
   1.774 + 		ast_log(LOG_WARNING, "Unable to write header\n");
   1.775 + 		return -1;
   1.776 + 	}
   1.777 ++    fflush(f);  /* issues.asterisk.org bug 0016610 */
   1.778 + 	return 0;
   1.779 + }
   1.780 + 
   1.781 +Index: formats/format_wav_gsm.c
   1.782 +diff -Nau formats/format_wav_gsm.c.orig formats/format_wav_gsm.c
   1.783 +--- formats/format_wav_gsm.c.orig	2010-07-26 05:27:06.000000000 +0200
   1.784 ++++ formats/format_wav_gsm.c	2011-03-13 14:03:42.000000000 +0100
   1.785 +@@ -362,6 +362,7 @@
   1.786 + 		ast_log(LOG_WARNING, "Unable to write header\n");
   1.787 + 		return -1;
   1.788 + 	}
   1.789 ++    fflush(f);  /* issues.asterisk.org bug 0016610 */
   1.790 + 	return 0;
   1.791 + }
   1.792 + 
   1.793 +Index: main/db1-ast/hash/hash.h
   1.794 +diff -Nau main/db1-ast/hash/hash.h.orig main/db1-ast/hash/hash.h
   1.795 +--- main/db1-ast/hash/hash.h.orig	2006-08-21 04:11:39.000000000 +0200
   1.796 ++++ main/db1-ast/hash/hash.h	2011-03-13 14:03:42.000000000 +0100
   1.797 +@@ -36,6 +36,8 @@
   1.798 +  *	@(#)hash.h	8.3 (Berkeley) 5/31/94
   1.799 +  */
   1.800 + 
   1.801 ++#include <stdint.h>
   1.802 ++
   1.803 + /* Operations */
   1.804 + typedef enum {
   1.805 + 	HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT
   1.806 +Index: main/db1-ast/hash/ndbm.c
   1.807 +diff -Nau main/db1-ast/hash/ndbm.c.orig main/db1-ast/hash/ndbm.c
   1.808 +--- main/db1-ast/hash/ndbm.c.orig	2006-08-21 04:11:39.000000000 +0200
   1.809 ++++ main/db1-ast/hash/ndbm.c	2011-03-13 14:03:42.000000000 +0100
   1.810 +@@ -49,7 +49,8 @@
   1.811 + #include <string.h>
   1.812 + #include <stdlib.h>
   1.813 + 
   1.814 +-#include <ndbm.h>
   1.815 ++#include "../include/ndbm.h"
   1.816 ++#include "../include/db.h"
   1.817 + #include "hash.h"
   1.818 + 
   1.819 + /*
   1.820 +Index: main/features.c
   1.821 +diff -Nau main/features.c.orig main/features.c
   1.822 +--- main/features.c.orig	2011-01-20 21:24:36.000000000 +0100
   1.823 ++++ main/features.c	2011-03-13 14:03:42.000000000 +0100
   1.824 +@@ -1658,6 +1658,10 @@
   1.825 + 			snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
   1.826 + 		}
   1.827 + 
   1.828 ++		for(x = 0; x < strlen(touch_filename); x++) {
   1.829 ++			if (args[x] == '/')
   1.830 ++				args[x] = '-';
   1.831 ++		}
   1.832 + 		for(x = 0; x < strlen(args); x++) {
   1.833 + 			if (args[x] == '/')
   1.834 + 				args[x] = '-';
   1.835 +@@ -1774,6 +1778,10 @@
   1.836 + 			snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav"));
   1.837 + 		}
   1.838 + 
   1.839 ++		for( x = 0; x < strlen(touch_filename); x++) {
   1.840 ++			if (args[x] == '/')
   1.841 ++				args[x] = '-';
   1.842 ++		}
   1.843 + 		for( x = 0; x < strlen(args); x++) {
   1.844 + 			if (args[x] == '/')
   1.845 + 				args[x] = '-';
   1.846 +Index: main/file.c
   1.847 +diff -Nau main/file.c.orig main/file.c
   1.848 +--- main/file.c.orig	2011-01-12 17:05:12.000000000 +0100
   1.849 ++++ main/file.c	2011-03-13 14:03:42.000000000 +0100
   1.850 +@@ -255,7 +255,7 @@
   1.851 + 	char *fn = NULL;
   1.852 + 
   1.853 + 	if (!strcmp(ext, "wav49"))
   1.854 +-		ext = "WAV";
   1.855 ++		ext = "wav";
   1.856 + 
   1.857 + 	if (filename[0] == '/') {
   1.858 + 		if (asprintf(&fn, "%s.%s", filename, ext) < 0) {
   1.859  Index: main/Makefile
   1.860 ---- main/Makefile.orig	2010-06-25 20:58:37.000000000 +0200
   1.861 -+++ main/Makefile	2010-07-24 11:12:31.000000000 +0200
   1.862 -@@ -78,10 +78,7 @@
   1.863 +diff -Nau main/Makefile.orig main/Makefile
   1.864 +--- main/Makefile.orig	2010-12-18 00:52:04.000000000 +0100
   1.865 ++++ main/Makefile	2011-03-13 14:03:42.000000000 +0100
   1.866 +@@ -69,10 +69,7 @@
   1.867   endif
   1.868   
   1.869   ifeq ($(OSARCH),FreeBSD)
   1.870 @@ -712,22 +1115,11 @@
   1.871   endif
   1.872   
   1.873   ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
   1.874 -Index: main/file.c
   1.875 ---- main/file.c.orig	2010-03-25 17:26:13.000000000 +0100
   1.876 -+++ main/file.c	2010-07-24 11:12:31.000000000 +0200
   1.877 -@@ -254,7 +254,7 @@
   1.878 - 	char *fn = NULL;
   1.879 - 
   1.880 - 	if (!strcmp(ext, "wav49"))
   1.881 --		ext = "WAV";
   1.882 -+		ext = "wav";
   1.883 - 
   1.884 - 	if (filename[0] == '/') {
   1.885 - 		if (asprintf(&fn, "%s.%s", filename, ext) < 0) {
   1.886  Index: main/tcptls.c
   1.887 ---- main/tcptls.c.orig	2010-03-20 18:33:03.000000000 +0100
   1.888 -+++ main/tcptls.c	2010-07-24 11:12:31.000000000 +0200
   1.889 -@@ -325,6 +325,7 @@
   1.890 +diff -Nau main/tcptls.c.orig main/tcptls.c
   1.891 +--- main/tcptls.c.orig	2010-07-09 00:08:07.000000000 +0200
   1.892 ++++ main/tcptls.c	2011-03-13 14:03:42.000000000 +0100
   1.893 +@@ -354,6 +354,7 @@
   1.894   	if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) {
   1.895   		if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0)
   1.896   			ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath);
   1.897 @@ -735,40 +1127,103 @@
   1.898   	}
   1.899   
   1.900   	ast_verb(0, "SSL certificate ok\n");
   1.901 +Index: main/udptl.c
   1.902 +diff -Nau main/udptl.c.orig main/udptl.c
   1.903 +--- main/udptl.c.orig	2011-02-22 23:52:11.000000000 +0100
   1.904 ++++ main/udptl.c	2011-03-13 14:03:42.000000000 +0100
   1.905 +@@ -98,6 +98,18 @@
   1.906 + 
   1.907 + #define UDPTL_BUF_MASK              15
   1.908 + 
   1.909 ++/*! Copied from chan_oss.c, corrects link errors:
   1.910 ++udptl.o: In function `calculate_local_max_datagram':
   1.911 ++main/udptl.c:740: undefined reference to `MIN'
   1.912 ++udptl.o: In function `calculate_far_max_ifp':
   1.913 ++main/udptl.c:770: undefined reference to `MAX' */
   1.914 ++#ifndef MIN
   1.915 ++#define MIN(a,b) ((a) < (b) ? (a) : (b))
   1.916 ++#endif
   1.917 ++#ifndef MAX
   1.918 ++#define MAX(a,b) ((a) > (b) ? (a) : (b))
   1.919 ++#endif
   1.920 ++
   1.921 + typedef struct {
   1.922 + 	int buf_len;
   1.923 + 	uint8_t buf[LOCAL_FAX_MAX_DATAGRAM];
   1.924 +Index: Makefile
   1.925 +diff -Nau Makefile.orig Makefile
   1.926 +--- Makefile.orig	2011-01-12 16:57:43.000000000 +0100
   1.927 ++++ Makefile	2011-03-13 14:03:42.000000000 +0100
   1.928 +@@ -230,15 +230,6 @@
   1.929 +   _ASTCFLAGS+=-fsigned-char
   1.930 + endif
   1.931 + 
   1.932 +-ifeq ($(OSARCH),FreeBSD)
   1.933 +-  ifeq ($(PROC),i386)
   1.934 +-    _ASTCFLAGS+=-march=i686
   1.935 +-  endif
   1.936 +-  # -V is understood by BSD Make, not by GNU make.
   1.937 +-  BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
   1.938 +-  _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
   1.939 +-endif
   1.940 +-
   1.941 + ifeq ($(OSARCH),NetBSD)
   1.942 +   _ASTCFLAGS+=-pthread -I/usr/pkg/include
   1.943 + endif
   1.944  Index: menuselect-tree
   1.945 ---- menuselect-tree.orig	2010-07-22 21:20:17.000000000 +0200
   1.946 -+++ menuselect-tree	2010-07-24 11:12:31.000000000 +0200
   1.947 -@@ -153,6 +153,8 @@
   1.948 +diff -Nau menuselect-tree.orig menuselect-tree
   1.949 +--- menuselect-tree.orig	2011-02-22 23:50:45.000000000 +0100
   1.950 ++++ menuselect-tree	2011-03-13 14:03:42.000000000 +0100
   1.951 +@@ -38,6 +38,8 @@
   1.952   </member>
   1.953 - <member name="app_system" displayname="Generic System() application" remove_on_change="apps/app_system.o apps/app_system.so">
   1.954 + <member name="app_authenticate" displayname="Authentication Application" remove_on_change="apps/app_authenticate.o apps/app_authenticate.so">
   1.955   </member>
   1.956 -+<member name="app_backticks" displayname="Generic Backticks() application" remove_on_change="apps/app_backticks.o apps/app_backticks.so">
   1.957 ++<member name="app_backticks" displayname="BACKTICKS() dialplan function" remove_on_change="apps/app_backticks.o apps/app_backticks.so">
   1.958  +</member>
   1.959 - <member name="app_talkdetect" displayname="Playback with Talk Detection" remove_on_change="apps/app_talkdetect.o apps/app_talkdetect.so">
   1.960 + <member name="app_cdr" displayname="Tell Asterisk to not maintain a CDR for the current call" remove_on_change="apps/app_cdr.o apps/app_cdr.so">
   1.961   </member>
   1.962 - <member name="app_test" displayname="Interface Test Application" remove_on_change="apps/app_test.o apps/app_test.so">
   1.963 -@@ -693,9 +695,9 @@
   1.964 - 		<member name="CORE-SOUNDS-EN-ULAW" displayname="English, mu-Law format">
   1.965 - 		</member>
   1.966 + <member name="app_celgenuserevent" displayname="Generate an User-Defined CEL event" remove_on_change="apps/app_celgenuserevent.o apps/app_celgenuserevent.so">
   1.967 +@@ -937,11 +939,11 @@
   1.968   		<member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format">
   1.969 -+			<defaultenabled>yes</defaultenabled>
   1.970   		</member>
   1.971   		<member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" >
   1.972  -			<defaultenabled>yes</defaultenabled>
   1.973   		</member>
   1.974   		<member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format">
   1.975   		</member>
   1.976 -@@ -771,6 +773,7 @@
   1.977 - 		<member name="EXTRA-SOUNDS-EN-ULAW" displayname="English, mu-Law format">
   1.978 - 		</member>
   1.979 - 		<member name="EXTRA-SOUNDS-EN-ALAW" displayname="English, a-Law format">
   1.980 + 		<member name="CORE-SOUNDS-EN-G722" displayname="English, G.722 format">
   1.981  +			<defaultenabled>yes</defaultenabled>
   1.982   		</member>
   1.983 - 		<member name="EXTRA-SOUNDS-EN-GSM" displayname="English, GSM format" >
   1.984 + 		<member name="CORE-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
   1.985 + 		</member>
   1.986 +@@ -1006,7 +1008,6 @@
   1.987 + 	</category>
   1.988 + 	<category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes">
   1.989 + 		<member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" >
   1.990 +-			<defaultenabled>yes</defaultenabled>
   1.991 + 		</member>
   1.992 + 		<member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" >
   1.993 + 		</member>
   1.994 +@@ -1017,6 +1018,7 @@
   1.995 + 		<member name="MOH-OPSOUND-G729" displayname="opsound.org Music On Hold Files, G.729 format" >
   1.996 + 		</member>
   1.997 + 		<member name="MOH-OPSOUND-G722" displayname="opsound.org Music On Hold Files, G.722 format" >
   1.998 ++			<defaultenabled>yes</defaultenabled>
   1.999 + 		</member>
  1.1000 + 		<member name="MOH-OPSOUND-SLN16" displayname="opsound.org Music On Hold Files, Signed-linear 16kHz format" >
  1.1001 + 		</member>
  1.1002 +@@ -1037,6 +1039,7 @@
  1.1003 + 		<member name="EXTRA-SOUNDS-EN-G729" displayname="English, G.729 format">
  1.1004 + 		</member>
  1.1005 + 		<member name="EXTRA-SOUNDS-EN-G722" displayname="English, G.722 format">
  1.1006 ++			<defaultenabled>yes</defaultenabled>
  1.1007 + 		</member>
  1.1008 + 		<member name="EXTRA-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
  1.1009   		</member>
  1.1010  Index: res/res_http_post.c
  1.1011 ---- res/res_http_post.c.orig	2009-10-27 18:12:09.000000000 +0100
  1.1012 -+++ res/res_http_post.c	2010-07-24 11:12:31.000000000 +0200
  1.1013 +diff -Nau res/res_http_post.c.orig res/res_http_post.c
  1.1014 +--- res/res_http_post.c.orig	2009-10-27 17:48:54.000000000 +0100
  1.1015 ++++ res/res_http_post.c	2011-03-13 14:03:42.000000000 +0100
  1.1016  @@ -122,14 +122,8 @@
  1.1017   		ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n");
  1.1018   		return;
  1.1019 @@ -787,24 +1242,43 @@
  1.1020   		const char *filename;
  1.1021   
  1.1022  Index: sounds/sounds.xml
  1.1023 ---- sounds/sounds.xml.orig	2009-08-18 22:31:40.000000000 +0200
  1.1024 -+++ sounds/sounds.xml	2010-07-24 11:12:31.000000000 +0200
  1.1025 -@@ -4,9 +4,9 @@
  1.1026 - 		<member name="CORE-SOUNDS-EN-ULAW" displayname="English, mu-Law format">
  1.1027 - 		</member>
  1.1028 +diff -Nau sounds/sounds.xml.orig sounds/sounds.xml
  1.1029 +--- sounds/sounds.xml.orig	2010-10-18 23:51:23.000000000 +0200
  1.1030 ++++ sounds/sounds.xml	2011-03-13 14:03:42.000000000 +0100
  1.1031 +@@ -6,11 +6,11 @@
  1.1032   		<member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format">
  1.1033 -+			<defaultenabled>yes</defaultenabled>
  1.1034   		</member>
  1.1035   		<member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" >
  1.1036  -			<defaultenabled>yes</defaultenabled>
  1.1037   		</member>
  1.1038   		<member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format">
  1.1039   		</member>
  1.1040 -@@ -82,6 +82,7 @@
  1.1041 - 		<member name="EXTRA-SOUNDS-EN-ULAW" displayname="English, mu-Law format">
  1.1042 - 		</member>
  1.1043 - 		<member name="EXTRA-SOUNDS-EN-ALAW" displayname="English, a-Law format">
  1.1044 + 		<member name="CORE-SOUNDS-EN-G722" displayname="English, G.722 format">
  1.1045  +			<defaultenabled>yes</defaultenabled>
  1.1046   		</member>
  1.1047 - 		<member name="EXTRA-SOUNDS-EN-GSM" displayname="English, GSM format" >
  1.1048 + 		<member name="CORE-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
  1.1049   		</member>
  1.1050 +@@ -75,7 +75,6 @@
  1.1051 + 	</category>
  1.1052 + 	<category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes">
  1.1053 + 		<member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" >
  1.1054 +-			<defaultenabled>yes</defaultenabled>
  1.1055 + 		</member>
  1.1056 + 		<member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" >
  1.1057 + 		</member>
  1.1058 +@@ -86,6 +85,7 @@
  1.1059 + 		<member name="MOH-OPSOUND-G729" displayname="opsound.org Music On Hold Files, G.729 format" >
  1.1060 + 		</member>
  1.1061 + 		<member name="MOH-OPSOUND-G722" displayname="opsound.org Music On Hold Files, G.722 format" >
  1.1062 ++			<defaultenabled>yes</defaultenabled>
  1.1063 + 		</member>
  1.1064 + 		<member name="MOH-OPSOUND-SLN16" displayname="opsound.org Music On Hold Files, Signed-linear 16kHz format" >
  1.1065 + 		</member>
  1.1066 +@@ -106,6 +106,7 @@
  1.1067 + 		<member name="EXTRA-SOUNDS-EN-G729" displayname="English, G.729 format">
  1.1068 + 		</member>
  1.1069 + 		<member name="EXTRA-SOUNDS-EN-G722" displayname="English, G.722 format">
  1.1070 ++			<defaultenabled>yes</defaultenabled>
  1.1071 + 		</member>
  1.1072 + 		<member name="EXTRA-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
  1.1073 + 		</member>

mercurial