asterisk/asterisk.patch

changeset 311
263143ec0fb2
parent 310
73d852a30c9a
child 315
75d162df42e8
equal deleted inserted replaced
1:8e4aa63b1ea4 2:108e5688ba0c
1 Index: Makefile 1 Index: addons/chan_ooh323.c
2 --- Makefile.orig 2010-06-10 22:35:06.000000000 +0200 2 diff -Nau addons/chan_ooh323.c.orig addons/chan_ooh323.c
3 +++ Makefile 2010-07-24 11:16:19.000000000 +0200 3 --- addons/chan_ooh323.c.orig 2010-10-09 16:02:26.000000000 +0200
4 @@ -126,40 +126,18 @@ 4 +++ addons/chan_ooh323.c 2011-03-13 14:03:42.000000000 +0100
5 5 @@ -23,6 +23,12 @@
6 # Define standard directories for various platforms 6
7 # These apply if they are not redefined in asterisk.conf 7 #include "chan_ooh323.h"
8 -ifeq ($(OSARCH),SunOS) 8 #include <math.h>
9 - ASTETCDIR=/var/etc/asterisk 9 +#if defined __SVR4 && defined __sun
10 - ASTLIBDIR=/opt/asterisk/lib 10 +#include <sys/sockio.h>
11 - ASTVARLIBDIR=/var/opt/asterisk 11 +#ifndef IPTOS_MINCOST
12 - ASTDBDIR=$(ASTVARLIBDIR) 12 +#define IPTOS_MINCOST 0x02
13 - ASTKEYDIR=$(ASTVARLIBDIR) 13 +#endif
14 - ASTSPOOLDIR=/var/spool/asterisk 14 +#endif
15 - ASTLOGDIR=/var/log/asterisk 15
16 - ASTHEADERDIR=/opt/asterisk/include 16 #define FORMAT_STRING_SIZE 512
17 - ASTSBINDIR=/opt/asterisk/sbin 17
18 - ASTVARRUNDIR=/var/run/asterisk 18 Index: addons/ooh323c/src/ooCmdChannel.c
19 - ASTMANDIR=/opt/asterisk/man 19 diff -Nau addons/ooh323c/src/ooCmdChannel.c.orig addons/ooh323c/src/ooCmdChannel.c
20 -else 20 --- addons/ooh323c/src/ooCmdChannel.c.orig 2010-03-26 00:38:58.000000000 +0100
21 ASTETCDIR=$(sysconfdir)/asterisk 21 +++ addons/ooh323c/src/ooCmdChannel.c 2011-03-13 14:03:42.000000000 +0100
22 ASTLIBDIR=$(libdir)/asterisk 22 @@ -25,6 +25,10 @@
23 ASTHEADERDIR=$(includedir)/asterisk 23 #include "ooCalls.h"
24 ASTSBINDIR=$(sbindir) 24 #include "ooCmdChannel.h"
25 - ASTSPOOLDIR=$(localstatedir)/spool/asterisk 25
26 - ASTLOGDIR=$(localstatedir)/log/asterisk 26 +#ifndef AF_LOCAL
27 - ASTVARRUNDIR=$(localstatedir)/run/asterisk 27 +#define AF_LOCAL AF_UNIX
28 + ASTSPOOLDIR=$(localstatedir)/spool 28 +#define PF_LOCAL PF_UNIX
29 + ASTLOGDIR=$(localstatedir)/log 29 +#endif
30 + ASTVARRUNDIR=$(localstatedir)/run 30
31 ASTMANDIR=$(mandir) 31 /** Global endpoint structure */
32 -ifneq ($(findstring BSD,$(OSARCH)),) 32 extern OOH323EndPoint gH323ep;
33 - ASTVARLIBDIR=$(prefix)/share/asterisk 33 Index: addons/ooh323c/src/ooSocket.c
34 - ASTVARRUNDIR=$(localstatedir)/run/asterisk 34 diff -Nau addons/ooh323c/src/ooSocket.c.orig addons/ooh323c/src/ooSocket.c
35 - ASTDBDIR=$(localstatedir)/db/asterisk 35 --- addons/ooh323c/src/ooSocket.c.orig 2010-03-25 22:39:04.000000000 +0100
36 -else 36 +++ addons/ooh323c/src/ooSocket.c 2011-03-13 14:03:42.000000000 +0100
37 - ASTVARLIBDIR=$(localstatedir)/lib/asterisk 37 @@ -24,6 +24,9 @@
38 - ASTDBDIR=$(ASTVARLIBDIR) 38
39 -endif 39 #include "ooSocket.h"
40 + ASTVARLIBDIR=$(localstatedir)/lib 40 #include "ootrace.h"
41 + ASTDBDIR=$(localstatedir)/db 41 +#if defined __SVR4 && defined __sun
42 ASTKEYDIR=$(ASTVARLIBDIR) 42 +#include <sys/sockio.h>
43 -endif 43 +#endif
44 -ifeq ($(ASTDATADIR),) 44 #if defined(_WIN32_WCE)
45 ASTDATADIR:=$(ASTVARLIBDIR) 45 static int inited = 0;
46 -endif 46 #define SEND_FLAGS 0
47 47 Index: addons/ooh323cDriver.c
48 # Asterisk.conf is located in ASTETCDIR or by using the -C flag 48 diff -Nau addons/ooh323cDriver.c.orig addons/ooh323cDriver.c
49 # when starting Asterisk 49 --- addons/ooh323cDriver.c.orig 2010-03-26 00:38:58.000000000 +0100
50 @@ -259,12 +237,6 @@ 50 +++ addons/ooh323cDriver.c 2011-03-13 14:03:42.000000000 +0100
51 _ASTCFLAGS+=-fsigned-char 51 @@ -27,6 +27,11 @@
52 endif 52
53 53 #define SEC_TO_HOLD_THREAD 24
54 -ifeq ($(OSARCH),FreeBSD) 54
55 - # -V is understood by BSD Make, not by GNU make. 55 +#ifndef AF_LOCAL
56 - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) 56 +#define AF_LOCAL AF_UNIX
57 - _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) 57 +#define PF_LOCAL PF_UNIX
58 -endif 58 +#endif
59 - 59 +
60 ifeq ($(OSARCH),NetBSD) 60 extern struct ast_module *myself;
61 _ASTCFLAGS+=-pthread -I/usr/pkg/include 61 extern OOBOOL gH323Debug;
62 endif 62 extern OOH323EndPoint gH323ep;
63 @@ -567,8 +539,7 @@
64 fi
65 mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation
66 mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation/thirdparty
67 - mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
68 - mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
69 + mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr
70 mkdir -p $(DESTDIR)$(ASTDATADIR)/keys
71 mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware
72 mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax
73 Index: apps/app_backticks.c 63 Index: apps/app_backticks.c
74 --- apps/app_backticks.c.orig 2010-07-24 11:12:31.000000000 +0200 64 diff -Nau apps/app_backticks.c.orig apps/app_backticks.c
75 +++ apps/app_backticks.c 2010-07-24 11:12:31.000000000 +0200 65 --- apps/app_backticks.c.orig 1970-01-01 01:00:00.000000000 +0100
66 +++ apps/app_backticks.c 2011-03-13 14:03:42.000000000 +0100
76 @@ -0,0 +1,129 @@ 67 @@ -0,0 +1,129 @@
77 + 68 +
78 +#include "asterisk.h" 69 +#include "asterisk.h"
79 + 70 +
80 +ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.53 $") 71 +ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.52 $")
81 + 72 +
82 +#include <stdio.h> 73 +#include <stdio.h>
83 +#include <asterisk/file.h> 74 +#include <asterisk/file.h>
84 +#include <asterisk/logger.h> 75 +#include <asterisk/logger.h>
85 +#include <asterisk/channel.h> 76 +#include <asterisk/channel.h>
202 +} 193 +}
203 + 194 +
204 +AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "BACKTICKS() dialplan function"); 195 +AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "BACKTICKS() dialplan function");
205 + 196 +
206 Index: apps/app_meetme.c 197 Index: apps/app_meetme.c
207 --- apps/app_meetme.c.orig 2010-06-23 23:15:53.000000000 +0200 198 diff -Nau apps/app_meetme.c.orig apps/app_meetme.c
208 +++ apps/app_meetme.c 2010-07-24 11:12:31.000000000 +0200 199 --- apps/app_meetme.c.orig 2011-01-07 21:53:02.000000000 +0100
209 @@ -522,6 +522,7 @@ 200 +++ apps/app_meetme.c 2011-03-13 14:03:42.000000000 +0100
201 @@ -604,6 +604,7 @@
210 CONFFLAG_DURATION_LIMIT = (1 << 30), 202 CONFFLAG_DURATION_LIMIT = (1 << 30),
211 /*! Do not write any audio to this channel until the state is up. */ 203 /*! Do not write any audio to this channel until the state is up. */
212 CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31), 204 CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31),
213 + CONFFLAG_USERNAME = (1 << 31), 205 + CONFFLAG_USERNAME = (1 << 32),
214 }; 206 };
215 207
216 enum { 208 /* !If set play an intro announcement at start of conference */
217 @@ -531,6 +532,7 @@ 209 @@ -617,6 +618,7 @@
218 OPT_ARG_DURATION_LIMIT = 3,
219 OPT_ARG_MOH_CLASS = 4, 210 OPT_ARG_MOH_CLASS = 4,
220 OPT_ARG_ARRAY_SIZE = 5, 211 OPT_ARG_INTROMSG = 5,
221 + OPT_ARG_USERNAME = 6, 212 OPT_ARG_ARRAY_SIZE = 6,
213 + OPT_ARG_USERNAME = 7,
222 }; 214 };
223 215
224 AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS 216 AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS
225 @@ -563,6 +565,7 @@ 217 @@ -650,6 +652,7 @@
226 AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ), 218 AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ),
227 AST_APP_OPTION_ARG('S', CONFFLAG_DURATION_STOP, OPT_ARG_DURATION_STOP), 219 AST_APP_OPTION_ARG('S', CONFFLAG_DURATION_STOP, OPT_ARG_DURATION_STOP),
228 AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT), 220 AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
229 + AST_APP_OPTION_ARG('n', CONFFLAG_USERNAME, OPT_ARG_USERNAME), 221 + AST_APP_OPTION_ARG('n', CONFFLAG_USERNAME, OPT_ARG_USERNAME),
230 END_OPTIONS ); 222 END_OPTIONS );
231 223
232 static const char *app = "MeetMe"; 224 static const char * const app = "MeetMe";
233 @@ -2243,6 +2246,12 @@ 225 @@ -2429,6 +2432,12 @@
234 if (!(confflags & CONFFLAG_QUIET) && ((confflags & CONFFLAG_INTROUSER) || (confflags & CONFFLAG_INTROUSERNOREVIEW))) { 226 ast_test_flag64(confflags, CONFFLAG_INTROUSERNOREVIEW))) {
235 char destdir[PATH_MAX]; 227 char destdir[PATH_MAX];
236 228
237 + if ( (confflags & CONFFLAG_USERNAME) 229 + if (!ast_test_flag64(confflags, CONFFLAG_USERNAME)
238 + && !ast_strlen_zero(optargs[OPT_ARG_USERNAME]) 230 + && !ast_strlen_zero(optargs[OPT_ARG_USERNAME])
239 + && ast_fileexists(optargs[OPT_ARG_USERNAME], NULL, NULL)) 231 + && ast_fileexists(optargs[OPT_ARG_USERNAME], NULL, NULL))
240 + snprintf(destdir, sizeof(destdir), "%s", optargs[OPT_ARG_USERNAME]); 232 + snprintf(destdir, sizeof(destdir), "%s", optargs[OPT_ARG_USERNAME]);
241 + else { 233 + else {
242 + 234 +
243 snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR); 235 snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR);
244 236
245 if (ast_mkdir(destdir, 0777) != 0) { 237 if (ast_mkdir(destdir, 0777) != 0) {
246 @@ -2259,6 +2268,7 @@ 238 @@ -2445,6 +2454,7 @@
247 res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL); 239 res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL);
248 if (res == -1) 240 if (res == -1)
249 goto outrun; 241 goto outrun;
250 + } 242 + }
251 } 243 }
252 244
253 ast_mutex_lock(&conf->playlock); 245 ast_mutex_lock(&conf->playlock);
254 Index: build_tools/make_defaults_h 246 Index: apps/app_voicemail.c
255 --- build_tools/make_defaults_h.orig 2008-01-24 23:58:10.000000000 +0100 247 diff -Nau apps/app_voicemail.c.orig apps/app_voicemail.c
256 +++ build_tools/make_defaults_h 2010-07-24 11:12:31.000000000 +0200 248 --- apps/app_voicemail.c.orig 2011-01-07 20:58:30.000000000 +0100
257 @@ -17,7 +17,7 @@ 249 +++ apps/app_voicemail.c 2011-03-13 14:03:42.000000000 +0100
258 #define DEFAULT_PID "${INSTALL_PATH}${ASTVARRUNDIR}/asterisk.pid" 250 @@ -366,6 +366,7 @@
259 251 static char imapport[8];
260 #define DEFAULT_VAR_DIR "${INSTALL_PATH}${ASTVARLIBDIR}" 252 static char imapflags[128];
261 -#define DEFAULT_DB "${INSTALL_PATH}${ASTDBDIR}/astdb" 253 static char imapfolder[64];
262 +#define DEFAULT_DB "${INSTALL_PATH}${ASTDBDIR}/asterisk.db" 254 +static int imapsubfold = 0;
263 255 static char imapparentfolder[64] = "\0";
264 #define DEFAULT_DATA_DIR "${INSTALL_PATH}${ASTDATADIR}" 256 static char greetingfolder[64];
265 #define DEFAULT_KEY_DIR "${INSTALL_PATH}${ASTDATADIR}/keys" 257 static char authuser[32];
266 Index: cdr/cdr_custom.c 258 @@ -2464,7 +2465,7 @@
267 --- cdr/cdr_custom.c.orig 2008-11-20 18:48:58.000000000 +0100 259 }
268 +++ cdr/cdr_custom.c 2010-07-24 11:12:31.000000000 +0200 260
269 @@ -83,7 +83,7 @@ 261 /* Build up server information */
270 ast_log(LOG_WARNING, "Format string too long, will be truncated, at line %d\n", var->lineno); 262 - ast_build_string(&t, &left, "{%s:%s/imap", imapserver, imapport);
271 ast_copy_string(format, var->value, sizeof(format) - 1); 263 + ast_build_string(&t, &left, "{%s:%s", imapserver, imapport);
272 strcat(format,"\n"); 264
273 - snprintf(master, sizeof(master),"%s/%s/%s", ast_config_AST_LOG_DIR, name, var->name); 265 /* Add authentication user if present */
274 + snprintf(master, sizeof(master),"%s/cdr/%s", ast_config_AST_LOG_DIR, var->name); 266 if (!ast_strlen_zero(authuser))
275 if (var->next) { 267 @@ -6035,6 +6036,7 @@
276 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); 268 /* simple. huh? */
277 break; 269 char sequence[10];
278 Index: cdr/cdr_sqlite3_custom.c 270 char mailbox[256];
279 --- cdr/cdr_sqlite3_custom.c.orig 2010-04-13 18:38:41.000000000 +0200 271 + char folder[256];
280 +++ cdr/cdr_sqlite3_custom.c 2010-07-24 11:12:31.000000000 +0200 272 int res;
281 @@ -300,7 +300,7 @@ 273
282 } 274 /* get the real IMAP message number for this message */
283 275 @@ -6050,10 +6052,24 @@
284 /* is the database there? */ 276 mail_setflag(vms->mailstream, sequence, "\\Unseen");
285 - snprintf(filename, sizeof(filename), "%s/master.db", ast_config_AST_LOG_DIR); 277 mail_clearflag(vms->mailstream, sequence, "\\Seen");
286 + snprintf(filename, sizeof(filename), "%s/cdr/master.db", ast_config_AST_LOG_DIR); 278 }
287 res = sqlite3_open(filename, &db); 279 - if (!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) {
288 if (res != SQLITE_OK) { 280 - ast_mutex_unlock(&vms->lock);
289 ast_log(LOG_ERROR, "Could not open database %s.\n", filename); 281 +
290 Index: chan_capi-1.1.5/Makefile 282 + if ((!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) || \
291 --- chan_capi-1.1.5/Makefile.orig 2010-04-06 19:33:25.000000000 +0200 283 + !strcasecmp(mbox(vmu, OLD_FOLDER), vms->curbox)) && \
292 +++ chan_capi-1.1.5/Makefile 2010-07-24 11:12:31.000000000 +0200 284 + (box == NEW_FOLDER || box == OLD_FOLDER)) { /* Don't copy data, */
293 @@ -100,6 +100,9 @@ 285 + ast_mutex_unlock(&vms->lock); /* just change Seen flag */
294 CFLAGS+=-O2 286 return 0;
295 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) 287 + } else if (box != NEW_FOLDER && box != OLD_FOLDER) { /* Do copy data */
296 CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi) 288 + if (imapsubfold == 1) /* using INBOX or subfolder */
297 +ifeq (${USE_OWN_LIBCAPI},yes) 289 + snprintf(folder, sizeof(folder), "%s%c%s", imapfolder, delimiter, mbox(vmu, box));
298 +CFLAGS+=-DUSE_OWN_LIBCAPI 290 + else
299 +endif 291 + strncpy(folder, mbox(vmu, box), sizeof(folder));
300 292 + int res = !mail_copy(vms->mailstream,sequence,folder);
301 LIBS=-ldl -lpthread -lm 293 + ast_mutex_unlock(&vms->lock);
302 CC=gcc 294 + return res;
303 Index: chan_capi-1.1.5/chan_capi20.h 295 + } else { /* Copy data to INBOX delegating new/old status to Seen flag */
304 --- chan_capi-1.1.5/chan_capi20.h.orig 2005-09-20 20:33:40.000000000 +0200 296 + int res = !mail_copy(vms->mailstream,sequence,imapfolder);
305 +++ chan_capi-1.1.5/chan_capi20.h 2010-07-24 11:12:31.000000000 +0200 297 }
306 @@ -8,6 +8,8 @@ 298 +
299 /* Create the folder if it don't exist */
300 imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */
301 ast_debug(5, "Checking if folder exists: %s\n", mailbox);
302 @@ -10221,6 +10237,10 @@
303 #ifndef IMAP_STORAGE
304 } else if (!cmd) {
305 vms.deleted[vms.curmsg] = 1;
306 +#else
307 + } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) {
308 + vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */
309 + deleted = 1; /* successful copy op */
310 #endif
311 } else {
312 vms.deleted[vms.curmsg] = 0;
313 @@ -11688,6 +11708,15 @@
314 } else {
315 ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder));
316 }
317 + /* IMAP saved (sub)folder location policy */
318 + if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) {
319 + if (ast_false(val))
320 + imapsubfold = 0;
321 + else
322 + imapsubfold = 1;
323 + } else {
324 + imapsubfold = 0;
325 + }
326 if ((val = ast_variable_retrieve(cfg, "general", "imapparentfolder"))) {
327 ast_copy_string(imapparentfolder, val, sizeof(imapparentfolder));
328 }
329 Index: apps/.moduleinfo
330 diff -Nau apps/.moduleinfo.orig apps/.moduleinfo
331 --- apps/.moduleinfo.orig 2011-02-22 23:50:32.000000000 +0100
332 +++ apps/.moduleinfo 2011-03-13 14:03:42.000000000 +0100
333 @@ -72,7 +72,7 @@
334 <member name="app_image" displayname="Image Transmission Application" remove_on_change="apps/app_image.o apps/app_image.so">
335 </member>
336 <member name="app_ivrdemo" displayname="IVR Demo Application" remove_on_change="apps/app_ivrdemo.o apps/app_ivrdemo.so">
337 - <defaultenabled>no</defaultenabled>
338 + <defaultenabled>yes</defaultenabled>
339 </member>
340 <member name="app_jack" displayname="JACK Interface" remove_on_change="apps/app_jack.o apps/app_jack.so">
341 <depend>jack</depend>
342 @@ -127,10 +127,10 @@
343 <member name="app_rpt" displayname="Radio Repeater/Remote Base Application" remove_on_change="apps/app_rpt.o apps/app_rpt.so">
344 <depend>dahdi</depend>
345 <depend>tonezone</depend>
346 - <defaultenabled>no</defaultenabled>
347 + <defaultenabled>yes</defaultenabled>
348 </member>
349 <member name="app_saycounted" displayname="Decline words according to channel language" remove_on_change="apps/app_saycounted.o apps/app_saycounted.so">
350 - <defaultenabled>no</defaultenabled>
351 + <defaultenabled>yes</defaultenabled>
352 </member>
353 <member name="app_sayunixtime" displayname="Say time" remove_on_change="apps/app_sayunixtime.o apps/app_sayunixtime.so">
354 </member>
355 Index: build_tools/cflags.xml
356 diff -Nau build_tools/cflags.xml.orig build_tools/cflags.xml
357 --- build_tools/cflags.xml.orig 2010-02-16 16:36:53.000000000 +0100
358 +++ build_tools/cflags.xml 2011-03-13 14:03:42.000000000 +0100
359 @@ -26,10 +26,11 @@
360 <member name="RADIO_RELAX" displayname="Relax DTMF for Radio Applications">
361 </member>
362 <member name="G711_NEW_ALGORITHM" displayname="Use the NEW ulaw/alaw codecs (slower, but cleaner)">
363 - <defaultenabled>no</defaultenabled>
364 + <defaultenabled>yes</defaultenabled>
365 </member>
366 <member name="G711_REDUCED_BRANCHING" displayname="New ulaw/alaw codec, reduced branching (might help it run faster in some architectures)">
367 <depend>G711_NEW_ALGORITHM</depend>
368 + <defaultenabled>yes</defaultenabled>
369 </member>
370 <member name="TEST_CODING_TABLES" displayname="New ulaw/alaw codec, turn on table tests on init">
371 <depend>G711_NEW_ALGORITHM</depend>
372 Index: chan_capi-1.1.5.919/chan_capi20.h
373 diff -Nau chan_capi-1.1.5.919/chan_capi20.h.orig chan_capi-1.1.5.919/chan_capi20.h
374 --- chan_capi-1.1.5.919/chan_capi20.h.orig 2011-01-07 02:29:32.000000000 +0100
375 +++ chan_capi-1.1.5.919/chan_capi20.h 2011-03-13 14:03:42.000000000 +0100
376 @@ -4,10 +4,13 @@
377 * first. Else the checks below will fail.
378 */
379
380 +#include <stddef.h>
381 #include <capi20.h>
307 382
308 #undef CAPI_OS_HINT 383 #undef CAPI_OS_HINT
309 384
310 +#ifndef USE_OWN_LIBCAPI 385 +#ifndef USE_OWN_LIBCAPI
311 + 386 +
312 #if (defined(__FreeBSD__) || defined(__OpenBSD__) || \ 387 #if (defined(__FreeBSD__) || defined(__OpenBSD__) || \
313 defined(__NetBSD__) || defined(__APPLE__)) 388 defined(__NetBSD__) || defined(__APPLE__))
314 389
315 @@ -29,6 +31,8 @@ 390 @@ -29,6 +32,8 @@
316 #include <capiutils.h> 391 #include <capiutils.h>
317 #endif /* BSD */ 392 #endif /* BSD */
318 393
319 +#endif 394 +#endif
320 + 395 +
321 #ifndef HEADER_CID 396 #ifndef HEADER_CID
322 #define HEADER_CID(x) ((x)->adr.adrNCCI) 397 #define HEADER_CID(x) ((x)->adr.adrNCCI)
323 #endif 398 #endif
324 Index: chan_capi-1.1.5/chan_capi_utils.c 399 Index: chan_capi-1.1.5.919/chan_capi_utils.c
325 --- chan_capi-1.1.5/chan_capi_utils.c.orig 2010-04-06 19:33:25.000000000 +0200 400 diff -Nau chan_capi-1.1.5.919/chan_capi_utils.c.orig chan_capi-1.1.5.919/chan_capi_utils.c
326 +++ chan_capi-1.1.5/chan_capi_utils.c 2010-07-24 11:12:31.000000000 +0200 401 --- chan_capi-1.1.5.919/chan_capi_utils.c.orig 2011-01-07 02:29:32.000000000 +0100
327 @@ -1087,6 +1087,9 @@ 402 +++ chan_capi-1.1.5.919/chan_capi_utils.c 2011-03-13 14:03:42.000000000 +0100
403 @@ -1155,6 +1155,9 @@
328 { 404 {
329 MESSAGE_EXCHANGE_ERROR error; 405 MESSAGE_EXCHANGE_ERROR error;
330 int waitcount = 50; 406 int waitcount = 50;
331 +#ifndef CAPI_MANUFACTURER_LEN 407 +#ifndef CAPI_MANUFACTURER_LEN
332 +#define CAPI_MANUFACTURER_LEN 64 408 +#define CAPI_MANUFACTURER_LEN 64
333 +#endif 409 +#endif
334 unsigned char manbuf[CAPI_MANUFACTURER_LEN]; 410 unsigned char manbuf[CAPI_MANUFACTURER_LEN];
335 _cmsg CMSG; 411 _cmsg CMSG;
336 412
337 Index: chan_capi-1.1.5/libcapi20/capi20.c 413 Index: chan_capi-1.1.5.919/libcapi20/capi20.c
338 --- chan_capi-1.1.5/libcapi20/capi20.c.orig 2010-04-06 19:33:25.000000000 +0200 414 diff -Nau chan_capi-1.1.5.919/libcapi20/capi20.c.orig chan_capi-1.1.5.919/libcapi20/capi20.c
339 +++ chan_capi-1.1.5/libcapi20/capi20.c 2010-07-24 11:12:31.000000000 +0200 415 --- chan_capi-1.1.5.919/libcapi20/capi20.c.orig 2011-01-07 02:29:31.000000000 +0100
416 +++ chan_capi-1.1.5.919/libcapi20/capi20.c 2011-03-13 14:03:42.000000000 +0100
340 @@ -19,8 +19,10 @@ 417 @@ -19,8 +19,10 @@
341 #include <stdio.h> 418 #include <stdio.h>
342 #include <ctype.h> 419 #include <ctype.h>
343 #include <assert.h> 420 #include <assert.h>
344 +#ifdef __linux__ 421 +#ifdef __linux__
620 return Buf; 697 return Buf;
621 +#endif 698 +#endif
622 } 699 }
623 700
624 unsigned 701 unsigned
625 @@ -993,7 +1047,7 @@ 702 @@ -1018,6 +1072,7 @@
626 unsigned short* tmp = (unsigned short*)buf;
627
628 if(*tmp == CapiNoError) {
629 - memcpy(Buf, buf + 2, (Ctrl) ? sizeof(struct capi_profile) : 2);
630 + memcpy(Buf, buf + 2, (Ctrl) ? 224 /* sizeof(struct capi_profile) */ : 2);
631 }
632
633 fret = *tmp;
634 @@ -1002,6 +1056,9 @@
635 return (fret);
636 }
637
638 +#if 1
639 + return CapiMsgOSResourceErr;
640 +#else
641 ioctl_data.contr = Ctrl;
642
643 if (ioctl(capi_fd, CAPI_GET_PROFILE, &ioctl_data) < 0) {
644 @@ -1018,6 +1075,7 @@
645 sizeof(ioctl_data.profile.ncontroller)); 703 sizeof(ioctl_data.profile.ncontroller));
646 } 704 }
647 return CapiNoError; 705 return CapiNoError;
648 +#endif 706 +#endif
649 } 707 }
650 /* 708 /*
651 * functions added to the CAPI2.0 spec 709 * functions added to the CAPI2.0 spec
652 Index: chan_capi-1.1.5/libcapi20/convert.c 710 Index: chan_capi-1.1.5.919/libcapi20/convert.c
653 --- chan_capi-1.1.5/libcapi20/convert.c.orig 2009-07-23 16:11:08.000000000 +0200 711 diff -Nau chan_capi-1.1.5.919/libcapi20/convert.c.orig chan_capi-1.1.5.919/libcapi20/convert.c
654 +++ chan_capi-1.1.5/libcapi20/convert.c 2010-07-24 11:12:31.000000000 +0200 712 --- chan_capi-1.1.5.919/libcapi20/convert.c.orig 2011-01-07 02:29:31.000000000 +0100
713 +++ chan_capi-1.1.5.919/libcapi20/convert.c 2011-03-13 14:03:42.000000000 +0100
655 @@ -11,7 +11,14 @@ 714 @@ -11,7 +11,14 @@
656 #include <stddef.h> 715 #include <stddef.h>
657 #include <time.h> 716 #include <time.h>
658 #include <ctype.h> 717 #include <ctype.h>
659 +#ifdef __FreeBSD__ 718 +#ifdef __FreeBSD__
665 #include <byteswap.h> 724 #include <byteswap.h>
666 +#endif 725 +#endif
667 726
668 #include "capi20.h" 727 #include "capi20.h"
669 728
729 Index: chan_capi-1.1.5.919/Makefile
730 diff -Nau chan_capi-1.1.5.919/Makefile.orig chan_capi-1.1.5.919/Makefile
731 --- chan_capi-1.1.5.919/Makefile.orig 2011-01-07 02:29:32.000000000 +0100
732 +++ chan_capi-1.1.5.919/Makefile 2011-03-13 14:03:42.000000000 +0100
733 @@ -111,6 +111,9 @@
734 CFLAGS+=-O2
735 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
736 CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi)
737 +ifeq (${USE_OWN_LIBCAPI},yes)
738 +CFLAGS+=-DUSE_OWN_LIBCAPI
739 +endif
740 ifeq (${DIVA_STREAMING},1)
741 CFLAGS += -DDIVA_STREAMING=1
742 endif
743 Index: channels/chan_sip.c
744 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c
745 --- channels/chan_sip.c.orig 2011-01-14 18:32:52.000000000 +0100
746 +++ channels/chan_sip.c 2011-03-13 14:03:42.000000000 +0100
747 @@ -11210,7 +11210,16 @@
748 } else {
749 if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
750 /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
751 - snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
752 + if (strncasecmp(p->uri, "sip:", strlen("sip:")))
753 + if (strncasecmp(p->uri, "sips:", strlen("sips:")))
754 + if (p->socket.type == SIP_TRANSPORT_TLS)
755 + snprintf(to, sizeof(to), "<%s%s>;tag=%s", "sips:", p->uri, p->theirtag);
756 + else
757 + snprintf(to, sizeof(to), "<%s%s>;tag=%s", "sips:", p->uri, p->theirtag);
758 + else /* if (strncasecmp(p->uri, "sips:"... */
759 + snprintf(to, sizeof(to), "<%s%s>;tag=%s", "", p->uri, p->theirtag);
760 + else /* if (strncasecmp(p->uri, "sip:"... */
761 + snprintf(to, sizeof(to), "<%s%s>;tag=%s", "", p->uri, p->theirtag);
762 } else if (p->options && p->options->vxml_url) {
763 /* If there is a VXML URL append it to the SIP URL */
764 snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url);
670 Index: channels/console_video.h 765 Index: channels/console_video.h
766 diff -Nau channels/console_video.h.orig channels/console_video.h
671 --- channels/console_video.h.orig 2008-06-30 17:45:15.000000000 +0200 767 --- channels/console_video.h.orig 2008-06-30 17:45:15.000000000 +0200
672 +++ channels/console_video.h 2010-07-24 11:12:31.000000000 +0200 768 +++ channels/console_video.h 2011-03-13 14:03:42.000000000 +0100
673 @@ -28,10 +28,7 @@ 769 @@ -28,10 +28,7 @@
674 "console {device}" 770 "console {device}"
675 #else 771 #else
676 772
677 -#include <ffmpeg/avcodec.h> 773 -#include <ffmpeg/avcodec.h>
681 +#include <libavcoded/avcodec.h> 777 +#include <libavcoded/avcodec.h>
682 778
683 #define CONSOLE_VIDEO_CMDS \ 779 #define CONSOLE_VIDEO_CMDS \
684 "console {videodevice|videocodec" \ 780 "console {videodevice|videocodec" \
685 Index: configure 781 Index: configure
686 --- configure.orig 2010-06-24 01:40:16.000000000 +0200 782 diff -Nau configure.orig configure
687 +++ configure 2010-07-24 11:14:22.000000000 +0200 783 --- configure.orig 2011-01-09 22:40:34.000000000 +0100
688 @@ -4530,11 +4530,6 @@ 784 +++ configure 2011-03-13 14:14:50.000000000 +0100
689 # note- does not work on FreeBSD 785 @@ -4700,11 +4700,6 @@
786 esac
690 787
691 case "${host_os}" in 788 case "${host_os}" in
692 - freebsd*) 789 - freebsd*)
693 - 790 -
694 - CPPFLAGS=-I/usr/local/include 791 - CPPFLAGS=-I/usr/local/include
695 - LDFLAGS=-L/usr/local/lib 792 - LDFLAGS=-L/usr/local/lib
696 - ;; 793 - ;;
697 openbsd*) 794 openbsd*)
698 795
699 if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then 796 if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then
797 @@ -18227,8 +18222,8 @@
798 if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
799 imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
800 fi
801 - imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
802 - imap_include="-I${IMAP_TK_DIR}/c-client"
803 + imap_libs="-limap -lssl -lcrypto -lcrypt"
804 + imap_include="-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap"
805 CPPFLAGS="${CPPFLAGS} ${imap_include}"
806 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
808 @@ -25461,14 +25456,14 @@
809 else
810 ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
811 CFLAGS="${CFLAGS} "
812 - as_ac_Lib=`$as_echo "ac_cv_lib_lua5.1_${pbxfuncname}" | $as_tr_sh`
813 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua5.1" >&5
814 -$as_echo_n "checking for ${pbxfuncname} in -llua5.1... " >&6; }
815 + as_ac_Lib=`$as_echo "ac_cv_lib_lua_${pbxfuncname}" | $as_tr_sh`
816 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua" >&5
817 +$as_echo_n "checking for ${pbxfuncname} in -llua... " >&6; }
818 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
819 $as_echo_n "(cached) " >&6
820 else
821 ac_check_lib_save_LIBS=$LIBS
822 -LIBS="-llua5.1 ${pbxlibdir} -lm $LIBS"
823 +LIBS="-llua ${pbxlibdir} -lm $LIBS"
824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
825 /* end confdefs.h. */
826
827 @@ -25511,19 +25506,19 @@
828
829 # now check for the header.
830 if test "${AST_LUA_FOUND}" = "yes"; then
831 - LUA_LIB="${pbxlibdir} -llua5.1 -lm"
832 + LUA_LIB="${pbxlibdir} -llua -lm"
833 # if --with-LUA=DIR has been specified, use it.
834 if test "x${LUA_DIR}" != "x"; then
835 LUA_INCLUDE="-I${LUA_DIR}/include"
836 fi
837 LUA_INCLUDE="${LUA_INCLUDE} "
838 - if test "xlua5.1/lua.h" = "x" ; then # no header, assume found
839 + if test "xlua/lua.h" = "x" ; then # no header, assume found
840 LUA_HEADER_FOUND="1"
841 else # check for the header
842 ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
843 CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}"
844 - ac_fn_c_check_header_mongrel "$LINENO" "lua5.1/lua.h" "ac_cv_header_lua5_1_lua_h" "$ac_includes_default"
845 -if test "x$ac_cv_header_lua5_1_lua_h" = x""yes; then :
846 + ac_fn_c_check_header_mongrel "$LINENO" "lua/lua.h" "ac_cv_header_lua_lua_h" "$ac_includes_default"
847 +if test "x$ac_cv_header_lua_lua_h" = x""yes; then :
848 LUA_HEADER_FOUND=1
849 else
850 LUA_HEADER_FOUND=0
851 @@ -25551,9 +25546,9 @@
852
853 if test "x${PBX_LUA}" = "x1" ; then
854 if test x"${LUA_DIR}" = x; then
855 - LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1"
856 + LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua"
857 else
858 - LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1"
859 + LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua"
860 fi
861 fi
862
863 @@ -26238,7 +26233,7 @@
864 pbxlibdir="-L${SQLITE_DIR}"
865 fi
866 fi
867 - pbxfuncname="sqlite_exec"
868 + pbxfuncname="sqlite3_exec"
869 if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
870 AST_SQLITE_FOUND=yes
871 else
872 @@ -26953,16 +26948,16 @@
873 if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
874 PBX_GMIME=0
875 if test -n "$ac_tool_prefix"; then
876 - # Extract the first word of "${ac_tool_prefix}gmime-config", so it can be a program name with args.
877 -set dummy ${ac_tool_prefix}gmime-config; ac_word=$2
878 + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
879 + set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
881 $as_echo_n "checking for $ac_word... " >&6; }
882 -if test "${ac_cv_path_CONFIG_GMIME+set}" = set; then :
883 +if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
884 $as_echo_n "(cached) " >&6
885 else
886 - case $CONFIG_GMIME in
887 + case $PKGCONFIG in
888 [\\/]* | ?:[\\/]*)
889 - ac_cv_path_CONFIG_GMIME="$CONFIG_GMIME" # Let the user override the test with a path.
890 + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
891 ;;
892 *)
893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
894 @@ -26973,7 +26968,7 @@
895 test -z "$as_dir" && as_dir=.
896 for ac_exec_ext in '' $ac_executable_extensions; do
897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
898 - ac_cv_path_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext"
899 + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
901 break 2
902 fi
903 @@ -26984,10 +26979,10 @@
904 ;;
905 esac
906 fi
907 -CONFIG_GMIME=$ac_cv_path_CONFIG_GMIME
908 -if test -n "$CONFIG_GMIME"; then
909 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_GMIME" >&5
910 -$as_echo "$CONFIG_GMIME" >&6; }
911 +PKGCONFIG=$ac_cv_path_PKGCONFIG
912 +if test -n "$PKGCONFIG"; then
913 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
914 +$as_echo "$PKGCONFIG" >&6; }
915 else
916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
917 $as_echo "no" >&6; }
918 @@ -26995,18 +26990,18 @@
919
920
921 fi
922 -if test -z "$ac_cv_path_CONFIG_GMIME"; then
923 - ac_pt_CONFIG_GMIME=$CONFIG_GMIME
924 - # Extract the first word of "gmime-config", so it can be a program name with args.
925 -set dummy gmime-config; ac_word=$2
926 +if test -z "$ac_cv_path_PKGCONFIG"; then
927 + ac_pt_PKGCONFIG=$PKGCONFIG
928 + # Extract the first word of "pkg-config", so it can be a program name with args.
929 +set dummy pkg-config; ac_word=$2
930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
931 $as_echo_n "checking for $ac_word... " >&6; }
932 -if test "${ac_cv_path_ac_pt_CONFIG_GMIME+set}" = set; then :
933 +if test "${ac_cv_path_ac_pt_PKGCONFIG+set}" = set; then :
934 $as_echo_n "(cached) " >&6
935 else
936 - case $ac_pt_CONFIG_GMIME in
937 + case $ac_pt_PKGCONFIG in
938 [\\/]* | ?:[\\/]*)
939 - ac_cv_path_ac_pt_CONFIG_GMIME="$ac_pt_CONFIG_GMIME" # Let the user override the test with a path.
940 + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
941 ;;
942 *)
943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
944 @@ -27017,7 +27012,7 @@
945 test -z "$as_dir" && as_dir=.
946 for ac_exec_ext in '' $ac_executable_extensions; do
947 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
948 - ac_cv_path_ac_pt_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext"
949 + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
951 break 2
952 fi
953 @@ -27028,17 +27023,17 @@
954 ;;
955 esac
956 fi
957 -ac_pt_CONFIG_GMIME=$ac_cv_path_ac_pt_CONFIG_GMIME
958 -if test -n "$ac_pt_CONFIG_GMIME"; then
959 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_GMIME" >&5
960 -$as_echo "$ac_pt_CONFIG_GMIME" >&6; }
961 +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
962 +if test -n "$ac_pt_PKGCONFIG"; then
963 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
964 +$as_echo "${ECHO_T}$ac_pt_PKGCONFIG" >&6; }
965 else
966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
967 $as_echo "no" >&6; }
968 fi
969
970 - if test "x$ac_pt_CONFIG_GMIME" = x; then
971 - CONFIG_GMIME="No"
972 + if test "x$ac_pt_PKGCONFIG" = x; then
973 + PKGCONFIG="No"
974 else
975 case $cross_compiling:$ac_tool_warned in
976 yes:)
977 @@ -27046,17 +27041,15 @@
978 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
979 ac_tool_warned=yes ;;
980 esac
981 - CONFIG_GMIME=$ac_pt_CONFIG_GMIME
982 + PKGCONFIG=$ac_pt_PKGCONFIG
983 fi
984 else
985 - CONFIG_GMIME="$ac_cv_path_CONFIG_GMIME"
986 + PKGCONFIG="$ac_cv_path_PKGCONFIG"
987 fi
988
989 - if test ! "x${CONFIG_GMIME}" = xNo; then
990 - if test x"" = x ; then A=--cflags ; else A="" ; fi
991 - GMIME_INCLUDE=$(${CONFIG_GMIME} $A)
992 - if test x"" = x ; then A=--libs ; else A="" ; fi
993 - GMIME_LIB=$(${CONFIG_GMIME} $A)
994 + if test ! "x${PKGCONFIG}" = xNo; then
995 + GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.4 --cflags 2>/dev/null)
996 + GMIME_LIB=$(${PKGCONFIG} gmime-2.4 --libs)
997 if test x"#include <gmime/gmime.h>" != x ; then
998 saved_cppflags="${CPPFLAGS}"
999 if test "x${GMIME_DIR}" != "x"; then
1000 Index: formats/format_pcm.c
1001 diff -Nau formats/format_pcm.c.orig formats/format_pcm.c
1002 --- formats/format_pcm.c.orig 2010-07-26 05:27:06.000000000 +0200
1003 +++ formats/format_pcm.c 2011-03-13 14:03:42.000000000 +0100
1004 @@ -350,6 +350,7 @@
1005 ast_log(LOG_WARNING, "Unable to write header\n");
1006 return -1;
1007 }
1008 + fflush(f); /* issues.asterisk.org bug 0016610 */
1009 return 0;
1010 }
1011
1012 Index: formats/format_wav.c
1013 diff -Nau formats/format_wav.c.orig formats/format_wav.c
1014 --- formats/format_wav.c.orig 2010-09-02 18:43:09.000000000 +0200
1015 +++ formats/format_wav.c 2011-03-13 14:03:42.000000000 +0100
1016 @@ -310,6 +310,7 @@
1017 ast_log(LOG_WARNING, "Unable to write header\n");
1018 return -1;
1019 }
1020 + fflush(f); /* issues.asterisk.org bug 0016610 */
1021 return 0;
1022 }
1023
1024 Index: formats/format_wav_gsm.c
1025 diff -Nau formats/format_wav_gsm.c.orig formats/format_wav_gsm.c
1026 --- formats/format_wav_gsm.c.orig 2010-07-26 05:27:06.000000000 +0200
1027 +++ formats/format_wav_gsm.c 2011-03-13 14:03:42.000000000 +0100
1028 @@ -362,6 +362,7 @@
1029 ast_log(LOG_WARNING, "Unable to write header\n");
1030 return -1;
1031 }
1032 + fflush(f); /* issues.asterisk.org bug 0016610 */
1033 return 0;
1034 }
1035
1036 Index: main/db1-ast/hash/hash.h
1037 diff -Nau main/db1-ast/hash/hash.h.orig main/db1-ast/hash/hash.h
1038 --- main/db1-ast/hash/hash.h.orig 2006-08-21 04:11:39.000000000 +0200
1039 +++ main/db1-ast/hash/hash.h 2011-03-13 14:03:42.000000000 +0100
1040 @@ -36,6 +36,8 @@
1041 * @(#)hash.h 8.3 (Berkeley) 5/31/94
1042 */
1043
1044 +#include <stdint.h>
1045 +
1046 /* Operations */
1047 typedef enum {
1048 HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT
1049 Index: main/db1-ast/hash/ndbm.c
1050 diff -Nau main/db1-ast/hash/ndbm.c.orig main/db1-ast/hash/ndbm.c
1051 --- main/db1-ast/hash/ndbm.c.orig 2006-08-21 04:11:39.000000000 +0200
1052 +++ main/db1-ast/hash/ndbm.c 2011-03-13 14:03:42.000000000 +0100
1053 @@ -49,7 +49,8 @@
1054 #include <string.h>
1055 #include <stdlib.h>
1056
1057 -#include <ndbm.h>
1058 +#include "../include/ndbm.h"
1059 +#include "../include/db.h"
1060 #include "hash.h"
1061
1062 /*
1063 Index: main/features.c
1064 diff -Nau main/features.c.orig main/features.c
1065 --- main/features.c.orig 2011-01-20 21:24:36.000000000 +0100
1066 +++ main/features.c 2011-03-13 14:03:42.000000000 +0100
1067 @@ -1658,6 +1658,10 @@
1068 snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
1069 }
1070
1071 + for(x = 0; x < strlen(touch_filename); x++) {
1072 + if (args[x] == '/')
1073 + args[x] = '-';
1074 + }
1075 for(x = 0; x < strlen(args); x++) {
1076 if (args[x] == '/')
1077 args[x] = '-';
1078 @@ -1774,6 +1778,10 @@
1079 snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav"));
1080 }
1081
1082 + for( x = 0; x < strlen(touch_filename); x++) {
1083 + if (args[x] == '/')
1084 + args[x] = '-';
1085 + }
1086 for( x = 0; x < strlen(args); x++) {
1087 if (args[x] == '/')
1088 args[x] = '-';
1089 Index: main/file.c
1090 diff -Nau main/file.c.orig main/file.c
1091 --- main/file.c.orig 2011-01-12 17:05:12.000000000 +0100
1092 +++ main/file.c 2011-03-13 14:03:42.000000000 +0100
1093 @@ -255,7 +255,7 @@
1094 char *fn = NULL;
1095
1096 if (!strcmp(ext, "wav49"))
1097 - ext = "WAV";
1098 + ext = "wav";
1099
1100 if (filename[0] == '/') {
1101 if (asprintf(&fn, "%s.%s", filename, ext) < 0) {
700 Index: main/Makefile 1102 Index: main/Makefile
701 --- main/Makefile.orig 2010-06-25 20:58:37.000000000 +0200 1103 diff -Nau main/Makefile.orig main/Makefile
702 +++ main/Makefile 2010-07-24 11:12:31.000000000 +0200 1104 --- main/Makefile.orig 2010-12-18 00:52:04.000000000 +0100
703 @@ -78,10 +78,7 @@ 1105 +++ main/Makefile 2011-03-13 14:03:42.000000000 +0100
1106 @@ -69,10 +69,7 @@
704 endif 1107 endif
705 1108
706 ifeq ($(OSARCH),FreeBSD) 1109 ifeq ($(OSARCH),FreeBSD)
707 - # -V is understood by BSD Make, not by GNU make. 1110 - # -V is understood by BSD Make, not by GNU make.
708 - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) 1111 - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
710 - AST_LIBS+=-lcrypto 1113 - AST_LIBS+=-lcrypto
711 + AST_LIBS+=-lpthread -lcrypto 1114 + AST_LIBS+=-lpthread -lcrypto
712 endif 1115 endif
713 1116
714 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) 1117 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
715 Index: main/file.c
716 --- main/file.c.orig 2010-03-25 17:26:13.000000000 +0100
717 +++ main/file.c 2010-07-24 11:12:31.000000000 +0200
718 @@ -254,7 +254,7 @@
719 char *fn = NULL;
720
721 if (!strcmp(ext, "wav49"))
722 - ext = "WAV";
723 + ext = "wav";
724
725 if (filename[0] == '/') {
726 if (asprintf(&fn, "%s.%s", filename, ext) < 0) {
727 Index: main/tcptls.c 1118 Index: main/tcptls.c
728 --- main/tcptls.c.orig 2010-03-20 18:33:03.000000000 +0100 1119 diff -Nau main/tcptls.c.orig main/tcptls.c
729 +++ main/tcptls.c 2010-07-24 11:12:31.000000000 +0200 1120 --- main/tcptls.c.orig 2010-07-09 00:08:07.000000000 +0200
730 @@ -325,6 +325,7 @@ 1121 +++ main/tcptls.c 2011-03-13 14:03:42.000000000 +0100
1122 @@ -354,6 +354,7 @@
731 if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { 1123 if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) {
732 if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) 1124 if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0)
733 ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); 1125 ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath);
734 + SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL)); 1126 + SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL));
735 } 1127 }
736 1128
737 ast_verb(0, "SSL certificate ok\n"); 1129 ast_verb(0, "SSL certificate ok\n");
1130 Index: main/udptl.c
1131 diff -Nau main/udptl.c.orig main/udptl.c
1132 --- main/udptl.c.orig 2011-02-22 23:52:11.000000000 +0100
1133 +++ main/udptl.c 2011-03-13 14:03:42.000000000 +0100
1134 @@ -98,6 +98,18 @@
1135
1136 #define UDPTL_BUF_MASK 15
1137
1138 +/*! Copied from chan_oss.c, corrects link errors:
1139 +udptl.o: In function `calculate_local_max_datagram':
1140 +main/udptl.c:740: undefined reference to `MIN'
1141 +udptl.o: In function `calculate_far_max_ifp':
1142 +main/udptl.c:770: undefined reference to `MAX' */
1143 +#ifndef MIN
1144 +#define MIN(a,b) ((a) < (b) ? (a) : (b))
1145 +#endif
1146 +#ifndef MAX
1147 +#define MAX(a,b) ((a) > (b) ? (a) : (b))
1148 +#endif
1149 +
1150 typedef struct {
1151 int buf_len;
1152 uint8_t buf[LOCAL_FAX_MAX_DATAGRAM];
1153 Index: Makefile
1154 diff -Nau Makefile.orig Makefile
1155 --- Makefile.orig 2011-01-12 16:57:43.000000000 +0100
1156 +++ Makefile 2011-03-13 14:03:42.000000000 +0100
1157 @@ -230,15 +230,6 @@
1158 _ASTCFLAGS+=-fsigned-char
1159 endif
1160
1161 -ifeq ($(OSARCH),FreeBSD)
1162 - ifeq ($(PROC),i386)
1163 - _ASTCFLAGS+=-march=i686
1164 - endif
1165 - # -V is understood by BSD Make, not by GNU make.
1166 - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
1167 - _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
1168 -endif
1169 -
1170 ifeq ($(OSARCH),NetBSD)
1171 _ASTCFLAGS+=-pthread -I/usr/pkg/include
1172 endif
738 Index: menuselect-tree 1173 Index: menuselect-tree
739 --- menuselect-tree.orig 2010-07-22 21:20:17.000000000 +0200 1174 diff -Nau menuselect-tree.orig menuselect-tree
740 +++ menuselect-tree 2010-07-24 11:12:31.000000000 +0200 1175 --- menuselect-tree.orig 2011-02-22 23:50:45.000000000 +0100
741 @@ -153,6 +153,8 @@ 1176 +++ menuselect-tree 2011-03-13 14:03:42.000000000 +0100
1177 @@ -38,6 +38,8 @@
742 </member> 1178 </member>
743 <member name="app_system" displayname="Generic System() application" remove_on_change="apps/app_system.o apps/app_system.so"> 1179 <member name="app_authenticate" displayname="Authentication Application" remove_on_change="apps/app_authenticate.o apps/app_authenticate.so">
744 </member> 1180 </member>
745 +<member name="app_backticks" displayname="Generic Backticks() application" remove_on_change="apps/app_backticks.o apps/app_backticks.so"> 1181 +<member name="app_backticks" displayname="BACKTICKS() dialplan function" remove_on_change="apps/app_backticks.o apps/app_backticks.so">
746 +</member> 1182 +</member>
747 <member name="app_talkdetect" displayname="Playback with Talk Detection" remove_on_change="apps/app_talkdetect.o apps/app_talkdetect.so"> 1183 <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">
748 </member> 1184 </member>
749 <member name="app_test" displayname="Interface Test Application" remove_on_change="apps/app_test.o apps/app_test.so"> 1185 <member name="app_celgenuserevent" displayname="Generate an User-Defined CEL event" remove_on_change="apps/app_celgenuserevent.o apps/app_celgenuserevent.so">
750 @@ -693,9 +695,9 @@ 1186 @@ -937,11 +939,11 @@
751 <member name="CORE-SOUNDS-EN-ULAW" displayname="English, mu-Law format">
752 </member>
753 <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format"> 1187 <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format">
754 + <defaultenabled>yes</defaultenabled>
755 </member> 1188 </member>
756 <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" > 1189 <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" >
757 - <defaultenabled>yes</defaultenabled> 1190 - <defaultenabled>yes</defaultenabled>
758 </member> 1191 </member>
759 <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format"> 1192 <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format">
760 </member> 1193 </member>
761 @@ -771,6 +773,7 @@ 1194 <member name="CORE-SOUNDS-EN-G722" displayname="English, G.722 format">
762 <member name="EXTRA-SOUNDS-EN-ULAW" displayname="English, mu-Law format">
763 </member>
764 <member name="EXTRA-SOUNDS-EN-ALAW" displayname="English, a-Law format">
765 + <defaultenabled>yes</defaultenabled> 1195 + <defaultenabled>yes</defaultenabled>
766 </member> 1196 </member>
767 <member name="EXTRA-SOUNDS-EN-GSM" displayname="English, GSM format" > 1197 <member name="CORE-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
1198 </member>
1199 @@ -1006,7 +1008,6 @@
1200 </category>
1201 <category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes">
1202 <member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" >
1203 - <defaultenabled>yes</defaultenabled>
1204 </member>
1205 <member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" >
1206 </member>
1207 @@ -1017,6 +1018,7 @@
1208 <member name="MOH-OPSOUND-G729" displayname="opsound.org Music On Hold Files, G.729 format" >
1209 </member>
1210 <member name="MOH-OPSOUND-G722" displayname="opsound.org Music On Hold Files, G.722 format" >
1211 + <defaultenabled>yes</defaultenabled>
1212 </member>
1213 <member name="MOH-OPSOUND-SLN16" displayname="opsound.org Music On Hold Files, Signed-linear 16kHz format" >
1214 </member>
1215 @@ -1037,6 +1039,7 @@
1216 <member name="EXTRA-SOUNDS-EN-G729" displayname="English, G.729 format">
1217 </member>
1218 <member name="EXTRA-SOUNDS-EN-G722" displayname="English, G.722 format">
1219 + <defaultenabled>yes</defaultenabled>
1220 </member>
1221 <member name="EXTRA-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
768 </member> 1222 </member>
769 Index: res/res_http_post.c 1223 Index: res/res_http_post.c
770 --- res/res_http_post.c.orig 2009-10-27 18:12:09.000000000 +0100 1224 diff -Nau res/res_http_post.c.orig res/res_http_post.c
771 +++ res/res_http_post.c 2010-07-24 11:12:31.000000000 +0200 1225 --- res/res_http_post.c.orig 2009-10-27 17:48:54.000000000 +0100
1226 +++ res/res_http_post.c 2011-03-13 14:03:42.000000000 +0100
772 @@ -122,14 +122,8 @@ 1227 @@ -122,14 +122,8 @@
773 ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n"); 1228 ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n");
774 return; 1229 return;
775 } else if (GMIME_IS_MULTIPART(part)) { 1230 } else if (GMIME_IS_MULTIPART(part)) {
776 - GList *l; 1231 - GList *l;
785 + g_mime_multipart_foreach(GMIME_MULTIPART(part), process_message_callback, cbinfo); 1240 + g_mime_multipart_foreach(GMIME_MULTIPART(part), process_message_callback, cbinfo);
786 } else if (GMIME_IS_PART(part)) { 1241 } else if (GMIME_IS_PART(part)) {
787 const char *filename; 1242 const char *filename;
788 1243
789 Index: sounds/sounds.xml 1244 Index: sounds/sounds.xml
790 --- sounds/sounds.xml.orig 2009-08-18 22:31:40.000000000 +0200 1245 diff -Nau sounds/sounds.xml.orig sounds/sounds.xml
791 +++ sounds/sounds.xml 2010-07-24 11:12:31.000000000 +0200 1246 --- sounds/sounds.xml.orig 2010-10-18 23:51:23.000000000 +0200
792 @@ -4,9 +4,9 @@ 1247 +++ sounds/sounds.xml 2011-03-13 14:03:42.000000000 +0100
793 <member name="CORE-SOUNDS-EN-ULAW" displayname="English, mu-Law format"> 1248 @@ -6,11 +6,11 @@
794 </member>
795 <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format"> 1249 <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format">
796 + <defaultenabled>yes</defaultenabled>
797 </member> 1250 </member>
798 <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" > 1251 <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" >
799 - <defaultenabled>yes</defaultenabled> 1252 - <defaultenabled>yes</defaultenabled>
800 </member> 1253 </member>
801 <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format"> 1254 <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format">
802 </member> 1255 </member>
803 @@ -82,6 +82,7 @@ 1256 <member name="CORE-SOUNDS-EN-G722" displayname="English, G.722 format">
804 <member name="EXTRA-SOUNDS-EN-ULAW" displayname="English, mu-Law format">
805 </member>
806 <member name="EXTRA-SOUNDS-EN-ALAW" displayname="English, a-Law format">
807 + <defaultenabled>yes</defaultenabled> 1257 + <defaultenabled>yes</defaultenabled>
808 </member> 1258 </member>
809 <member name="EXTRA-SOUNDS-EN-GSM" displayname="English, GSM format" > 1259 <member name="CORE-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
810 </member> 1260 </member>
1261 @@ -75,7 +75,6 @@
1262 </category>
1263 <category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes">
1264 <member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" >
1265 - <defaultenabled>yes</defaultenabled>
1266 </member>
1267 <member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" >
1268 </member>
1269 @@ -86,6 +85,7 @@
1270 <member name="MOH-OPSOUND-G729" displayname="opsound.org Music On Hold Files, G.729 format" >
1271 </member>
1272 <member name="MOH-OPSOUND-G722" displayname="opsound.org Music On Hold Files, G.722 format" >
1273 + <defaultenabled>yes</defaultenabled>
1274 </member>
1275 <member name="MOH-OPSOUND-SLN16" displayname="opsound.org Music On Hold Files, Signed-linear 16kHz format" >
1276 </member>
1277 @@ -106,6 +106,7 @@
1278 <member name="EXTRA-SOUNDS-EN-G729" displayname="English, G.729 format">
1279 </member>
1280 <member name="EXTRA-SOUNDS-EN-G722" displayname="English, G.722 format">
1281 + <defaultenabled>yes</defaultenabled>
1282 </member>
1283 <member name="EXTRA-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
1284 </member>

mercurial