asterisk/asterisk.patch

changeset 369
3429ba7ff8dc
parent 347
10bd406e1c51
child 398
08f5eb82b58f
equal deleted inserted replaced
5:0473a958bb0a 6:3971a38d4385
1 Index: addons/chan_ooh323.c 1 Index: addons/chan_ooh323.c
2 diff -Nau addons/chan_ooh323.c.orig addons/chan_ooh323.c 2 diff -Nau addons/chan_ooh323.c.orig addons/chan_ooh323.c
3 --- addons/chan_ooh323.c.orig 2011-02-18 01:07:20.000000000 +0100 3 --- addons/chan_ooh323.c.orig 2011-08-09 18:13:09.000000000 +0200
4 +++ addons/chan_ooh323.c 2011-05-23 17:35:28.331029567 +0200 4 +++ addons/chan_ooh323.c 2011-09-14 14:29:50.740457577 +0200
5 @@ -23,6 +23,12 @@ 5 @@ -24,6 +24,12 @@
6 6
7 #include "chan_ooh323.h" 7 #include "chan_ooh323.h"
8 #include <math.h> 8 #include <math.h>
9 +#if defined __SVR4 && defined __sun 9 +#if defined __SVR4 && defined __sun
10 +#include <sys/sockio.h> 10 +#include <sys/sockio.h>
15 15
16 #define FORMAT_STRING_SIZE 512 16 #define FORMAT_STRING_SIZE 512
17 17
18 Index: addons/ooh323c/src/ooCmdChannel.c 18 Index: addons/ooh323c/src/ooCmdChannel.c
19 diff -Nau addons/ooh323c/src/ooCmdChannel.c.orig addons/ooh323c/src/ooCmdChannel.c 19 diff -Nau addons/ooh323c/src/ooCmdChannel.c.orig addons/ooh323c/src/ooCmdChannel.c
20 --- addons/ooh323c/src/ooCmdChannel.c.orig 2010-03-26 00:38:58.000000000 +0100 20 --- addons/ooh323c/src/ooCmdChannel.c.orig 2011-08-04 21:37:16.000000000 +0200
21 +++ addons/ooh323c/src/ooCmdChannel.c 2011-05-23 17:35:28.331029567 +0200 21 +++ addons/ooh323c/src/ooCmdChannel.c 2011-09-14 14:29:50.740457577 +0200
22 @@ -25,6 +25,10 @@ 22 @@ -25,6 +25,10 @@
23 #include "ooCalls.h" 23 #include "ooCalls.h"
24 #include "ooCmdChannel.h" 24 #include "ooCmdChannel.h"
25 25
26 +#ifndef AF_LOCAL 26 +#ifndef AF_LOCAL
30 30
31 /** Global endpoint structure */ 31 /** Global endpoint structure */
32 extern OOH323EndPoint gH323ep; 32 extern OOH323EndPoint gH323ep;
33 Index: addons/ooh323c/src/ooSocket.c 33 Index: addons/ooh323c/src/ooSocket.c
34 diff -Nau addons/ooh323c/src/ooSocket.c.orig addons/ooh323c/src/ooSocket.c 34 diff -Nau addons/ooh323c/src/ooSocket.c.orig addons/ooh323c/src/ooSocket.c
35 --- addons/ooh323c/src/ooSocket.c.orig 2011-02-16 21:21:17.000000000 +0100 35 --- addons/ooh323c/src/ooSocket.c.orig 2011-05-04 22:50:18.000000000 +0200
36 +++ addons/ooh323c/src/ooSocket.c 2011-05-23 17:35:28.331029567 +0200 36 +++ addons/ooh323c/src/ooSocket.c 2011-09-14 14:29:50.740457577 +0200
37 @@ -24,6 +24,9 @@ 37 @@ -24,6 +24,9 @@
38 38
39 #include "ooSocket.h" 39 #include "ooSocket.h"
40 #include "ootrace.h" 40 #include "ootrace.h"
41 +#if defined __SVR4 && defined __sun 41 +#if defined __SVR4 && defined __sun
45 static int inited = 0; 45 static int inited = 0;
46 #define SEND_FLAGS 0 46 #define SEND_FLAGS 0
47 Index: addons/ooh323cDriver.c 47 Index: addons/ooh323cDriver.c
48 diff -Nau addons/ooh323cDriver.c.orig addons/ooh323cDriver.c 48 diff -Nau addons/ooh323cDriver.c.orig addons/ooh323cDriver.c
49 --- addons/ooh323cDriver.c.orig 2011-02-18 01:07:20.000000000 +0100 49 --- addons/ooh323cDriver.c.orig 2011-02-18 01:07:20.000000000 +0100
50 +++ addons/ooh323cDriver.c 2011-05-23 17:35:28.338530899 +0200 50 +++ addons/ooh323cDriver.c 2011-09-14 14:29:50.740457577 +0200
51 @@ -27,6 +27,11 @@ 51 @@ -27,6 +27,11 @@
52 52
53 #define SEC_TO_HOLD_THREAD 24 53 #define SEC_TO_HOLD_THREAD 24
54 54
55 +#ifndef AF_LOCAL 55 +#ifndef AF_LOCAL
61 extern OOBOOL gH323Debug; 61 extern OOBOOL gH323Debug;
62 extern OOH323EndPoint gH323ep; 62 extern OOH323EndPoint gH323ep;
63 Index: apps/app_backticks.c 63 Index: apps/app_backticks.c
64 diff -Nau apps/app_backticks.c.orig apps/app_backticks.c 64 diff -Nau apps/app_backticks.c.orig apps/app_backticks.c
65 --- apps/app_backticks.c.orig 1970-01-01 01:00:00.000000000 +0100 65 --- apps/app_backticks.c.orig 1970-01-01 01:00:00.000000000 +0100
66 +++ apps/app_backticks.c 2011-05-23 17:35:28.338530899 +0200 66 +++ apps/app_backticks.c 2011-09-14 14:29:50.740457577 +0200
67 @@ -0,0 +1,129 @@ 67 @@ -0,0 +1,129 @@
68 + 68 +
69 +#include "asterisk.h" 69 +#include "asterisk.h"
70 + 70 +
71 +ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.52 $") 71 +ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.52 $")
194 + 194 +
195 +AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "BACKTICKS() dialplan function"); 195 +AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "BACKTICKS() dialplan function");
196 + 196 +
197 Index: apps/app_meetme.c 197 Index: apps/app_meetme.c
198 diff -Nau apps/app_meetme.c.orig apps/app_meetme.c 198 diff -Nau apps/app_meetme.c.orig apps/app_meetme.c
199 --- apps/app_meetme.c.orig 2011-01-29 19:09:37.000000000 +0100 199 --- apps/app_meetme.c.orig 2011-07-19 17:43:32.000000000 +0200
200 +++ apps/app_meetme.c 2011-05-23 17:35:28.338530899 +0200 200 +++ apps/app_meetme.c 2011-09-14 14:29:50.747960016 +0200
201 @@ -604,6 +604,7 @@ 201 @@ -606,6 +606,7 @@
202 CONFFLAG_DURATION_LIMIT = (1 << 30), 202 CONFFLAG_DURATION_LIMIT = (1 << 30),
203 /*! 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. */
204 CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31), 204 CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31),
205 + CONFFLAG_USERNAME = (1 << 32), 205 + CONFFLAG_USERNAME = (1 << 32),
206 }; 206 };
207 207
208 /* !If set play an intro announcement at start of conference */ 208 /* !If set play an intro announcement at start of conference */
209 @@ -617,6 +618,7 @@ 209 @@ -619,6 +620,7 @@
210 OPT_ARG_MOH_CLASS = 4, 210 OPT_ARG_MOH_CLASS = 4,
211 OPT_ARG_INTROMSG = 5, 211 OPT_ARG_INTROMSG = 5,
212 OPT_ARG_ARRAY_SIZE = 6, 212 OPT_ARG_ARRAY_SIZE = 6,
213 + OPT_ARG_USERNAME = 7, 213 + OPT_ARG_USERNAME = 7,
214 }; 214 };
215 215
216 AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS 216 AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS
217 @@ -650,6 +652,7 @@ 217 @@ -652,6 +654,7 @@
218 AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ), 218 AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ),
219 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),
220 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),
221 + AST_APP_OPTION_ARG('n', CONFFLAG_USERNAME, OPT_ARG_USERNAME), 221 + AST_APP_OPTION_ARG('n', CONFFLAG_USERNAME, OPT_ARG_USERNAME),
222 END_OPTIONS ); 222 END_OPTIONS );
223 223
224 static const char * const app = "MeetMe"; 224 static const char * const app = "MeetMe";
225 @@ -2437,6 +2440,12 @@ 225 @@ -2447,6 +2450,12 @@
226 ast_test_flag64(confflags, CONFFLAG_INTROUSERNOREVIEW))) { 226 ast_test_flag64(confflags, CONFFLAG_INTROUSERNOREVIEW))) {
227 char destdir[PATH_MAX]; 227 char destdir[PATH_MAX];
228 228
229 + if (!ast_test_flag64(confflags, CONFFLAG_USERNAME) 229 + if (!ast_test_flag64(confflags, CONFFLAG_USERNAME)
230 + && !ast_strlen_zero(optargs[OPT_ARG_USERNAME]) 230 + && !ast_strlen_zero(optargs[OPT_ARG_USERNAME])
233 + else { 233 + else {
234 + 234 +
235 snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR); 235 snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR);
236 236
237 if (ast_mkdir(destdir, 0777) != 0) { 237 if (ast_mkdir(destdir, 0777) != 0) {
238 @@ -2453,6 +2462,7 @@ 238 @@ -2463,6 +2472,7 @@
239 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);
240 if (res == -1) 240 if (res == -1)
241 goto outrun; 241 goto outrun;
242 + } 242 + }
243 } 243 }
244 244
245 ast_mutex_lock(&conf->playlock); 245 ast_mutex_lock(&conf->playlock);
246 Index: apps/app_voicemail.c 246 Index: apps/app_voicemail.c
247 diff -Nau apps/app_voicemail.c.orig apps/app_voicemail.c 247 diff -Nau apps/app_voicemail.c.orig apps/app_voicemail.c
248 --- apps/app_voicemail.c.orig 2011-02-08 20:41:42.000000000 +0100 248 --- apps/app_voicemail.c.orig 2011-07-26 16:04:55.000000000 +0200
249 +++ apps/app_voicemail.c 2011-05-23 17:35:28.348531751 +0200 249 +++ apps/app_voicemail.c 2011-09-14 14:29:50.747960016 +0200
250 @@ -366,6 +366,7 @@ 250 @@ -373,6 +373,7 @@
251 static char imapport[8]; 251 static char imapport[8];
252 static char imapflags[128]; 252 static char imapflags[128];
253 static char imapfolder[64]; 253 static char imapfolder[64];
254 +static int imapsubfold = 0; 254 +static int imapsubfold = 0;
255 static char imapparentfolder[64] = "\0"; 255 static char imapparentfolder[64] = "\0";
256 static char greetingfolder[64]; 256 static char greetingfolder[64];
257 static char authuser[32]; 257 static char authuser[32];
258 @@ -2464,7 +2465,7 @@ 258 @@ -2504,7 +2505,7 @@
259 } 259 }
260 260
261 /* Build up server information */ 261 /* Build up server information */
262 - ast_build_string(&t, &left, "{%s:%s/imap", imapserver, imapport); 262 - ast_build_string(&t, &left, "{%s:%s/imap", imapserver, imapport);
263 + ast_build_string(&t, &left, "{%s:%s", imapserver, imapport); 263 + ast_build_string(&t, &left, "{%s:%s", imapserver, imapport);
264 264
265 /* Add authentication user if present */ 265 /* Add authentication user if present */
266 if (!ast_strlen_zero(authuser)) 266 if (!ast_strlen_zero(authuser))
267 @@ -6073,6 +6074,7 @@ 267 @@ -6161,6 +6162,7 @@
268 /* simple. huh? */ 268 /* simple. huh? */
269 char sequence[10]; 269 char sequence[10];
270 char mailbox[256]; 270 char mailbox[256];
271 + char folder[256]; 271 + char folder[256];
272 int res; 272 int res;
273 273
274 /* get the real IMAP message number for this message */ 274 /* get the real IMAP message number for this message */
275 @@ -6088,10 +6090,24 @@ 275 @@ -6176,10 +6178,24 @@
276 mail_setflag(vms->mailstream, sequence, "\\Unseen"); 276 mail_setflag(vms->mailstream, sequence, "\\Unseen");
277 mail_clearflag(vms->mailstream, sequence, "\\Seen"); 277 mail_clearflag(vms->mailstream, sequence, "\\Seen");
278 } 278 }
279 - if (!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) { 279 - if (!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) {
280 - ast_mutex_unlock(&vms->lock); 280 - ast_mutex_unlock(&vms->lock);
297 } 297 }
298 + 298 +
299 /* Create the folder if it don't exist */ 299 /* Create the folder if it don't exist */
300 imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */ 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); 301 ast_debug(5, "Checking if folder exists: %s\n", mailbox);
302 @@ -10264,6 +10280,10 @@ 302 @@ -10383,6 +10399,10 @@
303 #ifndef IMAP_STORAGE 303 #ifndef IMAP_STORAGE
304 } else if (!cmd) { 304 } else if (!cmd) {
305 vms.deleted[vms.curmsg] = 1; 305 vms.deleted[vms.curmsg] = 1;
306 +#else 306 +#else
307 + } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) { 307 + } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) {
308 + vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */ 308 + vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */
309 + deleted = 1; /* successful copy op */ 309 + deleted = 1; /* successful copy op */
310 #endif 310 #endif
311 } else { 311 } else {
312 vms.deleted[vms.curmsg] = 0; 312 vms.deleted[vms.curmsg] = 0;
313 @@ -11731,6 +11751,15 @@ 313 @@ -11874,6 +11894,15 @@
314 } else { 314 } else {
315 ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder)); 315 ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder));
316 } 316 }
317 + /* IMAP saved (sub)folder location policy */ 317 + /* IMAP saved (sub)folder location policy */
318 + if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) { 318 + if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) {
324 + imapsubfold = 0; 324 + imapsubfold = 0;
325 + } 325 + }
326 if ((val = ast_variable_retrieve(cfg, "general", "imapparentfolder"))) { 326 if ((val = ast_variable_retrieve(cfg, "general", "imapparentfolder"))) {
327 ast_copy_string(imapparentfolder, val, sizeof(imapparentfolder)); 327 ast_copy_string(imapparentfolder, val, sizeof(imapparentfolder));
328 } 328 }
329 Index: apps/.moduleinfo 329 Index: cdr/cdr_radius.c
330 diff -Nau apps/.moduleinfo.orig apps/.moduleinfo 330 diff -Nau cdr/cdr_radius.c.orig cdr/cdr_radius.c
331 --- apps/.moduleinfo.orig 2011-05-09 22:22:47.000000000 +0200 331 --- cdr/cdr_radius.c.orig 2011-07-14 22:13:06.000000000 +0200
332 +++ apps/.moduleinfo 2011-05-23 17:35:28.348531751 +0200 332 +++ cdr/cdr_radius.c 2011-09-14 14:29:50.777958246 +0200
333 @@ -72,7 +72,7 @@ 333 @@ -106,10 +106,18 @@
334 <member name="app_image" displayname="Image Transmission Application" remove_on_change="apps/app_image.o apps/app_image.so"> 334 if (!rc_avpair_add(rh, tosend, PW_AST_SRC, &cdr->src, strlen(cdr->src), VENDOR_CODE))
335 </member> 335 return -1;
336 <member name="app_ivrdemo" displayname="IVR Demo Application" remove_on_change="apps/app_ivrdemo.o apps/app_ivrdemo.so"> 336
337 - <defaultenabled>no</defaultenabled> 337 + /* RADIUS standard identifier patch */
338 + <defaultenabled>yes</defaultenabled> 338 + if (!rc_avpair_add(rh, tosend, PW_CALLING_STATION_ID, &cdr->src, strlen(cdr->src), 0))
339 </member> 339 + return -1;
340 <member name="app_jack" displayname="JACK Interface" remove_on_change="apps/app_jack.o apps/app_jack.so"> 340 +
341 <depend>jack</depend> 341 /* Destination */
342 @@ -127,10 +127,10 @@ 342 if (!rc_avpair_add(rh, tosend, PW_AST_DST, &cdr->dst, strlen(cdr->dst), VENDOR_CODE))
343 <member name="app_rpt" displayname="Radio Repeater/Remote Base Application" remove_on_change="apps/app_rpt.o apps/app_rpt.so"> 343 return -1;
344 <depend>dahdi</depend> 344
345 <depend>tonezone</depend> 345 + /* RADIUS standard identifier patch */
346 - <defaultenabled>no</defaultenabled> 346 + if (!rc_avpair_add(rh, tosend, PW_CALLED_STATION_ID, &cdr->dst, strlen(cdr->dst), 0))
347 + <defaultenabled>yes</defaultenabled> 347 + return -1;
348 </member> 348 +
349 <member name="app_saycounted" displayname="Decline words according to channel language" remove_on_change="apps/app_saycounted.o apps/app_saycounted.so"> 349 /* Destination context */
350 - <defaultenabled>no</defaultenabled> 350 if (!rc_avpair_add(rh, tosend, PW_AST_DST_CTX, &cdr->dcontext, strlen(cdr->dcontext), VENDOR_CODE))
351 + <defaultenabled>yes</defaultenabled> 351 return -1;
352 </member> 352 @@ -164,6 +172,10 @@
353 <member name="app_sayunixtime" displayname="Say time" remove_on_change="apps/app_sayunixtime.o apps/app_sayunixtime.so"> 353 if (!rc_avpair_add(rh, tosend, PW_AST_BILL_SEC, &cdr->billsec, 0, VENDOR_CODE))
354 </member> 354 return -1;
355 Index: build_tools/cflags.xml 355
356 diff -Nau build_tools/cflags.xml.orig build_tools/cflags.xml 356 + /* RADIUS standard identifier patch */
357 --- build_tools/cflags.xml.orig 2010-02-16 16:36:53.000000000 +0100 357 + if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_TIME, &cdr->billsec, 0, 0))
358 +++ build_tools/cflags.xml 2011-05-23 17:35:28.348531751 +0200 358 + return -1;
359 @@ -26,10 +26,11 @@ 359 +
360 <member name="RADIO_RELAX" displayname="Relax DTMF for Radio Applications"> 360 /* Disposition */
361 </member> 361 tmp = ast_cdr_disp2str(cdr->disposition);
362 <member name="G711_NEW_ALGORITHM" displayname="Use the NEW ulaw/alaw codecs (slower, but cleaner)"> 362 if (!rc_avpair_add(rh, tosend, PW_AST_DISPOSITION, tmp, strlen(tmp), VENDOR_CODE))
363 - <defaultenabled>no</defaultenabled> 363 @@ -187,10 +199,14 @@
364 + <defaultenabled>yes</defaultenabled> 364 }
365 </member> 365
366 <member name="G711_REDUCED_BRANCHING" displayname="New ulaw/alaw codec, reduced branching (might help it run faster in some architectures)"> 366 /* Setting Acct-Session-Id & User-Name attributes for proper generation
367 <depend>G711_NEW_ALGORITHM</depend> 367 - of Acct-Unique-Session-Id on server side */
368 + <defaultenabled>yes</defaultenabled> 368 - /* Channel */
369 </member> 369 - if (!rc_avpair_add(rh, tosend, PW_USER_NAME, &cdr->channel, strlen(cdr->channel), 0))
370 <member name="TEST_CODING_TABLES" displayname="New ulaw/alaw codec, turn on table tests on init"> 370 - return -1;
371 <depend>G711_NEW_ALGORITHM</depend> 371 + of Acct-Unique-Session-Id on server side Channel */
372 Index: chan_capi-1.1.5.919/chan_capi20.h 372 + {
373 diff -Nau chan_capi-1.1.5.919/chan_capi20.h.orig chan_capi-1.1.5.919/chan_capi20.h 373 + char szChanuser[PATH_MAX] = {0};
374 --- chan_capi-1.1.5.919/chan_capi20.h.orig 2011-01-07 02:29:32.000000000 +0100 374 + strncpy(szChanuser, &cdr->channel, PATH_MAX-1);
375 +++ chan_capi-1.1.5.919/chan_capi20.h 2011-05-23 17:35:28.348531751 +0200 375 + *(strrchr(szChanuser, '-')) = 0;
376 + if (!rc_avpair_add(rh, tosend, PW_USER_NAME, szChanuser, strlen(cdr->channel), 0))
377 + return -1;
378 + }
379
380 /* Unique ID */
381 if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_ID, &cdr->uniqueid, strlen(cdr->uniqueid), 0))
382 Index: chan_capi-1.1.5.20110914/chan_capi20.h
383 diff -Nau chan_capi-1.1.5.20110914/chan_capi20.h.orig chan_capi-1.1.5.20110914/chan_capi20.h
384 --- chan_capi-1.1.5.20110914/chan_capi20.h.orig 2011-01-07 02:29:32.000000000 +0100
385 +++ chan_capi-1.1.5.20110914/chan_capi20.h 2011-05-23 17:35:28.348531751 +0200
376 @@ -4,10 +4,13 @@ 386 @@ -4,10 +4,13 @@
377 * first. Else the checks below will fail. 387 * first. Else the checks below will fail.
378 */ 388 */
379 389
380 +#include <stddef.h> 390 +#include <stddef.h>
394 +#endif 404 +#endif
395 + 405 +
396 #ifndef HEADER_CID 406 #ifndef HEADER_CID
397 #define HEADER_CID(x) ((x)->adr.adrNCCI) 407 #define HEADER_CID(x) ((x)->adr.adrNCCI)
398 #endif 408 #endif
399 Index: chan_capi-1.1.5.919/chan_capi_utils.c 409 Index: chan_capi-1.1.5.20110914/chan_capi_utils.c
400 diff -Nau chan_capi-1.1.5.919/chan_capi_utils.c.orig chan_capi-1.1.5.919/chan_capi_utils.c 410 diff -Nau chan_capi-1.1.5.20110914/chan_capi_utils.c.orig chan_capi-1.1.5.20110914/chan_capi_utils.c
401 --- chan_capi-1.1.5.919/chan_capi_utils.c.orig 2011-01-07 02:29:32.000000000 +0100 411 --- chan_capi-1.1.5.20110914/chan_capi_utils.c.orig 2011-01-07 02:29:32.000000000 +0100
402 +++ chan_capi-1.1.5.919/chan_capi_utils.c 2011-05-23 17:35:28.348531751 +0200 412 +++ chan_capi-1.1.5.20110914/chan_capi_utils.c 2011-05-23 17:35:28.348531751 +0200
403 @@ -1155,6 +1155,9 @@ 413 @@ -1158,6 +1158,9 @@
404 { 414 {
405 MESSAGE_EXCHANGE_ERROR error; 415 MESSAGE_EXCHANGE_ERROR error;
406 int waitcount = 50; 416 int waitcount = 50;
407 +#ifndef CAPI_MANUFACTURER_LEN 417 +#ifndef CAPI_MANUFACTURER_LEN
408 +#define CAPI_MANUFACTURER_LEN 64 418 +#define CAPI_MANUFACTURER_LEN 64
409 +#endif 419 +#endif
410 unsigned char manbuf[CAPI_MANUFACTURER_LEN]; 420 unsigned char manbuf[CAPI_MANUFACTURER_LEN];
411 _cmsg CMSG; 421 _cmsg CMSG;
412 422
413 Index: chan_capi-1.1.5.919/libcapi20/capi20.c 423 Index: chan_capi-1.1.5.20110914/libcapi20/capi20.c
414 diff -Nau chan_capi-1.1.5.919/libcapi20/capi20.c.orig chan_capi-1.1.5.919/libcapi20/capi20.c 424 diff -Nau chan_capi-1.1.5.20110914/libcapi20/capi20.c.orig chan_capi-1.1.5.20110914/libcapi20/capi20.c
415 --- chan_capi-1.1.5.919/libcapi20/capi20.c.orig 2011-01-07 02:29:31.000000000 +0100 425 --- chan_capi-1.1.5.20110914/libcapi20/capi20.c.orig 2011-01-07 02:29:31.000000000 +0100
416 +++ chan_capi-1.1.5.919/libcapi20/capi20.c 2011-05-23 17:35:28.348531751 +0200 426 +++ chan_capi-1.1.5.20110914/libcapi20/capi20.c 2011-05-23 17:35:28.348531751 +0200
417 @@ -19,8 +19,10 @@ 427 @@ -19,8 +19,10 @@
418 #include <stdio.h> 428 #include <stdio.h>
419 #include <ctype.h> 429 #include <ctype.h>
420 #include <assert.h> 430 #include <assert.h>
421 +#ifdef __linux__ 431 +#ifdef __linux__
705 return CapiNoError; 715 return CapiNoError;
706 +#endif 716 +#endif
707 } 717 }
708 /* 718 /*
709 * functions added to the CAPI2.0 spec 719 * functions added to the CAPI2.0 spec
710 Index: chan_capi-1.1.5.919/libcapi20/convert.c 720 Index: chan_capi-1.1.5.20110914/libcapi20/convert.c
711 diff -Nau chan_capi-1.1.5.919/libcapi20/convert.c.orig chan_capi-1.1.5.919/libcapi20/convert.c 721 diff -Nau chan_capi-1.1.5.20110914/libcapi20/convert.c.orig chan_capi-1.1.5.20110914/libcapi20/convert.c
712 --- chan_capi-1.1.5.919/libcapi20/convert.c.orig 2011-01-07 02:29:31.000000000 +0100 722 --- chan_capi-1.1.5.20110914/libcapi20/convert.c.orig 2011-01-07 02:29:31.000000000 +0100
713 +++ chan_capi-1.1.5.919/libcapi20/convert.c 2011-05-23 17:35:28.348531751 +0200 723 +++ chan_capi-1.1.5.20110914/libcapi20/convert.c 2011-05-23 17:35:28.348531751 +0200
714 @@ -11,7 +11,14 @@ 724 @@ -11,7 +11,14 @@
715 #include <stddef.h> 725 #include <stddef.h>
716 #include <time.h> 726 #include <time.h>
717 #include <ctype.h> 727 #include <ctype.h>
718 +#ifdef __FreeBSD__ 728 +#ifdef __FreeBSD__
724 #include <byteswap.h> 734 #include <byteswap.h>
725 +#endif 735 +#endif
726 736
727 #include "capi20.h" 737 #include "capi20.h"
728 738
729 Index: chan_capi-1.1.5.919/Makefile 739 Index: chan_capi-1.1.5.20110914/Makefile
730 diff -Nau chan_capi-1.1.5.919/Makefile.orig chan_capi-1.1.5.919/Makefile 740 diff -Nau chan_capi-1.1.5.20110914/Makefile.orig chan_capi-1.1.5.20110914/Makefile
731 --- chan_capi-1.1.5.919/Makefile.orig 2011-01-07 02:29:32.000000000 +0100 741 --- chan_capi-1.1.5.20110914/Makefile.orig 2011-01-07 02:29:32.000000000 +0100
732 +++ chan_capi-1.1.5.919/Makefile 2011-05-23 17:35:28.348531751 +0200 742 +++ chan_capi-1.1.5.20110914/Makefile 2011-05-23 17:35:28.348531751 +0200
733 @@ -111,6 +111,9 @@ 743 @@ -114,6 +114,9 @@
734 CFLAGS+=-O2 744 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) 745 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) 746 CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi)
737 +ifeq (${USE_OWN_LIBCAPI},yes) 747 +ifeq (${USE_OWN_LIBCAPI},yes)
738 +CFLAGS+=-DUSE_OWN_LIBCAPI 748 +CFLAGS+=-DUSE_OWN_LIBCAPI
740 ifeq (${DIVA_STREAMING},1) 750 ifeq (${DIVA_STREAMING},1)
741 CFLAGS += -DDIVA_STREAMING=1 751 CFLAGS += -DDIVA_STREAMING=1
742 endif 752 endif
743 Index: channels/chan_sip.c 753 Index: channels/chan_sip.c
744 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c 754 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c
745 --- channels/chan_sip.c.orig 2011-04-25 17:11:30.000000000 +0200 755 --- channels/chan_sip.c.orig 2011-08-10 00:12:59.000000000 +0200
746 +++ channels/chan_sip.c 2011-05-23 17:35:28.358543497 +0200 756 +++ channels/chan_sip.c 2011-09-14 14:29:50.757959000 +0200
747 @@ -11458,7 +11458,16 @@ 757 @@ -11647,7 +11647,16 @@
748 } else { 758 } else {
749 if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { 759 if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
750 /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */ 760 /* 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); 761 - 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:"))) 762 + if (strncasecmp(p->uri, "sip:", strlen("sip:")))
763 /* If there is a VXML URL append it to the SIP URL */ 773 /* 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); 774 snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url);
765 Index: channels/console_video.h 775 Index: channels/console_video.h
766 diff -Nau channels/console_video.h.orig channels/console_video.h 776 diff -Nau channels/console_video.h.orig channels/console_video.h
767 --- channels/console_video.h.orig 2008-06-30 17:45:15.000000000 +0200 777 --- channels/console_video.h.orig 2008-06-30 17:45:15.000000000 +0200
768 +++ channels/console_video.h 2011-05-23 17:35:28.358543497 +0200 778 +++ channels/console_video.h 2011-09-14 14:29:50.767970949 +0200
769 @@ -28,10 +28,7 @@ 779 @@ -28,10 +28,7 @@
770 "console {device}" 780 "console {device}"
771 #else 781 #else
772 782
773 -#include <ffmpeg/avcodec.h> 783 -#include <ffmpeg/avcodec.h>
778 788
779 #define CONSOLE_VIDEO_CMDS \ 789 #define CONSOLE_VIDEO_CMDS \
780 "console {videodevice|videocodec" \ 790 "console {videodevice|videocodec" \
781 Index: configure 791 Index: configure
782 diff -Nau configure.orig configure 792 diff -Nau configure.orig configure
783 --- configure.orig 2011-01-27 18:03:01.000000000 +0100 793 --- configure.orig 2011-08-25 21:08:04.000000000 +0200
784 +++ configure 2011-05-23 17:41:08.331029717 +0200 794 +++ configure 2011-09-14 14:29:50.767970949 +0200
785 @@ -4704,11 +4704,6 @@ 795 @@ -4704,11 +4704,6 @@
786 esac 796 esac
787 797
788 case "${host_os}" in 798 case "${host_os}" in
789 - freebsd*) 799 - freebsd*)
792 - LDFLAGS=-L/usr/local/lib 802 - LDFLAGS=-L/usr/local/lib
793 - ;; 803 - ;;
794 openbsd*) 804 openbsd*)
795 ac_default_prefix=/usr/local 805 ac_default_prefix=/usr/local
796 if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then 806 if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then
797 @@ -18203,8 +18198,8 @@ 807 @@ -18308,8 +18303,8 @@
798 if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then 808 if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
799 imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS` 809 imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
800 fi 810 fi
801 - imap_libs="${IMAP_TK_DIR}/c-client/c-client.a" 811 - imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
802 - imap_include="-I${IMAP_TK_DIR}/c-client" 812 - imap_include="-I${IMAP_TK_DIR}/c-client"
803 + imap_libs="-limap -lssl -lcrypto -lcrypt" 813 + imap_libs="-limap -lssl -lcrypto -lcrypt"
804 + imap_include="-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap" 814 + imap_include="-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap"
805 CPPFLAGS="${CPPFLAGS} ${imap_include}" 815 CPPFLAGS="${CPPFLAGS} ${imap_include}"
806 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}` 816 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
808 @@ -25436,19 +25431,19 @@ 818 @@ -25541,19 +25536,19 @@
809 819
810 # now check for the header. 820 # now check for the header.
811 if test "${AST_LUA_FOUND}" = "yes"; then 821 if test "${AST_LUA_FOUND}" = "yes"; then
812 - LUA_LIB="${pbxlibdir} -llua5.1 -lm" 822 - LUA_LIB="${pbxlibdir} -llua5.1 -lm"
813 + LUA_LIB="${pbxlibdir} -llua -lm" 823 + LUA_LIB="${pbxlibdir} -llua -lm"
827 + ac_fn_c_check_header_mongrel "$LINENO" "lua/lua.h" "ac_cv_header_lua_lua_h" "$ac_includes_default" 837 + ac_fn_c_check_header_mongrel "$LINENO" "lua/lua.h" "ac_cv_header_lua_lua_h" "$ac_includes_default"
828 +if test "x$ac_cv_header_lua_lua_h" = x""yes; then : 838 +if test "x$ac_cv_header_lua_lua_h" = x""yes; then :
829 LUA_HEADER_FOUND=1 839 LUA_HEADER_FOUND=1
830 else 840 else
831 LUA_HEADER_FOUND=0 841 LUA_HEADER_FOUND=0
832 @@ -25476,9 +25471,9 @@ 842 @@ -25581,9 +25576,9 @@
833 843
834 if test "x${PBX_LUA}" = "x1" ; then 844 if test "x${PBX_LUA}" = "x1" ; then
835 if test x"${LUA_DIR}" = x; then 845 if test x"${LUA_DIR}" = x; then
836 - LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1" 846 - LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1"
837 + LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua" 847 + LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua"
839 - LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1" 849 - LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1"
840 + LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua" 850 + LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua"
841 fi 851 fi
842 fi 852 fi
843 853
844 @@ -26157,7 +26152,7 @@ 854 @@ -26262,7 +26257,7 @@
845 pbxlibdir="-L${SQLITE_DIR}" 855 pbxlibdir="-L${SQLITE_DIR}"
846 fi 856 fi
847 fi 857 fi
848 - pbxfuncname="sqlite_exec" 858 - pbxfuncname="sqlite_exec"
849 + pbxfuncname="sqlite3_exec" 859 + pbxfuncname="sqlite3_exec"
850 if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers 860 if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
851 AST_SQLITE_FOUND=yes 861 AST_SQLITE_FOUND=yes
852 else 862 else
853 @@ -26867,16 +26862,16 @@ 863 @@ -26976,16 +26971,16 @@
854 if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then 864 if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
855 PBX_GMIME=0 865 PBX_GMIME=0
856 if test -n "$ac_tool_prefix"; then 866 if test -n "$ac_tool_prefix"; then
857 - # Extract the first word of "${ac_tool_prefix}gmime-config", so it can be a program name with args. 867 - # Extract the first word of "${ac_tool_prefix}gmime-config", so it can be a program name with args.
858 -set dummy ${ac_tool_prefix}gmime-config; ac_word=$2 868 -set dummy ${ac_tool_prefix}gmime-config; ac_word=$2
870 - ac_cv_path_CONFIG_GMIME="$CONFIG_GMIME" # Let the user override the test with a path. 880 - ac_cv_path_CONFIG_GMIME="$CONFIG_GMIME" # Let the user override the test with a path.
871 + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. 881 + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
872 ;; 882 ;;
873 *) 883 *)
874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
875 @@ -26887,7 +26882,7 @@ 885 @@ -26996,7 +26991,7 @@
876 test -z "$as_dir" && as_dir=. 886 test -z "$as_dir" && as_dir=.
877 for ac_exec_ext in '' $ac_executable_extensions; do 887 for ac_exec_ext in '' $ac_executable_extensions; do
878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 888 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
879 - ac_cv_path_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext" 889 - ac_cv_path_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext"
880 + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" 890 + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
882 break 2 892 break 2
883 fi 893 fi
884 @@ -26898,10 +26893,10 @@ 894 @@ -27007,10 +27002,10 @@
885 ;; 895 ;;
886 esac 896 esac
887 fi 897 fi
888 -CONFIG_GMIME=$ac_cv_path_CONFIG_GMIME 898 -CONFIG_GMIME=$ac_cv_path_CONFIG_GMIME
889 -if test -n "$CONFIG_GMIME"; then 899 -if test -n "$CONFIG_GMIME"; then
894 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 904 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
895 +$as_echo "$PKGCONFIG" >&6; } 905 +$as_echo "$PKGCONFIG" >&6; }
896 else 906 else
897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
898 $as_echo "no" >&6; } 908 $as_echo "no" >&6; }
899 @@ -26909,18 +26904,18 @@ 909 @@ -27018,18 +27013,18 @@
900 910
901 911
902 fi 912 fi
903 -if test -z "$ac_cv_path_CONFIG_GMIME"; then 913 -if test -z "$ac_cv_path_CONFIG_GMIME"; then
904 - ac_pt_CONFIG_GMIME=$CONFIG_GMIME 914 - ac_pt_CONFIG_GMIME=$CONFIG_GMIME
920 - ac_cv_path_ac_pt_CONFIG_GMIME="$ac_pt_CONFIG_GMIME" # Let the user override the test with a path. 930 - ac_cv_path_ac_pt_CONFIG_GMIME="$ac_pt_CONFIG_GMIME" # Let the user override the test with a path.
921 + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. 931 + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
922 ;; 932 ;;
923 *) 933 *)
924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
925 @@ -26931,7 +26926,7 @@ 935 @@ -27040,7 +27035,7 @@
926 test -z "$as_dir" && as_dir=. 936 test -z "$as_dir" && as_dir=.
927 for ac_exec_ext in '' $ac_executable_extensions; do 937 for ac_exec_ext in '' $ac_executable_extensions; do
928 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 938 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
929 - ac_cv_path_ac_pt_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext" 939 - ac_cv_path_ac_pt_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext"
930 + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" 940 + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
932 break 2 942 break 2
933 fi 943 fi
934 @@ -26942,17 +26937,17 @@ 944 @@ -27051,17 +27046,17 @@
935 ;; 945 ;;
936 esac 946 esac
937 fi 947 fi
938 -ac_pt_CONFIG_GMIME=$ac_cv_path_ac_pt_CONFIG_GMIME 948 -ac_pt_CONFIG_GMIME=$ac_cv_path_ac_pt_CONFIG_GMIME
939 -if test -n "$ac_pt_CONFIG_GMIME"; then 949 -if test -n "$ac_pt_CONFIG_GMIME"; then
953 + if test "x$ac_pt_PKGCONFIG" = x; then 963 + if test "x$ac_pt_PKGCONFIG" = x; then
954 + PKGCONFIG="No" 964 + PKGCONFIG="No"
955 else 965 else
956 case $cross_compiling:$ac_tool_warned in 966 case $cross_compiling:$ac_tool_warned in
957 yes:) 967 yes:)
958 @@ -26960,17 +26955,15 @@ 968 @@ -27069,17 +27064,15 @@
959 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 969 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
960 ac_tool_warned=yes ;; 970 ac_tool_warned=yes ;;
961 esac 971 esac
962 - CONFIG_GMIME=$ac_pt_CONFIG_GMIME 972 - CONFIG_GMIME=$ac_pt_CONFIG_GMIME
963 + PKGCONFIG=$ac_pt_PKGCONFIG 973 + PKGCONFIG=$ac_pt_PKGCONFIG
978 if test x"#include <gmime/gmime.h>" != x ; then 988 if test x"#include <gmime/gmime.h>" != x ; then
979 saved_cppflags="${CPPFLAGS}" 989 saved_cppflags="${CPPFLAGS}"
980 if test "x${GMIME_DIR}" != "x"; then 990 if test "x${GMIME_DIR}" != "x"; then
981 Index: formats/format_pcm.c 991 Index: formats/format_pcm.c
982 diff -Nau formats/format_pcm.c.orig formats/format_pcm.c 992 diff -Nau formats/format_pcm.c.orig formats/format_pcm.c
983 --- formats/format_pcm.c.orig 2010-07-26 05:27:06.000000000 +0200 993 --- formats/format_pcm.c.orig 2011-07-14 22:13:06.000000000 +0200
984 +++ formats/format_pcm.c 2011-05-23 17:35:28.368530778 +0200 994 +++ formats/format_pcm.c 2011-09-14 14:29:50.767970949 +0200
985 @@ -350,6 +350,7 @@ 995 @@ -354,6 +354,7 @@
986 ast_log(LOG_WARNING, "Unable to write header\n"); 996 ast_log(LOG_WARNING, "Unable to write header\n");
987 return -1; 997 return -1;
988 } 998 }
989 + fflush(f); /* issues.asterisk.org bug 0016610 */ 999 + fflush(f); /* issues.asterisk.org bug 0016610 */
990 return 0; 1000 return 0;
991 } 1001 }
992 1002
993 Index: formats/format_wav.c 1003 Index: formats/format_wav.c
994 diff -Nau formats/format_wav.c.orig formats/format_wav.c 1004 diff -Nau formats/format_wav.c.orig formats/format_wav.c
995 --- formats/format_wav.c.orig 2010-09-02 18:43:09.000000000 +0200 1005 --- formats/format_wav.c.orig 2011-07-29 19:18:56.000000000 +0200
996 +++ formats/format_wav.c 2011-05-23 17:35:28.368530778 +0200 1006 +++ formats/format_wav.c 2011-09-14 14:29:50.767970949 +0200
997 @@ -310,6 +310,7 @@ 1007 @@ -308,6 +308,7 @@
998 ast_log(LOG_WARNING, "Unable to write header\n"); 1008 ast_log(LOG_WARNING, "Unable to write header\n");
999 return -1; 1009 return -1;
1000 } 1010 }
1001 + fflush(f); /* issues.asterisk.org bug 0016610 */ 1011 + fflush(f); /* issues.asterisk.org bug 0016610 */
1002 return 0; 1012 return 0;
1003 } 1013 }
1004 1014
1005 Index: formats/format_wav_gsm.c 1015 Index: formats/format_wav_gsm.c
1006 diff -Nau formats/format_wav_gsm.c.orig formats/format_wav_gsm.c 1016 diff -Nau formats/format_wav_gsm.c.orig formats/format_wav_gsm.c
1007 --- formats/format_wav_gsm.c.orig 2010-07-26 05:27:06.000000000 +0200 1017 --- formats/format_wav_gsm.c.orig 2011-07-14 22:13:06.000000000 +0200
1008 +++ formats/format_wav_gsm.c 2011-05-23 17:35:28.368530778 +0200 1018 +++ formats/format_wav_gsm.c 2011-09-14 14:29:50.767970949 +0200
1009 @@ -362,6 +362,7 @@ 1019 @@ -366,6 +366,7 @@
1010 ast_log(LOG_WARNING, "Unable to write header\n"); 1020 ast_log(LOG_WARNING, "Unable to write header\n");
1011 return -1; 1021 return -1;
1012 } 1022 }
1013 + fflush(f); /* issues.asterisk.org bug 0016610 */ 1023 + fflush(f); /* issues.asterisk.org bug 0016610 */
1014 return 0; 1024 return 0;
1015 } 1025 }
1016 1026
1017 Index: main/db1-ast/hash/hash.h 1027 Index: main/db1-ast/hash/hash.h
1018 diff -Nau main/db1-ast/hash/hash.h.orig main/db1-ast/hash/hash.h 1028 diff -Nau main/db1-ast/hash/hash.h.orig main/db1-ast/hash/hash.h
1019 --- main/db1-ast/hash/hash.h.orig 2006-08-21 04:11:39.000000000 +0200 1029 --- main/db1-ast/hash/hash.h.orig 2006-08-21 04:11:39.000000000 +0200
1020 +++ main/db1-ast/hash/hash.h 2011-05-23 17:35:28.368530778 +0200 1030 +++ main/db1-ast/hash/hash.h 2011-09-14 14:29:50.767970949 +0200
1021 @@ -36,6 +36,8 @@ 1031 @@ -36,6 +36,8 @@
1022 * @(#)hash.h 8.3 (Berkeley) 5/31/94 1032 * @(#)hash.h 8.3 (Berkeley) 5/31/94
1023 */ 1033 */
1024 1034
1025 +#include <stdint.h> 1035 +#include <stdint.h>
1028 typedef enum { 1038 typedef enum {
1029 HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT 1039 HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT
1030 Index: main/db1-ast/hash/ndbm.c 1040 Index: main/db1-ast/hash/ndbm.c
1031 diff -Nau main/db1-ast/hash/ndbm.c.orig main/db1-ast/hash/ndbm.c 1041 diff -Nau main/db1-ast/hash/ndbm.c.orig main/db1-ast/hash/ndbm.c
1032 --- main/db1-ast/hash/ndbm.c.orig 2006-08-21 04:11:39.000000000 +0200 1042 --- main/db1-ast/hash/ndbm.c.orig 2006-08-21 04:11:39.000000000 +0200
1033 +++ main/db1-ast/hash/ndbm.c 2011-05-23 17:35:28.368530778 +0200 1043 +++ main/db1-ast/hash/ndbm.c 2011-09-14 14:29:50.767970949 +0200
1034 @@ -49,7 +49,8 @@ 1044 @@ -49,7 +49,8 @@
1035 #include <string.h> 1045 #include <string.h>
1036 #include <stdlib.h> 1046 #include <stdlib.h>
1037 1047
1038 -#include <ndbm.h> 1048 -#include <ndbm.h>
1041 #include "hash.h" 1051 #include "hash.h"
1042 1052
1043 /* 1053 /*
1044 Index: main/features.c 1054 Index: main/features.c
1045 diff -Nau main/features.c.orig main/features.c 1055 diff -Nau main/features.c.orig main/features.c
1046 --- main/features.c.orig 2011-02-09 20:52:51.000000000 +0100 1056 --- main/features.c.orig 2011-08-10 00:12:59.000000000 +0200
1047 +++ main/features.c 2011-05-23 17:35:28.368530778 +0200 1057 +++ main/features.c 2011-09-14 14:29:50.777958246 +0200
1048 @@ -1658,6 +1658,10 @@ 1058 @@ -1646,6 +1646,10 @@
1049 snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); 1059 snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
1050 } 1060 }
1051 1061
1052 + for(x = 0; x < strlen(touch_filename); x++) { 1062 + for(x = 0; x < strlen(touch_filename); x++) {
1053 + if (args[x] == '/') 1063 + if (args[x] == '/')
1054 + args[x] = '-'; 1064 + args[x] = '-';
1055 + } 1065 + }
1056 for(x = 0; x < strlen(args); x++) { 1066 for(x = 0; x < strlen(args); x++) {
1057 if (args[x] == '/') 1067 if (args[x] == '/')
1058 args[x] = '-'; 1068 args[x] = '-';
1059 @@ -1774,6 +1778,10 @@ 1069 @@ -1762,6 +1766,10 @@
1060 snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); 1070 snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav"));
1061 } 1071 }
1062 1072
1063 + for( x = 0; x < strlen(touch_filename); x++) { 1073 + for( x = 0; x < strlen(touch_filename); x++) {
1064 + if (args[x] == '/') 1074 + if (args[x] == '/')
1067 for( x = 0; x < strlen(args); x++) { 1077 for( x = 0; x < strlen(args); x++) {
1068 if (args[x] == '/') 1078 if (args[x] == '/')
1069 args[x] = '-'; 1079 args[x] = '-';
1070 Index: main/file.c 1080 Index: main/file.c
1071 diff -Nau main/file.c.orig main/file.c 1081 diff -Nau main/file.c.orig main/file.c
1072 --- main/file.c.orig 2011-01-26 02:26:26.000000000 +0100 1082 --- main/file.c.orig 2011-07-05 15:23:57.000000000 +0200
1073 +++ main/file.c 2011-05-23 17:35:28.378531576 +0200 1083 +++ main/file.c 2011-09-14 14:29:50.777958246 +0200
1074 @@ -255,7 +255,7 @@ 1084 @@ -256,7 +256,7 @@
1075 char *fn = NULL; 1085 char *fn = NULL;
1076 1086
1077 if (!strcmp(ext, "wav49")) 1087 if (!strcmp(ext, "wav49"))
1078 - ext = "WAV"; 1088 - ext = "WAV";
1079 + ext = "wav"; 1089 + ext = "wav";
1080 1090
1081 if (filename[0] == '/') { 1091 if (filename[0] == '/') {
1082 if (asprintf(&fn, "%s.%s", filename, ext) < 0) { 1092 if (asprintf(&fn, "%s.%s", filename, ext) < 0) {
1083 Index: main/Makefile 1093 Index: main/Makefile
1084 diff -Nau main/Makefile.orig main/Makefile 1094 diff -Nau main/Makefile.orig main/Makefile
1085 --- main/Makefile.orig 2010-12-18 00:52:04.000000000 +0100 1095 --- main/Makefile.orig 2011-08-03 17:14:36.000000000 +0200
1086 +++ main/Makefile 2011-05-23 17:35:28.378531576 +0200 1096 +++ main/Makefile 2011-09-14 14:29:50.777958246 +0200
1087 @@ -69,10 +69,7 @@ 1097 @@ -69,10 +69,7 @@
1088 endif 1098 endif
1089 1099
1090 ifeq ($(OSARCH),FreeBSD) 1100 ifeq ($(OSARCH),FreeBSD)
1091 - # -V is understood by BSD Make, not by GNU make. 1101 - # -V is understood by BSD Make, not by GNU make.
1096 endif 1106 endif
1097 1107
1098 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) 1108 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
1099 Index: main/tcptls.c 1109 Index: main/tcptls.c
1100 diff -Nau main/tcptls.c.orig main/tcptls.c 1110 diff -Nau main/tcptls.c.orig main/tcptls.c
1101 --- main/tcptls.c.orig 2011-04-25 17:11:30.000000000 +0200 1111 --- main/tcptls.c.orig 2011-05-23 18:18:33.000000000 +0200
1102 +++ main/tcptls.c 2011-05-23 17:35:28.378531576 +0200 1112 +++ main/tcptls.c 2011-09-14 14:29:50.777958246 +0200
1103 @@ -353,6 +353,7 @@ 1113 @@ -357,6 +357,7 @@
1104 if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { 1114 if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) {
1105 if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) 1115 if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0)
1106 ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); 1116 ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath);
1107 + SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL)); 1117 + SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL));
1108 } 1118 }
1109 1119
1110 ast_verb(0, "SSL certificate ok\n"); 1120 ast_verb(0, "SSL certificate ok\n");
1111 Index: main/udptl.c 1121 Index: main/udptl.c
1112 diff -Nau main/udptl.c.orig main/udptl.c 1122 diff -Nau main/udptl.c.orig main/udptl.c
1113 --- main/udptl.c.orig 2011-02-21 16:02:20.000000000 +0100 1123 --- main/udptl.c.orig 2011-05-03 21:55:49.000000000 +0200
1114 +++ main/udptl.c 2011-05-23 17:35:28.378531576 +0200 1124 +++ main/udptl.c 2011-09-14 14:29:50.777958246 +0200
1115 @@ -98,6 +98,18 @@ 1125 @@ -98,6 +98,18 @@
1116 1126
1117 #define UDPTL_BUF_MASK 15 1127 #define UDPTL_BUF_MASK 15
1118 1128
1119 +/*! Copied from chan_oss.c, corrects link errors: 1129 +/*! Copied from chan_oss.c, corrects link errors:
1131 typedef struct { 1141 typedef struct {
1132 int buf_len; 1142 int buf_len;
1133 uint8_t buf[LOCAL_FAX_MAX_DATAGRAM]; 1143 uint8_t buf[LOCAL_FAX_MAX_DATAGRAM];
1134 Index: Makefile 1144 Index: Makefile
1135 diff -Nau Makefile.orig Makefile 1145 diff -Nau Makefile.orig Makefile
1136 --- Makefile.orig 2011-02-01 19:02:06.000000000 +0100 1146 --- Makefile.orig 2011-08-25 21:08:04.000000000 +0200
1137 +++ Makefile 2011-05-23 17:35:28.378531576 +0200 1147 +++ Makefile 2011-09-14 14:29:50.777958246 +0200
1138 @@ -230,15 +230,6 @@ 1148 @@ -230,15 +230,6 @@
1139 _ASTCFLAGS+=-fsigned-char 1149 _ASTCFLAGS+=-fsigned-char
1140 endif 1150 endif
1141 1151
1142 -ifeq ($(OSARCH),FreeBSD) 1152 -ifeq ($(OSARCH),FreeBSD)
1149 -endif 1159 -endif
1150 - 1160 -
1151 ifeq ($(OSARCH),NetBSD) 1161 ifeq ($(OSARCH),NetBSD)
1152 _ASTCFLAGS+=-pthread -I/usr/pkg/include 1162 _ASTCFLAGS+=-pthread -I/usr/pkg/include
1153 endif 1163 endif
1154 Index: menuselect-tree
1155 diff -Nau menuselect-tree.orig menuselect-tree
1156 --- menuselect-tree.orig 2011-05-09 22:22:55.000000000 +0200
1157 +++ menuselect-tree 2011-05-23 17:35:28.378531576 +0200
1158 @@ -38,6 +38,8 @@
1159 </member>
1160 <member name="app_authenticate" displayname="Authentication Application" remove_on_change="apps/app_authenticate.o apps/app_authenticate.so">
1161 </member>
1162 +<member name="app_backticks" displayname="BACKTICKS() dialplan function" remove_on_change="apps/app_backticks.o apps/app_backticks.so">
1163 +</member>
1164 <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">
1165 </member>
1166 <member name="app_celgenuserevent" displayname="Generate an User-Defined CEL event" remove_on_change="apps/app_celgenuserevent.o apps/app_celgenuserevent.so">
1167 @@ -937,11 +939,11 @@
1168 <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format">
1169 </member>
1170 <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" >
1171 - <defaultenabled>yes</defaultenabled>
1172 </member>
1173 <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format">
1174 </member>
1175 <member name="CORE-SOUNDS-EN-G722" displayname="English, G.722 format">
1176 + <defaultenabled>yes</defaultenabled>
1177 </member>
1178 <member name="CORE-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
1179 </member>
1180 @@ -1006,7 +1008,6 @@
1181 </category>
1182 <category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes">
1183 <member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" >
1184 - <defaultenabled>yes</defaultenabled>
1185 </member>
1186 <member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" >
1187 </member>
1188 @@ -1017,6 +1018,7 @@
1189 <member name="MOH-OPSOUND-G729" displayname="opsound.org Music On Hold Files, G.729 format" >
1190 </member>
1191 <member name="MOH-OPSOUND-G722" displayname="opsound.org Music On Hold Files, G.722 format" >
1192 + <defaultenabled>yes</defaultenabled>
1193 </member>
1194 <member name="MOH-OPSOUND-SLN16" displayname="opsound.org Music On Hold Files, Signed-linear 16kHz format" >
1195 </member>
1196 @@ -1037,6 +1039,7 @@
1197 <member name="EXTRA-SOUNDS-EN-G729" displayname="English, G.729 format">
1198 </member>
1199 <member name="EXTRA-SOUNDS-EN-G722" displayname="English, G.722 format">
1200 + <defaultenabled>yes</defaultenabled>
1201 </member>
1202 <member name="EXTRA-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
1203 </member>
1204 Index: res/res_http_post.c
1205 diff -Nau res/res_http_post.c.orig res/res_http_post.c
1206 --- res/res_http_post.c.orig 2009-10-27 17:48:54.000000000 +0100
1207 +++ res/res_http_post.c 2011-05-23 17:35:28.378531576 +0200
1208 @@ -122,14 +122,8 @@
1209 ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n");
1210 return;
1211 } else if (GMIME_IS_MULTIPART(part)) {
1212 - GList *l;
1213 -
1214 - ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n");
1215 - l = GMIME_MULTIPART(part)->subparts;
1216 - while (l) {
1217 - process_message_callback(l->data, cbinfo);
1218 - l = l->next;
1219 - }
1220 + ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n");
1221 + g_mime_multipart_foreach(GMIME_MULTIPART(part), process_message_callback, cbinfo);
1222 } else if (GMIME_IS_PART(part)) {
1223 const char *filename;
1224
1225 Index: sounds/sounds.xml
1226 diff -Nau sounds/sounds.xml.orig sounds/sounds.xml
1227 --- sounds/sounds.xml.orig 2010-10-18 23:51:23.000000000 +0200
1228 +++ sounds/sounds.xml 2011-05-23 17:35:28.378531576 +0200
1229 @@ -6,11 +6,11 @@
1230 <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format">
1231 </member>
1232 <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" >
1233 - <defaultenabled>yes</defaultenabled>
1234 </member>
1235 <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format">
1236 </member>
1237 <member name="CORE-SOUNDS-EN-G722" displayname="English, G.722 format">
1238 + <defaultenabled>yes</defaultenabled>
1239 </member>
1240 <member name="CORE-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
1241 </member>
1242 @@ -75,7 +75,6 @@
1243 </category>
1244 <category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes">
1245 <member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" >
1246 - <defaultenabled>yes</defaultenabled>
1247 </member>
1248 <member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" >
1249 </member>
1250 @@ -86,6 +85,7 @@
1251 <member name="MOH-OPSOUND-G729" displayname="opsound.org Music On Hold Files, G.729 format" >
1252 </member>
1253 <member name="MOH-OPSOUND-G722" displayname="opsound.org Music On Hold Files, G.722 format" >
1254 + <defaultenabled>yes</defaultenabled>
1255 </member>
1256 <member name="MOH-OPSOUND-SLN16" displayname="opsound.org Music On Hold Files, Signed-linear 16kHz format" >
1257 </member>
1258 @@ -106,6 +106,7 @@
1259 <member name="EXTRA-SOUNDS-EN-G729" displayname="English, G.729 format">
1260 </member>
1261 <member name="EXTRA-SOUNDS-EN-G722" displayname="English, G.722 format">
1262 + <defaultenabled>yes</defaultenabled>
1263 </member>
1264 <member name="EXTRA-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format">
1265 </member>
1266 Index: cdr/cdr_radius.c
1267 diff -Nau cdr/cdr_radius.c.orig cdr/cdr_radius.c
1268 --- cdr/cdr_radius.c.orig 2010-07-20 21:35:02.000000000 +0200
1269 +++ cdr/cdr_radius.c 2011-05-23 17:35:28.378531576 +0200
1270 @@ -105,10 +105,18 @@
1271 if (!rc_avpair_add(rh, tosend, PW_AST_SRC, &cdr->src, strlen(cdr->src), VENDOR_CODE))
1272 return -1;
1273
1274 + /* RADIUS standard identifier patch */
1275 + if (!rc_avpair_add(rh, tosend, PW_CALLING_STATION_ID, &cdr->src, strlen(cdr->src), 0))
1276 + return -1;
1277 +
1278 /* Destination */
1279 if (!rc_avpair_add(rh, tosend, PW_AST_DST, &cdr->dst, strlen(cdr->dst), VENDOR_CODE))
1280 return -1;
1281
1282 + /* RADIUS standard identifier patch */
1283 + if (!rc_avpair_add(rh, tosend, PW_CALLED_STATION_ID, &cdr->dst, strlen(cdr->dst), 0))
1284 + return -1;
1285 +
1286 /* Destination context */
1287 if (!rc_avpair_add(rh, tosend, PW_AST_DST_CTX, &cdr->dcontext, strlen(cdr->dcontext), VENDOR_CODE))
1288 return -1;
1289 @@ -163,6 +171,10 @@
1290 if (!rc_avpair_add(rh, tosend, PW_AST_BILL_SEC, &cdr->billsec, 0, VENDOR_CODE))
1291 return -1;
1292
1293 + /* RADIUS standard identifier patch */
1294 + if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_TIME, &cdr->billsec, 0, 0))
1295 + return -1;
1296 +
1297 /* Disposition */
1298 tmp = ast_cdr_disp2str(cdr->disposition);
1299 if (!rc_avpair_add(rh, tosend, PW_AST_DISPOSITION, tmp, strlen(tmp), VENDOR_CODE))
1300 @@ -186,10 +198,14 @@
1301 }
1302
1303 /* Setting Acct-Session-Id & User-Name attributes for proper generation
1304 - of Acct-Unique-Session-Id on server side */
1305 - /* Channel */
1306 - if (!rc_avpair_add(rh, tosend, PW_USER_NAME, &cdr->channel, strlen(cdr->channel), 0))
1307 - return -1;
1308 + of Acct-Unique-Session-Id on server side Channel */
1309 + {
1310 + char szChanuser[PATH_MAX] = {0};
1311 + strncpy(szChanuser, &cdr->channel, PATH_MAX-1);
1312 + *(strrchr(szChanuser, '-')) = 0;
1313 + if (!rc_avpair_add(rh, tosend, PW_USER_NAME, szChanuser, strlen(cdr->channel), 0))
1314 + return -1;
1315 + }
1316
1317 /* Unique ID */
1318 if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_ID, &cdr->uniqueid, strlen(cdr->uniqueid), 0))

mercurial