Sun, 20 Mar 2011 20:00:02 +0100
Resynchronize with upstream package maintainer version.
1.1 --- a/asterisk/amd.conf Sun Mar 20 19:27:35 2011 +0100 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,18 +0,0 @@ 1.4 -; 1.5 -; Answering Machine Detection Configuration 1.6 -; 1.7 - 1.8 -;[general] 1.9 -;initial_silence = 2500 ; Maximum silence duration before the greeting. 1.10 - ; If exceeded then MACHINE. 1.11 -;greeting = 1500 ; Maximum length of a greeting. If exceeded then MACHINE. 1.12 -;after_greeting_silence = 800 ; Silence after detecting a greeting. 1.13 - ; If exceeded then HUMAN 1.14 -;total_analysis_time = 5000 ; Maximum time allowed for the algorithm to decide 1.15 - ; on a HUMAN or MACHINE 1.16 -;min_word_length = 100 ; Minimum duration of Voice to considered as a word 1.17 -;between_words_silence = 50 ; Minimum duration of silence after a word to consider 1.18 - ; the audio what follows as a new word 1.19 -;maximum_number_of_words = 3 ; Maximum number of words in the greeting. 1.20 - ; If exceeded then MACHINE 1.21 -;silence_threshold = 256
2.1 --- a/asterisk/asterisk.conf Sun Mar 20 19:27:35 2011 +0100 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,78 +0,0 @@ 2.4 -;; 2.5 -;; asterisk.conf -- Asterisk main configuration file 2.6 -;; 2.7 - 2.8 -;[directories] 2.9 -; Make sure these directories have the right permissions if not 2.10 -; running Asterisk as root 2.11 - 2.12 -; Where the configuration files (except for this one) are located 2.13 -;astetcdir => /etc/asterisk 2.14 - 2.15 -; Where the Asterisk loadable modules are located 2.16 -;astmoddir => /usr/lib/asterisk/modules 2.17 - 2.18 -; Where additional 'library' elements (scripts, etc.) are located 2.19 -;astvarlibdir => /var/lib/asterisk 2.20 - 2.21 -; Where AGI scripts/programs are located 2.22 -;astagidir => /var/lib/asterisk/agi-bin 2.23 - 2.24 -; Where spool directories are located 2.25 -; Voicemail, monitor, dictation and other apps will create files here 2.26 -; and outgoing call files (used with pbx_spool) must be placed here 2.27 -;astspooldir => /var/spool/asterisk 2.28 - 2.29 -; Where the Asterisk process ID (pid) file should be created 2.30 -;astrundir => /var/run/asterisk 2.31 - 2.32 -; Where the Asterisk log files should be created 2.33 -;astlogdir => /var/log/asterisk 2.34 - 2.35 - 2.36 -;[options] 2.37 -;Under "options" you can enter configuration options 2.38 -;that you also can set with command line options 2.39 - 2.40 -;verbose = 0 ; Verbosity level for logging (-v) 2.41 -;debug = 3 ; Debug: "No" or value (1-4) 2.42 -;nofork=yes | no ; Background execution disabled (-f) 2.43 -;alwaysfork=yes | no ; Always background, even with -v or -d (-F) 2.44 -;console= yes | no ; Console mode (-c) 2.45 -;highpriority = yes | no ; Execute with high priority (-p) 2.46 -;initcrypto = yes | no ; Initialize crypto at startup (-i) 2.47 -;nocolor = yes | no ; Disable ANSI colors (-n) 2.48 -;dumpcore = yes | no ; Dump core on failure (-g) 2.49 -;quiet = yes | no ; Run quietly (-q) 2.50 -;timestamp = yes | no ; Force timestamping in CLI verbose output (-T) 2.51 -;runuser = asterisk ; User to run asterisk as (-U) NOTE: will require changes to 2.52 - ; directory and device permissions 2.53 -;rungroup = asterisk ; Group to run asterisk as (-G) 2.54 -;internal_timing = yes | no ; Enable internal timing support (-I) 2.55 - 2.56 -;These options have no command line equivalent 2.57 -;cache_record_files = yes | no ; Cache record() files in another directory until completion 2.58 -;record_cache_dir = <dir> 2.59 -;transcode_via_sln = yes | no ; Build transcode paths via SLINEAR 2.60 -;transmit_silence_during_record = yes | no ; send SLINEAR silence while channel is being recorded 2.61 -;maxload = 1.0 ; The maximum load average we accept calls for 2.62 -;maxcalls = 255 ; The maximum number of concurrent calls you want to allow 2.63 -;execincludes = yes | no ; Allow #exec entries in configuration files 2.64 -;dontwarn = yes | no ; Don't over-inform the Asterisk sysadm, he's a guru 2.65 -;systemname = <a_string> ; System name. Used to prefix CDR uniqueid and to fill ${SYSTEMNAME} 2.66 -;languageprefix = yes | no ; Should language code be last component of sound file name or first? 2.67 - ; when off, sound files are searched as <path>/<lang>/<file> 2.68 - ; when on, sound files are search as <lang>/<path>/<file> 2.69 - ; (only affects relative paths for sound files) 2.70 - 2.71 -;[files] 2.72 -; Changing the following lines may compromise your security 2.73 -; Asterisk.ctl is the pipe that is used to connect the remote CLI 2.74 -; (asterisk -r) to Asterisk. Changing these settings change the 2.75 -; permissions and ownership of this file. 2.76 -; The file is created when Asterisk starts, in the "astrundir" above. 2.77 - 2.78 -;astctlpermissions = 0660 2.79 -;astctlowner = root 2.80 -;astctlgroup = asterisk 2.81 -;astctl = asterisk.ctl
3.1 --- a/asterisk/asterisk.patch Sun Mar 20 19:27:35 2011 +0100 3.2 +++ b/asterisk/asterisk.patch Sun Mar 20 20:00:02 2011 +0100 3.3 @@ -1,2265 +1,810 @@ 3.4 -Index: cdr/cdr_sqlite.c 3.5 -diff -Nau cdr/cdr_sqlite.c.orig cdr/cdr_sqlite.c 3.6 ---- cdr/cdr_sqlite.c.orig 2007-06-14 23:50:40.000000000 +0200 3.7 -+++ cdr/cdr_sqlite.c 2009-04-24 00:30:33.000000000 +0200 3.8 -@@ -58,7 +58,7 @@ 3.9 - #define DATE_FORMAT "%Y-%m-%d %T" 3.10 +Index: Makefile 3.11 +--- Makefile.orig 2010-06-10 22:35:06.000000000 +0200 3.12 ++++ Makefile 2010-07-24 11:16:19.000000000 +0200 3.13 +@@ -126,40 +126,18 @@ 3.14 3.15 - static char *name = "sqlite"; 3.16 --static sqlite* db = NULL; 3.17 -+static sqlite3 *db = NULL; 3.18 + # Define standard directories for various platforms 3.19 + # These apply if they are not redefined in asterisk.conf 3.20 +-ifeq ($(OSARCH),SunOS) 3.21 +- ASTETCDIR=/var/etc/asterisk 3.22 +- ASTLIBDIR=/opt/asterisk/lib 3.23 +- ASTVARLIBDIR=/var/opt/asterisk 3.24 +- ASTDBDIR=$(ASTVARLIBDIR) 3.25 +- ASTKEYDIR=$(ASTVARLIBDIR) 3.26 +- ASTSPOOLDIR=/var/spool/asterisk 3.27 +- ASTLOGDIR=/var/log/asterisk 3.28 +- ASTHEADERDIR=/opt/asterisk/include 3.29 +- ASTSBINDIR=/opt/asterisk/sbin 3.30 +- ASTVARRUNDIR=/var/run/asterisk 3.31 +- ASTMANDIR=/opt/asterisk/man 3.32 +-else 3.33 + ASTETCDIR=$(sysconfdir)/asterisk 3.34 + ASTLIBDIR=$(libdir)/asterisk 3.35 + ASTHEADERDIR=$(includedir)/asterisk 3.36 + ASTSBINDIR=$(sbindir) 3.37 +- ASTSPOOLDIR=$(localstatedir)/spool/asterisk 3.38 +- ASTLOGDIR=$(localstatedir)/log/asterisk 3.39 +- ASTVARRUNDIR=$(localstatedir)/run/asterisk 3.40 ++ ASTSPOOLDIR=$(localstatedir)/spool 3.41 ++ ASTLOGDIR=$(localstatedir)/log 3.42 ++ ASTVARRUNDIR=$(localstatedir)/run 3.43 + ASTMANDIR=$(mandir) 3.44 +-ifneq ($(findstring BSD,$(OSARCH)),) 3.45 +- ASTVARLIBDIR=$(prefix)/share/asterisk 3.46 +- ASTVARRUNDIR=$(localstatedir)/run/asterisk 3.47 +- ASTDBDIR=$(localstatedir)/db/asterisk 3.48 +-else 3.49 +- ASTVARLIBDIR=$(localstatedir)/lib/asterisk 3.50 +- ASTDBDIR=$(ASTVARLIBDIR) 3.51 +-endif 3.52 ++ ASTVARLIBDIR=$(localstatedir)/lib 3.53 ++ ASTDBDIR=$(localstatedir)/db 3.54 + ASTKEYDIR=$(ASTVARLIBDIR) 3.55 +-endif 3.56 +-ifeq ($(ASTDATADIR),) 3.57 + ASTDATADIR:=$(ASTVARLIBDIR) 3.58 +-endif 3.59 3.60 - AST_MUTEX_DEFINE_STATIC(sqlite_lock); 3.61 + # Asterisk.conf is located in ASTETCDIR or by using the -C flag 3.62 + # when starting Asterisk 3.63 +@@ -259,12 +237,6 @@ 3.64 + _ASTCFLAGS+=-fsigned-char 3.65 + endif 3.66 3.67 -@@ -92,10 +92,10 @@ 3.68 - static int sqlite_log(struct ast_cdr *cdr) 3.69 - { 3.70 - int res = 0; 3.71 -- char *zErr = 0; 3.72 - struct tm tm; 3.73 - time_t t; 3.74 - char startstr[80], answerstr[80], endstr[80]; 3.75 -+ char *cdrsql = 0; 3.76 - int count; 3.77 - 3.78 - ast_mutex_lock(&sqlite_lock); 3.79 -@@ -113,7 +113,7 @@ 3.80 - strftime(endstr, sizeof(endstr), DATE_FORMAT, &tm); 3.81 - 3.82 - for(count=0; count<5; count++) { 3.83 -- res = sqlite_exec_printf(db, 3.84 -+ cdrsql = sqlite3_mprintf( 3.85 - "INSERT INTO cdr (" 3.86 - "clid,src,dst,dcontext," 3.87 - "channel,dstchannel,lastapp,lastdata, " 3.88 -@@ -138,8 +138,7 @@ 3.89 - # if LOG_USERFIELD 3.90 - ",'%q'" 3.91 - # endif 3.92 -- ")", NULL, NULL, &zErr, 3.93 -- cdr->clid, cdr->src, cdr->dst, cdr->dcontext, 3.94 -+ ")", cdr->clid, cdr->src, cdr->dst, cdr->dcontext, 3.95 - cdr->channel, cdr->dstchannel, cdr->lastapp, cdr->lastdata, 3.96 - startstr, answerstr, endstr, 3.97 - cdr->duration, cdr->billsec, cdr->disposition, cdr->amaflags, 3.98 -@@ -151,16 +150,13 @@ 3.99 - ,cdr->userfield 3.100 - # endif 3.101 - ); 3.102 -+ res = sqlite3_exec(db, cdrsql, 0, 0, 0); 3.103 -+ sqlite3_free(cdrsql); 3.104 - if (res != SQLITE_BUSY && res != SQLITE_LOCKED) 3.105 - break; 3.106 - usleep(200); 3.107 - } 3.108 - 3.109 -- if (zErr) { 3.110 -- ast_log(LOG_ERROR, "cdr_sqlite: %s\n", zErr); 3.111 -- free(zErr); 3.112 -- } 3.113 +-ifeq ($(OSARCH),FreeBSD) 3.114 +- # -V is understood by BSD Make, not by GNU make. 3.115 +- BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) 3.116 +- _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) 3.117 +-endif 3.118 - 3.119 - ast_mutex_unlock(&sqlite_lock); 3.120 - return res; 3.121 - } 3.122 -@@ -168,7 +164,7 @@ 3.123 - static int unload_module(void) 3.124 - { 3.125 - if (db) 3.126 -- sqlite_close(db); 3.127 -+ sqlite3_close(db); 3.128 - ast_cdr_unregister(name); 3.129 - return 0; 3.130 - } 3.131 -@@ -181,17 +177,16 @@ 3.132 - 3.133 - /* is the database there? */ 3.134 - snprintf(fn, sizeof(fn), "%s/cdr.db", ast_config_AST_LOG_DIR); 3.135 -- db = sqlite_open(fn, 0660, &zErr); 3.136 -+ sqlite3_open(fn, &db); 3.137 - if (!db) { 3.138 -- ast_log(LOG_ERROR, "cdr_sqlite: %s\n", zErr); 3.139 -- free(zErr); 3.140 -+ ast_log(LOG_ERROR, "cdr_sqlite: %s\n", sqlite3_errmsg(db)); 3.141 - return -1; 3.142 - } 3.143 - 3.144 - /* is the table there? */ 3.145 -- res = sqlite_exec(db, "SELECT COUNT(AcctId) FROM cdr;", NULL, NULL, NULL); 3.146 -+ res = sqlite3_exec(db, "SELECT COUNT(AcctId) FROM cdr;", NULL, NULL, NULL); 3.147 - if (res) { 3.148 -- res = sqlite_exec(db, sql_create_table, NULL, NULL, &zErr); 3.149 -+ res = sqlite3_exec(db, sql_create_table, NULL, NULL, &zErr); 3.150 - if (res) { 3.151 - ast_log(LOG_ERROR, "cdr_sqlite: Unable to create table 'cdr': %s\n", zErr); 3.152 - free(zErr); 3.153 -@@ -210,7 +205,7 @@ 3.154 - 3.155 - err: 3.156 - if (db) 3.157 -- sqlite_close(db); 3.158 -+ sqlite3_close(db); 3.159 - return -1; 3.160 - } 3.161 - 3.162 -Index: channels/chan_sip.c 3.163 -diff -Nau channels/chan_sip.c.orig channels/chan_sip.c 3.164 ---- channels/chan_sip.c.orig 2009-04-02 19:20:22.000000000 +0200 3.165 -+++ channels/chan_sip.c 2009-04-24 00:30:33.000000000 +0200 3.166 -@@ -7469,7 +7469,7 @@ 3.167 - 3.168 - ast_copy_string(from, get_header(&p->initreq, "From"), sizeof(from)); 3.169 - c = get_in_brackets(from); 3.170 -- if (strncasecmp(c, "sip:", 4)) { 3.171 -+ if (strncasecmp(c, "sip:", 4) && strncasecmp(c, "sips:", 5)) { 3.172 - ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", c); 3.173 - return -1; 3.174 - } 3.175 -@@ -7477,7 +7477,7 @@ 3.176 - 3.177 - ast_copy_string(to, get_header(&p->initreq, "To"), sizeof(to)); 3.178 - c = get_in_brackets(to); 3.179 -- if (strncasecmp(c, "sip:", 4)) { 3.180 -+ if (strncasecmp(c, "sip:", 4) && strncasecmp(c, "sips:", 5)) { 3.181 - ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", c); 3.182 - return -1; 3.183 - } 3.184 -@@ -8004,7 +8004,10 @@ 3.185 - of = get_in_brackets(from); 3.186 - ast_string_field_set(p, from, of); 3.187 - if (strncasecmp(of, "sip:", 4)) 3.188 -- ast_log(LOG_NOTICE, "From address missing 'sip:', using it anyway\n"); 3.189 -+ if (strncasecmp(of, "sips:", 5)) 3.190 -+ ast_log(LOG_NOTICE, "From address missing 'sip:' or 'sips:', using it anyway\n"); 3.191 -+ else 3.192 -+ of += 5; 3.193 - else 3.194 - of += 4; 3.195 - /* Get just the username part */ 3.196 -@@ -8280,7 +8283,10 @@ 3.197 - 3.198 - /* Make sure it's a SIP URL */ 3.199 - if (strncasecmp(contact, "sip:", 4)) { 3.200 -- ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip:) trying to use anyway\n", contact); 3.201 -+ if (strncasecmp(contact, "sips:", 5)) 3.202 -+ ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip: or sips:) trying to use anyway\n", contact); 3.203 -+ else 3.204 -+ contact += 5; 3.205 - } else 3.206 - contact += 4; 3.207 - 3.208 -@@ -8409,7 +8415,10 @@ 3.209 - 3.210 - /* Make sure it's a SIP URL */ 3.211 - if (strncasecmp(curi, "sip:", 4)) { 3.212 -- ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip:) trying to use anyway\n", curi); 3.213 -+ if (strncasecmp(curi, "sips:", 5)) 3.214 -+ ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip: or sips:) trying to use anyway\n", curi); 3.215 -+ else 3.216 -+ curi += 5; 3.217 - } else 3.218 - curi += 4; 3.219 - /* Ditch q */ 3.220 -@@ -9000,9 +9009,12 @@ 3.221 - 3.222 - if (!strncasecmp(c, "sip:", 4)) { 3.223 - name = c + 4; 3.224 -+ } 3.225 -+ else if (!strncasecmp(c, "sips:", 5)) { 3.226 -+ name = c + 5; 3.227 - } else { 3.228 - name = c; 3.229 -- ast_log(LOG_NOTICE, "Invalid to address: '%s' from %s (missing sip:) trying to use anyway...\n", c, ast_inet_ntoa(sin->sin_addr)); 3.230 -+ ast_log(LOG_NOTICE, "Invalid to address: '%s' from %s (missing sip: or sips:) trying to use anyway...\n", c, ast_inet_ntoa(sin->sin_addr)); 3.231 - } 3.232 - 3.233 - /* Strip off the domain name */ 3.234 -@@ -9162,10 +9174,15 @@ 3.235 - return 0; 3.236 - c = get_in_brackets(tmp); 3.237 - if (strncasecmp(c, "sip:", 4)) { 3.238 -- ast_log(LOG_WARNING, "Huh? Not an RDNIS SIP header (%s)?\n", c); 3.239 -- return -1; 3.240 -+ if (strncasecmp(c, "sips:", 5)) { 3.241 -+ ast_log(LOG_WARNING, "Huh? Not an RDNIS SIP header (%s)?\n", c); 3.242 -+ return -1; 3.243 -+ } 3.244 -+ else 3.245 -+ c += 5; 3.246 - } 3.247 -- c += 4; 3.248 -+ else 3.249 -+ c += 4; 3.250 - a = c; 3.251 - strsep(&a, "@;"); /* trim anything after @ or ; */ 3.252 - if (sip_debug_test_pvt(p)) 3.253 -@@ -9200,10 +9217,15 @@ 3.254 - uri = get_in_brackets(tmp); 3.255 - 3.256 - if (strncasecmp(uri, "sip:", 4)) { 3.257 -- ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", uri); 3.258 -- return -1; 3.259 -+ if (strncasecmp(uri, "sips:", 5)) { 3.260 -+ ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", uri); 3.261 -+ return -1; 3.262 -+ } 3.263 -+ else 3.264 -+ uri += 5; 3.265 - } 3.266 -- uri += 4; 3.267 -+ else 3.268 -+ uri += 4; 3.269 - 3.270 - /* Now find the From: caller ID and name */ 3.271 - ast_copy_string(tmpf, get_header(req, "From"), sizeof(tmpf)); 3.272 -@@ -9217,10 +9239,15 @@ 3.273 - 3.274 - if (!ast_strlen_zero(from)) { 3.275 - if (strncasecmp(from, "sip:", 4)) { 3.276 -- ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", from); 3.277 -- return -1; 3.278 -+ if (strncasecmp(from, "sips:", 5)) { 3.279 -+ ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", from); 3.280 -+ return -1; 3.281 -+ } 3.282 -+ else 3.283 -+ from += 5; 3.284 - } 3.285 -- from += 4; 3.286 -+ else 3.287 -+ from += 4; 3.288 - if ((a = strchr(from, '@'))) 3.289 - *a++ = '\0'; 3.290 - else 3.291 -@@ -9397,10 +9424,15 @@ 3.292 - ast_uri_decode(refer_to); 3.293 - 3.294 - if (strncasecmp(refer_to, "sip:", 4)) { 3.295 -- ast_log(LOG_WARNING, "Can't transfer to non-sip: URI. (Refer-to: %s)?\n", refer_to); 3.296 -- return -3; 3.297 -+ if (strncasecmp(refer_to, "sips:", 5)) { 3.298 -+ ast_log(LOG_WARNING, "Can't transfer to non-sip: URI. (Refer-to: %s)?\n", refer_to); 3.299 -+ return -3; 3.300 -+ } 3.301 -+ else 3.302 -+ refer_to += 5; /* Skip sips: */ 3.303 - } 3.304 -- refer_to += 4; /* Skip sip: */ 3.305 -+ else 3.306 -+ refer_to += 4; /* Skip sip: */ 3.307 - 3.308 - /* Get referred by header if it exists */ 3.309 - p_referred_by = get_header(req, "Referred-By"); 3.310 -@@ -9417,9 +9449,13 @@ 3.311 - } 3.312 - 3.313 - referred_by_uri = get_in_brackets(h_referred_by); 3.314 -- if(strncasecmp(referred_by_uri, "sip:", 4)) { 3.315 -- ast_log(LOG_WARNING, "Huh? Not a sip: header (Referred-by: %s). Skipping.\n", referred_by_uri); 3.316 -- referred_by_uri = (char *) NULL; 3.317 -+ if (strncasecmp(referred_by_uri, "sip:", 4)) { 3.318 -+ if (strncasecmp(referred_by_uri, "sips:", 5)) { 3.319 -+ ast_log(LOG_WARNING, "Huh? Not a sip: header (Referred-by: %s). Skipping.\n", referred_by_uri); 3.320 -+ referred_by_uri = (char *) NULL; 3.321 -+ } 3.322 -+ else 3.323 -+ referred_by_uri += 5; /* Skip sips: */ 3.324 - } else { 3.325 - referred_by_uri += 4; /* Skip sip: */ 3.326 - } 3.327 -@@ -9547,10 +9583,15 @@ 3.328 - ast_uri_decode(c); 3.329 - 3.330 - if (strncasecmp(c, "sip:", 4)) { 3.331 -- ast_log(LOG_WARNING, "Huh? Not a SIP header in Also: transfer (%s)?\n", c); 3.332 -- return -1; 3.333 -+ if (strncasecmp(c, "sips:", 5)) { 3.334 -+ ast_log(LOG_WARNING, "Huh? Not a SIP header in Also: transfer (%s)?\n", c); 3.335 -+ return -1; 3.336 -+ } 3.337 -+ else 3.338 -+ c += 5; 3.339 - } 3.340 -- c += 4; 3.341 -+ else 3.342 -+ c += 4; 3.343 - if ((a = strchr(c, ';'))) /* Remove arguments */ 3.344 - *a = '\0'; 3.345 - 3.346 -@@ -9761,6 +9802,8 @@ 3.347 - t = uri2; 3.348 - if (!strncasecmp(t, "sip:", 4)) 3.349 - t+= 4; 3.350 -+ else if (!strncasecmp(t, "sips:", 5)) 3.351 -+ t+= 5; 3.352 - ast_string_field_set(p, exten, t); 3.353 - t = strchr(p->exten, '@'); 3.354 - if (t) 3.355 -@@ -9771,7 +9814,10 @@ 3.356 - /* save the URI part of the From header */ 3.357 - ast_string_field_set(p, from, of); 3.358 - if (strncasecmp(of, "sip:", 4)) { 3.359 -- ast_log(LOG_NOTICE, "From address missing 'sip:', using it anyway\n"); 3.360 -+ if (strncasecmp(of, "sips:", 5)) 3.361 -+ ast_log(LOG_NOTICE, "From address missing 'sip:' or 'sips:', using it anyway\n"); 3.362 -+ else 3.363 -+ of += 5; 3.364 - } else 3.365 - of += 4; 3.366 - /* Get just the username part */ 3.367 -@@ -12379,6 +12425,8 @@ 3.368 - if (ast_test_flag(&p->flags[0], SIP_PROMISCREDIR)) { 3.369 - if (!strncasecmp(s, "sip:", 4)) 3.370 - s += 4; 3.371 -+ else if (!strncasecmp(s, "sips:", 5)) 3.372 -+ s += 5; 3.373 - e = strchr(s, ';'); 3.374 - if (e) 3.375 - *e = '\0'; 3.376 -@@ -12404,6 +12452,8 @@ 3.377 - 3.378 - if (!strncasecmp(s, "sip:", 4)) 3.379 - s += 4; 3.380 -+ else if (!strncasecmp(s, "sips:", 5)) 3.381 -+ s += 5; 3.382 - if (option_debug > 1) 3.383 - ast_log(LOG_DEBUG, "Received 302 Redirect to extension '%s' (domain %s)\n", s, domain); 3.384 - if (p->owner) { 3.385 -Index: codecs/codec_g722.c 3.386 -diff -Nau codecs/codec_g722.c.orig codecs/codec_g722.c 3.387 ---- codecs/codec_g722.c.orig 1970-01-01 01:00:00.000000000 +0100 3.388 -+++ codecs/codec_g722.c 2009-04-24 00:30:33.000000000 +0200 3.389 -@@ -0,0 +1,306 @@ 3.390 -+/* 3.391 -+ * Asterisk -- An open source telephony toolkit. 3.392 -+ * 3.393 -+ * Copyright (C) 1999 - 2008, Digium, Inc. 3.394 -+ * 3.395 -+ * Matthew Fredrickson <creslin@digium.com> 3.396 -+ * Russell Bryant <russell@digium.com> 3.397 -+ * 3.398 -+ * Special thanks to Steve Underwood for the implementation 3.399 -+ * and for doing the 8khz<->g.722 direct translation code. 3.400 -+ * 3.401 -+ * See http://www.asterisk.org for more information about 3.402 -+ * the Asterisk project. Please do not directly contact 3.403 -+ * any of the maintainers of this project for assistance; 3.404 -+ * the project provides a web site, mailing lists and IRC 3.405 -+ * channels for your use. 3.406 -+ * 3.407 -+ * This program is free software, distributed under the terms of 3.408 -+ * the GNU General Public License Version 2. See the LICENSE file 3.409 -+ * at the top of the source tree. 3.410 -+ */ 3.411 -+ 3.412 -+/*! \file 3.413 -+ * 3.414 -+ * \brief codec_g722.c - translate between signed linear and ITU G.722-64kbps 3.415 -+ * 3.416 -+ * \author Matthew Fredrickson <creslin@digium.com> 3.417 -+ * \author Russell Bryant <russell@digium.com> 3.418 -+ * 3.419 -+ * \arg http://soft-switch.org/downloads/non-gpl-bits.tgz 3.420 -+ * \arg http://lists.digium.com/pipermail/asterisk-dev/2006-September/022866.html 3.421 -+ * 3.422 -+ * \ingroup codecs 3.423 -+ */ 3.424 + ifeq ($(OSARCH),NetBSD) 3.425 + _ASTCFLAGS+=-pthread -I/usr/pkg/include 3.426 + endif 3.427 +@@ -567,8 +539,7 @@ 3.428 + fi 3.429 + mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation 3.430 + mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation/thirdparty 3.431 +- mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv 3.432 +- mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom 3.433 ++ mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr 3.434 + mkdir -p $(DESTDIR)$(ASTDATADIR)/keys 3.435 + mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware 3.436 + mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax 3.437 +Index: apps/app_backticks.c 3.438 +--- apps/app_backticks.c.orig 2010-07-24 11:12:31.000000000 +0200 3.439 ++++ apps/app_backticks.c 2010-07-24 11:12:31.000000000 +0200 3.440 +@@ -0,0 +1,129 @@ 3.441 + 3.442 +#include "asterisk.h" 3.443 + 3.444 -+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 106501 $") 3.445 ++ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.53 $") 3.446 + 3.447 -+#include "asterisk/linkedlists.h" 3.448 -+#include "asterisk/module.h" 3.449 -+#include "asterisk/config.h" 3.450 -+#include "asterisk/options.h" 3.451 -+#include "asterisk/translate.h" 3.452 -+#include "asterisk/utils.h" 3.453 ++#include <stdio.h> 3.454 ++#include <asterisk/file.h> 3.455 ++#include <asterisk/logger.h> 3.456 ++#include <asterisk/channel.h> 3.457 ++#include <asterisk/pbx.h> 3.458 ++#include <asterisk/module.h> 3.459 ++#include <asterisk/lock.h> 3.460 ++#include <asterisk/app.h> 3.461 ++#include <stdlib.h> 3.462 ++#include <unistd.h> 3.463 ++#include <string.h> 3.464 + 3.465 -+#define BUFFER_SAMPLES 8096 /* size for the translation buffers */ 3.466 -+#define BUF_SHIFT 5 3.467 ++static char *app = "BackTicks"; 3.468 ++static char *synopsis = "Execute a shell command and save the result as a variable."; 3.469 ++static char *desc = " Backticks(<VARNAME>|<command>)\n\n" 3.470 ++ "Be sure to include a full path to the command!\n"; 3.471 + 3.472 -+/* Sample frame data */ 3.473 ++static char *do_backticks(char *command, char *buf, size_t len) 3.474 ++{ 3.475 ++ int fds[2], pid = 0; 3.476 ++ char *ret = NULL; 3.477 + 3.478 -+#include "g722/g722.h" 3.479 -+#include "slin_g722_ex.h" 3.480 -+#include "g722_slin_ex.h" 3.481 -+ 3.482 -+struct g722_encoder_pvt { 3.483 -+ g722_encode_state_t g722; 3.484 -+}; 3.485 -+ 3.486 -+struct g722_decoder_pvt { 3.487 -+ g722_decode_state_t g722; 3.488 -+}; 3.489 -+ 3.490 -+/*! \brief init a new instance of g722_encoder_pvt. */ 3.491 -+static int lintog722_new(struct ast_trans_pvt *pvt) 3.492 -+{ 3.493 -+ struct g722_encoder_pvt *tmp = pvt->pvt; 3.494 -+ 3.495 -+ g722_encode_init(&tmp->g722, 64000, G722_SAMPLE_RATE_8000); 3.496 -+ 3.497 -+ return 0; 3.498 ++ memset(buf, 0, len); 3.499 ++ if (pipe(fds)) { 3.500 ++ ast_log(LOG_WARNING, "Pipe/Exec failed\n"); 3.501 ++ } else { 3.502 ++ pid = fork(); 3.503 ++ if (pid < 0) { 3.504 ++ ast_log(LOG_WARNING, "Fork failed\n"); 3.505 ++ close(fds[0]); 3.506 ++ close(fds[1]); 3.507 ++ } else if (pid) { 3.508 ++ /* parent */ 3.509 ++ close(fds[1]); 3.510 ++ read(fds[0], buf, len); 3.511 ++ close(fds[0]); 3.512 ++ ret = buf; 3.513 ++ } else { 3.514 ++ /* child */ 3.515 ++ char *argv[255] = {0}; 3.516 ++ int argc = 0; 3.517 ++ char *p; 3.518 ++ char *mycmd = ast_strdupa(command); 3.519 ++ close(fds[0]); 3.520 ++ dup2(fds[1], STDOUT_FILENO); 3.521 ++ argv[argc++] = mycmd; 3.522 ++ do { 3.523 ++ if ((p = strchr(mycmd, ' '))) { 3.524 ++ *p = '\0'; 3.525 ++ mycmd = ++p; 3.526 ++ argv[argc++] = mycmd; 3.527 ++ } 3.528 ++ } while (p != NULL); 3.529 ++ close(fds[1]); 3.530 ++ execv(argv[0], argv); 3.531 ++ ast_log(LOG_ERROR, "exec of %s failed\n", argv[0]); 3.532 ++ exit(0); 3.533 ++ } 3.534 ++ } 3.535 ++ return ret; 3.536 +} 3.537 + 3.538 -+static int lin16tog722_new(struct ast_trans_pvt *pvt) 3.539 ++static int backticks_exec(struct ast_channel *chan, void *data) 3.540 +{ 3.541 -+ struct g722_encoder_pvt *tmp = pvt->pvt; 3.542 -+ 3.543 -+ g722_encode_init(&tmp->g722, 64000, 0); 3.544 -+ 3.545 -+ return 0; 3.546 ++ int res = 0; 3.547 ++ const char *usage = "Usage: Backticks(<VARNAME>|<command>)"; 3.548 ++ char buf[1024], *argv[2], *mydata; 3.549 ++ int argc = 0; 3.550 ++ 3.551 ++ if (!data) { 3.552 ++ ast_log(LOG_WARNING, "%s\n", usage); 3.553 ++ return -1; 3.554 ++ } 3.555 ++ ast_autoservice_start(chan); 3.556 ++ if (!(mydata = ast_strdupa(data))) { 3.557 ++ ast_log(LOG_ERROR, "Memory Error!\n"); 3.558 ++ res = -1; 3.559 ++ } else { 3.560 ++ if((argc = ast_app_separate_args(mydata, '|', argv, sizeof(argv) / sizeof(argv[0]))) < 2) { 3.561 ++ ast_log(LOG_WARNING, "%s\n", usage); 3.562 ++ res = -1; 3.563 ++ } 3.564 ++ if (do_backticks(argv[1], buf, sizeof(buf))) 3.565 ++ pbx_builtin_setvar_helper(chan, argv[0], buf); 3.566 ++ else { 3.567 ++ ast_log(LOG_WARNING, "No Data!\n"); 3.568 ++ res = -1; 3.569 ++ } 3.570 ++ } 3.571 ++ ast_autoservice_stop(chan); 3.572 ++ return res; 3.573 +} 3.574 + 3.575 -+/*! \brief init a new instance of g722_encoder_pvt. */ 3.576 -+static int g722tolin_new(struct ast_trans_pvt *pvt) 3.577 ++static int function_backticks(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) 3.578 +{ 3.579 -+ struct g722_decoder_pvt *tmp = pvt->pvt; 3.580 -+ 3.581 -+ g722_decode_init(&tmp->g722, 64000, G722_SAMPLE_RATE_8000); 3.582 -+ 3.583 -+ return 0; 3.584 ++ if (!do_backticks(data, buf, len)) { 3.585 ++ ast_log(LOG_WARNING, "No Data!\n"); 3.586 ++ return -1; 3.587 ++ } 3.588 ++ return 0; 3.589 +} 3.590 + 3.591 -+static int g722tolin16_new(struct ast_trans_pvt *pvt) 3.592 -+{ 3.593 -+ struct g722_decoder_pvt *tmp = pvt->pvt; 3.594 -+ 3.595 -+ g722_decode_init(&tmp->g722, 64000, 0); 3.596 -+ 3.597 -+ return 0; 3.598 -+} 3.599 -+ 3.600 -+static int g722tolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) 3.601 -+{ 3.602 -+ struct g722_decoder_pvt *tmp = pvt->pvt; 3.603 -+ int out_samples; 3.604 -+ int in_samples; 3.605 -+ 3.606 -+ /* g722_decode expects the samples to be in the invalid samples / 2 format */ 3.607 -+ in_samples = f->samples / 2; 3.608 -+ 3.609 -+ out_samples = g722_decode(&tmp->g722, (int16_t *) &pvt->outbuf[pvt->samples * sizeof(int16_t)], 3.610 -+ (uint8_t *) f->data, in_samples); 3.611 -+ 3.612 -+ pvt->samples += out_samples; 3.613 -+ 3.614 -+ pvt->datalen += (out_samples * sizeof(int16_t)); 3.615 -+ 3.616 -+ return 0; 3.617 -+} 3.618 -+ 3.619 -+static int lintog722_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) 3.620 -+{ 3.621 -+ struct g722_encoder_pvt *tmp = pvt->pvt; 3.622 -+ int outlen; 3.623 -+ 3.624 -+ outlen = g722_encode(&tmp->g722, (uint8_t *) (&pvt->outbuf[pvt->datalen]), 3.625 -+ (int16_t *) f->data, f->samples); 3.626 -+ 3.627 -+ pvt->samples += outlen * 2; 3.628 -+ 3.629 -+ pvt->datalen += outlen; 3.630 -+ 3.631 -+ return 0; 3.632 -+} 3.633 -+ 3.634 -+static struct ast_frame *g722tolin_sample(void) 3.635 -+{ 3.636 -+ static struct ast_frame f = { 3.637 -+ .frametype = AST_FRAME_VOICE, 3.638 -+ .subclass = AST_FORMAT_G722, 3.639 -+ .datalen = sizeof(g722_slin_ex), 3.640 -+ .samples = sizeof(g722_slin_ex) * 2, 3.641 -+ .src = __PRETTY_FUNCTION__, 3.642 -+ .data = g722_slin_ex, 3.643 -+ }; 3.644 -+ 3.645 -+ return &f; 3.646 -+} 3.647 -+ 3.648 -+static struct ast_frame *g722tolin16_sample(void) 3.649 -+{ 3.650 -+ static struct ast_frame f = { 3.651 -+ .frametype = AST_FRAME_VOICE, 3.652 -+ .subclass = AST_FORMAT_G722, 3.653 -+ .datalen = sizeof(slin_g722_ex), 3.654 -+ .samples = sizeof(slin_g722_ex) * 2, 3.655 -+ .src = __PRETTY_FUNCTION__, 3.656 -+ .data = slin_g722_ex, 3.657 -+ }; 3.658 -+ 3.659 -+ return &f; 3.660 -+} 3.661 -+ 3.662 -+static struct ast_frame *lintog722_sample (void) 3.663 -+{ 3.664 -+ static struct ast_frame f = { 3.665 -+ .frametype = AST_FRAME_VOICE, 3.666 -+ .subclass = AST_FORMAT_SLINEAR, 3.667 -+ .datalen = sizeof(slin_g722_ex), 3.668 -+ .samples = sizeof(slin_g722_ex) / sizeof(slin_g722_ex[0]), 3.669 -+ .src = __PRETTY_FUNCTION__, 3.670 -+ .data = slin_g722_ex, 3.671 -+ }; 3.672 -+ 3.673 -+ return &f; 3.674 -+} 3.675 -+ 3.676 -+static struct ast_frame *lin16tog722_sample (void) 3.677 -+{ 3.678 -+ static struct ast_frame f = { 3.679 -+ .frametype = AST_FRAME_VOICE, 3.680 -+ .subclass = AST_FORMAT_SLINEAR16, 3.681 -+ .datalen = sizeof(slin_g722_ex), 3.682 -+ .samples = sizeof(slin_g722_ex) / sizeof(slin_g722_ex[0]), 3.683 -+ .src = __PRETTY_FUNCTION__, 3.684 -+ .data = slin_g722_ex, 3.685 -+ }; 3.686 -+ 3.687 -+ return &f; 3.688 -+} 3.689 -+ 3.690 -+static struct ast_translator g722tolin = { 3.691 -+ .name = "g722tolin", 3.692 -+ .srcfmt = AST_FORMAT_G722, 3.693 -+ .dstfmt = AST_FORMAT_SLINEAR, 3.694 -+ .newpvt = g722tolin_new, /* same for both directions */ 3.695 -+ .framein = g722tolin_framein, 3.696 -+ .sample = g722tolin_sample, 3.697 -+ .desc_size = sizeof(struct g722_decoder_pvt), 3.698 -+ .buffer_samples = BUFFER_SAMPLES / sizeof(int16_t), 3.699 -+ .buf_size = BUFFER_SAMPLES, 3.700 -+ .plc_samples = 160, 3.701 ++static struct ast_custom_function backticks_function = { 3.702 ++ .name = "BACKTICKS", 3.703 ++ .desc = "Executes a shell command and evaluates to the result.", 3.704 ++ .syntax = "BACKTICKS(<command>)", 3.705 ++ .synopsis = "Executes a shell command.", 3.706 ++ .read = function_backticks 3.707 +}; 3.708 + 3.709 -+static struct ast_translator lintog722 = { 3.710 -+ .name = "lintog722", 3.711 -+ .srcfmt = AST_FORMAT_SLINEAR, 3.712 -+ .dstfmt = AST_FORMAT_G722, 3.713 -+ .newpvt = lintog722_new, /* same for both directions */ 3.714 -+ .framein = lintog722_framein, 3.715 -+ .sample = lintog722_sample, 3.716 -+ .desc_size = sizeof(struct g722_encoder_pvt), 3.717 -+ .buffer_samples = BUFFER_SAMPLES * 2, 3.718 -+ .buf_size = BUFFER_SAMPLES, 3.719 -+}; 3.720 -+ 3.721 -+static struct ast_translator g722tolin16 = { 3.722 -+ .name = "g722tolin16", 3.723 -+ .srcfmt = AST_FORMAT_G722, 3.724 -+ .dstfmt = AST_FORMAT_SLINEAR16, 3.725 -+ .newpvt = g722tolin16_new, /* same for both directions */ 3.726 -+ .framein = g722tolin_framein, 3.727 -+ .sample = g722tolin16_sample, 3.728 -+ .desc_size = sizeof(struct g722_decoder_pvt), 3.729 -+ .buffer_samples = BUFFER_SAMPLES / sizeof(int16_t), 3.730 -+ .buf_size = BUFFER_SAMPLES, 3.731 -+ .plc_samples = 160, 3.732 -+}; 3.733 -+ 3.734 -+static struct ast_translator lin16tog722 = { 3.735 -+ .name = "lin16tog722", 3.736 -+ .srcfmt = AST_FORMAT_SLINEAR16, 3.737 -+ .dstfmt = AST_FORMAT_G722, 3.738 -+ .newpvt = lin16tog722_new, /* same for both directions */ 3.739 -+ .framein = lintog722_framein, 3.740 -+ .sample = lin16tog722_sample, 3.741 -+ .desc_size = sizeof(struct g722_encoder_pvt), 3.742 -+ .buffer_samples = BUFFER_SAMPLES * 2, 3.743 -+ .buf_size = BUFFER_SAMPLES, 3.744 -+}; 3.745 -+ 3.746 -+static int parse_config(int reload) 3.747 -+{ 3.748 -+ struct ast_variable *var; 3.749 -+ struct ast_config *cfg = ast_config_load("codecs.conf"); 3.750 -+ 3.751 -+ if (cfg == NULL) 3.752 -+ return 0; 3.753 -+ if (cfg == CONFIG_STATUS_FILEUNCHANGED) 3.754 -+ return 0; 3.755 -+ for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) { 3.756 -+ if (!strcasecmp(var->name, "genericplc")) { 3.757 -+ g722tolin.useplc = ast_true(var->value) ? 1 : 0; 3.758 -+ if (option_verbose > 2) 3.759 -+ ast_verbose(VERBOSE_PREFIX_3 "codec_g722: %susing generic PLC\n", 3.760 -+ g722tolin.useplc ? "" : "not "); 3.761 -+ } 3.762 -+ } 3.763 -+ ast_config_destroy(cfg); 3.764 -+ return 0; 3.765 -+} 3.766 -+ 3.767 -+static int reload(void) 3.768 -+{ 3.769 -+ if (parse_config(1)) 3.770 -+ return AST_MODULE_LOAD_DECLINE; 3.771 -+ return AST_MODULE_LOAD_SUCCESS; 3.772 -+} 3.773 -+ 3.774 +static int unload_module(void) 3.775 +{ 3.776 -+ int res = 0; 3.777 -+ 3.778 -+ res |= ast_unregister_translator(&g722tolin); 3.779 -+ res |= ast_unregister_translator(&lintog722); 3.780 -+ res |= ast_unregister_translator(&g722tolin16); 3.781 -+ res |= ast_unregister_translator(&lin16tog722); 3.782 -+ 3.783 -+ return res; 3.784 ++ ast_custom_function_unregister(&backticks_function); 3.785 ++ return ast_unregister_application(app); 3.786 +} 3.787 + 3.788 +static int load_module(void) 3.789 +{ 3.790 -+ int res = 0; 3.791 -+ 3.792 -+ if (parse_config(0)) 3.793 -+ return AST_MODULE_LOAD_DECLINE; 3.794 -+ 3.795 -+ res |= ast_register_translator(&g722tolin); 3.796 -+ res |= ast_register_translator(&lintog722); 3.797 -+ res |= ast_register_translator(&g722tolin16); 3.798 -+ res |= ast_register_translator(&lin16tog722); 3.799 -+ 3.800 -+ if (res) { 3.801 -+ unload_module(); 3.802 -+ return AST_MODULE_LOAD_FAILURE; 3.803 -+ } 3.804 -+ 3.805 -+ return AST_MODULE_LOAD_SUCCESS; 3.806 ++ ast_custom_function_register(&backticks_function); 3.807 ++ return ast_register_application(app, backticks_exec, synopsis, desc); 3.808 +} 3.809 + 3.810 -+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ITU G.722-64kbps G722 Transcoder", 3.811 -+ .load = load_module, 3.812 -+ .unload = unload_module, 3.813 -+ .reload = reload, 3.814 -+ ); 3.815 -Index: codecs/g722/g722_decode.c 3.816 -diff -Nau codecs/g722/g722_decode.c.orig codecs/g722/g722_decode.c 3.817 ---- codecs/g722/g722_decode.c.orig 1970-01-01 01:00:00.000000000 +0100 3.818 -+++ codecs/g722/g722_decode.c 2009-04-24 00:30:33.000000000 +0200 3.819 -@@ -0,0 +1,398 @@ 3.820 -+/* 3.821 -+ * SpanDSP - a series of DSP components for telephony 3.822 -+ * 3.823 -+ * g722_decode.c - The ITU G.722 codec, decode part. 3.824 -+ * 3.825 -+ * Written by Steve Underwood <steveu@coppice.org> 3.826 -+ * 3.827 -+ * Copyright (C) 2005 Steve Underwood 3.828 -+ * 3.829 -+ * Despite my general liking of the GPL, I place my own contributions 3.830 -+ * to this code in the public domain for the benefit of all mankind - 3.831 -+ * even the slimy ones who might try to proprietize my work and use it 3.832 -+ * to my detriment. 3.833 -+ * 3.834 -+ * Based in part on a single channel G.722 codec which is: 3.835 -+ * 3.836 -+ * Copyright (c) CMU 1993 3.837 -+ * Computer Science, Speech Group 3.838 -+ * Chengxiang Lu and Alex Hauptmann 3.839 -+ * 3.840 -+ * $Id: g722_decode.c 48661 2006-12-21 00:08:21Z mattf $ 3.841 -+ */ 3.842 ++AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "BACKTICKS() dialplan function"); 3.843 + 3.844 -+/*! \file */ 3.845 +Index: apps/app_meetme.c 3.846 +--- apps/app_meetme.c.orig 2010-06-23 23:15:53.000000000 +0200 3.847 ++++ apps/app_meetme.c 2010-07-24 11:12:31.000000000 +0200 3.848 +@@ -522,6 +522,7 @@ 3.849 + CONFFLAG_DURATION_LIMIT = (1 << 30), 3.850 + /*! Do not write any audio to this channel until the state is up. */ 3.851 + CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31), 3.852 ++ CONFFLAG_USERNAME = (1 << 31), 3.853 + }; 3.854 + 3.855 + enum { 3.856 +@@ -531,6 +532,7 @@ 3.857 + OPT_ARG_DURATION_LIMIT = 3, 3.858 + OPT_ARG_MOH_CLASS = 4, 3.859 + OPT_ARG_ARRAY_SIZE = 5, 3.860 ++ OPT_ARG_USERNAME = 6, 3.861 + }; 3.862 + 3.863 + AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS 3.864 +@@ -563,6 +565,7 @@ 3.865 + AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ), 3.866 + AST_APP_OPTION_ARG('S', CONFFLAG_DURATION_STOP, OPT_ARG_DURATION_STOP), 3.867 + AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT), 3.868 ++ AST_APP_OPTION_ARG('n', CONFFLAG_USERNAME, OPT_ARG_USERNAME), 3.869 + END_OPTIONS ); 3.870 + 3.871 + static const char *app = "MeetMe"; 3.872 +@@ -2243,6 +2246,12 @@ 3.873 + if (!(confflags & CONFFLAG_QUIET) && ((confflags & CONFFLAG_INTROUSER) || (confflags & CONFFLAG_INTROUSERNOREVIEW))) { 3.874 + char destdir[PATH_MAX]; 3.875 + 3.876 ++ if ( (confflags & CONFFLAG_USERNAME) 3.877 ++ && !ast_strlen_zero(optargs[OPT_ARG_USERNAME]) 3.878 ++ && ast_fileexists(optargs[OPT_ARG_USERNAME], NULL, NULL)) 3.879 ++ snprintf(destdir, sizeof(destdir), "%s", optargs[OPT_ARG_USERNAME]); 3.880 ++ else { 3.881 + 3.882 -+#ifdef HAVE_CONFIG_H 3.883 -+#include <config.h> 3.884 + snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR); 3.885 + 3.886 + if (ast_mkdir(destdir, 0777) != 0) { 3.887 +@@ -2259,6 +2268,7 @@ 3.888 + res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL); 3.889 + if (res == -1) 3.890 + goto outrun; 3.891 ++ } 3.892 + } 3.893 + 3.894 + ast_mutex_lock(&conf->playlock); 3.895 +Index: build_tools/make_defaults_h 3.896 +--- build_tools/make_defaults_h.orig 2008-01-24 23:58:10.000000000 +0100 3.897 ++++ build_tools/make_defaults_h 2010-07-24 11:12:31.000000000 +0200 3.898 +@@ -17,7 +17,7 @@ 3.899 + #define DEFAULT_PID "${INSTALL_PATH}${ASTVARRUNDIR}/asterisk.pid" 3.900 + 3.901 + #define DEFAULT_VAR_DIR "${INSTALL_PATH}${ASTVARLIBDIR}" 3.902 +-#define DEFAULT_DB "${INSTALL_PATH}${ASTDBDIR}/astdb" 3.903 ++#define DEFAULT_DB "${INSTALL_PATH}${ASTDBDIR}/asterisk.db" 3.904 + 3.905 + #define DEFAULT_DATA_DIR "${INSTALL_PATH}${ASTDATADIR}" 3.906 + #define DEFAULT_KEY_DIR "${INSTALL_PATH}${ASTDATADIR}/keys" 3.907 +Index: cdr/cdr_custom.c 3.908 +--- cdr/cdr_custom.c.orig 2008-11-20 18:48:58.000000000 +0100 3.909 ++++ cdr/cdr_custom.c 2010-07-24 11:12:31.000000000 +0200 3.910 +@@ -83,7 +83,7 @@ 3.911 + ast_log(LOG_WARNING, "Format string too long, will be truncated, at line %d\n", var->lineno); 3.912 + ast_copy_string(format, var->value, sizeof(format) - 1); 3.913 + strcat(format,"\n"); 3.914 +- snprintf(master, sizeof(master),"%s/%s/%s", ast_config_AST_LOG_DIR, name, var->name); 3.915 ++ snprintf(master, sizeof(master),"%s/cdr/%s", ast_config_AST_LOG_DIR, var->name); 3.916 + if (var->next) { 3.917 + ast_log(LOG_NOTICE, "Sorry, only one mapping is supported at this time, mapping '%s' will be ignored at line %d.\n", var->next->name, var->next->lineno); 3.918 + break; 3.919 +Index: cdr/cdr_sqlite3_custom.c 3.920 +--- cdr/cdr_sqlite3_custom.c.orig 2010-04-13 18:38:41.000000000 +0200 3.921 ++++ cdr/cdr_sqlite3_custom.c 2010-07-24 11:12:31.000000000 +0200 3.922 +@@ -300,7 +300,7 @@ 3.923 + } 3.924 + 3.925 + /* is the database there? */ 3.926 +- snprintf(filename, sizeof(filename), "%s/master.db", ast_config_AST_LOG_DIR); 3.927 ++ snprintf(filename, sizeof(filename), "%s/cdr/master.db", ast_config_AST_LOG_DIR); 3.928 + res = sqlite3_open(filename, &db); 3.929 + if (res != SQLITE_OK) { 3.930 + ast_log(LOG_ERROR, "Could not open database %s.\n", filename); 3.931 +Index: chan_capi-1.1.5/Makefile 3.932 +--- chan_capi-1.1.5/Makefile.orig 2010-04-06 19:33:25.000000000 +0200 3.933 ++++ chan_capi-1.1.5/Makefile 2010-07-24 11:12:31.000000000 +0200 3.934 +@@ -100,6 +100,9 @@ 3.935 + CFLAGS+=-O2 3.936 + CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) 3.937 + CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi) 3.938 ++ifeq (${USE_OWN_LIBCAPI},yes) 3.939 ++CFLAGS+=-DUSE_OWN_LIBCAPI 3.940 ++endif 3.941 + 3.942 + LIBS=-ldl -lpthread -lm 3.943 + CC=gcc 3.944 +Index: chan_capi-1.1.5/chan_capi20.h 3.945 +--- chan_capi-1.1.5/chan_capi20.h.orig 2005-09-20 20:33:40.000000000 +0200 3.946 ++++ chan_capi-1.1.5/chan_capi20.h 2010-07-24 11:12:31.000000000 +0200 3.947 +@@ -8,6 +8,8 @@ 3.948 + 3.949 + #undef CAPI_OS_HINT 3.950 + 3.951 ++#ifndef USE_OWN_LIBCAPI 3.952 ++ 3.953 + #if (defined(__FreeBSD__) || defined(__OpenBSD__) || \ 3.954 + defined(__NetBSD__) || defined(__APPLE__)) 3.955 + 3.956 +@@ -29,6 +31,8 @@ 3.957 + #include <capiutils.h> 3.958 + #endif /* BSD */ 3.959 + 3.960 +#endif 3.961 + 3.962 -+#include <stdio.h> 3.963 -+#include <inttypes.h> 3.964 -+#include <memory.h> 3.965 -+#include <stdlib.h> 3.966 + #ifndef HEADER_CID 3.967 + #define HEADER_CID(x) ((x)->adr.adrNCCI) 3.968 + #endif 3.969 +Index: chan_capi-1.1.5/chan_capi_utils.c 3.970 +--- chan_capi-1.1.5/chan_capi_utils.c.orig 2010-04-06 19:33:25.000000000 +0200 3.971 ++++ chan_capi-1.1.5/chan_capi_utils.c 2010-07-24 11:12:31.000000000 +0200 3.972 +@@ -1087,6 +1087,9 @@ 3.973 + { 3.974 + MESSAGE_EXCHANGE_ERROR error; 3.975 + int waitcount = 50; 3.976 ++#ifndef CAPI_MANUFACTURER_LEN 3.977 ++#define CAPI_MANUFACTURER_LEN 64 3.978 ++#endif 3.979 + unsigned char manbuf[CAPI_MANUFACTURER_LEN]; 3.980 + _cmsg CMSG; 3.981 + 3.982 +Index: chan_capi-1.1.5/libcapi20/capi20.c 3.983 +--- chan_capi-1.1.5/libcapi20/capi20.c.orig 2010-04-06 19:33:25.000000000 +0200 3.984 ++++ chan_capi-1.1.5/libcapi20/capi20.c 2010-07-24 11:12:31.000000000 +0200 3.985 +@@ -19,8 +19,10 @@ 3.986 + #include <stdio.h> 3.987 + #include <ctype.h> 3.988 + #include <assert.h> 3.989 ++#ifdef __linux__ 3.990 + #define _LINUX_LIST_H 3.991 + #include <linux/capi.h> 3.992 ++#endif 3.993 + 3.994 + #include <sys/socket.h> 3.995 + #include <netinet/in.h> 3.996 +@@ -48,17 +50,23 @@ 3.997 + 3.998 + #define SEND_BUFSIZ (128+2048) 3.999 + 3.1000 +#if 0 3.1001 -+#include <tgmath.h> 3.1002 + static char capidevname[] = "/dev/capi20"; 3.1003 + static char capidevnamenew[] = "/dev/isdn/capi20"; 3.1004 ++#endif 3.1005 + 3.1006 + static int capi_fd = -1; 3.1007 ++#if 0 3.1008 + static capi_ioctl_struct ioctl_data; 3.1009 ++#endif 3.1010 + 3.1011 + static int remote_capi; 3.1012 ++#if 0 3.1013 + static char *globalconfigfilename = "/etc/capi20.conf"; 3.1014 + static char *userconfigfilename = ".capi20rc"; 3.1015 + static unsigned short int port; 3.1016 + static char hostname[1024]; 3.1017 ++#endif 3.1018 + static int tracelevel; 3.1019 + static char *tracefile; 3.1020 + 3.1021 +@@ -77,17 +85,21 @@ 3.1022 + #define RCAPI_AUTH_USER_REQ CAPICMD(0xff, 0x00) 3.1023 + #define RCAPI_AUTH_USER_CONF CAPICMD(0xff, 0x01) 3.1024 + 3.1025 ++#if 0 3.1026 + static char *skip_whitespace(char *s) 3.1027 + { 3.1028 + while (*s && isspace(*s)) s++; 3.1029 + return s; 3.1030 + } 3.1031 ++#endif 3.1032 + 3.1033 ++#if 0 3.1034 + static char *skip_nonwhitespace(char *s) 3.1035 + { 3.1036 + while (*s && !isspace(*s)) s++; 3.1037 + return s; 3.1038 + } 3.1039 ++#endif 3.1040 + 3.1041 + static unsigned char get_byte(unsigned char **p) 3.1042 + { 3.1043 +@@ -95,10 +107,12 @@ 3.1044 + return((unsigned char)*(*p - 1)); 3.1045 + } 3.1046 + 3.1047 ++#if 0 3.1048 + static unsigned short get_word(unsigned char **p) 3.1049 + { 3.1050 + return(get_byte(p) | (get_byte(p) << 8)); 3.1051 + } 3.1052 ++#endif 3.1053 + 3.1054 + static unsigned short get_netword(unsigned char **p) 3.1055 + { 3.1056 +@@ -144,6 +158,7 @@ 3.1057 + * read config file 3.1058 + */ 3.1059 + 3.1060 ++#if 0 3.1061 + static int read_config(void) 3.1062 + { 3.1063 + FILE *fp = NULL; 3.1064 +@@ -197,11 +212,13 @@ 3.1065 + fclose(fp); 3.1066 + return(1); 3.1067 + } 3.1068 ++#endif 3.1069 + 3.1070 + /* 3.1071 + * socket function 3.1072 + */ 3.1073 + 3.1074 ++#if 0 3.1075 + static int open_socket(void) 3.1076 + { 3.1077 + int fd; 3.1078 +@@ -225,6 +242,7 @@ 3.1079 + close(fd); 3.1080 + return(-1); 3.1081 + } 3.1082 ++#endif 3.1083 + 3.1084 + static int socket_read(int fd, unsigned char *buf, int l) 3.1085 + { 3.1086 +@@ -328,6 +346,8 @@ 3.1087 + if (likely(capi_fd >= 0)) 3.1088 + return CapiNoError; 3.1089 + 3.1090 ++#if 0 3.1091 ++ 3.1092 + /*----- open managment link -----*/ 3.1093 + if (read_config() && (remote_capi)) { 3.1094 + capi_fd = open_socket(); 3.1095 +@@ -347,6 +367,8 @@ 3.1096 + if (ioctl(capi_fd, CAPI_INSTALLED, 0) == 0) 3.1097 + return CapiNoError; 3.1098 + 3.1099 +#endif 3.1100 + 3.1101 -+#include "g722.h" 3.1102 -+ 3.1103 -+#if !defined(FALSE) 3.1104 -+#define FALSE 0 3.1105 + return CapiRegNotInstalled; 3.1106 + } 3.1107 + 3.1108 +@@ -421,6 +443,7 @@ 3.1109 + unsigned char *bufferstart; 3.1110 + }; 3.1111 + 3.1112 ++#if 0 3.1113 + static struct applinfo *alloc_buffers( 3.1114 + unsigned MaxB3Connection, 3.1115 + unsigned MaxB3Blks, 3.1116 +@@ -459,6 +482,7 @@ 3.1117 + ap->lastfree->next = 0; 3.1118 + return ap; 3.1119 + } 3.1120 +#endif 3.1121 -+#if !defined(TRUE) 3.1122 -+#define TRUE (!FALSE) 3.1123 + 3.1124 + static void free_buffers(struct applinfo *ap) 3.1125 + { 3.1126 +@@ -576,14 +600,17 @@ 3.1127 + unsigned MaxSizeB3, 3.1128 + unsigned *ApplID) 3.1129 + { 3.1130 ++#if 0 3.1131 + int applid = 0; 3.1132 + char buf[PATH_MAX]; 3.1133 + int i, fd = -1; 3.1134 + 3.1135 + *ApplID = 0; 3.1136 ++#endif 3.1137 + 3.1138 + if (capi20_isinstalled() != CapiNoError) 3.1139 + return CapiRegNotInstalled; 3.1140 ++#if 0 3.1141 + if ((!remote_capi) || ((remote_capi) && ((fd = open_socket()) < 0))) { 3.1142 + if ((fd = open(capidevname, O_RDWR|O_NONBLOCK, 0666)) < 0 && 3.1143 + (errno == ENOENT)) { 3.1144 +@@ -621,6 +648,8 @@ 3.1145 + close(fd); 3.1146 + return(errcode); 3.1147 + } 3.1148 ++ } 3.1149 ++#if 0 3.1150 + } else if ((applid = ioctl(fd, CAPI_REGISTER, &ioctl_data)) < 0) { 3.1151 + if (errno == EIO) { 3.1152 + if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0) { 3.1153 +@@ -666,6 +695,7 @@ 3.1154 + applid = alloc_applid(fd); 3.1155 + } // end old driver compatibility 3.1156 + } 3.1157 ++#endif 3.1158 + if (remember_applid(applid, fd) < 0) { 3.1159 + close(fd); 3.1160 + return CapiRegOSResourceErr; 3.1161 +@@ -676,6 +706,7 @@ 3.1162 + return CapiRegOSResourceErr; 3.1163 + } 3.1164 + *ApplID = applid; 3.1165 ++#endif 3.1166 + return CapiNoError; 3.1167 + } 3.1168 + 3.1169 +@@ -784,11 +815,15 @@ 3.1170 + ret = CapiIllAppNr; 3.1171 + break; 3.1172 + case EIO: 3.1173 ++#if 0 3.1174 + if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0) { 3.1175 ++#endif 3.1176 + ret = CapiMsgOSResourceErr; 3.1177 ++#if 0 3.1178 + } else { 3.1179 + ret = (unsigned)ioctl_data.errcode; 3.1180 + } 3.1181 ++#endif 3.1182 + break; 3.1183 + default: 3.1184 + ret = CapiMsgOSResourceErr; 3.1185 +@@ -842,7 +877,7 @@ 3.1186 + rcvbuf[15] = (data >> 24) & 0xff; 3.1187 + } else { 3.1188 + u_int64_t data; 3.1189 +- ulong radr = (ulong)rcvbuf; 3.1190 ++ unsigned long radr = (unsigned long)rcvbuf; 3.1191 + if (CAPIMSG_LEN(rcvbuf) < 30) { 3.1192 + /* 3.1193 + * grr, 64bit arch, but no data64 included, 3.1194 +@@ -899,6 +934,9 @@ 3.1195 + { 3.1196 + if (capi20_isinstalled() != CapiNoError) 3.1197 + return 0; 3.1198 ++#ifndef CAPI_MANUFACTURER_LEN 3.1199 ++#define CAPI_MANUFACTURER_LEN 64 3.1200 ++#endif 3.1201 + 3.1202 + if (remote_capi) { 3.1203 + unsigned char buf[100]; 3.1204 +@@ -911,15 +949,19 @@ 3.1205 + return Buf; 3.1206 + } 3.1207 + 3.1208 ++#if 0 3.1209 + ioctl_data.contr = Ctrl; 3.1210 + 3.1211 + if (ioctl(capi_fd, CAPI_GET_MANUFACTURER, &ioctl_data) < 0) 3.1212 ++#endif 3.1213 + return 0; 3.1214 + 3.1215 ++#if 0 3.1216 + memcpy(Buf, ioctl_data.manufacturer, CAPI_MANUFACTURER_LEN); 3.1217 + Buf[CAPI_MANUFACTURER_LEN-1] = 0; 3.1218 + 3.1219 + return Buf; 3.1220 ++#endif 3.1221 + } 3.1222 + 3.1223 + unsigned char * 3.1224 +@@ -934,16 +976,20 @@ 3.1225 + set_rcapicmd_header(&p, 14, RCAPI_GET_VERSION_REQ, Ctrl); 3.1226 + if(!(remote_command(capi_fd, buf, 14, RCAPI_GET_VERSION_CONF))) 3.1227 + return 0; 3.1228 +- memcpy(Buf, buf + 1, sizeof(capi_version)); 3.1229 ++ memcpy(Buf, buf + 1, 128 /* sizeof(capi_version) */); 3.1230 + return Buf; 3.1231 + } 3.1232 + 3.1233 ++#if 0 3.1234 + ioctl_data.contr = Ctrl; 3.1235 + if (ioctl(capi_fd, CAPI_GET_VERSION, &ioctl_data) < 0) { 3.1236 ++#endif 3.1237 + return 0; 3.1238 ++#if 0 3.1239 + } 3.1240 + memcpy(Buf, &ioctl_data.version, sizeof(capi_version)); 3.1241 + return Buf; 3.1242 ++#endif 3.1243 + } 3.1244 + 3.1245 + unsigned char * 3.1246 +@@ -952,6 +998,10 @@ 3.1247 + if (capi20_isinstalled() != CapiNoError) 3.1248 + return 0; 3.1249 + 3.1250 ++#ifndef CAPI_SERIAL_LEN 3.1251 ++#define CAPI_SERIAL_LEN 8 3.1252 +#endif 3.1253 + 3.1254 -+static __inline__ int16_t saturate(int32_t amp) 3.1255 -+{ 3.1256 -+ int16_t amp16; 3.1257 -+ 3.1258 -+ /* Hopefully this is optimised for the common case - not clipping */ 3.1259 -+ amp16 = (int16_t) amp; 3.1260 -+ if (amp == amp16) 3.1261 -+ return amp16; 3.1262 -+ if (amp > INT16_MAX) 3.1263 -+ return INT16_MAX; 3.1264 -+ return INT16_MIN; 3.1265 -+} 3.1266 -+/*- End of function --------------------------------------------------------*/ 3.1267 -+ 3.1268 -+static void block4(g722_decode_state_t *s, int band, int d); 3.1269 -+ 3.1270 -+static void block4(g722_decode_state_t *s, int band, int d) 3.1271 -+{ 3.1272 -+ int wd1; 3.1273 -+ int wd2; 3.1274 -+ int wd3; 3.1275 -+ int i; 3.1276 -+ 3.1277 -+ /* Block 4, RECONS */ 3.1278 -+ s->band[band].d[0] = d; 3.1279 -+ s->band[band].r[0] = saturate(s->band[band].s + d); 3.1280 -+ 3.1281 -+ /* Block 4, PARREC */ 3.1282 -+ s->band[band].p[0] = saturate(s->band[band].sz + d); 3.1283 -+ 3.1284 -+ /* Block 4, UPPOL2 */ 3.1285 -+ for (i = 0; i < 3; i++) 3.1286 -+ s->band[band].sg[i] = s->band[band].p[i] >> 15; 3.1287 -+ wd1 = saturate(s->band[band].a[1] << 2); 3.1288 -+ 3.1289 -+ wd2 = (s->band[band].sg[0] == s->band[band].sg[1]) ? -wd1 : wd1; 3.1290 -+ if (wd2 > 32767) 3.1291 -+ wd2 = 32767; 3.1292 -+ wd3 = (s->band[band].sg[0] == s->band[band].sg[2]) ? 128 : -128; 3.1293 -+ wd3 += (wd2 >> 7); 3.1294 -+ wd3 += (s->band[band].a[2]*32512) >> 15; 3.1295 -+ if (wd3 > 12288) 3.1296 -+ wd3 = 12288; 3.1297 -+ else if (wd3 < -12288) 3.1298 -+ wd3 = -12288; 3.1299 -+ s->band[band].ap[2] = wd3; 3.1300 -+ 3.1301 -+ /* Block 4, UPPOL1 */ 3.1302 -+ s->band[band].sg[0] = s->band[band].p[0] >> 15; 3.1303 -+ s->band[band].sg[1] = s->band[band].p[1] >> 15; 3.1304 -+ wd1 = (s->band[band].sg[0] == s->band[band].sg[1]) ? 192 : -192; 3.1305 -+ wd2 = (s->band[band].a[1]*32640) >> 15; 3.1306 -+ 3.1307 -+ s->band[band].ap[1] = saturate(wd1 + wd2); 3.1308 -+ wd3 = saturate(15360 - s->band[band].ap[2]); 3.1309 -+ if (s->band[band].ap[1] > wd3) 3.1310 -+ s->band[band].ap[1] = wd3; 3.1311 -+ else if (s->band[band].ap[1] < -wd3) 3.1312 -+ s->band[band].ap[1] = -wd3; 3.1313 -+ 3.1314 -+ /* Block 4, UPZERO */ 3.1315 -+ wd1 = (d == 0) ? 0 : 128; 3.1316 -+ s->band[band].sg[0] = d >> 15; 3.1317 -+ for (i = 1; i < 7; i++) 3.1318 -+ { 3.1319 -+ s->band[band].sg[i] = s->band[band].d[i] >> 15; 3.1320 -+ wd2 = (s->band[band].sg[i] == s->band[band].sg[0]) ? wd1 : -wd1; 3.1321 -+ wd3 = (s->band[band].b[i]*32640) >> 15; 3.1322 -+ s->band[band].bp[i] = saturate(wd2 + wd3); 3.1323 -+ } 3.1324 -+ 3.1325 -+ /* Block 4, DELAYA */ 3.1326 -+ for (i = 6; i > 0; i--) 3.1327 -+ { 3.1328 -+ s->band[band].d[i] = s->band[band].d[i - 1]; 3.1329 -+ s->band[band].b[i] = s->band[band].bp[i]; 3.1330 -+ } 3.1331 -+ 3.1332 -+ for (i = 2; i > 0; i--) 3.1333 -+ { 3.1334 -+ s->band[band].r[i] = s->band[band].r[i - 1]; 3.1335 -+ s->band[band].p[i] = s->band[band].p[i - 1]; 3.1336 -+ s->band[band].a[i] = s->band[band].ap[i]; 3.1337 -+ } 3.1338 -+ 3.1339 -+ /* Block 4, FILTEP */ 3.1340 -+ wd1 = saturate(s->band[band].r[1] + s->band[band].r[1]); 3.1341 -+ wd1 = (s->band[band].a[1]*wd1) >> 15; 3.1342 -+ wd2 = saturate(s->band[band].r[2] + s->band[band].r[2]); 3.1343 -+ wd2 = (s->band[band].a[2]*wd2) >> 15; 3.1344 -+ s->band[band].sp = saturate(wd1 + wd2); 3.1345 -+ 3.1346 -+ /* Block 4, FILTEZ */ 3.1347 -+ s->band[band].sz = 0; 3.1348 -+ for (i = 6; i > 0; i--) 3.1349 -+ { 3.1350 -+ wd1 = saturate(s->band[band].d[i] + s->band[band].d[i]); 3.1351 -+ s->band[band].sz += (s->band[band].b[i]*wd1) >> 15; 3.1352 -+ } 3.1353 -+ s->band[band].sz = saturate(s->band[band].sz); 3.1354 -+ 3.1355 -+ /* Block 4, PREDIC */ 3.1356 -+ s->band[band].s = saturate(s->band[band].sp + s->band[band].sz); 3.1357 -+} 3.1358 -+/*- End of function --------------------------------------------------------*/ 3.1359 -+ 3.1360 -+g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, int rate, int options) 3.1361 -+{ 3.1362 -+ if (s == NULL) 3.1363 -+ { 3.1364 -+ if ((s = (g722_decode_state_t *) malloc(sizeof(*s))) == NULL) 3.1365 -+ return NULL; 3.1366 -+ } 3.1367 -+ memset(s, 0, sizeof(*s)); 3.1368 -+ if (rate == 48000) 3.1369 -+ s->bits_per_sample = 6; 3.1370 -+ else if (rate == 56000) 3.1371 -+ s->bits_per_sample = 7; 3.1372 -+ else 3.1373 -+ s->bits_per_sample = 8; 3.1374 -+ if ((options & G722_SAMPLE_RATE_8000)) 3.1375 -+ s->eight_k = TRUE; 3.1376 -+ if ((options & G722_PACKED) && s->bits_per_sample != 8) 3.1377 -+ s->packed = TRUE; 3.1378 -+ else 3.1379 -+ s->packed = FALSE; 3.1380 -+ s->band[0].det = 32; 3.1381 -+ s->band[1].det = 8; 3.1382 -+ return s; 3.1383 -+} 3.1384 -+/*- End of function --------------------------------------------------------*/ 3.1385 -+ 3.1386 -+int g722_decode_release(g722_decode_state_t *s) 3.1387 -+{ 3.1388 -+ free(s); 3.1389 -+ return 0; 3.1390 -+} 3.1391 -+/*- End of function --------------------------------------------------------*/ 3.1392 -+ 3.1393 -+int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len) 3.1394 -+{ 3.1395 -+ static const int wl[8] = {-60, -30, 58, 172, 334, 538, 1198, 3042 }; 3.1396 -+ static const int rl42[16] = {0, 7, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 0 }; 3.1397 -+ static const int ilb[32] = 3.1398 -+ { 3.1399 -+ 2048, 2093, 2139, 2186, 2233, 2282, 2332, 3.1400 -+ 2383, 2435, 2489, 2543, 2599, 2656, 2714, 3.1401 -+ 2774, 2834, 2896, 2960, 3025, 3091, 3158, 3.1402 -+ 3228, 3298, 3371, 3444, 3520, 3597, 3676, 3.1403 -+ 3756, 3838, 3922, 4008 3.1404 -+ }; 3.1405 -+ static const int wh[3] = {0, -214, 798}; 3.1406 -+ static const int rh2[4] = {2, 1, 2, 1}; 3.1407 -+ static const int qm2[4] = {-7408, -1616, 7408, 1616}; 3.1408 -+ static const int qm4[16] = 3.1409 -+ { 3.1410 -+ 0, -20456, -12896, -8968, 3.1411 -+ -6288, -4240, -2584, -1200, 3.1412 -+ 20456, 12896, 8968, 6288, 3.1413 -+ 4240, 2584, 1200, 0 3.1414 -+ }; 3.1415 -+ static const int qm5[32] = 3.1416 -+ { 3.1417 -+ -280, -280, -23352, -17560, 3.1418 -+ -14120, -11664, -9752, -8184, 3.1419 -+ -6864, -5712, -4696, -3784, 3.1420 -+ -2960, -2208, -1520, -880, 3.1421 -+ 23352, 17560, 14120, 11664, 3.1422 -+ 9752, 8184, 6864, 5712, 3.1423 -+ 4696, 3784, 2960, 2208, 3.1424 -+ 1520, 880, 280, -280 3.1425 -+ }; 3.1426 -+ static const int qm6[64] = 3.1427 -+ { 3.1428 -+ -136, -136, -136, -136, 3.1429 -+ -24808, -21904, -19008, -16704, 3.1430 -+ -14984, -13512, -12280, -11192, 3.1431 -+ -10232, -9360, -8576, -7856, 3.1432 -+ -7192, -6576, -6000, -5456, 3.1433 -+ -4944, -4464, -4008, -3576, 3.1434 -+ -3168, -2776, -2400, -2032, 3.1435 -+ -1688, -1360, -1040, -728, 3.1436 -+ 24808, 21904, 19008, 16704, 3.1437 -+ 14984, 13512, 12280, 11192, 3.1438 -+ 10232, 9360, 8576, 7856, 3.1439 -+ 7192, 6576, 6000, 5456, 3.1440 -+ 4944, 4464, 4008, 3576, 3.1441 -+ 3168, 2776, 2400, 2032, 3.1442 -+ 1688, 1360, 1040, 728, 3.1443 -+ 432, 136, -432, -136 3.1444 -+ }; 3.1445 -+ static const int qmf_coeffs[12] = 3.1446 -+ { 3.1447 -+ 3, -11, 12, 32, -210, 951, 3876, -805, 362, -156, 53, -11, 3.1448 -+ }; 3.1449 -+ 3.1450 -+ int dlowt; 3.1451 -+ int rlow; 3.1452 -+ int ihigh; 3.1453 -+ int dhigh; 3.1454 -+ int rhigh; 3.1455 -+ int xout1; 3.1456 -+ int xout2; 3.1457 -+ int wd1; 3.1458 -+ int wd2; 3.1459 -+ int wd3; 3.1460 -+ int code; 3.1461 -+ int outlen; 3.1462 -+ int i; 3.1463 -+ int j; 3.1464 -+ 3.1465 -+ outlen = 0; 3.1466 -+ rhigh = 0; 3.1467 -+ for (j = 0; j < len; ) 3.1468 -+ { 3.1469 -+ if (s->packed) 3.1470 -+ { 3.1471 -+ /* Unpack the code bits */ 3.1472 -+ if (s->in_bits < s->bits_per_sample) 3.1473 -+ { 3.1474 -+ s->in_buffer |= (g722_data[j++] << s->in_bits); 3.1475 -+ s->in_bits += 8; 3.1476 -+ } 3.1477 -+ code = s->in_buffer & ((1 << s->bits_per_sample) - 1); 3.1478 -+ s->in_buffer >>= s->bits_per_sample; 3.1479 -+ s->in_bits -= s->bits_per_sample; 3.1480 -+ } 3.1481 -+ else 3.1482 -+ { 3.1483 -+ code = g722_data[j++]; 3.1484 -+ } 3.1485 -+ 3.1486 -+ switch (s->bits_per_sample) 3.1487 -+ { 3.1488 -+ default: 3.1489 -+ case 8: 3.1490 -+ wd1 = code & 0x3F; 3.1491 -+ ihigh = (code >> 6) & 0x03; 3.1492 -+ wd2 = qm6[wd1]; 3.1493 -+ wd1 >>= 2; 3.1494 -+ break; 3.1495 -+ case 7: 3.1496 -+ wd1 = code & 0x1F; 3.1497 -+ ihigh = (code >> 5) & 0x03; 3.1498 -+ wd2 = qm5[wd1]; 3.1499 -+ wd1 >>= 1; 3.1500 -+ break; 3.1501 -+ case 6: 3.1502 -+ wd1 = code & 0x0F; 3.1503 -+ ihigh = (code >> 4) & 0x03; 3.1504 -+ wd2 = qm4[wd1]; 3.1505 -+ break; 3.1506 -+ } 3.1507 -+ /* Block 5L, LOW BAND INVQBL */ 3.1508 -+ wd2 = (s->band[0].det*wd2) >> 15; 3.1509 -+ /* Block 5L, RECONS */ 3.1510 -+ rlow = s->band[0].s + wd2; 3.1511 -+ /* Block 6L, LIMIT */ 3.1512 -+ if (rlow > 16383) 3.1513 -+ rlow = 16383; 3.1514 -+ else if (rlow < -16384) 3.1515 -+ rlow = -16384; 3.1516 -+ 3.1517 -+ /* Block 2L, INVQAL */ 3.1518 -+ wd2 = qm4[wd1]; 3.1519 -+ dlowt = (s->band[0].det*wd2) >> 15; 3.1520 -+ 3.1521 -+ /* Block 3L, LOGSCL */ 3.1522 -+ wd2 = rl42[wd1]; 3.1523 -+ wd1 = (s->band[0].nb*127) >> 7; 3.1524 -+ wd1 += wl[wd2]; 3.1525 -+ if (wd1 < 0) 3.1526 -+ wd1 = 0; 3.1527 -+ else if (wd1 > 18432) 3.1528 -+ wd1 = 18432; 3.1529 -+ s->band[0].nb = wd1; 3.1530 -+ 3.1531 -+ /* Block 3L, SCALEL */ 3.1532 -+ wd1 = (s->band[0].nb >> 6) & 31; 3.1533 -+ wd2 = 8 - (s->band[0].nb >> 11); 3.1534 -+ wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2); 3.1535 -+ s->band[0].det = wd3 << 2; 3.1536 -+ 3.1537 -+ block4(s, 0, dlowt); 3.1538 -+ 3.1539 -+ if (!s->eight_k) 3.1540 -+ { 3.1541 -+ /* Block 2H, INVQAH */ 3.1542 -+ wd2 = qm2[ihigh]; 3.1543 -+ dhigh = (s->band[1].det*wd2) >> 15; 3.1544 -+ /* Block 5H, RECONS */ 3.1545 -+ rhigh = dhigh + s->band[1].s; 3.1546 -+ /* Block 6H, LIMIT */ 3.1547 -+ if (rhigh > 16383) 3.1548 -+ rhigh = 16383; 3.1549 -+ else if (rhigh < -16384) 3.1550 -+ rhigh = -16384; 3.1551 -+ 3.1552 -+ /* Block 2H, INVQAH */ 3.1553 -+ wd2 = rh2[ihigh]; 3.1554 -+ wd1 = (s->band[1].nb*127) >> 7; 3.1555 -+ wd1 += wh[wd2]; 3.1556 -+ if (wd1 < 0) 3.1557 -+ wd1 = 0; 3.1558 -+ else if (wd1 > 22528) 3.1559 -+ wd1 = 22528; 3.1560 -+ s->band[1].nb = wd1; 3.1561 -+ 3.1562 -+ /* Block 3H, SCALEH */ 3.1563 -+ wd1 = (s->band[1].nb >> 6) & 31; 3.1564 -+ wd2 = 10 - (s->band[1].nb >> 11); 3.1565 -+ wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2); 3.1566 -+ s->band[1].det = wd3 << 2; 3.1567 -+ 3.1568 -+ block4(s, 1, dhigh); 3.1569 -+ } 3.1570 -+ 3.1571 -+ if (s->itu_test_mode) 3.1572 -+ { 3.1573 -+ amp[outlen++] = (int16_t) (rlow << 1); 3.1574 -+ amp[outlen++] = (int16_t) (rhigh << 1); 3.1575 -+ } 3.1576 -+ else 3.1577 -+ { 3.1578 -+ if (s->eight_k) 3.1579 -+ { 3.1580 -+ amp[outlen++] = (int16_t) rlow; 3.1581 -+ } 3.1582 -+ else 3.1583 -+ { 3.1584 -+ /* Apply the receive QMF */ 3.1585 -+ for (i = 0; i < 22; i++) 3.1586 -+ s->x[i] = s->x[i + 2]; 3.1587 -+ s->x[22] = rlow + rhigh; 3.1588 -+ s->x[23] = rlow - rhigh; 3.1589 -+ 3.1590 -+ xout1 = 0; 3.1591 -+ xout2 = 0; 3.1592 -+ for (i = 0; i < 12; i++) 3.1593 -+ { 3.1594 -+ xout2 += s->x[2*i]*qmf_coeffs[i]; 3.1595 -+ xout1 += s->x[2*i + 1]*qmf_coeffs[11 - i]; 3.1596 -+ } 3.1597 -+ amp[outlen++] = (int16_t) (xout1 >> 12); 3.1598 -+ amp[outlen++] = (int16_t) (xout2 >> 12); 3.1599 -+ } 3.1600 -+ } 3.1601 -+ } 3.1602 -+ return outlen; 3.1603 -+} 3.1604 -+/*- End of function --------------------------------------------------------*/ 3.1605 -+/*- End of file ------------------------------------------------------------*/ 3.1606 -Index: codecs/g722/g722_encode.c 3.1607 -diff -Nau codecs/g722/g722_encode.c.orig codecs/g722/g722_encode.c 3.1608 ---- codecs/g722/g722_encode.c.orig 1970-01-01 01:00:00.000000000 +0100 3.1609 -+++ codecs/g722/g722_encode.c 2009-04-24 00:30:33.000000000 +0200 3.1610 -@@ -0,0 +1,400 @@ 3.1611 -+/* 3.1612 -+ * SpanDSP - a series of DSP components for telephony 3.1613 -+ * 3.1614 -+ * g722_encode.c - The ITU G.722 codec, encode part. 3.1615 -+ * 3.1616 -+ * Written by Steve Underwood <steveu@coppice.org> 3.1617 -+ * 3.1618 -+ * Copyright (C) 2005 Steve Underwood 3.1619 -+ * 3.1620 -+ * All rights reserved. 3.1621 -+ * 3.1622 -+ * Despite my general liking of the GPL, I place my own contributions 3.1623 -+ * to this code in the public domain for the benefit of all mankind - 3.1624 -+ * even the slimy ones who might try to proprietize my work and use it 3.1625 -+ * to my detriment. 3.1626 -+ * 3.1627 -+ * Based on a single channel 64kbps only G.722 codec which is: 3.1628 -+ * 3.1629 -+ ***** Copyright (c) CMU 1993 ***** 3.1630 -+ * Computer Science, Speech Group 3.1631 -+ * Chengxiang Lu and Alex Hauptmann 3.1632 -+ * 3.1633 -+ * $Id: g722_encode.c 48661 2006-12-21 00:08:21Z mattf $ 3.1634 -+ */ 3.1635 -+ 3.1636 -+/*! \file */ 3.1637 -+ 3.1638 -+#ifdef HAVE_CONFIG_H 3.1639 -+#include <config.h> 3.1640 + if (remote_capi) { 3.1641 + unsigned char buf[100]; 3.1642 + unsigned char *p = buf; 3.1643 +@@ -963,15 +1013,19 @@ 3.1644 + return Buf; 3.1645 + } 3.1646 + 3.1647 ++#if 0 3.1648 + ioctl_data.contr = Ctrl; 3.1649 + 3.1650 + if (ioctl(capi_fd, CAPI_GET_SERIAL, &ioctl_data) < 0) 3.1651 +#endif 3.1652 -+ 3.1653 -+#include <stdio.h> 3.1654 -+#include <inttypes.h> 3.1655 -+#include <memory.h> 3.1656 -+#include <stdlib.h> 3.1657 + return 0; 3.1658 + 3.1659 +#if 0 3.1660 -+#include <tgmath.h> 3.1661 + memcpy(Buf, &ioctl_data.serial, CAPI_SERIAL_LEN); 3.1662 + Buf[CAPI_SERIAL_LEN-1] = 0; 3.1663 + 3.1664 + return Buf; 3.1665 +#endif 3.1666 -+ 3.1667 -+#include "g722.h" 3.1668 -+ 3.1669 -+#if !defined(FALSE) 3.1670 -+#define FALSE 0 3.1671 -+#endif 3.1672 -+#if !defined(TRUE) 3.1673 -+#define TRUE (!FALSE) 3.1674 -+#endif 3.1675 -+ 3.1676 -+static __inline__ int16_t saturate(int32_t amp) 3.1677 -+{ 3.1678 -+ int16_t amp16; 3.1679 -+ 3.1680 -+ /* Hopefully this is optimised for the common case - not clipping */ 3.1681 -+ amp16 = (int16_t) amp; 3.1682 -+ if (amp == amp16) 3.1683 -+ return amp16; 3.1684 -+ if (amp > INT16_MAX) 3.1685 -+ return INT16_MAX; 3.1686 -+ return INT16_MIN; 3.1687 -+} 3.1688 -+/*- End of function --------------------------------------------------------*/ 3.1689 -+ 3.1690 -+static void block4(g722_encode_state_t *s, int band, int d) 3.1691 -+{ 3.1692 -+ int wd1; 3.1693 -+ int wd2; 3.1694 -+ int wd3; 3.1695 -+ int i; 3.1696 -+ 3.1697 -+ /* Block 4, RECONS */ 3.1698 -+ s->band[band].d[0] = d; 3.1699 -+ s->band[band].r[0] = saturate(s->band[band].s + d); 3.1700 -+ 3.1701 -+ /* Block 4, PARREC */ 3.1702 -+ s->band[band].p[0] = saturate(s->band[band].sz + d); 3.1703 -+ 3.1704 -+ /* Block 4, UPPOL2 */ 3.1705 -+ for (i = 0; i < 3; i++) 3.1706 -+ s->band[band].sg[i] = s->band[band].p[i] >> 15; 3.1707 -+ wd1 = saturate(s->band[band].a[1] << 2); 3.1708 -+ 3.1709 -+ wd2 = (s->band[band].sg[0] == s->band[band].sg[1]) ? -wd1 : wd1; 3.1710 -+ if (wd2 > 32767) 3.1711 -+ wd2 = 32767; 3.1712 -+ wd3 = (wd2 >> 7) + ((s->band[band].sg[0] == s->band[band].sg[2]) ? 128 : -128); 3.1713 -+ wd3 += (s->band[band].a[2]*32512) >> 15; 3.1714 -+ if (wd3 > 12288) 3.1715 -+ wd3 = 12288; 3.1716 -+ else if (wd3 < -12288) 3.1717 -+ wd3 = -12288; 3.1718 -+ s->band[band].ap[2] = wd3; 3.1719 -+ 3.1720 -+ /* Block 4, UPPOL1 */ 3.1721 -+ s->band[band].sg[0] = s->band[band].p[0] >> 15; 3.1722 -+ s->band[band].sg[1] = s->band[band].p[1] >> 15; 3.1723 -+ wd1 = (s->band[band].sg[0] == s->band[band].sg[1]) ? 192 : -192; 3.1724 -+ wd2 = (s->band[band].a[1]*32640) >> 15; 3.1725 -+ 3.1726 -+ s->band[band].ap[1] = saturate(wd1 + wd2); 3.1727 -+ wd3 = saturate(15360 - s->band[band].ap[2]); 3.1728 -+ if (s->band[band].ap[1] > wd3) 3.1729 -+ s->band[band].ap[1] = wd3; 3.1730 -+ else if (s->band[band].ap[1] < -wd3) 3.1731 -+ s->band[band].ap[1] = -wd3; 3.1732 -+ 3.1733 -+ /* Block 4, UPZERO */ 3.1734 -+ wd1 = (d == 0) ? 0 : 128; 3.1735 -+ s->band[band].sg[0] = d >> 15; 3.1736 -+ for (i = 1; i < 7; i++) 3.1737 -+ { 3.1738 -+ s->band[band].sg[i] = s->band[band].d[i] >> 15; 3.1739 -+ wd2 = (s->band[band].sg[i] == s->band[band].sg[0]) ? wd1 : -wd1; 3.1740 -+ wd3 = (s->band[band].b[i]*32640) >> 15; 3.1741 -+ s->band[band].bp[i] = saturate(wd2 + wd3); 3.1742 -+ } 3.1743 -+ 3.1744 -+ /* Block 4, DELAYA */ 3.1745 -+ for (i = 6; i > 0; i--) 3.1746 -+ { 3.1747 -+ s->band[band].d[i] = s->band[band].d[i - 1]; 3.1748 -+ s->band[band].b[i] = s->band[band].bp[i]; 3.1749 -+ } 3.1750 -+ 3.1751 -+ for (i = 2; i > 0; i--) 3.1752 -+ { 3.1753 -+ s->band[band].r[i] = s->band[band].r[i - 1]; 3.1754 -+ s->band[band].p[i] = s->band[band].p[i - 1]; 3.1755 -+ s->band[band].a[i] = s->band[band].ap[i]; 3.1756 -+ } 3.1757 -+ 3.1758 -+ /* Block 4, FILTEP */ 3.1759 -+ wd1 = saturate(s->band[band].r[1] + s->band[band].r[1]); 3.1760 -+ wd1 = (s->band[band].a[1]*wd1) >> 15; 3.1761 -+ wd2 = saturate(s->band[band].r[2] + s->band[band].r[2]); 3.1762 -+ wd2 = (s->band[band].a[2]*wd2) >> 15; 3.1763 -+ s->band[band].sp = saturate(wd1 + wd2); 3.1764 -+ 3.1765 -+ /* Block 4, FILTEZ */ 3.1766 -+ s->band[band].sz = 0; 3.1767 -+ for (i = 6; i > 0; i--) 3.1768 -+ { 3.1769 -+ wd1 = saturate(s->band[band].d[i] + s->band[band].d[i]); 3.1770 -+ s->band[band].sz += (s->band[band].b[i]*wd1) >> 15; 3.1771 -+ } 3.1772 -+ s->band[band].sz = saturate(s->band[band].sz); 3.1773 -+ 3.1774 -+ /* Block 4, PREDIC */ 3.1775 -+ s->band[band].s = saturate(s->band[band].sp + s->band[band].sz); 3.1776 -+} 3.1777 -+/*- End of function --------------------------------------------------------*/ 3.1778 -+ 3.1779 -+g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, int rate, int options) 3.1780 -+{ 3.1781 -+ if (s == NULL) 3.1782 -+ { 3.1783 -+ if ((s = (g722_encode_state_t *) malloc(sizeof(*s))) == NULL) 3.1784 -+ return NULL; 3.1785 -+ } 3.1786 -+ memset(s, 0, sizeof(*s)); 3.1787 -+ if (rate == 48000) 3.1788 -+ s->bits_per_sample = 6; 3.1789 -+ else if (rate == 56000) 3.1790 -+ s->bits_per_sample = 7; 3.1791 -+ else 3.1792 -+ s->bits_per_sample = 8; 3.1793 -+ if ((options & G722_SAMPLE_RATE_8000)) 3.1794 -+ s->eight_k = TRUE; 3.1795 -+ if ((options & G722_PACKED) && s->bits_per_sample != 8) 3.1796 -+ s->packed = TRUE; 3.1797 -+ else 3.1798 -+ s->packed = FALSE; 3.1799 -+ s->band[0].det = 32; 3.1800 -+ s->band[1].det = 8; 3.1801 -+ return s; 3.1802 -+} 3.1803 -+/*- End of function --------------------------------------------------------*/ 3.1804 -+ 3.1805 -+int g722_encode_release(g722_encode_state_t *s) 3.1806 -+{ 3.1807 -+ free(s); 3.1808 -+ return 0; 3.1809 -+} 3.1810 -+/*- End of function --------------------------------------------------------*/ 3.1811 -+ 3.1812 -+int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len) 3.1813 -+{ 3.1814 -+ static const int q6[32] = 3.1815 -+ { 3.1816 -+ 0, 35, 72, 110, 150, 190, 233, 276, 3.1817 -+ 323, 370, 422, 473, 530, 587, 650, 714, 3.1818 -+ 786, 858, 940, 1023, 1121, 1219, 1339, 1458, 3.1819 -+ 1612, 1765, 1980, 2195, 2557, 2919, 0, 0 3.1820 -+ }; 3.1821 -+ static const int iln[32] = 3.1822 -+ { 3.1823 -+ 0, 63, 62, 31, 30, 29, 28, 27, 3.1824 -+ 26, 25, 24, 23, 22, 21, 20, 19, 3.1825 -+ 18, 17, 16, 15, 14, 13, 12, 11, 3.1826 -+ 10, 9, 8, 7, 6, 5, 4, 0 3.1827 -+ }; 3.1828 -+ static const int ilp[32] = 3.1829 -+ { 3.1830 -+ 0, 61, 60, 59, 58, 57, 56, 55, 3.1831 -+ 54, 53, 52, 51, 50, 49, 48, 47, 3.1832 -+ 46, 45, 44, 43, 42, 41, 40, 39, 3.1833 -+ 38, 37, 36, 35, 34, 33, 32, 0 3.1834 -+ }; 3.1835 -+ static const int wl[8] = 3.1836 -+ { 3.1837 -+ -60, -30, 58, 172, 334, 538, 1198, 3042 3.1838 -+ }; 3.1839 -+ static const int rl42[16] = 3.1840 -+ { 3.1841 -+ 0, 7, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 0 3.1842 -+ }; 3.1843 -+ static const int ilb[32] = 3.1844 -+ { 3.1845 -+ 2048, 2093, 2139, 2186, 2233, 2282, 2332, 3.1846 -+ 2383, 2435, 2489, 2543, 2599, 2656, 2714, 3.1847 -+ 2774, 2834, 2896, 2960, 3025, 3091, 3158, 3.1848 -+ 3228, 3298, 3371, 3444, 3520, 3597, 3676, 3.1849 -+ 3756, 3838, 3922, 4008 3.1850 -+ }; 3.1851 -+ static const int qm4[16] = 3.1852 -+ { 3.1853 -+ 0, -20456, -12896, -8968, 3.1854 -+ -6288, -4240, -2584, -1200, 3.1855 -+ 20456, 12896, 8968, 6288, 3.1856 -+ 4240, 2584, 1200, 0 3.1857 -+ }; 3.1858 -+ static const int qm2[4] = 3.1859 -+ { 3.1860 -+ -7408, -1616, 7408, 1616 3.1861 -+ }; 3.1862 -+ static const int qmf_coeffs[12] = 3.1863 -+ { 3.1864 -+ 3, -11, 12, 32, -210, 951, 3876, -805, 362, -156, 53, -11, 3.1865 -+ }; 3.1866 -+ static const int ihn[3] = {0, 1, 0}; 3.1867 -+ static const int ihp[3] = {0, 3, 2}; 3.1868 -+ static const int wh[3] = {0, -214, 798}; 3.1869 -+ static const int rh2[4] = {2, 1, 2, 1}; 3.1870 -+ 3.1871 -+ int dlow; 3.1872 -+ int dhigh; 3.1873 -+ int el; 3.1874 -+ int wd; 3.1875 -+ int wd1; 3.1876 -+ int ril; 3.1877 -+ int wd2; 3.1878 -+ int il4; 3.1879 -+ int ih2; 3.1880 -+ int wd3; 3.1881 -+ int eh; 3.1882 -+ int mih; 3.1883 -+ int i; 3.1884 -+ int j; 3.1885 -+ /* Low and high band PCM from the QMF */ 3.1886 -+ int xlow; 3.1887 -+ int xhigh; 3.1888 -+ int g722_bytes; 3.1889 -+ /* Even and odd tap accumulators */ 3.1890 -+ int sumeven; 3.1891 -+ int sumodd; 3.1892 -+ int ihigh; 3.1893 -+ int ilow; 3.1894 -+ int code; 3.1895 -+ 3.1896 -+ g722_bytes = 0; 3.1897 -+ xhigh = 0; 3.1898 -+ for (j = 0; j < len; ) 3.1899 -+ { 3.1900 -+ if (s->itu_test_mode) 3.1901 -+ { 3.1902 -+ xlow = 3.1903 -+ xhigh = amp[j++] >> 1; 3.1904 -+ } 3.1905 -+ else 3.1906 -+ { 3.1907 -+ if (s->eight_k) 3.1908 -+ { 3.1909 -+ xlow = amp[j++]; 3.1910 -+ } 3.1911 -+ else 3.1912 -+ { 3.1913 -+ /* Apply the transmit QMF */ 3.1914 -+ /* Shuffle the buffer down */ 3.1915 -+ for (i = 0; i < 22; i++) 3.1916 -+ s->x[i] = s->x[i + 2]; 3.1917 -+ s->x[22] = amp[j++]; 3.1918 -+ s->x[23] = amp[j++]; 3.1919 -+ 3.1920 -+ /* Discard every other QMF output */ 3.1921 -+ sumeven = 0; 3.1922 -+ sumodd = 0; 3.1923 -+ for (i = 0; i < 12; i++) 3.1924 -+ { 3.1925 -+ sumodd += s->x[2*i]*qmf_coeffs[i]; 3.1926 -+ sumeven += s->x[2*i + 1]*qmf_coeffs[11 - i]; 3.1927 -+ } 3.1928 -+ xlow = (sumeven + sumodd) >> 13; 3.1929 -+ xhigh = (sumeven - sumodd) >> 13; 3.1930 -+ } 3.1931 -+ } 3.1932 -+ /* Block 1L, SUBTRA */ 3.1933 -+ el = saturate(xlow - s->band[0].s); 3.1934 -+ 3.1935 -+ /* Block 1L, QUANTL */ 3.1936 -+ wd = (el >= 0) ? el : -(el + 1); 3.1937 -+ 3.1938 -+ for (i = 1; i < 30; i++) 3.1939 -+ { 3.1940 -+ wd1 = (q6[i]*s->band[0].det) >> 12; 3.1941 -+ if (wd < wd1) 3.1942 -+ break; 3.1943 -+ } 3.1944 -+ ilow = (el < 0) ? iln[i] : ilp[i]; 3.1945 -+ 3.1946 -+ /* Block 2L, INVQAL */ 3.1947 -+ ril = ilow >> 2; 3.1948 -+ wd2 = qm4[ril]; 3.1949 -+ dlow = (s->band[0].det*wd2) >> 15; 3.1950 -+ 3.1951 -+ /* Block 3L, LOGSCL */ 3.1952 -+ il4 = rl42[ril]; 3.1953 -+ wd = (s->band[0].nb*127) >> 7; 3.1954 -+ s->band[0].nb = wd + wl[il4]; 3.1955 -+ if (s->band[0].nb < 0) 3.1956 -+ s->band[0].nb = 0; 3.1957 -+ else if (s->band[0].nb > 18432) 3.1958 -+ s->band[0].nb = 18432; 3.1959 -+ 3.1960 -+ /* Block 3L, SCALEL */ 3.1961 -+ wd1 = (s->band[0].nb >> 6) & 31; 3.1962 -+ wd2 = 8 - (s->band[0].nb >> 11); 3.1963 -+ wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2); 3.1964 -+ s->band[0].det = wd3 << 2; 3.1965 -+ 3.1966 -+ block4(s, 0, dlow); 3.1967 -+ 3.1968 -+ if (s->eight_k) 3.1969 -+ { 3.1970 -+ /* Just leave the high bits as zero */ 3.1971 -+ code = (0xC0 | ilow) >> (8 - s->bits_per_sample); 3.1972 -+ } 3.1973 -+ else 3.1974 -+ { 3.1975 -+ /* Block 1H, SUBTRA */ 3.1976 -+ eh = saturate(xhigh - s->band[1].s); 3.1977 -+ 3.1978 -+ /* Block 1H, QUANTH */ 3.1979 -+ wd = (eh >= 0) ? eh : -(eh + 1); 3.1980 -+ wd1 = (564*s->band[1].det) >> 12; 3.1981 -+ mih = (wd >= wd1) ? 2 : 1; 3.1982 -+ ihigh = (eh < 0) ? ihn[mih] : ihp[mih]; 3.1983 -+ 3.1984 -+ /* Block 2H, INVQAH */ 3.1985 -+ wd2 = qm2[ihigh]; 3.1986 -+ dhigh = (s->band[1].det*wd2) >> 15; 3.1987 -+ 3.1988 -+ /* Block 3H, LOGSCH */ 3.1989 -+ ih2 = rh2[ihigh]; 3.1990 -+ wd = (s->band[1].nb*127) >> 7; 3.1991 -+ s->band[1].nb = wd + wh[ih2]; 3.1992 -+ if (s->band[1].nb < 0) 3.1993 -+ s->band[1].nb = 0; 3.1994 -+ else if (s->band[1].nb > 22528) 3.1995 -+ s->band[1].nb = 22528; 3.1996 -+ 3.1997 -+ /* Block 3H, SCALEH */ 3.1998 -+ wd1 = (s->band[1].nb >> 6) & 31; 3.1999 -+ wd2 = 10 - (s->band[1].nb >> 11); 3.2000 -+ wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2); 3.2001 -+ s->band[1].det = wd3 << 2; 3.2002 -+ 3.2003 -+ block4(s, 1, dhigh); 3.2004 -+ code = ((ihigh << 6) | ilow) >> (8 - s->bits_per_sample); 3.2005 -+ } 3.2006 -+ 3.2007 -+ if (s->packed) 3.2008 -+ { 3.2009 -+ /* Pack the code bits */ 3.2010 -+ s->out_buffer |= (code << s->out_bits); 3.2011 -+ s->out_bits += s->bits_per_sample; 3.2012 -+ if (s->out_bits >= 8) 3.2013 -+ { 3.2014 -+ g722_data[g722_bytes++] = (uint8_t) (s->out_buffer & 0xFF); 3.2015 -+ s->out_bits -= 8; 3.2016 -+ s->out_buffer >>= 8; 3.2017 -+ } 3.2018 -+ } 3.2019 -+ else 3.2020 -+ { 3.2021 -+ g722_data[g722_bytes++] = (uint8_t) code; 3.2022 -+ } 3.2023 -+ } 3.2024 -+ return g722_bytes; 3.2025 -+} 3.2026 -+/*- End of function --------------------------------------------------------*/ 3.2027 -+/*- End of file ------------------------------------------------------------*/ 3.2028 -Index: codecs/g722/g722.h 3.2029 -diff -Nau codecs/g722/g722.h.orig codecs/g722/g722.h 3.2030 ---- codecs/g722/g722.h.orig 1970-01-01 01:00:00.000000000 +0100 3.2031 -+++ codecs/g722/g722.h 2009-04-24 00:30:33.000000000 +0200 3.2032 -@@ -0,0 +1,148 @@ 3.2033 -+/* 3.2034 -+ * SpanDSP - a series of DSP components for telephony 3.2035 -+ * 3.2036 -+ * g722.h - The ITU G.722 codec. 3.2037 -+ * 3.2038 -+ * Written by Steve Underwood <steveu@coppice.org> 3.2039 -+ * 3.2040 -+ * Copyright (C) 2005 Steve Underwood 3.2041 -+ * 3.2042 -+ * Despite my general liking of the GPL, I place my own contributions 3.2043 -+ * to this code in the public domain for the benefit of all mankind - 3.2044 -+ * even the slimy ones who might try to proprietize my work and use it 3.2045 -+ * to my detriment. 3.2046 -+ * 3.2047 -+ * Based on a single channel G.722 codec which is: 3.2048 -+ * 3.2049 -+ ***** Copyright (c) CMU 1993 ***** 3.2050 -+ * Computer Science, Speech Group 3.2051 -+ * Chengxiang Lu and Alex Hauptmann 3.2052 -+ * 3.2053 -+ * $Id: g722.h 48959 2006-12-25 06:42:15Z rizzo $ 3.2054 -+ */ 3.2055 -+ 3.2056 -+ 3.2057 -+/*! \file */ 3.2058 -+ 3.2059 -+#if !defined(_G722_H_) 3.2060 -+#define _G722_H_ 3.2061 -+ 3.2062 -+/*! \page g722_page G.722 encoding and decoding 3.2063 -+\section g722_page_sec_1 What does it do? 3.2064 -+The G.722 module is a bit exact implementation of the ITU G.722 specification for all three 3.2065 -+specified bit rates - 64000bps, 56000bps and 48000bps. It passes the ITU tests. 3.2066 -+ 3.2067 -+To allow fast and flexible interworking with narrow band telephony, the encoder and decoder 3.2068 -+support an option for the linear audio to be an 8k samples/second stream. In this mode the 3.2069 -+codec is considerably faster, and still fully compatible with wideband terminals using G.722. 3.2070 -+ 3.2071 -+\section g722_page_sec_2 How does it work? 3.2072 -+???. 3.2073 -+*/ 3.2074 -+ 3.2075 -+enum 3.2076 -+{ 3.2077 -+ G722_SAMPLE_RATE_8000 = 0x0001, 3.2078 -+ G722_PACKED = 0x0002 3.2079 -+}; 3.2080 -+ 3.2081 -+#ifndef INT16_MAX 3.2082 -+#define INT16_MAX 32767 3.2083 -+#endif 3.2084 -+#ifndef INT16_MIN 3.2085 -+#define INT16_MIN (-32768) 3.2086 -+#endif 3.2087 -+ 3.2088 -+typedef struct 3.2089 -+{ 3.2090 -+ /*! TRUE if the operating in the special ITU test mode, with the band split filters 3.2091 -+ disabled. */ 3.2092 -+ int itu_test_mode; 3.2093 -+ /*! TRUE if the G.722 data is packed */ 3.2094 -+ int packed; 3.2095 -+ /*! TRUE if encode from 8k samples/second */ 3.2096 -+ int eight_k; 3.2097 -+ /*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */ 3.2098 -+ int bits_per_sample; 3.2099 -+ 3.2100 -+ /*! Signal history for the QMF */ 3.2101 -+ int x[24]; 3.2102 -+ 3.2103 -+ struct 3.2104 -+ { 3.2105 -+ int s; 3.2106 -+ int sp; 3.2107 -+ int sz; 3.2108 -+ int r[3]; 3.2109 -+ int a[3]; 3.2110 -+ int ap[3]; 3.2111 -+ int p[3]; 3.2112 -+ int d[7]; 3.2113 -+ int b[7]; 3.2114 -+ int bp[7]; 3.2115 -+ int sg[7]; 3.2116 -+ int nb; 3.2117 -+ int det; 3.2118 -+ } band[2]; 3.2119 -+ 3.2120 -+ unsigned int in_buffer; 3.2121 -+ int in_bits; 3.2122 -+ unsigned int out_buffer; 3.2123 -+ int out_bits; 3.2124 -+} g722_encode_state_t; 3.2125 -+ 3.2126 -+typedef struct 3.2127 -+{ 3.2128 -+ /*! TRUE if the operating in the special ITU test mode, with the band split filters 3.2129 -+ disabled. */ 3.2130 -+ int itu_test_mode; 3.2131 -+ /*! TRUE if the G.722 data is packed */ 3.2132 -+ int packed; 3.2133 -+ /*! TRUE if decode to 8k samples/second */ 3.2134 -+ int eight_k; 3.2135 -+ /*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */ 3.2136 -+ int bits_per_sample; 3.2137 -+ 3.2138 -+ /*! Signal history for the QMF */ 3.2139 -+ int x[24]; 3.2140 -+ 3.2141 -+ struct 3.2142 -+ { 3.2143 -+ int s; 3.2144 -+ int sp; 3.2145 -+ int sz; 3.2146 -+ int r[3]; 3.2147 -+ int a[3]; 3.2148 -+ int ap[3]; 3.2149 -+ int p[3]; 3.2150 -+ int d[7]; 3.2151 -+ int b[7]; 3.2152 -+ int bp[7]; 3.2153 -+ int sg[7]; 3.2154 -+ int nb; 3.2155 -+ int det; 3.2156 -+ } band[2]; 3.2157 -+ 3.2158 -+ unsigned int in_buffer; 3.2159 -+ int in_bits; 3.2160 -+ unsigned int out_buffer; 3.2161 -+ int out_bits; 3.2162 -+} g722_decode_state_t; 3.2163 -+ 3.2164 -+#ifdef __cplusplus 3.2165 -+extern "C" { 3.2166 -+#endif 3.2167 -+ 3.2168 -+g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, int rate, int options); 3.2169 -+int g722_encode_release(g722_encode_state_t *s); 3.2170 -+int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len); 3.2171 -+ 3.2172 -+g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, int rate, int options); 3.2173 -+int g722_decode_release(g722_decode_state_t *s); 3.2174 -+int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len); 3.2175 -+ 3.2176 -+#ifdef __cplusplus 3.2177 -+} 3.2178 -+#endif 3.2179 -+ 3.2180 -+#endif 3.2181 -Index: codecs/g722/Makefile 3.2182 -diff -Nau codecs/g722/Makefile.orig codecs/g722/Makefile 3.2183 ---- codecs/g722/Makefile.orig 1970-01-01 01:00:00.000000000 +0100 3.2184 -+++ codecs/g722/Makefile 2009-04-24 00:30:33.000000000 +0200 3.2185 -@@ -0,0 +1,18 @@ 3.2186 -+LIB=libg722.a 3.2187 -+CFLAGS+=-fPIC 3.2188 -+ 3.2189 -+include $(ASTTOPDIR)/Makefile.rules 3.2190 -+ 3.2191 -+OBJS=g722_encode.o g722_decode.o 3.2192 -+ 3.2193 -+all: $(LIB) 3.2194 -+ 3.2195 -+$(LIB): $(OBJS) 3.2196 -+ $(ECHO_PREFIX) echo " [AR] $^ -> $@" 3.2197 -+ $(CMD_PREFIX) $(AR) cr $@ $^ 3.2198 -+ $(CMD_PREFIX) $(RANLIB) $@ 3.2199 -+ 3.2200 -+clean: 3.2201 -+ rm -f $(LIB) *.o 3.2202 -+ rm -f .*.o.d 3.2203 -+ rm -f *.s *.i 3.2204 -Index: codecs/g722_slin_ex.h 3.2205 -diff -Nau codecs/g722_slin_ex.h.orig codecs/g722_slin_ex.h 3.2206 ---- codecs/g722_slin_ex.h.orig 1970-01-01 01:00:00.000000000 +0100 3.2207 -+++ codecs/g722_slin_ex.h 2009-04-24 00:30:33.000000000 +0200 3.2208 -@@ -0,0 +1,25 @@ 3.2209 -+/*! \file 3.2210 -+ * \brief g722_slin_ex.h -- 3.2211 -+ * 3.2212 -+ * 4-bit ADPCM data, 20 milliseconds worth at 8 kHz. 3.2213 -+ * 3.2214 -+ * Source: g723.example 3.2215 -+ * 3.2216 -+ * Copyright (C) 2001-2005, Digium Inc. 3.2217 -+ * 3.2218 -+ * Distributed under the terms of the GNU General Public License 3.2219 -+ * 3.2220 -+ */ 3.2221 -+ 3.2222 -+static unsigned char g722_slin_ex[] = { 3.2223 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2224 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2225 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2226 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2227 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2228 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2229 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2230 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2231 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3.2232 -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 3.2233 -+}; 3.2234 -Index: codecs/Makefile 3.2235 -diff -Nau codecs/Makefile.orig codecs/Makefile 3.2236 ---- codecs/Makefile.orig 2008-03-26 17:42:35.000000000 +0100 3.2237 -+++ codecs/Makefile 2009-04-24 00:30:33.000000000 +0200 3.2238 -@@ -31,6 +31,7 @@ 3.2239 - 3.2240 - LIBILBC:=ilbc/libilbc.a 3.2241 - LIBLPC10:=lpc10/liblpc10.a 3.2242 -+LIBG722:=g722/libg722.a 3.2243 - 3.2244 - all: _all 3.2245 - 3.2246 -@@ -45,6 +46,7 @@ 3.2247 - $(MAKE) -C gsm clean 3.2248 - $(MAKE) -C lpc10 clean 3.2249 - $(MAKE) -C ilbc clean 3.2250 -+ $(MAKE) -C g722 clean 3.2251 - 3.2252 - gsm/lib/libgsm.a: 3.2253 - @mkdir -p gsm/lib 3.2254 -@@ -59,3 +61,8 @@ 3.2255 - @$(MAKE) -C ilbc all ASTCFLAGS="$(filter-out -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS)) $(AST_NO_STRICT_OVERFLOW)" 3.2256 - 3.2257 - $(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC) 3.2258 -+ 3.2259 -+$(LIBG722): 3.2260 -+ @$(MAKE) -C g722 all 3.2261 -+ 3.2262 -+$(if $(filter codec_g722,$(EMBEDDED_MODS)),modules.link,codec_g722.so): $(LIBG722) 3.2263 -Index: codecs/slin_g722_ex.h 3.2264 -diff -Nau codecs/slin_g722_ex.h.orig codecs/slin_g722_ex.h 3.2265 ---- codecs/slin_g722_ex.h.orig 1970-01-01 01:00:00.000000000 +0100 3.2266 -+++ codecs/slin_g722_ex.h 2009-04-24 00:30:33.000000000 +0200 3.2267 -@@ -0,0 +1,25 @@ 3.2268 -+/*! \file 3.2269 -+ * \brief slin_g722_ex.h -- 3.2270 -+ * 3.2271 -+ * Signed 16-bit audio data, 10 milliseconds worth at 8 kHz. 3.2272 -+ * 3.2273 -+ * Source: g723.example 3.2274 -+ * 3.2275 -+ * Copyright (C) 2001-2005, Digium Inc. 3.2276 -+ * 3.2277 -+ * Distributed under the terms of the GNU General Public License 3.2278 -+ * 3.2279 -+ */ 3.2280 -+ 3.2281 -+static signed short slin_g722_ex[] = { 3.2282 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2283 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2284 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2285 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2286 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2287 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2288 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2289 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2290 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 3.2291 -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 3.2292 -+}; 3.2293 -Index: configure 3.2294 -diff -Nau configure.orig configure 3.2295 ---- configure.orig 2009-02-18 21:06:45.000000000 +0100 3.2296 -+++ configure 2009-04-24 00:30:33.000000000 +0200 3.2297 -@@ -11143,6 +11143,61 @@ 3.2298 - 3.2299 - fi 3.2300 - 3.2301 -+{ echo "$as_me:$LINENO: checking for tm_gmtoff in struct tm" >&5 3.2302 -+echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6; } 3.2303 -+if test "${ac_cv_struct_tm_gmtoff+set}" = set; then 3.2304 -+ echo $ECHO_N "(cached) $ECHO_C" >&6 3.2305 -+else 3.2306 -+ cat >conftest.$ac_ext <<_ACEOF 3.2307 -+/* confdefs.h. */ 3.2308 -+_ACEOF 3.2309 -+cat confdefs.h >>conftest.$ac_ext 3.2310 -+cat >>conftest.$ac_ext <<_ACEOF 3.2311 -+/* end confdefs.h. */ 3.2312 -+$ac_includes_default 3.2313 -+#include <sys/types.h> 3.2314 -+#include <$ac_cv_struct_tm> 3.2315 -+int main() { 3.2316 -+struct tm tm; tm.tm_gmtoff; 3.2317 -+; return 0; } 3.2318 -+_ACEOF 3.2319 -+rm -f conftest.$ac_objext 3.2320 -+if { (ac_try="$ac_compile" 3.2321 -+case "(($ac_try" in 3.2322 -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3.2323 -+ *) ac_try_echo=$ac_try;; 3.2324 -+esac 3.2325 -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3.2326 -+ (eval "$ac_compile") 2>conftest.er1 3.2327 -+ ac_status=$? 3.2328 -+ grep -v '^ *+' conftest.er1 >conftest.err 3.2329 -+ rm -f conftest.er1 3.2330 -+ cat conftest.err >&5 3.2331 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 3.2332 -+ (exit $ac_status); } && { 3.2333 -+ test -z "$ac_c_werror_flag" || 3.2334 -+ test ! -s conftest.err 3.2335 -+ } && test -s conftest.$ac_objext; then 3.2336 -+ ac_cv_struct_tm_gmtoff=yes 3.2337 -+else 3.2338 -+ echo "$as_me: failed program was:" >&5 3.2339 -+sed 's/^/| /' conftest.$ac_ext >&5 3.2340 -+ 3.2341 -+ ac_cv_struct_tm_gmtoff=no 3.2342 -+fi 3.2343 -+ 3.2344 -+rm -f conftest* 3.2345 -+fi 3.2346 -+{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm_gmtoff" >&5 3.2347 -+echo "${ECHO_T}$ac_cv_struct_tm_gmtoff" >&6; } 3.2348 -+if test $ac_cv_struct_tm_gmtoff = yes; then 3.2349 -+ 3.2350 -+cat >>confdefs.h <<\_ACEOF 3.2351 -+#define TM_GMTOFF 1 3.2352 -+_ACEOF 3.2353 -+ 3.2354 -+fi 3.2355 -+ 3.2356 - { echo "$as_me:$LINENO: checking for working volatile" >&5 3.2357 - echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } 3.2358 - if test "${ac_cv_c_volatile+set}" = set; then 3.2359 -Index: include/asterisk/config.h 3.2360 -diff -Nau include/asterisk/config.h.orig include/asterisk/config.h 3.2361 ---- include/asterisk/config.h.orig 2009-02-18 19:30:38.000000000 +0100 3.2362 -+++ include/asterisk/config.h 2009-04-24 00:30:33.000000000 +0200 3.2363 -@@ -33,6 +33,8 @@ 3.2364 - 3.2365 - struct ast_category; 3.2366 - 3.2367 -+#define CONFIG_STATUS_FILEUNCHANGED (void *)-1 3.2368 -+ 3.2369 - struct ast_variable { 3.2370 - char *name; 3.2371 - char *value; 3.2372 -Index: include/asterisk/frame.h 3.2373 -diff -Nau include/asterisk/frame.h.orig include/asterisk/frame.h 3.2374 ---- include/asterisk/frame.h.orig 2009-03-05 19:22:16.000000000 +0100 3.2375 -+++ include/asterisk/frame.h 2009-04-24 00:30:33.000000000 +0200 3.2376 -@@ -260,6 +260,8 @@ 3.2377 - #define AST_FORMAT_G726 (1 << 11) 3.2378 - /*! G.722 */ 3.2379 - #define AST_FORMAT_G722 (1 << 12) 3.2380 -+/*! Raw 16-bit Signed Linear (16000 Hz) PCM */ 3.2381 -+#define AST_FORMAT_SLINEAR16 (1 << 15) 3.2382 - /*! Unsupported audio bits */ 3.2383 - #define AST_FORMAT_AUDIO_UNDEFINED ((1 << 13) | (1 << 14) | (1 << 15)) 3.2384 - /*! Maximum audio format */ 3.2385 -Index: main/editline/np/vis.h 3.2386 -diff -Nau main/editline/np/vis.h.orig main/editline/np/vis.h 3.2387 ---- main/editline/np/vis.h.orig 2006-08-21 04:11:39.000000000 +0200 3.2388 -+++ main/editline/np/vis.h 2009-04-24 00:30:33.000000000 +0200 3.2389 -@@ -76,6 +76,22 @@ 3.2390 - 3.2391 - #include <sys/cdefs.h> 3.2392 - 3.2393 -+/* correct nonportable unsigned type usage */ 3.2394 -+#if !defined(__FreeBSD__) && !defined(__linux__) 3.2395 -+#ifndef u_int64_t 3.2396 -+#define u_int64_t unsigned long long 3.2397 -+#endif 3.2398 -+#ifndef u_int32_t 3.2399 -+#define u_int32_t unsigned int 3.2400 -+#endif 3.2401 -+#ifndef u_int16_t 3.2402 -+#define u_int16_t unsigned short 3.2403 -+#endif 3.2404 -+#ifndef u_int6_t 3.2405 -+#define u_int8_t unsigned char 3.2406 -+#endif 3.2407 -+#endif 3.2408 -+ 3.2409 - __BEGIN_DECLS 3.2410 - char *vis __P((char *, int, int, int)); 3.2411 - char *svis __P((char *, int, int, int, const char *)); 3.2412 -Index: main/stdtime/localtime.c 3.2413 -diff -Nau main/stdtime/localtime.c.orig main/stdtime/localtime.c 3.2414 ---- main/stdtime/localtime.c.orig 2008-09-27 17:00:48.000000000 +0200 3.2415 -+++ main/stdtime/localtime.c 2009-04-24 00:30:33.000000000 +0200 3.2416 -@@ -1134,9 +1134,9 @@ 3.2417 - */ 3.2418 - result = timesub(&t, ttisp->tt_gmtoff, sp, tmp); 3.2419 - tmp->tm_isdst = ttisp->tt_isdst; 3.2420 --#ifndef SOLARIS /* Solaris doesn't have this element */ 3.2421 -+#ifdef TM_GMTOFF 3.2422 - tmp->tm_gmtoff = ttisp->tt_gmtoff; 3.2423 --#endif 3.2424 -+#endif /* defined TM_GMTOFF */ 3.2425 - #ifdef TM_ZONE 3.2426 - tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind]; 3.2427 - #endif /* defined TM_ZONE */ 3.2428 -Index: Makefile.moddir_rules 3.2429 -diff -Nau Makefile.moddir_rules.orig Makefile.moddir_rules 3.2430 ---- Makefile.moddir_rules.orig 2008-11-26 19:36:24.000000000 +0100 3.2431 -+++ Makefile.moddir_rules 2009-04-24 00:30:33.000000000 +0200 3.2432 -@@ -69,7 +69,9 @@ 3.2433 - rm -f modules.link 3.2434 - 3.2435 - install:: all 3.2436 -+ifneq ($(LOADABLE_MODS),) 3.2437 - for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done 3.2438 -+endif 3.2439 - 3.2440 - uninstall:: 3.2441 - 3.2442 -Index: res/res_features.c 3.2443 -diff -Nau res/res_features.c.orig res/res_features.c 3.2444 ---- res/res_features.c.orig 2009-03-03 19:27:09.000000000 +0100 3.2445 -+++ res/res_features.c 2009-04-24 00:30:33.000000000 +0200 3.2446 -@@ -732,6 +732,10 @@ 3.2447 - snprintf(args, len, "%s|%s|m", S_OR(touch_format, "wav"), touch_filename); 3.2448 - } 3.2449 - 3.2450 -+ for( x = 0; x < strlen(touch_filename); x++) { 3.2451 -+ if (touch_filename[x] == '/') 3.2452 -+ touch_filename[x] = '-'; 3.2453 -+ } 3.2454 - for( x = 0; x < strlen(args); x++) { 3.2455 - if (args[x] == '/') 3.2456 - args[x] = '-'; 3.2457 -@@ -2774,6 +2778,293 @@ 3.2458 - } 3.2459 } 3.2460 3.2461 -+static char mandescr_bridge[] = 3.2462 -+"Description: Bridge together two channels already in the PBX\n" 3.2463 -+"Variables: ( Headers marked with * are required )\n" 3.2464 -+" *Channel1: Channel to Bridge to Channel2\n" 3.2465 -+" *Channel2: Channel to Bridge to Channel1\n" 3.2466 -+" Tone: (Yes|No) Play courtesy tone to Channel 2\n" 3.2467 -+"\n"; 3.2468 -+ 3.2469 -+/*! 3.2470 -+ * \brief Actual bridge 3.2471 -+ * \param chan 3.2472 -+ * \param tmpchan 3.2473 -+ * 3.2474 -+ * Stop hold music, lock both channels, masq channels, 3.2475 -+ * after bridge return channel to next priority. 3.2476 -+*/ 3.2477 -+static void do_bridge_masquerade(struct ast_channel *chan, struct ast_channel *tmpchan) 3.2478 -+{ 3.2479 -+ ast_moh_stop(chan); 3.2480 -+ ast_channel_lock(chan); 3.2481 -+ ast_setstate(tmpchan, chan->_state); 3.2482 -+ tmpchan->readformat = chan->readformat; 3.2483 -+ tmpchan->writeformat = chan->writeformat; 3.2484 -+ ast_channel_masquerade(tmpchan, chan); 3.2485 -+ ast_channel_lock(tmpchan); 3.2486 -+ ast_do_masquerade(tmpchan); 3.2487 -+ /* when returning from bridge, the channel will continue at the next priority */ 3.2488 -+ ast_explicit_goto(tmpchan, chan->context, chan->exten, chan->priority + 1); 3.2489 -+ ast_channel_unlock(tmpchan); 3.2490 -+ ast_channel_unlock(chan); 3.2491 -+} 3.2492 -+ 3.2493 -+/*! 3.2494 -+ * \brief Bridge channels together 3.2495 -+ * \param s 3.2496 -+ * \param m 3.2497 -+ * 3.2498 -+ * Make sure valid channels were specified, 3.2499 -+ * send errors if any of the channels could not be found/locked, answer channels if needed, 3.2500 -+ * create the placeholder channels and grab the other channels 3.2501 -+ * make the channels compatible, send error if we fail doing so 3.2502 -+ * setup the bridge thread object and start the bridge. 3.2503 -+ * 3.2504 -+ * \retval 0 on success or on incorrect use. 3.2505 -+ * \retval 1 on failure to bridge channels. 3.2506 -+*/ 3.2507 -+static int action_bridge(struct mansession *s, const struct message *m) 3.2508 -+{ 3.2509 -+ const char *channela = astman_get_header(m, "Channel1"); 3.2510 -+ const char *channelb = astman_get_header(m, "Channel2"); 3.2511 -+ const char *playtone = astman_get_header(m, "Tone"); 3.2512 -+ struct ast_channel *chana = NULL, *chanb = NULL; 3.2513 -+ struct ast_channel *tmpchana = NULL, *tmpchanb = NULL; 3.2514 -+ struct ast_bridge_thread_obj *tobj = NULL; 3.2515 -+ 3.2516 -+ /* make sure valid channels were specified */ 3.2517 -+ if (!ast_strlen_zero(channela) && !ast_strlen_zero(channelb)) { 3.2518 -+ chana = ast_get_channel_by_name_prefix_locked(channela, strlen(channela)); 3.2519 -+ chanb = ast_get_channel_by_name_prefix_locked(channelb, strlen(channelb)); 3.2520 -+ if (chana) 3.2521 -+ ast_channel_unlock(chana); 3.2522 -+ if (chanb) 3.2523 -+ ast_channel_unlock(chanb); 3.2524 -+ 3.2525 -+ /* send errors if any of the channels could not be found/locked */ 3.2526 -+ if (!chana) { 3.2527 -+ char buf[256]; 3.2528 -+ snprintf(buf, sizeof(buf), "Channel1 does not exist: %s", channela); 3.2529 -+ astman_send_error(s, m, buf); 3.2530 -+ return 0; 3.2531 -+ } 3.2532 -+ if (!chanb) { 3.2533 -+ char buf[256]; 3.2534 -+ snprintf(buf, sizeof(buf), "Channel2 does not exist: %s", channelb); 3.2535 -+ astman_send_error(s, m, buf); 3.2536 -+ return 0; 3.2537 -+ } 3.2538 -+ } else { 3.2539 -+ astman_send_error(s, m, "Missing channel parameter in request"); 3.2540 -+ return 0; 3.2541 -+ } 3.2542 -+ 3.2543 -+ /* Answer the channels if needed */ 3.2544 -+ if (chana->_state != AST_STATE_UP) 3.2545 -+ ast_answer(chana); 3.2546 -+ if (chanb->_state != AST_STATE_UP) 3.2547 -+ ast_answer(chanb); 3.2548 -+ 3.2549 -+ /* create the placeholder channels and grab the other channels */ 3.2550 -+ if (!(tmpchana = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL, 3.2551 -+ NULL, NULL, 0, "Bridge/%s", chana->name))) { 3.2552 -+ astman_send_error(s, m, "Unable to create temporary channel!"); 3.2553 -+ return 1; 3.2554 -+ } 3.2555 -+ 3.2556 -+ if (!(tmpchanb = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL, 3.2557 -+ NULL, NULL, 0, "Bridge/%s", chanb->name))) { 3.2558 -+ astman_send_error(s, m, "Unable to create temporary channels!"); 3.2559 -+ ast_channel_free(tmpchana); 3.2560 -+ return 1; 3.2561 -+ } 3.2562 -+ 3.2563 -+ do_bridge_masquerade(chana, tmpchana); 3.2564 -+ do_bridge_masquerade(chanb, tmpchanb); 3.2565 -+ 3.2566 -+ /* make the channels compatible, send error if we fail doing so */ 3.2567 -+ if (ast_channel_make_compatible(tmpchana, tmpchanb)) { 3.2568 -+ ast_log(LOG_WARNING, "Could not make channels %s and %s compatible for manager bridge\n", tmpchana->name, tmpchanb->name); 3.2569 -+ astman_send_error(s, m, "Could not make channels compatible for manager bridge"); 3.2570 -+ ast_hangup(tmpchana); 3.2571 -+ ast_hangup(tmpchanb); 3.2572 -+ return 1; 3.2573 -+ } 3.2574 -+ 3.2575 -+ /* setup the bridge thread object and start the bridge */ 3.2576 -+ if (!(tobj = ast_calloc(1, sizeof(*tobj)))) { 3.2577 -+ ast_log(LOG_WARNING, "Unable to spawn a new bridge thread on %s and %s: %s\n", tmpchana->name, tmpchanb->name, strerror(errno)); 3.2578 -+ astman_send_error(s, m, "Unable to spawn a new bridge thread"); 3.2579 -+ ast_hangup(tmpchana); 3.2580 -+ ast_hangup(tmpchanb); 3.2581 -+ return 1; 3.2582 -+ } 3.2583 -+ 3.2584 -+ tobj->chan = tmpchana; 3.2585 -+ tobj->peer = tmpchanb; 3.2586 -+ 3.2587 -+ if (ast_true(playtone)) { 3.2588 -+ if (!ast_strlen_zero(xfersound) && !ast_streamfile(tmpchanb, xfersound, tmpchanb->language)) { 3.2589 -+ if (ast_waitstream(tmpchanb, "") < 0) 3.2590 -+ ast_log(LOG_WARNING, "Failed to play a courtesy tone on chan %s\n", tmpchanb->name); 3.2591 -+ } 3.2592 -+ } 3.2593 -+ 3.2594 -+ ast_bridge_call_thread_launch(tobj); 3.2595 -+ 3.2596 -+ astman_send_ack(s, m, "Launched bridge thread with success"); 3.2597 -+ 3.2598 -+ return 0; 3.2599 -+} 3.2600 -+ 3.2601 -+static char *app_bridge = "Bridge"; 3.2602 -+static char *bridge_synopsis = "Bridge two channels"; 3.2603 -+static char *bridge_descrip = 3.2604 -+"Usage: Bridge(channel[,options])\n" 3.2605 -+" Allows the ability to bridge two channels via the dialplan.\n" 3.2606 -+"The current channel is bridged to the specified 'channel'.\n" 3.2607 -+" Options:\n" 3.2608 -+" p - Play a courtesy tone to 'channel'.\n" 3.2609 -+"This application sets the following channel variable upon completion:\n" 3.2610 -+" BRIDGERESULT The result of the bridge attempt as a text string, one of\n" 3.2611 -+" SUCCESS | FAILURE | LOOP | NONEXISTENT | INCOMPATIBLE\n"; 3.2612 -+ 3.2613 -+enum { 3.2614 -+ BRIDGE_OPT_PLAYTONE = (1 << 0), 3.2615 -+}; 3.2616 -+ 3.2617 -+AST_APP_OPTIONS(bridge_exec_options, BEGIN_OPTIONS 3.2618 -+ AST_APP_OPTION('p', BRIDGE_OPT_PLAYTONE) 3.2619 -+END_OPTIONS ); 3.2620 -+ 3.2621 -+/*! 3.2622 -+ * \brief Bridge channels 3.2623 -+ * \param chan 3.2624 -+ * \param data channel to bridge with. 3.2625 -+ * 3.2626 -+ * Split data, check we aren't bridging with ourself, check valid channel, 3.2627 -+ * answer call if not already, check compatible channels, setup bridge config 3.2628 -+ * now bridge call, if transfered party hangs up return to PBX extension. 3.2629 -+*/ 3.2630 -+static int bridge_exec(struct ast_channel *chan, void *data) 3.2631 -+{ 3.2632 -+ struct ast_channel *current_dest_chan, *final_dest_chan; 3.2633 -+ char *tmp_data = NULL; 3.2634 -+ struct ast_flags opts = { 0, }; 3.2635 -+ struct ast_bridge_config bconfig = { { 0, }, }; 3.2636 -+ 3.2637 -+ AST_DECLARE_APP_ARGS(args, 3.2638 -+ AST_APP_ARG(dest_chan); 3.2639 -+ AST_APP_ARG(options); 3.2640 -+ ); 3.2641 -+ 3.2642 -+ if (ast_strlen_zero(data)) { 3.2643 -+ ast_log(LOG_WARNING, "Bridge require at least 1 argument specifying the other end of the bridge\n"); 3.2644 -+ return -1; 3.2645 -+ } 3.2646 -+ 3.2647 -+ tmp_data = ast_strdupa(data); 3.2648 -+ AST_STANDARD_APP_ARGS(args, tmp_data); 3.2649 -+ if (!ast_strlen_zero(args.options)) 3.2650 -+ ast_app_parse_options(bridge_exec_options, &opts, NULL, args.options); 3.2651 -+ 3.2652 -+ /* avoid bridge with ourselves */ 3.2653 -+ if (!strncmp(chan->name, args.dest_chan, 3.2654 -+ strlen(chan->name) < strlen(args.dest_chan) ? 3.2655 -+ strlen(chan->name) : strlen(args.dest_chan))) { 3.2656 -+ ast_log(LOG_WARNING, "Unable to bridge channel %s with itself\n", chan->name); 3.2657 -+ manager_event(EVENT_FLAG_CALL, "BridgeExec", 3.2658 -+ "Response: Failed\r\n" 3.2659 -+ "Reason: Unable to bridge channel to itself\r\n" 3.2660 -+ "Channel1: %s\r\n" 3.2661 -+ "Channel2: %s\r\n", 3.2662 -+ chan->name, args.dest_chan); 3.2663 -+ pbx_builtin_setvar_helper(chan, "BRIDGERESULT", "LOOP"); 3.2664 -+ return 0; 3.2665 -+ } 3.2666 -+ 3.2667 -+ /* make sure we have a valid end point */ 3.2668 -+ if (!(current_dest_chan = ast_get_channel_by_name_prefix_locked(args.dest_chan, 3.2669 -+ strlen(args.dest_chan)))) { 3.2670 -+ ast_log(LOG_WARNING, "Bridge failed because channel %s does not exist or we " 3.2671 -+ "cannot get its lock\n", args.dest_chan); 3.2672 -+ manager_event(EVENT_FLAG_CALL, "BridgeExec", 3.2673 -+ "Response: Failed\r\n" 3.2674 -+ "Reason: Cannot grab end point\r\n" 3.2675 -+ "Channel1: %s\r\n" 3.2676 -+ "Channel2: %s\r\n", chan->name, args.dest_chan); 3.2677 -+ pbx_builtin_setvar_helper(chan, "BRIDGERESULT", "NONEXISTENT"); 3.2678 -+ return 0; 3.2679 -+ } 3.2680 -+ ast_channel_unlock(current_dest_chan); 3.2681 -+ 3.2682 -+ /* answer the channel if needed */ 3.2683 -+ if (current_dest_chan->_state != AST_STATE_UP) 3.2684 -+ ast_answer(current_dest_chan); 3.2685 -+ 3.2686 -+ /* try to allocate a place holder where current_dest_chan will be placed */ 3.2687 -+ if (!(final_dest_chan = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL, 3.2688 -+ NULL, NULL, 0, "Bridge/%s", current_dest_chan->name))) { 3.2689 -+ ast_log(LOG_WARNING, "Cannot create placeholder channel for chan %s\n", args.dest_chan); 3.2690 -+ manager_event(EVENT_FLAG_CALL, "BridgeExec", 3.2691 -+ "Response: Failed\r\n" 3.2692 -+ "Reason: cannot create placeholder\r\n" 3.2693 -+ "Channel1: %s\r\n" 3.2694 -+ "Channel2: %s\r\n", chan->name, args.dest_chan); 3.2695 -+ } 3.2696 -+ do_bridge_masquerade(current_dest_chan, final_dest_chan); 3.2697 -+ 3.2698 -+ /* now current_dest_chan is a ZOMBIE and with softhangup set to 1 and final_dest_chan is our end point */ 3.2699 -+ /* try to make compatible, send error if we fail */ 3.2700 -+ if (ast_channel_make_compatible(chan, final_dest_chan) < 0) { 3.2701 -+ ast_log(LOG_WARNING, "Could not make channels %s and %s compatible for bridge\n", chan->name, final_dest_chan->name); 3.2702 -+ manager_event(EVENT_FLAG_CALL, "BridgeExec", 3.2703 -+ "Response: Failed\r\n" 3.2704 -+ "Reason: Could not make channels compatible for bridge\r\n" 3.2705 -+ "Channel1: %s\r\n" 3.2706 -+ "Channel2: %s\r\n", chan->name, final_dest_chan->name); 3.2707 -+ ast_hangup(final_dest_chan); /* may be we should return this channel to the PBX? */ 3.2708 -+ pbx_builtin_setvar_helper(chan, "BRIDGERESULT", "INCOMPATIBLE"); 3.2709 -+ return 0; 3.2710 -+ } 3.2711 -+ 3.2712 -+ /* Report that the bridge will be successfull */ 3.2713 -+ manager_event(EVENT_FLAG_CALL, "BridgeExec", 3.2714 -+ "Response: Success\r\n" 3.2715 -+ "Channel1: %s\r\n" 3.2716 -+ "Channel2: %s\r\n", chan->name, final_dest_chan->name); 3.2717 -+ 3.2718 -+ /* we have 2 valid channels to bridge, now it is just a matter of setting up the bridge config and starting the bridge */ 3.2719 -+ if (ast_test_flag(&opts, BRIDGE_OPT_PLAYTONE) && !ast_strlen_zero(xfersound)) { 3.2720 -+ if (!ast_streamfile(final_dest_chan, xfersound, final_dest_chan->language)) { 3.2721 -+ if (ast_waitstream(final_dest_chan, "") < 0) 3.2722 -+ ast_log(LOG_WARNING, "Failed to play courtesy tone on %s\n", final_dest_chan->name); 3.2723 -+ } 3.2724 -+ } 3.2725 -+ 3.2726 -+ /* do the bridge */ 3.2727 -+ ast_bridge_call(chan, final_dest_chan, &bconfig); 3.2728 -+ 3.2729 -+ /* the bridge has ended, set BRIDGERESULT to SUCCESS. If the other channel has not been hung up, return it to the PBX */ 3.2730 -+ pbx_builtin_setvar_helper(chan, "BRIDGERESULT", "SUCCESS"); 3.2731 -+ if (!ast_check_hangup(final_dest_chan)) { 3.2732 -+ ast_log(LOG_EVENT, "starting new PBX in %s,%s,%d for chan %s\n", 3.2733 -+ final_dest_chan->context, final_dest_chan->exten, 3.2734 -+ final_dest_chan->priority, final_dest_chan->name); 3.2735 -+ 3.2736 -+ if (ast_pbx_start(final_dest_chan) != AST_PBX_SUCCESS) { 3.2737 -+ ast_log(LOG_WARNING, "FAILED continuing PBX on dest chan %s\n", final_dest_chan->name); 3.2738 -+ ast_hangup(final_dest_chan); 3.2739 -+ } else 3.2740 -+ ast_log(LOG_EVENT, "SUCCESS continuing PBX on chan %s\n", final_dest_chan->name); 3.2741 -+ } else { 3.2742 -+ ast_log(LOG_EVENT, "hangup chan %s since the other endpoint has hung up\n", final_dest_chan->name); 3.2743 -+ ast_hangup(final_dest_chan); 3.2744 -+ } 3.2745 -+ 3.2746 -+ return 0; 3.2747 -+} 3.2748 + unsigned 3.2749 +@@ -993,7 +1047,7 @@ 3.2750 + unsigned short* tmp = (unsigned short*)buf; 3.2751 3.2752 - static int load_config(void) 3.2753 - { 3.2754 -@@ -3034,6 +3325,8 @@ 3.2755 - { 3.2756 - int res; 3.2757 - 3.2758 -+ ast_register_application(app_bridge, bridge_exec, bridge_synopsis, bridge_descrip); 3.2759 -+ 3.2760 - memset(parking_ext, 0, sizeof(parking_ext)); 3.2761 - memset(parking_con, 0, sizeof(parking_con)); 3.2762 + if(*tmp == CapiNoError) { 3.2763 +- memcpy(Buf, buf + 2, (Ctrl) ? sizeof(struct capi_profile) : 2); 3.2764 ++ memcpy(Buf, buf + 2, (Ctrl) ? 224 /* sizeof(struct capi_profile) */ : 2); 3.2765 + } 3.2766 3.2767 -@@ -3048,6 +3341,7 @@ 3.2768 - ast_manager_register("ParkedCalls", 0, manager_parking_status, "List parked calls" ); 3.2769 - ast_manager_register2("Park", EVENT_FLAG_CALL, manager_park, 3.2770 - "Park a channel", mandescr_park); 3.2771 -+ ast_manager_register2("Bridge", EVENT_FLAG_CALL, action_bridge, "Bridge two channels already in the PBX", mandescr_bridge); 3.2772 + fret = *tmp; 3.2773 +@@ -1002,6 +1056,9 @@ 3.2774 + return (fret); 3.2775 } 3.2776 3.2777 - res |= ast_devstate_prov_add("Park", metermaidstate); 3.2778 -Index: apps/app_voicemail.c 3.2779 -diff -Nau apps/app_voicemail.c.orig apps/app_voicemail.c 3.2780 ---- apps/app_voicemail.c.orig 2009-04-25 02:38:20.343758775 +0200 3.2781 -+++ apps/app_voicemail.c 2009-04-25 19:56:25.287569363 +0200 3.2782 -@@ -115,6 +115,7 @@ 3.2783 - static char imapport[8]; 3.2784 - static char imapflags[128]; 3.2785 - static char imapfolder[64]; 3.2786 -+static int imapsubfold = 0; 3.2787 - static char authuser[32]; 3.2788 - static char authpassword[42]; 3.2789 ++#if 1 3.2790 ++ return CapiMsgOSResourceErr; 3.2791 ++#else 3.2792 + ioctl_data.contr = Ctrl; 3.2793 3.2794 -@@ -4313,6 +4314,7 @@ 3.2795 - /* we must use mbox(x) folder names, and copy the message there */ 3.2796 - /* simple. huh? */ 3.2797 - char sequence[10]; 3.2798 -+ char folder[256]; 3.2799 - /* get the real IMAP message number for this message */ 3.2800 - snprintf(sequence, sizeof(sequence), "%ld", vms->msgArray[msg]); 3.2801 - if (option_debug > 2) 3.2802 -@@ -4323,11 +4325,21 @@ 3.2803 - } else if (box == 0) { 3.2804 - mail_clearflag(vms->mailstream, sequence, "\\Seen"); 3.2805 + if (ioctl(capi_fd, CAPI_GET_PROFILE, &ioctl_data) < 0) { 3.2806 +@@ -1018,6 +1075,7 @@ 3.2807 + sizeof(ioctl_data.profile.ncontroller)); 3.2808 } 3.2809 -- if (!strcasecmp(mbox(0), vms->curbox) && (box == 0 || box == 1)) { 3.2810 -+ if ((!strcasecmp(mbox(0), vms->curbox) || \ 3.2811 -+ !strcasecmp(mbox(1), vms->curbox)) && \ 3.2812 -+ (box == 0 || box == 1)) { /* Don't copy data, just change Seen flag */ 3.2813 - ast_mutex_unlock(&vms->lock); 3.2814 - return 0; 3.2815 -- } else { 3.2816 -- int res = !mail_copy(vms->mailstream,sequence,(char *) mbox(box)); 3.2817 -+ } else if (box > 1) { /* Do copy data using INBOX or subfolder */ 3.2818 -+ if (imapsubfold == 1) 3.2819 -+ snprintf(folder, sizeof(folder), "%s%c%s", imapfolder, delimiter, mbox(box)); 3.2820 -+ else 3.2821 -+ strncpy(folder, mbox(box), sizeof(folder)); 3.2822 -+ int res = !mail_copy(vms->mailstream,sequence,folder); 3.2823 -+ ast_mutex_unlock(&vms->lock); 3.2824 -+ return res; 3.2825 -+ } else { /* Copy data to INBOX delegating new/old status to Seen flag */ 3.2826 -+ int res = !mail_copy(vms->mailstream,sequence,imapfolder); 3.2827 - ast_mutex_unlock(&vms->lock); 3.2828 - return res; 3.2829 + return CapiNoError; 3.2830 ++#endif 3.2831 + } 3.2832 + /* 3.2833 + * functions added to the CAPI2.0 spec 3.2834 +Index: chan_capi-1.1.5/libcapi20/convert.c 3.2835 +--- chan_capi-1.1.5/libcapi20/convert.c.orig 2009-07-23 16:11:08.000000000 +0200 3.2836 ++++ chan_capi-1.1.5/libcapi20/convert.c 2010-07-24 11:12:31.000000000 +0200 3.2837 +@@ -11,7 +11,14 @@ 3.2838 + #include <stddef.h> 3.2839 + #include <time.h> 3.2840 + #include <ctype.h> 3.2841 ++#ifdef __FreeBSD__ 3.2842 ++#include <sys/endian.h> 3.2843 ++#define bswap_16 bswap16 3.2844 ++#define bswap_32 bswap32 3.2845 ++#define bswap_64 bswap64 3.2846 ++#else 3.2847 + #include <byteswap.h> 3.2848 ++#endif 3.2849 + 3.2850 + #include "capi20.h" 3.2851 + 3.2852 +Index: channels/console_video.h 3.2853 +--- channels/console_video.h.orig 2008-06-30 17:45:15.000000000 +0200 3.2854 ++++ channels/console_video.h 2010-07-24 11:12:31.000000000 +0200 3.2855 +@@ -28,10 +28,7 @@ 3.2856 + "console {device}" 3.2857 + #else 3.2858 + 3.2859 +-#include <ffmpeg/avcodec.h> 3.2860 +-#ifndef OLD_FFMPEG 3.2861 +-#include <ffmpeg/swscale.h> /* requires a recent ffmpeg */ 3.2862 +-#endif 3.2863 ++#include <libavcoded/avcodec.h> 3.2864 + 3.2865 + #define CONSOLE_VIDEO_CMDS \ 3.2866 + "console {videodevice|videocodec" \ 3.2867 +Index: configure 3.2868 +--- configure.orig 2010-06-24 01:40:16.000000000 +0200 3.2869 ++++ configure 2010-07-24 11:14:22.000000000 +0200 3.2870 +@@ -4530,11 +4530,6 @@ 3.2871 + # note- does not work on FreeBSD 3.2872 + 3.2873 + case "${host_os}" in 3.2874 +- freebsd*) 3.2875 +- 3.2876 +- CPPFLAGS=-I/usr/local/include 3.2877 +- LDFLAGS=-L/usr/local/lib 3.2878 +- ;; 3.2879 + openbsd*) 3.2880 + 3.2881 + if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then 3.2882 +Index: main/Makefile 3.2883 +--- main/Makefile.orig 2010-06-25 20:58:37.000000000 +0200 3.2884 ++++ main/Makefile 2010-07-24 11:12:31.000000000 +0200 3.2885 +@@ -78,10 +78,7 @@ 3.2886 + endif 3.2887 + 3.2888 + ifeq ($(OSARCH),FreeBSD) 3.2889 +- # -V is understood by BSD Make, not by GNU make. 3.2890 +- BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) 3.2891 +- AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) 3.2892 +- AST_LIBS+=-lcrypto 3.2893 ++ AST_LIBS+=-lpthread -lcrypto 3.2894 + endif 3.2895 + 3.2896 + ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) 3.2897 +Index: main/file.c 3.2898 +--- main/file.c.orig 2010-03-25 17:26:13.000000000 +0100 3.2899 ++++ main/file.c 2010-07-24 11:12:31.000000000 +0200 3.2900 +@@ -254,7 +254,7 @@ 3.2901 + char *fn = NULL; 3.2902 + 3.2903 + if (!strcmp(ext, "wav49")) 3.2904 +- ext = "WAV"; 3.2905 ++ ext = "wav"; 3.2906 + 3.2907 + if (filename[0] == '/') { 3.2908 + if (asprintf(&fn, "%s.%s", filename, ext) < 0) { 3.2909 +Index: main/tcptls.c 3.2910 +--- main/tcptls.c.orig 2010-03-20 18:33:03.000000000 +0100 3.2911 ++++ main/tcptls.c 2010-07-24 11:12:31.000000000 +0200 3.2912 +@@ -325,6 +325,7 @@ 3.2913 + if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { 3.2914 + if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) 3.2915 + ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); 3.2916 ++ SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL)); 3.2917 } 3.2918 -@@ -7686,6 +7698,10 @@ 3.2919 - #ifndef IMAP_STORAGE 3.2920 - } else if (!cmd) { 3.2921 - vms.deleted[vms.curmsg] = 1; 3.2922 -+#else 3.2923 -+ } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) { 3.2924 -+ vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */ 3.2925 -+ deleted = 1; /* successful copy op */ 3.2926 - #endif 3.2927 - } else { 3.2928 - vms.deleted[vms.curmsg] = 0; 3.2929 -@@ -8198,6 +8214,7 @@ 3.2930 - const char *imap_port; 3.2931 - const char *imap_flags; 3.2932 - const char *imap_folder; 3.2933 -+ const char *imap_use_subfold; 3.2934 - const char *auth_user; 3.2935 - const char *auth_password; 3.2936 - const char *expunge_on_hangup; 3.2937 -@@ -8342,6 +8359,15 @@ 3.2938 - } else { 3.2939 - ast_copy_string(imapfolder,"INBOX", sizeof(imapfolder)); 3.2940 - } 3.2941 -+ /* IMAP saved (sub)folder location policy */ 3.2942 -+ if ((imap_use_subfold = ast_variable_retrieve(cfg, "general", "imapsubfold"))) { 3.2943 -+ if (ast_false(imap_use_subfold)) 3.2944 -+ imapsubfold = 0; 3.2945 -+ else 3.2946 -+ imapsubfold = 1; 3.2947 -+ } else { 3.2948 -+ imapsubfold = 0; 3.2949 -+ } 3.2950 3.2951 - /* There is some very unorthodox casting done here. This is due 3.2952 - * to the way c-client handles the argument passed in. It expects a 3.2953 + ast_verb(0, "SSL certificate ok\n"); 3.2954 +Index: menuselect-tree 3.2955 +--- menuselect-tree.orig 2010-07-22 21:20:17.000000000 +0200 3.2956 ++++ menuselect-tree 2010-07-24 11:12:31.000000000 +0200 3.2957 +@@ -153,6 +153,8 @@ 3.2958 + </member> 3.2959 + <member name="app_system" displayname="Generic System() application" remove_on_change="apps/app_system.o apps/app_system.so"> 3.2960 + </member> 3.2961 ++<member name="app_backticks" displayname="Generic Backticks() application" remove_on_change="apps/app_backticks.o apps/app_backticks.so"> 3.2962 ++</member> 3.2963 + <member name="app_talkdetect" displayname="Playback with Talk Detection" remove_on_change="apps/app_talkdetect.o apps/app_talkdetect.so"> 3.2964 + </member> 3.2965 + <member name="app_test" displayname="Interface Test Application" remove_on_change="apps/app_test.o apps/app_test.so"> 3.2966 +@@ -693,9 +695,9 @@ 3.2967 + <member name="CORE-SOUNDS-EN-ULAW" displayname="English, mu-Law format"> 3.2968 + </member> 3.2969 + <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format"> 3.2970 ++ <defaultenabled>yes</defaultenabled> 3.2971 + </member> 3.2972 + <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" > 3.2973 +- <defaultenabled>yes</defaultenabled> 3.2974 + </member> 3.2975 + <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format"> 3.2976 + </member> 3.2977 +@@ -771,6 +773,7 @@ 3.2978 + <member name="EXTRA-SOUNDS-EN-ULAW" displayname="English, mu-Law format"> 3.2979 + </member> 3.2980 + <member name="EXTRA-SOUNDS-EN-ALAW" displayname="English, a-Law format"> 3.2981 ++ <defaultenabled>yes</defaultenabled> 3.2982 + </member> 3.2983 + <member name="EXTRA-SOUNDS-EN-GSM" displayname="English, GSM format" > 3.2984 + </member> 3.2985 +Index: res/res_http_post.c 3.2986 +--- res/res_http_post.c.orig 2009-10-27 18:12:09.000000000 +0100 3.2987 ++++ res/res_http_post.c 2010-07-24 11:12:31.000000000 +0200 3.2988 +@@ -122,14 +122,8 @@ 3.2989 + ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n"); 3.2990 + return; 3.2991 + } else if (GMIME_IS_MULTIPART(part)) { 3.2992 +- GList *l; 3.2993 +- 3.2994 +- ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n"); 3.2995 +- l = GMIME_MULTIPART(part)->subparts; 3.2996 +- while (l) { 3.2997 +- process_message_callback(l->data, cbinfo); 3.2998 +- l = l->next; 3.2999 +- } 3.3000 ++ ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n"); 3.3001 ++ g_mime_multipart_foreach(GMIME_MULTIPART(part), process_message_callback, cbinfo); 3.3002 + } else if (GMIME_IS_PART(part)) { 3.3003 + const char *filename; 3.3004 + 3.3005 +Index: sounds/sounds.xml 3.3006 +--- sounds/sounds.xml.orig 2009-08-18 22:31:40.000000000 +0200 3.3007 ++++ sounds/sounds.xml 2010-07-24 11:12:31.000000000 +0200 3.3008 +@@ -4,9 +4,9 @@ 3.3009 + <member name="CORE-SOUNDS-EN-ULAW" displayname="English, mu-Law format"> 3.3010 + </member> 3.3011 + <member name="CORE-SOUNDS-EN-ALAW" displayname="English, a-Law format"> 3.3012 ++ <defaultenabled>yes</defaultenabled> 3.3013 + </member> 3.3014 + <member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" > 3.3015 +- <defaultenabled>yes</defaultenabled> 3.3016 + </member> 3.3017 + <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format"> 3.3018 + </member> 3.3019 +@@ -82,6 +82,7 @@ 3.3020 + <member name="EXTRA-SOUNDS-EN-ULAW" displayname="English, mu-Law format"> 3.3021 + </member> 3.3022 + <member name="EXTRA-SOUNDS-EN-ALAW" displayname="English, a-Law format"> 3.3023 ++ <defaultenabled>yes</defaultenabled> 3.3024 + </member> 3.3025 + <member name="EXTRA-SOUNDS-EN-GSM" displayname="English, GSM format" > 3.3026 + </member>
4.1 --- a/asterisk/asterisk.patch.parseavp Sun Mar 20 19:27:35 2011 +0100 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,17 +0,0 @@ 4.4 -Index: channels/chan_sip.c 4.5 -diff -Nau channels/chan_sip.c.orig channels/chan_sip.c 4.6 ---- channels/chan_sip.c.orig 2009-04-24 00:54:30.000000000 +0200 4.7 -+++ channels/chan_sip.c 2009-04-24 00:56:15.000000000 +0200 4.8 -@@ -5214,8 +5214,10 @@ 4.9 - 4.10 - numberofports = 1; 4.11 - len = -1; 4.12 -- if ((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) || 4.13 -- (sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1 && len > 0)) { 4.14 -+ if (((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2) && (len > 0)) || 4.15 -+ ((sscanf(m, "audio %d/%d RTP/SAVP %n", &x, &numberofports, &len) == 2) && (len > 0)) || 4.16 -+ ((sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1) && (len > 0)) || 4.17 -+ ((sscanf(m, "audio %d RTP/SAVP %n", &x, &len) == 1) && (len > 0))) { 4.18 - audio = TRUE; 4.19 - numberofmediastreams++; 4.20 - /* Found audio stream in this media definition */
5.1 --- a/asterisk/asterisk.patch.proxymwi Sun Mar 20 19:27:35 2011 +0100 5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 5.3 @@ -1,24 +0,0 @@ 5.4 -Index: channels/chan_sip.c 5.5 -diff -Nau channels/chan_sip.c.orig channels/chan_sip.c 5.6 ---- channels/chan_sip.c.orig 2009-04-24 00:51:58.000000000 +0200 5.7 -+++ channels/chan_sip.c 2009-04-24 00:52:33.000000000 +0200 5.8 -@@ -16428,6 +16428,7 @@ 5.9 - /* Called with peerl lock, but releases it */ 5.10 - struct sip_pvt *p; 5.11 - int newmsgs, oldmsgs; 5.12 -+ char *s = NULL; 5.13 - 5.14 - /* Do we have an IP address? If not, skip this peer */ 5.15 - if (!peer->addr.sin_addr.s_addr && !peer->defaddr.sin_addr.s_addr) 5.16 -@@ -16461,6 +16462,11 @@ 5.17 - /* Recalculate our side, and recalculate Call ID */ 5.18 - if (ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip)) 5.19 - p->ourip = __ourip; 5.20 -+ /* Set the username = mailbox and remove the context */ 5.21 -+ ast_string_field_build(p, username, "%s", peer->name); 5.22 -+ s = strchr(p->username, '@'); 5.23 -+ if (s != NULL) 5.24 -+ *s = 0; 5.25 - build_via(p); 5.26 - build_callid_pvt(p); 5.27 - /* Destroy this session after 32 secs */
6.1 --- a/asterisk/asterisk.patch.xfersips Sun Mar 20 19:27:35 2011 +0100 6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 6.3 @@ -1,36 +0,0 @@ 6.4 -Index: channels/chan_sip.c 6.5 -diff -Nau channels/chan_sip.c.orig channels/chan_sip.c 6.6 ---- channels/chan_sip.c.orig 2009-04-24 00:48:57.000000000 +0200 6.7 -+++ channels/chan_sip.c 2009-04-24 00:49:21.000000000 +0200 6.8 -@@ -18771,6 +18771,7 @@ 6.9 - \todo Fix this function so that we wait for reply to the REFER and 6.10 - react to errors, denials or other issues the other end might have. 6.11 - */ 6.12 -+/* MSvB: Paramater dest may be SIPS encoded, having '@@' before host */ 6.13 - static int sip_sipredirect(struct sip_pvt *p, const char *dest) 6.14 - { 6.15 - char *cdest; 6.16 -@@ -18780,7 +18781,7 @@ 6.17 - cdest = ast_strdupa(dest); 6.18 - 6.19 - extension = strsep(&cdest, "@"); 6.20 -- host = strsep(&cdest, ":"); 6.21 -+ host = strsep(&cdest, ":"); /* MSvB: Could begin with '@' if SIPS */ 6.22 - port = strsep(&cdest, ":"); 6.23 - if (ast_strlen_zero(extension)) { 6.24 - ast_log(LOG_ERROR, "Missing mandatory argument: extension\n"); 6.25 -@@ -18813,7 +18814,13 @@ 6.26 - } 6.27 - } 6.28 - 6.29 -- ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s%s%s>", extension, host, port ? ":" : "", port ? port : ""); 6.30 -+ if (host && *host == '@') { 6.31 -+ ast_log(LOG_DEBUG, "Decoding TLS incapable Asterisk SIP URI to a standard SIPS URI before redirecting via 302 Moved Temporarily\n"); 6.32 -+ ast_string_field_build(p, our_contact, "Transfer <sips:%s@%s%s%s>", extension, host + 1, port ? ":" : "", port ? port : ""); 6.33 -+ } 6.34 -+ else 6.35 -+ ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s%s%s>", extension, host, port ? ":" : "", port ? port : ""); 6.36 -+ 6.37 - transmit_response_reliable(p, "302 Moved Temporarily", &p->initreq); 6.38 - 6.39 - sip_scheddestroy(p, SIP_TRANS_TIMEOUT); /* Make sure we stop send this reply. */
7.1 --- a/asterisk/asterisk.spec Sun Mar 20 19:27:35 2011 +0100 7.2 +++ b/asterisk/asterisk.spec Sun Mar 20 20:00:02 2011 +0100 7.3 @@ -1,7 +1,6 @@ 7.4 ## 7.5 ## asterisk.spec -- OpenPKG RPM Package Specification 7.6 -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/> 7.7 -## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/> 7.8 +## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> 7.9 ## 7.10 ## Permission to use, copy, modify, and distribute this software for 7.11 ## any purpose with or without fee is hereby granted, provided that 7.12 @@ -22,146 +21,102 @@ 7.13 ## SUCH DAMAGE. 7.14 ## 7.15 7.16 -# package component versions 7.17 -%define V_langsounds 1.4.12 7.18 -%define V_extrasounds 1.4.9 7.19 -%define V_amoomasounds 1.4 7.20 -%define V_customsounds 1.0 7.21 -%define V_chan_capi 1.1.2 7.22 +# package version 7.23 +%define V_opkg 1.6.2.13 7.24 +%define V_asterisk 1.6.2.13 7.25 +%define V_asterisk_addons 1.6.2.2 7.26 +%define V_asterisk_sounds_core_en 1.4.20 7.27 +%define V_asterisk_sounds_core_de current 7.28 +%define V_asterisk_sounds_extra_en 1.4.11 7.29 +%define V_chan_capi 1.1.5 7.30 7.31 # package information 7.32 Name: asterisk 7.33 -Summary: Private Branch Exchange (PBX) for VoIP 7.34 +Summary: Private Branch Exchange (PBX) 7.35 URL: http://www.asterisk.org/ 7.36 Vendor: Mark Spencer et al. 7.37 -Packager: Michael Schloh von Bennewitz 7.38 -Distribution: Michael Schloh von Bennewitz 7.39 -Class: EVAL 7.40 +Packager: OpenPKG Foundation e.V. 7.41 +Distribution: OpenPKG Community 7.42 +Class: BASE 7.43 Group: VoIP 7.44 License: GPL 7.45 -Version: 1.4.24.1 7.46 -Release: 20090422 7.47 +Version: %{V_opkg} 7.48 +Release: 20101019 7.49 7.50 # package options 7.51 -%option with_libpri yes 7.52 -%option with_xfersips yes 7.53 -%option with_proxymwi yes 7.54 -%option with_parseavp yes 7.55 -%option with_radius no 7.56 -%option with_sqlite no 7.57 -%option with_pgsql no 7.58 -%option with_curl no 7.59 -%option with_imap no 7.60 -%option with_astman no 7.61 -%option with_capi no 7.62 -%option with_zaptel no 7.63 -%option with_smdipoll 10 7.64 +%option with_dahdi no 7.65 +%option with_capi no 7.66 +%option with_ogg no 7.67 +%option with_mp3 no 7.68 +%option with_fax no 7.69 +%option with_avcodec no 7.70 +%option with_ldap no 7.71 +%option with_radius no 7.72 +%option with_sqlite no 7.73 +%option with_lua no 7.74 +%option with_jabber no 7.75 +%option with_imap no 7.76 +%option with_odbc no 7.77 7.78 # list of sources 7.79 -Source0: http://downloads.digium.com/pub/asterisk/releases/asterisk-%{version}.tar.gz 7.80 -Source1: ftp://ftp.chan-capi.org/chan-capi/chan_capi-%{V_chan_capi}.tar.gz 7.81 -Source2: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-alaw.tar.gz 7.82 -Source3: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-g722.tar.gz 7.83 -Source4: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-g729.tar.gz 7.84 -Source5: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-gsm.tar.gz 7.85 -Source6: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-moh-freeplay-ulaw.tar.gz 7.86 -Source7: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-alaw-%{V_extrasounds}.tar.gz 7.87 -Source8: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-g722-%{V_extrasounds}.tar.gz 7.88 -Source9: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-g729-%{V_extrasounds}.tar.gz 7.89 -Source10: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-gsm-%{V_extrasounds}.tar.gz 7.90 -Source11: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-extra-sounds-en-ulaw-%{V_extrasounds}.tar.gz 7.91 -Source12: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-alaw-%{V_langsounds}.tar.gz 7.92 -Source13: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-g722-%{V_langsounds}.tar.gz 7.93 -Source14: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-g729-%{V_langsounds}.tar.gz 7.94 -Source15: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-%{V_langsounds}.tar.gz 7.95 -Source16: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-ulaw-%{V_langsounds}.tar.gz 7.96 -Source17: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-es-alaw-%{V_langsounds}.tar.gz 7.97 -Source18: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-es-g722-%{V_langsounds}.tar.gz 7.98 -Source19: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-es-g729-%{V_langsounds}.tar.gz 7.99 -Source20: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-es-gsm-%{V_langsounds}.tar.gz 7.100 -Source21: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-es-ulaw-%{V_langsounds}.tar.gz 7.101 -Source22: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-fr-alaw-%{V_langsounds}.tar.gz 7.102 -Source23: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-fr-g722-%{V_langsounds}.tar.gz 7.103 -Source24: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-fr-g729-%{V_langsounds}.tar.gz 7.104 -Source25: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-fr-gsm-%{V_langsounds}.tar.gz 7.105 -Source26: http://downloads.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-fr-ulaw-%{V_langsounds}.tar.gz 7.106 -Source27: http://www.amooma.de/asterisk/sprachbausteine/asterisk-%{V_amoomasounds}-de-prompts.tar.gz 7.107 -Source28: http://www.amooma.de/asterisk/sprachbausteine/asterisk-core-sounds-de-gsm-current.tar.gz 7.108 -Source29: ftp://ftp.europalab.com/pub/sfw/machsnds/de-digits/de-digits-%{V_customsounds}.tar.bz2 7.109 -Source30: asterisk.conf 7.110 -Source31: amd.conf 7.111 -Source32: capi.conf 7.112 -Source33: cdr.conf 7.113 -Source34: cdr_custom.conf 7.114 -Source35: codecs.conf 7.115 -Source36: dundi.conf 7.116 -Source37: enum.conf 7.117 -Source38: extensions.conf 7.118 -Source39: features.conf 7.119 -Source40: festival.conf 7.120 -Source41: followme.conf 7.121 -Source42: indications.conf 7.122 -Source33: logger.conf 7.123 -Source34: manager.conf 7.124 -Source45: meetme.conf 7.125 -Source46: misdn.conf 7.126 -Source47: modules.conf 7.127 -Source48: musiconhold.conf 7.128 -Source49: privacy.conf 7.129 -Source50: rpt.conf 7.130 -Source51: rtp.conf 7.131 -Source52: say.conf 7.132 -Source53: sip.conf 7.133 -Source54: sip_notify.conf 7.134 -Source55: sla.conf 7.135 -Source56: voicemail.conf 7.136 -Source57: zapata.conf 7.137 -Source58: rc.asterisk 7.138 -Source59: wakeup.agi 7.139 +Source0: http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-%{V_asterisk}.tar.gz 7.140 +Source1: http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-%{V_asterisk_addons}.tar.gz 7.141 +Source2: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-alaw-%{V_asterisk_sounds_core_en}.tar.gz 7.142 +Source3: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-alaw-%{V_asterisk_sounds_extra_en}.tar.gz 7.143 +Source4: http://www.amooma.de/asterisk/sprachbausteine/asterisk-core-sounds-de-gsm-%{V_asterisk_sounds_core_de}.tar.gz 7.144 +Source5: ftp://ftp.chan-capi.org/chan-capi/chan_capi-%{V_chan_capi}.tar.gz 7.145 +Source6: asterisk.txt 7.146 +Source7: rc.asterisk 7.147 Patch0: asterisk.patch 7.148 -Patch1: asterisk.patch.xfersips 7.149 -Patch2: asterisk.patch.proxymwi 7.150 -Patch3: asterisk.patch.parseavp 7.151 7.152 # build information 7.153 -Prefix: %{l_prefix} 7.154 -BuildRoot: %{l_buildroot} 7.155 -BuildPreReq: OpenPKG, openpkg >= 20040130, pkgconfig, awk, grep 7.156 -PreReq: OpenPKG, openpkg >= 20040130 7.157 -BuildPreReq: ncurses, openssl, zlib 7.158 -PreReq: ncurses, openssl, zlib 7.159 -BuildPreReq: speex, vorbis-libs, sox 7.160 -PreReq: speex, vorbis-libs, sox 7.161 -%if "%{with_libpri}" == "yes" 7.162 -BuildPreReq: libpri 7.163 -PreReq: libpri 7.164 +BuildPreReq: OpenPKG, openpkg >= 20100101, bison, gcc, make, grep 7.165 +PreReq: OpenPKG, openpkg >= 20100101, MTA 7.166 +BuildPreReq: zlib, curl, openssl, ncurses, speex, popt, gmime22 7.167 +PreReq: zlib, curl, openssl, ncurses, speex, popt, gmime22 7.168 +%if "%{with_ogg}" == "yes" 7.169 +BuildPreReq: vorbis-libs 7.170 +PreReq: vorbis-libs 7.171 +%endif 7.172 +%if "%{with_mp3}" == "yes" 7.173 +PreReq: mpg123 7.174 +%endif 7.175 +%if "%{with_imap}" == "yes" 7.176 +BuildPreReq: imap 7.177 +PreReq: imap 7.178 +%endif 7.179 +%if "%{with_sqlite}" == "yes" 7.180 +BuildPreReq: sqlite 7.181 +PreReq: sqlite 7.182 +%endif 7.183 +%if "%{with_lua}" == "yes" 7.184 +BuildPreReq: lua 7.185 +PreReq: lua 7.186 +%endif 7.187 +%if "%{with_fax}" == "yes" 7.188 +BuildPreReq: spandsp, tiff, jpeg, zlib 7.189 +PreReq: spandsp, tiff, jpeg, zlib 7.190 +%endif 7.191 +%if "%{with_avcodec}" == "yes" 7.192 +BuildPreReq: ffmpeg 7.193 +PreReq: ffmpeg 7.194 +%endif 7.195 +%if "%{with_ldap}" == "yes" 7.196 +BuildPreReq: openldap 7.197 +PreReq: openldap 7.198 %endif 7.199 %if "%{with_radius}" == "yes" 7.200 BuildPreReq: radiusclient 7.201 PreReq: radiusclient 7.202 %endif 7.203 -%if "%{with_sqlite}" == "yes" 7.204 -BuildPreReq: sqlite 7.205 -PreReq: sqlite 7.206 +%if "%{with_jabber}" == "yes" 7.207 +BuildPreReq: iksemel 7.208 +PreReq: iksemel 7.209 %endif 7.210 -%if "%{with_pgsql}" == "yes" 7.211 -BuildPreReq: postgresql 7.212 -PreReq: postgresql 7.213 +%if "%{with_odbc}" == "yes" 7.214 +BuildPreReq: unixodbc, sqlite, sqlite::with_odbc = yes 7.215 +PreReq: unixodbc, sqlite, sqlite::with_odbc = yes 7.216 %endif 7.217 -%if "%{with_curl}" == "yes" 7.218 -BuildPreReq: curl 7.219 -PreReq: curl 7.220 -%endif 7.221 -%if "%{with_imap}" == "yes" 7.222 -BuildPreReq: imap 7.223 -PreReq: imap 7.224 -%endif 7.225 -%if "%{with_astman}" == "yes" 7.226 -BuildPreReq: newt 7.227 -PreReq: newt 7.228 -%endif 7.229 -AutoReq: no 7.230 -AutoReqProv: no 7.231 7.232 %description 7.233 Asterisk is a complete Private Branch Exchange (PBX) in software. 7.234 @@ -172,355 +127,374 @@ 7.235 three-way calling, caller ID services, ADSI, SIP, etc. Asterisk 7.236 needs no additional hardware for VoIP. 7.237 7.238 - This copy of Asterisk is optionally patched to allow the asterisk 7.239 - server to respond to SIP/TLS transfer requests using the Transfer() 7.240 - application. Should this option be chosen, the asterisk server 7.241 - successfully dispatches all transfer destinations using 'SIPS' 7.242 - technology by means of the standard SIP/2.0 302 Moved Temporarily 7.243 - message, with a URI resembling <sips:extension@hostname.tld:port>. 7.244 - 7.245 - This copy of Asterisk is optionally patched as well to enclose the 7.246 - correct user name in NOTIFY messages when MWI logic detects changes 7.247 - in the state of Messages-Waiting. Asterisk will send NOTIFY messages 7.248 - with the URI 'user@hostname' instead of simply 'hostname'. This can 7.249 - be used by a external SIP proxy to route the MWI to the correct phone. 7.250 - 7.251 %track 7.252 prog asterisk = { 7.253 - version = %{version} 7.254 - url = http://downloads.digium.com/pub/asterisk/releases/ 7.255 - regex = asterisk-(__VER__)\.tar\.gz 7.256 + version = %{V_asterisk} 7.257 + url = http://downloads.asterisk.org/pub/telephony/asterisk/releases/ 7.258 + regex = asterisk-(\d+\.\d+(\.\d+)+)\.tar\.gz 7.259 + } 7.260 + prog asterisk:addons = { 7.261 + version = %{V_asterisk_addons} 7.262 + url = http://downloads.asterisk.org/pub/telephony/asterisk/releases/ 7.263 + regex = asterisk-addons-(\d+\.\d+(\.\d+)+)\.tar\.gz 7.264 + } 7.265 + prog asterisk:sounds_core_en = { 7.266 + version = %{V_asterisk_sounds_core_en} 7.267 + url = http://downloads.asterisk.org/pub/telephony/sounds/releases/ 7.268 + regex = asterisk-core-sounds-en-alaw-(\d+\.\d+(\.\d+)+)\.tar\.gz 7.269 + } 7.270 + prog asterisk:sounds_extra_en = { 7.271 + version = %{V_asterisk_sounds_extra_en} 7.272 + url = http://downloads.asterisk.org/pub/telephony/sounds/releases/ 7.273 + regex = asterisk-extra-sounds-en-alaw-(\d+\.\d+(\.\d+)+)\.tar\.gz 7.274 + } 7.275 + prog asterisk:sounds_core_de = { 7.276 + version = %{V_asterisk_sounds_core_de} 7.277 + url = http://www.amooma.de/asterisk/sprachbausteine/ 7.278 + regex = asterisk-core-sounds-de-gsm-(__VER__)\.tar\.gz 7.279 + } 7.280 + prog asterisk:chan_capi = { 7.281 + version = %{V_chan_capi} 7.282 + url = ftp://ftp.chan-capi.org/chan-capi/ 7.283 + regex = chan_capi-(__VER__)\.tar\.gz 7.284 } 7.285 7.286 %prep 7.287 - %setup -q -n asterisk-%{version} 7.288 - %setup -q -n asterisk-%{version} -D -T -a 1 7.289 + %setup -q -n asterisk-%{V_asterisk} 7.290 + %setup -q -n asterisk-%{V_asterisk} -D -T -a 1 7.291 + %setup -q -n asterisk-%{V_asterisk} -D -T -a 5 7.292 %patch -p0 7.293 -%if "%{with_xfersips}" == "yes" 7.294 - %patch -p0 -P 1 7.295 -%endif 7.296 -%if "%{with_proxymwi}" == "yes" 7.297 - %patch -p0 -P 2 7.298 -%endif 7.299 -%if "%{with_parseavp}" == "yes" 7.300 - %patch -p0 -P 3 7.301 + exit 0 7.302 + cp %{SOURCE2} %{SOURCE3} sounds/ 7.303 + %{l_shtool} subst \ 7.304 + -e 's;\(CORE_SOUNDS_VERSION\):=.*$;\1:=%{V_asterisk_sounds_core_en};' \ 7.305 + -e 's;\(EXTRA_SOUNDS_VERSION\):=.*$;\1:=%{V_asterisk_sounds_extra_en};' \ 7.306 + sounds/Makefile 7.307 + %{l_shtool} subst \ 7.308 + -e 's;-lradiusclient-ng;-lradiusclient;g' \ 7.309 + -e 's;radiusclient-ng\.h;radiusclient.h;g' \ 7.310 + configure cdr/cdr_radius.c 7.311 + 7.312 +%build 7.313 + # sanity check 7.314 +%if "%{with_dahdi}" == "yes" 7.315 + dahdi_prefix="" 7.316 + case "%{l_platform -t}" in 7.317 + *-linux* ) 7.318 + if [ ! -f /usr/include/linux/dahdi.h ]; then 7.319 + echo "option \"with_dahdi\" requires DAHDI Linux drivers installed" 1>&2; exit 1 7.320 + fi 7.321 + dahdi_prefix=/usr 7.322 + ;; 7.323 + *-freebsd* ) 7.324 + if [ ! -f /usr/local/include/dahdi/dahdi.h ]; then 7.325 + echo "option \"with_dahdi\" requires DAHDI FreeBSD drivers installed" 1>&2; exit 1 7.326 + fi 7.327 + dahdi_prefix=/usr/local 7.328 + ;; 7.329 + * ) echo "option \"with_dahdi\" supported under Linux and FreeBSD only" 1>&2; exit 1 ;; 7.330 + esac 7.331 %endif 7.332 7.333 - # link install-sh to where Makefiles expect it 7.334 - for dir in agi utils res channels pbx apps codecs formats cdr funcs main; do 7.335 - ( cd $dir && ln -s ../install-sh ) || exit $? 7.336 - done 7.337 + # re-configure music-on-hold to find mpg123 7.338 +%if "%{with_mp3}" == "yes" 7.339 + mpg123="%{l_prefix}/bin/mpg123" 7.340 +%else 7.341 + mpg123="`which false`" 7.342 +%endif 7.343 + %{l_shtool} subst \ 7.344 + -e "s;/usr/local/bin/mpg123;$mpg123;" \ 7.345 + -e "s;/usr/bin/mpg123;$mpg123;" \ 7.346 + res/res_musiconhold.c apps/app_mp3.c 7.347 7.348 - # apply corrections 7.349 - case "%{l_platform -t}" in 7.350 - *-sunos* ) 7.351 - %{l_shtool} subst \ 7.352 - -e 's|\(tmp->tm_gmtoff = ttisp->tt_gmtoff;\)|/*\1*/|' \ 7.353 - main/stdtime/localtime.c 7.354 - ;; 7.355 - esac 7.356 + # build program 7.357 %{l_shtool} subst \ 7.358 - -e 's;sysconfdir=/etc;true;' \ 7.359 - -e 's;mandir=/usr/share/man;true;' \ 7.360 - -e 's;localstatedir=/var;true;' \ 7.361 - -e 's;\(radiusclient\)-ng;\1;g' \ 7.362 - -e 's;\(\-lsqlite\);\13;g' \ 7.363 - -e 's;\(sqlite\)\(\.h\);\13\2;g' \ 7.364 - -e 's;\(sqlite\)\(_exec\);\13\2;g' \ 7.365 - -e 's;^\(LIBS="-lvorbis\);\1 ${OGG_LIB};' \ 7.366 - -e 's;\(#include <\${NCURSES_DIR}/include\);\1/ncurses;' \ 7.367 - -e 's;-I${IMAP_TK_DIR}/c-client;-I${IMAP_TK_DIR}/include/imap;g' \ 7.368 - -e 's;${IMAP_TK_DIR}/c-client/c-client\.a;-limap -lssl -lcrypto -lcrypt;g' \ 7.369 + -e 's;-llua5\.1;-llua;' \ 7.370 + -e 's;lua5\.1/lua\.h;lua/lua.h;' \ 7.371 + -e 's;ffmpeg/avcodec\.h;libavcodec/avcodec.h;' \ 7.372 configure 7.373 - %{l_shtool} subst \ 7.374 - -e 's; *-I/usr/local/ssl/include;;g' \ 7.375 - -e 's;/opt/ssl/include;%{l_prefix}/include;g' \ 7.376 - -e 's;/usr/local;%{l_prefix};g' \ 7.377 - -e 's;^\(MOD_SUBDIR_CFLAGS=.*\ *\)$;\1 -I%{l_prefix}/include;' \ 7.378 - -e 's;^\( *ASTETCDIR\)=.*;\1=$(sysconfdir)/asterisk;g' \ 7.379 - -e 's;^\( *ASTLIBDIR\)=.*;\1=$(libdir)/asterisk;g' \ 7.380 - -e 's;^\( *ASTHEADERDIR\)=.*;\1=$(includedir)/asterisk;g' \ 7.381 - -e 's;^\( *ASTBINDIR\)=.*;\1=$(bindir);g' \ 7.382 - -e 's;^\( *ASTSBINDIR\)=.*;\1=$(sbindir);g' \ 7.383 - -e 's;^\( *ASTSPOOLDIR\)=.*;\1=$(localstatedir)/asterisk/spool;g' \ 7.384 - -e 's;^\( *ASTLOGDIR\)=.*;\1=$(localstatedir)/asterisk/log;g' \ 7.385 - -e 's;^\( *ASTVARRUNDIR\)=.*;\1=$(localstatedir)/asterisk/run;g' \ 7.386 - -e 's;^\( *ASTMANDIR\)=.*;\1=$(mandir);g' \ 7.387 - -e 's;^\( *ASTVARLIBDIR\)=.*;\1=$(localstatedir)/asterisk/lib;g' \ 7.388 - -e 's;^\( *ASTVARRUNDIR\)=.*;\1=$(localstatedir)/asterisk/run;g' \ 7.389 - -e 's;^\( *ASTDATADIR\):*=.*;\1=$(datadir)/asterisk;g' \ 7.390 - -e 's/\(for f in\) \(\$(OLDMODS); do \\\)$/\1 "warning:" \2/' \ 7.391 - Makefile 7.392 - #-e 's;\(ASTSPOOLDIR=\$(localstatedir)\)\(/spool\)\(/asterisk\);\1\3\2;' \ 7.393 - #-e 's;\(ASTLOGDIR=\$(localstatedir)\)\(/log\)\(/asterisk\);\1\3\2;' \ 7.394 - #-e 's;\(ASTVARRUNDIR=\$(localstatedir)\)\(/run\);\1/asterisk\2;' \ 7.395 - #-e 's;\(ASTVARRUNDIR=\$(localstatedir)\)\(/run\)\(/asterisk\);\1\3\2;' \ 7.396 - #-e 's;\(ASTVARLIBDIR=\$(localstatedir)\)\(/lib\)\(/asterisk\);\1\3\2;' \ 7.397 - #-e 's;\(ASTDATADIR:=\)\$(ASTVARLIBDIR);\1$(prefix)/share/asterisk;' \ 7.398 - #Makefile 7.399 - %{l_shtool} subst \ 7.400 - -e 's; *-L/usr/local/ssl/lib;;g' \ 7.401 - -e 's;/opt/ssl/lib;%{l_prefix}/lib;g' \ 7.402 - -e 's;/usr/local;%{l_prefix};g' \ 7.403 - -e 's;\(ASTLINK=\)$;\1-Wl,--export-dynamic;g' \ 7.404 - main/Makefile 7.405 - %{l_shtool} subst \ 7.406 - -e 's;LOG_WARNING\(, "Failed to perform seek\);LOG_DEBUG\1;g' \ 7.407 - main/channel.c 7.408 - %{l_shtool} subst \ 7.409 - -e 's;LOG_WARNING\(, "[^ ][^ ]* is not supported\);LOG_DEBUG\1;g' \ 7.410 - formats/format_ogg_vorbis.c 7.411 - %{l_shtool} subst \ 7.412 - -e 's;\(/etc/radiusclient-ng/radiusclient.conf\);%{l_prefix}\1;g' \ 7.413 - -e 's;\(radiusclient\)-ng;\1;g' \ 7.414 - cdr/cdr_radius.c 7.415 - %{l_shtool} subst \ 7.416 - -e 's;\(sqlite\)\(\.h\);\13\2;g' \ 7.417 - cdr/cdr_sqlite.c 7.418 - %{l_shtool} subst \ 7.419 - -e 's;\(#define DEFAULT_POLLING_INTERVAL\) *.*;\1 %{with_smdipoll};' \ 7.420 - res/res_smdi.c 7.421 - %{l_shtool} subst \ 7.422 - -e 's;\(ASTERISK_HEADER_DIR=\).*;\1%{l_prefix}/include;g' \ 7.423 - -e 's;\(MODULES_DIR=\).*;\1%{l_prefix}/lib/asterisk/modules;g' \ 7.424 - -e 's;\(CONFIG_DIR=\).*;\1%{l_prefix}/etc/asterisk;g' \ 7.425 - -e 's;\(\$(MODULES_DIR)\);$(DESTDIR)\1;g' \ 7.426 - -e 's;\${CONFIG_DIR};$(DESTDIR)$(CONFIG_DIR);g' \ 7.427 - chan_capi-%{V_chan_capi}/Makefile 7.428 - 7.429 -# # optionally specify CPU 7.430 -# %{l_shtool} subst \ 7.431 -# -e 's;build_cpu=\$1;build_cpu=i586;' \ 7.432 -# -e 's;host_cpu=\$1;host_cpu=i586;' \ 7.433 -# configure 7.434 - 7.435 -%build 7.436 - # apply platform build rules 7.437 - libs="`pkg-config openssl speex --libs-only-l`" 7.438 -%if "%{with_curl}" == "yes" 7.439 - libs="$libs `pkg-config libcurl --libs-only-l`" 7.440 + ( echo "ac_cv_prog_CONFIG_GMIME=%{l_prefix}/bin/gmime-config" 7.441 + ) >config.cache 7.442 + cflags="%{l_cflags -O}" 7.443 + cppflags="%{l_cppflags ncurses lua .}" 7.444 + ldflags="%{l_ldflags}" 7.445 + libs="" 7.446 + cppflags="$cppflags `pkg-config gmime-2.0 --cflags-only-I`" 7.447 + ldflags="$ldflags `pkg-config gmime-2.0 --libs-only-L`" 7.448 + libs="$libs `pkg-config gmime-2.0 --libs-only-l`" 7.449 +%if "%{with_ogg}" == "yes" 7.450 + libs="$libs -logg -lm" 7.451 %endif 7.452 -%if "%{with_sqlite}" == "yes" 7.453 - libs="$libs `pkg-config sqlite3 --libs-only-l`" 7.454 +%if "%{with_avcodec}" == "yes" 7.455 + libs="$libs -lavcodec -lavutil" 7.456 %endif 7.457 -%if "%{with_pgsql}" == "yes" 7.458 - libs="-lpq $libs" 7.459 +%if "%{with_ldap}" == "yes" 7.460 + libs="$libs -lldap -llber -lssl -lcrypto" 7.461 %endif 7.462 -%if "%{with_radius}" == "yes" 7.463 - libs="$libs -lradiusclient" 7.464 +%if "%{with_dahdi}" == "yes" 7.465 + cppflags="$cppflags -I$dahdi_prefix/include" 7.466 + ldflags="$ldflags -L$dahdi_prefix/lib" 7.467 %endif 7.468 -%if "%{with_libpri}" == "yes" 7.469 - libs="$libs -lpri" 7.470 -%endif 7.471 - case "%{l_platform -t}" in 7.472 - *-linux* ) libs="$libs -lrt" ;; 7.473 - *-sunos* ) libs="$libs -lrt" ;; 7.474 - esac 7.475 - 7.476 - # configure package 7.477 CC="%{l_cc}" \ 7.478 - CFLAGS="%{l_cflags -O}" \ 7.479 -%if "%{with_imap}" == "yes" 7.480 - CPPFLAGS="%{l_cppflags imap ncurses}" \ 7.481 -%else 7.482 - CPPFLAGS="%{l_cppflags ncurses}" \ 7.483 -%endif 7.484 - LDFLAGS="%{l_ldflags}" \ 7.485 + CFLAGS="$cflags" \ 7.486 + CPPFLAGS="$cppflags" \ 7.487 + LDFLAGS="$ldflags" \ 7.488 LIBS="$libs" \ 7.489 ./configure \ 7.490 + --cache-file=./config.cache \ 7.491 --prefix=%{l_prefix} \ 7.492 --mandir=%{l_prefix}/man \ 7.493 - --with-ncurses=%{l_prefix} \ 7.494 -%if "%{with_libpri}" == "yes" 7.495 - --with-pri=%{l_prefix} \ 7.496 + --sysconfdir=%{l_prefix}/etc \ 7.497 + --localstatedir=%{l_prefix}/var/asterisk \ 7.498 + --with-curl=%{l_prefix} \ 7.499 + --with-ncurses \ 7.500 + --with-gsm="internal" \ 7.501 + --with-popt=%{l_prefix} \ 7.502 +%if "%{with_sqlite}" == "yes" 7.503 + --with-sqlite3=%{l_prefix} \ 7.504 %else 7.505 - --with-pri=no \ 7.506 + --without-sqlite3 \ 7.507 %endif 7.508 + --with-speex=%{l_prefix} \ 7.509 + --with-speexdsp=%{l_prefix} \ 7.510 --with-ssl=%{l_prefix} \ 7.511 + --with-gmime=%{l_prefix} \ 7.512 + --with-z=%{l_prefix} \ 7.513 +%if "%{with_ogg}" == "yes" 7.514 + --with-ogg=%{l_prefix} \ 7.515 + --with-vorbis=%{l_prefix} \ 7.516 +%else 7.517 + --without-ogg \ 7.518 + --without-vorbis \ 7.519 +%endif 7.520 +%if "%{with_jabber}" == "yes" 7.521 + --with-iksemel=%{l_prefix} \ 7.522 +%else 7.523 + --without-iksemel \ 7.524 +%endif 7.525 +%if "%{with_lua}" == "yes" 7.526 + --with-lua=%{l_prefix} \ 7.527 +%else 7.528 + --without-lua \ 7.529 +%endif 7.530 +%if "%{with_dahdi}" == "yes" 7.531 + --with-dahdi=$dahdi_prefix \ 7.532 + --with-tonezone=$dahdi_prefix \ 7.533 +%else 7.534 + --without-dahdi \ 7.535 + --without-tonezone \ 7.536 +%endif 7.537 +%if "%{with_avcodec}" == "yes" 7.538 + --with-avcodec=%{l_prefix} \ 7.539 +%else 7.540 + --without-avcodec \ 7.541 +%endif 7.542 +%if "%{with_ldap}" == "yes" 7.543 + --with-ldap=%{l_prefix} \ 7.544 +%else 7.545 + --without-ldap \ 7.546 +%endif 7.547 %if "%{with_radius}" == "yes" 7.548 --with-radius=%{l_prefix} \ 7.549 %else 7.550 - --with-radius=no \ 7.551 -%endif 7.552 -%if "%{with_sqlite}" == "yes" 7.553 - --with-sqlite=%{l_prefix} \ 7.554 -%else 7.555 - --with-sqlite=no \ 7.556 -%endif 7.557 -%if "%{with_postgresql}" == "yes" 7.558 - --with-postgres=%{l_prefix} \ 7.559 -%else 7.560 - --with-postgres=no \ 7.561 -%endif 7.562 -%if "%{with_curl}" == "yes" 7.563 - --with-curl=%{l_prefix} \ 7.564 -%else 7.565 - --with-curl=no \ 7.566 + --without-radius \ 7.567 %endif 7.568 %if "%{with_imap}" == "yes" 7.569 --with-imap=%{l_prefix} \ 7.570 - --disable-largefile \ 7.571 %else 7.572 - --with-imap=no \ 7.573 + --without-imap \ 7.574 %endif 7.575 -%if "%{with_astman}" == "yes" 7.576 - --with-newt=%{l_prefix} \ 7.577 +%if "%{with_odbc}" == "yes" 7.578 + --with-odbc=%{l_prefix} \ 7.579 %else 7.580 - --with-newt=no \ 7.581 + --without-odbc \ 7.582 %endif 7.583 - --with-speex=%{l_prefix} \ 7.584 - --with-speexdsp=%{l_prefix} \ 7.585 - --with-ogg=%{l_prefix} \ 7.586 - --with-vorbis=%{l_prefix} \ 7.587 - --with-z=%{l_prefix} 7.588 + --without-netsnmp \ 7.589 + --without-isdnnet \ 7.590 + --without-misdn \ 7.591 + --without-kde \ 7.592 + --without-nbs \ 7.593 + --without-newt \ 7.594 + --without-asound \ 7.595 + --without-oss \ 7.596 + --without-qt \ 7.597 + --without-sqlite \ 7.598 + --without-postgres \ 7.599 + --without-tds \ 7.600 + --without-osptk \ 7.601 + --without-pri \ 7.602 + --without-suppserv \ 7.603 + --without-vpb \ 7.604 + --without-sdl \ 7.605 + --without-x11 \ 7.606 + --without-gtk \ 7.607 + --without-gtk2 7.608 + %{l_make} %{l_mflags} \ 7.609 + CC="%{l_cc} $cflags -I. -I./include -I../include -I../../include $cppflags" 7.610 7.611 - # build package 7.612 - %{l_make} %{l_mflags -O} menuselect/menuselect menuselect-tree 7.613 - menuselect/menuselect --check-deps menuselect.makeopts 7.614 - %{l_shtool} subst \ 7.615 - -e 's;\(MENUSELECT_MOH=\).*;\1;' \ 7.616 - -e 's;\(MENUSELECT_CORE_SOUNDS=\).*;\1;' \ 7.617 - -e 's;\(MENUSELECT_EXTRA_SOUNDS=\).*;\1;' \ 7.618 - menuselect.makeopts 7.619 -%if "%{with_imap}" == "yes" 7.620 - %{l_shtool} subst \ 7.621 - -e 's;\(MENUSELECT_OPTS_app_voicemail=\)$;\1IMAP_STORAGE;' \ 7.622 - menuselect.makeopts 7.623 + # build addon modules 7.624 + ( cd asterisk-addons-* 7.625 + ASTERISK_DIR="`pwd`/.." \ 7.626 + CC="%{l_cc}" \ 7.627 + CFLAGS="%{l_cflags -O}" \ 7.628 + CPPFLAGS="%{l_cppflags ncurses tiff .}" \ 7.629 + LDFLAGS="%{l_ldflags}" \ 7.630 +%if "%{with_fax}" == "yes" 7.631 + LIBS="-ltiff -ljpeg -lz -lm" \ 7.632 +%else 7.633 + LIBS="-lm" \ 7.634 %endif 7.635 - %{l_make} %{l_mflags -O} EXTLIBS="$libs" NOISY_BUILD=yes 7.636 + ./configure \ 7.637 + --prefix=%{l_prefix} \ 7.638 + --mandir=%{l_prefix}/man \ 7.639 + --sysconfdir=%{l_prefix}/etc \ 7.640 + --localstatedir=%{l_prefix}/var/asterisk \ 7.641 + --with-ncurses \ 7.642 + --with-asterisk \ 7.643 + --without-mysqlclient \ 7.644 +%if "%{with_fax}" == "yes" 7.645 + --with-spandsp=%{l_prefix} 7.646 +%else 7.647 + --without-spandsp 7.648 +%endif 7.649 + %{l_make} %{l_mflags} \ 7.650 + CC="%{l_cc} %{l_cflags -O} -I. %{l_cppflags ncurses tiff .}" 7.651 + ) || exit $? 7.652 %if "%{with_capi}" == "yes" 7.653 - ( cd chan_capi-%{V_chan_capi} 7.654 - %{l_make} %{l_mflags -O} 7.655 + ( cd chan_capi-* 7.656 + ln -s ../include/asterisk . 7.657 + ln -s ../include/asterisk.h . 7.658 + %{l_make} %{l_mflags} \ 7.659 + INSTALL_PREFIX=%{l_prefix} \ 7.660 + ASTERISK_HEADER_DIR="`pwd`" 7.661 ) || exit $? 7.662 %endif 7.663 7.664 %install 7.665 - rm -rf $RPM_BUILD_ROOT 7.666 + # install program 7.667 + %{l_make} %{l_mflags} install \ 7.668 + DESTDIR=$RPM_BUILD_ROOT \ 7.669 + INSTALL_PREFIX=%{l_prefix} 7.670 7.671 - # install package 7.672 - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 7.673 + # install addon modules 7.674 + ( cd asterisk-addons-* 7.675 + %{l_make} %{l_mflags} install \ 7.676 + DESTDIR=$RPM_BUILD_ROOT \ 7.677 + INSTALL_PREFIX=%{l_prefix} 7.678 + ) || exit $? 7.679 %if "%{with_capi}" == "yes" 7.680 - ( cd chan_capi-%{V_chan_capi} 7.681 - %{l_make} %{l_mflags} install samples DESTDIR=$RPM_BUILD_ROOT 7.682 + ( cd chan_capi-* 7.683 + %{l_make} %{l_mflags} install \ 7.684 + INSTALL_PREFIX=$RPM_BUILD_ROOT%{l_prefix} \ 7.685 + INSTALL="%{l_shtool} install -c" \ 7.686 + MODULES_DIR='$(INSTALL_PREFIX)/lib/asterisk/modules' 7.687 ) || exit $? 7.688 %endif 7.689 7.690 - # install all sound prompt files 7.691 - for codec in alaw ulaw g722 g729 gsm; do 7.692 - for lang in es fr; do 7.693 - ( cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/${lang} 7.694 - %{l_tar} zxf %{_sourcedir}/asterisk-core-sounds-${lang}-${codec}-%{V_langsounds}.tar.gz 7.695 - ) || exit $? 7.696 - done 7.697 - ( cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds 7.698 - %{l_tar} zxf %{_sourcedir}/asterisk-extra-sounds-en-${codec}-%{V_extrasounds}.tar.gz 7.699 - %{l_tar} zxf %{_sourcedir}/asterisk-core-sounds-en-${codec}-%{V_langsounds}.tar.gz 7.700 - ) || exit $? 7.701 + # install addon sounds 7.702 + %{l_shtool} mkdir -f -p -m 755 \ 7.703 + $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/de 7.704 + ( cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/de 7.705 + %{l_gzip} -d -c %{SOURCE4} | %{l_tar} xf - 7.706 + ) || exit $? 7.707 + 7.708 + # strip down installation 7.709 + rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/autosupport >/dev/null 2>&1 || true 7.710 + rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/safe_asterisk >/dev/null 2>&1 || true 7.711 + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man8/autosupport.8 >/dev/null 2>&1 || true 7.712 + rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man8/safe_asterisk.8 >/dev/null 2>&1 || true 7.713 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/firmware >/dev/null 2>&1 || true 7.714 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/images >/dev/null 2>&1 || true 7.715 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/.asterisk* >/dev/null 2>&1 || true 7.716 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/en/CREDIT* >/dev/null 2>&1 || true 7.717 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/en/CHANGES* >/dev/null 2>&1 || true 7.718 + rmdir $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/es >/dev/null 2>&1 || true 7.719 + rmdir $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/fr >/dev/null 2>&1 || true 7.720 + 7.721 + # create additional directories 7.722 + %{l_shtool} mkdir -f -p -m 755 \ 7.723 + $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/db 7.724 + 7.725 + # post-adjust installation 7.726 + strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true 7.727 + mv $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/agi-bin \ 7.728 + $RPM_BUILD_ROOT%{l_prefix}/lib/asterisk/agi-bin 7.729 + for bin in $RPM_BUILD_ROOT%{l_prefix}/lib/asterisk/agi-bin/*.*; do 7.730 + mv $bin `echo $bin | sed -e 's;\.[^.]*$;;'` 7.731 done 7.732 7.733 - # install special case sound files 7.734 - ( cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds 7.735 - %{l_tar} jxf %{SOURCE de-digits-%{V_customsounds}.tar.bz2} 7.736 - %{l_tar} zxf %{SOURCE asterisk-core-sounds-de-gsm-current.tar.gz} 7.737 - cd de 7.738 - %{l_tar} zxf %{_sourcedir}/asterisk-%{V_amoomasounds}-de-prompts.tar.gz 7.739 - mv -f de/* . && rm -rf de 7.740 - mv -f dictate/de/* letters/ && rm -rf dictate/de 7.741 - mv -f digits/de/* letters/ && rm -rf digits/de 7.742 - mv -f letters/de/* letters/ && rm -rf letters/de 7.743 - mv -f phonetic/de/* letters/ && rm -rf phonetic/de 7.744 - ) || exit $? 7.745 + # install default configuration 7.746 + for name in `grep "^<file" %{SOURCE asterisk.txt} | sed -e 's;^.*name=";;' -e 's;".*$;;'`; do 7.747 +%if "%{with_dahdi}" == "no" 7.748 + [ ".$name" = ".chan_dahdi.conf" ] && continue 7.749 +%endif 7.750 +%if "%{with_capi}" == "no" 7.751 + [ ".$name" = ".capi.conf" ] && continue 7.752 +%endif 7.753 +%if "%{with_sqlite}" == "no" 7.754 + [ ".$name" = ".cdr_sqlite3_custom.conf" ] && continue 7.755 +%endif 7.756 +%if "%{with_odbc}" == "no" 7.757 + [ ".$name" = ".res_odbc.conf" ] && continue 7.758 + [ ".$name" = ".func_odbc.conf" ] && continue 7.759 +%endif 7.760 + (echo ""; cat %{SOURCE asterisk.txt}; echo "") |\ 7.761 + sed -e "1,/^<file name=\"$name\">/d" -e "/<\/file>/,\$d" >$name 7.762 + %{l_shtool} install -c -m 644 %{l_value -s -a} \ 7.763 + $name $RPM_BUILD_ROOT%{l_prefix}/etc/asterisk/ 7.764 + done 7.765 7.766 - # install additional music on hold files 7.767 - ( cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/moh 7.768 - for codec in alaw ulaw g722 g729 gsm; do 7.769 - %{l_tar} zxf %{_sourcedir}/asterisk-moh-freeplay-${codec}.tar.gz 7.770 - done 7.771 - ) || exit $? 7.772 - 7.773 -# # install nonstandard voicemail prompts 7.774 -# %{l_shtool} mkdir -f -p -m 755 \ 7.775 -# $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/spool/voicemail/default/%{exten}/unavail 7.776 -# %{l_shtool} install -c -m 660 \ 7.777 -# %{_sourcedir}/ansage-%{V_ansage}.wav} \ 7.778 -# $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/spool/voicemail/default/%{exten}/unavail.wav 7.779 - 7.780 - # install default configuration 7.781 - %{l_shtool} install -c -m 660 %{l_value -s -a} \ 7.782 - %{SOURCE asterisk.conf} \ 7.783 - %{SOURCE amd.conf} \ 7.784 - %{SOURCE cdr.conf} \ 7.785 - %{SOURCE codecs.conf} \ 7.786 - %{SOURCE extensions.conf} \ 7.787 - %{SOURCE features.conf} \ 7.788 - %{SOURCE festival.conf} \ 7.789 - %{SOURCE followme.conf} \ 7.790 - %{SOURCE indications.conf} \ 7.791 - %{SOURCE logger.conf} \ 7.792 - %{SOURCE manager.conf} \ 7.793 - %{SOURCE meetme.conf} \ 7.794 - %{SOURCE modules.conf} \ 7.795 - %{SOURCE musiconhold.conf} \ 7.796 - %{SOURCE rtp.conf} \ 7.797 - %{SOURCE sip.conf} \ 7.798 - %{SOURCE sla.conf} \ 7.799 - %{SOURCE voicemail.conf} \ 7.800 - %{SOURCE zapata.conf} \ 7.801 - $RPM_BUILD_ROOT%{l_prefix}/etc/asterisk/ 7.802 - 7.803 - # install runcommand script 7.804 + # install run-command script 7.805 %{l_shtool} mkdir -f -p -m 755 \ 7.806 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d 7.807 %{l_shtool} install -c -m 755 %{l_value -s -a} \ 7.808 %{SOURCE rc.asterisk} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 7.809 7.810 - # install additional AGI scripts 7.811 - %{l_shtool} install -c -m 755 %{l_value -s -a} \ 7.812 - %{SOURCE wakeup.agi} $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/agi-bin/ 7.813 - 7.814 - # correct installation hierarchy 7.815 - %{l_shtool} mkdir -f -p -m 755 \ 7.816 - $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/lib \ 7.817 - $RPM_BUILD_ROOT%{l_prefix}/var/asterisk/spool/outgoing 7.818 - 7.819 - # remove unused components 7.820 - rm -rf \ 7.821 - $RPM_BUILD_ROOT%{l_prefix}/bin \ 7.822 - $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/images \ 7.823 - $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/de/.DS_Store \ 7.824 - $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/de/autogen.sh \ 7.825 - >/dev/null 2>&1 || true 7.826 - 7.827 - # adjust inconsistent names 7.828 - for bin in $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/agi-bin/*.*; do 7.829 - mv $bin `echo $bin | sed -e 's;\.[^.]*$;;'` 7.830 - done 7.831 - 7.832 - # strip down installation 7.833 - strip $RPM_BUILD_ROOT%{l_prefix}/bin/* \ 7.834 - $RPM_BUILD_ROOT%{l_prefix}/sbin/* \ 7.835 - $RPM_BUILD_ROOT%{l_prefix}/lib/asterisk/modules/* \ 7.836 - $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/agi-bin/* \ 7.837 - >/dev/null 2>&1 || true 7.838 - 7.839 # determine installation files 7.840 - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \ 7.841 - '%config %attr(660,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/asterisk/*' \ 7.842 - '%config %attr(644,%{l_musr},%{l_mgrp}) %{l_prefix}/share/asterisk/sounds/de/*' \ 7.843 - '%config %attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/share/asterisk/sounds/de/dictate' \ 7.844 - '%config %attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/share/asterisk/sounds/de/digits' \ 7.845 - '%config %attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/share/asterisk/sounds/de/followme' \ 7.846 - '%config %attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/share/asterisk/sounds/de/letters' \ 7.847 - '%config %attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/share/asterisk/sounds/de/phonetic' \ 7.848 - '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/asterisk/*' \ 7.849 - '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/asterisk/*/*' 7.850 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 7.851 + %{l_files_std} \ 7.852 + '%config %attr(640,%{l_mgrp},%{l_rgrp}) %{l_prefix}/etc/asterisk/*' \ 7.853 + '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/asterisk' 7.854 7.855 %files -f files 7.856 7.857 %clean 7.858 - rm -rf $RPM_BUILD_ROOT 7.859 7.860 %post 7.861 +%if "%{with_dahdi}" == "yes" 7.862 + if [ $1 -eq 1 ]; then 7.863 + case "%{l_platform -t}" in 7.864 + *-freebsd* ) 7.865 + ( echo "To allow Asterisk to use the DAHDI /dev/dahdi/pseudo device(s)" 7.866 + echo "you have add the following entry to /etc/devfs.rules:" 7.867 + echo "" 7.868 + echo "[openpkg_asterisk=10]" 7.869 + echo "add path 'dahdi/pseudo*' mode 0664 user %{l_rusr} group %{l_rgrp}" 7.870 + echo "" 7.871 + ) | %{l_rpmtool} msg -b -t notice 7.872 + ;; 7.873 + esac 7.874 + fi 7.875 +%endif 7.876 +%if "%{with_odbc}" == "yes" 7.877 + # after install, optionally link into ODBC and create database 7.878 + if $RPM_INSTALL_PREFIX/bin/odbcinst -q -s -n "asterisk-sqlite" >/dev/null 2>&1; then 7.879 + : 7.880 + else 7.881 + ( echo "[asterisk-sqlite]" 7.882 + echo "Description = Asterisk SQLite Database" 7.883 + echo "Driver = SQLite3" 7.884 + echo "Database = $RPM_INSTALL_PREFIX/var/asterisk/db/asterisk.sqlite" 7.885 + echo "Timeout = 2000" 7.886 + ) | $RPM_INSTALL_PREFIX/bin/odbcinst -i -s -l -n "asterisk-sqlite" -r >/dev/null 2>&1 || true 7.887 + fi 7.888 + if [ ! -f $RPM_INSTALL_PREFIX/var/asterisk/run/asterisk.db ]; then 7.889 + ( umask 007 7.890 + echo "CREATE TABLE map (key TEXT, val TEXT);" | $RPM_INSTALL_PREFIX/bin/isql "asterisk-sqlite" -b 7.891 + chown %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/var/asterisk/db/asterisk.sqlite >/dev/null 2>&1 || true 7.892 + ) || exit $? 7.893 + fi 7.894 +%endif 7.895 # after upgrade, restart service 7.896 [ $1 -eq 2 ] || exit 0 7.897 eval `%{l_rc} asterisk status 2>/dev/null` 7.898 @@ -531,14 +505,14 @@ 7.899 # before erase, stop service and remove log files 7.900 [ $1 -eq 0 ] || exit 0 7.901 %{l_rc} asterisk stop 2>/dev/null 7.902 - rm -f $RPM_INSTALL_PREFIX/var/asterisk/lib/* >/dev/null 2>&1 || true 7.903 - rm -f $RPM_INSTALL_PREFIX/var/asterisk/log/* >/dev/null 2>&1 || true 7.904 - rm -f $RPM_INSTALL_PREFIX/var/asterisk/log/cdr-*/* >/dev/null 2>&1 || true 7.905 - rm -f $RPM_INSTALL_PREFIX/var/asterisk/run/* >/dev/null 2>&1 || true 7.906 - for deldir in meetme outgoing system tmp; do 7.907 - rm -rf \ 7.908 - $RPM_INSTALL_PREFIX/var/asterisk/spool/$deldir \ 7.909 - >/dev/null 2>&1 || true 7.910 - done 7.911 + rm -f $RPM_INSTALL_PREFIX/var/asterisk/log/* >/dev/null 2>&1 || true 7.912 + rm -f $RPM_INSTALL_PREFIX/var/asterisk/log/cdr-*/* >/dev/null 2>&1 || true 7.913 + rm -f $RPM_INSTALL_PREFIX/var/asterisk/run/* >/dev/null 2>&1 || true 7.914 + rm -f $RPM_INSTALL_PREFIX/var/asterisk/spool/*/* >/dev/null 2>&1 || true 7.915 + rm -f $RPM_INSTALL_PREFIX/var/asterisk/db/* >/dev/null 2>&1 || true 7.916 +%if "%{with_odbc}" == "yes" 7.917 + # before erase, optionally unlink from ODBC and destroy database 7.918 + $RPM_INSTALL_PREFIX/bin/odbcinst -u -s -l -n "asterisk-sqlite" >/dev/null 2>&1 || true 7.919 +%endif 7.920 exit 0 7.921
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/asterisk/asterisk.txt Sun Mar 20 20:00:02 2011 +0100 8.3 @@ -0,0 +1,787 @@ 8.4 +<file name="asterisk.conf"> 8.5 +;; 8.6 +;; asterisk.conf -- Asterisk master configuration 8.7 +;; 8.8 + 8.9 +[directories] 8.10 +astetcdir = @l_prefix@/etc/asterisk 8.11 +astmoddir = @l_prefix@/lib/asterisk/modules 8.12 +astagidir = @l_prefix@/lib/asterisk/agi-bin 8.13 +astvarlibdir = @l_prefix@/share/asterisk 8.14 +astspooldir = @l_prefix@/var/asterisk/spool 8.15 +astrundir = @l_prefix@/var/asterisk/run 8.16 +astlogdir = @l_prefix@/var/asterisk/log 8.17 +astdbdir = @l_prefix@/var/asterisk/db 8.18 + 8.19 +[files] 8.20 +astctlowner = @l_rusr@ 8.21 +astctlgroup = @l_rgrp@ 8.22 +astctlpermissions = 700 8.23 +astctl = asterisk.ctl 8.24 + 8.25 +[options] 8.26 +systemname = openpkg-pbx 8.27 +runuser = @l_rusr@ 8.28 +rungroup = @l_rgrp@ 8.29 +verbose = 0 8.30 +alwaysfork = yes 8.31 +dumpcore = no 8.32 +quiet = yes 8.33 +highpriority = no 8.34 +initcrypto = no 8.35 +nocolor = yes 8.36 +execincludes = no 8.37 +;timestamp = yes 8.38 +;optiondebug = no 8.39 +;nofork = no 8.40 +;console = no 8.41 +;dontwarn = no 8.42 + 8.43 +</file> 8.44 +<file name="modules.conf"> 8.45 +;; 8.46 +;; modules.conf -- Asterisk functionality module configuration 8.47 +;; 8.48 + 8.49 +[modules] 8.50 +autoload = yes 8.51 +noload = chan_iax2.so 8.52 +noload = chan_mgcp.so 8.53 +noload = chan_skinny.so 8.54 +noload = chan_gtalk.so 8.55 +noload = chan_ooh323.so 8.56 + 8.57 +[global] 8.58 + 8.59 +</file> 8.60 +<file name="logger.conf"> 8.61 +;; 8.62 +;; logger.conf -- Asterisk logging configuration 8.63 +;; 8.64 + 8.65 +[general] 8.66 +dateformat = %F %T 8.67 +queue_log = no 8.68 +event_log = no 8.69 + 8.70 +[logfiles] 8.71 +console = error,warning,notice,verbose 8.72 +asterisk.log = error,warning,notice ; verbose,debug 8.73 + 8.74 +</file> 8.75 +<file name="manager.conf"> 8.76 +;; 8.77 +;; manager.conf -- Asterisk internal manager API configuration 8.78 +;; 8.79 + 8.80 +[general] 8.81 +enabled = yes 8.82 +webenabled = no 8.83 +bindaddr = 127.0.0.1 8.84 +port = 5038 8.85 +sslenable = no 8.86 +sslbindaddr = 127.0.0.1 8.87 +sslbindport = 5039 8.88 +sslcert = @l_prefix@/etc/asterisk/asterisk.pem 8.89 +displayconnects = yes 8.90 +allowmultiplelogin = yes 8.91 +timestampevents = yes 8.92 + 8.93 +[asterisk] 8.94 +secret = asterisk 8.95 +deny = 0.0.0.0/0.0.0.0 8.96 +permit = 127.0.0.1/255.0.0.0 8.97 +read = system,call,agent,user,config,log,verbose,dtmf,reporting,cdr,dialplan 8.98 +write = system,call,agent,user,config,command,reporting 8.99 + 8.100 +</file> 8.101 +<file name="http.conf"> 8.102 +;; 8.103 +;; http.conf -- Asterisk HTTP Server Interface 8.104 +;; 8.105 + 8.106 +[general] 8.107 +enabled = no 8.108 +bindaddr = 127.0.0.1 8.109 +bindport = 8088 8.110 +sslenable = no 8.111 +slbindport = 8089 8.112 +sslbindaddr = 127.0.0.1 8.113 +sslcert = @l_prefix@/etc/asterisk/asterisk.pem 8.114 +enablestatic = yes 8.115 +prefix = asterisk 8.116 +redirect = / /asterisk/static/docs/index.html 8.117 + 8.118 +[post_mappings] 8.119 +uploads = @l_prefix@/var/asterisk/spool/uploads/ 8.120 + 8.121 +</file> 8.122 +<file name="sip.conf"> 8.123 +;; 8.124 +;; sip.conf -- Asterisk SIP configuration 8.125 +;; 8.126 + 8.127 +[general] 8.128 +useragent = OpenPKG Asterisk PBX 8.129 +realm = example 8.130 +bindaddr = 127.0.0.1 8.131 +bindport = 5060 8.132 +tcpenable = yes 8.133 +tcpbindaddr = 127.0.0.1:5060 8.134 +tlsenable = no 8.135 +tlsbindaddr = 127.0.0.1:5061 8.136 +tlscipher = ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL 8.137 +tlscertfile = asterisk.pem 8.138 +tlscafile = asterisk.pem 8.139 +srvlookup = yes 8.140 +useclientcode = yes 8.141 +allowguest = yes 8.142 +canreinvite = no 8.143 +nat = no 8.144 +disallow = all 8.145 +allow = speex 8.146 +allow = g726 8.147 +allow = ulaw 8.148 +allow = alaw 8.149 +allow = gsm 8.150 +videosupport = no 8.151 +;allow = h263 8.152 +;allow = h263p 8.153 +notifyhold = yes 8.154 +notifyringing = yes 8.155 +limitonpeer = yes 8.156 +call-limit = 1 8.157 +incominglimit = 1 8.158 +context = external 8.159 +;register = NNNNNNN:XXXXXX:NNNNNNN@sipgate.de/s 8.160 +;tos = 0x18 8.161 + 8.162 +;[sipgate] 8.163 +;type = peer 8.164 +;defaultuser = NNNNNNN 8.165 +;host = sipgate.de 8.166 +;fromuser = NNNNNNN 8.167 +;fromdomain = sipgate.de 8.168 +;canreinvite = no 8.169 +;disallow = all 8.170 +;allow = speex 8.171 +;allow = g726 8.172 +;allow = ulaw 8.173 +;allow = alaw 8.174 +;allow = gsm 8.175 +;context = external 8.176 + 8.177 +;[gw] 8.178 +;type = friend 8.179 +;defaultuser = gw 8.180 +;callerid = "ISDN-to-SIP" <gw> 8.181 +;fromdomain = example.com 8.182 +;secret = asterisk 8.183 +;host = dynamic 8.184 +;canreinvite = no 8.185 +;disallow = all 8.186 +;allow = g726 8.187 +;allow = ulaw 8.188 +;allow = alaw 8.189 +;allow = gsm 8.190 +;dtmfmode = rfc2833 8.191 +;qualify = yes 8.192 +;insecure = yes 8.193 +;context = external 8.194 +;nat = no 8.195 + 8.196 +[std-user](!) 8.197 +type = friend 8.198 +context = internal 8.199 +host = dynamic 8.200 +dtmfmode = rfc2833 8.201 +qualify = yes 8.202 +disallow = all 8.203 +allow = speex 8.204 +allow = g726 8.205 +allow = ulaw 8.206 +allow = alaw 8.207 + 8.208 +[behind-nat](!) 8.209 +nat = yes 8.210 + 8.211 +[with-mailbox](!) 8.212 +hasvoicemail = yes 8.213 +subscribemwi = yes 8.214 +subscribecontext = internal 8.215 +vmexten = voicemail 8.216 + 8.217 +[foo](std-user,with-mailbox) 8.218 +secret = asterisk 8.219 +callerid = "Mr. Foo" <11> 8.220 +mailbox = 11@internal 8.221 + 8.222 +[bar](std-user,with-mailbox) 8.223 +secret = asterisk 8.224 +callerid = "Mr. Bar" <12> 8.225 +mailbox = 12@internal 8.226 + 8.227 +</file> 8.228 +<file name="rtp.conf"> 8.229 +;; 8.230 +;; rtp.conf -- Asterisk RTP configuration 8.231 +;; 8.232 + 8.233 +[general] 8.234 +rtpstart = 7070 8.235 +rtpend = 7089 8.236 + 8.237 +</file> 8.238 +<file name="extensions.conf"> 8.239 +;; 8.240 +;; extensions.conf -- Asterisk inbound & outbound call configuration 8.241 +;; 8.242 + 8.243 +[general] 8.244 +static = yes 8.245 +writeprotect = yes 8.246 +autofallthrough = yes 8.247 + 8.248 +[globals] 8.249 +MEETME_SPOOLDIR = @l_prefix@/var/asterisk/spool/meetme 8.250 +STAFF = SIP/foo&SIP/bar 8.251 +CONSOLE = Console/dsp 8.252 +DOLLAR = $ 8.253 + 8.254 +;; 8.255 +;; SPECIAL CONTEXTS 8.256 +;; 8.257 + 8.258 +[macro-dial] 8.259 +exten = s,1,Dial(${ARG1},${ARG2},${ARG3}) 8.260 +exten = s,n,Goto(s-${DIALSTATUS},1) 8.261 +exten = s-ANSWER,1,Hangup 8.262 +exten = s-BUSY,1,GotoIf($["${ARG4}" == ""]?novm) 8.263 +exten = s-BUSY,n,GotoIf($[${MAILBOX_EXISTS(${ARG4})} == 0]?novm) 8.264 +exten = s-BUSY,n,VoiceMail(${ARG4},b) 8.265 +exten = s-BUSY,n,Playback(vm-goodbye) 8.266 +exten = s-BUSY,n(novm),Hangup 8.267 +exten = s-NOANSWER,1,GotoIf($["${ARG4}" == ""]?novm) 8.268 +exten = s-NOANSWER,n,MailboxExists(${ARG4}) 8.269 +exten = s-NOANSWER,n,GotoIf($[${MAILBOX_EXISTS(${ARG4})} == 0]?novm) 8.270 +exten = s-NOANSWER,n,VoiceMail(${ARG4},u) 8.271 +exten = s-NOANSWER,n,Playback(vm-goodbye) 8.272 +exten = s-NOANSWER,n(novm),Hangup 8.273 +exten = _s-.,1,Goto(s-NOANSWER,1) 8.274 + 8.275 +[default] 8.276 +; currently empty 8.277 + 8.278 +;; 8.279 +;; EXTERNAL DIAL CONTEXT 8.280 +;; 8.281 + 8.282 +[external] 8.283 +include = default 8.284 + 8.285 +; external incoming SIP connection 8.286 +exten = example,hint,${STAFF} 8.287 +exten = example,1,Goto(s,1) 8.288 +exten = s,n,Ringing 8.289 +exten = s,n,Wait(1) 8.290 +exten = s,n,Answer 8.291 +exten = s,n,Macro(dial,${STAFF},30,gTtr,1@external) 8.292 + 8.293 +; external to internal mapping 8.294 +exten = foo,hint,SIP/foo 8.295 +exten = foo,1,Goto(internal,foo,1) 8.296 +exten = bar,hint,SIP/bar 8.297 +exten = bar,1,Goto(internal,bar,1) 8.298 + 8.299 +;; 8.300 +;; INTERNAL DIAL CONTEXT 8.301 +;; 8.302 + 8.303 +[internal] 8.304 +include = default 8.305 +;include = parkedcalls 8.306 + 8.307 +; internal to external mapping 8.308 +exten = example,1,Goto(external,example,1) 8.309 + 8.310 +; internal user <foo> #11 8.311 +exten = foo,hint,SIP/foo 8.312 +exten = foo,1,Goto(11,1) 8.313 +exten = 11,hint,SIP/foo 8.314 +exten = 11,1,Macro(dial,SIP/foo,30,gTtr,11@internal) 8.315 + 8.316 +; internal user <bar> #12 8.317 +exten = bar,hint,SIP/bar 8.318 +exten = bar,1,Goto(12,1) 8.319 +exten = 12,hint,SIP/bar 8.320 +exten = 12,1,Macro(dial,SIP/bar,30,gTtr,12@internal) 8.321 + 8.322 +; internal group <all> #20 8.323 +exten = all,1,Goto(20,1) 8.324 +exten = 20/foo,1,Macro(dial,SIP/bar,60,) 8.325 +exten = 20/bar,1,Macro(dial,SIP/foo,60,) 8.326 + 8.327 +; internal service <conference> #7<n> 8.328 +exten = conference,1,Goto(70,1) 8.329 +exten = _7[0-9],1,Set(confno=${EXTEN:1}) 8.330 +exten = _7[0-9],n,Goto(7,enter) 8.331 +exten = 7,1,Set(TIMEOUT(digit)=3) 8.332 +exten = 7,n,Set(TIMEOUT(response)=6) 8.333 +exten = 7,n(repeat),Read(confno,conf-getconfno,3) 8.334 +exten = 7,n,GotoIf($[${confno} >= 0 & ${confno} <= 9]?enter) 8.335 +exten = 7,n,Playback(conf-invalid) 8.336 +exten = 7,n,Goto(repeat) 8.337 +exten = 7,n(enter),Playback(conf-placeintoconf) 8.338 +exten = 7,n,SayNumber(${confno}) 8.339 +exten = 7,n,Set(SPYGROUP=conference-${confno}) 8.340 +exten = 7,n,Set(confopt=cCpsMvio) 8.341 +exten = 7,n,GotoIf($[${confno} >= 4 & ${confno} <= 9]?l1:l2) 8.342 +exten = 7,n(l1),Set(confopt=${confopt}i) 8.343 +exten = 7,n(l2),GotoIf($[${confno} >= 7 & ${confno} <= 9]?l3:l4) 8.344 +exten = 7,n(l3),Set(confopt=${confopt}r) 8.345 +exten = 7,n,Set(MEETME_RECORDINGFILE=${MEETME_SPOOLDIR}/meetme-conference-${confno}-${STRFTIME(${EPOCH},UTC,%Y%m%d%H%M)}) 8.346 +exten = 7,n,Set(MEETME_RECORDINGFORMAT=wav49) 8.347 +exten = 7,n,Playback(this-call-may-be-monitored-or-recorded) 8.348 +exten = 7,n(l4),MeetMe(${confno},${confopt}) 8.349 +exten = 7,n,Playback(beep) 8.350 +exten = 7,n,Wait(1) 8.351 +exten = 7,n,Playback(vm-goodbye) 8.352 +exten = 7,n,Hangup 8.353 + 8.354 +; internal service <voicemail> #80/#*80<n> 8.355 +exten = voicemail,1,Goto(80,1) 8.356 +exten = 80,1,GotoIf($[${MAILBOX_EXISTS(${CALLERID(num)}@internal)} == 0]?novm) 8.357 +exten = 80,n,VoiceMailMain(${CALLERID(num)}@internal,s) 8.358 +exten = 80,n,Hangup 8.359 +exten = 80,n(novm),Playback(invalid) 8.360 +exten = 80,n,Hangup 8.361 +exten = _*80.,1,GotoIf($[${MAILBOX_EXISTS(${EXTEN:3}@internal)} == 0]?novm) 8.362 +exten = _*80.,n,VoiceMailMain(${EXTEN:3}@internal) 8.363 +exten = _*80.,n,Hangup 8.364 +exten = _*80.,n(novm),Playback(invalid) 8.365 +exten = _*80.,n,Hangup 8.366 + 8.367 +; internal service <echo> #81 8.368 +exten = echo,1,Goto(81,1) 8.369 +exten = 81,1,Answer 8.370 +exten = 81,n,Playback(demo-echotest) 8.371 +exten = 81,n,Wait(1) 8.372 +exten = 81,n,Playback(beep) 8.373 +exten = 81,n,Echo 8.374 +exten = 81,n,Wait(1) 8.375 +exten = 81,n,Playback(demo-echodone) 8.376 +exten = 81,n,Wait(1) 8.377 +exten = 81,n,Playback(vm-goodbye) 8.378 +exten = 81,n,Hangup 8.379 + 8.380 +; internal service <reload> #82 8.381 +exten = reload,1,Goto(82,1) 8.382 +exten = 82,1,Answer 8.383 +exten = 82,n,Read(pin,conf-getpin,4) 8.384 +exten = 82,n,GotoIf($[${pin} = 1234]?ok) 8.385 +exten = 82,n,Playback(conf-invalidpin) 8.386 +exten = 82,n,Hangup 8.387 +exten = 82,n(ok),Playback(beep) 8.388 +exten = 82,n,Wait(1) 8.389 +exten = 82,n,Playback(beep) 8.390 +exten = 82,n,Wait(1) 8.391 +exten = 82,n,Playback(beep) 8.392 +exten = 82,n,Wait(1) 8.393 +exten = 82,n,System(@l_prefix@/sbin/asterisk -rx reload) 8.394 +exten = 82,n,Hangup 8.395 + 8.396 +; external outgoing ISDN (via SIP-to-ISDN gateway call-through) 8.397 +;exten = _0.,1,Set(number=${EXTEN:1}) 8.398 +;exten = _0.,n,Set(enum=${ENUMLOOKUP(+${number},ALL)}) 8.399 +;exten = _0.,n,Set(enum_is_sip_url=${REGEX("^SIP/.+" ${enum})}) 8.400 +;exten = _0.,n,GotoIf($["${enum_is_sip_url}" = "1"]?sip:isdn) 8.401 +;exten = _0.,n(sip),Dial(${enum},60,o) 8.402 +;exten = _0.,n,Goto(_0.,7) 8.403 +;exten = _0.,n(isdn),Dial(SIP/gw,60,D(w1234w0#31#${number}#)) 8.404 +;exten = _0.,n,Hangup 8.405 + 8.406 +; internal outgoing SIP call (part 1/2) 8.407 +; (notice sort-order trickery!) 8.408 +include = internal-siponly 8.409 + 8.410 +[internal-siponly] 8.411 +; internal outgoing SIP call (part 2/2) 8.412 +; (notice sort-order trickery!) 8.413 +exten = _.[@].,1,Dial(SIP/${EXTEN}@${SIPDOMAIN},60,o) 8.414 +exten = _.[@].,n,Hangup 8.415 +exten = _.[@].,102,Busy 8.416 + 8.417 +</file> 8.418 +<file name="enum.conf"> 8.419 +;; 8.420 +;; enum.conf -- Asterisk ENUM configuration 8.421 +;; 8.422 + 8.423 +[general] 8.424 +search = e164.arpa 8.425 +search = e164.org 8.426 + 8.427 +</file> 8.428 +<file name="musiconhold.conf"> 8.429 +;; 8.430 +;; musiconhold.conf -- Asterisk music-on-hold configuration 8.431 +;; 8.432 + 8.433 +[default] 8.434 +mode = files 8.435 +directory = @l_prefix@/share/asterisk/moh 8.436 + 8.437 +</file> 8.438 +<file name="voicemail.conf"> 8.439 +;; 8.440 +;; voicemail.conf -- Asterisk voice mail configuration 8.441 +;; 8.442 + 8.443 +[general] 8.444 +format = wav49 8.445 +serveremail = example@example.com 8.446 +attach = yes 8.447 +maxmsg = 20 8.448 +maxsecs = 180 8.449 +minsecs = 3 8.450 +maxgreet = 60 8.451 +skipms = 3000 8.452 +maxsilence = 10 8.453 +silencethreshold = 128 8.454 +maxlogins = 3 8.455 +charset = ISO-8859-1 8.456 +pbxskip = yes 8.457 +fromstring = Asterisk PBX 8.458 +usedirectory = yes 8.459 +emailsubject = [PBX]: New voice message ${VM_MSGNUM} in mailbox ${VM_MAILBOX} 8.460 +emailbody = Dear ${VM_NAME},\n\njust wanted to let you know you were left a ${VM_DUR} long\nvoice message (number ${VM_MSGNUM}) in voice mailbox ${VM_MAILBOX}\nfrom caller ${VM_CALLERID},\non ${VM_DATE}.\nYou might want to check it when you get a chance. Thanks!\n\n\t\t\t\t-- OpenPKG Asterisk PBX\n 8.461 +pagerfromstring = Asterisk PBX 8.462 +pagersubject = New VM 8.463 +pagerbody = New ${VM_DUR} long msg in box ${VM_MAILBOX}\nfrom ${VM_CALLERID}, on ${VM_DATE} 8.464 +emaildateformat = %A, %d %B %Y %H:%M:%S %r 8.465 +mailcmd = @l_prefix@/sbin/sendmail -t 8.466 + 8.467 +[default] 8.468 + 8.469 +[external] 8.470 +1 = 1234,Example,example@example.com,,delete=yes 8.471 + 8.472 +[internal] 8.473 +11 = 1234,Mr. Foo,foo@example.com,,delete=no 8.474 +12 = 1234,Mr. Bar,bar@example.com,,delete=no 8.475 + 8.476 +</file> 8.477 +<file name="cdr.conf"> 8.478 +;; 8.479 +;; cdr.conf -- Asterisk Call Detail Record (CDR) configuration 8.480 +;; 8.481 + 8.482 +[general] 8.483 +enable = yes 8.484 +unanswered = no 8.485 +batch = no 8.486 +size = 100 8.487 +time = 300 8.488 +scheduleronly = no 8.489 +safeshutdown = yes 8.490 +endbeforehexten = yes 8.491 + 8.492 +</file> 8.493 +<file name="cdr_custom.conf"> 8.494 +;; 8.495 +;; cdr_custom.conf -- Asterisk Call Detail Record (CDR) via Comma Separated Value (CSV) format configuration 8.496 +;; 8.497 + 8.498 +[mappings] 8.499 +master.csv = "${CDR(start)}", "${CDR(answer)}", "${CDR(end)}", "${CDR(duration)}", "${CDR(billsec)}", "${CDR(clid)}", "${CDR(src)}", "${CDR(dst)}", "${CDR(dcontext)}", "${CDR(channel)}", "${CDR(dstchannel)}", "${CDR(lastapp)}", "${CDR(lastdata)}", "${CDR(disposition)}", "${CDR(amaflags)}", "${CDR(accountcode)}", "${CDR(uniqueid)}", "${CDR(userfield)}" 8.500 + 8.501 +</file> 8.502 +<file name="cdr_sqlite3_custom.conf"> 8.503 +;; 8.504 +;; cdr_sqlite3_custom.conf -- Asterisk Call Detail Record (CDR) via SQLite RDBMS format configuration 8.505 +;; 8.506 + 8.507 +[master] 8.508 +table = cdr 8.509 +columns = start, answer, end, duration, billsec, clid, src, dst, dcontext, channel, dstchannel, lastapp, lastdata, disposition, amaflags, accountcode, uniqueid, userfield 8.510 +values = "${CDR(start)}", "${CDR(answer)}", "${CDR(end)}", "${CDR(duration)}", "${CDR(billsec)}", "${CDR(clid)}", "${CDR(src)}", "${CDR(dst)}", "${CDR(dcontext)}", "${CDR(channel)}", "${CDR(dstchannel)}", "${CDR(lastapp)}", "${CDR(lastdata)}", "${CDR(disposition)}", "${CDR(amaflags)}", "${CDR(accountcode)}", "${CDR(uniqueid)}", "${CDR(userfield)}" 8.511 + 8.512 +</file> 8.513 +<file name="cdr_manager.conf"> 8.514 +;; 8.515 +;; cdr_manager.conf -- Asterisk Call Detail Record (CDR) via Asterisk Manager Interface (AMI) configuration 8.516 +;; 8.517 + 8.518 +[general] 8.519 +enabled = yes 8.520 + 8.521 +</file> 8.522 +<file name="meetme.conf"> 8.523 +;; 8.524 +;; meetme.conf -- Asterisk conference configuration 8.525 +;; 8.526 + 8.527 +[general] 8.528 +audiobuffers = 32 8.529 +;schedule = yes 8.530 +;logmembercount = yes 8.531 +;fuzzystart = 300 8.532 +;earlyalert = 3600 8.533 +;endalert = 120 8.534 + 8.535 +[rooms] 8.536 +conf = 0 8.537 +conf = 1 8.538 +conf = 2 8.539 +conf = 3 8.540 +conf = 4 8.541 +conf = 5 8.542 +conf = 6 8.543 +conf = 7 8.544 +conf = 8 8.545 +conf = 9,1234,1234 8.546 + 8.547 +</file> 8.548 +<file name="codecs.conf"> 8.549 +;; 8.550 +;; codecs.conf -- Asterisk codec configuration 8.551 +;; 8.552 + 8.553 +[speex] 8.554 +quality = 6 8.555 +complexity = 4 8.556 +enhancement = true 8.557 +vad = true 8.558 +vbr = true 8.559 +abr = 8000 8.560 +vbr_quality = 5 8.561 +dtx = false 8.562 +preprocess = false 8.563 +pp_vad = false 8.564 +pp_agc = false 8.565 +pp_agc_level = 8000 8.566 +pp_denoise = false 8.567 +pp_dereverb = false 8.568 +pp_dereverb_decay = 0.4 8.569 +pp_dereverb_level = 0.3 8.570 + 8.571 +[plc] 8.572 +genericplc = true 8.573 + 8.574 +</file> 8.575 +<file name="chan_dahdi.conf"> 8.576 +;; 8.577 +;; chan_dahdi.conf -- Asterisk DAHDI channel configuration 8.578 +;; 8.579 + 8.580 +; (an empty configuration is ok, but required even for DAHDI "dahdidummy" only) 8.581 +[trunkgroups] 8.582 +[channels] 8.583 + 8.584 +</file> 8.585 +<file name="capi.conf"> 8.586 +;; 8.587 +;; capi.conf -- Asterisk ISDN/CAPI channel configuration 8.588 +;; 8.589 + 8.590 +[general] 8.591 +nationalprefix = 0 8.592 +internationalprefix= 00 8.593 +rxgain = 1.0 8.594 +txgain = 1.0 8.595 +ulaw = no 8.596 +debug = yes 8.597 + 8.598 +[ISDN1] 8.599 +isdnmode = msn 8.600 +incomingmsn = * 8.601 +controller = 0 8.602 +group = 1 8.603 +;prefix = 0 8.604 +softdtmf = off 8.605 +relaxdtmf = off 8.606 +accountcode = 8.607 +context = external 8.608 +holdtype = local 8.609 +;immediate = yes 8.610 +echocancel = no 8.611 +echosquelch = no 8.612 +;echotail = 64 8.613 +;bridge = yes 8.614 +;callgroup = 1 8.615 +;deflect = 1234567 8.616 +devices = 2 8.617 +;dtmf_generate = yes 8.618 + 8.619 +</file> 8.620 +<file name="features.conf"> 8.621 +;; 8.622 +;; features.conf -- Asterisk Call Features configuration 8.623 +;; 8.624 + 8.625 +[general] 8.626 +;parkext = 700 8.627 +;parkpos = 701-720 8.628 +;context = parkedcalls 8.629 + 8.630 +</file> 8.631 +<file name="jabber.conf"> 8.632 +;; 8.633 +;; jabber.conf -- Asterisk Jabber configuration 8.634 +;; 8.635 + 8.636 +[general] 8.637 +;debug = yes 8.638 +;autoprune = yes 8.639 +;autoregister = yes 8.640 + 8.641 +;[asterisk] 8.642 +;type = client 8.643 +;serverhost = jabber.example.com 8.644 +;username = asterisk@example.com/asterisk 8.645 +;secret = asterisk 8.646 +;priority = 1 8.647 +;port = 5222 8.648 +;usetls = no 8.649 +;usesasl = no 8.650 +;buddy = buddy@example.com 8.651 +;status = available 8.652 +;timeout = 100 8.653 + 8.654 +</file> 8.655 +<file name="indications.conf"> 8.656 +;; 8.657 +;; indications.conf -- Asterisk Tone Indications 8.658 +;; 8.659 + 8.660 +[general] 8.661 +country = us 8.662 + 8.663 +; United States 8.664 +; (according to tones in North America) 8.665 +[us] 8.666 +description = United States (US) 8.667 +ringcadence = 2000,4000 8.668 +dial = 350+440 8.669 +busy = 480+620/500,0/500 8.670 +ring = 440+480/2000,0/4000 8.671 +congestion = 480+620/250,0/250 8.672 +callwaiting = 440/300,0/10000 8.673 +dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 8.674 +record = 1400/500,0/15000 8.675 +info = !950/330,!1400/330,!1800/330,0 8.676 +stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 8.677 + 8.678 +; United Kingdom 8.679 +; (partly according to BT SIN350) 8.680 +[uk] 8.681 +description = United Kingdom (UK) 8.682 +ringcadence = 400,200,400,2000 8.683 +dial = 350+440 8.684 +busy = 400/375,0/375 8.685 +ring = 400+450/400,0/200,400+450/400,0/2000 8.686 +congestion = 400/400,0/350,400/225,0/525 8.687 +callwaiting = 400/100,0/4000 8.688 +dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 8.689 +record = 1400/500,0/60000 8.690 +info = 950/330,0/15,1400/330,0/15,1800/330,0/1000 8.691 +stutter = 350+440/750,440/750 8.692 + 8.693 +; Germany 8.694 +; (according to http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf) 8.695 +[de] 8.696 +description = Germany (DE) 8.697 +ringcadence = 1000,4000 8.698 +dial = 425 8.699 +busy = 425/480,0/480 8.700 +ring = 425/1000,0/4000 8.701 +congestion = 425/240,0/240 8.702 +callwaiting = !425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,0 8.703 +dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 8.704 +record = 1400/80,0/15000 8.705 +info = 950/330,1400/330,1800/330,0/1000 8.706 +stutter = 425+400 8.707 + 8.708 +</file> 8.709 +<file name="res_odbc.conf"> 8.710 +;; 8.711 +;; res_odbc.conf -- Asterisk ODBC resource configuration 8.712 +;; 8.713 + 8.714 +[ENV] 8.715 + 8.716 +[asterisk-sqlite] 8.717 +enabled = no 8.718 +dsn = asterisk-sqlite 8.719 +username = 8.720 +password = 8.721 +pre-connect = no 8.722 +sanitysql = SELECT 1 8.723 +;idlecheck = 3600 8.724 +backslash_is_escape= yes 8.725 +share_connections = yes 8.726 +limit = 10 8.727 + 8.728 +</file> 8.729 +<file name="func_odbc.conf"> 8.730 +;; 8.731 +;; func_odbc.conf -- Asterisk ODBC dialplan function configuration 8.732 +;; 8.733 + 8.734 +; SQLite-based Asterisk Database Access (random SQL access) 8.735 +; Set(<variable_name>=${ASTDB_SQL(SELECT [...])}) 8.736 +; Set(ASTDB_SQL(UPDATE [...])) 8.737 +[SQL] 8.738 +prefix = ASTDB 8.739 +dsn = asterisk-sqlite 8.740 +readsql = ${ARG1} 8.741 +writesql = ${ARG1} 8.742 + 8.743 +; SQLite-based Asterisk Database Access (fixed key/value access) 8.744 +; Set(<variable_name>=${ASTDB_MAP(<key>)}) 8.745 +; Set(ASTDB_MAP(<key>)=<value>) 8.746 +[MAP] 8.747 +prefix = ASTDB 8.748 +dsn = asterisk-sqlite 8.749 +readsql = SELECT val FROM map WHERE key='${SQL_ESC(${ARG1})}' 8.750 +writesql = UPDATE map SET val='${SQL_ESC(${VAL1})}' WHERE key='${SQL_ESC(${ARG1})}' 8.751 +escapecommas = no 8.752 + 8.753 +</file> 8.754 +<file name="asterisk.pem"> 8.755 +-----BEGIN CERTIFICATE----- 8.756 +MIIDNjCCAp+gAwIBAgIBATANBgkqhkiG9w0BAQQFADCBqTELMAkGA1UEBhMCWFkx 8.757 +FTATBgNVBAgTDFNuYWtlIERlc2VydDETMBEGA1UEBxMKU25ha2UgVG93bjEXMBUG 8.758 +A1UEChMOU25ha2UgT2lsLCBMdGQxHjAcBgNVBAsTFUNlcnRpZmljYXRlIEF1dGhv 8.759 +cml0eTEVMBMGA1UEAxMMU25ha2UgT2lsIENBMR4wHAYJKoZIhvcNAQkBFg9jYUBz 8.760 +bmFrZW9pbC5kb20wHhcNOTkxMDIxMTgyMTUxWhcNMDExMDIwMTgyMTUxWjCBpzEL 8.761 +MAkGA1UEBhMCWFkxFTATBgNVBAgTDFNuYWtlIERlc2VydDETMBEGA1UEBxMKU25h 8.762 +a2UgVG93bjEXMBUGA1UEChMOU25ha2UgT2lsLCBMdGQxFzAVBgNVBAsTDldlYnNl 8.763 +cnZlciBUZWFtMRkwFwYDVQQDExB3d3cuc25ha2VvaWwuZG9tMR8wHQYJKoZIhvcN 8.764 +AQkBFhB3d3dAc25ha2VvaWwuZG9tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB 8.765 +gQC554Ro+VH0dJONqljPBW+C72MDNGNy9eXnzejXrczsHs3Pc92Vaat6CpIEEGue 8.766 +yG29xagb1o7Gj2KRgpVYcmdx6tHd2JkFW5BcFVfWXL42PV4rf9ziYon8jWsbK2aE 8.767 ++L6hCtcbxdbHOGZdSIWZJwc/1Vs70S/7ImW+Zds8YEFiAwIDAQABo24wbDAbBgNV 8.768 +HREEFDASgRB3d3dAc25ha2VvaWwuZG9tMDoGCWCGSAGG+EIBDQQtFittb2Rfc3Ns 8.769 +IGdlbmVyYXRlZCBjdXN0b20gc2VydmVyIGNlcnRpZmljYXRlMBEGCWCGSAGG+EIB 8.770 +AQQEAwIGQDANBgkqhkiG9w0BAQQFAAOBgQB6MRsYGTXUR53/nTkRDQlBdgCcnhy3 8.771 +hErfmPNl/Or5jWOmuufeIXqCvM6dK7kW/KBboui4pffIKUVafLUMdARVV6BpIGMI 8.772 +5LmVFK3sgwuJ01v/90hCt4kTWoT8YHbBLtQh7PzWgJoBAY7MJmjSguYCRt91sU4K 8.773 +s0dfWsdItkw4uQ== 8.774 +-----END CERTIFICATE----- 8.775 +-----BEGIN RSA PRIVATE KEY----- 8.776 +MIICXgIBAAKBgQC554Ro+VH0dJONqljPBW+C72MDNGNy9eXnzejXrczsHs3Pc92V 8.777 +aat6CpIEEGueyG29xagb1o7Gj2KRgpVYcmdx6tHd2JkFW5BcFVfWXL42PV4rf9zi 8.778 +Yon8jWsbK2aE+L6hCtcbxdbHOGZdSIWZJwc/1Vs70S/7ImW+Zds8YEFiAwIDAQAB 8.779 +AoGBAKTvnFGKSkUJnNQGe66I0wunGgCA3W7kbarAzEF2qKYhGlZhJQnn68RmVnAW 8.780 +pXUFvB+vmtu/+4J9OmWBJsGHFvC9xH32a0PWNr7APjAKrjAD8GWS7Z6BjuxN8QhD 8.781 +WlFMmpYhYIjT1jt7RNfs2gJGS2Ryu3zutUQGwtUB9Pou03dJAkEA6yttwVINFqQP 8.782 +utgUZ1JUHrN/rE73FzYsF/CwJp5d3rLHenZzLT0iW+kNDLUw/VpzYxK7bF2Qrt/3 8.783 +QIUWwm2InQJBAMpe+jhNMJeLDLc3tG3zeithT0mFkuzWWmT2PJgQ0V78UWhw/fSn 8.784 +Qqnq7KBY/DNjlfhezrozLDD73/ccmha0Ax8CQQCBaBlyOtNm9QqO116K6HvPlRiZ 8.785 +Wa6QQEgNOG3GInknFZu9ILcKWsywZNLAfmgh0gcSqnkmDWqTQD0PbOz0Ok/lAkEA 8.786 +g24JrfUbwOASww9PhDUju/a36rTwhhZ0oKt3EP+jKsBOErmHhZP3bKlhQoZoTOu5 8.787 +Y5QXSMChS7LZcwDFZkdE2wJATRgMbhErif+ZRwt9XJRdCo5Sx6ewyGyxjc5gvUyK 8.788 +KegHcgru/ZC3pGlujRD2LqxgJNAn5QTdW4LK8xVPFySTYg== 8.789 +-----END RSA PRIVATE KEY----- 8.790 +</file>
9.1 --- a/asterisk/capi.conf Sun Mar 20 19:27:35 2011 +0100 9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 9.3 @@ -1,34 +0,0 @@ 9.4 -;; 9.5 -;; capi.conf -- Asterisk ISDN/CAPI channel configuration 9.6 -;; 9.7 - 9.8 -;[general] 9.9 -;nationalprefix = 0 9.10 -;internationalprefix = 00 9.11 -;rxgain = 1.0 9.12 -;txgain = 1.0 9.13 -;ulaw = no 9.14 -;debug = yes 9.15 - 9.16 -;[ISDN1] 9.17 -;isdnmode = msn 9.18 -;incomingmsn = * 9.19 -;controller = 0 9.20 -;group = 1 9.21 -;;prefix = 0 9.22 -;softdtmf = off 9.23 -;relaxdtmf = off 9.24 -;accountcode = 9.25 -;context = external 9.26 -;holdtype = local 9.27 -;immediate = yes 9.28 -;echocancel = no 9.29 -;echosquelch = no 9.30 -;echotail = 64 9.31 -;bridge = yes 9.32 -;callgroup = 1 9.33 -;deflect = 1234567 9.34 -;devices = 2 9.35 -;wait_silence_samples = 1000 9.36 -;dtmf_generate = yes 9.37 -
10.1 --- a/asterisk/cdr.conf Sun Mar 20 19:27:35 2011 +0100 10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 10.3 @@ -1,148 +0,0 @@ 10.4 -; 10.5 -; Asterisk Call Detail Record engine configuration 10.6 -; 10.7 -; CDR is Call Detail Record, which provides logging services via a variety of 10.8 -; pluggable backend modules. Detailed call information can be recorded to 10.9 -; databases, files, etc. Useful for billing, fraud prevention, compliance with 10.10 -; Sarbanes-Oxley aka The Enron Act, QOS evaluations, and more. 10.11 -; 10.12 - 10.13 -;[general] 10.14 - 10.15 -; Define whether or not to use CDR logging. Setting this to "no" will override 10.16 -; any loading of backend CDR modules. Default is "yes". 10.17 -;enable=yes 10.18 - 10.19 -; Define whether or not to log unanswered calls. Setting this to "yes" will 10.20 -; report every attempt to ring a phone in dialing attempts, when it was not 10.21 -; answered. For example, if you try to dial 3 extensions, and this option is "yes", 10.22 -; you will get 3 CDR's, one for each phone that was rung. Default is "no". Some 10.23 -; find this information horribly useless. Others find it very valuable. Note, in "yes" 10.24 -; mode, you will see one CDR, with one of the call targets on one side, and the originating 10.25 -; channel on the other, and then one CDR for each channel attempted. This may seem 10.26 -; redundant, but cannot be helped. 10.27 -;unanswered = no 10.28 - 10.29 -; Define the CDR batch mode, where instead of posting the CDR at the end of 10.30 -; every call, the data will be stored in a buffer to help alleviate load on the 10.31 -; asterisk server. Default is "no". 10.32 -; 10.33 -; WARNING WARNING WARNING 10.34 -; Use of batch mode may result in data loss after unsafe asterisk termination 10.35 -; ie. software crash, power failure, kill -9, etc. 10.36 -; WARNING WARNING WARNING 10.37 -; 10.38 -;batch=no 10.39 - 10.40 -; Define the maximum number of CDRs to accumulate in the buffer before posting 10.41 -; them to the backend engines. 'batch' must be set to 'yes'. Default is 100. 10.42 -;size=100 10.43 - 10.44 -; Define the maximum time to accumulate CDRs in the buffer before posting them 10.45 -; to the backend engines. If this time limit is reached, then it will post the 10.46 -; records, regardless of the value defined for 'size'. 'batch' must be set to 10.47 -; 'yes'. Note that time is in seconds. Default is 300 (5 minutes). 10.48 -;time=300 10.49 - 10.50 -; The CDR engine uses the internal asterisk scheduler to determine when to post 10.51 -; records. Posting can either occur inside the scheduler thread, or a new 10.52 -; thread can be spawned for the submission of every batch. For small batches, 10.53 -; it might be acceptable to just use the scheduler thread, so set this to "yes". 10.54 -; For large batches, say anything over size=10, a new thread is recommended, so 10.55 -; set this to "no". Default is "no". 10.56 -;scheduleronly=no 10.57 - 10.58 -; When shutting down asterisk, you can block until the CDRs are submitted. If 10.59 -; you don't, then data will likely be lost. You can always check the size of 10.60 -; the CDR batch buffer with the CLI "cdr status" command. To enable blocking on 10.61 -; submission of CDR data during asterisk shutdown, set this to "yes". Default 10.62 -; is "yes". 10.63 -;safeshutdown=yes 10.64 - 10.65 -; Normally, CDR's are not closed out until after all extensions are finished 10.66 -; executing. By enabling this option, the CDR will be ended before executing 10.67 -; the "h" extension so that CDR values such as "end" and "billsec" may be 10.68 -; retrieved inside of of this extension. 10.69 -;endbeforehexten=no 10.70 - 10.71 -; 10.72 -; 10.73 -; CHOOSING A CDR "BACKEND" (what kind of output to generate) 10.74 -; 10.75 -; To choose a backend, you have to make sure either the right category is 10.76 -; defined in this file, or that the appropriate config file exists, and has the 10.77 -; proper definitions in it. If there are any problems, usually, the entry will 10.78 -; silently ignored, and you get no output. 10.79 -; 10.80 -; Also, please note that you can generate CDR records in as many formats as you 10.81 -; wish. If you configure 5 different CDR formats, then each event will be logged 10.82 -; in 5 different places! In the example config files, all formats are commented 10.83 -; out except for the cdr-csv format. 10.84 -; 10.85 -; Here are all the possible back ends: 10.86 -; 10.87 -; csv, custom, manager, odbc, pgsql, radius, sqlite, tds 10.88 -; (also, mysql is available via the asterisk-addons, due to licensing 10.89 -; requirements) 10.90 -; (please note, also, that other backends can be created, by creating 10.91 -; a new backend module in the source cdr/ directory!) 10.92 -; 10.93 -; Some of the modules required to provide these backends will not build or install 10.94 -; unless some dependency requirements are met. Examples of this are pgsql, odbc, 10.95 -; etc. If you are not getting output as you would expect, the first thing to do 10.96 -; is to run the command "make menuselect", and check what modules are available, 10.97 -; by looking in the "2. Call Detail Recording" option in the main menu. If your 10.98 -; backend is marked with XXX, you know that the "configure" command could not find 10.99 -; the required libraries for that option. 10.100 -; 10.101 -; To get CDRs to be logged to the plain-jane /var/log/asterisk/cdr-csv/Master.csv 10.102 -; file, define the [csv] category in this file. No database necessary. The example 10.103 -; config files are set up to provide this kind of output by default. 10.104 -; 10.105 -; To get custom csv CDR records, make sure the cdr_custom.conf file 10.106 -; is present, and contains the proper [mappings] section. The advantage to 10.107 -; using this backend, is that you can define which fields to output, and in 10.108 -; what order. By default, the example configs are set up to mimic the cdr-csv 10.109 -; output. If you don't make any changes to the mappings, you are basically generating 10.110 -; the same thing as cdr-csv, but expending more CPU cycles to do so! 10.111 -; 10.112 -; To get manager events generated, make sure the cdr_manager.conf file exists, 10.113 -; and the [general] section is defined, with the single variable 'enabled = yes'. 10.114 -; 10.115 -; For odbc, make sure all the proper libs are installed, that "make menuselect" 10.116 -; shows that the modules are available, and the cdr_odbc.conf file exists, and 10.117 -; has a [global] section with the proper variables defined. 10.118 -; 10.119 -; For pgsql, make sure all the proper libs are installed, that "make menuselect" 10.120 -; shows that the modules are available, and the cdr_pgsql.conf file exists, and 10.121 -; has a [global] section with the proper variables defined. 10.122 -; 10.123 -; For logging to radius databases, make sure all the proper libs are installed, that 10.124 -; "make menuselect" shows that the modules are available, and the [radius] 10.125 -; category is defined in this file, and in that section, make sure the 'radiuscfg' 10.126 -; variable is properly pointing to an existing radiusclient.conf file. 10.127 -; 10.128 -; For logging to sqlite databases, make sure the 'cdr.db' file exists in the log directory, 10.129 -; which is usually /var/log/asterisk. Of course, the proper libraries should be available 10.130 -; during the 'configure' operation. 10.131 -; 10.132 -; For tds logging, make sure the proper libraries are available during the 'configure' 10.133 -; phase, and that cdr_tds.conf exists and is properly set up with a [global] category. 10.134 -; 10.135 -; Also, remember, that if you wish to log CDR info to a database, you will have to define 10.136 -; a specific table in that databse to make things work! See the doc directory for more details 10.137 -; on how to create this table in each database. 10.138 -; 10.139 - 10.140 -;[csv] 10.141 -;usegmtime=yes ; log date/time in GMT. Default is "no" 10.142 -;loguniqueid=yes ; log uniqueid. Default is "no 10.143 -;loguserfield=yes ; log user field. Default is "no 10.144 - 10.145 -;[radius] 10.146 -;usegmtime=yes ; log date/time in GMT 10.147 -;loguniqueid=yes ; log uniqueid 10.148 -;loguserfield=yes ; log user field 10.149 -; Set this to the location of the radiusclient-ng configuration file 10.150 -; The default is /etc/radiusclient-ng/radiusclient.conf 10.151 -;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf
11.1 --- a/asterisk/cdr_custom.conf Sun Mar 20 19:27:35 2011 +0100 11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 11.3 @@ -1,10 +0,0 @@ 11.4 -; 11.5 -; Mappings for custom config file 11.6 -; 11.7 -; to get your csv output in a format tailored to your liking, uncomment the following 11.8 -; and look for the output in the cdr-custom/Master.csv file (usually in /var/log/asterisk). 11.9 -; 11.10 -; 11.11 -;[mappings] 11.12 -;Master.csv => "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration)}","${CDR(billsec)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}" 11.13 -
12.1 --- a/asterisk/codecs.conf Sun Mar 20 19:27:35 2011 +0100 12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 12.3 @@ -1,65 +0,0 @@ 12.4 -;[speex] 12.5 -; CBR encoding quality [0..10] 12.6 -; used only when vbr = false 12.7 -;quality => 3 12.8 - 12.9 -; codec complexity [0..10] 12.10 -; tradeoff between cpu/quality 12.11 -;complexity => 2 12.12 - 12.13 -; perceptual enhancement [true / false] 12.14 -; improves clarity of decoded speech 12.15 -;enhancement => true 12.16 - 12.17 -; voice activity detection [true / false] 12.18 -; reduces bitrate when no voice detected, used only for CBR 12.19 -; (implicit in VBR/ABR) 12.20 -;vad => true 12.21 - 12.22 -; variable bit rate [true / false] 12.23 -; uses bit rate proportionate to voice complexity 12.24 -;vbr => true 12.25 - 12.26 -; available bit rate [bps, 0 = off] 12.27 -; encoding quality modulated to match this target bit rate 12.28 -; not recommended with dtx or pp_vad - may cause bandwidth spikes 12.29 -;abr => 0 12.30 - 12.31 -; VBR encoding quality [0-10] 12.32 -; floating-point values allowed 12.33 -;vbr_quality => 4 12.34 - 12.35 -; discontinuous transmission [true / false] 12.36 -; stops transmitting completely when silence is detected 12.37 -; pp_vad is far more effective but more CPU intensive 12.38 -;dtx => false 12.39 - 12.40 -; preprocessor configuration 12.41 -; these options only affect Speex v1.1.8 or newer 12.42 - 12.43 -; enable preprocessor [true / false] 12.44 -; allows dsp functionality below but incurs CPU overhead 12.45 -;preprocess => false 12.46 - 12.47 -; preproc voice activity detection [true / false] 12.48 -; more advanced equivalent of DTX, based on voice frequencies 12.49 -;pp_vad => false 12.50 - 12.51 -; preproc automatic gain control [true / false] 12.52 -;pp_agc => false 12.53 -;pp_agc_level => 8000 12.54 - 12.55 -; preproc denoiser [true / false] 12.56 -;pp_denoise => false 12.57 - 12.58 -; preproc dereverb [true / false] 12.59 -;pp_dereverb => false 12.60 -;pp_dereverb_decay => 0.4 12.61 -;pp_dereverb_level => 0.3 12.62 - 12.63 - 12.64 -;[plc] 12.65 -; for all codecs which do not support native PLC 12.66 -; this determines whether to perform generic PLC 12.67 -; there is a minor performance penalty for this 12.68 -;genericplc => true
13.1 --- a/asterisk/dundi.conf Sun Mar 20 19:27:35 2011 +0100 13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 13.3 @@ -1,239 +0,0 @@ 13.4 -; 13.5 -; DUNDi configuration file 13.6 -; 13.7 -; For more information about DUNDi, see http://www.dundi.com 13.8 -; 13.9 -; 13.10 -;[general] 13.11 -; 13.12 -; The "general" section contains general parameters relating 13.13 -; to the operation of the dundi client and server. 13.14 -; 13.15 -; The first part should be your complete contact information 13.16 -; should someone else in your peer group need to contact you. 13.17 -; 13.18 -;department=Your Department 13.19 -;organization=Your Company, Inc. 13.20 -;locality=Your City 13.21 -;stateprov=ST 13.22 -;country=US 13.23 -;email=your@email.com 13.24 -;phone=+12565551212 13.25 -; 13.26 -; 13.27 -; Specify bind address and port number. Default is 13.28 -; 4520 13.29 -; 13.30 -;bindaddr=0.0.0.0 13.31 -;port=4520 13.32 -; 13.33 -; Our entity identifier (Should generally be the MAC address of the 13.34 -; machine it's running on. Defaults to the first eth address, but you 13.35 -; can override it here, as long as you set it to the MAC of *something* 13.36 -; you own!) 13.37 -; 13.38 -;entityid=00:07:E9:3B:76:60 13.39 -; 13.40 -; Peers shall cache our query responses for the specified time, 13.41 -; given in seconds. Default is 3600. 13.42 -; 13.43 -;cachetime=3600 13.44 -; 13.45 -; This defines the max depth in which to search the DUNDi system. 13.46 -; Note that the maximum time that we will wait for a response is 13.47 -; (2000 + 200 * ttl) ms. 13.48 -; 13.49 -;ttl=32 13.50 -; 13.51 -; If we don't get ACK to our DPDISCOVER within 2000ms, and autokill is set 13.52 -; to yes, then we cancel the whole thing (that's enough time for one 13.53 -; retransmission only). This is used to keep things from stalling for a long 13.54 -; time for a host that is not available, but would be ill advised for bad 13.55 -; connections. In addition to 'yes' or 'no' you can also specify a number 13.56 -; of milliseconds. See 'qualify' for individual peers to turn on for just 13.57 -; a specific peer. 13.58 -; 13.59 -;autokill=yes 13.60 -; 13.61 -; pbx_dundi creates a rotating key called "secret", under the family 13.62 -; 'secretpath'. The default family is dundi (resulting in 13.63 -; the key being held at dundi/secret). 13.64 -; 13.65 -;secretpath=dundi 13.66 -; 13.67 -; The 'storehistory' option (also changeable at runtime with 13.68 -; 'dundi store history' and 'dundi no store history') will 13.69 -; cause the DUNDi engine to keep track of the last several 13.70 -; queries and the amount of time each query took to execute 13.71 -; for the purpose of tracking slow nodes. This option is 13.72 -; off by default due to performance impacts. 13.73 -; 13.74 -;storehistory=yes 13.75 - 13.76 -;[mappings] 13.77 -; 13.78 -; The "mappings" section maps DUNDi contexts 13.79 -; to contexts on the local asterisk system. Remember 13.80 -; that numbers that are made available under the e164 13.81 -; DUNDi context are regulated by the DUNDi General Peering 13.82 -; Agreement (GPA) if you are a member of the DUNDi E.164 13.83 -; Peering System. 13.84 -; 13.85 -; dundi_context => local_context,weight,tech,dest[,options]] 13.86 -; 13.87 -; 'dundi_context' is the name of the context being requested 13.88 -; within the DUNDi request 13.89 -; 13.90 -; 'local_context' is the name of the context on the local system 13.91 -; in which numbers can be looked up for which responses shall be given. 13.92 -; 13.93 -; 'weight' is the weight to use for the responses provided from this 13.94 -; mapping. The number must be >= 0 and < 60000. Since it is totally 13.95 -; valid to receive multiple responses to a query, responses received 13.96 -; with a lower weight are tried first. Note that the weight has a 13.97 -; special meaning in the e164 context - see the GPA for more details. 13.98 -; 13.99 -; 'tech' is the technology to use (IAX, SIP, H323) 13.100 -; 13.101 -; 'dest' is the destination to supply for reaching that number. The 13.102 -; following variables can be used in the destination string and will 13.103 -; be automatically substituted: 13.104 -; ${NUMBER}: The number being requested 13.105 -; ${IPADDR}: The IP address to connect to 13.106 -; ${SECRET}: The current rotating secret key to be used 13.107 -; 13.108 -; Further options may include: 13.109 -; 13.110 -; nounsolicited: No unsolicited calls of any type permitted via this 13.111 -; route 13.112 -; nocomunsolicit: No commercial unsolicited calls permitted via 13.113 -; this route 13.114 -; residential: This number is known to be a residence 13.115 -; commercial: This number is known to be a business 13.116 -; mobile: This number is known to be a mobile phone 13.117 -; nocomunsolicit: No commercial unsolicited calls permitted via 13.118 -; this route 13.119 -; nopartial: Do not search for partial matches 13.120 -; 13.121 -; There *must* exist an entry in mappings for DUNDi to respond 13.122 -; to any request, although it may be empty. 13.123 -; 13.124 -;e164 => dundi-e164-canonical,0,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial 13.125 -;e164 => dundi-e164-customers,100,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial 13.126 -;e164 => dundi-e164-via-pstn,400,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial 13.127 - 13.128 -;digexten => default,0,IAX2,guest@lappy/${NUMBER} 13.129 -;asdf => 13.130 - 13.131 - 13.132 -; 13.133 -; 13.134 -; The remaining sections represent the peers 13.135 -; that we fundamentally trust. The section name 13.136 -; represents the name and optionally at a specific 13.137 -; DUNDi context if you want the trust to be established 13.138 -; for only a specific DUNDi context. 13.139 -; 13.140 -; inkey - What key they will be authenticating to us with 13.141 -; 13.142 -; outkey - What key we use to authenticate to them 13.143 -; 13.144 -; host - What their host is 13.145 -; 13.146 -; order - What search order to use. May be 'primary', 'secondary', 13.147 -; 'tertiary' or 'quartiary'. In large systems, it is beneficial 13.148 -; to only query one up-stream host in order to maximize caching 13.149 -; value. Adding one with primary and one with secondary gives you 13.150 -; redundancy without sacrificing performance. 13.151 -; 13.152 -; include - Includes this peer when searching a particular context 13.153 -; for lookup (set "all" to perform all lookups with that 13.154 -; host. This is also the context in which peers are permitted 13.155 -; to precache. 13.156 -; 13.157 -; noinclude - Disincludes this peer when searching a particular context 13.158 -; for lookup (set "all" to perform no lookups with that 13.159 -; host. 13.160 -; 13.161 -; permit - Permits this peer to search a given DUNDi context on 13.162 -; the local system. Set "all" to permit this host to 13.163 -; lookup all contexts. This is also a context for which 13.164 -; we will create/forward PRECACHE commands. 13.165 -; 13.166 -; deny - Denies this peer to search a given DUNDi context on 13.167 -; the local system. Set "all" to deny this host to 13.168 -; lookup all contexts. 13.169 -; 13.170 -; model - inbound, outbound, or symmetric for whether we receive 13.171 -; requests only, transmit requests only, or do both. 13.172 -; 13.173 -; precache - Utilize/Permit precaching with this peer (to pre 13.174 -; cache means to provide an answer when no request 13.175 -; was made and is used so that machines with few 13.176 -; routes can push those routes up a to a higher level). 13.177 -; outgoing means we send precache routes to this peer, 13.178 -; incoming means we permit this peer to send us 13.179 -; precache routes. symmetric means we do both. 13.180 -; 13.181 -; Note: You cannot mix symmetric/outbound model with symmetric/inbound 13.182 -; precache, nor can you mix symmetric/inbound model with symmetric/outbound 13.183 -; precache. 13.184 -; 13.185 -; 13.186 -; The '*' peer is special and matches an unspecified entity 13.187 -; 13.188 - 13.189 -; 13.190 -; Sample Primary e164 DUNDi peer 13.191 -; 13.192 -;[00:50:8B:F3:75:BB] 13.193 -;model = symmetric 13.194 -;host = 64.215.96.114 13.195 -;inkey = digium 13.196 -;outkey = misery 13.197 -;include = e164 13.198 -;permit = e164 13.199 -;qualify = yes 13.200 - 13.201 -; 13.202 -; Sample Secondary e164 DUNDi peer 13.203 -; 13.204 -;[00:A0:C9:96:92:84] 13.205 -;model = symmetric 13.206 -;host = misery.digium.com 13.207 -;inkey = misery 13.208 -;outkey = ourkey 13.209 -;include = e164 13.210 -;permit = e164 13.211 -;qualify = yes 13.212 -;order = secondary 13.213 - 13.214 -; 13.215 -; Sample "push mode" downstream host 13.216 -; 13.217 -;[00:0C:76:96:75:28] 13.218 -;model = inbound 13.219 -;host = dynamic 13.220 -;precache = inbound 13.221 -;inkey = littleguy 13.222 -;outkey = ourkey 13.223 -;include = e164 ; In this case used only for precaching 13.224 -;permit = e164 13.225 -;qualify = yes 13.226 - 13.227 -; 13.228 -; Sample "push mode" upstream host 13.229 -; 13.230 -;[00:07:E9:3B:76:60] 13.231 -;model = outbound 13.232 -;precache = outbound 13.233 -;host = 216.207.245.34 13.234 -;register = yes 13.235 -;inkey = dhcp34 13.236 -;permit = all ; In this case used only for precaching 13.237 -;include = all 13.238 -;qualify = yes 13.239 -;outkey=foo 13.240 - 13.241 -;[*] 13.242 -;
14.1 --- a/asterisk/enum.conf Sun Mar 20 19:27:35 2011 +0100 14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 14.3 @@ -1,22 +0,0 @@ 14.4 -; 14.5 -; ENUM Configuration for resolving phone numbers over DNS 14.6 -; 14.7 -; Sample config for Asterisk 14.8 -; This file is reloaded at "module reload enum" in the CLI 14.9 -; 14.10 -;[general] 14.11 -; 14.12 -; The search list for domains may be customized. Domains are searched 14.13 -; in the order they are listed here. 14.14 -; 14.15 -;search => e164.arpa 14.16 -; 14.17 -; If you'd like to use the E.164.org public ENUM registry in addition 14.18 -; to the official e164.arpa one, uncomment the following line 14.19 -; 14.20 -;search => e164.org 14.21 -; 14.22 -; As there are more H323 drivers available you have to select to which 14.23 -; drive a H323 URI will map. Default is "H323". 14.24 -; 14.25 -;h323driver => H323
15.1 --- a/asterisk/extensions.conf Sun Mar 20 19:27:35 2011 +0100 15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 15.3 @@ -1,614 +0,0 @@ 15.4 -; extensions.conf - the Asterisk dial plan 15.5 -; 15.6 -; Static extension configuration file, used by 15.7 -; the pbx_config module. This is where you configure all your 15.8 -; inbound and outbound calls in Asterisk. 15.9 -; 15.10 -; This configuration file is reloaded 15.11 -; - With the "dialplan reload" command in the CLI 15.12 -; - With the "reload" command (that reloads everything) in the CLI 15.13 - 15.14 -; 15.15 -; The "General" category is for certain variables. 15.16 -; 15.17 -;[general] 15.18 -; 15.19 -; If static is set to no, or omitted, then the pbx_config will rewrite 15.20 -; this file when extensions are modified. Remember that all comments 15.21 -; made in the file will be lost when that happens. 15.22 -; 15.23 -; XXX Not yet implemented XXX 15.24 -; 15.25 -;static=yes 15.26 -; 15.27 -; if static=yes and writeprotect=no, you can save dialplan by 15.28 -; CLI command "dialplan save" too 15.29 -; 15.30 -;writeprotect=no 15.31 -; 15.32 -; If autofallthrough is set, then if an extension runs out of 15.33 -; things to do, it will terminate the call with BUSY, CONGESTION 15.34 -; or HANGUP depending on Asterisk's best guess. This is the default. 15.35 -; 15.36 -; If autofallthrough is not set, then if an extension runs out of 15.37 -; things to do, Asterisk will wait for a new extension to be dialed 15.38 -; (this is the original behavior of Asterisk 1.0 and earlier). 15.39 -; 15.40 -;autofallthrough=no 15.41 -; 15.42 -; If clearglobalvars is set, global variables will be cleared 15.43 -; and reparsed on an extensions reload, or Asterisk reload. 15.44 -; 15.45 -; If clearglobalvars is not set, then global variables will persist 15.46 -; through reloads, and even if deleted from the extensions.conf or 15.47 -; one of its included files, will remain set to the previous value. 15.48 -; 15.49 -; NOTE: A complication sets in, if you put your global variables into 15.50 -; the AEL file, instead of the extensions.conf file. With clearglobalvars 15.51 -; set, a "reload" will often leave the globals vars cleared, because it 15.52 -; is not unusual to have extensions.conf (which will have no globals) 15.53 -; load after the extensions.ael file (where the global vars are stored). 15.54 -; So, with "reload" in this particular situation, first the AEL file will 15.55 -; clear and then set all the global vars, then, later, when the extensions.conf 15.56 -; file is loaded, the global vars are all cleared, and then not set, because 15.57 -; they are not stored in the extensions.conf file. 15.58 -; 15.59 -;clearglobalvars=no 15.60 -; 15.61 -; If priorityjumping is set to 'yes', then applications that support 15.62 -; 'jumping' to a different priority based on the result of their operations 15.63 -; will do so (this is backwards compatible behavior with pre-1.2 releases 15.64 -; of Asterisk). Individual applications can also be requested to do this 15.65 -; by passing a 'j' option in their arguments. 15.66 -; 15.67 -;priorityjumping=yes 15.68 -; 15.69 -; User context is where entries from users.conf are registered. The 15.70 -; default value is 'default' 15.71 -; 15.72 -;userscontext=default 15.73 -; 15.74 -; You can include other config files, use the #include command 15.75 -; (without the ';'). Note that this is different from the "include" command 15.76 -; that includes contexts within other contexts. The #include command works 15.77 -; in all asterisk configuration files. 15.78 -;#include "filename.conf" 15.79 - 15.80 -; The "Globals" category contains global variables that can be referenced 15.81 -; in the dialplan with the GLOBAL dialplan function: 15.82 -; ${GLOBAL(VARIABLE)} 15.83 -; ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid 15.84 -; Unix/Linux environmental variables can be reached with the ENV dialplan 15.85 -; function: ${ENV(VARIABLE)} 15.86 -; 15.87 -;[globals] 15.88 -;CONSOLE=Console/dsp ; Console interface for demo 15.89 -;CONSOLE=Zap/1 15.90 -;CONSOLE=Phone/phone0 15.91 -;IAXINFO=guest ; IAXtel username/password 15.92 -;IAXINFO=myuser:mypass 15.93 -;TRUNK=Zap/G2 ; Trunk interface 15.94 -; 15.95 -; Note the 'G2' in the TRUNK variable above. It specifies which group (defined 15.96 -; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in 15.97 -; the specified group. The four possible options are: 15.98 -; 15.99 -; g: select the lowest-numbered non-busy Zap channel 15.100 -; (aka. ascending sequential hunt group). 15.101 -; G: select the highest-numbered non-busy Zap channel 15.102 -; (aka. descending sequential hunt group). 15.103 -; r: use a round-robin search, starting at the next highest channel than last 15.104 -; time (aka. ascending rotary hunt group). 15.105 -; R: use a round-robin search, starting at the next lowest channel than last 15.106 -; time (aka. descending rotary hunt group). 15.107 -; 15.108 -;TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) 15.109 -;TRUNK=IAX2/user:pass@provider 15.110 - 15.111 -; 15.112 -; Any category other than "General" and "Globals" represent 15.113 -; extension contexts, which are collections of extensions. 15.114 -; 15.115 -; Extension names may be numbers, letters, or combinations 15.116 -; thereof. If an extension name is prefixed by a '_' 15.117 -; character, it is interpreted as a pattern rather than a 15.118 -; literal. In patterns, some characters have special meanings: 15.119 -; 15.120 -; X - any digit from 0-9 15.121 -; Z - any digit from 1-9 15.122 -; N - any digit from 2-9 15.123 -; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9) 15.124 -; . - wildcard, matches anything remaining (e.g. _9011. matches 15.125 -; anything starting with 9011 excluding 9011 itself) 15.126 -; ! - wildcard, causes the matching process to complete as soon as 15.127 -; it can unambiguously determine that no other matches are possible 15.128 -; 15.129 -; For example the extension _NXXXXXX would match normal 7 digit dialings, 15.130 -; while _1NXXNXXXXXX would represent an area code plus phone number 15.131 -; preceded by a one. 15.132 -; 15.133 -; Each step of an extension is ordered by priority, which must 15.134 -; always start with 1 to be considered a valid extension. The priority 15.135 -; "next" or "n" means the previous priority plus one, regardless of whether 15.136 -; the previous priority was associated with the current extension or not. 15.137 -; The priority "same" or "s" means the same as the previously specified 15.138 -; priority, again regardless of whether the previous entry was for the 15.139 -; same extension. Priorities may be immediately followed by a plus sign 15.140 -; and another integer to add that amount (most useful with 's' or 'n'). 15.141 -; Priorities may then also have an alias, or label, in 15.142 -; parenthesis after their name which can be used in goto situations 15.143 -; 15.144 -; Contexts contain several lines, one for each step of each 15.145 -; extension, which can take one of two forms as listed below, 15.146 -; with the first form being preferred. 15.147 -; 15.148 -;[context] 15.149 -;exten => someexten,{priority|label{+|-}offset}[(alias)],application(arg1,arg2,...) 15.150 -;exten => someexten,{priority|label{+|-}offset}[(alias)],application,arg1|arg2... 15.151 -; 15.152 -; Included Contexts 15.153 -; 15.154 -; One may include another context in the current one as well, optionally with a 15.155 -; date and time. Included contexts are included in the order 15.156 -; they are listed. 15.157 -; The reason a context would include other contexts is for their 15.158 -; extensions. 15.159 -; The algorithm to find an extension is recursive, and works in this 15.160 -; fashion: 15.161 -; first, given a stack on which to store context references, 15.162 -; push the context to find the extension onto the stack... 15.163 -; a) Try to find a matching extension in the context at the top of 15.164 -; the stack, and, if found, begin executing the priorities 15.165 -; there in sequence. 15.166 -; b) If not found, Search the switches, if any declared, in 15.167 -; sequence. 15.168 -; c) If still not found, for each include, push that context onto 15.169 -; the top of the context stack, and recurse to a). 15.170 -; d) If still not found, pop the entry from the top of the stack; 15.171 -; if the stack is empty, the search has failed. If it's not, 15.172 -; continue with the next context in c). 15.173 -; This is a depth-first traversal, and stops with the first context 15.174 -; that provides a matching extension. As usual, if more than one 15.175 -; pattern in a context will match, the 'best' match will win. 15.176 -; Please note that that extensions found in an included context are 15.177 -; treated as if they were in the context from which the search began. 15.178 -; The PBX's notion of the "current context" is not changed. 15.179 -; Please note that in a context, it does not matter where an include 15.180 -; directive occurs. Whether at the top, or near the bottom, the effect 15.181 -; will be the same. The only thing that matters is that if there is 15.182 -; more than one include directive, they will be searched for extensions 15.183 -; in order, first to last. 15.184 -; Also please note that pattern matches (like _9XX) are not treated 15.185 -; any differently than exact matches (like 987). Also note that the 15.186 -; order of extensions in a context have no affect on the outcome. 15.187 -; 15.188 -; Timing list for includes is 15.189 -; 15.190 -; <time range>|<days of week>|<days of month>|<months> 15.191 -; 15.192 -; Note that ranges may be specified to wrap around the ends. Also, minutes are 15.193 -; fine-grained only down to the closest even minute. 15.194 -; 15.195 -;include => daytime|9:00-17:00|mon-fri|*|* 15.196 -;include => weekend|*|sat-sun|*|* 15.197 -;include => weeknights|17:02-8:58|mon-fri|*|* 15.198 -; 15.199 -; ignorepat can be used to instruct drivers to not cancel dialtone upon 15.200 -; receipt of a particular pattern. The most commonly used example is 15.201 -; of course '9' like this: 15.202 -; 15.203 -;ignorepat => 9 15.204 -; 15.205 -; so that dialtone remains even after dialing a 9. 15.206 -; 15.207 - 15.208 -; 15.209 -; Sample entries for extensions.conf 15.210 -; 15.211 -; 15.212 -;[dundi-e164-canonical] 15.213 -; 15.214 -; List canonical entries here 15.215 -; 15.216 -;exten => 12564286000,1,Macro(stdexten,6000,IAX2/foo) 15.217 -;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7}) 15.218 - 15.219 -;[dundi-e164-customers] 15.220 -; 15.221 -; If you are an ITSP or Reseller, list your customers here. 15.222 -; 15.223 -;exten => _12564286000,1,Dial(SIP/customer1) 15.224 -;exten => _12564286001,1,Dial(IAX2/customer2) 15.225 - 15.226 -;[dundi-e164-via-pstn] 15.227 -; 15.228 -; If you are freely delivering calls to the PSTN, list them here 15.229 -; 15.230 -;exten => _1256428XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Expose all of 256-428 15.231 -;exten => _1256325XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Ditto for 256-325 15.232 - 15.233 -;[dundi-e164-local] 15.234 -; 15.235 -; Context to put your dundi IAX2 or SIP user in for 15.236 -; full access 15.237 -; 15.238 -;include => dundi-e164-canonical 15.239 -;include => dundi-e164-customers 15.240 -;include => dundi-e164-via-pstn 15.241 - 15.242 -;[dundi-e164-switch] 15.243 -; 15.244 -; Just a wrapper for the switch 15.245 -; 15.246 -;switch => DUNDi/e164 15.247 - 15.248 -;[dundi-e164-lookup] 15.249 -; 15.250 -; Locally to lookup, try looking for a local E.164 solution 15.251 -; then try DUNDi if we don't have one. 15.252 -; 15.253 -;include => dundi-e164-local 15.254 -;include => dundi-e164-switch 15.255 -; 15.256 -; DUNDi can also be implemented as a Macro instead of using 15.257 -; the Local channel driver. 15.258 -; 15.259 -;[macro-dundi-e164] 15.260 -; 15.261 -; ARG1 is the extension to Dial 15.262 -; 15.263 -; Extension "s" is not a wildcard extension that matches "anything". 15.264 -; In macros, it is the start extension. In most other cases, 15.265 -; you have to goto "s" to execute that extension. 15.266 -; 15.267 -; For wildcard matches, see above - all pattern matches start with 15.268 -; an underscore. 15.269 -;exten => s,1,Goto(${ARG1},1) 15.270 -;include => dundi-e164-lookup 15.271 - 15.272 -; 15.273 -; Here are the entries you need to participate in the IAXTEL 15.274 -; call routing system. Most IAXTEL numbers begin with 1-700, but 15.275 -; there are exceptions. For more information, and to sign 15.276 -; up, please go to www.gnophone.com or www.iaxtel.com 15.277 -; 15.278 -;[iaxtel700] 15.279 -;exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel) 15.280 - 15.281 -; 15.282 -; The SWITCH statement permits a server to share the dialplan with 15.283 -; another server. Use with care: Reciprocal switch statements are not 15.284 -; allowed (e.g. both A -> B and B -> A), and the switched server needs 15.285 -; to be on-line or else dialing can be severly delayed. 15.286 -; 15.287 -;[iaxprovider] 15.288 -;switch => IAX2/user:[key]@myserver/mycontext 15.289 - 15.290 -;[trunkint] 15.291 -; 15.292 -; International long distance through trunk 15.293 -; 15.294 -;exten => _9011.,1,Macro(dundi-e164,${EXTEN:4}) 15.295 -;exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) 15.296 - 15.297 -;[trunkld] 15.298 -; 15.299 -; Long distance context accessed through trunk 15.300 -; 15.301 -;exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1}) 15.302 -;exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) 15.303 - 15.304 -;[trunklocal] 15.305 -; 15.306 -; Local seven-digit dialing accessed through trunk interface 15.307 -; 15.308 -;exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) 15.309 - 15.310 -;[trunktollfree] 15.311 -; 15.312 -; Long distance context accessed through trunk interface 15.313 -; 15.314 -;exten => _91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) 15.315 -;exten => _91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) 15.316 -;exten => _91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) 15.317 -;exten => _91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}}) 15.318 - 15.319 -;[international] 15.320 -; 15.321 -; Master context for international long distance 15.322 -; 15.323 -;ignorepat => 9 15.324 -;include => longdistance 15.325 -;include => trunkint 15.326 - 15.327 -;[longdistance] 15.328 -; 15.329 -; Master context for long distance 15.330 -; 15.331 -;ignorepat => 9 15.332 -;include => local 15.333 -;include => trunkld 15.334 - 15.335 -;[local] 15.336 -; 15.337 -; Master context for local, toll-free, and iaxtel calls only 15.338 -; 15.339 -;ignorepat => 9 15.340 -;include => default 15.341 -;include => trunklocal 15.342 -;include => iaxtel700 15.343 -;include => trunktollfree 15.344 -;include => iaxprovider 15.345 - 15.346 -;Include parkedcalls (or the context you define in features conf) 15.347 -;to enable call parking. 15.348 -;include => parkedcalls 15.349 -; 15.350 -; You can use an alternative switch type as well, to resolve 15.351 -; extensions that are not known here, for example with remote 15.352 -; IAX switching you transparently get access to the remote 15.353 -; Asterisk PBX 15.354 -; 15.355 -; switch => IAX2/user:password@bigserver/local 15.356 -; 15.357 -; An "lswitch" is like a switch but is literal, in that 15.358 -; variable substitution is not performed at load time 15.359 -; but is passed to the switch directly (presumably to 15.360 -; be substituted in the switch routine itself) 15.361 -; 15.362 -; lswitch => Loopback/12${EXTEN}@othercontext 15.363 -; 15.364 -; An "eswitch" is like a switch but the evaluation of 15.365 -; variable substitution is performed at runtime before 15.366 -; being passed to the switch routine. 15.367 -; 15.368 -; eswitch => IAX2/context@${CURSERVER} 15.369 - 15.370 -;[macro-trunkdial] 15.371 -; 15.372 -; Standard trunk dial macro (hangs up on a dialstatus that should 15.373 -; terminate call) 15.374 -; ${ARG1} - What to dial 15.375 -; 15.376 -;exten => s,1,Dial(${ARG1}) 15.377 -;exten => s,n,Goto(s-${DIALSTATUS},1) 15.378 -;exten => s-NOANSWER,1,Hangup 15.379 -;exten => s-BUSY,1,Hangup 15.380 -;exten => _s-.,1,NoOp 15.381 - 15.382 -;[macro-stdexten]; 15.383 -; 15.384 -; Standard extension macro: 15.385 -; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well 15.386 -; ${ARG2} - Device(s) to ring 15.387 -; 15.388 -;exten => s,1,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum 15.389 -;exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) 15.390 - 15.391 -;exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce 15.392 -;exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start 15.393 - 15.394 -;exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce 15.395 -;exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start 15.396 - 15.397 -;exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer 15.398 - 15.399 -;exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain 15.400 - 15.401 -;[macro-stdPrivacyexten]; 15.402 -; 15.403 -; Standard extension macro: 15.404 -; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well 15.405 -; ${ARG2} - Device(s) to ring 15.406 -; ${ARG3} - Optional DONTCALL context name to jump to (assumes the s,1 extension-priority) 15.407 -; ${ARG4} - Optional TORTURE context name to jump to (assumes the s,1 extension-priority)` 15.408 -; 15.409 -;exten => s,1,Dial(${ARG2},20|p) ; Ring the interface, 20 seconds maximum, call screening 15.410 - ; option (or use P for databased call screening) 15.411 -;exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) 15.412 - 15.413 -;exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce 15.414 -;exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start 15.415 - 15.416 -;exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce 15.417 -;exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start 15.418 - 15.419 -;exten => s-DONTCALL,1,Goto(${ARG3},s,1) ; Callee chose to send this call to a polite "Don't call again" script. 15.420 - 15.421 -;exten => s-TORTURE,1,Goto(${ARG4},s,1) ; Callee chose to send this call to a telemarketer torture script. 15.422 - 15.423 -;exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer 15.424 - 15.425 -;exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain 15.426 - 15.427 -;[macro-page]; 15.428 -; 15.429 -; Paging macro: 15.430 -; 15.431 -; Check to see if SIP device is in use and DO NOT PAGE if they are 15.432 -; 15.433 -; ${ARG1} - Device to page 15.434 - 15.435 -;exten => s,1,ChanIsAvail(${ARG1}|js) ; j is for Jump and s is for ANY call 15.436 -;exten => s,n,GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail) 15.437 -;exten => s,n(autoanswer),Set(_ALERT_INFO="RA") ; This is for the PolyComs 15.438 -;exten => s,n,SIPAddHeader(Call-Info: Answer-After=0) ; This is for the Grandstream, Snoms, and Others 15.439 -;exten => s,n,NoOp() ; Add others here and Post on the Wiki!!!! 15.440 -;exten => s,n,Dial(${ARG1}||) 15.441 -;exten => s,n(fail),Hangup 15.442 - 15.443 - 15.444 -;[demo] 15.445 -; 15.446 -; We start with what to do when a call first comes in. 15.447 -; 15.448 -;exten => s,1,Wait(1) ; Wait a second, just for fun 15.449 -;exten => s,n,Answer ; Answer the line 15.450 -;exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds 15.451 -;exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds 15.452 -;exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message 15.453 -;exten => s,n(instruct),BackGround(demo-instruct) ; Play some instructions 15.454 -;exten => s,n,WaitExten ; Wait for an extension to be dialed. 15.455 - 15.456 -;exten => 2,1,BackGround(demo-moreinfo) ; Give some more information. 15.457 -;exten => 2,n,Goto(s,instruct) 15.458 - 15.459 -;exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french 15.460 -;exten => 3,n,Goto(s,restart) ; Start with the congratulations 15.461 - 15.462 -;exten => 1000,1,Goto(default,s,1) 15.463 -; 15.464 -; We also create an example user, 1234, who is on the console and has 15.465 -; voicemail, etc. 15.466 -; 15.467 -;exten => 1234,1,Playback(transfer,skip) ; "Please hold while..." 15.468 - ; (but skip if channel is not up) 15.469 -;exten => 1234,n,Macro(stdexten,1234,${GLOBAL(CONSOLE)}) 15.470 - 15.471 -;exten => 1235,1,Voicemail(1234,u) ; Right to voicemail 15.472 - 15.473 -;exten => 1236,1,Dial(Console/dsp) ; Ring forever 15.474 -;exten => 1236,n,Voicemail(1234,b) ; Unless busy 15.475 - 15.476 -; 15.477 -; # for when they're done with the demo 15.478 -; 15.479 -;exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo" 15.480 -;exten => #,n,Hangup ; Hang them up. 15.481 - 15.482 -; 15.483 -; A timeout and "invalid extension rule" 15.484 -; 15.485 -;exten => t,1,Goto(#,1) ; If they take too long, give up 15.486 -;exten => i,1,Playback(invalid) ; "That's not valid, try again" 15.487 - 15.488 -; 15.489 -; Create an extension, 500, for dialing the 15.490 -; Asterisk demo. 15.491 -; 15.492 -;exten => 500,1,Playback(demo-abouttotry); Let them know what's going on 15.493 -;exten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default) ; Call the Asterisk demo 15.494 -;exten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo site 15.495 -;exten => 500,n,Goto(s,6) ; Return to the start over message. 15.496 - 15.497 -; 15.498 -; Create an extension, 600, for evaluating echo latency. 15.499 -; 15.500 -;exten => 600,1,Playback(demo-echotest) ; Let them know what's going on 15.501 -;exten => 600,n,Echo ; Do the echo test 15.502 -;exten => 600,n,Playback(demo-echodone) ; Let them know it's over 15.503 -;exten => 600,n,Goto(s,6) ; Start over 15.504 - 15.505 -; 15.506 -; You can use the Macro Page to intercom a individual user 15.507 -;exten => 76245,1,Macro(page,SIP/Grandstream1) 15.508 -; or if your peernames are the same as extensions 15.509 -;exten => _7XXX,1,Macro(page,SIP/${EXTEN}) 15.510 -; 15.511 -; 15.512 -; System Wide Page at extension 7999 15.513 -; 15.514 -;exten => 7999,1,Set(TIMEOUT(absolute)=60) 15.515 -;exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d) 15.516 - 15.517 -; Give voicemail at extension 8500 15.518 -; 15.519 -;exten => 8500,1,VoicemailMain 15.520 -;exten => 8500,n,Goto(s,6) 15.521 -; 15.522 -; Here's what a phone entry would look like (IXJ for example) 15.523 -; 15.524 -;exten => 1265,1,Dial(Phone/phone0,15) 15.525 -;exten => 1265,n,Goto(s,5) 15.526 - 15.527 -; 15.528 -; The page context calls up the page macro that sets variables needed for auto-answer 15.529 -; It is in is own context to make calling it from the Page() application as simple as 15.530 -; Local/{peername}@page 15.531 -; 15.532 -;[page] 15.533 -;exten => _X.,1,Macro(page,SIP/${EXTEN}) 15.534 - 15.535 -;[mainmenu] 15.536 -; 15.537 -; Example "main menu" context with submenu 15.538 -; 15.539 -;exten => s,1,Answer 15.540 -;exten => s,n,Background(thanks) ; "Thanks for calling press 1 for sales, 2 for support, ..." 15.541 -;exten => s,n,WaitExten 15.542 -;exten => 1,1,Goto(submenu,s,1) 15.543 -;exten => 2,1,Hangup 15.544 -;include => default 15.545 -; 15.546 -;[submenu] 15.547 -;exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback 15.548 -;exten => s,n,Wait,2 15.549 -;exten => s,n,Background(submenuopts) ; "Thanks for calling the sales department. Press 1 for steve, 2 for..." 15.550 -;exten => s,n,WaitExten 15.551 -;exten => 1,1,Goto(default,steve,1) 15.552 -;exten => 2,1,Goto(default,mark,2) 15.553 - 15.554 -;[default] 15.555 -; 15.556 -; By default we include the demo. In a production system, you 15.557 -; probably don't want to have the demo there. 15.558 -; 15.559 -;include => demo 15.560 - 15.561 -; 15.562 -; An extension like the one below can be used for FWD, Nikotel, sipgate etc. 15.563 -; Note that you must have a [sipprovider] section in sip.conf 15.564 -; 15.565 -;exten => _41X.,1,Dial(SIP/${EXTEN:2}@sipprovider,,r) 15.566 - 15.567 -; Real extensions would go here. Generally you want real extensions to be 15.568 -; 4 or 5 digits long (although there is no such requirement) and start with a 15.569 -; single digit that is fairly large (like 6 or 7) so that you have plenty of 15.570 -; room to overlap extensions and menu options without conflict. You can alias 15.571 -; them with names, too, and use global variables 15.572 - 15.573 -;exten => 6245,hint,SIP/Grandstream1&SIP/Xlite1,Joe Schmoe ; Channel hints for presence 15.574 -;exten => 6245,1,Dial(SIP/Grandstream1,20,rt) ; permit transfer 15.575 -;exten => 6245,n(dial),Dial(${HINT},20,rtT) ; Use hint as listed 15.576 -;exten => 6245,n,Voicemail(6245,u) ; Voicemail (unavailable) 15.577 -;exten => 6245,s+1,Hangup ; s+1, same as n 15.578 -;exten => 6245,dial+101,Voicemail(6245,b) ; Voicemail (busy) 15.579 -;exten => 6361,1,Dial(IAX2/JaneDoe,,rm) ; ring without time limit 15.580 -;exten => 6389,1,Dial(MGCP/aaln/1@192.168.0.14) 15.581 -;exten => 6390,1,Dial(JINGLE/caller/callee) ; Dial via jingle using labels 15.582 -;exten => 6391,1,Dial(JINGLE/asterisk@digium.com/mogorman@astjab.org) ;Dial via jingle using asterisk as the transport and calling mogorman. 15.583 -;exten => 6394,1,Dial(Local/6275/n) ; this will dial ${MARK} 15.584 - 15.585 -;exten => 6275,1,Macro(stdexten,6275,${MARK}) ; assuming ${MARK} is something like Zap/2 15.586 -;exten => mark,1,Goto(6275|1) ; alias mark to 6275 15.587 -;exten => 6536,1,Macro(stdexten,6236,${WIL}) ; Ditto for wil 15.588 -;exten => wil,1,Goto(6236|1) 15.589 - 15.590 -;If you want to subscribe to the status of a parking space, this is 15.591 -;how you do it. Subscribe to extension 6600 in sip, and you will see 15.592 -;the status of the first parking lot with this extensions' help 15.593 -;exten => 6600,hint,park:701@parkedcalls 15.594 -;exten => 6600,1,noop 15.595 -; 15.596 -; Some other handy things are an extension for checking voicemail via 15.597 -; voicemailmain 15.598 -; 15.599 -;exten => 8500,1,VoicemailMain 15.600 -;exten => 8500,n,Hangup 15.601 -; 15.602 -; Or a conference room (you'll need to edit meetme.conf to enable this room) 15.603 -; 15.604 -;exten => 8600,1,Meetme(1234) 15.605 -; 15.606 -; Or playing an announcement to the called party, as soon it answers 15.607 -; 15.608 -;exten = 8700,1,Dial(${MARK},30,A(/path/to/my/announcemsg)) 15.609 -; 15.610 -; For more information on applications, just type "core show applications" at your 15.611 -; friendly Asterisk CLI prompt. 15.612 -; 15.613 -; "core show application <command>" will show details of how you 15.614 -; use that particular application in this file, the dial plan. 15.615 -; "core show functions" will list all dialplan functions 15.616 -; "core show function <COMMAND>" will show you more information about 15.617 -; one function. Remember that function names are UPPER CASE.
16.1 --- a/asterisk/features.conf Sun Mar 20 19:27:35 2011 +0100 16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 16.3 @@ -1,95 +0,0 @@ 16.4 -; 16.5 -; Sample Call Features (parking, transfer, etc) configuration 16.6 -; 16.7 - 16.8 -;[general] 16.9 -;parkext => 700 ; What extension to dial to park 16.10 -;parkpos => 701-720 ; What extensions to park calls on. These needs to be 16.11 - ; numeric, as Asterisk starts from the start position 16.12 - ; and increments with one for the next parked call. 16.13 -;context => parkedcalls ; Which context parked calls are in 16.14 -;parkingtime => 45 ; Number of seconds a call can be parked for 16.15 - ; (default is 45 seconds) 16.16 -;courtesytone = beep ; Sound file to play to the parked caller 16.17 - ; when someone dials a parked call 16.18 - ; or the Touch Monitor is activated/deactivated. 16.19 -;parkedplay = caller ; Who to play the courtesy tone to when picking up a parked call 16.20 - ; one of: parked, caller, both (default is caller) 16.21 -;adsipark = yes ; if you want ADSI parking announcements 16.22 -;findslot => next ; Continue to the 'next' free parking space. 16.23 - ; Defaults to 'first' available 16.24 -;parkedmusicclass=default ; This is the MOH class to use for the parked channel 16.25 - ; as long as the class is not set on the channel directly 16.26 - ; using Set(CHANNEL(musicclass)=whatever) in the dialplan 16.27 - 16.28 -;transferdigittimeout => 3 ; Number of seconds to wait between digits when transferring a call 16.29 - ; (default is 3 seconds) 16.30 -;xfersound = beep ; to indicate an attended transfer is complete 16.31 -;xferfailsound = beeperr ; to indicate a failed transfer 16.32 -;pickupexten = *8 ; Configure the pickup extension. (default is *8) 16.33 -;featuredigittimeout = 500 ; Max time (ms) between digits for 16.34 - ; feature activation (default is 500 ms) 16.35 -;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds. 16.36 - 16.37 -; Note that the DTMF features listed below only work when two channels have answered and are bridged together. 16.38 -; They can not be used while the remote party is ringing or in progress. If you require this feature you can use 16.39 -; chan_local in combination with Answer to accomplish it. 16.40 - 16.41 -;[featuremap] 16.42 -;blindxfer => #1 ; Blind transfer (default is #) 16.43 -;disconnect => *0 ; Disconnect (default is *) 16.44 -;automon => *1 ; One Touch Record a.k.a. Touch Monitor 16.45 -;atxfer => *2 ; Attended transfer 16.46 -;parkcall => #72 ; Park call (one step parking) 16.47 - 16.48 -;[applicationmap] 16.49 -; Note that the DYNAMIC_FEATURES channel variable must be set to use the features 16.50 -; defined here. The value of DYNAMIC_FEATURES should be the names of the features 16.51 -; to allow the channel to use separated by '#'. For example: 16.52 -; 16.53 -; Set(DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3) 16.54 -; 16.55 -; 16.56 -; The syntax for declaring a dynamic feature is the following: 16.57 -; 16.58 -;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,<AppArguments>[,MOH_Class]] 16.59 -; 16.60 -; FeatureName -> This is the name of the feature used in when setting the 16.61 -; DYNAMIC_FEATURES variable to enable usage of this feature. 16.62 -; DTMF_sequence -> This is the key sequence used to activate this feature. 16.63 -; ActivateOn -> This is the channel of the call that the application will be executed 16.64 -; on. Valid values are "self" and "peer". "self" means run the 16.65 -; application on the same channel that activated the feature. "peer" 16.66 -; means run the application on the opposite channel from the one that 16.67 -; has activated the feature. 16.68 -; ActivatedBy -> This is which channel is allowed to activate this feature. Valid 16.69 -; values are "caller", "callee", and "both". "both" is the default. 16.70 -; The "caller" is the channel that executed the Dial application, while 16.71 -; the "callee" is the channel called by the Dial application. 16.72 -; Application -> This is the application to execute. 16.73 -; AppArguments -> These are the arguments to be passed into the application. 16.74 -; MOH_Class -> This is the music on hold class to play while the idle 16.75 -; channel waits for the feature to complete. If left blank, 16.76 -; no music will be played. 16.77 -; 16.78 -; 16.79 -; IMPORTANT NOTE: The applicationmap is not intended to be used for all Asterisk 16.80 -; applications. When applications are used in extensions.conf, they are executed 16.81 -; by the PBX core. In this case, these applications are executed outside of the 16.82 -; PBX core, so it does *not* make sense to use any application which has any 16.83 -; concept of dialplan flow. Examples of this would be things like Macro, Goto, 16.84 -; Background, WaitExten, and many more. 16.85 -; 16.86 -; Enabling these features means that the PBX needs to stay in the media flow and 16.87 -; media will not be re-directed if DTMF is sent in the media stream. 16.88 -; 16.89 -; Example Usage: 16.90 -; 16.91 -;testfeature => #9,peer,Playback,tt-monkeys ;Allow both the caller and callee to play 16.92 -; ;tt-monkeys to the opposite channel 16.93 -; 16.94 -;pauseMonitor => #1,self/callee,Pausemonitor ;Allow the callee to pause monitoring 16.95 -; ;on their channel 16.96 -;unpauseMonitor => #3,self/callee,UnPauseMonitor ;Allow the callee to unpause monitoring 16.97 -; ;on their channel 16.98 -;
17.1 --- a/asterisk/festival.conf Sun Mar 20 19:27:35 2011 +0100 17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 17.3 @@ -1,35 +0,0 @@ 17.4 -; 17.5 -; Festival Configuration 17.6 -; 17.7 -;[general] 17.8 -; 17.9 -; Host which runs the festival server (default : localhost); 17.10 -; 17.11 -;host=localhost 17.12 -; 17.13 -; Port on host where the festival server runs (default : 1314) 17.14 -; 17.15 -;port=1314 17.16 -; 17.17 -; Use cache (yes, no - defaults to no) 17.18 -; 17.19 -;usecache=yes 17.20 -; 17.21 -; If usecache=yes, a directory to store waveform cache files. 17.22 -; The cache is never cleared (yet), so you must take care of cleaning it 17.23 -; yourself (just delete any or all files from the cache). 17.24 -; THIS DIRECTORY *MUST* EXIST and must be writable from the asterisk process. 17.25 -; Defaults to /tmp/ 17.26 -; 17.27 -;cachedir=/var/lib/asterisk/festivalcache/ 17.28 -; 17.29 -; Festival command to send to the server. 17.30 -; Defaults to: (tts_textasterisk "%s" 'file)(quit)\n 17.31 -; %s is replaced by the desired text to say. The command MUST end with a 17.32 -; (quit) directive, or the cache handling mechanism will hang. Do not 17.33 -; forget the \n at the end. 17.34 -; 17.35 -;festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n 17.36 -; 17.37 -; 17.38 -
18.1 --- a/asterisk/followme.conf Sun Mar 20 19:27:35 2011 +0100 18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 18.3 @@ -1,86 +0,0 @@ 18.4 -; Find-Me / Follow-Me Configuration File 18.5 -;[general] 18.6 -; 18.7 -;featuredigittimeout=>5000 18.8 -; The number of ms to wait for a digit input for the callee on whether to take the call or 18.9 -; not before we consider them "done" entering digits. 18.10 -; 18.11 -;takecall=>1 18.12 -; The global default keypress for the callee to take taking the current call. This can be 18.13 -; a single digit or multiple digits. Default is "1". 18.14 -; 18.15 -;declinecall=>2 18.16 -; The global default keypress for the callee to decline taking the current call. This can 18.17 -; be a single digit or multiple digits. Default is "2". 18.18 -; 18.19 -;call-from-prompt=>followme/call-from 18.20 -; The global default for the 'Incoming call from' message. 18.21 -; 18.22 -;norecording-prompt=>followme/no-recording 18.23 -; The global default for the 'You have an incoming call' message when the caller elects 18.24 -; not to leave their name or the option isn't set for them to do so. 18.25 -; 18.26 -;options-prompt=>followme/options 18.27 -; The global default for the 'Press 1 to accept this call or press 2 to decline it' message. 18.28 -; 18.29 -;pls-hold-prompt=>followme/pls-hold-while-try 18.30 -; The global default for 'Please hold while we try and connect your call' message. 18.31 -; 18.32 -;status-prompt=>followme/status 18.33 -; The global default for 'The party you're calling isn't at their desk' message. 18.34 -; 18.35 -;sorry-prompt=>followme/sorry 18.36 -; The global default for 'I'm sorry, but we were unable to locate your party' message. 18.37 -; 18.38 -; 18.39 -;[default] 18.40 -;musicclass=>default 18.41 -; The moh class that should be used for the caller while they are waiting to be connected. 18.42 -;context=>default 18.43 -; The context to dial the numbers from 18.44 -;number=>01233456,25 18.45 -; The a follow-me number to call. The format is: 18.46 -; number=> <number to call[&2nd #[&3rd #]]> [, <timeout value in seconds> [, <order in follow-me>] ] 18.47 -; You can specify as many of these numbers as you like. They will be dialed in the 18.48 -; order that you specify them in the config file OR as specified with the order field 18.49 -; on the number prompt. As you can see from the example, forked dialing of multiple 18.50 -; numbers in the same step is supported with this application if you'd like to dial 18.51 -; multiple numbers in the same followme step. 18.52 -; It's also important to note that the timeout value is not the same 18.53 -; as the timeout value you would use in app_dial. This timeout value is the amount of 18.54 -; time allowed between the time the dialing step starts and the callee makes a choice 18.55 -; on whether to take the call or not. That being the case, you may want to account for 18.56 -; this time, and make this timeout longer than a timeout you might specify in app_dial. 18.57 -;takecall=>1 18.58 -; The keypress for the callee to take taking the current call. This can be 18.59 -; a single digit or multiple digits. Default is the global default. 18.60 -; 18.61 -;declinecall=>2 18.62 -; The keypress for the callee to decline taking the current call. This can 18.63 -; be a single digit or multiple digits. Default is the global default. 18.64 -; 18.65 -;call-from-prompt=>followme/call-from 18.66 -; The 'Incoming call from' message prompt. Default is the global default. 18.67 -; 18.68 -;followme-norecording-prompt=>followme/no-recording 18.69 -; The 'You have an incoming call' message prompt when the caller elects 18.70 -; not to leave their name or the option isn't set for them to do so. Default 18.71 -; is the global default. 18.72 -; 18.73 -;followme-options-prompt=>followme/options 18.74 -; The 'Press 1 to accept this call or press 2 to decline it' message prompt. 18.75 -; Default is the global default. 18.76 -; 18.77 -;followme-pls-hold-prompt=>followme/pls-hold-while-try 18.78 -; The 'Please hold while we try and connect your call' message prompt. 18.79 -; Default is the global default. 18.80 -; 18.81 -;followme-status-prompt=>followme/status 18.82 -; The 'The party you're calling isn't at their desk' message prompt. 18.83 -; Default is the global default. 18.84 -; 18.85 -;followme-sorry-prompt=>followme/sorry 18.86 -; The 'I'm sorry, but we were unable to locate your party' message prompt. Default 18.87 -; is the global default. 18.88 - 18.89 -
19.1 --- a/asterisk/indications.conf Sun Mar 20 19:27:35 2011 +0100 19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 19.3 @@ -1,733 +0,0 @@ 19.4 -; indications.conf 19.5 -; Configuration file for location specific tone indications 19.6 -; used by the pbx_indications module. 19.7 -; 19.8 -; NOTE: 19.9 -; When adding countries to this file, please keep them in alphabetical 19.10 -; order according to the 2-character country codes! 19.11 -; 19.12 -; The [general] category is for certain global variables. 19.13 -; All other categories are interpreted as location specific indications 19.14 -; 19.15 -; 19.16 -;[general] 19.17 -;country=us ; default location 19.18 - 19.19 - 19.20 -; [example] 19.21 -; description = string 19.22 -; The full name of your country, in English. 19.23 -; alias = iso[,iso]* 19.24 -; List of other countries 2-letter iso codes, which have the same 19.25 -; tone indications. 19.26 -; ringcadence = num[,num]* 19.27 -; List of durations the physical bell rings. 19.28 -; dial = tonelist 19.29 -; Set of tones to be played when one picks up the hook. 19.30 -; busy = tonelist 19.31 -; Set of tones played when the receiving end is busy. 19.32 -; congestion = tonelist 19.33 -; Set of tones played when there is some congestion (on the network?) 19.34 -; callwaiting = tonelist 19.35 -; Set of tones played when there is a call waiting in the background. 19.36 -; dialrecall = tonelist 19.37 -; Not well defined; many phone systems play a recall dial tone after hook 19.38 -; flash. 19.39 -; record = tonelist 19.40 -; Set of tones played when call recording is in progress. 19.41 -; info = tonelist 19.42 -; Set of tones played with special information messages (e.g., "number is 19.43 -; out of service") 19.44 -; 'name' = tonelist 19.45 -; Every other variable will be available as a shortcut for the "PlayList" command 19.46 -; but will not be used automatically by Asterisk. 19.47 -; 19.48 -; 19.49 -; The tonelist itself is defined by a comma-separated sequence of elements. 19.50 -; Each element consist of a frequency (f) with an optional duration (in ms) 19.51 -; attached to it (f/duration). The frequency component may be a mixture of two 19.52 -; frequencies (f1+f2) or a frequency modulated by another frequency (f1*f2). 19.53 -; The implicit modulation depth is fixed at 90%, though. 19.54 -; If the list element starts with a !, that element is NOT repeated, 19.55 -; therefore, only if all elements start with !, the tonelist is time-limited, 19.56 -; all others will repeat indefinitely. 19.57 -; 19.58 -; concisely: 19.59 -; element = [!]freq[+|*freq2][/duration] 19.60 -; tonelist = element[,element]* 19.61 -; 19.62 -; Please note that SPACES ARE NOT ALLOWED in tone lists! 19.63 -; 19.64 - 19.65 -;[at] 19.66 -;description = Austria 19.67 -;ringcadence = 1000,5000 19.68 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.69 -;dial = 420 19.70 -;busy = 420/400,0/400 19.71 -;ring = 420/1000,0/5000 19.72 -;congestion = 420/200,0/200 19.73 -;callwaiting = 420/40,0/1960 19.74 -;dialrecall = 420 19.75 -; RECORDTONE - not specified 19.76 -;record = 1400/80,0/14920 19.77 -;info = 950/330,1450/330,1850/330,0/1000 19.78 -;stutter = 380+420 19.79 - 19.80 -;[au] 19.81 -;description = Australia 19.82 -; Reference http://www.acif.org.au/__data/page/3303/S002_2001.pdf 19.83 -; Normal Ring 19.84 -;ringcadence = 400,200,400,2000 19.85 -; Distinctive Ring 1 - Forwarded Calls 19.86 -; 400,400,200,200,400,1400 19.87 -; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall 19.88 -; 400,400,200,2000 19.89 -; Distinctive Ring 3 - Multiple Subscriber Number 1 19.90 -; 200,200,400,2200 19.91 -; Distinctive Ring 4 - Selective Ring 1 + Centrex 19.92 -; 400,2600 19.93 -; Distinctive Ring 5 - Selective Ring 3 19.94 -; 400,400,200,400,200,1400 19.95 -; Distinctive Ring 6 - Multiple Subscriber Number 2 19.96 -; 200,400,200,200,400,1600 19.97 -; Distinctive Ring 7 - Multiple Subscriber Number 3 + Data Privacy 19.98 -; 200,400,200,400,200,1600 19.99 -; Tones 19.100 -;dial = 413+438 19.101 -;busy = 425/375,0/375 19.102 -;ring = 413+438/400,0/200,413+438/400,0/2000 19.103 -; XXX Congestion: Should reduce by 10 db every other cadence XXX 19.104 -;congestion = 425/375,0/375,420/375,0/375 19.105 -;callwaiting = 425/200,0/200,425/200,0/4400 19.106 -;dialrecall = 413+438 19.107 -; Record tone used for Call Intrusion/Recording or Conference 19.108 -;record = !425/1000,!0/15000,425/360,0/15000 19.109 -;info = 425/2500,0/500 19.110 -; Other Australian Tones 19.111 -; The STD "pips" indicate the call is not an untimed local call 19.112 -;std = !525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100 19.113 -; Facility confirmation tone (eg. Call Forward Activated) 19.114 -;facility = 425 19.115 -; Message Waiting "stutter" dialtone 19.116 -;stutter = 413+438/100,0/40 19.117 -; Ringtone for calls to Telstra mobiles 19.118 -;ringmobile = 400+450/400,0/200,400+450/400,0/2000 19.119 - 19.120 -;[bg] 19.121 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.122 -;description = Bulgaria 19.123 -;ringdance = 1000,4000 19.124 -; 19.125 -;dial = 425 19.126 -;busy = 425/500,0/500 19.127 -;ring = 425/1000,0/4000 19.128 -;congestion = 425/250,0/250 19.129 -;callwaiting = 425/150,0/150,425/150,0/4000 19.130 -;dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.131 -;record = 1400/425,0/15000 19.132 -;info = 950/330,1400/330,1800/330,0/1000 19.133 -;stutter = 425/1500,0/100 19.134 - 19.135 -;[br] 19.136 -;description = Brazil 19.137 -;ringcadence = 1000,4000 19.138 -;dial = 425 19.139 -;busy = 425/250,0/250 19.140 -;ring = 425/1000,0/4000 19.141 -;congestion = 425/250,0/250,425/750,0/250 19.142 -;callwaiting = 425/50,0/1000 19.143 -; Dialrecall not used in Brazil standard (using UK standard) 19.144 -;dialrecall = 350+440 19.145 -; Record tone is not used in Brazil, use busy tone 19.146 -;record = 425/250,0/250 19.147 -; Info not used in Brazil standard (using UK standard) 19.148 -;info = 950/330,1400/330,1800/330 19.149 -;stutter = 350+440 19.150 - 19.151 -;[be] 19.152 -;description = Belgium 19.153 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.154 -;ringcadence = 1000,3000 19.155 -;dial = 425 19.156 -;busy = 425/500,0/500 19.157 -;ring = 425/1000,0/3000 19.158 -;congestion = 425/167,0/167 19.159 -;callwaiting = 1400/175,0/175,1400/175,0/3500 19.160 -; DIALRECALL - not specified 19.161 -;dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440" 19.162 -; RECORDTONE - not specified 19.163 -;record = 1400/500,0/15000 19.164 -;info = 900/330,1400/330,1800/330,0/1000 19.165 -;stutter = 425/1000,0/250 19.166 - 19.167 -;[ch] 19.168 -;description = Switzerland 19.169 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.170 -;ringcadence = 1000,4000 19.171 -;dial = 425 19.172 -;busy = 425/500,0/500 19.173 -;ring = 425/1000,0/4000 19.174 -;congestion = 425/200,0/200 19.175 -;callwaiting = 425/200,0/200,425/200,0/4000 19.176 -; DIALRECALL - not specified 19.177 -;dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.178 -; RECORDTONE - not specified 19.179 -;record = 1400/80,0/15000 19.180 -;info = 950/330,1400/330,1800/330,0/1000 19.181 -;stutter = 425+340/1100,0/1100 19.182 - 19.183 -;[cl] 19.184 -;description = Chile 19.185 -; According to specs from Telefonica CTC Chile 19.186 -;ringcadence = 1000,3000 19.187 -;dial = 400 19.188 -;busy = 400/500,0/500 19.189 -;ring = 400/1000,0/3000 19.190 -;congestion = 400/200,0/200 19.191 -;callwaiting = 400/250,0/8750 19.192 -;dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 19.193 -;record = 1400/500,0/15000 19.194 -;info = 950/333,1400/333,1800/333,0/1000 19.195 -;stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 19.196 - 19.197 -;[cn] 19.198 -;description = China 19.199 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.200 -;ringcadence = 1000,4000 19.201 -;dial = 450 19.202 -;busy = 450/350,0/350 19.203 -;ring = 450/1000,0/4000 19.204 -;congestion = 450/700,0/700 19.205 -;callwaiting = 450/400,0/4000 19.206 -;dialrecall = 450 19.207 -;record = 950/400,0/10000 19.208 -;info = 450/100,0/100,450/100,0/100,450/100,0/100,450/400,0/400 19.209 -; STUTTER - not specified 19.210 -;stutter = 450+425 19.211 - 19.212 -;[cz] 19.213 -;description = Czech Republic 19.214 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.215 -;ringcadence = 1000,4000 19.216 -;dial = 425/330,0/330,425/660,0/660 19.217 -;busy = 425/330,0/330 19.218 -;ring = 425/1000,0/4000 19.219 -;congestion = 425/165,0/165 19.220 -;callwaiting = 425/330,0/9000 19.221 -; DIALRECALL - not specified 19.222 -;dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425/330,0/330,425/660,0/660 19.223 -; RECORDTONE - not specified 19.224 -;record = 1400/500,0/14000 19.225 -;info = 950/330,0/30,1400/330,0/30,1800/330,0/1000 19.226 -; STUTTER - not specified 19.227 -;stutter = 425/450,0/50 19.228 - 19.229 -;[de] 19.230 -;description = Germany 19.231 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.232 -;ringcadence = 1000,4000 19.233 -;dial = 425 19.234 -;busy = 425/480,0/480 19.235 -;ring = 425/1000,0/4000 19.236 -;congestion = 425/240,0/240 19.237 -;callwaiting = !425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,0 19.238 -; DIALRECALL - not specified 19.239 -;dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.240 -; RECORDTONE - not specified 19.241 -;record = 1400/80,0/15000 19.242 -;info = 950/330,1400/330,1800/330,0/1000 19.243 -;stutter = 425+400 19.244 - 19.245 -;[dk] 19.246 -;description = Denmark 19.247 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.248 -;ringcadence = 1000,4000 19.249 -;dial = 425 19.250 -;busy = 425/500,0/500 19.251 -;ring = 425/1000,0/4000 19.252 -;congestion = 425/200,0/200 19.253 -;callwaiting = !425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200,0 19.254 -; DIALRECALL - not specified 19.255 -;dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.256 -; RECORDTONE - not specified 19.257 -;record = 1400/80,0/15000 19.258 -;info = 950/330,1400/330,1800/330,0/1000 19.259 -; STUTTER - not specified 19.260 -;stutter = 425/450,0/50 19.261 - 19.262 -;[ee] 19.263 -;description = Estonia 19.264 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.265 -;ringcadence = 1000,4000 19.266 -;dial = 425 19.267 -;busy = 425/300,0/300 19.268 -;ring = 425/1000,0/4000 19.269 -;congestion = 425/200,0/200 19.270 -; CALLWAIT not in accordance to ITU 19.271 -;callwaiting = 950/650,0/325,950/325,0/30,1400/1300,0/2600 19.272 -; DIALRECALL - not specified 19.273 -;dialrecall = 425/650,0/25 19.274 -; RECORDTONE - not specified 19.275 -;record = 1400/500,0/15000 19.276 -; INFO not in accordance to ITU 19.277 -;info = 950/650,0/325,950/325,0/30,1400/1300,0/2600 19.278 -; STUTTER not specified 19.279 -;stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.280 - 19.281 -;[es] 19.282 -;description = Spain 19.283 -;ringcadence = 1500,3000 19.284 -;dial = 425 19.285 -;busy = 425/200,0/200 19.286 -;ring = 425/1500,0/3000 19.287 -;congestion = 425/200,0/200,425/200,0/200,425/200,0/600 19.288 -;callwaiting = 425/175,0/175,425/175,0/3500 19.289 -;dialrecall = !425/200,!0/200,!425/200,!0/200,!425/200,!0/200,425 19.290 -;record = 1400/500,0/15000 19.291 -;info = 950/330,0/1000 19.292 -;dialout = 500 19.293 - 19.294 - 19.295 -;[fi] 19.296 -;description = Finland 19.297 -;ringcadence = 1000,4000 19.298 -;dial = 425 19.299 -;busy = 425/300,0/300 19.300 -;ring = 425/1000,0/4000 19.301 -;congestion = 425/200,0/200 19.302 -;callwaiting = 425/150,0/150,425/150,0/8000 19.303 -;dialrecall = 425/650,0/25 19.304 -;record = 1400/500,0/15000 19.305 -;info = 950/650,0/325,950/325,0/30,1400/1300,0/2600 19.306 -;stutter = 425/650,0/25 19.307 - 19.308 -;[fr] 19.309 -;description = France 19.310 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.311 -;ringcadence = 1500,3500 19.312 -; Dialtone can also be 440+330 19.313 -;dial = 440 19.314 -;busy = 440/500,0/500 19.315 -;ring = 440/1500,0/3500 19.316 -; CONGESTION - not specified 19.317 -;congestion = 440/250,0/250 19.318 -;callwait = 440/300,0/10000 19.319 -; DIALRECALL - not specified 19.320 -;dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.321 -; RECORDTONE - not specified 19.322 -;record = 1400/500,0/15000 19.323 -;info = !950/330,!1400/330,!1800/330 19.324 -;stutter = !440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,440 19.325 - 19.326 -;[gr] 19.327 -;description = Greece 19.328 -;ringcadence = 1000,4000 19.329 -;dial = 425/200,0/300,425/700,0/800 19.330 -;busy = 425/300,0/300 19.331 -;ring = 425/1000,0/4000 19.332 -;congestion = 425/200,0/200 19.333 -;callwaiting = 425/150,0/150,425/150,0/8000 19.334 -;dialrecall = 425/650,0/25 19.335 -;record = 1400/400,0/15000 19.336 -;info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 19.337 -;stutter = 425/650,0/25 19.338 - 19.339 -;[hu] 19.340 -;description = Hungary 19.341 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.342 -;ringcadence = 1250,3750 19.343 -;dial = 425 19.344 -;busy = 425/300,0/300 19.345 -;ring = 425/1250,0/3750 19.346 -;congestion = 425/300,0/300 19.347 -;callwaiting = 425/40,0/1960 19.348 -;dialrecall = 425+450 19.349 -; RECORDTONE - not specified 19.350 -;record = 1400/400,0/15000 19.351 -;info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 19.352 -;stutter = 350+375+400 19.353 - 19.354 -;[il] 19.355 -;description = Israel 19.356 -;ringcadence = 1000,3000 19.357 -;dial = 414 19.358 -;busy = 414/500,0/500 19.359 -;ring = 414/1000,0/3000 19.360 -;congestion = 414/250,0/250 19.361 -;callwaiting = 414/100,0/100,414/100,0/100,414/600,0/3000 19.362 -;dialrecall = !414/100,!0/100,!414/100,!0/100,!414/100,!0/100,414 19.363 -;record = 1400/500,0/15000 19.364 -;info = 1000/330,1400/330,1800/330,0/1000 19.365 -;stutter = !414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,414 19.366 - 19.367 - 19.368 -;[in] 19.369 -;description = India 19.370 -;ringcadence = 400,200,400,2000 19.371 -;dial = 400*25 19.372 -;busy = 400/750,0/750 19.373 -;ring = 400*25/400,0/200,400*25/400,0/2000 19.374 -;congestion = 400/250,0/250 19.375 -;callwaiting = 400/200,0/100,400/200,0/7500 19.376 -;dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.377 -;record = 1400/500,0/15000 19.378 -;info = !950/330,!1400/330,!1800/330,0/1000 19.379 -;stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.380 - 19.381 -;[it] 19.382 -;description = Italy 19.383 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.384 -;ringcadence = 1000,4000 19.385 -;dial = 425/200,0/200,425/600,0/1000 19.386 -;busy = 425/500,0/500 19.387 -;ring = 425/1000,0/4000 19.388 -;congestion = 425/200,0/200 19.389 -;callwaiting = 425/400,0/100,425/250,0/100,425/150,0/14000 19.390 -;dialrecall = 470/400,425/400 19.391 -;record = 1400/400,0/15000 19.392 -;info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 19.393 -;stutter = 470/400,425/400 19.394 - 19.395 -;[lt] 19.396 -;description = Lithuania 19.397 -;ringcadence = 1000,4000 19.398 -;dial = 425 19.399 -;busy = 425/350,0/350 19.400 -;ring = 425/1000,0/4000 19.401 -;congestion = 425/200,0/200 19.402 -;callwaiting = 425/150,0/150,425/150,0/4000 19.403 -; DIALRECALL - not specified 19.404 -;dialrecall = 425/500,0/50 19.405 -; RECORDTONE - not specified 19.406 -;record = 1400/500,0/15000 19.407 -;info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 19.408 -; STUTTER - not specified 19.409 -;stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.410 - 19.411 -;[jp] 19.412 -;description = Japan 19.413 -;ringcadence = 1000,2000 19.414 -;dial = 400 19.415 -;busy = 400/500,0/500 19.416 -;ring = 400+15/1000,0/2000 19.417 -;congestion = 400/500,0/500 19.418 -;callwaiting = 400+16/500,0/8000 19.419 -;dialrecall = !400/200,!0/200,!400/200,!0/200,!400/200,!0/200,400 19.420 -;record = 1400/500,0/15000 19.421 -;info = !950/330,!1400/330,!1800/330,0 19.422 -;stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 19.423 - 19.424 -;[mx] 19.425 -;description = Mexico 19.426 -;ringcadence = 2000,4000 19.427 -;dial = 425 19.428 -;busy = 425/250,0/250 19.429 -;ring = 425/1000,0/4000 19.430 -;congestion = 425/250,0/250 19.431 -;callwaiting = 425/200,0/600,425/200,0/10000 19.432 -;dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.433 -;record = 1400/500,0/15000 19.434 -;info = 950/330,0/30,1400/330,0/30,1800/330,0/1000 19.435 -;stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.436 - 19.437 -;[my] 19.438 -;description = Malaysia 19.439 -;ringcadence = 2000,4000 19.440 -;dial = 425 19.441 -;busy = 425/500,0/500 19.442 -;ring = 425/400,0/200 19.443 -;congestion = 425/500,0/500 19.444 - 19.445 -;[nl] 19.446 -;description = Netherlands 19.447 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.448 -;ringcadence = 1000,4000 19.449 -; Most of these 425's can also be 450's 19.450 -;dial = 425 19.451 -;busy = 425/500,0/500 19.452 -;ring = 425/1000,0/4000 19.453 -;congestion = 425/250,0/250 19.454 -;callwaiting = 425/500,0/9500 19.455 -; DIALRECALL - not specified 19.456 -;dialrecall = 425/500,0/50 19.457 -; RECORDTONE - not specified 19.458 -;record = 1400/500,0/15000 19.459 -;info = 950/330,1400/330,1800/330,0/1000 19.460 -;stutter = 425/500,0/50 19.461 - 19.462 -;[no] 19.463 -;description = Norway 19.464 -;ringcadence = 1000,4000 19.465 -;dial = 425 19.466 -;busy = 425/500,0/500 19.467 -;ring = 425/1000,0/4000 19.468 -;congestion = 425/200,0/200 19.469 -;callwaiting = 425/200,0/600,425/200,0/10000 19.470 -;dialrecall = 470/400,425/400 19.471 -;record = 1400/400,0/15000 19.472 -;info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 19.473 -;stutter = 470/400,425/400 19.474 - 19.475 -;[nz] 19.476 -;description = New Zealand 19.477 -;NOTE - the ITU has different tonesets for NZ, but according to some residents there, 19.478 -; this is, indeed, the correct way to do it. 19.479 -;ringcadence = 400,200,400,2000 19.480 -;dial = 400 19.481 -;busy = 400/250,0/250 19.482 -;ring = 400+450/400,0/200,400+450/400,0/2000 19.483 -;congestion = 400/375,0/375 19.484 -;callwaiting = !400/200,!0/3000,!400/200,!0/3000,!400/200,!0/3000,!400/200 19.485 -;dialrecall = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,400 19.486 -;record = 1400/425,0/15000 19.487 -;info = 400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400 19.488 -;stutter = !400/100!0/100,!400/100,!0/100,!400/100,!0/100,!400/100!0/100,!400/100,!0/100,!400/100,!0/100,400 19.489 -;unobtainable = 400/75,0/100,400/75,0/100,400/75,0/100,400/75,0/400 19.490 - 19.491 -;[ph] 19.492 - 19.493 -; reference http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.494 - 19.495 -;description = Philippines 19.496 -;ringcadence = 1000,4000 19.497 -;dial = 425 19.498 -;busy = 480+620/500,0/500 19.499 -;ring = 425+480/1000,0/4000 19.500 -;congestion = 480+620/250,0/250 19.501 -;callwaiting = 440/300,0/10000 19.502 -; DIALRECALL - not specified 19.503 -;dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.504 -; RECORDTONE - not specified 19.505 -;record = 1400/500,0/15000 19.506 -; INFO - not specified 19.507 -;info = !950/330,!1400/330,!1800/330,0 19.508 -; STUTTER - not specified 19.509 -;stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.510 - 19.511 - 19.512 -;[pl] 19.513 -;description = Poland 19.514 -;ringcadence = 1000,4000 19.515 -;dial = 425 19.516 -;busy = 425/500,0/500 19.517 -;ring = 425/1000,0/4000 19.518 -;congestion = 425/500,0/500 19.519 -;callwaiting = 425/150,0/150,425/150,0/4000 19.520 -; DIALRECALL - not specified 19.521 -;dialrecall = 425/500,0/50 19.522 -; RECORDTONE - not specified 19.523 -;record = 1400/500,0/15000 19.524 -; 950/1400/1800 3x0.33 on 1.0 off repeated 3 times 19.525 -;info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000 19.526 -; STUTTER - not specified 19.527 -;stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.528 - 19.529 -;[pt] 19.530 -;description = Portugal 19.531 -;ringcadence = 1000,5000 19.532 -;dial = 425 19.533 -;busy = 425/500,0/500 19.534 -;ring = 425/1000,0/5000 19.535 -;congestion = 425/200,0/200 19.536 -;callwaiting = 440/300,0/10000 19.537 -;dialrecall = 425/1000,0/200 19.538 -;record = 1400/500,0/15000 19.539 -;info = 950/330,1400/330,1800/330,0/1000 19.540 -;stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.541 - 19.542 -;[ru] 19.543 -; References: 19.544 -; http://www.minsvyaz.ru/site.shtml?id=1806 19.545 -; http://www.aboutphone.info/lib/gost/45-223-2001.html 19.546 -;description = Russian Federation / ex Soviet Union 19.547 -;ringcadence = 1000,4000 19.548 -;dial = 425 19.549 -;busy = 425/350,0/350 19.550 -;ring = 425/1000,0/4000 19.551 -;congestion = 425/175,0/175 19.552 -;callwaiting = 425/200,0/5000 19.553 -;record = 1400/400,0/15000 19.554 -;info = 950/330,1400/330,1800/330,0/1000 19.555 -;dialrecall = 425/400,0/40 19.556 -;stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.557 - 19.558 -;[se] 19.559 -;description = Sweden 19.560 -;ringcadence = 1000,5000 19.561 -;dial = 425 19.562 -;busy = 425/250,0/250 19.563 -;ring = 425/1000,0/5000 19.564 -;congestion = 425/250,0/750 19.565 -;callwaiting = 425/200,0/500,425/200,0/9100 19.566 -;dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.567 -;record = 1400/500,0/15000 19.568 -;info = !950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,0 19.569 -;stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 19.570 -; stutter = 425/320,0/20 ; Real swedish standard, not used for now 19.571 - 19.572 -;[sg] 19.573 -;description = Singapore 19.574 -; Singapore 19.575 -; Reference: http://www.ida.gov.sg/idaweb/doc/download/I397/ida_ts_pstn1_i4r2.pdf 19.576 -; Frequency specs are: 425 Hz +/- 20Hz; 24 Hz +/- 2Hz; modulation depth 100%; SIT +/- 50Hz 19.577 -;ringcadence = 400,200,400,2000 19.578 -;dial = 425 19.579 -;ring = 425*24/400,0/200,425*24/400,0/2000 ; modulation should be 100%, not 90% 19.580 -;busy = 425/750,0/750 19.581 -;congestion = 425/250,0/250 19.582 -;callwaiting = 425*24/300,0/200,425*24/300,0/3200 19.583 -;stutter = !425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,425 19.584 -;info = 950/330,1400/330,1800/330,0/1000 ; not currently in use acc. to reference 19.585 -;dialrecall = 425*24/500,0/500,425/500,0/2500 ; unspecified in IDA reference, use repeating Holding Tone A,B 19.586 -;record = 1400/500,0/15000 ; unspecified in IDA reference, use 0.5s tone every 15s 19.587 -; additionally defined in reference 19.588 -;nutone = 425/2500,0/500 19.589 -;intrusion = 425/250,0/2000 19.590 -;warning = 425/624,0/4376 ; end of period tone, warning 19.591 -;acceptance = 425/125,0/125 19.592 -;holdinga = !425*24/500,!0/500 ; followed by holdingb 19.593 -;holdingb = !425/500,!0/2500 19.594 - 19.595 -;[th] 19.596 -;description = Thailand 19.597 -;ringcadence = 1000,4000 19.598 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.599 -;dial = 400*50 19.600 -;busy = 400/500,0/500 19.601 -;ring = 420/1000,0/5000 19.602 -;congestion = 400/300,0/300 19.603 -;callwaiting = 1000/400,10000/400,1000/400 19.604 -; DIALRECALL - not specified - use special dial tone instead. 19.605 -;dialrecall = 400*50/400,0/100,400*50/400,0/100 19.606 -; RECORDTONE - not specified 19.607 -;record = 1400/500,0/15000 19.608 -; INFO - specified as an announcement - use special information tones instead 19.609 -;info = 950/330,1400/330,1800/330 19.610 -; STUTTER - not specified 19.611 -;stutter = !400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,400 19.612 - 19.613 -;[uk] 19.614 -;description = United Kingdom 19.615 -;ringcadence = 400,200,400,2000 19.616 -; These are the official tones taken from BT SIN350. The actual tones 19.617 -; used by BT include some volume differences so sound slightly different 19.618 -; from Asterisk-generated ones. 19.619 -;dial = 350+440 19.620 -; Special dial is the intermittent dial tone heard when, for example, 19.621 -; you have a divert active on the line 19.622 -;specialdial = 350+440/750,440/750 19.623 -; Busy is also called "Engaged" 19.624 -;busy = 400/375,0/375 19.625 -; "Congestion" is the Beep-bip engaged tone 19.626 -;congestion = 400/400,0/350,400/225,0/525 19.627 -; "Special Congestion" is not used by BT very often if at all 19.628 -;specialcongestion = 400/200,1004/300 19.629 -;unobtainable = 400 19.630 -;ring = 400+450/400,0/200,400+450/400,0/2000 19.631 -;callwaiting = 400/100,0/4000 19.632 -; BT seem to use "Special Call Waiting" rather than just "Call Waiting" tones 19.633 -;specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000 19.634 -; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT claim it 19.635 -; is and I've not used a payphone for years) 19.636 -;creditexpired = 400/125,0/125 19.637 -; These two are used to confirm/reject service requests on exchanges that 19.638 -; don't do voice announcements. 19.639 -;confirm = 1400 19.640 -;switching = 400/200,0/400,400/2000,0/400 19.641 -; This is the three rising tones Doo-dah-dee "Special Information Tone", 19.642 -; usually followed by the BT woman saying an appropriate message. 19.643 -;info = 950/330,0/15,1400/330,0/15,1800/330,0/1000 19.644 -; Not listed in SIN350 19.645 -;record = 1400/500,0/60000 19.646 -;stutter = 350+440/750,440/750 19.647 - 19.648 -;[us] 19.649 -;description = United States / North America 19.650 -;ringcadence = 2000,4000 19.651 -;dial = 350+440 19.652 -;busy = 480+620/500,0/500 19.653 -;ring = 440+480/2000,0/4000 19.654 -;congestion = 480+620/250,0/250 19.655 -;callwaiting = 440/300,0/10000 19.656 -;dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.657 -;record = 1400/500,0/15000 19.658 -;info = !950/330,!1400/330,!1800/330,0 19.659 -;stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.660 - 19.661 -;[us-old] 19.662 -;description = United States Circa 1950/ North America 19.663 -;ringcadence = 2000,4000 19.664 -;dial = 600*120 19.665 -;busy = 500*100/500,0/500 19.666 -;ring = 420*40/2000,0/4000 19.667 -;congestion = 500*100/250,0/250 19.668 -;callwaiting = 440/300,0/10000 19.669 -;dialrecall = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 19.670 -;record = 1400/500,0/15000 19.671 -;info = !950/330,!1400/330,!1800/330,0 19.672 -;stutter = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 19.673 - 19.674 -;[tw] 19.675 -;description = Taiwan 19.676 -; http://nemesis.lonestar.org/reference/telecom/signaling/dialtone.html 19.677 -; http://nemesis.lonestar.org/reference/telecom/signaling/busy.html 19.678 -; http://www.iproducts.com.tw/ee/kylink/06ky-1000a.htm 19.679 -; http://www.pbx-manufacturer.com/ky120dx.htm 19.680 -; http://www.nettwerked.net/tones.txt 19.681 -; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/taiw_sup/taiw2.htm 19.682 -; 19.683 -; busy tone 480+620Hz 0.5 sec. on ,0.5 sec. off 19.684 -; reorder tone 480+620Hz 0.25 sec. on,0.25 sec. off 19.685 -; ringing tone 440+480Hz 1 sec. on ,2 sec. off 19.686 -; 19.687 -;ringcadence = 1000,4000 19.688 -;dial = 350+440 19.689 -;busy = 480+620/500,0/500 19.690 -;ring = 440+480/1000,0/2000 19.691 -;congestion = 480+620/250,0/250 19.692 -;callwaiting = 350+440/250,0/250,350+440/250,0/3250 19.693 -;dialrecall = 300/1500,0/500 19.694 -;record = 1400/500,0/15000 19.695 -;info = !950/330,!1400/330,!1800/330,0 19.696 -;stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 19.697 - 19.698 -;[ve] 19.699 -; Tone definition source for ve found on 19.700 -; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 19.701 -;description = Venezuela / South America 19.702 -;ringcadence = 1000,4000 19.703 -;dial = 425 19.704 -;busy = 425/500,0/500 19.705 -;ring = 425/1000,0/4000 19.706 -;congestion = 425/250,0/250 19.707 -;callwaiting = 400+450/300,0/6000 19.708 -;dialrecall = 425 19.709 -;record = 1400/500,0/15000 19.710 -;info = !950/330,!1440/330,!1800/330,0/1000 19.711 - 19.712 - 19.713 -;[za] 19.714 -;description = South Africa 19.715 -; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/safr_sup/saf02.htm 19.716 -; (definitions for other countries can also be found there) 19.717 -; Note, though, that South Africa uses two switch types in their network -- 19.718 -; Alcatel switches -- mainly in the Western Cape, and Siemens elsewhere. 19.719 -; The former use 383+417 in dial, ringback etc. The latter use 400*33 19.720 -; I've provided both, uncomment the ones you prefer 19.721 -;ringcadence = 400,200,400,2000 19.722 -; dial/ring/callwaiting for the Siemens switches: 19.723 -;dial = 400*33 19.724 -;ring = 400*33/400,0/200,400*33/400,0/2000 19.725 -;callwaiting = 400*33/250,0/250,400*33/250,0/250,400*33/250,0/250,400*33/250,0/250 19.726 -; dial/ring/callwaiting for the Alcatel switches: 19.727 -; dial = 383+417 19.728 -; ring = 383+417/400,0/200,383+417/400,0/2000 19.729 -; callwaiting = 383+417/250,0/250,383+417/250,0/250,383+417/250,0/250,383+417/250,0/250 19.730 -;congestion = 400/250,0/250 19.731 -;busy = 400/500,0/500 19.732 -;dialrecall = 350+440 19.733 -; XXX Not sure about the RECORDTONE 19.734 -;record = 1400/500,0/10000 19.735 -;info = 950/330,1400/330,1800/330,0/330 19.736 -;stutter = !400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,400*33
20.1 --- a/asterisk/logger.conf Sun Mar 20 19:27:35 2011 +0100 20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 20.3 @@ -1,69 +0,0 @@ 20.4 -; 20.5 -; Logging Configuration 20.6 -; 20.7 -; In this file, you configure logging to files or to 20.8 -; the syslog system. 20.9 -; 20.10 -; "logger reload" at the CLI will reload configuration 20.11 -; of the logging system. 20.12 - 20.13 -;[general] 20.14 -; Customize the display of debug message time stamps 20.15 -; this example is the ISO 8601 date format (yyyy-mm-dd HH:MM:SS) 20.16 -; see strftime(3) Linux manual for format specifiers 20.17 -;dateformat=%F %T 20.18 -; 20.19 -; This appends the hostname to the name of the log files. 20.20 -;appendhostname = yes 20.21 -; 20.22 -; This determines whether or not we log queue events to a file 20.23 -; (defaults to yes). 20.24 -;queue_log = no 20.25 -; 20.26 -; This determines whether or not we log generic events to a file 20.27 -; (defaults to yes). 20.28 -;event_log = no 20.29 -; 20.30 -; 20.31 -; For each file, specify what to log. 20.32 -; 20.33 -; For console logging, you set options at start of 20.34 -; Asterisk with -v for verbose and -d for debug 20.35 -; See 'asterisk -h' for more information. 20.36 -; 20.37 -; Directory for log files is configures in asterisk.conf 20.38 -; option astlogdir 20.39 -; 20.40 -;[logfiles] 20.41 -; 20.42 -; Format is "filename" and then "levels" of debugging to be included: 20.43 -; debug 20.44 -; notice 20.45 -; warning 20.46 -; error 20.47 -; verbose 20.48 -; dtmf 20.49 -; 20.50 -; Special filename "console" represents the system console 20.51 -; 20.52 -; We highly recommend that you DO NOT turn on debug mode if you are simply 20.53 -; running a production system. Debug mode turns on a LOT of extra messages, 20.54 -; most of which you are unlikely to understand without an understanding of 20.55 -; the underlying code. Do NOT report debug messages as code issues, unless 20.56 -; you have a specific issue that you are attempting to debug. They are 20.57 -; messages for just that -- debugging -- and do not rise to the level of 20.58 -; something that merit your attention as an Asterisk administrator. Debug 20.59 -; messages are also very verbose and can and do fill up logfiles quickly; 20.60 -; this is another reason not to have debug mode on a production system unless 20.61 -; you are in the process of debugging a specific issue. 20.62 -; 20.63 -;debug => debug 20.64 -;console => notice,warning,error 20.65 -;console => notice,warning,error,debug 20.66 -;messages => notice,warning,error 20.67 -;full => notice,warning,error,debug,verbose 20.68 - 20.69 -;syslog keyword : This special keyword logs to syslog facility 20.70 -; 20.71 -;syslog.local0 => notice,warning,error 20.72 -;
21.1 --- a/asterisk/manager.conf Sun Mar 20 19:27:35 2011 +0100 21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 21.3 @@ -1,56 +0,0 @@ 21.4 -; 21.5 -; AMI - The Asterisk Manager Interface 21.6 -; 21.7 -; Third party application call management support and PBX event supervision 21.8 -; 21.9 -; This configuration file is read every time someone logs in 21.10 -; 21.11 -; Use the "manager list commands" at the CLI to list available manager commands 21.12 -; and their authorization levels. 21.13 -; 21.14 -; "manager show command <command>" will show a help text. 21.15 -; 21.16 -; ---------------------------- SECURITY NOTE ------------------------------- 21.17 -; Note that you should not enable the AMI on a public IP address. If needed, 21.18 -; block this TCP port with iptables (or another FW software) and reach it 21.19 -; with IPsec, SSH, or SSL vpn tunnel. You can also make the manager 21.20 -; interface available over http if Asterisk's http server is enabled in 21.21 -; http.conf and if both "enabled" and "webenabled" are set to yes in 21.22 -; this file. Both default to no. httptimeout provides the maximum 21.23 -; timeout in seconds before a web based session is discarded. The 21.24 -; default is 60 seconds. 21.25 -; 21.26 -;[general] 21.27 -;displaysystemname = yes 21.28 -;enabled = no 21.29 -;webenabled = yes 21.30 -;port = 5038 21.31 - 21.32 -;httptimeout = 60 21.33 -; a) httptimeout sets the Max-Age of the http cookie 21.34 -; b) httptimeout is the amount of time the webserver waits 21.35 -; on a action=waitevent request (actually its httptimeout-10) 21.36 -; c) httptimeout is also the amount of time the webserver keeps 21.37 -; a http session alive after completing a successful action 21.38 - 21.39 -;bindaddr = 0.0.0.0 21.40 -;displayconnects = yes 21.41 -; 21.42 -; Add a Unix epoch timestamp to events (not action responses) 21.43 -; 21.44 -;timestampevents = yes 21.45 - 21.46 -;[mark] 21.47 -;secret = mysecret 21.48 -;deny=0.0.0.0/0.0.0.0 21.49 -;permit=209.16.236.73/255.255.255.0 21.50 -; 21.51 -; If the device connected via this user accepts input slowly, 21.52 -; the timeout for writes to it can be increased to keep it 21.53 -; from being disconnected (value is in milliseconds) 21.54 -; 21.55 -; writetimeout = 100 21.56 -; 21.57 -; Authorization for various classes 21.58 -;read = system,call,log,verbose,command,agent,user,config 21.59 -;write = system,call,log,verbose,command,agent,user,config
22.1 --- a/asterisk/meetme.conf Sun Mar 20 19:27:35 2011 +0100 22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 22.3 @@ -1,26 +0,0 @@ 22.4 -; 22.5 -; Configuration file for MeetMe simple conference rooms for Asterisk of course. 22.6 -; 22.7 -; This configuration file is read every time you call app meetme() 22.8 - 22.9 -;[general] 22.10 -;audiobuffers=32 ; The number of 20ms audio buffers to be used 22.11 - ; when feeding audio frames from non-Zap channels 22.12 - ; into the conference; larger numbers will allow 22.13 - ; for the conference to 'de-jitter' audio that arrives 22.14 - ; at different timing than the conference's timing 22.15 - ; source, but can also allow for latency in hearing 22.16 - ; the audio from the speaker. Minimum value is 2, 22.17 - ; maximum value is 32. 22.18 -; 22.19 -;[rooms] 22.20 -; 22.21 -; Usage is conf => confno[,pin][,adminpin] 22.22 -; 22.23 -; Note that once a participant has called the conference, a change to the pin 22.24 -; number done in this file will not take effect until there are no more users 22.25 -; in the conference and it goes away. When it is created again, it will have 22.26 -; the new pin number. 22.27 -; 22.28 -;conf => 1234 22.29 -;conf => 2345,9938
23.1 --- a/asterisk/misdn.conf Sun Mar 20 19:27:35 2011 +0100 23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 23.3 @@ -1,429 +0,0 @@ 23.4 -; 23.5 -; chan_misdn sample config 23.6 -; 23.7 - 23.8 -; general section: 23.9 -; 23.10 -; for debugging and general setup, things that are not bound to port groups 23.11 -; 23.12 - 23.13 -;[general] 23.14 -; 23.15 -; Sets the Path to the misdn-init.conf (for nt_ptp mode checking) 23.16 -; 23.17 -;misdn_init=/etc/misdn-init.conf 23.18 - 23.19 -; set debugging flag: 23.20 -; 0 - No Debug 23.21 -; 1 - mISDN Messages and * - Messages, and * - State changes 23.22 -; 2 - Messages + Message specific Informations (e.g. bearer capability) 23.23 -; 3 - very Verbose, the above + lots of Driver specific infos 23.24 -; 4 - even more Verbose than 3 23.25 -; 23.26 -; default value: 0 23.27 -; 23.28 -;debug=0 23.29 - 23.30 - 23.31 - 23.32 -; set debugging file and flags for mISDNuser (NT-Stack) 23.33 -; 23.34 -; flags can be or'ed with the following values: 23.35 -; 23.36 -; DBGM_NET 0x00000001 23.37 -; DBGM_MSG 0x00000002 23.38 -; DBGM_FSM 0x00000004 23.39 -; DBGM_TEI 0x00000010 23.40 -; DBGM_L2 0x00000020 23.41 -; DBGM_L3 0x00000040 23.42 -; DBGM_L3DATA 0x00000080 23.43 -; DBGM_BC 0x00000100 23.44 -; DBGM_TONE 0x00000200 23.45 -; DBGM_BCDATA 0x00000400 23.46 -; DBGM_MAN 0x00001000 23.47 -; DBGM_APPL 0x00002000 23.48 -; DBGM_ISDN 0x00004000 23.49 -; DBGM_SOCK 0x00010000 23.50 -; DBGM_CONN 0x00020000 23.51 -; DBGM_CDATA 0x00040000 23.52 -; DBGM_DDATA 0x00080000 23.53 -; DBGM_SOUND 0x00100000 23.54 -; DBGM_SDATA 0x00200000 23.55 -; DBGM_TOPLEVEL 0x40000000 23.56 -; DBGM_ALL 0xffffffff 23.57 -; 23.58 - 23.59 -;ntdebugflags=0 23.60 -;ntdebugfile=/var/log/misdn-nt.log 23.61 - 23.62 - 23.63 -; some pbx systems do cut the L1 for some milliseconds, to avoid 23.64 -; dropping running calls, we can set this flag to yes and tell 23.65 -; mISDNuser not to drop the calls on L2_RELEASE 23.66 -;ntkeepcalls=no 23.67 - 23.68 -; the big trace 23.69 -; 23.70 -; default value: [not set] 23.71 -; 23.72 -;tracefile=/var/log/asterisk/misdn.log 23.73 - 23.74 - 23.75 -; set to yes if you want mISDN_dsp to bridge the calls in HW 23.76 -; 23.77 -; default value: yes 23.78 -; 23.79 -;bridging=no 23.80 - 23.81 - 23.82 -; 23.83 -; watches the L1s of every port. If one l1 is down it tries to 23.84 -; get it up. The timeout is given in seconds. with 0 as value it 23.85 -; does not watch the l1 at all 23.86 -; 23.87 -; default value: 0 23.88 -; 23.89 -; this option is only read at loading time of chan_misdn, 23.90 -; which means you need to unload and load chan_misdn to change the 23.91 -; value, an asterisk restart should do the trick 23.92 -; 23.93 -;l1watcher_timeout=0 23.94 - 23.95 -; stops dialtone after getting first digit on nt Port 23.96 -; 23.97 -; default value: yes 23.98 -; 23.99 -;stop_tone_after_first_digit=yes 23.100 - 23.101 -; whether to append overlapdialed Digits to Extension or not 23.102 -; 23.103 -; default value: yes 23.104 -; 23.105 -;append_digits2exten=yes 23.106 - 23.107 -;;; CRYPTION STUFF 23.108 - 23.109 -; Whether to look for dynamic crypting attempt 23.110 -; 23.111 -; default value: no 23.112 -; 23.113 -;dynamic_crypt=no 23.114 - 23.115 -; crypt_prefix, what is used for crypting Protocol 23.116 -; 23.117 -; default value: [not set] 23.118 -; 23.119 -;crypt_prefix=** 23.120 - 23.121 -; Keys for cryption, you reference them in the dialplan 23.122 -; later also in dynamic encr. 23.123 -; 23.124 -; default value: [not set] 23.125 -; 23.126 -;crypt_keys=test,muh 23.127 - 23.128 -; users sections: 23.129 -; 23.130 -; name your sections as you which but not "general" ! 23.131 -; the sections are Groups, you can dial out in extensions.conf 23.132 -; with Dial(mISDN/g:extern/101) where extern is a section name, 23.133 -; chan_misdn tries every port in this section to find a 23.134 -; new free channel 23.135 -; 23.136 - 23.137 -; The default section is not a group section, it just contains config elements 23.138 -; which are inherited by group sections. 23.139 -; 23.140 - 23.141 -;[default] 23.142 - 23.143 -; define your default context here 23.144 -; 23.145 -; default value: default 23.146 -; 23.147 -;context=misdn 23.148 - 23.149 -; language 23.150 -; 23.151 -; default value: en 23.152 -; 23.153 -;language=en 23.154 - 23.155 -; 23.156 -; sets the musiconhold class 23.157 -; 23.158 -;musicclass=default 23.159 - 23.160 -; 23.161 -; Either if we should produce DTMF Tones ourselves 23.162 -; 23.163 -;senddtmf=yes 23.164 - 23.165 -; 23.166 -; If we should generate Ringing for chan_sip and others 23.167 -; 23.168 -;far_alerting=no 23.169 - 23.170 - 23.171 -; 23.172 -; here you can define which bearers should be allowed 23.173 -; 23.174 -;allowed_bearers=all 23.175 - 23.176 -; Prefixes for national and international, those are put before the 23.177 -; oad if an according dialplan is set by the other end. 23.178 -; 23.179 -; default values: nationalprefix : 0 23.180 -; internationalprefix : 00 23.181 -; 23.182 -;nationalprefix=0 23.183 -;internationalprefix=00 23.184 - 23.185 -; set rx/tx gains between -8 and 8 to change the RX/TX Gain 23.186 -; 23.187 -; default values: rxgain: 0 23.188 -; txgain: 0 23.189 -; 23.190 -;rxgain=0 23.191 -;txgain=0 23.192 - 23.193 -; some telcos especially in NL seem to need this set to yes, also in 23.194 -; switzerland this seems to be important 23.195 -; 23.196 -; default value: no 23.197 -; 23.198 -;te_choose_channel=no 23.199 - 23.200 - 23.201 - 23.202 -; 23.203 -; This option defines, if chan_misdn should check the L1 on a PMP 23.204 -; before making a group call on it. The L1 may go down for PMP Ports 23.205 -; so we might need this. 23.206 -; But be aware! a broken or plugged off cable might be used for a group call 23.207 -; as well, since chan_misdn has no chance to distinguish if the L1 is down 23.208 -; because of a lost Link or because the Provider shut it down... 23.209 -; 23.210 -; default: no 23.211 -; 23.212 -;pmp_l1_check=no 23.213 - 23.214 - 23.215 -; 23.216 -; in PMP this option defines which cause should be sent out to 23.217 -; the 3. caller. chan_misdn does not support callwaiting on TE 23.218 -; PMP side. This allows to modify the RELEASE_COMPLETE cause 23.219 -; at least. 23.220 -; 23.221 -;reject_cause=16 23.222 - 23.223 - 23.224 -; 23.225 -; Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING), 23.226 -; this requests additional Infos, so we can waitfordigits 23.227 -; without much issues. This works only for PTP Ports 23.228 -; 23.229 -; default value: no 23.230 -; 23.231 -;need_more_infos=no 23.232 - 23.233 - 23.234 -; 23.235 -; set this to yes if you want to disconnect calls when a timeout occurs 23.236 -; for example during the overlapdial phase 23.237 -; 23.238 -;nttimeout=no 23.239 - 23.240 -; set the method to use for channel selection: 23.241 -; standard - always choose the first free channel with the lowest number 23.242 -; round_robin - use the round robin algorithm to select a channel. use this 23.243 -; if you want to balance your load. 23.244 -; 23.245 -; default value: standard 23.246 -; 23.247 -;method=standard 23.248 - 23.249 - 23.250 -; specify if chan_misdn should collect digits before going into the 23.251 -; dialplan, you can choose yes=4 Seconds, no, or specify the amount 23.252 -; of seconds you need; 23.253 -; 23.254 -;overlapdial=yes 23.255 - 23.256 -; 23.257 -; dialplan means Type Of Number in ISDN Terms (for outgoing calls) 23.258 -; 23.259 -; there are different types of the dialplan: 23.260 -; 23.261 -; dialplan -> outgoing Number 23.262 -; localdialplan -> callerid 23.263 -; cpndialplan -> connected party number 23.264 -; 23.265 -; dialplan options: 23.266 -; 23.267 -; 0 - unknown 23.268 -; 1 - International 23.269 -; 2 - National 23.270 -; 4 - Subscriber 23.271 -; 23.272 -; This setting is used for outgoing calls 23.273 -; 23.274 -; default value: 0 23.275 -; 23.276 -;dialplan=0 23.277 -;localdialplan=0 23.278 -;cpndialplan=0 23.279 - 23.280 - 23.281 - 23.282 -; 23.283 -; turn this to no if you don't mind correct handling of Progress Indicators 23.284 -; 23.285 -;early_bconnect=yes 23.286 - 23.287 - 23.288 -; 23.289 -; turn this on if you like to send Tone Indications to a Incoming 23.290 -; isdn channel on a TE Port. Rarely used, only if the Telco allows 23.291 -; you to send indications by yourself, normally the Telco sends the 23.292 -; indications to the remote party. 23.293 -; 23.294 -; default: no 23.295 -; 23.296 -;incoming_early_audio=no 23.297 - 23.298 -; uncomment the following to get into s extension at extension conf 23.299 -; there you can use DigitTimeout if you can't or don't want to use 23.300 -; isdn overlap dial. 23.301 -; note: This will jump into the s exten for every exten! 23.302 -; 23.303 -; default value: no 23.304 -; 23.305 -;always_immediate=no 23.306 - 23.307 -; 23.308 -; set this to yes if you want to generate your own dialtone 23.309 -; with always_immediate=yes, else chan_misdn generates the dialtone 23.310 -; 23.311 -; default value: no 23.312 -; 23.313 -;nodialtone=no 23.314 - 23.315 - 23.316 -; uncomment the following if you want callers which called exactly the 23.317 -; base number (so no extension is set) jump to the s extension. 23.318 -; if the user dials something more it jumps to the correct extension 23.319 -; instead 23.320 -; 23.321 -; default value: no 23.322 -; 23.323 -;immediate=no 23.324 - 23.325 -; uncomment the following to have hold and retrieve support 23.326 -; 23.327 -; default value: no 23.328 -; 23.329 -;hold_allowed=yes 23.330 - 23.331 -; Pickup and Callgroup 23.332 -; 23.333 -; default values: not set = 0 23.334 -; range: 0-63 23.335 -; 23.336 -;callgroup=1 23.337 -;pickupgroup=1 23.338 - 23.339 - 23.340 -; 23.341 -; these are the exact isdn screening and presentation indicators 23.342 -; if -1 is given for both values the presentation indicators are used 23.343 -; from asterisks SetCallerPres application. 23.344 -; s=0, p=0 -> callerid presented not screened 23.345 -; s=1, p=1 -> callerid presented but screened (the remote end does not see it!) 23.346 -; 23.347 -; default values s=-1, p=-1 23.348 -;presentation=-1 23.349 -;screen=-1 23.350 - 23.351 -; this enables echocancellation, with the given number of taps 23.352 -; be aware, move this setting only to outgoing portgroups! 23.353 -; A value of zero turns echocancellation off. 23.354 -; 23.355 -; possible values are: 0,32,64,128,256,yes(=128),no(=0) 23.356 -; 23.357 -; default value: no 23.358 -; 23.359 -;echocancel=no 23.360 - 23.361 -; Set this to no to disable echotraining. You can enter a number > 10 23.362 -; the value is a multiple of 0.125 ms. 23.363 -; 23.364 -; default value: no 23.365 -; yes = 2000 23.366 -; no = 0 23.367 -; 23.368 -;echotraining=no 23.369 - 23.370 -; 23.371 -; chan_misdns jitterbuffer, default 4000 23.372 -; 23.373 -;jitterbuffer=4000 23.374 - 23.375 -; 23.376 -; change this threshold to enable dejitter functionality 23.377 -; 23.378 -;jitterbuffer_upper_threshold=0 23.379 - 23.380 - 23.381 -; 23.382 -; change this to yes, if you want to bridge a mISDN data channel to 23.383 -; another channel type or to an application. 23.384 -; 23.385 -;hdlc=no 23.386 - 23.387 - 23.388 -; 23.389 -; defines the maximum amount of incoming calls per port for 23.390 -; this group. Calls which exceed the maximum will be marked with 23.391 -; the channel variable MAX_OVERFLOW. It will contain the amount of 23.392 -; overflowed calls 23.393 -; 23.394 -;max_incoming=-1 23.395 - 23.396 -; 23.397 -; defines the maximum amount of outgoing calls per port for this group 23.398 -; exceeding calls will be rejected 23.399 -; 23.400 -;max_outgoing=-1 23.401 - 23.402 -;[intern] 23.403 -; define your ports, e.g. 1,2 (depends on mISDN-driver loading order) 23.404 -;ports=1,2 23.405 -; context where to go to when incoming Call on one of the above ports 23.406 -;context=Intern 23.407 - 23.408 -;[internPP] 23.409 -; 23.410 -; adding the postfix 'ptp' to a port number is obsolete now, chan_misdn 23.411 -; parses /etc/misdn-init.conf and sets the ptp mode to the corresponding 23.412 -; configs. For backwards compatibility you can still set ptp here. 23.413 -; 23.414 -;ports=3 23.415 - 23.416 -;[first_extern] 23.417 -; again port defs 23.418 -;ports=4 23.419 -; again a context for incoming calls 23.420 -;context=Extern1 23.421 -; msns for te ports, listen on those numbers on the above ports, and 23.422 -; indicate the incoming calls to asterisk 23.423 -; here you can give a comma separated list or simply an '*' for 23.424 -; any msn. 23.425 -;msns=* 23.426 - 23.427 -; here an example with given msns 23.428 -;[second_extern] 23.429 -;ports=5 23.430 -;context=Extern2 23.431 -;callerid=15 23.432 -;msns=102,144,101,104
24.1 --- a/asterisk/modules.conf Sun Mar 20 19:27:35 2011 +0100 24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 24.3 @@ -1,35 +0,0 @@ 24.4 -; 24.5 -; Asterisk configuration file 24.6 -; 24.7 -; Module Loader configuration file 24.8 -; 24.9 - 24.10 -;[modules] 24.11 -;autoload=yes 24.12 -; 24.13 -; Any modules that need to be loaded before the Asterisk core has been 24.14 -; initialized (just after the logger has been initialized) can be loaded 24.15 -; using 'preload'. This will frequently be needed if you wish to map all 24.16 -; module configuration files into Realtime storage, since the Realtime 24.17 -; driver will need to be loaded before the modules using those configuration 24.18 -; files are initialized. 24.19 -; 24.20 -; An example of loading ODBC support would be: 24.21 -;preload => res_odbc.so 24.22 -;preload => res_config_odbc.so 24.23 -; 24.24 -; Uncomment the following if you wish to use the Speech Recognition API 24.25 -;preload => res_speech.so 24.26 -; 24.27 -; If you want, load the GTK console right away. 24.28 -; 24.29 -;noload => pbx_gtkconsole.so 24.30 -;load => pbx_gtkconsole.so 24.31 -; 24.32 -;load => res_musiconhold.so 24.33 -; 24.34 -; Load either OSS or ALSA, not both 24.35 -; By default, load OSS only (automatically) and do not load ALSA 24.36 -; 24.37 -;noload => chan_alsa.so 24.38 -;noload => chan_oss.so
25.1 --- a/asterisk/musiconhold.conf Sun Mar 20 19:27:35 2011 +0100 25.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 25.3 @@ -1,66 +0,0 @@ 25.4 -; 25.5 -; Music on Hold -- Sample Configuration 25.6 -; 25.7 - 25.8 -; valid mode options: 25.9 -; files -- read files from a directory in any Asterisk supported 25.10 -; media format 25.11 -; quietmp3 -- default 25.12 -; mp3 -- loud 25.13 -; mp3nb -- unbuffered 25.14 -; quietmp3nb -- quiet unbuffered 25.15 -; custom -- run a custom application (See examples below) 25.16 - 25.17 -; ========= 25.18 -; File-based (native) music on hold 25.19 -; ========= 25.20 -; 25.21 -; This plays files directly from the specified directory, no external 25.22 -; processes are required. Files are played in normal sorting order 25.23 -; (same as a sorted directory listing), and no volume or other 25.24 -; sound adjustments are available. If the file is available in 25.25 -; the same format as the channel's codec, then it will be played 25.26 -; without transcoding (same as Playback would do in the dialplan). 25.27 -; Files can be present in as many formats as you wish, and the 25.28 -; 'best' format will be chosen at playback time. 25.29 -; 25.30 -; NOTE: 25.31 -; If you are not using "autoload" in modules.conf, then you 25.32 -; must ensure that the format modules for any formats you wish 25.33 -; to use are loaded _before_ res_musiconhold. If you do not do 25.34 -; this, res_musiconhold will skip the files it is not able to 25.35 -; understand when it loads. 25.36 -; 25.37 - 25.38 -;[default] 25.39 -;mode=files 25.40 -;directory=/var/lib/asterisk/moh 25.41 -; 25.42 -;[native-random] 25.43 -;mode=files 25.44 -;directory=/var/lib/asterisk/moh 25.45 -;random=yes ; Play the files in a random order 25.46 - 25.47 - 25.48 -; ========= 25.49 -; Other (non-native) playback methods 25.50 -; ========= 25.51 - 25.52 -;[manual] 25.53 -;mode=custom 25.54 -; Note that with mode=custom, a directory is not required, such as when reading 25.55 -; from a stream. 25.56 -;directory=/var/lib/asterisk/mohmp3 25.57 -;application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s 25.58 - 25.59 -;[ulawstream] 25.60 -;mode=custom 25.61 -;application=/usr/bin/streamplayer 192.168.100.52 888 25.62 -;format=ulaw 25.63 - 25.64 -; mpg123 on Solaris does not always exit properly; madplay may be a better 25.65 -; choice 25.66 -;[solaris] 25.67 -;mode=custom 25.68 -;directory=/var/lib/asterisk/mohmp3 25.69 -;application=/site/sw/bin/madplay -Q -o raw:- --mono -R 8000 -a -12
26.1 --- a/asterisk/privacy.conf Sun Mar 20 19:27:35 2011 +0100 26.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 26.3 @@ -1,3 +0,0 @@ 26.4 -;[general] 26.5 - 26.6 -;maxretries = 2 ;How many chances the caller has to enter their number
27.1 --- a/asterisk/rc.asterisk Sun Mar 20 19:27:35 2011 +0100 27.2 +++ b/asterisk/rc.asterisk Sun Mar 20 20:00:02 2011 +0100 27.3 @@ -5,6 +5,7 @@ 27.4 27.5 %config 27.6 asterisk_enable="$openpkg_rc_def" 27.7 + asterisk_nice="-5" 27.8 asterisk_flags="" 27.9 asterisk_log_prolog="true" 27.10 asterisk_log_epilog="true" 27.11 @@ -25,7 +26,7 @@ 27.12 %start -u @l_susr@ 27.13 rcService asterisk enable yes || exit 0 27.14 rcService asterisk active yes && exit 0 27.15 - @l_prefix@/sbin/asterisk ${asterisk_flags} 27.16 + nice -n $asterisk_nice @l_prefix@/sbin/asterisk ${asterisk_flags} 27.17 27.18 %stop -u @l_susr@ 27.19 rcService asterisk enable yes || exit 0
28.1 --- a/asterisk/rpt.conf Sun Mar 20 19:27:35 2011 +0100 28.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 28.3 @@ -1,193 +0,0 @@ 28.4 -; Radio Repeater / Remote Base configuration file (for use with app_rpt) 28.5 -; As of app_rpt version 0.39, 12/20/2005 28.6 -; 28.7 - 28.8 -;[000] ; Node ID of first repeater 28.9 - 28.10 -;rxchannel = Zap/1 ; Rx audio/signalling channel 28.11 -; Note: if you use a unified interface (tx/rx on one channel), only 28.12 -; specify the rxchannel and the txchannel will be assumed from the rxchannel 28.13 -;txchannel = Zap/2 ; Tx audio/signalling channel 28.14 -;duplex = 2 ; (Optional) set duplex operating mode 28.15 -;; 0 = half duplex (telemetry and courtesy tones do not transmit) 28.16 -;; 1 = semi-half duplex (telemetry and courtesy tones transmit, but not 28.17 -;; repeated audio 28.18 -;; 2 = normal full-duplex mode (Default) 28.19 -;; 3 = full-duplex mode, without repeated audio from main input source 28.20 -;functions = functions-repeater ; DTMF function list 28.21 -;; specify this for a different function list then local when on link 28.22 -;;link_functions = functions-different ; DTMF function list for link 28.23 -;;phone_functions = functions-phone ; (optional) different functions for 'P' mode 28.24 -;;dphone_functions = functions-dphone ; (optional) different functions for 'D' mode 28.25 -;;nodes = nodes-different ; (optional) different node list 28.26 -;tonezone = us ; use US tones (default) 28.27 -;context = default ; dialing context for phone 28.28 -;callerid = "WB6NIL Repeater" <(213) 555-0123> ; Callerid for phone calls 28.29 -;idrecording = wb6nil ; id recording 28.30 -;accountcode=RADIO ; account code (optional) 28.31 -;funcchar = * ; function lead-in character (defaults to '*') 28.32 -;endchar = # ; command mode end character (defaults to '#') 28.33 -;;nobusyout=yes ; (optional) Do not busy-out reverse-patch when 28.34 - ; normal patch in use 28.35 -;hangtime=1000 ; squelch tail hang time (in ms) (optional) 28.36 -;totime=100000 ; transmit time-out time (in ms) (optional) 28.37 -;idtime=30000 ; id interval time (in ms) (optional) 28.38 -;politeid=30000 ; time in milliseconds before ID timer 28.39 - ; expires to try and ID in the tail. 28.40 - ; (optional, default is 30000). 28.41 -;idtalkover=|iwb6nil/rpt ; Talkover ID (optional) default is none 28.42 -;unlinkedct=ct2 ; unlinked courtesy tone (optional) default is none 28.43 - 28.44 -;; The tailmessagetime,tailsquashedtime, and tailmessages need to be set 28.45 -;; to support tail messages. They can be omitted otherwise. 28.46 -;tailmessagetime=300000 ; Play a tail message every 5 mins 28.47 -;tailsquashedtime=30000 ; If squashed by another user, 28.48 -;; try again after 30 seconds 28.49 -;tailmessages=msg1,msg2,msg3 ;list of messages to be played for tail message 28.50 - 28.51 -; The default values for hangtime, time-out time, and id interval time are 28.52 -; 5 seconds (5000 ms), 3 minutes (180000 ms), and 5 minutes (300000 ms) 28.53 -; respectively 28.54 - 28.55 -;[001] ; Node ID of first repeater 28.56 - 28.57 -;rxchannel = Zap/3 ; Rx audio/signalling channel 28.58 -; Note: if you use a unified interface (tx/rx on one channel), only 28.59 -; specify the rxchannel and the txchannel will be assumed from the rxchannel 28.60 -;txchannel = Zap/4 ; Tx audio/signalling channel 28.61 -;functions = functions-repeater ; DTMF function list 28.62 -;; specify this for a different function list then local when on link 28.63 -;;link_functions = functions-different ; DTMF function list for link 28.64 -;;phone_functions = functions-phone ; (optional) different functions for 'P' mode 28.65 -;;dphone_functions = functions-dphone ; (optional) different functions for 'D' mode 28.66 -;;nodes = nodes-different ; (optional) different node list 28.67 -;tonezone = us ; use US tones (default) 28.68 -;context = default ; dialing context for phone 28.69 -;callerid = "WB6NIL Repeater" <(213) 555-0123> ; Callerid for phone calls 28.70 -;idrecording = wb6nil ; id recording 28.71 -;accountcode=RADIO ; account code (optional) 28.72 -;funcchar = * ; function lead-in character (defaults to '*') 28.73 -;endchar = # ; command mode end character (defaults to '#') 28.74 -;;nobusyout=yes ; (optional) Do not busy-out reverse-patch when 28.75 - ; normal patch in use 28.76 -;hangtime=1000 ; squelch tail hang time (in ms) (optional) 28.77 -;totime=100000 ; transmit time-out time (in ms) (optional) 28.78 -;idtime=30000 ; id interval time (in ms) (optional) 28.79 -;politeid=30000 ; time in milliseconds before ID timer 28.80 - ; expires to try and ID in the tail. 28.81 - ; (optional, default is 30000). 28.82 -;idtalkover=|iwb6nil/rpt ; Talkover ID (optional) default is none 28.83 -;unlinkedct=ct2 ; unlinked courtesy tone (optional) default is none 28.84 - 28.85 -;[002] ; Node ID of remote base 28.86 - 28.87 -;rxchannel = Zap/5 ; Rx audio/signalling channel 28.88 -; Note: if you use a unified interface (tx/rx on one channel), only 28.89 -; specify the rxchannel and the txchannel will be assumed from the rxchannel 28.90 -;txchannel = Zap/6 ; Tx audio/signalling channel 28.91 -;functions = functions-remote 28.92 -;remote = ft897 ; Set remote=y for dumb remote or 28.93 - ; remote=ft897 for Yaesu FT-897 or 28.94 - ; remote=rbi for Doug Hall RBI1 28.95 -;iobase = 0x378 ; Specify IO port for parallel port (optional) 28.96 - 28.97 -;[functions-repeater] 28.98 -;1=ilink,1 ; Specific link disconnect 28.99 -;2=ilink,2 ; Specific Link connect - monitor only 28.100 -;3=ilink,3 ; Specific Link connect - transceive 28.101 -;4=ilink,4 ; Enter command mode on a specific link 28.102 -;7=ilink,5 ; Link status 28.103 -;;XX=ilink,6 ; Disconnect all links (not used here) 28.104 - 28.105 -;80=status,1 ; System info 28.106 -;81=status,2 ; Time 28.107 -;82=status,3 ; app_rpt.c Version 28.108 - 28.109 -;6=autopatchup ; Autopatch up 28.110 -;0=autopatchdn ; Autopatch down 28.111 - 28.112 -;90=cop,1 ; System warm boot 28.113 -;91=cop,2 ; System enable 28.114 -;92=cop,3 ; System disable 28.115 - 28.116 -;[functions-remote] 28.117 - 28.118 -;0=remote,1 ; Retrieve Memory 28.119 -;1=remote,2 ; Set freq. 28.120 -;2=remote,3 ; Set Rx PL tone. 28.121 -;40=remote,100 ; Rx PL off 28.122 -;41=remote,101 ; Rx PL on 28.123 -;42=remote,102 ; Tx PL off 28.124 -;43=remote,103 ; Tx PL on 28.125 -;44=remote,104 ; Low Pwr 28.126 -;45=remote,105 ; Med Pwr 28.127 -;46=remote,106 ; Hi Pwr 28.128 -;5=remote,5 ; Status 28.129 - 28.130 -;[telemetry] 28.131 - 28.132 -; Telemetry entries are shared across all repeaters 28.133 -; Can be a tone sequence, morse string, or a file 28.134 -; 28.135 -; |t - Tone escape sequence 28.136 -; 28.137 -; Tone sequences consist of 1 or more 4-tuple entries (freq1, freq2, duration, amplitude) 28.138 -; Single frequencies are created by setting freq1 or freq2 to zero. 28.139 -; 28.140 -; |m - Morse escape sequence 28.141 -; 28.142 -; Sends Morse code at the telemetry amplitude and telemetry frequency as defined in the 28.143 -; [morse] section. 28.144 -; 28.145 -; Follow with an alphanumeric string 28.146 -; 28.147 -; |i - Morse ID escape sequence 28.148 -; 28.149 -; Sends Morse code at the ID amplitude and ID frequency as defined in the 28.150 -; [morse] section. 28.151 -; 28.152 -; Follow with an alphanumeric string 28.153 - 28.154 - 28.155 -;ct1=|t(350,0,100,2048)(500,0,100,2048)(660,0,100,2048) 28.156 -;ct2=|t(660,880,150,2048) 28.157 -;ct3=|t(440,0,150,2048) 28.158 -;ct4=|t(550,0,150,2048) 28.159 -;ct5=|t(660,0,150,2048) 28.160 -;ct6=|t(880,0,150,2048) 28.161 -;ct7=|t(660,440,150,2048) 28.162 -;ct8=|t(700,1100,150,2048) 28.163 -;remotetx=|t(2000,0,75,2048)(0,0,75,0)(1600,0,75,2048); 28.164 -;remotemon=|t(1600,0,75,2048) 28.165 -;cmdmode=|t(900,903,200,2048) 28.166 -;functcomplete=|t(1000,0,100,2048)(0,0,100,0)(1000,0,100,2048) 28.167 - 28.168 - 28.169 -;[morse] 28.170 - 28.171 -;speed=20 ; Approximate speed in WPM 28.172 -;frequency=800 ; Morse Telemetry Frequency 28.173 -;amplitude=4096 ; Morse Telemetry Amplitude 28.174 -;idfrequency=330 ; Morse ID Frequency 28.175 -;idamplitude=2048 ; Morse ID Amplitude 28.176 - 28.177 -;[nodes] 28.178 - 28.179 -;000 = context_A@foo.bar.com/1234,foo.bar.com 28.180 -;001 = context_B@baz.waldo.com/4321,baz.waldo.com 28.181 -;002 = context_C@pepper.salt.com/5678,pepper.salt.com,y ; this is a remote 28.182 - 28.183 -;of course, you can also specify these with domain names, but why rely 28.184 -;on DNS working unnecessarily? 28.185 - 28.186 -;[memory] 28.187 - 28.188 -;; this example gives you 146.460, simplex, 100.0 HZ PL, hi-power, transmit PL 28.189 -;00 = 146.460,100.0,sht 28.190 -;; this example gives you 146.940, minus offset, 100.0 HZ PL, low-power, no PL 28.191 -;01 = 146.940,100.0,-l 28.192 - 28.193 -; The format for these entries is: Receive-Freq,Receive-PL,Attrbutes 28.194 -; Attributes: l=low power, m=medium power, h=high power, -=minus offset, 28.195 -; s=simplex, +=plus offset, t=tx PL enable, r=rx PL enable 28.196 -
29.1 --- a/asterisk/rtp.conf Sun Mar 20 19:27:35 2011 +0100 29.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 29.3 @@ -1,22 +0,0 @@ 29.4 -; 29.5 -; RTP Configuration 29.6 -; 29.7 -;[general] 29.8 -; 29.9 -; RTP start and RTP end configure start and end addresses 29.10 -; 29.11 -; Defaults are rtpstart=5000 and rtpend=31000 29.12 -; 29.13 -;rtpstart=10000 29.14 -;rtpend=20000 29.15 -; 29.16 -; Whether to enable or disable UDP checksums on RTP traffic 29.17 -; 29.18 -;rtpchecksums=no 29.19 -; 29.20 -; The amount of time a DTMF digit with no 'end' marker should be 29.21 -; allowed to continue (in 'samples', 1/8000 of a second) 29.22 -; 29.23 -;dtmftimeout=3000 29.24 -; rtcpinterval = 5000 ; Milliseconds between rtcp reports 29.25 - ;(min 500, max 60000, default 5000)
30.1 --- a/asterisk/say.conf Sun Mar 20 19:27:35 2011 +0100 30.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 30.3 @@ -1,171 +0,0 @@ 30.4 -; say.conf 30.5 -; 30.6 -; language configuration 30.7 -; 30.8 -; The new language routines produce strings of the form 30.9 -; prefix:[format:]data 30.10 -; that are matched against the rules in this file to produce 30.11 -; an output. 30.12 -; 30.13 -; The data is generally the string to be spelled (either a number, 30.14 -; an ascii string or a date/time in the format specified below). 30.15 -; It is available, in the right hand side of a rule, as variable ${SAY}. 30.16 -; 30.17 -; The format is optional and normally used only for date/time. 30.18 -; The prefix is used to select the pronunciation - standard 30.19 -; prefixes are 30.20 -; num used for numbers 30.21 -; enum used for enumerations 30.22 -; date for dates 30.23 -; time for times 30.24 -; datetime for dates and times 30.25 -; char for character strings 30.26 -; phonetic for phonetic strings 30.27 -; digit for digit strings 30.28 -; 30.29 -; but others can be used at will. 30.30 -; 30.31 -; Processing occurs as follows: 30.32 -; If the format is empty, or there is no format, the entire 30.33 -; string is matched against one of the pattern on the left hand side. 30.34 -; On the first match, the various comma-separated components on the right 30.35 -; hand side are pronounced, as follows: 30.36 -; + a component starting with a prefix: (i.e. with a ':' in it) 30.37 -; is re-processed according to these rules; 30.38 -; + a component without a ':' in it is considered a filename and 30.39 -; the corresponding file is played. 30.40 -; 30.41 -; If the format is non-empty, the format is split into its components 30.42 -; (individual characters, or filenames in single quotes), and then 30.43 -; filenames are played, whereas single characters are used to 30.44 -; generate a new string format:pat:data to be processed. 30.45 -; 30.46 -; DATES/AND TIMES assume that the date info is available in 30.47 -; the form YYYYMMDDHHmm.ss-dow-doy 30.48 -; with 4 digits for the year, 2 for month, day, hour, minutes, seconds, 30.49 -; one digit for the day-of-week, and 3 digits for the day-of-year. 30.50 -; 30.51 -; Example: 30.52 -; datetime::200604172030.00-4-102 30.53 -; (typical format for a date) is first matched against the line 30.54 -; datetime::. => date:AdBY 'digits/at' IMp:${SAY} 30.55 -; which is normally present with the default format for dates. 30.56 -; In turn, the format string "AdBY 'digits/at' IMp" results in 30.57 -; the sequence 30.58 -; date:A:200604172030.00-4-102 30.59 -; date:d:200604172030.00-4-102 30.60 -; date:B:200604172030.00-4-102 30.61 -; date:Y:200604172030.00-4-102 30.62 -; digits/at 30.63 -; date:I:200604172030.00-4-102 30.64 -; date:M:200604172030.00-4-102 30.65 -; date:p:200604172030.00-4-102 30.66 -; 30.67 -; 30.68 -; Remember, normally X Z N are special, and the search is 30.69 -; case insensitive, so you must use [X] [N] [Z] .. if you 30.70 -; want exact match. 30.71 - 30.72 -; We start with the basic rules that might be more-or-less 30.73 -; language-independent 30.74 - 30.75 -[digit-base](!) ; base rule for digit strings 30.76 - ; XXX incomplete yet 30.77 - _digit:[0-9] => digits/${SAY} 30.78 - _digit:[-] => letters/dash 30.79 - _digit:[*] => letters/star 30.80 - _digit:[@] => letters/at 30.81 - _digit:[0-9]. => digit:${SAY:0:1}, digit:${SAY:1} 30.82 - 30.83 -[date-base](!) ; base rules for dates and times 30.84 - ; the 'SAY' variable contains YYYYMMDDHHmm.ss-dow-doy 30.85 - ; these rule map the strftime attributes. 30.86 - _date:Y:. => num:${SAY:0:4} ; year, 19xx 30.87 - _date:[Bb]:. => digits/mon-$[${SAY:4:2}-1] ; month name, 0..11 30.88 - _date:[Aa]:. => digits/day-${SAY:16:1} ; day of week 30.89 - _date:[de]:. => num:${SAY:6:2} ; day of month 30.90 - _date:[hH]:. => num:${SAY:8:2} ; hour 30.91 - _date:[I]:. => num:$[${SAY:8:2} % 12] ; hour 0-12 30.92 - _date:[M]:. => num:${SAY:10:2} ; minute 30.93 - ; XXX too bad the '?' function does not remove the quotes 30.94 - ; _date:[pP]:. => digits/$[ ${SAY:10:2} > 12 ? "p-m" :: "a-m"] ; am pm 30.95 - _date:[pP]:. => digits/p-m ; am pm 30.96 - _date:[S]:. => num:${SAY:13:2} ; seconds 30.97 - 30.98 -[en-base](!) 30.99 - _[n]um:0. => num:${SAY:1} 30.100 - _[n]um:X => digits/${SAY} 30.101 - _[n]um:1X => digits/${SAY} 30.102 - _[n]um:[2-9]0 => digits/${SAY} 30.103 - _[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1} 30.104 - _[n]um:XXX => num:${SAY:0:1}, digits/hundred, num:${SAY:1} 30.105 - 30.106 - _[n]um:XXXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1} 30.107 - _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2} 30.108 - _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3} 30.109 - 30.110 - _[n]um:XXXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1} 30.111 - _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2} 30.112 - _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3} 30.113 - 30.114 - _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1} 30.115 - _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2} 30.116 - _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3} 30.117 - 30.118 - ; enumeration 30.119 - _e[n]um:X => digits/h-${SAY} 30.120 - _e[n]um:1X => digits/h-${SAY} 30.121 - _e[n]um:[2-9]0 => digits/h-${SAY} 30.122 - _e[n]um:[2-9][1-9] => num:${SAY:0:1}0, digits/h-${SAY:1} 30.123 - _e[n]um:[1-9]XX => num:${SAY:0:1}, digits/hundred, enum:${SAY:1} 30.124 - 30.125 -[it](digit-base,date-base) 30.126 - _[n]um:0. => num:${SAY:1} 30.127 - _[n]um:X => digits/${SAY} 30.128 - _[n]um:1X => digits/${SAY} 30.129 - _[n]um:[2-9]0 => digits/${SAY} 30.130 - _[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1} 30.131 - _[n]um:1XX => digits/hundred, num:${SAY:1} 30.132 - _[n]um:[2-9]XX => num:${SAY:0:1}, digits/hundred, num:${SAY:1} 30.133 - 30.134 - _[n]um:1XXX => digits/thousand, num:${SAY:1} 30.135 - _[n]um:[2-9]XXX => num:${SAY:0:1}, digits/thousands, num:${SAY:1} 30.136 - _[n]um:XXXXX => num:${SAY:0:2}, digits/thousands, num:${SAY:2} 30.137 - _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousands, num:${SAY:3} 30.138 - 30.139 - _[n]um:1XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1} 30.140 - _[n]um:[2-9]XXXXXX => num:${SAY:0:1}, digits/millions, num:${SAY:1} 30.141 - _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2} 30.142 - _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3} 30.143 - 30.144 - _datetime::. => date:AdBY 'digits/at' IMp:${SAY} 30.145 - _date::. => date:AdBY:${SAY} 30.146 - _time::. => date:IMp:${SAY} 30.147 - 30.148 -[en](en-base,date-base,digit-base) 30.149 - _datetime::. => date:AdBY 'digits/at' IMp:${SAY} 30.150 - _date::. => date:AdBY:${SAY} 30.151 - _time::. => date:IMp:${SAY} 30.152 - 30.153 -[de](date-base,digit-base) 30.154 - _[n]um:0. => num:${SAY:1} 30.155 - _[n]um:X => digits/${SAY} 30.156 - _[n]um:1X => digits/${SAY} 30.157 - _[n]um:[2-9]0 => digits/${SAY} 30.158 - _[n]um:[2-9][1-9] => digits/${SAY:1}-and, digits/${SAY:0:1}0 30.159 - _[n]um:1XX => digits/ein, digits/hundred, num:${SAY:1} 30.160 - _[n]um:[2-9]XX => digits/${SAY:0:1}, digits/hundred, num:${SAY:1} 30.161 - _[n]um:1XXX => digits/ein, digits/thousand, num:${SAY:1} 30.162 - _[n]um:[2-9]XXX => digits/${SAY:0:1}, digits/thousand, num:${SAY:1} 30.163 - _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2} 30.164 - _[n]um:X00XXX => digits/${SAY:0:1}, digits/hundred, digits/thousand, num:${SAY:3} 30.165 - _[n]um:XXXXXX => digits/${SAY:0:1}, digits/hundred, num:${SAY:1} 30.166 - _[n]um:1XXXXXX => digits/eine, digits/million, num:${SAY:1} 30.167 - _[n]um:[2-9]XXXXXX => digits/${SAY:0:1}, digits/millions, num:${SAY:1} 30.168 - _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2} 30.169 - _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3} 30.170 - 30.171 - _datetime::. => date:AdBY 'digits/at' IMp:${SAY} 30.172 - _date::. => date:AdBY:${SAY} 30.173 - _time::. => date:IMp:${SAY} 30.174 -
31.1 --- a/asterisk/sip.conf Sun Mar 20 19:27:35 2011 +0100 31.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 31.3 @@ -1,664 +0,0 @@ 31.4 -; 31.5 -; SIP Configuration example for Asterisk 31.6 -; 31.7 -; Syntax for specifying a SIP device in extensions.conf is 31.8 -; SIP/devicename where devicename is defined in a section below. 31.9 -; 31.10 -; You may also use 31.11 -; SIP/username@domain to call any SIP user on the Internet 31.12 -; (Don't forget to enable DNS SRV records if you want to use this) 31.13 -; 31.14 -; If you define a SIP proxy as a peer below, you may call 31.15 -; SIP/proxyhostname/user or SIP/user@proxyhostname 31.16 -; where the proxyhostname is defined in a section below 31.17 -; 31.18 -; Useful CLI commands to check peers/users: 31.19 -; sip show peers Show all SIP peers (including friends) 31.20 -; sip show users Show all SIP users (including friends) 31.21 -; sip show registry Show status of hosts we register with 31.22 -; 31.23 -; sip debug Show all SIP messages 31.24 -; 31.25 -; reload chan_sip.so Reload configuration file 31.26 -; Active SIP peers will not be reconfigured 31.27 -; 31.28 - 31.29 -;[general] 31.30 -;context=default ; Default context for incoming calls 31.31 -;allowguest=no ; Allow or reject guest calls (default is yes) 31.32 -;allowoverlap=no ; Disable overlap dialing support. (Default is yes) 31.33 -;allowtransfer=no ; Disable all transfers (unless enabled in peers or users) 31.34 - ; Default is enabled 31.35 -;realm=mydomain.tld ; Realm for digest authentication 31.36 - ; defaults to "asterisk". If you set a system name in 31.37 - ; asterisk.conf, it defaults to that system name 31.38 - ; Realms MUST be globally unique according to RFC 3261 31.39 - ; Set this to your host name or domain name 31.40 -;bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) 31.41 - ; bindport is the local UDP port that Asterisk will listen on 31.42 -;bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) 31.43 -;srvlookup=yes ; Enable DNS SRV lookups on outbound calls 31.44 - ; Note: Asterisk only uses the first host 31.45 - ; in SRV records 31.46 - ; Disabling DNS SRV lookups disables the 31.47 - ; ability to place SIP calls based on domain 31.48 - ; names to some other SIP users on the Internet 31.49 - 31.50 -;domain=mydomain.tld ; Set default domain for this host 31.51 - ; If configured, Asterisk will only allow 31.52 - ; INVITE and REFER to non-local domains 31.53 - ; Use "sip show domains" to list local domains 31.54 -;pedantic=yes ; Enable checking of tags in headers, 31.55 - ; international character conversions in URIs 31.56 - ; and multiline formatted headers for strict 31.57 - ; SIP compatibility (defaults to "no") 31.58 - 31.59 -; See doc/README.tos for a description of these parameters. 31.60 -;tos_sip=cs3 ; Sets TOS for SIP packets. 31.61 -;tos_audio=ef ; Sets TOS for RTP audio packets. 31.62 -;tos_video=af41 ; Sets TOS for RTP video packets. 31.63 - 31.64 -;maxexpiry=3600 ; Maximum allowed time of incoming registrations 31.65 - ; and subscriptions (seconds) 31.66 -;minexpiry=60 ; Minimum length of registrations/subscriptions (default 60) 31.67 -;defaultexpiry=120 ; Default length of incoming/outgoing registration 31.68 -;t1min=100 ; Minimum roundtrip time for messages to monitored hosts 31.69 - ; Defaults to 100 ms 31.70 -;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY 31.71 -;checkmwi=10 ; Default time between mailbox checks for peers 31.72 -;buggymwi=no ; Cisco SIP firmware doesn't support the MWI RFC 31.73 - ; fully. Enable this option to not get error messages 31.74 - ; when sending MWI to phones with this bug. 31.75 -;vmexten=voicemail ; dialplan extension to reach mailbox sets the 31.76 - ; Message-Account in the MWI notify message 31.77 - ; defaults to "asterisk" 31.78 -;disallow=all ; First disallow all codecs 31.79 -;allow=ulaw ; Allow codecs in order of preference 31.80 -;allow=ilbc ; see doc/rtp-packetization for framing options 31.81 -; 31.82 -; This option specifies a preference for which music on hold class this channel 31.83 -; should listen to when put on hold if the music class has not been set on the 31.84 -; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer 31.85 -; channel putting this one on hold did not suggest a music class. 31.86 -; 31.87 -; This option may be specified globally, or on a per-user or per-peer basis. 31.88 -; 31.89 -;mohinterpret=default 31.90 -; 31.91 -; This option specifies which music on hold class to suggest to the peer channel 31.92 -; when this channel places the peer on hold. It may be specified globally or on 31.93 -; a per-user or per-peer basis. 31.94 -; 31.95 -;mohsuggest=default 31.96 -; 31.97 -;language=en ; Default language setting for all users/peers 31.98 - ; This may also be set for individual users/peers 31.99 -;relaxdtmf=yes ; Relax dtmf handling 31.100 -;trustrpid = no ; If Remote-Party-ID should be trusted 31.101 -;sendrpid = yes ; If Remote-Party-ID should be sent 31.102 -;progressinband=never ; If we should generate in-band ringing always 31.103 - ; use 'never' to never use in-band signalling, even in cases 31.104 - ; where some buggy devices might not render it 31.105 - ; Valid values: yes, no, never Default: never 31.106 -;useragent=Asterisk PBX ; Allows you to change the user agent string 31.107 -;promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address 31.108 - ; Note that promiscredir when redirects are made to the 31.109 - ; local system will cause loops since Asterisk is incapable 31.110 - ; of performing a "hairpin" call. 31.111 -;usereqphone = no ; If yes, ";user=phone" is added to uri that contains 31.112 - ; a valid phone number 31.113 -;dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833 31.114 - ; Other options: 31.115 - ; info : SIP INFO messages 31.116 - ; inband : Inband audio (requires 64 kbit codec -alaw, ulaw) 31.117 - ; auto : Use rfc2833 if offered, inband otherwise 31.118 - 31.119 -;compactheaders = yes ; send compact sip headers. 31.120 -; 31.121 -;videosupport=yes ; Turn on support for SIP video. You need to turn this on 31.122 - ; in the this section to get any video support at all. 31.123 - ; You can turn it off on a per peer basis if the general 31.124 - ; video support is enabled, but you can't enable it for 31.125 - ; one peer only without enabling in the general section. 31.126 -;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s) 31.127 - ; Videosupport and maxcallbitrate is settable 31.128 - ; for peers and users as well 31.129 -;callevents=no ; generate manager events when sip ua 31.130 - ; performs events (e.g. hold) 31.131 -;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected, 31.132 - ; for any reason, always reject with '401 Unauthorized' 31.133 - ; instead of letting the requester know whether there was 31.134 - ; a matching user or peer for their request 31.135 - 31.136 -;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing 31.137 - ; order instead of RFC3551 packing order (this is required 31.138 - ; for Sipura and Grandstream ATAs, among others). This is 31.139 - ; contrary to the RFC3551 specification, the peer _should_ 31.140 - ; be negotiating AAL2-G726-32 instead :-( 31.141 - 31.142 -;matchexterniplocally = yes ; Only substitute the externip or externhost setting if it matches 31.143 - ; your localnet setting. Unless you have some sort of strange network 31.144 - ; setup you will not need to enable this. 31.145 - 31.146 -; 31.147 -; If regcontext is specified, Asterisk will dynamically create and destroy a 31.148 -; NoOp priority 1 extension for a given peer who registers or unregisters with 31.149 -; us and have a "regexten=" configuration item. 31.150 -; Multiple contexts may be specified by separating them with '&'. The 31.151 -; actual extension is the 'regexten' parameter of the registering peer or its 31.152 -; name if 'regexten' is not provided. If more than one context is provided, 31.153 -; the context must be specified within regexten by appending the desired 31.154 -; context after '@'. More than one regexten may be supplied if they are 31.155 -; separated by '&'. Patterns may be used in regexten. 31.156 -; 31.157 -;regcontext=sipregistrations 31.158 -; 31.159 -;--------------------------- RTP timers ---------------------------------------------------- 31.160 -; These timers are currently used for both audio and video streams. The RTP timeouts 31.161 -; are only applied to the audio channel. 31.162 -; The settings are settable in the global section as well as per device 31.163 -; 31.164 -;rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity 31.165 - ; on the audio channel 31.166 - ; when we're not on hold. This is to be able to hangup 31.167 - ; a call in the case of a phone disappearing from the net, 31.168 - ; like a powerloss or grandma tripping over a cable. 31.169 -;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity 31.170 - ; on the audio channel 31.171 - ; when we're on hold (must be > rtptimeout) 31.172 -;rtpkeepalive=<secs> ; Send keepalives in the RTP stream to keep NAT open 31.173 - ; (default is off - zero) 31.174 -;--------------------------- SIP DEBUGGING --------------------------------------------------- 31.175 -;sipdebug = yes ; Turn on SIP debugging by default, from 31.176 - ; the moment the channel loads this configuration 31.177 -;recordhistory=yes ; Record SIP history by default 31.178 - ; (see sip history / sip no history) 31.179 -;dumphistory=yes ; Dump SIP history at end of SIP dialogue 31.180 - ; SIP history is output to the DEBUG logging channel 31.181 - 31.182 - 31.183 -;--------------------------- STATUS NOTIFICATIONS (SUBSCRIPTIONS) ---------------------------- 31.184 -; You can subscribe to the status of extensions with a "hint" priority 31.185 -; (See extensions.conf.sample for examples) 31.186 -; chan_sip support two major formats for notifications: dialog-info and SIMPLE 31.187 -; 31.188 -; You will get more detailed reports (busy etc) if you have a call limit set 31.189 -; for a device. When the call limit is filled, we will indicate busy. Note that 31.190 -; you need at least 2 in order to be able to do attended transfers. 31.191 -; 31.192 -; For queues, you will need this level of detail in status reporting, regardless 31.193 -; if you use SIP subscriptions. Queues and manager use the same internal interface 31.194 -; for reading status information. 31.195 -; 31.196 -; Note: Subscriptions does not work if you have a realtime dialplan and use the 31.197 -; realtime switch. 31.198 -; 31.199 -;allowsubscribe=no ; Disable support for subscriptions. (Default is yes) 31.200 -;subscribecontext = default ; Set a specific context for SUBSCRIBE requests 31.201 - ; Useful to limit subscriptions to local extensions 31.202 - ; Settable per peer/user also 31.203 -;notifyringing = yes ; Notify subscriptions on RINGING state (default: no) 31.204 -;notifyhold = yes ; Notify subscriptions on HOLD state (default: no) 31.205 - ; Turning on notifyringing and notifyhold will add a lot 31.206 - ; more database transactions if you are using realtime. 31.207 -;limitonpeers = yes ; Apply call limits on peers only. This will improve 31.208 - ; status notification when you are using type=friend 31.209 - ; Inbound calls, that really apply to the user part 31.210 - ; of a friend will now be added to and compared with 31.211 - ; the peer limit instead of applying two call limits, 31.212 - ; one for the peer and one for the user. 31.213 - ; "sip show inuse" will only show active calls on 31.214 - ; the peer side of a "type=friend" object if this 31.215 - ; setting is turned on. 31.216 - 31.217 -;----------------------------------------- T.38 FAX PASSTHROUGH SUPPORT ----------------------- 31.218 -; 31.219 -; This setting is available in the [general] section as well as in device configurations. 31.220 -; Setting this to yes, enables T.38 fax (UDPTL) passthrough on SIP to SIP calls, provided 31.221 -; both parties have T38 support enabled in their Asterisk configuration 31.222 -; This has to be enabled in the general section for all devices to work. You can then 31.223 -; disable it on a per device basis. 31.224 -; 31.225 -; T.38 faxing only works in SIP to SIP calls, with no local or agent channel being used. 31.226 -; 31.227 -; t38pt_udptl = yes ; Default false 31.228 -; 31.229 -;----------------------------------------- OUTBOUND SIP REGISTRATIONS ------------------------ 31.230 -; Asterisk can register as a SIP user agent to a SIP proxy (provider) 31.231 -; Format for the register statement is: 31.232 -; register => user[:secret[:authuser]]@host[:port][/extension] 31.233 -; 31.234 -; If no extension is given, the 's' extension is used. The extension needs to 31.235 -; be defined in extensions.conf to be able to accept calls from this SIP proxy 31.236 -; (provider). 31.237 -; 31.238 -; host is either a host name defined in DNS or the name of a section defined 31.239 -; below. 31.240 -; 31.241 -; Examples: 31.242 -; 31.243 -;register => 1234:password@mysipprovider.com 31.244 -; 31.245 -; This will pass incoming calls to the 's' extension 31.246 -; 31.247 -; 31.248 -;register => 2345:password@sip_proxy/1234 31.249 -; 31.250 -; Register 2345 at sip provider 'sip_proxy'. Calls from this provider 31.251 -; connect to local extension 1234 in extensions.conf, default context, 31.252 -; unless you configure a [sip_proxy] section below, and configure a 31.253 -; context. 31.254 -; Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com] 31.255 -; Tip 2: Use separate type=peer and type=user sections for SIP providers 31.256 -; (instead of type=friend) if you have calls in both directions 31.257 - 31.258 -;registertimeout=20 ; retry registration calls every 20 seconds (default) 31.259 -;registerattempts=10 ; Number of registration attempts before we give up 31.260 - ; 0 = continue forever, hammering the other server 31.261 - ; until it accepts the registration 31.262 - ; Default is 0 tries, continue forever 31.263 - 31.264 -;----------------------------------------- NAT SUPPORT ------------------------ 31.265 -; The externip, externhost and localnet settings are used if you use Asterisk 31.266 -; behind a NAT device to communicate with services on the outside. 31.267 - 31.268 -;externip = 200.201.202.203 ; Address that we're going to put in outbound SIP 31.269 - ; messages if we're behind a NAT 31.270 - 31.271 - ; The externip and localnet is used 31.272 - ; when registering and communicating with other proxies 31.273 - ; that we're registered with 31.274 -;externhost=foo.dyndns.net ; Alternatively you can specify an 31.275 - ; external host, and Asterisk will 31.276 - ; perform DNS queries periodically. Not 31.277 - ; recommended for production 31.278 - ; environments! Use externip instead 31.279 -;externrefresh=10 ; How often to refresh externhost if 31.280 - ; used 31.281 - ; You may add multiple local networks. A reasonable 31.282 - ; set of defaults are: 31.283 -;localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks 31.284 -;localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 31.285 -;localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation 31.286 -;localnet=169.254.0.0/255.255.0.0 ;Zero conf local network 31.287 - 31.288 -; The nat= setting is used when Asterisk is on a public IP, communicating with 31.289 -; devices hidden behind a NAT device (broadband router). If you have one-way 31.290 -; audio problems, you usually have problems with your NAT configuration or your 31.291 -; firewall's support of SIP+RTP ports. You configure Asterisk choice of RTP 31.292 -; ports for incoming audio in rtp.conf 31.293 -; 31.294 -;nat=no ; Global NAT settings (Affects all peers and users) 31.295 - ; yes = Always ignore info and assume NAT 31.296 - ; no = Use NAT mode only according to RFC3581 (;rport) 31.297 - ; never = Never attempt NAT mode or RFC3581 support 31.298 - ; route = Assume NAT, don't send rport 31.299 - ; (work around more UNIDEN bugs) 31.300 - 31.301 -;----------------------------------- MEDIA HANDLING -------------------------------- 31.302 -; By default, Asterisk tries to re-invite the audio to an optimal path. If there's 31.303 -; no reason for Asterisk to stay in the media path, the media will be redirected. 31.304 -; This does not really work with in the case where Asterisk is outside and have 31.305 -; clients on the inside of a NAT. In that case, you want to set canreinvite=nonat 31.306 -; 31.307 -;canreinvite=yes ; Asterisk by default tries to redirect the 31.308 - ; RTP media stream (audio) to go directly from 31.309 - ; the caller to the callee. Some devices do not 31.310 - ; support this (especially if one of them is behind a NAT). 31.311 - ; The default setting is YES. If you have all clients 31.312 - ; behind a NAT, or for some other reason wants Asterisk to 31.313 - ; stay in the audio path, you may want to turn this off. 31.314 - 31.315 - ; In Asterisk 1.4 this setting also affect direct RTP 31.316 - ; at call setup (a new feature in 1.4 - setting up the 31.317 - ; call directly between the endpoints instead of sending 31.318 - ; a re-INVITE). 31.319 - 31.320 -;directrtpsetup=yes ; Enable the new experimental direct RTP setup. This sets up 31.321 - ; the call directly with media peer-2-peer without re-invites. 31.322 - ; Will not work for video and cases where the callee sends 31.323 - ; RTP payloads and fmtp headers in the 200 OK that does not match the 31.324 - ; callers INVITE. This will also fail if canreinvite is enabled when 31.325 - ; the device is actually behind NAT. 31.326 - 31.327 -;canreinvite=nonat ; An additional option is to allow media path redirection 31.328 - ; (reinvite) but only when the peer where the media is being 31.329 - ; sent is known to not be behind a NAT (as the RTP core can 31.330 - ; determine it based on the apparent IP address the media 31.331 - ; arrives from). 31.332 - 31.333 -;canreinvite=update ; Yet a third option... use UPDATE for media path redirection, 31.334 - ; instead of INVITE. This can be combined with 'nonat', as 31.335 - ; 'canreinvite=update,nonat'. It implies 'yes'. 31.336 - 31.337 -;----------------------------------------- REALTIME SUPPORT ------------------------ 31.338 -; For additional information on ARA, the Asterisk Realtime Architecture, 31.339 -; please read realtime.txt and extconfig.txt in the /doc directory of the 31.340 -; source code. 31.341 -; 31.342 -;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list 31.343 - ; just like friends added from the config file only on a 31.344 - ; as-needed basis? (yes|no) 31.345 - 31.346 -;rtsavesysname=yes ; Save systemname in realtime database at registration 31.347 - ; Default= no 31.348 - 31.349 -;rtupdate=yes ; Send registry updates to database using realtime? (yes|no) 31.350 - ; If set to yes, when a SIP UA registers successfully, the ip address, 31.351 - ; the origination port, the registration period, and the username of 31.352 - ; the UA will be set to database via realtime. 31.353 - ; If not present, defaults to 'yes'. 31.354 -;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule 31.355 - ; as if it had just registered? (yes|no|<seconds>) 31.356 - ; If set to yes, when the registration expires, the friend will 31.357 - ; vanish from the configuration until requested again. If set 31.358 - ; to an integer, friends expire within this number of seconds 31.359 - ; instead of the registration interval. 31.360 - 31.361 -;ignoreregexpire=yes ; Enabling this setting has two functions: 31.362 - ; 31.363 - ; For non-realtime peers, when their registration expires, the 31.364 - ; information will _not_ be removed from memory or the Asterisk database 31.365 - ; if you attempt to place a call to the peer, the existing information 31.366 - ; will be used in spite of it having expired 31.367 - ; 31.368 - ; For realtime peers, when the peer is retrieved from realtime storage, 31.369 - ; the registration information will be used regardless of whether 31.370 - ; it has expired or not; if it expires while the realtime peer 31.371 - ; is still in memory (due to caching or other reasons), the 31.372 - ; information will not be removed from realtime storage 31.373 - 31.374 -;----------------------------------------- SIP DOMAIN SUPPORT ------------------------ 31.375 -; Incoming INVITE and REFER messages can be matched against a list of 'allowed' 31.376 -; domains, each of which can direct the call to a specific context if desired. 31.377 -; By default, all domains are accepted and sent to the default context or the 31.378 -; context associated with the user/peer placing the call. 31.379 -; Domains can be specified using: 31.380 -; domain=<domain>[,<context>] 31.381 -; Examples: 31.382 -; domain=myasterisk.dom 31.383 -; domain=customer.com,customer-context 31.384 -; 31.385 -; In addition, all the 'default' domains associated with a server should be 31.386 -; added if incoming request filtering is desired. 31.387 -; autodomain=yes 31.388 -; 31.389 -; To disallow requests for domains not serviced by this server: 31.390 -; allowexternaldomains=no 31.391 - 31.392 -;domain=mydomain.tld,mydomain-incoming 31.393 - ; Add domain and configure incoming context 31.394 - ; for external calls to this domain 31.395 -;domain=1.2.3.4 ; Add IP address as local domain 31.396 - ; You can have several "domain" settings 31.397 -;allowexternaldomains=no ; Disable INVITE and REFER to non-local domains 31.398 - ; Default is yes 31.399 -;autodomain=yes ; Turn this on to have Asterisk add local host 31.400 - ; name and local IP to domain list. 31.401 - 31.402 -; fromdomain=mydomain.tld ; When making outbound SIP INVITEs to 31.403 - ; non-peers, use your primary domain "identity" 31.404 - ; for From: headers instead of just your IP 31.405 - ; address. This is to be polite and 31.406 - ; it may be a mandatory requirement for some 31.407 - ; destinations which do not have a prior 31.408 - ; account relationship with your server. 31.409 - 31.410 -;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- 31.411 -; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a 31.412 - ; SIP channel. Defaults to "no". An enabled jitterbuffer will 31.413 - ; be used only if the sending side can create and the receiving 31.414 - ; side can not accept jitter. The SIP channel can accept jitter, 31.415 - ; thus a jitterbuffer on the receive SIP side will be used only 31.416 - ; if it is forced and enabled. 31.417 - 31.418 -; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP 31.419 - ; channel. Defaults to "no". 31.420 - 31.421 -; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds. 31.422 - 31.423 -; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is 31.424 - ; resynchronized. Useful to improve the quality of the voice, with 31.425 - ; big jumps in/broken timestamps, usually sent from exotic devices 31.426 - ; and programs. Defaults to 1000. 31.427 - 31.428 -; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP 31.429 - ; channel. Two implementations are currently available - "fixed" 31.430 - ; (with size always equals to jbmaxsize) and "adaptive" (with 31.431 - ; variable size, actually the new jb of IAX2). Defaults to fixed. 31.432 - 31.433 -; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". 31.434 -;----------------------------------------------------------------------------------- 31.435 - 31.436 -;[authentication] 31.437 -; Global credentials for outbound calls, i.e. when a proxy challenges your 31.438 -; Asterisk server for authentication. These credentials override 31.439 -; any credentials in peer/register definition if realm is matched. 31.440 -; 31.441 -; This way, Asterisk can authenticate for outbound calls to other 31.442 -; realms. We match realm on the proxy challenge and pick an set of 31.443 -; credentials from this list 31.444 -; Syntax: 31.445 -; auth = <user>:<secret>@<realm> 31.446 -; auth = <user>#<md5secret>@<realm> 31.447 -; Example: 31.448 -;auth=mark:topsecret@digium.com 31.449 -; 31.450 -; You may also add auth= statements to [peer] definitions 31.451 -; Peer auth= override all other authentication settings if we match on realm 31.452 - 31.453 -;------------------------------------------------------------------------------ 31.454 -; Users and peers have different settings available. Friends have all settings, 31.455 -; since a friend is both a peer and a user 31.456 -; 31.457 -; User config options: Peer configuration: 31.458 -; -------------------- ------------------- 31.459 -; context context 31.460 -; callingpres callingpres 31.461 -; permit permit 31.462 -; deny deny 31.463 -; secret secret 31.464 -; md5secret md5secret 31.465 -; dtmfmode dtmfmode 31.466 -; canreinvite canreinvite 31.467 -; nat nat 31.468 -; callgroup callgroup 31.469 -; pickupgroup pickupgroup 31.470 -; language language 31.471 -; allow allow 31.472 -; disallow disallow 31.473 -; insecure insecure 31.474 -; trustrpid trustrpid 31.475 -; progressinband progressinband 31.476 -; promiscredir promiscredir 31.477 -; useclientcode useclientcode 31.478 -; accountcode accountcode 31.479 -; setvar setvar 31.480 -; callerid callerid 31.481 -; amaflags amaflags 31.482 -; call-limit call-limit 31.483 -; allowoverlap allowoverlap 31.484 -; allowsubscribe allowsubscribe 31.485 -; allowtransfer allowtransfer 31.486 -; subscribecontext subscribecontext 31.487 -; videosupport videosupport 31.488 -; maxcallbitrate maxcallbitrate 31.489 -; rfc2833compensate mailbox 31.490 -; username 31.491 -; template 31.492 -; fromdomain 31.493 -; regexten 31.494 -; fromuser 31.495 -; host 31.496 -; port 31.497 -; qualify 31.498 -; defaultip 31.499 -; rtptimeout 31.500 -; rtpholdtimeout 31.501 -; sendrpid 31.502 -; outboundproxy 31.503 -; rfc2833compensate 31.504 - 31.505 -;[sip_proxy] 31.506 -; For incoming calls only. Example: FWD (Free World Dialup) 31.507 -; We match on IP address of the proxy for incoming calls 31.508 -; since we can not match on username (caller id) 31.509 -;type=peer 31.510 -;context=from-fwd 31.511 -;host=fwd.pulver.com 31.512 - 31.513 -;[sip_proxy-out] 31.514 -;type=peer ; we only want to call out, not be called 31.515 -;secret=guessit 31.516 -;username=yourusername ; Authentication user for outbound proxies 31.517 -;fromuser=yourusername ; Many SIP providers require this! 31.518 -;fromdomain=provider.sip.domain 31.519 -;host=box.provider.com 31.520 -;usereqphone=yes ; This provider requires ";user=phone" on URI 31.521 -;call-limit=5 ; permit only 5 simultaneous outgoing calls to this peer 31.522 -;outboundproxy=proxy.provider.domain ; send outbound signaling to this proxy, not directly to the peer 31.523 - ; Call-limits will not be enforced on real-time peers, 31.524 - ; since they are not stored in-memory 31.525 -;port=80 ; The port number we want to connect to on the remote side 31.526 - ; Also used as "defaultport" in combination with "defaultip" settings 31.527 - 31.528 -;------------------------------------------------------------------------------ 31.529 -; Definitions of locally connected SIP devices 31.530 -; 31.531 -; type = user a device that authenticates to us by "from" field to place calls 31.532 -; type = peer a device we place calls to or that calls us and we match by host 31.533 -; type = friend two configurations (peer+user) in one 31.534 -; 31.535 -; For device names, we recommend using only a-z, numerics (0-9) and underscore 31.536 -; 31.537 -; For local phones, type=friend works most of the time 31.538 -; 31.539 -; If you have one-way audio, you probably have NAT problems. 31.540 -; If Asterisk is on a public IP, and the phone is inside of a NAT device 31.541 -; you will need to configure nat option for those phones. 31.542 -; Also, turn on qualify=yes to keep the nat session open 31.543 - 31.544 -;[grandstream1] 31.545 -;type=friend 31.546 -;context=from-sip ; Where to start in the dialplan when this phone calls 31.547 -;callerid=John Doe <1234> ; Full caller ID, to override the phones config 31.548 - ; on incoming calls to Asterisk 31.549 -;host=192.168.0.23 ; we have a static but private IP address 31.550 - ; No registration allowed 31.551 -;nat=no ; there is not NAT between phone and Asterisk 31.552 -;canreinvite=yes ; allow RTP voice traffic to bypass Asterisk 31.553 -;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone 31.554 -;call-limit=1 ; permit only 1 outgoing call and 1 incoming call at a time 31.555 - ; from the phone to asterisk 31.556 - ; 1 for the explicit peer, 1 for the explicit user, 31.557 - ; remember that a friend equals 1 peer and 1 user in 31.558 - ; memory 31.559 - ; This will affect your subscriptions as well. 31.560 - ; There is no combined call counter for a "friend" 31.561 - ; so there's currently no way in sip.conf to limit 31.562 - ; to one inbound or outbound call per phone. Use 31.563 - ; the group counters in the dial plan for that. 31.564 - ; 31.565 -;mailbox=1234@default ; mailbox 1234 in voicemail context "default" 31.566 -;disallow=all ; need to disallow=all before we can use allow= 31.567 -;allow=ulaw ; Note: In user sections the order of codecs 31.568 - ; listed with allow= does NOT matter! 31.569 -;allow=alaw 31.570 -;allow=g723.1 ; Asterisk only supports g723.1 pass-thru! 31.571 -;allow=g729 ; Pass-thru only unless g729 license obtained 31.572 -;callingpres=allowed_passed_screen ; Set caller ID presentation 31.573 - ; See README.callingpres for more information 31.574 - 31.575 - 31.576 -;[xlite1] 31.577 -; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)! 31.578 -; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed 31.579 -;type=friend 31.580 -;regexten=1234 ; When they register, create extension 1234 31.581 -;callerid="Jane Smith" <5678> 31.582 -;host=dynamic ; This device needs to register 31.583 -;nat=yes ; X-Lite is behind a NAT router 31.584 -;canreinvite=no ; Typically set to NO if behind NAT 31.585 -;disallow=all 31.586 -;allow=gsm ; GSM consumes far less bandwidth than ulaw 31.587 -;allow=ulaw 31.588 -;allow=alaw 31.589 -;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes 31.590 - 31.591 - 31.592 -;[snom] 31.593 -;type=friend ; Friends place calls and receive calls 31.594 -;context=from-sip ; Context for incoming calls from this user 31.595 -;secret=blah 31.596 -;subscribecontext=localextensions ; Only allow SUBSCRIBE for local extensions 31.597 -;language=de ; Use German prompts for this user 31.598 -;host=dynamic ; This peer register with us 31.599 -;dtmfmode=inband ; Choices are inband, rfc2833, or info 31.600 -;defaultip=192.168.0.59 ; IP used until peer registers 31.601 -;mailbox=1234@context,2345 ; Mailbox(-es) for message waiting indicator 31.602 -;subscribemwi=yes ; Only send notifications if this phone 31.603 - ; subscribes for mailbox notification 31.604 -;vmexten=voicemail ; dialplan extension to reach mailbox 31.605 - ; sets the Message-Account in the MWI notify message 31.606 - ; defaults to global vmexten which defaults to "asterisk" 31.607 -;disallow=all 31.608 -;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw! 31.609 - 31.610 - 31.611 -;[polycom] 31.612 -;type=friend ; Friends place calls and receive calls 31.613 -;context=from-sip ; Context for incoming calls from this user 31.614 -;secret=blahpoly 31.615 -;host=dynamic ; This peer register with us 31.616 -;dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info 31.617 -;username=polly ; Username to use in INVITE until peer registers 31.618 - ; Normally you do NOT need to set this parameter 31.619 -;disallow=all 31.620 -;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw! 31.621 -;progressinband=no ; Polycom phones don't work properly with "never" 31.622 - 31.623 - 31.624 -;[pingtel] 31.625 -;type=friend 31.626 -;secret=blah 31.627 -;host=dynamic 31.628 -;insecure=port ; Allow matching of peer by IP address without 31.629 - ; matching port number 31.630 -;insecure=invite ; Do not require authentication of incoming INVITEs 31.631 -;insecure=port,invite ; (both) 31.632 -;qualify=1000 ; Consider it down if it's 1 second to reply 31.633 - ; Helps with NAT session 31.634 - ; qualify=yes uses default value 31.635 -; 31.636 -; Call group and Pickup group should be in the range from 0 to 63 31.637 -; 31.638 -;callgroup=1,3-4 ; We are in caller groups 1,3,4 31.639 -;pickupgroup=1,3-5 ; We can do call pick-p for call group 1,3,4,5 31.640 -;defaultip=192.168.0.60 ; IP address to use if peer has not registered 31.641 -;deny=0.0.0.0/0.0.0.0 ; ACL: Control access to this account based on IP address 31.642 -;permit=192.168.0.60/255.255.255.0 31.643 - 31.644 -;[cisco1] 31.645 -;type=friend 31.646 -;secret=blah 31.647 -;qualify=200 ; Qualify peer is no more than 200ms away 31.648 -;nat=yes ; This phone may be natted 31.649 - ; Send SIP and RTP to the IP address that packet is 31.650 - ; received from instead of trusting SIP headers 31.651 -;host=dynamic ; This device registers with us 31.652 -;canreinvite=no ; Asterisk by default tries to redirect the 31.653 - ; RTP media stream (audio) to go directly from 31.654 - ; the caller to the callee. Some devices do not 31.655 - ; support this (especially if one of them is 31.656 - ; behind a NAT). 31.657 -;defaultip=192.168.0.4 ; IP address to use until registration 31.658 -;username=goran ; Username to use when calling this device before registration 31.659 - ; Normally you do NOT need to set this parameter 31.660 -;setvar=CUSTID=5678 ; Channel variable to be set for all calls from this device 31.661 - 31.662 -;[pre14-asterisk] 31.663 -;type=friend 31.664 -;secret=digium 31.665 -;host=dynamic 31.666 -;rfc2833compensate=yes ; Compensate for pre-1.4 DTMF transmission from another Asterisk machine. 31.667 - ; You must have this turned on or DTMF reception will work improperly.
32.1 --- a/asterisk/sip_notify.conf Sun Mar 20 19:27:35 2011 +0100 32.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 32.3 @@ -1,22 +0,0 @@ 32.4 -;[polycom-check-cfg] 32.5 -;Event=>check-sync 32.6 -;Content-Length=>0 32.7 - 32.8 -; Untested 32.9 -;[sipura-check-cfg] 32.10 -;Event=>resync 32.11 -;Content-Length=>0 32.12 - 32.13 -; Untested 32.14 -;[grandstream-check-cfg] 32.15 -;Event=>sys-control 32.16 - 32.17 -; Untested 32.18 -;[cisco-check-cfg] 32.19 -;Event=>check-sync 32.20 -;Content-Length=>0 32.21 - 32.22 -; Tested 32.23 -;[snom-check-cfg] 32.24 -;Event=>check-sync\;reboot=false 32.25 -;Content-Length=>0
33.1 --- a/asterisk/sla.conf Sun Mar 20 19:27:35 2011 +0100 33.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 33.3 @@ -1,140 +0,0 @@ 33.4 -; 33.5 -; Configuration for Shared Line Appearances (SLA). 33.6 -; 33.7 -; See doc/sla.pdf for more information. 33.8 -; 33.9 - 33.10 -; ---- General Options ---------------- 33.11 -;[general] 33.12 - 33.13 -;attemptcallerid=no ; Attempt CallerID handling. The default value for this 33.14 - ; is "no" because CallerID handling with an SLA setup is 33.15 - ; known to not work properly in some situations. However, 33.16 - ; feel free to enable it if you would like. If you do, and 33.17 - ; you find problems, please do not report them. 33.18 -; ------------------------------------- 33.19 - 33.20 - 33.21 -; ---- Trunk Declarations ------------- 33.22 -; 33.23 -;[line1] ; Provide a name for this trunk. 33.24 - 33.25 -;type=trunk ; This line is what marks this entry as a trunk. 33.26 - 33.27 -;device=Zap/3 ; Map this trunk declaration to a specific device. 33.28 - ; NOTE: You can not just put any type of channel here. 33.29 - ; Zap channels can be directly used. IP trunks 33.30 - ; require some indirect configuration which is 33.31 - ; described in doc/sla.pdf. 33.32 - 33.33 -;autocontext=line1 ; This supports automatic generation of the dialplan entries 33.34 - ; if the autocontext option is used. Each trunk should have 33.35 - ; a unique context name. Then, in zapata.conf, this device 33.36 - ; should be configured to have incoming calls go to this context. 33.37 - 33.38 -;ringtimeout=30 ; Set how long to allow this trunk to ring on an inbound call before hanging 33.39 - ; it up as an unanswered call. The value is in seconds. 33.40 - 33.41 -;barge=no ; If this option is set to "no", then no station will be 33.42 - ; allowed to join a call that is in progress. The default 33.43 - ; value is "yes". 33.44 - 33.45 -;hold=private ; This option configure hold permissions for this trunk. 33.46 - ; "open" - This means that any station can put this trunk 33.47 - ; on hold, and any station can retrieve it from 33.48 - ; hold. This is the default. 33.49 - ; "private" - This means that once a station puts the 33.50 - ; trunk on hold, no other station will be 33.51 - ; allowed to retrieve the call from hold. 33.52 - 33.53 -;[line2] 33.54 -;type=trunk 33.55 -;device=Zap/4 33.56 -;autocontext=line2 33.57 - 33.58 -;[line3] 33.59 -;type=trunk 33.60 -;device=Zap/3 33.61 -;autocontext=line3 33.62 - 33.63 -;[line4] 33.64 -;type=trunk 33.65 -;device=Local/disa@line4_outbound ; A Local channel in combination with the Disa 33.66 - ; application can be used to support IP trunks. 33.67 - ; See doc/sla.pdf on more information on how 33.68 - ; IP trunks work. 33.69 -;autocontext=line4 33.70 -; -------------------------------------- 33.71 - 33.72 - 33.73 -; ---- Station Declarations ------------ 33.74 - 33.75 -;[station1] ; Define a name for this station. 33.76 - 33.77 -;type=station ; This line indicates that this entry is a station. 33.78 - 33.79 -;device=SIP/station1 ; Each station must be mapped to a device. 33.80 - 33.81 -;autocontext=sla_stations ; This supports automatic generation of the dialplan entries if 33.82 - ; the autocontext option is used. All stations can use the same 33.83 - ; context without conflict. The device for this station should 33.84 - ; have its context configured to the same one listed here. 33.85 - 33.86 -;ringtimeout=10 ; Set a timeout for how long to allow the station to ring for an 33.87 - ; incoming call, in seconds. 33.88 - 33.89 -;ringdelay=10 ; Set a time for how long to wait before beginning to ring this station 33.90 - ; once there is an incoming call, in seconds. 33.91 - 33.92 -;hold=private ; This option configure hold permissions for this station. Note 33.93 - ; that if private hold is set in the trunk entry, that will override 33.94 - ; anything here. However, if a trunk has open hold access, but this 33.95 - ; station is set to private hold, then the private hold will be in 33.96 - ; effect. 33.97 - ; "open" - This means that once this station puts a call 33.98 - ; on hold, any other station is allowed to retrieve 33.99 - ; it. This is the default. 33.100 - ; "private" - This means that once this station puts a 33.101 - ; call on hold, no other station will be 33.102 - ; allowed to retrieve the call from hold. 33.103 - 33.104 - 33.105 -;trunk=line1 ; Individually list all of the trunks that will appear on this station. This 33.106 - ; order is significant. It should be the same order as they appear on the 33.107 - ; phone. The order here defines the order of preference that the trunks will 33.108 - ; be used. 33.109 -;trunk=line2 33.110 -;trunk=line3,ringdelay=5 ; A ring delay for the station can also be specified for a specific trunk. 33.111 - ; If a ring delay is specified both for the whole station and for a specific 33.112 - ; trunk on a station, the setting for the specific trunk will take priority. 33.113 - ; This value is in seconds. 33.114 - 33.115 -;trunk=line4,ringtimeout=5 ; A ring timeout for the station can also be specified for a specific trunk. 33.116 - ; If a ring timeout is specified both for the whole station and for a specific 33.117 - ; trunk on a station, the setting for the specific trunk will take priority. 33.118 - ; This value is in seconds. 33.119 - 33.120 - 33.121 -;[station](!) ; When there are a lot of stations that are configured the same way, 33.122 - ; it is convenient to use a configuration template like this so that 33.123 - ; the common settings stay in one place. 33.124 -;type=station 33.125 -;autocontext=sla_stations 33.126 -;trunk=line1 33.127 -;trunk=line2 33.128 -;trunk=line3 33.129 -;trunk=line4 33.130 - 33.131 -;[station2](station) ; Define a station that uses the configuration from the template "station". 33.132 -;device=SIP/station2 33.133 -; 33.134 -;[station3](station) 33.135 -;device=SIP/station3 33.136 -; 33.137 -;[station4](station) 33.138 -;device=SIP/station4 33.139 -; 33.140 -;[station5](station) 33.141 -;device=SIP/station5 33.142 -; -------------------------------------- 33.143 -
34.1 --- a/asterisk/voicemail.conf Sun Mar 20 19:27:35 2011 +0100 34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 34.3 @@ -1,248 +0,0 @@ 34.4 -; 34.5 -; Voicemail Configuration 34.6 -; 34.7 - 34.8 -; 34.9 -; NOTE: Asterisk has to edit this file to change a user's password. This does 34.10 -; not currently work with the "#include <file>" directive for Asterisk 34.11 -; configuration files, nor when using realtime static configuration. 34.12 -; Do not use them with this configuration file. 34.13 -; 34.14 - 34.15 -;[general] 34.16 -; Formats for writing Voicemail. Note that when using IMAP storage for 34.17 -; voicemail, only the first format specified will be used. 34.18 -;format=g723sf|wav49|wav 34.19 -;format=wav49|gsm|wav 34.20 -; 34.21 -; WARNING: 34.22 -; If you change the list of formats that you record voicemail in 34.23 -; when you have mailboxes that contain messages, you _MUST_ absolutely 34.24 -; manually go through those mailboxes and convert/delete/add the 34.25 -; the message files so that they appear to have been stored using 34.26 -; your new format list. If you don't do this, very unpleasant 34.27 -; things may happen to your users while they are retrieving and 34.28 -; manipulating their voicemail. 34.29 -; 34.30 -; In other words: don't change the format list on a production system 34.31 -; unless you are _VERY_ sure that you know what you are doing and are 34.32 -; prepared for the consequences. 34.33 -; 34.34 -; Who the e-mail notification should appear to come from 34.35 -;serveremail=asterisk 34.36 -;serveremail=asterisk@linux-support.net 34.37 -; Should the email contain the voicemail as an attachment 34.38 -;attach=yes 34.39 -; Maximum number of messages per folder. If not specified, a default value 34.40 -; (100) is used. Maximum value for this option is 9999. 34.41 -;maxmsg=100 34.42 -; Maximum length of a voicemail message in seconds 34.43 -;maxmessage=180 34.44 -; Minimum length of a voicemail message in seconds for the message to be kept 34.45 -; The default is no minimum. 34.46 -;minmessage=3 34.47 -; Maximum length of greetings in seconds 34.48 -;maxgreet=60 34.49 -; How many milliseconds to skip forward/back when rew/ff in message playback 34.50 -;skipms=3000 34.51 -; How many seconds of silence before we end the recording 34.52 -;maxsilence=10 34.53 -; Silence threshold (what we consider silence: the lower, the more sensitive) 34.54 -;silencethreshold=128 34.55 -; Max number of failed login attempts 34.56 -;maxlogins=3 34.57 -; 34.58 -; User context is where entries from users.conf are registered. The 34.59 -; default value is 'default' 34.60 -; 34.61 -;userscontext=default 34.62 -; 34.63 -; If you need to have an external program, i.e. /usr/bin/myapp 34.64 -; called when a voicemail is left, delivered, or your voicemailbox 34.65 -; is checked, uncomment this. It can also be set to 'smdi' to use 34.66 -; smdi for external notification. If it is 'smdi', smdiport should 34.67 -; be set to a valid port as specified in smdi.conf. 34.68 - 34.69 -;externnotify=/usr/bin/myapp 34.70 -;smdiport=/dev/ttyS0 34.71 - 34.72 -; If you need to have an external program, i.e. /usr/bin/myapp 34.73 -; called when a voicemail password is changed, uncomment this: 34.74 -;externpass=/usr/bin/myapp 34.75 -; For the directory, you can override the intro file if you want 34.76 -;directoryintro=dir-intro 34.77 -; The character set for voicemail messages can be specified here 34.78 -;charset=ISO-8859-1 34.79 -; The ADSI feature descriptor number to download to 34.80 -;adsifdn=0000000F 34.81 -; The ADSI security lock code 34.82 -;adsisec=9BDBF7AC 34.83 -; The ADSI voicemail application version number. 34.84 -;adsiver=1 34.85 -; Skip the "[PBX]:" string from the message title 34.86 -;pbxskip=yes 34.87 -; Change the From: string 34.88 -;fromstring=The Asterisk PBX 34.89 -; Permit finding entries for forward/compose from the directory 34.90 -;usedirectory=yes 34.91 -; Voicemail can be stored in a database using the ODBC driver. 34.92 -; The value of odbcstorage is the database connection configured 34.93 -; in res_odbc.conf. 34.94 -;odbcstorage=asterisk 34.95 -; The default table for ODBC voicemail storage is voicemessages. 34.96 -;odbctable=voicemessages 34.97 -; 34.98 -; Change the from, body and/or subject, variables: 34.99 -; VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_CIDNUM, 34.100 -; VM_CIDNAME, VM_DATE 34.101 -; 34.102 -; Note: The emailbody config row can only be up to 512 characters due to a 34.103 -; limitation in the Asterisk configuration subsystem. 34.104 -;emailsubject=[PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX} 34.105 -; The following definition is very close to the default, but the default shows 34.106 -; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or "an unknown 34.107 -; caller", if they are both null. 34.108 -;emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}, so you might\nwant to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n 34.109 -; 34.110 -; You can also change the Pager From: string, the pager body and/or subject. 34.111 -; The above defined variables also can be used here 34.112 -;pagerfromstring=The Asterisk PBX 34.113 -;pagersubject=New VM 34.114 -;pagerbody=New ${VM_DUR} long msg in box ${VM_MAILBOX}\nfrom ${VM_CALLERID}, on ${VM_DATE} 34.115 -; 34.116 -; Set the date format on outgoing mails. Valid arguments can be found on the 34.117 -; strftime(3) man page 34.118 -; 34.119 -; Default 34.120 -;emaildateformat=%A, %B %d, %Y at %r 34.121 -; 24h date format 34.122 -;emaildateformat=%A, %d %B %Y at %H:%M:%S 34.123 -; 34.124 -; You can override the default program to send e-mail if you wish, too 34.125 -; 34.126 -;mailcmd=/usr/sbin/sendmail -t 34.127 -; 34.128 -; Users may be located in different timezones, or may have different 34.129 -; message announcements for their introductory message when they enter 34.130 -; the voicemail system. Set the message and the timezone each user 34.131 -; hears here. Set the user into one of these zones with the tz= attribute 34.132 -; in the options field of the mailbox. Of course, language substitution 34.133 -; still applies here so you may have several directory trees that have 34.134 -; alternate language choices. 34.135 -; 34.136 -; Look in /usr/share/zoneinfo/ for names of timezones. 34.137 -; Look at the manual page for strftime for a quick tutorial on how the 34.138 -; variable substitution is done on the values below. 34.139 -; 34.140 -; Supported values: 34.141 -; 'filename' filename of a soundfile (single ticks around the filename 34.142 -; required) 34.143 -; ${VAR} variable substitution 34.144 -; A or a Day of week (Saturday, Sunday, ...) 34.145 -; B or b or h Month name (January, February, ...) 34.146 -; d or e numeric day of month (first, second, ..., thirty-first) 34.147 -; Y Year 34.148 -; I or l Hour, 12 hour clock 34.149 -; H Hour, 24 hour clock (single digit hours preceded by "oh") 34.150 -; k Hour, 24 hour clock (single digit hours NOT preceded by "oh") 34.151 -; M Minute, with 00 pronounced as "o'clock" 34.152 -; N Minute, with 00 pronounced as "hundred" (US military time) 34.153 -; P or p AM or PM 34.154 -; Q "today", "yesterday" or ABdY 34.155 -; (*note: not standard strftime value) 34.156 -; q "" (for today), "yesterday", weekday, or ABdY 34.157 -; (*note: not standard strftime value) 34.158 -; R 24 hour time, including minute 34.159 -; 34.160 -; 34.161 -; 34.162 -; Each mailbox is listed in the form <mailbox>=<password>,<name>,<email>,<pager_email>,<options> 34.163 -; if the e-mail is specified, a message will be sent when a message is 34.164 -; received, to the given mailbox. If pager is specified, a message will be 34.165 -; sent there as well. If the password is prefixed by '-', then it is 34.166 -; considered to be unchangeable. 34.167 -; 34.168 -; Advanced options example is extension 4069 34.169 -; NOTE: All options can be expressed globally in the general section, and 34.170 -; overridden in the per-mailbox settings, unless listed otherwise. 34.171 -; 34.172 -; tz=central ; Timezone from zonemessages below. Irrelevant if envelope=no. 34.173 -; attach=yes ; Attach the voicemail to the notification email *NOT* the pager email 34.174 -; attachfmt=wav49 ; Which format to attach to the email. Normally this is the 34.175 - ; first format specified in the format parameter above, but this 34.176 - ; option lets you customize the format sent to particular mailboxes. 34.177 - ; Useful if Windows users want wav49, but Linux users want gsm. 34.178 - ; [per-mailbox only] 34.179 -; saycid=yes ; Say the caller id information before the message. If not described, 34.180 - ; or set to no, it will be in the envelope 34.181 -; cidinternalcontexts=intern ; Internal Context for Name Playback instead of 34.182 - ; extension digits when saying caller id. 34.183 -; sayduration=no ; Turn on/off the duration information before the message. [ON by default] 34.184 -; saydurationm=2 ; Specify the minimum duration to say. Default is 2 minutes 34.185 -; dialout=fromvm ; Context to dial out from [option 4 from mailbox's advanced menu]. 34.186 - ; If not specified, option 4 will not be listed and dialing out 34.187 - ; from within VoiceMailMain() will not be permitted. 34.188 -;sendvoicemail=yes ; Allow the user to compose and send a voicemail while inside 34.189 - ; VoiceMailMain() [option 5 from mailbox's advanced menu]. 34.190 - ; If set to 'no', option 5 will not be listed. 34.191 -; searchcontexts=yes ; Current default behavior is to search only the default context 34.192 - ; if one is not specified. The older behavior was to search all contexts. 34.193 - ; This option restores the old behavior [DEFAULT=no] 34.194 -; callback=fromvm ; Context to call back from 34.195 - ; if not listed, calling the sender back will not be permitted 34.196 -; review=yes ; Allow sender to review/rerecord their message before saving it [OFF by default 34.197 -; operator=yes ; Allow sender to hit 0 before/after/during leaving a voicemail to 34.198 - ; reach an operator [OFF by default] 34.199 -; envelope=no ; Turn on/off envelope playback before message playback. [ON by default] 34.200 - ; This does NOT affect option 3,3 from the advanced options menu 34.201 -; delete=yes ; After notification, the voicemail is deleted from the server. [per-mailbox only] 34.202 - ; This is intended for use with users who wish to receive their 34.203 - ; voicemail ONLY by email. Note: "deletevoicemail" is provided as an 34.204 - ; equivalent option for Realtime configuration. 34.205 -; volgain=0.0 ; Emails bearing the voicemail may arrive in a volume too 34.206 - ; quiet to be heard. This parameter allows you to specify how 34.207 - ; much gain to add to the message when sending a voicemail. 34.208 - ; NOTE: sox must be installed for this option to work. 34.209 -; nextaftercmd=yes ; Skips to the next message after hitting 7 or 9 to delete/save current message. 34.210 - ; [global option only at this time] 34.211 -; forcename=yes ; Forces a new user to record their name. A new user is 34.212 - ; determined by the password being the same as 34.213 - ; the mailbox number. The default is "no". 34.214 -; forcegreetings=no ; This is the same as forcename, except for recording 34.215 - ; greetings. The default is "no". 34.216 -; hidefromdir=yes ; Hide this mailbox from the directory produced by app_directory 34.217 - ; The default is "no". 34.218 -;tempgreetwarn=yes ; Remind the user that their temporary greeting is set 34.219 - 34.220 -;[zonemessages] 34.221 -;eastern=America/New_York|'vm-received' Q 'digits/at' IMp 34.222 -;central=America/Chicago|'vm-received' Q 'digits/at' IMp 34.223 -;central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' 34.224 -;military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' 34.225 -;european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM 34.226 - 34.227 - 34.228 - 34.229 -;[default] 34.230 -; Define maximum number of messages per folder for a particular context. 34.231 -;maxmsg=50 34.232 - 34.233 -;1234 => 4242,Example Mailbox,root@localhost 34.234 -;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 34.235 -;4300 => 3456,Ben Rigas,ben@american-computer.net 34.236 -;4310 => -5432,Sales,sales@marko.net 34.237 -;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|saycid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envelope=yes|sayduration=yes|saydurationm=1 34.238 -;4073 => 1099,Bianca Paige,bianca@biancapaige.com,,delete=1 34.239 -;4110 => 3443,Rob Flynn,rflynn@blueridge.net 34.240 -;4235 => 1234,Jim Holmes,jim@astricon.ips,,Tz=european 34.241 - 34.242 - 34.243 -; 34.244 -; Mailboxes may be organized into multiple contexts for 34.245 -; voicemail virtualhosting 34.246 -; 34.247 - 34.248 -;[other] 34.249 -;The intro can be customized on a per-context basis 34.250 -;directoryintro=dir-company2 34.251 -;1234 => 5678,Company2 User,root@localhost
35.1 --- a/asterisk/wakeup.agi Sun Mar 20 19:27:35 2011 +0100 35.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 35.3 @@ -1,733 +0,0 @@ 35.4 -#! @l_prefix@/bin/perl 35.5 -# 35.6 -# wakeup.agi 1.1 35.7 -# 35.8 -# A wakeup agi script for Asterisk 35.9 -# 35.10 -# Copyright (C) 2007 35.11 -# 35.12 -# Jonas Arndt <jonas_arndt@comcast.net> 35.13 -# 35.14 -# This program is free software, distributed under the terms of the 35.15 -# GNU General Public License v2. 35.16 -# 35.17 -# 35.18 -# This program is free software: you can redistribute it and/or modify 35.19 -# it under the terms of the GNU General Public License as published by 35.20 -# the Free Software Foundation, either version 3 of the License, or 35.21 -# (at your option) any later version. 35.22 -# 35.23 -# This program is distributed in the hope that it will be useful, 35.24 -# but WITHOUT ANY WARRANTY; without even the implied warranty of 35.25 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 35.26 -# GNU General Public License for more details. 35.27 -# 35.28 -# You should have received a copy of the GNU General Public License 35.29 -# along with this program. If not, see <http://www.gnu.org/licenses/>. 35.30 -# 35.31 - 35.32 -use strict; 35.33 -use Time::Local; 35.34 -$|=1; 35.35 -# Setup some variables 35.36 -my %AGI; my $DEBUG=0; 35.37 -# Some constants 35.38 -my $OUTDIR="@l_prefix@/var/asterisk/spool/outgoing"; 35.39 -my $WAKEDIR="@l_prefix@/var/asterisk/spool/tmp"; 35.40 -my $debugfile="@l_prefix@/var/asterisk/spool/tmp/wakeup.log"; 35.41 -my $DEBUGOUT = "filehandle"; 35.42 -my $CALL = "filehandle"; 35.43 -my $TOUCH = "/usr/bin/touch"; 35.44 - 35.45 -############ check_result ########## 35.46 -# Use this to check the result of # 35.47 -# a sent command # 35.48 -# I pretty much stole this from # 35.49 -# the regular agi-test.agi # 35.50 -#################################### 35.51 -sub checkresult { 35.52 - my ($res) = @_; 35.53 - my $retval; 35.54 - chomp $res; 35.55 - if ($res =~ /^200/) { 35.56 - $res =~ /result=(-?\d+)/; 35.57 - if (!length($1)) { 35.58 - print DEBUGOUT "FAIL ($res)\n"; 35.59 - exit(1); 35.60 - } elsif ($DEBUG=1) { 35.61 - print DEBUGOUT "PASS ($1)\n"; 35.62 - } 35.63 - } else { 35.64 - print STDERR "FAIL (unexpected result '$res')\n"; 35.65 - exit(1); 35.66 - } 35.67 -} 35.68 - 35.69 - 35.70 -############ send_file ############# 35.71 -# Use this to send a wave file on # 35.72 -# the channel # 35.73 -# # 35.74 -#################################### 35.75 -sub send_file { 35.76 - my ($myfile) = @_; 35.77 - chomp($myfile); 35.78 - if ($DEBUG == 1 ) { 35.79 - print DEBUGOUT "Sending stream $myfile \n"; 35.80 - } 35.81 - print "STREAM FILE $myfile \"0123456789\"\n"; 35.82 - my $result = <STDIN>; 35.83 - &checkresult($result); 35.84 - $result =~ /result=(-?\d+)/; 35.85 - return $1; 35.86 -} 35.87 - 35.88 -############ hangup ############### 35.89 -# Use this to hand up a channel # 35.90 -# the channel # 35.91 -# # 35.92 -#################################### 35.93 -sub hangup { 35.94 - if ($DEBUG == 1 ) { 35.95 - print DEBUGOUT "Hanging up \n"; 35.96 - } 35.97 - print "HANGUP \"\" \n"; 35.98 - my $result = <STDIN>; 35.99 - &checkresult($result); 35.100 -} 35.101 - 35.102 -############ say_number ############ 35.103 -# Use this to say a number # 35.104 -# over the channel # 35.105 -# # 35.106 -#################################### 35.107 -sub say_number { 35.108 - my ($mynumber) = @_; 35.109 - chomp($mynumber); 35.110 - if ($DEBUG == 1 ) { 35.111 - print DEBUGOUT "Saying number $mynumber \n"; 35.112 - } 35.113 - print "SAY NUMBER $mynumber \"0123456789\"\n"; 35.114 - my $result = <STDIN>; 35.115 - &checkresult($result); 35.116 - $result =~ /result=(-?\d+)/; 35.117 - return $1; 35.118 -} 35.119 - 35.120 -############ say_digits ############ 35.121 -# Use this to say a digits # 35.122 -# over the channel # 35.123 -# # 35.124 -#################################### 35.125 -sub say_digits { 35.126 - my ($mynumber) = @_; 35.127 - chomp($mynumber); 35.128 - if ($DEBUG == 1 ) { 35.129 - print DEBUGOUT "Saying digits $mynumber \n"; 35.130 - } 35.131 - print "SAY DIGITS $mynumber \"0123456789\"\n"; 35.132 - my $result = <STDIN>; 35.133 - &checkresult($result); 35.134 -} 35.135 - 35.136 -############ get_choice ############ 35.137 -# Use this to receive a DTMF # 35.138 -# choice from the channel # 35.139 -# # 35.140 -#################################### 35.141 -sub get_choice { 35.142 - if ($DEBUG == 1 ) { 35.143 - print DEBUGOUT "Getting choice \n"; 35.144 - } 35.145 - print "WAIT FOR DIGIT 15000\n"; 35.146 - my $result = <STDIN>; 35.147 - &checkresult($result); 35.148 - $result =~ /result=(-?\d+)/; 35.149 - return $1; 35.150 -} 35.151 - 35.152 -############ answer ############### 35.153 -# Anser the channel # 35.154 -# # 35.155 -#################################### 35.156 -sub answer { 35.157 - if ($DEBUG == 1 ) { 35.158 - print DEBUGOUT "Answering the channel \n"; 35.159 - } 35.160 - print "ANSWER\n"; 35.161 - my $result = <STDIN>; 35.162 - &checkresult($result); 35.163 - $result =~ /result=(-?\d+)/; 35.164 - return $1; 35.165 -} 35.166 - 35.167 -######## get_data ################## 35.168 -# Feed with (file, maxnumbers) # 35.169 -# where file is the sound file # 35.170 -# to be played and maxnumbers is # 35.171 -# the maximum amount of digits to # 35.172 -# allow in the answer # 35.173 -#################################### 35.174 -sub get_data { 35.175 - my @mydata = @_; 35.176 - my $myfile = $mydata[0]; 35.177 - my $mymax = $mydata[1]; 35.178 - if ($DEBUG == 1 ) { 35.179 - print DEBUGOUT "Getting data \n"; 35.180 - } 35.181 - print "GET DATA $myfile 15000 $mymax \n"; 35.182 - my $result = <STDIN>; 35.183 - &checkresult($result); 35.184 - $result =~ /result=(-?\d+)/; 35.185 - return $1; 35.186 -} 35.187 - 35.188 -###### check_outstanding_calls ##### 35.189 -# Are there any outstanding wakeup # 35.190 -# calls for this extensions? # 35.191 -# Pass the extension to the # 35.192 -# function. The function returns # 35.193 -# a list of files # 35.194 -#################################### 35.195 -sub check_outstanding_calls { 35.196 - my $myext = @_; 35.197 - #opendir DIR, $WAKEDIR; 35.198 - opendir DIR, $OUTDIR; 35.199 - my @files = grep {/$myext/} readdir(DIR); 35.200 - closedir DIR; 35.201 - return @files; 35.202 -} 35.203 - 35.204 -######## get_extension ############# 35.205 -# Receive the AIG variable and # 35.206 -# return the extension # 35.207 -#################################### 35.208 -sub get_extension { 35.209 - my (@aig) = @_; 35.210 - if ($aig[11] == '') { 35.211 - print STDERR "No extension found in function get_exension \n"; 35.212 - return "FAIL"; 35.213 - } 35.214 - my $myext = $aig[11]; 35.215 - return $myext; 35.216 -} 35.217 - 35.218 -######## get_context ############### 35.219 -# Receive the AIG variable and # 35.220 -# return the context # 35.221 -#################################### 35.222 -sub get_context { 35.223 - my (@aig) = @_; 35.224 - if ($aig[8] == '') { 35.225 - print STDERR "No extension found in function get_exension \n"; 35.226 - return "FAIL"; 35.227 - } 35.228 - my $mycont = $aig[8]; 35.229 - return $mycont; 35.230 -} 35.231 - 35.232 -########### get_clid ############### 35.233 -# Receive the AIG variable and # 35.234 -# return the clid # 35.235 -#################################### 35.236 -sub get_clid { 35.237 - my (@aig) = @_; 35.238 - if ($aig[1] == '') { 35.239 - print STDERR "No clid found in function get_clid \n"; 35.240 - return "FAIL"; 35.241 - } 35.242 - my $myext = $aig[1]; 35.243 - return $myext; 35.244 -} 35.245 -########### init_agi ############### 35.246 -# Use this to initialize the AGI # 35.247 -# variable # 35.248 -# # 35.249 -#################################### 35.250 -sub init_agi { 35.251 - while(<STDIN>) { 35.252 - chomp; 35.253 - last unless length($_); 35.254 - if (/^agi_(\w+)\:\s+(.*)$/) { 35.255 - $AGI{$1} = $2; 35.256 - } 35.257 - } 35.258 -} 35.259 - 35.260 -############ ascii2num ############# 35.261 -# Removes 48 to get a number out # 35.262 -# of the asciss return # 35.263 -#################################### 35.264 -sub ascii2num { 35.265 - my ($asc) = @_; 35.266 - my $ret; 35.267 - $ret = $asc - 48; 35.268 - return $ret; 35.269 -} 35.270 - 35.271 - 35.272 -########### Welcome ############### 35.273 -# This is the welcome menu # 35.274 -# # 35.275 -#################################### 35.276 -sub welcome { 35.277 - my $ret = 0; 35.278 - $ret = &send_file("welcome"); 35.279 - if ($ret == 0) { 35.280 - $ret = &send_file("for-wakeup-call"); 35.281 - } 35.282 - if ($ret == 0) { 35.283 - $ret = &send_file("press-1"); 35.284 - } 35.285 - if ($ret == 0) { 35.286 - $ret = &send_file("for-a-list-of"); 35.287 - } 35.288 - if ($ret == 0) { 35.289 - $ret = &send_file("or"); 35.290 - } 35.291 - if ($ret == 0) { 35.292 - $ret = &send_file("to-cancel-wakeup"); 35.293 - } 35.294 - if ($ret != 0) { 35.295 - $ret = &ascii2num($ret); 35.296 - } 35.297 - if ($ret == 0) { 35.298 - $ret = &get_data("press-2",1); 35.299 - } 35.300 - if ($ret == 1) { 35.301 - $ret = &schedule_new(); 35.302 - } elsif ($ret == 2) { 35.303 - &manage_calls(); 35.304 - } else { 35.305 - $ret = &send_file("goodbye"); 35.306 - } 35.307 -} 35.308 - 35.309 -######### manage_calls ############# 35.310 -# This is what is called if you # 35.311 -# want to manage already scheduled # 35.312 -# wakeup calls # 35.313 -#################################### 35.314 - 35.315 -sub manage_calls { 35.316 - my $checker = "false"; 35.317 - my @calls; 35.318 - my $del; 35.319 - #my $ret; 35.320 - my $hours; 35.321 - my $minutes; 35.322 - # Send out a welcome message and ask for return 35.323 - @calls = &check_outstanding_calls($AGI{callerid}); 35.324 - if ($#calls + 1 == 0) { 35.325 - $del = &send_file("not-rqsted-wakeup"); 35.326 - $del = &send_file("goodbye"); 35.327 - } else { 35.328 - foreach (@calls) { 35.329 - $del = 0; 35.330 - my $wakefile = $_; 35.331 - my @wakeup = split /\./, $_; 35.332 - my $time = $wakeup[0]; 35.333 - $_ = $time; 35.334 - /(^[0-9][0-9])/; 35.335 - my $hours = $1; 35.336 - /^[0-9][0-9]([0-9][0-9])/; 35.337 - my $minutes = $1; 35.338 - $del = &send_file("rqsted-wakeup-for"); 35.339 - if ($del == 0) { 35.340 - $del = &say_number($hours); 35.341 - } 35.342 - if ($del == 0) { 35.343 - if ($minutes >= 10 ) { 35.344 - $del = &say_number($minutes); 35.345 - } elsif ($minutes > 0 && $minutes < 10) { 35.346 - $del = &send_file("digits/oh"); 35.347 - $del = &say_number($minutes); 35.348 - } 35.349 - } 35.350 - if ($del == 0) { 35.351 - $del = &send_file("digits/oclock"); 35.352 - } 35.353 - if ($del == 0) { 35.354 - $del = &send_file("to-cancel-wakeup"); 35.355 - } 35.356 - if ($del == 0) { 35.357 - $del = &send_file("press-1"); 35.358 - } 35.359 - if ($del == 0) { 35.360 - $del = &send_file("otherwise-press"); 35.361 - } 35.362 - if ($del != 0) { 35.363 - $del = &ascii2num($del); 35.364 - } 35.365 - if ($del == 0) { 35.366 - $del = &get_data("digits/2",1); 35.367 - } 35.368 - if ($del == 1) { 35.369 - my @sysargs = ("rm", "-f", "$WAKEDIR/$wakefile", "$OUTDIR/$wakefile"); 35.370 - system(@sysargs) == 0 35.371 - or die "system @sysargs failed: $?"; 35.372 - $del = &send_file("cancelled"); 35.373 - } 35.374 - } 35.375 - $del = &send_file("goodbye"); 35.376 - } 35.377 - 35.378 -} 35.379 - 35.380 -######## schedule_new ############## 35.381 -# This is the menu to schedule a # 35.382 -# a new wakeup call # 35.383 -#################################### 35.384 -sub schedule_new { 35.385 - my $checker = "false"; 35.386 - my $ret_var; 35.387 - my $ret_dummy = 0; 35.388 - my $time; 35.389 - my $perm; 35.390 - my $file; 35.391 - my $calltype; 35.392 - my $extension; 35.393 - my $context; 35.394 - my $hours; 35.395 - my $minutes; 35.396 - if ($DEBUG == 1 ) { 35.397 - print DEBUGOUT "From schedule_new\n"; 35.398 - } 35.399 - while ( $checker eq "false" ) { 35.400 - $ret_var = &send_file("to-rqst-wakeup-call"); 35.401 - if ($ret_var != 0) { 35.402 - my $tmp = &get_data("silence/1",3); 35.403 - $ret_var = &ascii2num($ret_var); 35.404 - $ret_var = $ret_var . $tmp; 35.405 - } else { 35.406 - $ret_var = &get_data("enter-a-time",4); 35.407 - } 35.408 -# if ($ret_var < 1300 && $ret_var >= 0100) { 35.409 -# my $pm = &get_data("1-for-am-2-for-pm",1); 35.410 -# if ($pm == 2 && $ret_var <= 1159) { 35.411 -# $ret_var = $ret_var + 1200; 35.412 -# $checker = "true"; 35.413 -# } elsif ($pm == 1 && $ret_var > 1159) { 35.414 -# $ret_var = $ret_var - 1200; 35.415 -# # Fix the zero 35.416 -# $ret_var = "00" . $ret_var; 35.417 -# $checker = "true"; 35.418 -# } else { 35.419 -# $checker = "true"; 35.420 -# } 35.421 -# } elsif ($ret_var > 2359) { 35.422 -# $ret_dummy = &send_file("please-try-again"); 35.423 -# } else { 35.424 -# $checker = "true"; 35.425 -# } 35.426 - if ($ret_var > 2359) { 35.427 - $ret_dummy = &send_file("please-try-again"); 35.428 - } else { 35.429 - $checker = "true"; 35.430 - } 35.431 - } 35.432 - $perm = 0; 35.433 - $perm = &send_file("wakeup-for-one-time"); 35.434 - if ($perm == 0) { 35.435 - $perm = &send_file("press-1"); 35.436 - } 35.437 - if ($perm == 0) { 35.438 - $perm = &send_file("for-a-daily-wakeup-call"); 35.439 - } 35.440 - if ($perm != 0) { 35.441 - $perm = &ascii2num($perm); 35.442 - } 35.443 - if ($perm == 0) { 35.444 - $perm = $perm = &get_data("press-2",1); 35.445 - } 35.446 - # Open the file and populate it with data 35.447 - $extension = $AGI{callerid}; 35.448 - $context = $AGI{context}; 35.449 - if ($perm == 2) { 35.450 - $file = "$WAKEDIR/$ret_var.perm.1.$extension.call"; 35.451 - $calltype = "perm"; 35.452 - open (CALL, '>', $file) or die "Cannot open call file for write :$!"; 35.453 - } else { 35.454 - $file = "$WAKEDIR/$ret_var.temp.1.$extension.call"; 35.455 - $calltype = "temp"; 35.456 - open (CALL, '>', $file) or die "Cannot open call file for write :$!"; 35.457 - } 35.458 - my $myprint = "channel: Local" . "/" . $extension . "@" . $context . "\n"; 35.459 - print CALL $myprint; 35.460 - print CALL "maxretries: 3\n"; 35.461 - print CALL "retrytime: 60\n"; 35.462 - print CALL "waittime: 60\n"; 35.463 - print CALL "callerid: \"AsterPBX Weckruf\" <$AGI{extension}>\n"; 35.464 - print CALL "application: AGI\n"; 35.465 - print CALL "data: wakeup|$ret_var.$calltype.1.$extension.call\n"; 35.466 - close ($CALL); 35.467 - # Now touch the file 35.468 - # Get the time variable 35.469 - $time = get_time_string($ret_var); 35.470 - my @command = ("$TOUCH", "-t", "$time", "${file}"); 35.471 - system(@command) == 0 35.472 - or die "system @command failed: $?"; 35.473 - # Move it to the OUT directory 35.474 - my @command = ("mv", "${file}", "${OUTDIR}/"); 35.475 - system(@command) == 0 35.476 - or die "system @command failed: $?"; 35.477 - 35.478 - # Stream out the wakeup 35.479 - $_ = $ret_var; 35.480 - /(^[0-9][0-9])/; 35.481 - my $hours = $1; 35.482 - /^[0-9][0-9]([0-9][0-9])/; 35.483 - my $minutes = $1; 35.484 - $ret_dummy = &send_file("rqsted-wakeup-for"); 35.485 - $ret_dummy = &say_number($hours); 35.486 - if ($minutes >= 10 ) { 35.487 - &say_number($minutes); 35.488 - } elsif ($minutes > 0 && $minutes < 10) { 35.489 - &send_file("digits/oh"); 35.490 - &say_number($minutes); 35.491 - } 35.492 - $ret_dummy = &send_file("digits/oclock"); 35.493 - $ret_dummy = &send_file("goodbye"); 35.494 - return $ret_var; 35.495 -} 35.496 - 35.497 -######## get_time_string ########### 35.498 -# This will return the time string # 35.499 -# when inputing a string like # 35.500 -# hhmi # 35.501 -#################################### 35.502 -sub get_time_string { 35.503 - my ($intime) = @_; 35.504 - my $minutes = substr($intime, 2, 4); 35.505 - my $hours = substr($intime, 0, 2); 35.506 - my $tmpepoch; 35.507 - my $day; 35.508 - my $month; 35.509 - my $ret_val; 35.510 - my $epoch = time(); 35.511 - my @timedata = localtime($epoch); 35.512 - # Insert the minutes and hours from input 35.513 - $timedata[1] = $minutes; 35.514 - $timedata[2] = $hours; 35.515 - # Get tmpepoch 35.516 - $tmpepoch = timelocal(@timedata); 35.517 - #Now compare them 35.518 - if ($tmpepoch < $epoch) { # Means it is tomorrow 35.519 - $tmpepoch += 86400; # Add 24 hours 35.520 - } 35.521 - # Now get the new timedata 35.522 - my @timedata = localtime($tmpepoch); 35.523 - $minutes = $timedata[1]; 35.524 - $hours = $timedata[2]; 35.525 - $day = $timedata[3]; 35.526 - $month = $timedata[4] + 1; 35.527 - #Correct the "First hour after midnight" problem 35.528 - if ($minutes < 10) { 35.529 - $minutes = "0" . $minutes; 35.530 - } 35.531 - if ($hours < 10) { 35.532 - $hours = "0" . $hours; 35.533 - } 35.534 - if ($day < 10) { 35.535 - $day = "0" . $day; 35.536 - } 35.537 - if ($month < 10) { 35.538 - $month = "0" . $month; 35.539 - } 35.540 - $ret_val = $month . $day . $hours . $minutes; 35.541 - return $ret_val; 35.542 -} 35.543 - 35.544 -############ new_time ############## 35.545 -# This will return the time string # 35.546 -# with a time set 10 minute into # 35.547 -# the future # 35.548 -# The string is # 35.549 -# MMDDhhmi # 35.550 -#################################### 35.551 -sub new_time { 35.552 - my ($input) = @_; 35.553 - my @timedata; 35.554 - my $minutes; 35.555 - my $hours; 35.556 - my $day; 35.557 - my $month; 35.558 - my $ret_val; 35.559 - my $epoc = time(); 35.560 - if ($input eq "10m") { 35.561 - # add 10 minutes 35.562 - $epoc += 600; 35.563 - #$epoc += 120; #just for debugs 35.564 - } else { 35.565 - # add 24 hours 35.566 - $epoc += 86400; 35.567 - } 35.568 - @timedata = localtime($epoc); 35.569 - $minutes = $timedata[1]; 35.570 - $hours = $timedata[2]; 35.571 - $day = $timedata[3]; 35.572 - $month = $timedata[4] + 1; 35.573 - #Correct the "First hour after midnight" problem 35.574 - if ($minutes < 10) { 35.575 - $minutes = "0" . $minutes; 35.576 - } 35.577 - if ($hours < 10) { 35.578 - $hours = "0" . $hours; 35.579 - } 35.580 - if ($day < 10) { 35.581 - $day = "0" . $day; 35.582 - } 35.583 - if ($month < 10) { 35.584 - $month = "0" . $month; 35.585 - } 35.586 - $ret_val = $month . $day . $hours . $minutes; 35.587 - return $ret_val; 35.588 -} 35.589 - 35.590 -########### snooze ################ 35.591 -# This is the menu to snooze the # 35.592 -# wakeup call # 35.593 -#################################### 35.594 -sub snooze { 35.595 - my ($oldfile) = @_; 35.596 - my $newfile; 35.597 - my $extension; 35.598 - my $context; 35.599 - my @filestore = split (/\./, $oldfile); 35.600 - my @permstore = split (/\./, $oldfile); 35.601 - my $time; 35.602 - my $ret_var = 0; 35.603 - my $ret_dummy; 35.604 - my $myprint; 35.605 - # Answer the channel 35.606 - &answer(); 35.607 - # Is this a reoccuring call, then add 24h 35.608 - if ($permstore[1] eq "perm") { 35.609 - $permstore[2] += 1; #Just to get a new file name 35.610 - $newfile = join(".",@permstore); 35.611 - $extension = $AGI{extension}; 35.612 - $context = $AGI{context}; 35.613 - # Open the file 35.614 - open (CALL, '>', "${WAKEDIR}/${newfile}") or die "Cannot open call file for write :$!"; 35.615 - $myprint = "channel: Local" . "/" . $extension . "@" . $context . "\n"; 35.616 - print CALL $myprint; 35.617 - print CALL "maxretries: 3\n"; 35.618 - print CALL "retrytime: 60\n"; 35.619 - print CALL "waittime: 60\n"; 35.620 - print CALL "callerid: \"AsterPBX Weckruf\" <$AGI{callerid}>\n"; 35.621 - print CALL "application: AGI\n"; 35.622 - print CALL "data: wakeup|$newfile\n"; 35.623 - close ($CALL); 35.624 - # Get a time 24h from now 35.625 - $time = &new_time("24h"); 35.626 - # Touch the file with the new time 35.627 - my @command = ("$TOUCH", "-t", "$time", "${WAKEDIR}/${newfile}"); 35.628 - system(@command) == 0 35.629 - or die "system @command failed: $?"; 35.630 - # Now move it 35.631 - my @command = ("mv", "${WAKEDIR}/${newfile}", "${OUTDIR}/${newfile}"); 35.632 - system(@command) == 0 35.633 - or die "system @command failed: $?"; 35.634 - } 35.635 - #Replace the file name time with snooze 35.636 - $filestore[1] = "snooze"; 35.637 - # Also add 10 minutes to the name 35.638 - $time = new_time("10m"); 35.639 - $filestore[0] = substr($time, 4, 8); 35.640 - # Get the new file name 35.641 - $newfile = join(".",@filestore); 35.642 - $ret_var = &send_file("this-is-yr-wakeup-call"); 35.643 - if ($ret_var == 0 ) { 35.644 - $ret_var = &send_file("to-confirm-wakeup"); 35.645 - } 35.646 - if ($ret_var == 0 ) { 35.647 - $ret_var = &send_file("press-1"); 35.648 - } 35.649 - if ($ret_var == 0 ) { 35.650 - $ret_var = &send_file("to-snooze-for"); 35.651 - } 35.652 - if ($ret_var == 0 ) { 35.653 - $ret_var = &send_file("digits/10"); 35.654 - } 35.655 - if ($ret_var == 0 ) { 35.656 - $ret_var = &send_file("minutes"); 35.657 - } 35.658 - if ($ret_var != 0 ) { 35.659 - $ret_var = &ascii2num($ret_var); 35.660 - } 35.661 - if ($ret_var == 0 ) { 35.662 - $ret_var = &get_data("press-2",1); 35.663 - } 35.664 - if ($ret_var == 2 ) { 35.665 - # Populate some variables 35.666 - $time = &new_time("10m"); 35.667 - $extension = $AGI{extension}; 35.668 - $context = $AGI{context}; 35.669 - # Open the file 35.670 - open (CALL, '>', "${WAKEDIR}/${newfile}") or die "Cannot open call file for write :$!"; 35.671 - $myprint = "channel: Local" . "/" . $extension . "@" . $context . "\n"; 35.672 - print CALL $myprint; 35.673 - print CALL "maxretries: 3\n"; 35.674 - print CALL "retrytime: 60\n"; 35.675 - print CALL "waittime: 60\n"; 35.676 - print CALL "callerid: \"AsterPBX Weckruf\" <$AGI{callerid}>\n"; 35.677 - print CALL "application: AGI\n"; 35.678 - print CALL "data: wakeup|$newfile\n"; 35.679 - close ($CALL); 35.680 - # Touch the file with the new time 35.681 - my @command = ("$TOUCH", "-t", "$time", "${WAKEDIR}/${newfile}"); 35.682 - system(@command) == 0 35.683 - or die "system @command failed: $?"; 35.684 - # Now move it 35.685 - my @command = ("mv", "${WAKEDIR}/${newfile}", "${OUTDIR}/${newfile}"); 35.686 - system(@command) == 0 35.687 - or die "system @command failed: $?"; 35.688 - $ret_dummy = &send_file("goodbye"); 35.689 - 35.690 - } elsif ($ret_var == 1) { 35.691 - $ret_dummy = &send_file("goodbye"); 35.692 - } else { 35.693 - $ret_dummy = &send_file("goodbye"); 35.694 - } 35.695 - 35.696 - # Stream out the wakeup 35.697 - return 0; 35.698 -} 35.699 - 35.700 -########### main program ########### 35.701 -# Here goes the main program # 35.702 -# # 35.703 -#################################### 35.704 - 35.705 -my $numargs = $#ARGV + 1; 35.706 -if ($DEBUG == 1) { 35.707 - open (DEBUGOUT, '>', $debugfile) or die "Cannot open $debugfile for write :$!"; 35.708 -} 35.709 - 35.710 -# Start by reading in the stuff Asterisk is sending 35.711 -&init_agi(); # Comment out in case of debug outside Asterisk 35.712 - 35.713 -# If DEBUG is set, dump the AGI variable 35.714 -if ($DEBUG == 1) { 35.715 - foreach my $i (sort keys %AGI) { 35.716 - print DEBUGOUT " -- $i = $AGI{$i}\n"; 35.717 - } 35.718 -} 35.719 - 35.720 -if ( $numargs == 0 ) { 35.721 - &welcome(); 35.722 - &hangup(); 35.723 - exit(0); 35.724 -} elsif ( $ARGV[0] eq "move" ) { 35.725 - &move(); 35.726 - &hangup(); 35.727 - exit(0); 35.728 -} else { 35.729 - &snooze($ARGV[0]); 35.730 - &hangup(); 35.731 - exit(0); 35.732 -} 35.733 - 35.734 -if ($DEBUG ==1) { 35.735 - close $DEBUGOUT; 35.736 -}
36.1 --- a/asterisk/zapata.conf Sun Mar 20 19:27:35 2011 +0100 36.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 36.3 @@ -1,663 +0,0 @@ 36.4 -; 36.5 -; Zapata telephony interface 36.6 -; 36.7 -; Configuration file 36.8 -; 36.9 -; You need to restart Asterisk to re-configure the Zap channel 36.10 -; CLI> reload chan_zap.so 36.11 -; will reload the configuration file, 36.12 -; but not all configuration options are 36.13 -; re-configured during a reload. 36.14 - 36.15 - 36.16 - 36.17 -;[trunkgroups] 36.18 -; 36.19 -; Trunk groups are used for NFAS or GR-303 connections. 36.20 -; 36.21 -; Group: Defines a trunk group. 36.22 -; trunkgroup => <trunkgroup>,<dchannel>[,<backup1>...] 36.23 -; 36.24 -; trunkgroup is the numerical trunk group to create 36.25 -; dchannel is the zap channel which will have the 36.26 -; d-channel for the trunk. 36.27 -; backup1 is an optional list of backup d-channels. 36.28 -; 36.29 -;trunkgroup => 1,24,48 36.30 -;trunkgroup => 1,24 36.31 -; 36.32 -; Spanmap: Associates a span with a trunk group 36.33 -; spanmap => <zapspan>,<trunkgroup>[,<logicalspan>] 36.34 -; 36.35 -; zapspan is the zap span number to associate 36.36 -; trunkgroup is the trunkgroup (specified above) for the mapping 36.37 -; logicalspan is the logical span number within the trunk group to use. 36.38 -; if unspecified, no logical span number is used. 36.39 -; 36.40 -;spanmap => 1,1,1 36.41 -;spanmap => 2,1,2 36.42 -;spanmap => 3,1,3 36.43 -;spanmap => 4,1,4 36.44 - 36.45 -;[channels] 36.46 -; 36.47 -; Default language 36.48 -; 36.49 -;language=en 36.50 -; 36.51 -; Default context 36.52 -; 36.53 -;context=default 36.54 -; 36.55 -; Switchtype: Only used for PRI. 36.56 -; 36.57 -; national: National ISDN 2 (default) 36.58 -; dms100: Nortel DMS100 36.59 -; 4ess: AT&T 4ESS 36.60 -; 5ess: Lucent 5ESS 36.61 -; euroisdn: EuroISDN 36.62 -; ni1: Old National ISDN 1 36.63 -; qsig: Q.SIG 36.64 -; 36.65 -;switchtype=national 36.66 -; 36.67 -; Some switches (AT&T especially) require network specific facility IE 36.68 -; supported values are currently 'none', 'sdn', 'megacom', 'tollfreemegacom', 'accunet' 36.69 -; 36.70 -;nsf=none 36.71 -; 36.72 -; PRI Dialplan: Only RARELY used for PRI. 36.73 -; 36.74 -; unknown: Unknown 36.75 -; private: Private ISDN 36.76 -; local: Local ISDN 36.77 -; national: National ISDN 36.78 -; international: International ISDN 36.79 -; dynamic: Dynamically selects the appropriate dialplan 36.80 -; 36.81 -;pridialplan=national 36.82 -; 36.83 -; PRI Local Dialplan: Only RARELY used for PRI (sets the calling number's numbering plan) 36.84 -; 36.85 -; unknown: Unknown 36.86 -; private: Private ISDN 36.87 -; local: Local ISDN 36.88 -; national: National ISDN 36.89 -; international: International ISDN 36.90 -; dynamic: Dynamically selects the appropriate dialplan 36.91 -; 36.92 -;prilocaldialplan=national 36.93 -; 36.94 -; PRI callerid prefixes based on the given TON/NPI (dialplan) 36.95 -; This is especially needed for euroisdn E1-PRIs 36.96 -; 36.97 -; sample 1 for Germany 36.98 -;internationalprefix = 00 36.99 -;nationalprefix = 0 36.100 -;localprefix = 0711 36.101 -;privateprefix = 07115678 36.102 -;unknownprefix = 36.103 -; 36.104 -; sample 2 for Germany 36.105 -;internationalprefix = + 36.106 -;nationalprefix = +49 36.107 -;localprefix = +49711 36.108 -;privateprefix = +497115678 36.109 -;unknownprefix = 36.110 -; 36.111 -; PRI resetinterval: sets the time in seconds between restart of unused 36.112 -; channels, defaults to 3600; minimum 60 seconds. Some PBXs don't like 36.113 -; channel restarts. so set the interval to a very long interval e.g. 100000000 36.114 -; or 'never' to disable *entirely*. 36.115 -; 36.116 -;resetinterval = 3600 36.117 -; 36.118 -; Overlap dialing mode (sending overlap digits) 36.119 -; 36.120 -;overlapdial=yes 36.121 -; 36.122 -; PRI Out of band indications. 36.123 -; Enable this to report Busy and Congestion on a PRI using out-of-band 36.124 -; notification. Inband indication, as used by Asterisk doesn't seem to work 36.125 -; with all telcos. 36.126 -; 36.127 -; outofband: Signal Busy/Congestion out of band with RELEASE/DISCONNECT 36.128 -; inband: Signal Busy/Congestion using in-band tones 36.129 -; 36.130 -; priindication = outofband 36.131 -; 36.132 -; If you need to override the existing channels selection routine and force all 36.133 -; PRI channels to be marked as exclusively selected, set this to yes. 36.134 -; priexclusive = yes 36.135 -; 36.136 -; ISDN Timers 36.137 -; All of the ISDN timers and counters that are used are configurable. Specify 36.138 -; the timer name, and its value (in ms for timers). 36.139 -; K: Layer 2 max number of outstanding unacknowledged I frames (default 7) 36.140 -; N200: Layer 2 max number of retransmissions of a frame (default 3) 36.141 -; T200: Layer 2 max time before retransmission of a frame (default 1000 ms) 36.142 -; T203: Layer 2 max time without frames being exchanged (default 10000 ms) 36.143 -; T305: Wait for DISCONNECT acknowledge (default 30000 ms) 36.144 -; T308: Wait for RELEASE acknowledge (default 4000 ms) 36.145 -; T309: Maintain active calls on Layer 2 disconnection (default -1, Asterisk clears calls) 36.146 -; EuroISDN: 6000 to 12000 ms, according to (N200 + 1) x T200 + 2s 36.147 -; May vary in other ISDN standards (Q.931 1993 : 90000 ms) 36.148 -; T313: Wait for CONNECT acknowledge, CPE side only (default 3000 ms) 36.149 -; 36.150 -; pritimer => t200,1000 36.151 -; pritimer => t313,4000 36.152 -; 36.153 -; To enable transmission of facility-based ISDN supplementary services (such 36.154 -; as caller name from CPE over facility), enable this option. 36.155 -; facilityenable = yes 36.156 -; 36.157 -; 36.158 -; Signalling method (default is fxs). Valid values: 36.159 -; em: E & M 36.160 -; em_w: E & M Wink 36.161 -; featd: Feature Group D (The fake, Adtran style, DTMF) 36.162 -; featdmf: Feature Group D (The real thing, MF (domestic, US)) 36.163 -; featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through 36.164 -; a Tandem Access point 36.165 -; featb: Feature Group B (MF (domestic, US)) 36.166 -; fgccama Feature Group C-CAMA (DP DNIS, MF ANI) 36.167 -; fgccamamf Feature Group C-CAMA MF (MF DNIS, MF ANI) 36.168 -; fxs_ls: FXS (Loop Start) 36.169 -; fxs_gs: FXS (Ground Start) 36.170 -; fxs_ks: FXS (Kewl Start) 36.171 -; fxo_ls: FXO (Loop Start) 36.172 -; fxo_gs: FXO (Ground Start) 36.173 -; fxo_ks: FXO (Kewl Start) 36.174 -; pri_cpe: PRI signalling, CPE side 36.175 -; pri_net: PRI signalling, Network side 36.176 -; gr303fxoks_net: GR-303 Signalling, FXO Loopstart, Network side 36.177 -; gr303fxsks_cpe: GR-303 Signalling, FXS Loopstart, CPE side 36.178 -; sf: SF (Inband Tone) Signalling 36.179 -; sf_w: SF Wink 36.180 -; sf_featd: SF Feature Group D (The fake, Adtran style, DTMF) 36.181 -; sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US)) 36.182 -; sf_featb: SF Feature Group B (MF (domestic, US)) 36.183 -; e911: E911 (MF) style signalling 36.184 -; 36.185 -; The following are used for Radio interfaces: 36.186 -; fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the 36.187 -; channel bank) 36.188 -; fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the 36.189 -; channel bank) 36.190 -; fxo_rx: Receive audio/COR on an FXO loopstart interface (FXS at the 36.191 -; channel bank) 36.192 -; fxo_tx: Transmit audio/PTT on an FXO groundstart interface (FXS at 36.193 -; the channel bank) 36.194 -; em_rx: Receive audio/COR on an E&M interface (1-way) 36.195 -; em_tx: Transmit audio/PTT on an E&M interface (1-way) 36.196 -; em_txrx: Receive audio/COR AND Transmit audio/PTT on an E&M interface 36.197 -; (2-way) 36.198 -; em_rxtx: Same as em_txrx (for our dyslexic friends) 36.199 -; sf_rx: Receive audio/COR on an SF interface (1-way) 36.200 -; sf_tx: Transmit audio/PTT on an SF interface (1-way) 36.201 -; sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface 36.202 -; (2-way) 36.203 -; sf_rxtx: Same as sf_txrx (for our dyslexic friends) 36.204 -; 36.205 -;signalling=fxo_ls 36.206 -; 36.207 -; If you have an outbound signalling format that is different from format 36.208 -; specified above (but compatible), you can specify outbound signalling format, 36.209 -; (see below). The 'signalling' format specified will be the inbound signalling 36.210 -; format. If you only specify 'signalling', then it will be the format for 36.211 -; both inbound and outbound. 36.212 -; 36.213 -; signalling=featdmf 36.214 -; outsignalling=featb 36.215 -; 36.216 -; For Feature Group D Tandem access, to set the default CIC and OZZ use these 36.217 -; parameters: 36.218 -;defaultozz=0000 36.219 -;defaultcic=303 36.220 -; 36.221 -; A variety of timing parameters can be specified as well 36.222 -; Including: 36.223 -; prewink: Pre-wink time (default 50ms) 36.224 -; preflash: Pre-flash time (default 50ms) 36.225 -; wink: Wink time (default 150ms) 36.226 -; flash: Flash time (default 750ms) 36.227 -; start: Start time (default 1500ms) 36.228 -; rxwink: Receiver wink time (default 300ms) 36.229 -; rxflash: Receiver flashtime (default 1250ms) 36.230 -; debounce: Debounce timing (default 600ms) 36.231 -; 36.232 -;rxwink=300 ; Atlas seems to use long (250ms) winks 36.233 -; 36.234 -; How long generated tones (DTMF and MF) will be played on the channel 36.235 -; (in milliseconds) 36.236 -;toneduration=100 36.237 -; 36.238 -; Whether or not to do distinctive ring detection on FXO lines 36.239 -; 36.240 -;usedistinctiveringdetection=yes 36.241 -;distinctiveringaftercid=yes ; enable dring detection after callerid for those countries like Australia 36.242 - ; where the ring cadence is changed *after* the callerid spill. 36.243 -; 36.244 -; Whether or not to use caller ID 36.245 -; 36.246 -;usecallerid=yes 36.247 -; 36.248 -; Type of caller ID signalling in use 36.249 -; bell = bell202 as used in US 36.250 -; v23 = v23 as used in the UK 36.251 -; v23_jp = v23 as used in Japan 36.252 -; dtmf = DTMF as used in Denmark, Sweden and Netherlands 36.253 -; smdi = Use SMDI for callerid. Requires SMDI to be enabled (usesmdi). 36.254 -; 36.255 -;cidsignalling=bell 36.256 -; 36.257 -; What signals the start of caller ID 36.258 -; ring = a ring signals the start 36.259 -; polarity = polarity reversal signals the start 36.260 -; 36.261 -;cidstart=ring 36.262 -; 36.263 -; Whether or not to hide outgoing caller ID (Override with *67 or *82) 36.264 -; 36.265 -;hidecallerid=no 36.266 -; 36.267 -; Whether or not to enable call waiting on internal extensions 36.268 -; With this set to 'yes', busy extensions will hear the call-waiting 36.269 -; tone, and can use hook-flash to switch between callers. The Dial() 36.270 -; app will not return the "BUSY" result for extensions. 36.271 -; 36.272 -;callwaiting=yes 36.273 -; 36.274 -; Whether or not restrict outgoing caller ID (will be sent as ANI only, not 36.275 -; available for the user) 36.276 -; Mostly use with FXS ports 36.277 -; 36.278 -;restrictcid=no 36.279 -; 36.280 -; Whether or not use the caller ID presentation for the outgoing call that the 36.281 -; calling switch is sending. 36.282 -; See README.callingpres 36.283 -; 36.284 -;usecallingpres=yes 36.285 -; 36.286 -; Some countries (UK) have ring tones with different ring tones (ring-ring), 36.287 -; which means the callerid needs to be set later on, and not just after 36.288 -; the first ring, as per the default. 36.289 -; 36.290 -;sendcalleridafter=1 36.291 -; 36.292 -; 36.293 -; Support Caller*ID on Call Waiting 36.294 -; 36.295 -;callwaitingcallerid=yes 36.296 -; 36.297 -; Support three-way calling 36.298 -; 36.299 -;threewaycalling=yes 36.300 -; 36.301 -; Support flash-hook call transfer (requires three way calling) 36.302 -; Also enables call parking (overrides the 'canpark' parameter) 36.303 -; 36.304 -;transfer=yes 36.305 -; 36.306 -; Allow call parking 36.307 -; ('canpark=no' is overridden by 'transfer=yes') 36.308 -; 36.309 -;canpark=yes 36.310 -; 36.311 -; Support call forward variable 36.312 -; 36.313 -;cancallforward=yes 36.314 -; 36.315 -; Whether or not to support Call Return (*69) 36.316 -; 36.317 -;callreturn=yes 36.318 -; 36.319 -; Stutter dialtone support: If a mailbox is specified without a voicemail 36.320 -; context, then when voicemail is received in a mailbox in the default 36.321 -; voicemail context in voicemail.conf, taking the phone off hook will cause a 36.322 -; stutter dialtone instead of a normal one. 36.323 -; 36.324 -; If a mailbox is specified *with* a voicemail context, the same will result 36.325 -; if voicemail received in mailbox in the specified voicemail context. 36.326 -; 36.327 -; for default voicemail context, the example below is fine: 36.328 -; 36.329 -;mailbox=1234 36.330 -; 36.331 -; for any other voicemail context, the following will produce the stutter tone: 36.332 -; 36.333 -;mailbox=1234@context 36.334 -; 36.335 -; Enable echo cancellation 36.336 -; Use either "yes", "no", or a power of two from 32 to 256 if you wish to 36.337 -; actually set the number of taps of cancellation. 36.338 -; 36.339 -; Note that when setting the number of taps, the number 256 does not translate 36.340 -; to 256 ms of echo cancellation. echocancel=256 means 256 / 8 = 32 ms. 36.341 -; 36.342 -; Note that if any of your Zaptel cards have hardware echo cancellers, 36.343 -; then this setting only turns them on and off; numeric settings will 36.344 -; be treated as "yes". There are no special settings required for 36.345 -; hardware echo cancellers; when present and enabled in their kernel 36.346 -; modules, they take precedence over the software echo canceller compiled 36.347 -; into Zaptel automatically. 36.348 -; 36.349 -;echocancel=yes 36.350 -; 36.351 -; Generally, it is not necessary (and in fact undesirable) to echo cancel when 36.352 -; the circuit path is entirely TDM. You may, however, change this behavior 36.353 -; by enabling the echo cancel during pure TDM bridging below. 36.354 -; 36.355 -;echocancelwhenbridged=yes 36.356 -; 36.357 -; In some cases, the echo canceller doesn't train quickly enough and there 36.358 -; is echo at the beginning of the call. Enabling echo training will cause 36.359 -; asterisk to briefly mute the channel, send an impulse, and use the impulse 36.360 -; response to pre-train the echo canceller so it can start out with a much 36.361 -; closer idea of the actual echo. Value may be "yes", "no", or a number of 36.362 -; milliseconds to delay before training (default = 400) 36.363 -; 36.364 -; WARNING: In some cases this option can make echo worse! If you are 36.365 -; trying to debug an echo problem, it is worth checking to see if your echo 36.366 -; is better with the option set to yes or no. Use whatever setting gives 36.367 -; the best results. 36.368 -; 36.369 -; Note that these parameters do not apply to hardware echo cancellers. 36.370 -; 36.371 -;echotraining=yes 36.372 -;echotraining=800 36.373 -; 36.374 -; If you are having trouble with DTMF detection, you can relax the DTMF 36.375 -; detection parameters. Relaxing them may make the DTMF detector more likely 36.376 -; to have "talkoff" where DTMF is detected when it shouldn't be. 36.377 -; 36.378 -;relaxdtmf=yes 36.379 -; 36.380 -; You may also set the default receive and transmit gains (in dB) 36.381 -; 36.382 -;rxgain=0.0 36.383 -;txgain=0.0 36.384 -; 36.385 -; Logical groups can be assigned to allow outgoing rollover. Groups range 36.386 -; from 0 to 63, and multiple groups can be specified. 36.387 -; 36.388 -;group=1 36.389 -; 36.390 -; Ring groups (a.k.a. call groups) and pickup groups. If a phone is ringing 36.391 -; and it is a member of a group which is one of your pickup groups, then 36.392 -; you can answer it by picking up and dialling *8#. For simple offices, just 36.393 -; make these both the same. Groups range from 0 to 63. 36.394 -; 36.395 -;callgroup=1 36.396 -;pickupgroup=1 36.397 - 36.398 -; 36.399 -; Specify whether the channel should be answered immediately or if the simple 36.400 -; switch should provide dialtone, read digits, etc. 36.401 -; Note: If immediate=yes the dialplan execution will always start at extension 36.402 -; 's' priority 1 regardless of the dialed number! 36.403 -; 36.404 -;immediate=no 36.405 -; 36.406 -; Specify whether flash-hook transfers to 'busy' channels should complete or 36.407 -; return to the caller performing the transfer (default is yes). 36.408 -; 36.409 -;transfertobusy=no 36.410 -; 36.411 -; CallerID can be set to "asreceived" or a specific number if you want to 36.412 -; override it. Note that "asreceived" only applies to trunk interfaces. 36.413 -; 36.414 -;callerid=2564286000 36.415 -; 36.416 -; AMA flags affects the recording of Call Detail Records. If specified 36.417 -; it may be 'default', 'omit', 'billing', or 'documentation'. 36.418 -; 36.419 -;amaflags=default 36.420 -; 36.421 -; Channels may be associated with an account code to ease 36.422 -; billing 36.423 -; 36.424 -;accountcode=lss0101 36.425 -; 36.426 -; ADSI (Analog Display Services Interface) can be enabled on a per-channel 36.427 -; basis if you have (or may have) ADSI compatible CPE equipment 36.428 -; 36.429 -;adsi=yes 36.430 -; 36.431 -; SMDI (Simplified Message Desk Interface) can be enabled on a per-channel 36.432 -; basis if you would like that channel to behave like an SMDI message desk. 36.433 -; The SMDI port specified should have already been defined in smdi.conf. The 36.434 -; default port is /dev/ttyS0. 36.435 -; 36.436 -;usesmdi=yes 36.437 -;smdiport=/dev/ttyS0 36.438 -; 36.439 -; On trunk interfaces (FXS) and E&M interfaces (E&M, Wink, Feature Group D 36.440 -; etc, it can be useful to perform busy detection either in an effort to 36.441 -; detect hangup or for detecting busies. This enables listening for 36.442 -; the beep-beep busy pattern. 36.443 -; 36.444 -;busydetect=yes 36.445 -; 36.446 -; If busydetect is enabled, it is also possible to specify how many busy tones 36.447 -; to wait for before hanging up. The default is 4, but better results can be 36.448 -; achieved if set to 6 or even 8. Mind that the higher the number, the more 36.449 -; time that will be needed to hangup a channel, but lowers the probability 36.450 -; that you will get random hangups. 36.451 -; 36.452 -;busycount=4 36.453 -; 36.454 -; If busydetect is enabled, it is also possible to specify the cadence of your 36.455 -; busy signal. In many countries, it is 500msec on, 500msec off. Without 36.456 -; busypattern specified, we'll accept any regular sound-silence pattern that 36.457 -; repeats <busycount> times as a busy signal. If you specify busypattern, 36.458 -; then we'll further check the length of the sound (tone) and silence, which 36.459 -; will further reduce the chance of a false positive. 36.460 -; 36.461 -;busypattern=500,500 36.462 -; 36.463 -; NOTE: In the Asterisk Makefile you'll find further options to tweak the busy 36.464 -; detector. If your country has a busy tone with the same length tone and 36.465 -; silence (as many countries do), consider defining the 36.466 -; -DBUSYDETECT_COMPARE_TONE_AND_SILENCE option. 36.467 -; 36.468 -; Use a polarity reversal to mark when a outgoing call is answered by the 36.469 -; remote party. 36.470 -; 36.471 -;answeronpolarityswitch=yes 36.472 -; 36.473 -; In some countries, a polarity reversal is used to signal the disconnect of a 36.474 -; phone line. If the hanguponpolarityswitch option is selected, the call will 36.475 -; be considered "hung up" on a polarity reversal. 36.476 -; 36.477 -;hanguponpolarityswitch=yes 36.478 -; 36.479 -; On trunk interfaces (FXS) it can be useful to attempt to follow the progress 36.480 -; of a call through RINGING, BUSY, and ANSWERING. If turned on, call 36.481 -; progress attempts to determine answer, busy, and ringing on phone lines. 36.482 -; This feature is HIGHLY EXPERIMENTAL and can easily detect false answers, 36.483 -; so don't count on it being very accurate. 36.484 -; 36.485 -; Few zones are supported at the time of this writing, but may be selected 36.486 -; with "progzone" 36.487 -; 36.488 -; This feature can also easily detect false hangups. The symptoms of this is 36.489 -; being disconnected in the middle of a call for no reason. 36.490 -; 36.491 -;callprogress=yes 36.492 -;progzone=us 36.493 -; 36.494 -; FXO (FXS signalled) devices must have a timeout to determine if there was a 36.495 -; hangup before the line was answered. This value can be tweaked to shorten 36.496 -; how long it takes before Zap considers a non-ringing line to have hungup. 36.497 -; 36.498 -;ringtimeout=8000 36.499 -; 36.500 -; For FXO (FXS signalled) devices, whether to use pulse dial instead of DTMF 36.501 -; 36.502 -;pulsedial=yes 36.503 -; 36.504 -; For fax detection, uncomment one of the following lines. The default is *OFF* 36.505 -; 36.506 -;faxdetect=both 36.507 -;faxdetect=incoming 36.508 -;faxdetect=outgoing 36.509 -;faxdetect=no 36.510 -; 36.511 -; This option specifies a preference for which music on hold class this channel 36.512 -; should listen to when put on hold if the music class has not been set on the 36.513 -; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer 36.514 -; channel putting this one on hold did not suggest a music class. 36.515 -; 36.516 -; If this option is set to "passthrough", then the hold message will always be 36.517 -; passed through as signalling instead of generating hold music locally. This 36.518 -; setting is only valid when used on a channel that uses digital signalling. 36.519 -; 36.520 -; This option may be specified globally, or on a per-user or per-peer basis. 36.521 -; 36.522 -;mohinterpret=default 36.523 -; 36.524 -; This option specifies which music on hold class to suggest to the peer channel 36.525 -; when this channel places the peer on hold. It may be specified globally or on 36.526 -; a per-user or per-peer basis. 36.527 -; 36.528 -;mohsuggest=default 36.529 -; 36.530 -; PRI channels can have an idle extension and a minunused number. So long as 36.531 -; at least "minunused" channels are idle, chan_zap will try to call "idledial" 36.532 -; on them, and then dump them into the PBX in the "idleext" extension (which 36.533 -; is of the form exten@context). When channels are needed the "idle" calls 36.534 -; are disconnected (so long as there are at least "minidle" calls still 36.535 -; running, of course) to make more channels available. The primary use of 36.536 -; this is to create a dynamic service, where idle channels are bundled through 36.537 -; multilink PPP, thus more efficiently utilizing combined voice/data services 36.538 -; than conventional fixed mappings/muxings. 36.539 -; 36.540 -;idledial=6999 36.541 -;idleext=6999@dialout 36.542 -;minunused=2 36.543 -;minidle=1 36.544 -; 36.545 -; Configure jitter buffers in zapata (each one is 20ms, default is 4) 36.546 -; 36.547 -;jitterbuffers=4 36.548 -; 36.549 -;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- 36.550 -; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a 36.551 - ; ZAP channel. Defaults to "no". An enabled jitterbuffer will 36.552 - ; be used only if the sending side can create and the receiving 36.553 - ; side can not accept jitter. The ZAP channel can't accept jitter, 36.554 - ; thus an enabled jitterbuffer on the receive ZAP side will always 36.555 - ; be used if the sending side can create jitter. 36.556 - 36.557 -; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds. 36.558 - 36.559 -; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is 36.560 - ; resynchronized. Useful to improve the quality of the voice, with 36.561 - ; big jumps in/broken timestamps, usually sent from exotic devices 36.562 - ; and programs. Defaults to 1000. 36.563 - 36.564 -; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a ZAP 36.565 - ; channel. Two implementations are currently available - "fixed" 36.566 - ; (with size always equals to jbmax-size) and "adaptive" (with 36.567 - ; variable size, actually the new jb of IAX2). Defaults to fixed. 36.568 - 36.569 -; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". 36.570 -;----------------------------------------------------------------------------------- 36.571 -; 36.572 -; You can define your own custom ring cadences here. You can define up to 8 36.573 -; pairs. If the silence is negative, it indicates where the callerid spill is 36.574 -; to be placed. Also, if you define any custom cadences, the default cadences 36.575 -; will be turned off. 36.576 -; 36.577 -; Syntax is: cadence=ring,silence[,ring,silence[...]] 36.578 -; 36.579 -; These are the default cadences: 36.580 -; 36.581 -;cadence=125,125,2000,-4000 36.582 -;cadence=250,250,500,1000,250,250,500,-4000 36.583 -;cadence=125,125,125,125,125,-4000 36.584 -;cadence=1000,500,2500,-5000 36.585 -; 36.586 -; Each channel consists of the channel number or range. It inherits the 36.587 -; parameters that were specified above its declaration. 36.588 -; 36.589 -; For GR-303, CRV's are created like channels except they must start with the 36.590 -; trunk group followed by a colon, e.g.: 36.591 -; 36.592 -; crv => 1:1 36.593 -; crv => 2:1-2,5-8 36.594 -; 36.595 -; 36.596 -;callerid="Green Phone"<(256) 428-6121> 36.597 -;channel => 1 36.598 -;callerid="Black Phone"<(256) 428-6122> 36.599 -;channel => 2 36.600 -;callerid="CallerID Phone" <(256) 428-6123> 36.601 -;callerid="CallerID Phone" <(630) 372-1564> 36.602 -;callerid="CallerID Phone" <(256) 704-4666> 36.603 -;channel => 3 36.604 -;callerid="Pac Tel Phone" <(256) 428-6124> 36.605 -;channel => 4 36.606 -;callerid="Uniden Dead" <(256) 428-6125> 36.607 -;channel => 5 36.608 -;callerid="Cortelco 2500" <(256) 428-6126> 36.609 -;channel => 6 36.610 -;callerid="Main TA 750" <(256) 428-6127> 36.611 -;channel => 44 36.612 -; 36.613 -; For example, maybe we have some other channels which start out in a 36.614 -; different context and use E & M signalling instead. 36.615 -; 36.616 -;context=remote 36.617 -;sigalling=em 36.618 -;channel => 15 36.619 -;channel => 16 36.620 - 36.621 -;signalling=em_w 36.622 -; 36.623 -; All those in group 0 I'll use for outgoing calls 36.624 -; 36.625 -; Strip most significant digit (9) before sending 36.626 -; 36.627 -;stripmsd=1 36.628 -;callerid=asreceived 36.629 -;group=0 36.630 -;signalling=fxs_ls 36.631 -;channel => 45 36.632 - 36.633 -;signalling=fxo_ls 36.634 -;group=1 36.635 -;callerid="Joe Schmoe" <(256) 428-6131> 36.636 -;channel => 25 36.637 -;callerid="Megan May" <(256) 428-6132> 36.638 -;channel => 26 36.639 -;callerid="Suzy Queue" <(256) 428-6233> 36.640 -;channel => 27 36.641 -;callerid="Larry Moe" <(256) 428-6234> 36.642 -;channel => 28 36.643 -; 36.644 -; Sample PRI (CPE) config: Specify the switchtype, the signalling as either 36.645 -; pri_cpe or pri_net for CPE or Network termination, and generally you will 36.646 -; want to create a single "group" for all channels of the PRI. 36.647 -; 36.648 -; switchtype = national 36.649 -; signalling = pri_cpe 36.650 -; group = 2 36.651 -; channel => 1-23 36.652 - 36.653 -; 36.654 - 36.655 -; Used for distinctive ring support for x100p. 36.656 -; You can see the dringX patterns is to set any one of the dringXcontext fields 36.657 -; and they will be printed on the console when an inbound call comes in. 36.658 -; 36.659 -;dring1=95,0,0 36.660 -;dring1context=internal1 36.661 -;dring2=325,95,0 36.662 -;dring2context=internal2 36.663 -; If no pattern is matched here is where we go. 36.664 -;context=default 36.665 -;channel => 1 36.666 -