Tue, 22 Mar 2011 21:30:06 +0100
Use less desirable PATH_MAX due to portability concerns of NAME_MAX.
michael@311 | 1 | Index: addons/chan_ooh323.c |
michael@311 | 2 | diff -Nau addons/chan_ooh323.c.orig addons/chan_ooh323.c |
michael@311 | 3 | --- addons/chan_ooh323.c.orig 2010-10-09 16:02:26.000000000 +0200 |
michael@311 | 4 | +++ addons/chan_ooh323.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 5 | @@ -23,6 +23,12 @@ |
michael@202 | 6 | |
michael@311 | 7 | #include "chan_ooh323.h" |
michael@311 | 8 | #include <math.h> |
michael@311 | 9 | +#if defined __SVR4 && defined __sun |
michael@311 | 10 | +#include <sys/sockio.h> |
michael@311 | 11 | +#ifndef IPTOS_MINCOST |
michael@311 | 12 | +#define IPTOS_MINCOST 0x02 |
michael@311 | 13 | +#endif |
michael@311 | 14 | +#endif |
michael@202 | 15 | |
michael@311 | 16 | #define FORMAT_STRING_SIZE 512 |
michael@202 | 17 | |
michael@311 | 18 | Index: addons/ooh323c/src/ooCmdChannel.c |
michael@311 | 19 | diff -Nau addons/ooh323c/src/ooCmdChannel.c.orig addons/ooh323c/src/ooCmdChannel.c |
michael@311 | 20 | --- addons/ooh323c/src/ooCmdChannel.c.orig 2010-03-26 00:38:58.000000000 +0100 |
michael@311 | 21 | +++ addons/ooh323c/src/ooCmdChannel.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 22 | @@ -25,6 +25,10 @@ |
michael@311 | 23 | #include "ooCalls.h" |
michael@311 | 24 | #include "ooCmdChannel.h" |
michael@311 | 25 | |
michael@311 | 26 | +#ifndef AF_LOCAL |
michael@311 | 27 | +#define AF_LOCAL AF_UNIX |
michael@311 | 28 | +#define PF_LOCAL PF_UNIX |
michael@311 | 29 | +#endif |
michael@311 | 30 | |
michael@311 | 31 | /** Global endpoint structure */ |
michael@311 | 32 | extern OOH323EndPoint gH323ep; |
michael@311 | 33 | Index: addons/ooh323c/src/ooSocket.c |
michael@311 | 34 | diff -Nau addons/ooh323c/src/ooSocket.c.orig addons/ooh323c/src/ooSocket.c |
michael@311 | 35 | --- addons/ooh323c/src/ooSocket.c.orig 2010-03-25 22:39:04.000000000 +0100 |
michael@311 | 36 | +++ addons/ooh323c/src/ooSocket.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 37 | @@ -24,6 +24,9 @@ |
michael@311 | 38 | |
michael@311 | 39 | #include "ooSocket.h" |
michael@311 | 40 | #include "ootrace.h" |
michael@311 | 41 | +#if defined __SVR4 && defined __sun |
michael@311 | 42 | +#include <sys/sockio.h> |
michael@311 | 43 | +#endif |
michael@311 | 44 | #if defined(_WIN32_WCE) |
michael@311 | 45 | static int inited = 0; |
michael@311 | 46 | #define SEND_FLAGS 0 |
michael@311 | 47 | Index: addons/ooh323cDriver.c |
michael@311 | 48 | diff -Nau addons/ooh323cDriver.c.orig addons/ooh323cDriver.c |
michael@311 | 49 | --- addons/ooh323cDriver.c.orig 2010-03-26 00:38:58.000000000 +0100 |
michael@311 | 50 | +++ addons/ooh323cDriver.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 51 | @@ -27,6 +27,11 @@ |
michael@311 | 52 | |
michael@311 | 53 | #define SEC_TO_HOLD_THREAD 24 |
michael@311 | 54 | |
michael@311 | 55 | +#ifndef AF_LOCAL |
michael@311 | 56 | +#define AF_LOCAL AF_UNIX |
michael@311 | 57 | +#define PF_LOCAL PF_UNIX |
michael@311 | 58 | +#endif |
michael@311 | 59 | + |
michael@311 | 60 | extern struct ast_module *myself; |
michael@311 | 61 | extern OOBOOL gH323Debug; |
michael@311 | 62 | extern OOH323EndPoint gH323ep; |
michael@310 | 63 | Index: apps/app_backticks.c |
michael@311 | 64 | diff -Nau apps/app_backticks.c.orig apps/app_backticks.c |
michael@311 | 65 | --- apps/app_backticks.c.orig 1970-01-01 01:00:00.000000000 +0100 |
michael@311 | 66 | +++ apps/app_backticks.c 2011-03-13 14:03:42.000000000 +0100 |
michael@310 | 67 | @@ -0,0 +1,129 @@ |
michael@202 | 68 | + |
michael@202 | 69 | +#include "asterisk.h" |
michael@202 | 70 | + |
michael@311 | 71 | +ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.52 $") |
michael@202 | 72 | + |
michael@310 | 73 | +#include <stdio.h> |
michael@310 | 74 | +#include <asterisk/file.h> |
michael@310 | 75 | +#include <asterisk/logger.h> |
michael@310 | 76 | +#include <asterisk/channel.h> |
michael@310 | 77 | +#include <asterisk/pbx.h> |
michael@310 | 78 | +#include <asterisk/module.h> |
michael@310 | 79 | +#include <asterisk/lock.h> |
michael@310 | 80 | +#include <asterisk/app.h> |
michael@310 | 81 | +#include <stdlib.h> |
michael@310 | 82 | +#include <unistd.h> |
michael@310 | 83 | +#include <string.h> |
michael@202 | 84 | + |
michael@310 | 85 | +static char *app = "BackTicks"; |
michael@310 | 86 | +static char *synopsis = "Execute a shell command and save the result as a variable."; |
michael@310 | 87 | +static char *desc = " Backticks(<VARNAME>|<command>)\n\n" |
michael@310 | 88 | + "Be sure to include a full path to the command!\n"; |
michael@202 | 89 | + |
michael@310 | 90 | +static char *do_backticks(char *command, char *buf, size_t len) |
michael@310 | 91 | +{ |
michael@310 | 92 | + int fds[2], pid = 0; |
michael@310 | 93 | + char *ret = NULL; |
michael@202 | 94 | + |
michael@310 | 95 | + memset(buf, 0, len); |
michael@310 | 96 | + if (pipe(fds)) { |
michael@310 | 97 | + ast_log(LOG_WARNING, "Pipe/Exec failed\n"); |
michael@310 | 98 | + } else { |
michael@310 | 99 | + pid = fork(); |
michael@310 | 100 | + if (pid < 0) { |
michael@310 | 101 | + ast_log(LOG_WARNING, "Fork failed\n"); |
michael@310 | 102 | + close(fds[0]); |
michael@310 | 103 | + close(fds[1]); |
michael@310 | 104 | + } else if (pid) { |
michael@310 | 105 | + /* parent */ |
michael@310 | 106 | + close(fds[1]); |
michael@310 | 107 | + read(fds[0], buf, len); |
michael@310 | 108 | + close(fds[0]); |
michael@310 | 109 | + ret = buf; |
michael@310 | 110 | + } else { |
michael@310 | 111 | + /* child */ |
michael@310 | 112 | + char *argv[255] = {0}; |
michael@310 | 113 | + int argc = 0; |
michael@310 | 114 | + char *p; |
michael@310 | 115 | + char *mycmd = ast_strdupa(command); |
michael@310 | 116 | + close(fds[0]); |
michael@310 | 117 | + dup2(fds[1], STDOUT_FILENO); |
michael@310 | 118 | + argv[argc++] = mycmd; |
michael@310 | 119 | + do { |
michael@310 | 120 | + if ((p = strchr(mycmd, ' '))) { |
michael@310 | 121 | + *p = '\0'; |
michael@310 | 122 | + mycmd = ++p; |
michael@310 | 123 | + argv[argc++] = mycmd; |
michael@310 | 124 | + } |
michael@310 | 125 | + } while (p != NULL); |
michael@310 | 126 | + close(fds[1]); |
michael@310 | 127 | + execv(argv[0], argv); |
michael@310 | 128 | + ast_log(LOG_ERROR, "exec of %s failed\n", argv[0]); |
michael@310 | 129 | + exit(0); |
michael@310 | 130 | + } |
michael@310 | 131 | + } |
michael@310 | 132 | + return ret; |
michael@202 | 133 | +} |
michael@202 | 134 | + |
michael@310 | 135 | +static int backticks_exec(struct ast_channel *chan, void *data) |
michael@202 | 136 | +{ |
michael@310 | 137 | + int res = 0; |
michael@310 | 138 | + const char *usage = "Usage: Backticks(<VARNAME>|<command>)"; |
michael@310 | 139 | + char buf[1024], *argv[2], *mydata; |
michael@310 | 140 | + int argc = 0; |
michael@310 | 141 | + |
michael@310 | 142 | + if (!data) { |
michael@310 | 143 | + ast_log(LOG_WARNING, "%s\n", usage); |
michael@310 | 144 | + return -1; |
michael@310 | 145 | + } |
michael@310 | 146 | + ast_autoservice_start(chan); |
michael@310 | 147 | + if (!(mydata = ast_strdupa(data))) { |
michael@310 | 148 | + ast_log(LOG_ERROR, "Memory Error!\n"); |
michael@310 | 149 | + res = -1; |
michael@310 | 150 | + } else { |
michael@310 | 151 | + if((argc = ast_app_separate_args(mydata, '|', argv, sizeof(argv) / sizeof(argv[0]))) < 2) { |
michael@310 | 152 | + ast_log(LOG_WARNING, "%s\n", usage); |
michael@310 | 153 | + res = -1; |
michael@310 | 154 | + } |
michael@310 | 155 | + if (do_backticks(argv[1], buf, sizeof(buf))) |
michael@310 | 156 | + pbx_builtin_setvar_helper(chan, argv[0], buf); |
michael@310 | 157 | + else { |
michael@310 | 158 | + ast_log(LOG_WARNING, "No Data!\n"); |
michael@310 | 159 | + res = -1; |
michael@310 | 160 | + } |
michael@310 | 161 | + } |
michael@310 | 162 | + ast_autoservice_stop(chan); |
michael@310 | 163 | + return res; |
michael@202 | 164 | +} |
michael@202 | 165 | + |
michael@310 | 166 | +static int function_backticks(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
michael@202 | 167 | +{ |
michael@310 | 168 | + if (!do_backticks(data, buf, len)) { |
michael@310 | 169 | + ast_log(LOG_WARNING, "No Data!\n"); |
michael@310 | 170 | + return -1; |
michael@310 | 171 | + } |
michael@310 | 172 | + return 0; |
michael@202 | 173 | +} |
michael@202 | 174 | + |
michael@310 | 175 | +static struct ast_custom_function backticks_function = { |
michael@310 | 176 | + .name = "BACKTICKS", |
michael@310 | 177 | + .desc = "Executes a shell command and evaluates to the result.", |
michael@310 | 178 | + .syntax = "BACKTICKS(<command>)", |
michael@310 | 179 | + .synopsis = "Executes a shell command.", |
michael@310 | 180 | + .read = function_backticks |
michael@202 | 181 | +}; |
michael@202 | 182 | + |
michael@202 | 183 | +static int unload_module(void) |
michael@202 | 184 | +{ |
michael@310 | 185 | + ast_custom_function_unregister(&backticks_function); |
michael@310 | 186 | + return ast_unregister_application(app); |
michael@202 | 187 | +} |
michael@202 | 188 | + |
michael@202 | 189 | +static int load_module(void) |
michael@202 | 190 | +{ |
michael@310 | 191 | + ast_custom_function_register(&backticks_function); |
michael@310 | 192 | + return ast_register_application(app, backticks_exec, synopsis, desc); |
michael@202 | 193 | +} |
michael@202 | 194 | + |
michael@310 | 195 | +AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "BACKTICKS() dialplan function"); |
michael@202 | 196 | + |
michael@310 | 197 | Index: apps/app_meetme.c |
michael@311 | 198 | diff -Nau apps/app_meetme.c.orig apps/app_meetme.c |
michael@311 | 199 | --- apps/app_meetme.c.orig 2011-01-07 21:53:02.000000000 +0100 |
michael@311 | 200 | +++ apps/app_meetme.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 201 | @@ -604,6 +604,7 @@ |
michael@310 | 202 | CONFFLAG_DURATION_LIMIT = (1 << 30), |
michael@310 | 203 | /*! Do not write any audio to this channel until the state is up. */ |
michael@310 | 204 | CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31), |
michael@311 | 205 | + CONFFLAG_USERNAME = (1 << 32), |
michael@310 | 206 | }; |
michael@310 | 207 | |
michael@311 | 208 | /* !If set play an intro announcement at start of conference */ |
michael@311 | 209 | @@ -617,6 +618,7 @@ |
michael@310 | 210 | OPT_ARG_MOH_CLASS = 4, |
michael@311 | 211 | OPT_ARG_INTROMSG = 5, |
michael@311 | 212 | OPT_ARG_ARRAY_SIZE = 6, |
michael@311 | 213 | + OPT_ARG_USERNAME = 7, |
michael@310 | 214 | }; |
michael@310 | 215 | |
michael@310 | 216 | AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS |
michael@311 | 217 | @@ -650,6 +652,7 @@ |
michael@310 | 218 | AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ), |
michael@310 | 219 | AST_APP_OPTION_ARG('S', CONFFLAG_DURATION_STOP, OPT_ARG_DURATION_STOP), |
michael@310 | 220 | AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT), |
michael@310 | 221 | + AST_APP_OPTION_ARG('n', CONFFLAG_USERNAME, OPT_ARG_USERNAME), |
michael@310 | 222 | END_OPTIONS ); |
michael@310 | 223 | |
michael@311 | 224 | static const char * const app = "MeetMe"; |
michael@311 | 225 | @@ -2429,6 +2432,12 @@ |
michael@311 | 226 | ast_test_flag64(confflags, CONFFLAG_INTROUSERNOREVIEW))) { |
michael@310 | 227 | char destdir[PATH_MAX]; |
michael@310 | 228 | |
michael@311 | 229 | + if (!ast_test_flag64(confflags, CONFFLAG_USERNAME) |
michael@310 | 230 | + && !ast_strlen_zero(optargs[OPT_ARG_USERNAME]) |
michael@310 | 231 | + && ast_fileexists(optargs[OPT_ARG_USERNAME], NULL, NULL)) |
michael@310 | 232 | + snprintf(destdir, sizeof(destdir), "%s", optargs[OPT_ARG_USERNAME]); |
michael@310 | 233 | + else { |
michael@202 | 234 | + |
michael@310 | 235 | snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR); |
michael@310 | 236 | |
michael@310 | 237 | if (ast_mkdir(destdir, 0777) != 0) { |
michael@311 | 238 | @@ -2445,6 +2454,7 @@ |
michael@310 | 239 | res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL); |
michael@310 | 240 | if (res == -1) |
michael@310 | 241 | goto outrun; |
michael@310 | 242 | + } |
michael@310 | 243 | } |
michael@310 | 244 | |
michael@310 | 245 | ast_mutex_lock(&conf->playlock); |
michael@311 | 246 | Index: apps/app_voicemail.c |
michael@311 | 247 | diff -Nau apps/app_voicemail.c.orig apps/app_voicemail.c |
michael@311 | 248 | --- apps/app_voicemail.c.orig 2011-01-07 20:58:30.000000000 +0100 |
michael@311 | 249 | +++ apps/app_voicemail.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 250 | @@ -366,6 +366,7 @@ |
michael@311 | 251 | static char imapport[8]; |
michael@311 | 252 | static char imapflags[128]; |
michael@311 | 253 | static char imapfolder[64]; |
michael@311 | 254 | +static int imapsubfold = 0; |
michael@311 | 255 | static char imapparentfolder[64] = "\0"; |
michael@311 | 256 | static char greetingfolder[64]; |
michael@311 | 257 | static char authuser[32]; |
michael@311 | 258 | @@ -2464,7 +2465,7 @@ |
michael@310 | 259 | } |
michael@310 | 260 | |
michael@311 | 261 | /* Build up server information */ |
michael@311 | 262 | - ast_build_string(&t, &left, "{%s:%s/imap", imapserver, imapport); |
michael@311 | 263 | + ast_build_string(&t, &left, "{%s:%s", imapserver, imapport); |
michael@310 | 264 | |
michael@311 | 265 | /* Add authentication user if present */ |
michael@311 | 266 | if (!ast_strlen_zero(authuser)) |
michael@311 | 267 | @@ -6035,6 +6036,7 @@ |
michael@311 | 268 | /* simple. huh? */ |
michael@311 | 269 | char sequence[10]; |
michael@311 | 270 | char mailbox[256]; |
michael@311 | 271 | + char folder[256]; |
michael@311 | 272 | int res; |
michael@311 | 273 | |
michael@311 | 274 | /* get the real IMAP message number for this message */ |
michael@311 | 275 | @@ -6050,10 +6052,24 @@ |
michael@311 | 276 | mail_setflag(vms->mailstream, sequence, "\\Unseen"); |
michael@311 | 277 | mail_clearflag(vms->mailstream, sequence, "\\Seen"); |
michael@311 | 278 | } |
michael@311 | 279 | - if (!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) { |
michael@311 | 280 | - ast_mutex_unlock(&vms->lock); |
michael@311 | 281 | + |
michael@311 | 282 | + if ((!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) || \ |
michael@311 | 283 | + !strcasecmp(mbox(vmu, OLD_FOLDER), vms->curbox)) && \ |
michael@311 | 284 | + (box == NEW_FOLDER || box == OLD_FOLDER)) { /* Don't copy data, */ |
michael@311 | 285 | + ast_mutex_unlock(&vms->lock); /* just change Seen flag */ |
michael@311 | 286 | return 0; |
michael@311 | 287 | + } else if (box != NEW_FOLDER && box != OLD_FOLDER) { /* Do copy data */ |
michael@311 | 288 | + if (imapsubfold == 1) /* using INBOX or subfolder */ |
michael@311 | 289 | + snprintf(folder, sizeof(folder), "%s%c%s", imapfolder, delimiter, mbox(vmu, box)); |
michael@311 | 290 | + else |
michael@311 | 291 | + strncpy(folder, mbox(vmu, box), sizeof(folder)); |
michael@311 | 292 | + int res = !mail_copy(vms->mailstream,sequence,folder); |
michael@311 | 293 | + ast_mutex_unlock(&vms->lock); |
michael@311 | 294 | + return res; |
michael@311 | 295 | + } else { /* Copy data to INBOX delegating new/old status to Seen flag */ |
michael@311 | 296 | + int res = !mail_copy(vms->mailstream,sequence,imapfolder); |
michael@311 | 297 | } |
michael@311 | 298 | + |
michael@311 | 299 | /* Create the folder if it don't exist */ |
michael@311 | 300 | imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */ |
michael@311 | 301 | ast_debug(5, "Checking if folder exists: %s\n", mailbox); |
michael@311 | 302 | @@ -10221,6 +10237,10 @@ |
michael@311 | 303 | #ifndef IMAP_STORAGE |
michael@311 | 304 | } else if (!cmd) { |
michael@311 | 305 | vms.deleted[vms.curmsg] = 1; |
michael@311 | 306 | +#else |
michael@311 | 307 | + } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) { |
michael@311 | 308 | + vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */ |
michael@311 | 309 | + deleted = 1; /* successful copy op */ |
michael@311 | 310 | #endif |
michael@311 | 311 | } else { |
michael@311 | 312 | vms.deleted[vms.curmsg] = 0; |
michael@311 | 313 | @@ -11688,6 +11708,15 @@ |
michael@311 | 314 | } else { |
michael@311 | 315 | ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder)); |
michael@311 | 316 | } |
michael@311 | 317 | + /* IMAP saved (sub)folder location policy */ |
michael@311 | 318 | + if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) { |
michael@311 | 319 | + if (ast_false(val)) |
michael@311 | 320 | + imapsubfold = 0; |
michael@311 | 321 | + else |
michael@311 | 322 | + imapsubfold = 1; |
michael@311 | 323 | + } else { |
michael@311 | 324 | + imapsubfold = 0; |
michael@311 | 325 | + } |
michael@311 | 326 | if ((val = ast_variable_retrieve(cfg, "general", "imapparentfolder"))) { |
michael@311 | 327 | ast_copy_string(imapparentfolder, val, sizeof(imapparentfolder)); |
michael@311 | 328 | } |
michael@311 | 329 | Index: apps/.moduleinfo |
michael@311 | 330 | diff -Nau apps/.moduleinfo.orig apps/.moduleinfo |
michael@311 | 331 | --- apps/.moduleinfo.orig 2011-02-22 23:50:32.000000000 +0100 |
michael@311 | 332 | +++ apps/.moduleinfo 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 333 | @@ -72,7 +72,7 @@ |
michael@311 | 334 | <member name="app_image" displayname="Image Transmission Application" remove_on_change="apps/app_image.o apps/app_image.so"> |
michael@311 | 335 | </member> |
michael@311 | 336 | <member name="app_ivrdemo" displayname="IVR Demo Application" remove_on_change="apps/app_ivrdemo.o apps/app_ivrdemo.so"> |
michael@311 | 337 | - <defaultenabled>no</defaultenabled> |
michael@311 | 338 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 339 | </member> |
michael@311 | 340 | <member name="app_jack" displayname="JACK Interface" remove_on_change="apps/app_jack.o apps/app_jack.so"> |
michael@311 | 341 | <depend>jack</depend> |
michael@311 | 342 | @@ -127,10 +127,10 @@ |
michael@311 | 343 | <member name="app_rpt" displayname="Radio Repeater/Remote Base Application" remove_on_change="apps/app_rpt.o apps/app_rpt.so"> |
michael@311 | 344 | <depend>dahdi</depend> |
michael@311 | 345 | <depend>tonezone</depend> |
michael@311 | 346 | - <defaultenabled>no</defaultenabled> |
michael@311 | 347 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 348 | </member> |
michael@311 | 349 | <member name="app_saycounted" displayname="Decline words according to channel language" remove_on_change="apps/app_saycounted.o apps/app_saycounted.so"> |
michael@311 | 350 | - <defaultenabled>no</defaultenabled> |
michael@311 | 351 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 352 | </member> |
michael@311 | 353 | <member name="app_sayunixtime" displayname="Say time" remove_on_change="apps/app_sayunixtime.o apps/app_sayunixtime.so"> |
michael@311 | 354 | </member> |
michael@311 | 355 | Index: build_tools/cflags.xml |
michael@311 | 356 | diff -Nau build_tools/cflags.xml.orig build_tools/cflags.xml |
michael@311 | 357 | --- build_tools/cflags.xml.orig 2010-02-16 16:36:53.000000000 +0100 |
michael@311 | 358 | +++ build_tools/cflags.xml 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 359 | @@ -26,10 +26,11 @@ |
michael@311 | 360 | <member name="RADIO_RELAX" displayname="Relax DTMF for Radio Applications"> |
michael@311 | 361 | </member> |
michael@311 | 362 | <member name="G711_NEW_ALGORITHM" displayname="Use the NEW ulaw/alaw codecs (slower, but cleaner)"> |
michael@311 | 363 | - <defaultenabled>no</defaultenabled> |
michael@311 | 364 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 365 | </member> |
michael@311 | 366 | <member name="G711_REDUCED_BRANCHING" displayname="New ulaw/alaw codec, reduced branching (might help it run faster in some architectures)"> |
michael@311 | 367 | <depend>G711_NEW_ALGORITHM</depend> |
michael@311 | 368 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 369 | </member> |
michael@311 | 370 | <member name="TEST_CODING_TABLES" displayname="New ulaw/alaw codec, turn on table tests on init"> |
michael@311 | 371 | <depend>G711_NEW_ALGORITHM</depend> |
michael@311 | 372 | Index: chan_capi-1.1.5.919/chan_capi20.h |
michael@311 | 373 | diff -Nau chan_capi-1.1.5.919/chan_capi20.h.orig chan_capi-1.1.5.919/chan_capi20.h |
michael@311 | 374 | --- chan_capi-1.1.5.919/chan_capi20.h.orig 2011-01-07 02:29:32.000000000 +0100 |
michael@311 | 375 | +++ chan_capi-1.1.5.919/chan_capi20.h 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 376 | @@ -4,10 +4,13 @@ |
michael@311 | 377 | * first. Else the checks below will fail. |
michael@311 | 378 | */ |
michael@311 | 379 | |
michael@311 | 380 | +#include <stddef.h> |
michael@311 | 381 | #include <capi20.h> |
michael@310 | 382 | |
michael@310 | 383 | #undef CAPI_OS_HINT |
michael@310 | 384 | |
michael@310 | 385 | +#ifndef USE_OWN_LIBCAPI |
michael@310 | 386 | + |
michael@310 | 387 | #if (defined(__FreeBSD__) || defined(__OpenBSD__) || \ |
michael@310 | 388 | defined(__NetBSD__) || defined(__APPLE__)) |
michael@310 | 389 | |
michael@311 | 390 | @@ -29,6 +32,8 @@ |
michael@310 | 391 | #include <capiutils.h> |
michael@310 | 392 | #endif /* BSD */ |
michael@310 | 393 | |
michael@202 | 394 | +#endif |
michael@202 | 395 | + |
michael@310 | 396 | #ifndef HEADER_CID |
michael@310 | 397 | #define HEADER_CID(x) ((x)->adr.adrNCCI) |
michael@310 | 398 | #endif |
michael@311 | 399 | Index: chan_capi-1.1.5.919/chan_capi_utils.c |
michael@311 | 400 | diff -Nau chan_capi-1.1.5.919/chan_capi_utils.c.orig chan_capi-1.1.5.919/chan_capi_utils.c |
michael@311 | 401 | --- chan_capi-1.1.5.919/chan_capi_utils.c.orig 2011-01-07 02:29:32.000000000 +0100 |
michael@311 | 402 | +++ chan_capi-1.1.5.919/chan_capi_utils.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 403 | @@ -1155,6 +1155,9 @@ |
michael@310 | 404 | { |
michael@310 | 405 | MESSAGE_EXCHANGE_ERROR error; |
michael@310 | 406 | int waitcount = 50; |
michael@310 | 407 | +#ifndef CAPI_MANUFACTURER_LEN |
michael@310 | 408 | +#define CAPI_MANUFACTURER_LEN 64 |
michael@310 | 409 | +#endif |
michael@310 | 410 | unsigned char manbuf[CAPI_MANUFACTURER_LEN]; |
michael@310 | 411 | _cmsg CMSG; |
michael@310 | 412 | |
michael@311 | 413 | Index: chan_capi-1.1.5.919/libcapi20/capi20.c |
michael@311 | 414 | diff -Nau chan_capi-1.1.5.919/libcapi20/capi20.c.orig chan_capi-1.1.5.919/libcapi20/capi20.c |
michael@311 | 415 | --- chan_capi-1.1.5.919/libcapi20/capi20.c.orig 2011-01-07 02:29:31.000000000 +0100 |
michael@311 | 416 | +++ chan_capi-1.1.5.919/libcapi20/capi20.c 2011-03-13 14:03:42.000000000 +0100 |
michael@310 | 417 | @@ -19,8 +19,10 @@ |
michael@310 | 418 | #include <stdio.h> |
michael@310 | 419 | #include <ctype.h> |
michael@310 | 420 | #include <assert.h> |
michael@310 | 421 | +#ifdef __linux__ |
michael@310 | 422 | #define _LINUX_LIST_H |
michael@310 | 423 | #include <linux/capi.h> |
michael@310 | 424 | +#endif |
michael@310 | 425 | |
michael@310 | 426 | #include <sys/socket.h> |
michael@310 | 427 | #include <netinet/in.h> |
michael@310 | 428 | @@ -48,17 +50,23 @@ |
michael@310 | 429 | |
michael@310 | 430 | #define SEND_BUFSIZ (128+2048) |
michael@310 | 431 | |
michael@202 | 432 | +#if 0 |
michael@310 | 433 | static char capidevname[] = "/dev/capi20"; |
michael@310 | 434 | static char capidevnamenew[] = "/dev/isdn/capi20"; |
michael@310 | 435 | +#endif |
michael@310 | 436 | |
michael@310 | 437 | static int capi_fd = -1; |
michael@310 | 438 | +#if 0 |
michael@310 | 439 | static capi_ioctl_struct ioctl_data; |
michael@310 | 440 | +#endif |
michael@310 | 441 | |
michael@310 | 442 | static int remote_capi; |
michael@310 | 443 | +#if 0 |
michael@310 | 444 | static char *globalconfigfilename = "/etc/capi20.conf"; |
michael@310 | 445 | static char *userconfigfilename = ".capi20rc"; |
michael@310 | 446 | static unsigned short int port; |
michael@310 | 447 | static char hostname[1024]; |
michael@310 | 448 | +#endif |
michael@310 | 449 | static int tracelevel; |
michael@310 | 450 | static char *tracefile; |
michael@310 | 451 | |
michael@310 | 452 | @@ -77,17 +85,21 @@ |
michael@310 | 453 | #define RCAPI_AUTH_USER_REQ CAPICMD(0xff, 0x00) |
michael@310 | 454 | #define RCAPI_AUTH_USER_CONF CAPICMD(0xff, 0x01) |
michael@310 | 455 | |
michael@310 | 456 | +#if 0 |
michael@310 | 457 | static char *skip_whitespace(char *s) |
michael@310 | 458 | { |
michael@310 | 459 | while (*s && isspace(*s)) s++; |
michael@310 | 460 | return s; |
michael@310 | 461 | } |
michael@310 | 462 | +#endif |
michael@310 | 463 | |
michael@310 | 464 | +#if 0 |
michael@310 | 465 | static char *skip_nonwhitespace(char *s) |
michael@310 | 466 | { |
michael@310 | 467 | while (*s && !isspace(*s)) s++; |
michael@310 | 468 | return s; |
michael@310 | 469 | } |
michael@310 | 470 | +#endif |
michael@310 | 471 | |
michael@310 | 472 | static unsigned char get_byte(unsigned char **p) |
michael@310 | 473 | { |
michael@310 | 474 | @@ -95,10 +107,12 @@ |
michael@310 | 475 | return((unsigned char)*(*p - 1)); |
michael@310 | 476 | } |
michael@310 | 477 | |
michael@310 | 478 | +#if 0 |
michael@310 | 479 | static unsigned short get_word(unsigned char **p) |
michael@310 | 480 | { |
michael@310 | 481 | return(get_byte(p) | (get_byte(p) << 8)); |
michael@310 | 482 | } |
michael@310 | 483 | +#endif |
michael@310 | 484 | |
michael@310 | 485 | static unsigned short get_netword(unsigned char **p) |
michael@310 | 486 | { |
michael@310 | 487 | @@ -144,6 +158,7 @@ |
michael@310 | 488 | * read config file |
michael@310 | 489 | */ |
michael@310 | 490 | |
michael@310 | 491 | +#if 0 |
michael@310 | 492 | static int read_config(void) |
michael@310 | 493 | { |
michael@310 | 494 | FILE *fp = NULL; |
michael@310 | 495 | @@ -197,11 +212,13 @@ |
michael@310 | 496 | fclose(fp); |
michael@310 | 497 | return(1); |
michael@310 | 498 | } |
michael@310 | 499 | +#endif |
michael@310 | 500 | |
michael@310 | 501 | /* |
michael@310 | 502 | * socket function |
michael@310 | 503 | */ |
michael@310 | 504 | |
michael@310 | 505 | +#if 0 |
michael@310 | 506 | static int open_socket(void) |
michael@310 | 507 | { |
michael@310 | 508 | int fd; |
michael@310 | 509 | @@ -225,6 +242,7 @@ |
michael@310 | 510 | close(fd); |
michael@310 | 511 | return(-1); |
michael@310 | 512 | } |
michael@310 | 513 | +#endif |
michael@310 | 514 | |
michael@310 | 515 | static int socket_read(int fd, unsigned char *buf, int l) |
michael@310 | 516 | { |
michael@310 | 517 | @@ -328,6 +346,8 @@ |
michael@310 | 518 | if (likely(capi_fd >= 0)) |
michael@310 | 519 | return CapiNoError; |
michael@310 | 520 | |
michael@310 | 521 | +#if 0 |
michael@310 | 522 | + |
michael@310 | 523 | /*----- open managment link -----*/ |
michael@310 | 524 | if (read_config() && (remote_capi)) { |
michael@310 | 525 | capi_fd = open_socket(); |
michael@310 | 526 | @@ -347,6 +367,8 @@ |
michael@310 | 527 | if (ioctl(capi_fd, CAPI_INSTALLED, 0) == 0) |
michael@310 | 528 | return CapiNoError; |
michael@310 | 529 | |
michael@202 | 530 | +#endif |
michael@202 | 531 | + |
michael@310 | 532 | return CapiRegNotInstalled; |
michael@310 | 533 | } |
michael@310 | 534 | |
michael@310 | 535 | @@ -421,6 +443,7 @@ |
michael@310 | 536 | unsigned char *bufferstart; |
michael@310 | 537 | }; |
michael@310 | 538 | |
michael@310 | 539 | +#if 0 |
michael@310 | 540 | static struct applinfo *alloc_buffers( |
michael@310 | 541 | unsigned MaxB3Connection, |
michael@310 | 542 | unsigned MaxB3Blks, |
michael@310 | 543 | @@ -459,6 +482,7 @@ |
michael@310 | 544 | ap->lastfree->next = 0; |
michael@310 | 545 | return ap; |
michael@310 | 546 | } |
michael@202 | 547 | +#endif |
michael@310 | 548 | |
michael@310 | 549 | static void free_buffers(struct applinfo *ap) |
michael@310 | 550 | { |
michael@310 | 551 | @@ -576,14 +600,17 @@ |
michael@310 | 552 | unsigned MaxSizeB3, |
michael@310 | 553 | unsigned *ApplID) |
michael@310 | 554 | { |
michael@310 | 555 | +#if 0 |
michael@310 | 556 | int applid = 0; |
michael@310 | 557 | char buf[PATH_MAX]; |
michael@310 | 558 | int i, fd = -1; |
michael@310 | 559 | |
michael@310 | 560 | *ApplID = 0; |
michael@310 | 561 | +#endif |
michael@310 | 562 | |
michael@310 | 563 | if (capi20_isinstalled() != CapiNoError) |
michael@310 | 564 | return CapiRegNotInstalled; |
michael@310 | 565 | +#if 0 |
michael@310 | 566 | if ((!remote_capi) || ((remote_capi) && ((fd = open_socket()) < 0))) { |
michael@310 | 567 | if ((fd = open(capidevname, O_RDWR|O_NONBLOCK, 0666)) < 0 && |
michael@310 | 568 | (errno == ENOENT)) { |
michael@310 | 569 | @@ -621,6 +648,8 @@ |
michael@310 | 570 | close(fd); |
michael@310 | 571 | return(errcode); |
michael@310 | 572 | } |
michael@310 | 573 | + } |
michael@310 | 574 | +#if 0 |
michael@310 | 575 | } else if ((applid = ioctl(fd, CAPI_REGISTER, &ioctl_data)) < 0) { |
michael@310 | 576 | if (errno == EIO) { |
michael@310 | 577 | if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0) { |
michael@310 | 578 | @@ -666,6 +695,7 @@ |
michael@310 | 579 | applid = alloc_applid(fd); |
michael@310 | 580 | } // end old driver compatibility |
michael@310 | 581 | } |
michael@310 | 582 | +#endif |
michael@310 | 583 | if (remember_applid(applid, fd) < 0) { |
michael@310 | 584 | close(fd); |
michael@310 | 585 | return CapiRegOSResourceErr; |
michael@310 | 586 | @@ -676,6 +706,7 @@ |
michael@310 | 587 | return CapiRegOSResourceErr; |
michael@310 | 588 | } |
michael@310 | 589 | *ApplID = applid; |
michael@310 | 590 | +#endif |
michael@310 | 591 | return CapiNoError; |
michael@310 | 592 | } |
michael@310 | 593 | |
michael@310 | 594 | @@ -784,11 +815,15 @@ |
michael@310 | 595 | ret = CapiIllAppNr; |
michael@310 | 596 | break; |
michael@310 | 597 | case EIO: |
michael@310 | 598 | +#if 0 |
michael@310 | 599 | if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0) { |
michael@310 | 600 | +#endif |
michael@310 | 601 | ret = CapiMsgOSResourceErr; |
michael@310 | 602 | +#if 0 |
michael@310 | 603 | } else { |
michael@310 | 604 | ret = (unsigned)ioctl_data.errcode; |
michael@310 | 605 | } |
michael@310 | 606 | +#endif |
michael@310 | 607 | break; |
michael@310 | 608 | default: |
michael@310 | 609 | ret = CapiMsgOSResourceErr; |
michael@310 | 610 | @@ -842,7 +877,7 @@ |
michael@310 | 611 | rcvbuf[15] = (data >> 24) & 0xff; |
michael@310 | 612 | } else { |
michael@310 | 613 | u_int64_t data; |
michael@310 | 614 | - ulong radr = (ulong)rcvbuf; |
michael@310 | 615 | + unsigned long radr = (unsigned long)rcvbuf; |
michael@310 | 616 | if (CAPIMSG_LEN(rcvbuf) < 30) { |
michael@310 | 617 | /* |
michael@310 | 618 | * grr, 64bit arch, but no data64 included, |
michael@310 | 619 | @@ -899,6 +934,9 @@ |
michael@310 | 620 | { |
michael@310 | 621 | if (capi20_isinstalled() != CapiNoError) |
michael@310 | 622 | return 0; |
michael@310 | 623 | +#ifndef CAPI_MANUFACTURER_LEN |
michael@310 | 624 | +#define CAPI_MANUFACTURER_LEN 64 |
michael@310 | 625 | +#endif |
michael@310 | 626 | |
michael@310 | 627 | if (remote_capi) { |
michael@310 | 628 | unsigned char buf[100]; |
michael@310 | 629 | @@ -911,15 +949,19 @@ |
michael@310 | 630 | return Buf; |
michael@310 | 631 | } |
michael@310 | 632 | |
michael@310 | 633 | +#if 0 |
michael@310 | 634 | ioctl_data.contr = Ctrl; |
michael@310 | 635 | |
michael@310 | 636 | if (ioctl(capi_fd, CAPI_GET_MANUFACTURER, &ioctl_data) < 0) |
michael@310 | 637 | +#endif |
michael@310 | 638 | return 0; |
michael@310 | 639 | |
michael@310 | 640 | +#if 0 |
michael@310 | 641 | memcpy(Buf, ioctl_data.manufacturer, CAPI_MANUFACTURER_LEN); |
michael@310 | 642 | Buf[CAPI_MANUFACTURER_LEN-1] = 0; |
michael@310 | 643 | |
michael@310 | 644 | return Buf; |
michael@310 | 645 | +#endif |
michael@310 | 646 | } |
michael@310 | 647 | |
michael@310 | 648 | unsigned char * |
michael@310 | 649 | @@ -934,16 +976,20 @@ |
michael@310 | 650 | set_rcapicmd_header(&p, 14, RCAPI_GET_VERSION_REQ, Ctrl); |
michael@310 | 651 | if(!(remote_command(capi_fd, buf, 14, RCAPI_GET_VERSION_CONF))) |
michael@310 | 652 | return 0; |
michael@310 | 653 | - memcpy(Buf, buf + 1, sizeof(capi_version)); |
michael@310 | 654 | + memcpy(Buf, buf + 1, 128 /* sizeof(capi_version) */); |
michael@310 | 655 | return Buf; |
michael@310 | 656 | } |
michael@310 | 657 | |
michael@310 | 658 | +#if 0 |
michael@310 | 659 | ioctl_data.contr = Ctrl; |
michael@310 | 660 | if (ioctl(capi_fd, CAPI_GET_VERSION, &ioctl_data) < 0) { |
michael@310 | 661 | +#endif |
michael@310 | 662 | return 0; |
michael@310 | 663 | +#if 0 |
michael@310 | 664 | } |
michael@310 | 665 | memcpy(Buf, &ioctl_data.version, sizeof(capi_version)); |
michael@310 | 666 | return Buf; |
michael@310 | 667 | +#endif |
michael@310 | 668 | } |
michael@310 | 669 | |
michael@310 | 670 | unsigned char * |
michael@310 | 671 | @@ -952,6 +998,10 @@ |
michael@310 | 672 | if (capi20_isinstalled() != CapiNoError) |
michael@310 | 673 | return 0; |
michael@310 | 674 | |
michael@310 | 675 | +#ifndef CAPI_SERIAL_LEN |
michael@310 | 676 | +#define CAPI_SERIAL_LEN 8 |
michael@202 | 677 | +#endif |
michael@202 | 678 | + |
michael@310 | 679 | if (remote_capi) { |
michael@310 | 680 | unsigned char buf[100]; |
michael@310 | 681 | unsigned char *p = buf; |
michael@310 | 682 | @@ -963,15 +1013,19 @@ |
michael@310 | 683 | return Buf; |
michael@310 | 684 | } |
michael@310 | 685 | |
michael@310 | 686 | +#if 0 |
michael@310 | 687 | ioctl_data.contr = Ctrl; |
michael@310 | 688 | |
michael@310 | 689 | if (ioctl(capi_fd, CAPI_GET_SERIAL, &ioctl_data) < 0) |
michael@202 | 690 | +#endif |
michael@310 | 691 | return 0; |
michael@310 | 692 | |
michael@202 | 693 | +#if 0 |
michael@310 | 694 | memcpy(Buf, &ioctl_data.serial, CAPI_SERIAL_LEN); |
michael@310 | 695 | Buf[CAPI_SERIAL_LEN-1] = 0; |
michael@310 | 696 | |
michael@310 | 697 | return Buf; |
michael@202 | 698 | +#endif |
michael@202 | 699 | } |
michael@202 | 700 | |
michael@310 | 701 | unsigned |
michael@311 | 702 | @@ -1018,6 +1072,7 @@ |
michael@310 | 703 | sizeof(ioctl_data.profile.ncontroller)); |
michael@202 | 704 | } |
michael@310 | 705 | return CapiNoError; |
michael@310 | 706 | +#endif |
michael@310 | 707 | } |
michael@310 | 708 | /* |
michael@310 | 709 | * functions added to the CAPI2.0 spec |
michael@311 | 710 | Index: chan_capi-1.1.5.919/libcapi20/convert.c |
michael@311 | 711 | diff -Nau chan_capi-1.1.5.919/libcapi20/convert.c.orig chan_capi-1.1.5.919/libcapi20/convert.c |
michael@311 | 712 | --- chan_capi-1.1.5.919/libcapi20/convert.c.orig 2011-01-07 02:29:31.000000000 +0100 |
michael@311 | 713 | +++ chan_capi-1.1.5.919/libcapi20/convert.c 2011-03-13 14:03:42.000000000 +0100 |
michael@310 | 714 | @@ -11,7 +11,14 @@ |
michael@310 | 715 | #include <stddef.h> |
michael@310 | 716 | #include <time.h> |
michael@310 | 717 | #include <ctype.h> |
michael@310 | 718 | +#ifdef __FreeBSD__ |
michael@310 | 719 | +#include <sys/endian.h> |
michael@310 | 720 | +#define bswap_16 bswap16 |
michael@310 | 721 | +#define bswap_32 bswap32 |
michael@310 | 722 | +#define bswap_64 bswap64 |
michael@310 | 723 | +#else |
michael@310 | 724 | #include <byteswap.h> |
michael@310 | 725 | +#endif |
michael@310 | 726 | |
michael@310 | 727 | #include "capi20.h" |
michael@310 | 728 | |
michael@311 | 729 | Index: chan_capi-1.1.5.919/Makefile |
michael@311 | 730 | diff -Nau chan_capi-1.1.5.919/Makefile.orig chan_capi-1.1.5.919/Makefile |
michael@311 | 731 | --- chan_capi-1.1.5.919/Makefile.orig 2011-01-07 02:29:32.000000000 +0100 |
michael@311 | 732 | +++ chan_capi-1.1.5.919/Makefile 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 733 | @@ -111,6 +111,9 @@ |
michael@311 | 734 | CFLAGS+=-O2 |
michael@311 | 735 | CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) |
michael@311 | 736 | CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi) |
michael@311 | 737 | +ifeq (${USE_OWN_LIBCAPI},yes) |
michael@311 | 738 | +CFLAGS+=-DUSE_OWN_LIBCAPI |
michael@311 | 739 | +endif |
michael@311 | 740 | ifeq (${DIVA_STREAMING},1) |
michael@311 | 741 | CFLAGS += -DDIVA_STREAMING=1 |
michael@311 | 742 | endif |
michael@311 | 743 | Index: channels/chan_sip.c |
michael@311 | 744 | diff -Nau channels/chan_sip.c.orig channels/chan_sip.c |
michael@311 | 745 | --- channels/chan_sip.c.orig 2011-01-14 18:32:52.000000000 +0100 |
michael@311 | 746 | +++ channels/chan_sip.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 747 | @@ -11210,7 +11210,16 @@ |
michael@311 | 748 | } else { |
michael@311 | 749 | if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { |
michael@311 | 750 | /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */ |
michael@311 | 751 | - snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag); |
michael@311 | 752 | + if (strncasecmp(p->uri, "sip:", strlen("sip:"))) |
michael@311 | 753 | + if (strncasecmp(p->uri, "sips:", strlen("sips:"))) |
michael@311 | 754 | + if (p->socket.type == SIP_TRANSPORT_TLS) |
michael@311 | 755 | + snprintf(to, sizeof(to), "<%s%s>;tag=%s", "sips:", p->uri, p->theirtag); |
michael@311 | 756 | + else |
michael@311 | 757 | + snprintf(to, sizeof(to), "<%s%s>;tag=%s", "sips:", p->uri, p->theirtag); |
michael@311 | 758 | + else /* if (strncasecmp(p->uri, "sips:"... */ |
michael@311 | 759 | + snprintf(to, sizeof(to), "<%s%s>;tag=%s", "", p->uri, p->theirtag); |
michael@311 | 760 | + else /* if (strncasecmp(p->uri, "sip:"... */ |
michael@311 | 761 | + snprintf(to, sizeof(to), "<%s%s>;tag=%s", "", p->uri, p->theirtag); |
michael@311 | 762 | } else if (p->options && p->options->vxml_url) { |
michael@311 | 763 | /* If there is a VXML URL append it to the SIP URL */ |
michael@311 | 764 | snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url); |
michael@310 | 765 | Index: channels/console_video.h |
michael@311 | 766 | diff -Nau channels/console_video.h.orig channels/console_video.h |
michael@310 | 767 | --- channels/console_video.h.orig 2008-06-30 17:45:15.000000000 +0200 |
michael@311 | 768 | +++ channels/console_video.h 2011-03-13 14:03:42.000000000 +0100 |
michael@310 | 769 | @@ -28,10 +28,7 @@ |
michael@310 | 770 | "console {device}" |
michael@310 | 771 | #else |
michael@310 | 772 | |
michael@310 | 773 | -#include <ffmpeg/avcodec.h> |
michael@310 | 774 | -#ifndef OLD_FFMPEG |
michael@310 | 775 | -#include <ffmpeg/swscale.h> /* requires a recent ffmpeg */ |
michael@310 | 776 | -#endif |
michael@310 | 777 | +#include <libavcoded/avcodec.h> |
michael@310 | 778 | |
michael@310 | 779 | #define CONSOLE_VIDEO_CMDS \ |
michael@310 | 780 | "console {videodevice|videocodec" \ |
michael@310 | 781 | Index: configure |
michael@311 | 782 | diff -Nau configure.orig configure |
michael@311 | 783 | --- configure.orig 2011-01-09 22:40:34.000000000 +0100 |
michael@311 | 784 | +++ configure 2011-03-13 14:14:50.000000000 +0100 |
michael@311 | 785 | @@ -4700,11 +4700,6 @@ |
michael@311 | 786 | esac |
michael@310 | 787 | |
michael@310 | 788 | case "${host_os}" in |
michael@310 | 789 | - freebsd*) |
michael@310 | 790 | - |
michael@310 | 791 | - CPPFLAGS=-I/usr/local/include |
michael@310 | 792 | - LDFLAGS=-L/usr/local/lib |
michael@310 | 793 | - ;; |
michael@310 | 794 | openbsd*) |
michael@310 | 795 | |
michael@310 | 796 | if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then |
michael@311 | 797 | @@ -18227,8 +18222,8 @@ |
michael@311 | 798 | if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then |
michael@311 | 799 | imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS` |
michael@311 | 800 | fi |
michael@311 | 801 | - imap_libs="${IMAP_TK_DIR}/c-client/c-client.a" |
michael@311 | 802 | - imap_include="-I${IMAP_TK_DIR}/c-client" |
michael@311 | 803 | + imap_libs="-limap -lssl -lcrypto -lcrypt" |
michael@311 | 804 | + imap_include="-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap" |
michael@311 | 805 | CPPFLAGS="${CPPFLAGS} ${imap_include}" |
michael@311 | 806 | LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}` |
michael@311 | 807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
michael@311 | 808 | @@ -25461,14 +25456,14 @@ |
michael@311 | 809 | else |
michael@311 | 810 | ast_ext_lib_check_save_CFLAGS="${CFLAGS}" |
michael@311 | 811 | CFLAGS="${CFLAGS} " |
michael@311 | 812 | - as_ac_Lib=`$as_echo "ac_cv_lib_lua5.1_${pbxfuncname}" | $as_tr_sh` |
michael@311 | 813 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua5.1" >&5 |
michael@311 | 814 | -$as_echo_n "checking for ${pbxfuncname} in -llua5.1... " >&6; } |
michael@311 | 815 | + as_ac_Lib=`$as_echo "ac_cv_lib_lua_${pbxfuncname}" | $as_tr_sh` |
michael@311 | 816 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua" >&5 |
michael@311 | 817 | +$as_echo_n "checking for ${pbxfuncname} in -llua... " >&6; } |
michael@311 | 818 | if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : |
michael@311 | 819 | $as_echo_n "(cached) " >&6 |
michael@311 | 820 | else |
michael@311 | 821 | ac_check_lib_save_LIBS=$LIBS |
michael@311 | 822 | -LIBS="-llua5.1 ${pbxlibdir} -lm $LIBS" |
michael@311 | 823 | +LIBS="-llua ${pbxlibdir} -lm $LIBS" |
michael@311 | 824 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
michael@311 | 825 | /* end confdefs.h. */ |
michael@311 | 826 | |
michael@311 | 827 | @@ -25511,19 +25506,19 @@ |
michael@311 | 828 | |
michael@311 | 829 | # now check for the header. |
michael@311 | 830 | if test "${AST_LUA_FOUND}" = "yes"; then |
michael@311 | 831 | - LUA_LIB="${pbxlibdir} -llua5.1 -lm" |
michael@311 | 832 | + LUA_LIB="${pbxlibdir} -llua -lm" |
michael@311 | 833 | # if --with-LUA=DIR has been specified, use it. |
michael@311 | 834 | if test "x${LUA_DIR}" != "x"; then |
michael@311 | 835 | LUA_INCLUDE="-I${LUA_DIR}/include" |
michael@311 | 836 | fi |
michael@311 | 837 | LUA_INCLUDE="${LUA_INCLUDE} " |
michael@311 | 838 | - if test "xlua5.1/lua.h" = "x" ; then # no header, assume found |
michael@311 | 839 | + if test "xlua/lua.h" = "x" ; then # no header, assume found |
michael@311 | 840 | LUA_HEADER_FOUND="1" |
michael@311 | 841 | else # check for the header |
michael@311 | 842 | ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" |
michael@311 | 843 | CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" |
michael@311 | 844 | - ac_fn_c_check_header_mongrel "$LINENO" "lua5.1/lua.h" "ac_cv_header_lua5_1_lua_h" "$ac_includes_default" |
michael@311 | 845 | -if test "x$ac_cv_header_lua5_1_lua_h" = x""yes; then : |
michael@311 | 846 | + ac_fn_c_check_header_mongrel "$LINENO" "lua/lua.h" "ac_cv_header_lua_lua_h" "$ac_includes_default" |
michael@311 | 847 | +if test "x$ac_cv_header_lua_lua_h" = x""yes; then : |
michael@311 | 848 | LUA_HEADER_FOUND=1 |
michael@311 | 849 | else |
michael@311 | 850 | LUA_HEADER_FOUND=0 |
michael@311 | 851 | @@ -25551,9 +25546,9 @@ |
michael@311 | 852 | |
michael@311 | 853 | if test "x${PBX_LUA}" = "x1" ; then |
michael@311 | 854 | if test x"${LUA_DIR}" = x; then |
michael@311 | 855 | - LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1" |
michael@311 | 856 | + LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua" |
michael@311 | 857 | else |
michael@311 | 858 | - LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1" |
michael@311 | 859 | + LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua" |
michael@311 | 860 | fi |
michael@311 | 861 | fi |
michael@311 | 862 | |
michael@311 | 863 | @@ -26238,7 +26233,7 @@ |
michael@311 | 864 | pbxlibdir="-L${SQLITE_DIR}" |
michael@311 | 865 | fi |
michael@311 | 866 | fi |
michael@311 | 867 | - pbxfuncname="sqlite_exec" |
michael@311 | 868 | + pbxfuncname="sqlite3_exec" |
michael@311 | 869 | if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers |
michael@311 | 870 | AST_SQLITE_FOUND=yes |
michael@311 | 871 | else |
michael@311 | 872 | @@ -26953,16 +26948,16 @@ |
michael@311 | 873 | if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then |
michael@311 | 874 | PBX_GMIME=0 |
michael@311 | 875 | if test -n "$ac_tool_prefix"; then |
michael@311 | 876 | - # Extract the first word of "${ac_tool_prefix}gmime-config", so it can be a program name with args. |
michael@311 | 877 | -set dummy ${ac_tool_prefix}gmime-config; ac_word=$2 |
michael@311 | 878 | + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. |
michael@311 | 879 | + set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 |
michael@311 | 880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
michael@311 | 881 | $as_echo_n "checking for $ac_word... " >&6; } |
michael@311 | 882 | -if test "${ac_cv_path_CONFIG_GMIME+set}" = set; then : |
michael@311 | 883 | +if test "${ac_cv_prog_PKGCONFIG+set}" = set; then |
michael@311 | 884 | $as_echo_n "(cached) " >&6 |
michael@311 | 885 | else |
michael@311 | 886 | - case $CONFIG_GMIME in |
michael@311 | 887 | + case $PKGCONFIG in |
michael@311 | 888 | [\\/]* | ?:[\\/]*) |
michael@311 | 889 | - ac_cv_path_CONFIG_GMIME="$CONFIG_GMIME" # Let the user override the test with a path. |
michael@311 | 890 | + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. |
michael@311 | 891 | ;; |
michael@311 | 892 | *) |
michael@311 | 893 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
michael@311 | 894 | @@ -26973,7 +26968,7 @@ |
michael@311 | 895 | test -z "$as_dir" && as_dir=. |
michael@311 | 896 | for ac_exec_ext in '' $ac_executable_extensions; do |
michael@311 | 897 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
michael@311 | 898 | - ac_cv_path_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext" |
michael@311 | 899 | + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" |
michael@311 | 900 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
michael@311 | 901 | break 2 |
michael@311 | 902 | fi |
michael@311 | 903 | @@ -26984,10 +26979,10 @@ |
michael@311 | 904 | ;; |
michael@311 | 905 | esac |
michael@311 | 906 | fi |
michael@311 | 907 | -CONFIG_GMIME=$ac_cv_path_CONFIG_GMIME |
michael@311 | 908 | -if test -n "$CONFIG_GMIME"; then |
michael@311 | 909 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_GMIME" >&5 |
michael@311 | 910 | -$as_echo "$CONFIG_GMIME" >&6; } |
michael@311 | 911 | +PKGCONFIG=$ac_cv_path_PKGCONFIG |
michael@311 | 912 | +if test -n "$PKGCONFIG"; then |
michael@311 | 913 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 |
michael@311 | 914 | +$as_echo "$PKGCONFIG" >&6; } |
michael@311 | 915 | else |
michael@311 | 916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
michael@311 | 917 | $as_echo "no" >&6; } |
michael@311 | 918 | @@ -26995,18 +26990,18 @@ |
michael@311 | 919 | |
michael@311 | 920 | |
michael@311 | 921 | fi |
michael@311 | 922 | -if test -z "$ac_cv_path_CONFIG_GMIME"; then |
michael@311 | 923 | - ac_pt_CONFIG_GMIME=$CONFIG_GMIME |
michael@311 | 924 | - # Extract the first word of "gmime-config", so it can be a program name with args. |
michael@311 | 925 | -set dummy gmime-config; ac_word=$2 |
michael@311 | 926 | +if test -z "$ac_cv_path_PKGCONFIG"; then |
michael@311 | 927 | + ac_pt_PKGCONFIG=$PKGCONFIG |
michael@311 | 928 | + # Extract the first word of "pkg-config", so it can be a program name with args. |
michael@311 | 929 | +set dummy pkg-config; ac_word=$2 |
michael@311 | 930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
michael@311 | 931 | $as_echo_n "checking for $ac_word... " >&6; } |
michael@311 | 932 | -if test "${ac_cv_path_ac_pt_CONFIG_GMIME+set}" = set; then : |
michael@311 | 933 | +if test "${ac_cv_path_ac_pt_PKGCONFIG+set}" = set; then : |
michael@311 | 934 | $as_echo_n "(cached) " >&6 |
michael@311 | 935 | else |
michael@311 | 936 | - case $ac_pt_CONFIG_GMIME in |
michael@311 | 937 | + case $ac_pt_PKGCONFIG in |
michael@311 | 938 | [\\/]* | ?:[\\/]*) |
michael@311 | 939 | - ac_cv_path_ac_pt_CONFIG_GMIME="$ac_pt_CONFIG_GMIME" # Let the user override the test with a path. |
michael@311 | 940 | + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. |
michael@311 | 941 | ;; |
michael@311 | 942 | *) |
michael@311 | 943 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
michael@311 | 944 | @@ -27017,7 +27012,7 @@ |
michael@311 | 945 | test -z "$as_dir" && as_dir=. |
michael@311 | 946 | for ac_exec_ext in '' $ac_executable_extensions; do |
michael@311 | 947 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then |
michael@311 | 948 | - ac_cv_path_ac_pt_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext" |
michael@311 | 949 | + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" |
michael@311 | 950 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
michael@311 | 951 | break 2 |
michael@311 | 952 | fi |
michael@311 | 953 | @@ -27028,17 +27023,17 @@ |
michael@311 | 954 | ;; |
michael@311 | 955 | esac |
michael@311 | 956 | fi |
michael@311 | 957 | -ac_pt_CONFIG_GMIME=$ac_cv_path_ac_pt_CONFIG_GMIME |
michael@311 | 958 | -if test -n "$ac_pt_CONFIG_GMIME"; then |
michael@311 | 959 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_GMIME" >&5 |
michael@311 | 960 | -$as_echo "$ac_pt_CONFIG_GMIME" >&6; } |
michael@311 | 961 | +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG |
michael@311 | 962 | +if test -n "$ac_pt_PKGCONFIG"; then |
michael@311 | 963 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 |
michael@311 | 964 | +$as_echo "${ECHO_T}$ac_pt_PKGCONFIG" >&6; } |
michael@311 | 965 | else |
michael@311 | 966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
michael@311 | 967 | $as_echo "no" >&6; } |
michael@311 | 968 | fi |
michael@311 | 969 | |
michael@311 | 970 | - if test "x$ac_pt_CONFIG_GMIME" = x; then |
michael@311 | 971 | - CONFIG_GMIME="No" |
michael@311 | 972 | + if test "x$ac_pt_PKGCONFIG" = x; then |
michael@311 | 973 | + PKGCONFIG="No" |
michael@311 | 974 | else |
michael@311 | 975 | case $cross_compiling:$ac_tool_warned in |
michael@311 | 976 | yes:) |
michael@311 | 977 | @@ -27046,17 +27041,15 @@ |
michael@311 | 978 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
michael@311 | 979 | ac_tool_warned=yes ;; |
michael@311 | 980 | esac |
michael@311 | 981 | - CONFIG_GMIME=$ac_pt_CONFIG_GMIME |
michael@311 | 982 | + PKGCONFIG=$ac_pt_PKGCONFIG |
michael@311 | 983 | fi |
michael@311 | 984 | else |
michael@311 | 985 | - CONFIG_GMIME="$ac_cv_path_CONFIG_GMIME" |
michael@311 | 986 | + PKGCONFIG="$ac_cv_path_PKGCONFIG" |
michael@311 | 987 | fi |
michael@311 | 988 | |
michael@311 | 989 | - if test ! "x${CONFIG_GMIME}" = xNo; then |
michael@311 | 990 | - if test x"" = x ; then A=--cflags ; else A="" ; fi |
michael@311 | 991 | - GMIME_INCLUDE=$(${CONFIG_GMIME} $A) |
michael@311 | 992 | - if test x"" = x ; then A=--libs ; else A="" ; fi |
michael@311 | 993 | - GMIME_LIB=$(${CONFIG_GMIME} $A) |
michael@311 | 994 | + if test ! "x${PKGCONFIG}" = xNo; then |
michael@311 | 995 | + GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.4 --cflags 2>/dev/null) |
michael@311 | 996 | + GMIME_LIB=$(${PKGCONFIG} gmime-2.4 --libs) |
michael@311 | 997 | if test x"#include <gmime/gmime.h>" != x ; then |
michael@311 | 998 | saved_cppflags="${CPPFLAGS}" |
michael@311 | 999 | if test "x${GMIME_DIR}" != "x"; then |
michael@311 | 1000 | Index: formats/format_pcm.c |
michael@311 | 1001 | diff -Nau formats/format_pcm.c.orig formats/format_pcm.c |
michael@311 | 1002 | --- formats/format_pcm.c.orig 2010-07-26 05:27:06.000000000 +0200 |
michael@311 | 1003 | +++ formats/format_pcm.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1004 | @@ -350,6 +350,7 @@ |
michael@311 | 1005 | ast_log(LOG_WARNING, "Unable to write header\n"); |
michael@311 | 1006 | return -1; |
michael@311 | 1007 | } |
michael@311 | 1008 | + fflush(f); /* issues.asterisk.org bug 0016610 */ |
michael@311 | 1009 | return 0; |
michael@311 | 1010 | } |
michael@311 | 1011 | |
michael@311 | 1012 | Index: formats/format_wav.c |
michael@311 | 1013 | diff -Nau formats/format_wav.c.orig formats/format_wav.c |
michael@311 | 1014 | --- formats/format_wav.c.orig 2010-09-02 18:43:09.000000000 +0200 |
michael@311 | 1015 | +++ formats/format_wav.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1016 | @@ -310,6 +310,7 @@ |
michael@311 | 1017 | ast_log(LOG_WARNING, "Unable to write header\n"); |
michael@311 | 1018 | return -1; |
michael@311 | 1019 | } |
michael@311 | 1020 | + fflush(f); /* issues.asterisk.org bug 0016610 */ |
michael@311 | 1021 | return 0; |
michael@311 | 1022 | } |
michael@311 | 1023 | |
michael@311 | 1024 | Index: formats/format_wav_gsm.c |
michael@311 | 1025 | diff -Nau formats/format_wav_gsm.c.orig formats/format_wav_gsm.c |
michael@311 | 1026 | --- formats/format_wav_gsm.c.orig 2010-07-26 05:27:06.000000000 +0200 |
michael@311 | 1027 | +++ formats/format_wav_gsm.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1028 | @@ -362,6 +362,7 @@ |
michael@311 | 1029 | ast_log(LOG_WARNING, "Unable to write header\n"); |
michael@311 | 1030 | return -1; |
michael@311 | 1031 | } |
michael@311 | 1032 | + fflush(f); /* issues.asterisk.org bug 0016610 */ |
michael@311 | 1033 | return 0; |
michael@311 | 1034 | } |
michael@311 | 1035 | |
michael@311 | 1036 | Index: main/db1-ast/hash/hash.h |
michael@311 | 1037 | diff -Nau main/db1-ast/hash/hash.h.orig main/db1-ast/hash/hash.h |
michael@311 | 1038 | --- main/db1-ast/hash/hash.h.orig 2006-08-21 04:11:39.000000000 +0200 |
michael@311 | 1039 | +++ main/db1-ast/hash/hash.h 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1040 | @@ -36,6 +36,8 @@ |
michael@311 | 1041 | * @(#)hash.h 8.3 (Berkeley) 5/31/94 |
michael@311 | 1042 | */ |
michael@311 | 1043 | |
michael@311 | 1044 | +#include <stdint.h> |
michael@311 | 1045 | + |
michael@311 | 1046 | /* Operations */ |
michael@311 | 1047 | typedef enum { |
michael@311 | 1048 | HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT |
michael@311 | 1049 | Index: main/db1-ast/hash/ndbm.c |
michael@311 | 1050 | diff -Nau main/db1-ast/hash/ndbm.c.orig main/db1-ast/hash/ndbm.c |
michael@311 | 1051 | --- main/db1-ast/hash/ndbm.c.orig 2006-08-21 04:11:39.000000000 +0200 |
michael@311 | 1052 | +++ main/db1-ast/hash/ndbm.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1053 | @@ -49,7 +49,8 @@ |
michael@311 | 1054 | #include <string.h> |
michael@311 | 1055 | #include <stdlib.h> |
michael@311 | 1056 | |
michael@311 | 1057 | -#include <ndbm.h> |
michael@311 | 1058 | +#include "../include/ndbm.h" |
michael@311 | 1059 | +#include "../include/db.h" |
michael@311 | 1060 | #include "hash.h" |
michael@311 | 1061 | |
michael@311 | 1062 | /* |
michael@311 | 1063 | Index: main/features.c |
michael@311 | 1064 | diff -Nau main/features.c.orig main/features.c |
michael@311 | 1065 | --- main/features.c.orig 2011-01-20 21:24:36.000000000 +0100 |
michael@311 | 1066 | +++ main/features.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1067 | @@ -1658,6 +1658,10 @@ |
michael@311 | 1068 | snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); |
michael@311 | 1069 | } |
michael@311 | 1070 | |
michael@311 | 1071 | + for(x = 0; x < strlen(touch_filename); x++) { |
michael@311 | 1072 | + if (args[x] == '/') |
michael@311 | 1073 | + args[x] = '-'; |
michael@311 | 1074 | + } |
michael@311 | 1075 | for(x = 0; x < strlen(args); x++) { |
michael@311 | 1076 | if (args[x] == '/') |
michael@311 | 1077 | args[x] = '-'; |
michael@311 | 1078 | @@ -1774,6 +1778,10 @@ |
michael@311 | 1079 | snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); |
michael@311 | 1080 | } |
michael@311 | 1081 | |
michael@311 | 1082 | + for( x = 0; x < strlen(touch_filename); x++) { |
michael@311 | 1083 | + if (args[x] == '/') |
michael@311 | 1084 | + args[x] = '-'; |
michael@311 | 1085 | + } |
michael@311 | 1086 | for( x = 0; x < strlen(args); x++) { |
michael@311 | 1087 | if (args[x] == '/') |
michael@311 | 1088 | args[x] = '-'; |
michael@311 | 1089 | Index: main/file.c |
michael@311 | 1090 | diff -Nau main/file.c.orig main/file.c |
michael@311 | 1091 | --- main/file.c.orig 2011-01-12 17:05:12.000000000 +0100 |
michael@311 | 1092 | +++ main/file.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1093 | @@ -255,7 +255,7 @@ |
michael@311 | 1094 | char *fn = NULL; |
michael@311 | 1095 | |
michael@311 | 1096 | if (!strcmp(ext, "wav49")) |
michael@311 | 1097 | - ext = "WAV"; |
michael@311 | 1098 | + ext = "wav"; |
michael@311 | 1099 | |
michael@311 | 1100 | if (filename[0] == '/') { |
michael@311 | 1101 | if (asprintf(&fn, "%s.%s", filename, ext) < 0) { |
michael@310 | 1102 | Index: main/Makefile |
michael@311 | 1103 | diff -Nau main/Makefile.orig main/Makefile |
michael@311 | 1104 | --- main/Makefile.orig 2010-12-18 00:52:04.000000000 +0100 |
michael@311 | 1105 | +++ main/Makefile 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1106 | @@ -69,10 +69,7 @@ |
michael@310 | 1107 | endif |
michael@310 | 1108 | |
michael@310 | 1109 | ifeq ($(OSARCH),FreeBSD) |
michael@310 | 1110 | - # -V is understood by BSD Make, not by GNU make. |
michael@310 | 1111 | - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) |
michael@310 | 1112 | - AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) |
michael@310 | 1113 | - AST_LIBS+=-lcrypto |
michael@310 | 1114 | + AST_LIBS+=-lpthread -lcrypto |
michael@310 | 1115 | endif |
michael@310 | 1116 | |
michael@310 | 1117 | ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) |
michael@310 | 1118 | Index: main/tcptls.c |
michael@311 | 1119 | diff -Nau main/tcptls.c.orig main/tcptls.c |
michael@311 | 1120 | --- main/tcptls.c.orig 2010-07-09 00:08:07.000000000 +0200 |
michael@311 | 1121 | +++ main/tcptls.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1122 | @@ -354,6 +354,7 @@ |
michael@310 | 1123 | if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { |
michael@310 | 1124 | if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) |
michael@310 | 1125 | ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); |
michael@310 | 1126 | + SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL)); |
michael@202 | 1127 | } |
michael@202 | 1128 | |
michael@310 | 1129 | ast_verb(0, "SSL certificate ok\n"); |
michael@311 | 1130 | Index: main/udptl.c |
michael@311 | 1131 | diff -Nau main/udptl.c.orig main/udptl.c |
michael@311 | 1132 | --- main/udptl.c.orig 2011-02-22 23:52:11.000000000 +0100 |
michael@311 | 1133 | +++ main/udptl.c 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1134 | @@ -98,6 +98,18 @@ |
michael@311 | 1135 | |
michael@311 | 1136 | #define UDPTL_BUF_MASK 15 |
michael@311 | 1137 | |
michael@311 | 1138 | +/*! Copied from chan_oss.c, corrects link errors: |
michael@311 | 1139 | +udptl.o: In function `calculate_local_max_datagram': |
michael@311 | 1140 | +main/udptl.c:740: undefined reference to `MIN' |
michael@311 | 1141 | +udptl.o: In function `calculate_far_max_ifp': |
michael@311 | 1142 | +main/udptl.c:770: undefined reference to `MAX' */ |
michael@311 | 1143 | +#ifndef MIN |
michael@311 | 1144 | +#define MIN(a,b) ((a) < (b) ? (a) : (b)) |
michael@311 | 1145 | +#endif |
michael@311 | 1146 | +#ifndef MAX |
michael@311 | 1147 | +#define MAX(a,b) ((a) > (b) ? (a) : (b)) |
michael@311 | 1148 | +#endif |
michael@311 | 1149 | + |
michael@311 | 1150 | typedef struct { |
michael@311 | 1151 | int buf_len; |
michael@311 | 1152 | uint8_t buf[LOCAL_FAX_MAX_DATAGRAM]; |
michael@311 | 1153 | Index: Makefile |
michael@311 | 1154 | diff -Nau Makefile.orig Makefile |
michael@311 | 1155 | --- Makefile.orig 2011-01-12 16:57:43.000000000 +0100 |
michael@311 | 1156 | +++ Makefile 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1157 | @@ -230,15 +230,6 @@ |
michael@311 | 1158 | _ASTCFLAGS+=-fsigned-char |
michael@311 | 1159 | endif |
michael@311 | 1160 | |
michael@311 | 1161 | -ifeq ($(OSARCH),FreeBSD) |
michael@311 | 1162 | - ifeq ($(PROC),i386) |
michael@311 | 1163 | - _ASTCFLAGS+=-march=i686 |
michael@311 | 1164 | - endif |
michael@311 | 1165 | - # -V is understood by BSD Make, not by GNU make. |
michael@311 | 1166 | - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) |
michael@311 | 1167 | - _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) |
michael@311 | 1168 | -endif |
michael@311 | 1169 | - |
michael@311 | 1170 | ifeq ($(OSARCH),NetBSD) |
michael@311 | 1171 | _ASTCFLAGS+=-pthread -I/usr/pkg/include |
michael@311 | 1172 | endif |
michael@310 | 1173 | Index: menuselect-tree |
michael@311 | 1174 | diff -Nau menuselect-tree.orig menuselect-tree |
michael@311 | 1175 | --- menuselect-tree.orig 2011-02-22 23:50:45.000000000 +0100 |
michael@311 | 1176 | +++ menuselect-tree 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1177 | @@ -38,6 +38,8 @@ |
michael@310 | 1178 | </member> |
michael@311 | 1179 | <member name="app_authenticate" displayname="Authentication Application" remove_on_change="apps/app_authenticate.o apps/app_authenticate.so"> |
michael@310 | 1180 | </member> |
michael@311 | 1181 | +<member name="app_backticks" displayname="BACKTICKS() dialplan function" remove_on_change="apps/app_backticks.o apps/app_backticks.so"> |
michael@310 | 1182 | +</member> |
michael@311 | 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"> |
michael@310 | 1184 | </member> |
michael@311 | 1185 | <member name="app_celgenuserevent" displayname="Generate an User-Defined CEL event" remove_on_change="apps/app_celgenuserevent.o apps/app_celgenuserevent.so"> |
michael@311 | 1186 | @@ -937,11 +939,11 @@ |
michael@310 | 1187 | <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format"> |
michael@310 | 1188 | </member> |
michael@310 | 1189 | <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" > |
michael@310 | 1190 | - <defaultenabled>yes</defaultenabled> |
michael@310 | 1191 | </member> |
michael@310 | 1192 | <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format"> |
michael@310 | 1193 | </member> |
michael@311 | 1194 | <member name="CORE-SOUNDS-EN-G722" displayname="English, G.722 format"> |
michael@310 | 1195 | + <defaultenabled>yes</defaultenabled> |
michael@310 | 1196 | </member> |
michael@311 | 1197 | <member name="CORE-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format"> |
michael@311 | 1198 | </member> |
michael@311 | 1199 | @@ -1006,7 +1008,6 @@ |
michael@311 | 1200 | </category> |
michael@311 | 1201 | <category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes"> |
michael@311 | 1202 | <member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" > |
michael@311 | 1203 | - <defaultenabled>yes</defaultenabled> |
michael@311 | 1204 | </member> |
michael@311 | 1205 | <member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" > |
michael@311 | 1206 | </member> |
michael@311 | 1207 | @@ -1017,6 +1018,7 @@ |
michael@311 | 1208 | <member name="MOH-OPSOUND-G729" displayname="opsound.org Music On Hold Files, G.729 format" > |
michael@311 | 1209 | </member> |
michael@311 | 1210 | <member name="MOH-OPSOUND-G722" displayname="opsound.org Music On Hold Files, G.722 format" > |
michael@311 | 1211 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 1212 | </member> |
michael@311 | 1213 | <member name="MOH-OPSOUND-SLN16" displayname="opsound.org Music On Hold Files, Signed-linear 16kHz format" > |
michael@311 | 1214 | </member> |
michael@311 | 1215 | @@ -1037,6 +1039,7 @@ |
michael@311 | 1216 | <member name="EXTRA-SOUNDS-EN-G729" displayname="English, G.729 format"> |
michael@311 | 1217 | </member> |
michael@311 | 1218 | <member name="EXTRA-SOUNDS-EN-G722" displayname="English, G.722 format"> |
michael@311 | 1219 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 1220 | </member> |
michael@311 | 1221 | <member name="EXTRA-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format"> |
michael@310 | 1222 | </member> |
michael@310 | 1223 | Index: res/res_http_post.c |
michael@311 | 1224 | diff -Nau res/res_http_post.c.orig res/res_http_post.c |
michael@311 | 1225 | --- res/res_http_post.c.orig 2009-10-27 17:48:54.000000000 +0100 |
michael@311 | 1226 | +++ res/res_http_post.c 2011-03-13 14:03:42.000000000 +0100 |
michael@310 | 1227 | @@ -122,14 +122,8 @@ |
michael@310 | 1228 | ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n"); |
michael@310 | 1229 | return; |
michael@310 | 1230 | } else if (GMIME_IS_MULTIPART(part)) { |
michael@310 | 1231 | - GList *l; |
michael@310 | 1232 | - |
michael@310 | 1233 | - ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n"); |
michael@310 | 1234 | - l = GMIME_MULTIPART(part)->subparts; |
michael@310 | 1235 | - while (l) { |
michael@310 | 1236 | - process_message_callback(l->data, cbinfo); |
michael@310 | 1237 | - l = l->next; |
michael@310 | 1238 | - } |
michael@310 | 1239 | + ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n"); |
michael@310 | 1240 | + g_mime_multipart_foreach(GMIME_MULTIPART(part), process_message_callback, cbinfo); |
michael@310 | 1241 | } else if (GMIME_IS_PART(part)) { |
michael@310 | 1242 | const char *filename; |
michael@310 | 1243 | |
michael@310 | 1244 | Index: sounds/sounds.xml |
michael@311 | 1245 | diff -Nau sounds/sounds.xml.orig sounds/sounds.xml |
michael@311 | 1246 | --- sounds/sounds.xml.orig 2010-10-18 23:51:23.000000000 +0200 |
michael@311 | 1247 | +++ sounds/sounds.xml 2011-03-13 14:03:42.000000000 +0100 |
michael@311 | 1248 | @@ -6,11 +6,11 @@ |
michael@310 | 1249 | <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format"> |
michael@310 | 1250 | </member> |
michael@310 | 1251 | <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" > |
michael@310 | 1252 | - <defaultenabled>yes</defaultenabled> |
michael@310 | 1253 | </member> |
michael@310 | 1254 | <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format"> |
michael@310 | 1255 | </member> |
michael@311 | 1256 | <member name="CORE-SOUNDS-EN-G722" displayname="English, G.722 format"> |
michael@310 | 1257 | + <defaultenabled>yes</defaultenabled> |
michael@310 | 1258 | </member> |
michael@311 | 1259 | <member name="CORE-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format"> |
michael@310 | 1260 | </member> |
michael@311 | 1261 | @@ -75,7 +75,6 @@ |
michael@311 | 1262 | </category> |
michael@311 | 1263 | <category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes"> |
michael@311 | 1264 | <member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" > |
michael@311 | 1265 | - <defaultenabled>yes</defaultenabled> |
michael@311 | 1266 | </member> |
michael@311 | 1267 | <member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" > |
michael@311 | 1268 | </member> |
michael@311 | 1269 | @@ -86,6 +85,7 @@ |
michael@311 | 1270 | <member name="MOH-OPSOUND-G729" displayname="opsound.org Music On Hold Files, G.729 format" > |
michael@311 | 1271 | </member> |
michael@311 | 1272 | <member name="MOH-OPSOUND-G722" displayname="opsound.org Music On Hold Files, G.722 format" > |
michael@311 | 1273 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 1274 | </member> |
michael@311 | 1275 | <member name="MOH-OPSOUND-SLN16" displayname="opsound.org Music On Hold Files, Signed-linear 16kHz format" > |
michael@311 | 1276 | </member> |
michael@311 | 1277 | @@ -106,6 +106,7 @@ |
michael@311 | 1278 | <member name="EXTRA-SOUNDS-EN-G729" displayname="English, G.729 format"> |
michael@311 | 1279 | </member> |
michael@311 | 1280 | <member name="EXTRA-SOUNDS-EN-G722" displayname="English, G.722 format"> |
michael@311 | 1281 | + <defaultenabled>yes</defaultenabled> |
michael@311 | 1282 | </member> |
michael@311 | 1283 | <member name="EXTRA-SOUNDS-EN-SLN16" displayname="English, Signed-linear 16kHz format"> |
michael@311 | 1284 | </member> |
michael@315 | 1285 | Index: cdr/cdr_radius.c |
michael@315 | 1286 | diff -Nau cdr/cdr_radius.c.orig cdr/cdr_radius.c |
michael@315 | 1287 | --- cdr/cdr_radius.c.orig 2010-07-20 21:35:02.000000000 +0200 |
michael@315 | 1288 | +++ cdr/cdr_radius.c 2011-03-22 16:12:11.000000000 +0100 |
michael@315 | 1289 | @@ -105,10 +105,18 @@ |
michael@315 | 1290 | if (!rc_avpair_add(rh, tosend, PW_AST_SRC, &cdr->src, strlen(cdr->src), VENDOR_CODE)) |
michael@315 | 1291 | return -1; |
michael@315 | 1292 | |
michael@315 | 1293 | + /* RADIUS standard identifier patch */ |
michael@315 | 1294 | + if (!rc_avpair_add(rh, tosend, PW_CALLING_STATION_ID, &cdr->src, strlen(cdr->src), 0)) |
michael@315 | 1295 | + return -1; |
michael@315 | 1296 | + |
michael@315 | 1297 | /* Destination */ |
michael@315 | 1298 | if (!rc_avpair_add(rh, tosend, PW_AST_DST, &cdr->dst, strlen(cdr->dst), VENDOR_CODE)) |
michael@315 | 1299 | return -1; |
michael@315 | 1300 | |
michael@315 | 1301 | + /* RADIUS standard identifier patch */ |
michael@315 | 1302 | + if (!rc_avpair_add(rh, tosend, PW_CALLED_STATION_ID, &cdr->dst, strlen(cdr->dst), 0)) |
michael@315 | 1303 | + return -1; |
michael@315 | 1304 | + |
michael@315 | 1305 | /* Destination context */ |
michael@315 | 1306 | if (!rc_avpair_add(rh, tosend, PW_AST_DST_CTX, &cdr->dcontext, strlen(cdr->dcontext), VENDOR_CODE)) |
michael@315 | 1307 | return -1; |
michael@315 | 1308 | @@ -163,6 +171,10 @@ |
michael@315 | 1309 | if (!rc_avpair_add(rh, tosend, PW_AST_BILL_SEC, &cdr->billsec, 0, VENDOR_CODE)) |
michael@315 | 1310 | return -1; |
michael@315 | 1311 | |
michael@315 | 1312 | + /* RADIUS standard identifier patch */ |
michael@315 | 1313 | + if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_TIME, &cdr->billsec, 0, 0)) |
michael@315 | 1314 | + return -1; |
michael@315 | 1315 | + |
michael@315 | 1316 | /* Disposition */ |
michael@315 | 1317 | tmp = ast_cdr_disp2str(cdr->disposition); |
michael@315 | 1318 | if (!rc_avpair_add(rh, tosend, PW_AST_DISPOSITION, tmp, strlen(tmp), VENDOR_CODE)) |
michael@315 | 1319 | @@ -186,10 +198,14 @@ |
michael@315 | 1320 | } |
michael@315 | 1321 | |
michael@315 | 1322 | /* Setting Acct-Session-Id & User-Name attributes for proper generation |
michael@315 | 1323 | - of Acct-Unique-Session-Id on server side */ |
michael@315 | 1324 | - /* Channel */ |
michael@315 | 1325 | - if (!rc_avpair_add(rh, tosend, PW_USER_NAME, &cdr->channel, strlen(cdr->channel), 0)) |
michael@315 | 1326 | - return -1; |
michael@315 | 1327 | + of Acct-Unique-Session-Id on server side Channel */ |
michael@315 | 1328 | + { |
michael@316 | 1329 | + char szChanuser[PATH_MAX] = {0}; |
michael@316 | 1330 | + strncpy(szChanuser, &cdr->channel, PATH_MAX-1); |
michael@315 | 1331 | + *(strrchr(szChanuser, '-')) = 0; |
michael@315 | 1332 | + if (!rc_avpair_add(rh, tosend, PW_USER_NAME, szChanuser, strlen(cdr->channel), 0)) |
michael@315 | 1333 | + return -1; |
michael@315 | 1334 | + } |
michael@315 | 1335 | |
michael@315 | 1336 | /* Unique ID */ |
michael@315 | 1337 | if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_ID, &cdr->uniqueid, strlen(cdr->uniqueid), 0)) |