diff -Nru zaptel-1.2.25/fxo_modes.h zaptel-1.2.25-cnet/fxo_modes.h --- zaptel-1.2.25/fxo_modes.h 2008-04-03 16:37:11.000000000 -0500 +++ zaptel-1.2.25-cnet/fxo_modes.h 2008-05-08 13:57:56.000000000 -0500 @@ -51,6 +51,97 @@ .battalarm = 1000, .battthresh = 3, }, + /* (CNET) Special "FCC" zones for frequency-selective ringers */ + { .name = "FCC17", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x7f4c, /* 16.67 Hz */ + }, + { .name = "FCC25", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x7e6c, + }, + { .name = "FCC30", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x7dbb, + }, + { .name = "FCC33", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x7d34, /* 33.33 Hz */ + }, + { .name = "FCC40", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x7bfa, + }, + { .name = "FCC42", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x7b91, + }, + { .name = "FCC50", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x79bc, + }, + { .name = "FCC54", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x78b3, + }, + { .name = "FCC60", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x7702, + }, + { .name = "FCC67", + .rt = 1, + .dcv = 0x3, + .battdebounce = 64, + .battalarm = 1000, + .battthresh = 3, + .acim = 0x2, + .ring_osc = 0x74ef, /* 66.66 Hz */ + }, /* Austria, Belgium, Denmark, Finland, France, Germany, Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland, and UK */ diff -Nru zaptel-1.2.25/Makefile zaptel-1.2.25-cnet/Makefile --- zaptel-1.2.25/Makefile 2008-03-31 19:08:21.000000000 -0500 +++ zaptel-1.2.25-cnet/Makefile 2008-05-08 14:00:57.000000000 -0500 @@ -204,6 +204,9 @@ endif endif +# (CNET) Mark this version as CNET +ZAPTELVERSION:="${ZAPTELVERSION}-cnet" + TZOBJS:=zonedata.lo tonezone.lo LIBTONEZONE_SO:=libtonezone.so LIBTONEZONE_SO_MAJOR_VER:=1 diff -Nru zaptel-1.2.25/READMEFIRST.cnet zaptel-1.2.25-cnet/READMEFIRST.cnet --- zaptel-1.2.25/READMEFIRST.cnet 1969-12-31 18:00:00.000000000 -0600 +++ zaptel-1.2.25-cnet/READMEFIRST.cnet 2008-05-08 14:02:06.000000000 -0500 @@ -0,0 +1,128 @@ +zaptel-cnet: Zaptel with adaptations for antique telephony, especially +intended for use with CNET, the Telephone Collector's Network. + +This driver is intended as a companion to asterisk-cnet, a modified +version of Asterisk. It MAY be used with standard Asterisk, but +asterisk-cnet MUST be used with zaptel-cnet. + +Modifications done by Russ Price , with audible +pulsing code by Max Parke. + +Latest changes: +2008-05-08: Updated to 1.2.25. +2008-04-03: Updated to 1.2.24, and added tone zone 102 ("xu") for +old-style UK "purring" dial tone. Added this README. + +This is a modified version of Digium's Zaptel device drivers for +telephony interfaces; especially, the wctdm driver for the TDM400P +analog telephone interface card. It provides the following features: + + * the ability to force the TDM400P FXS ports to provide ring current + at a specific frequency, intended for US phones with frequency- + selective party line ringers + * improved pulse dialing on TDM400P FXS ports + * three additional call progress tone sets, usable on any FXS port + * an ignoreflash keyword that may be used in your /etc/zaptel.conf + file to cause FXO ports to ignore a remote hookflash + * dial pulse mappings for New Zealand (or Oslo, Norway), and Sweden + * FXO pulse dial pause fix - "W" in dial strings will pause even if + the FXO is set for pulse dialing + * audible pulsing option; requires the CNET-modified Asterisk in + addition to the modified Zaptel + +Quick Install: + + cd /usr/src/zaptel-1.2.24-cnet + + make + + make install + + +Making use of the features: + + * Ignore hookflash: If your TDM400P has FXO ports on channels 1 and + 2, and FXS ports on 3 and 4, you could tell the FXOs to ignore a + remote hookflash as follows: + + fxsks=1-2 + ignoreflash=1-2 + fxoks=3-4 + # use my PBX tones instead of standard tones on the FXS ports + loadzone=xp + defaultzone=xp + + * Dial pulse mapping: If you have rotary-dial phones with NZ/Oslo or + Swedish dial arrangements, you can set FXS channels like so: + + pulse_nz_oslo=8 + pulse_sweden=17-18 + + Note that dial pulse mapping will work on T1/E1 channels as well + as on TDM400P cards. The ignoreflash keyword will also work. + +UPDATE 2-27-07: Dial pulse mapping now works for FXO ports as well as +FXS. Use the same syntax above. + +(3-31-07) WARNING: Pulse dialing on T1 channel bank FXO ports may or may +not work for you! I've noticed that the pulses from an FXO on an Adtran +750 channel bank are rather irregular-sounding, and also sound like they +have an improper break/make ratio. If you need to pulse dial into a step +switch, I suggest using either a TDM400P or X100P card! + + * Pause fix for FXO pulse dialing: Just use a "w" in the dial + string, just like you would for DTMF. + + * Audible pulsing: If you want callers to hear your Asterisk box + pulsing into your step switch, you will need to use the modified + Asterisk as well as the modified Zaptel. You will then need to + activate audible pulsing on the channels where you want it in both + /etc/zaptel.conf and /etc/asterisk/zapata.conf for this to work. + + /etc/zaptel.conf: + + hearpulsing=2-3 + + /etc/asterisk/zapata.conf: + + ; be sure to apply other settings to these channels + hearpulsing=yes + channel => 2 + channel => 3 + + * FXS port ring frequency: set when loading the wctdm module. The + command line passed to modprobe would take the form: + + modprobe wctdm opermode=FCC30 fxshonormode=1 boostringer=1 + + Modes available are: + + * FCC17 (16.67 Hz) + * FCC25 (25 Hz) + * FCC30 (30 Hz) + * FCC33 (33.33 Hz) + * FCC40 (40 Hz) + * FCC42 (42 Hz) + * FCC50 (50 Hz) + * FCC54 (54 Hz) + * FCC60 (60 Hz) + * FCC67 (66.66 Hz) + + The standard FCC mode is 20 Hz. + + NOTE: Changing the opermode parameter affects all FXS ports on the + card. This may change in a future release. + + * Extra call progress tone zones: these require changes in + /etc/asterisk/zapata.conf and /etc/zaptel.conf. + + /etc/zaptel.conf: + + loadzone=xm # Re-creation of the 1960 Bell Labs experimental + # ESS in Morris, Illinois + loadzone=xp # North America (PBX tones) + loadzone=xu # Old-style UK tones + + /etc/asterisk/zapata.conf + + # Use tonezone=100 for xm, 101 for xp, 102 for xu diff -Nru zaptel-1.2.25/tonezone.c zaptel-1.2.25-cnet/tonezone.c --- zaptel-1.2.25/tonezone.c 2008-02-18 16:49:30.000000000 -0600 +++ zaptel-1.2.25-cnet/tonezone.c 2008-05-08 14:00:57.000000000 -0500 @@ -197,6 +197,8 @@ return "Special Information"; case ZT_TONE_STUTTER: return "Stutter Dialtone"; + case ZT_TONE_SECONDDIALTONE: /* (CNET) */ + return "Secondary Dialtone"; default: snprintf(tmp, sizeof(tmp), "Unknown tone %d", id); return tmp; diff -Nru zaptel-1.2.25/wctdm.c zaptel-1.2.25-cnet/wctdm.c --- zaptel-1.2.25/wctdm.c 2008-04-03 23:29:20.000000000 -0500 +++ zaptel-1.2.25-cnet/wctdm.c 2008-05-08 13:57:56.000000000 -0500 @@ -966,7 +966,10 @@ hook = (res & 1); if (hook != wc->mod[card].fxs.lastrxhook) { /* Reset the debounce (must be multiple of 4ms) */ - wc->mod[card].fxs.debounce = 8 * (4 * 8); +/* (CNET) PULSE DIALING FIX! SEE: + http://www.voip-info.org/wiki/index.php?page=Asterisk+zaptel+pulse+dialing */ + /* wc->mod[card].fxs.debounce = 8 * (4 * 8); */ + wc->mod[card].fxs.debounce = 4 * (4 * 8); #if 0 printk("Resetting debounce card %d hook %d, %d\n", card, hook, wc->mod[card].fxs.debounce); #endif diff -Nru zaptel-1.2.25/zaptel-base.c zaptel-1.2.25-cnet/zaptel-base.c --- zaptel-1.2.25/zaptel-base.c 2008-04-03 16:11:24.000000000 -0500 +++ zaptel-1.2.25-cnet/zaptel-base.c 2008-05-08 14:00:57.000000000 -0500 @@ -2621,20 +2621,32 @@ chan->tonep = 0; break; default: - if (chan->digitmode == DIGIT_MODE_PULSE) + /* (CNET) The original case 'W' was unreachable in pulse mode, + so it was impossible to pause pulse dial strings! */ + if (chan->digitmode == DIGIT_MODE_PULSE && !(c == 'W' || c == 'w')) { if ((c >= '0') && (c <= '9') && (chan->txhooksig == ZT_TXSIG_OFFHOOK)) { - chan->pdialcount = c - '0'; - /* a '0' is ten pulses */ - if (!chan->pdialcount) chan->pdialcount = 10; + /* (CNET) Dial pulse mappings for FXO ports */ + switch(chan->map_pulse) + { + case MAP_PULSE_NZ_OSLO: /* 0=10 pulses, 1=9 pulses, ... 9=1 pulse */ + chan->pdialcount = 10 - (c - '0'); + break; + case MAP_PULSE_SWEDEN: /* 0=1 pulse, 1=2 pulses, 9=10 pulses */ + chan->pdialcount = (c - '0') + 1; + break; + default: + chan->pdialcount = c - '0'; + /* a '0' is ten pulses */ + if (!chan->pdialcount) chan->pdialcount = 10; + } zt_rbs_sethook(chan, ZT_TXSIG_ONHOOK, ZT_TXSTATE_PULSEBREAK, chan->pulsebreaktime); return; } } else { - case 'w': - case 'W': + /* (CNET) incorrect case construct eliminated */ chan->curtone = zt_dtmf_tone(c, (chan->digitmode == DIGIT_MODE_MFV1)); chan->tonep = 0; /* All done */ @@ -3343,6 +3355,12 @@ !(chans[ch.chan]->flags & ZT_FLAG_NETDEV)) printk("Unable to register HDLC device for channel %s\n", chans[ch.chan]->name); if (!res) { + /* (CNET) Ignore remote hookflash? */ + chans[ch.chan]->ignoreflash = ch.ignoreflash; + /* (CNET) Use Oslo/NZ or Swedish pulse mapping? */ + chans[ch.chan]->map_pulse = ch.map_pulse; + /* (CNET) Make outpulsing audible */ + chans[ch.chan]->hearpulsing = ch.hearpulsing; /* Setup default law */ chans[ch.chan]->deflaw = ch.deflaw; /* Copy back any modified settings */ @@ -4367,6 +4385,7 @@ if (rv) return rv; break; case ZT_FLASH: + if(chan->ignoreflash) break; /* (CNET) Ignore remote hookflash */ spin_lock_irqsave(&chan->lock, flags); if (chan->txstate != ZT_TXSTATE_OFFHOOK) { spin_unlock_irqrestore(&chan->lock, flags); @@ -5696,13 +5715,17 @@ short putlin[ZT_CHUNKSIZE],k[ZT_CHUNKSIZE]; int x,r; - if (ms->dialing) ms->afterdialingtimer = 50; - else if (ms->afterdialingtimer) ms->afterdialingtimer--; - if (ms->afterdialingtimer && (!(ms->flags & ZT_FLAG_PSEUDO))) { - /* Be careful since memset is likely a macro */ - rxb[0] = ZT_LIN2X(0, ms); - memset(&rxb[1], rxb[0], ZT_CHUNKSIZE - 1); /* receive as silence if dialing */ - } + /* (CNET) Allow caller to hear outpulsing if hearpulsing is true. + NOTE: This also requires a patched chan_zap with its own hearpulsing option! */ + if(!ms->hearpulsing) { + if (ms->dialing) ms->afterdialingtimer = 50; + else if (ms->afterdialingtimer) ms->afterdialingtimer--; + if (ms->afterdialingtimer && (!(ms->flags & ZT_FLAG_PSEUDO))) { + /* Be careful since memset is likely a macro */ + rxb[0] = ZT_LIN2X(0, ms); + memset(&rxb[1], rxb[0], ZT_CHUNKSIZE - 1); /* receive as silence if dialing */ + } + } for (x=0;xrxgain[rxb[x]]; putlin[x] = ZT_XLAW(rxb[x], ms); @@ -6559,6 +6582,14 @@ __qevent(&span->chans[x], ZT_EVENT_PULSEDIGIT | '#'); } else if (span->chans[x].pulsecount > 10) { __qevent(&span->chans[x], ZT_EVENT_PULSEDIGIT | '*'); + } else if (span->chans[x].map_pulse == MAP_PULSE_NZ_OSLO) { + /* (CNET) NZ/Oslo pluse mapping */ + __qevent(&span->chans[x], ZT_EVENT_PULSEDIGIT | ('0' + + (10 - span->chans[x].pulsecount))); + } else if (span->chans[x].map_pulse == MAP_PULSE_SWEDEN) { + /* (CNET) Swedish pulse mapping */ + __qevent(&span->chans[x], ZT_EVENT_PULSEDIGIT | ('0' + + (span->chans[x].pulsecount - 1))); } else if (span->chans[x].pulsecount > 9) { __qevent(&span->chans[x], ZT_EVENT_PULSEDIGIT | '0'); } else { diff -Nru zaptel-1.2.25/zaptel.h zaptel-1.2.25-cnet/zaptel.h --- zaptel-1.2.25/zaptel.h 2008-02-15 17:33:44.000000000 -0600 +++ zaptel-1.2.25-cnet/zaptel.h 2008-05-08 14:00:57.000000000 -0500 @@ -256,6 +256,10 @@ int sync; /* what level of sync source we are */ } ZT_LINECONFIG; +#define MAP_PULSE_NONE 0 +#define MAP_PULSE_NZ_OSLO 1 +#define MAP_PULSE_SWEDEN 2 + typedef struct zt_chanconfig { int chan; /* Channel we're applying this to (0 to use name) */ @@ -265,6 +269,9 @@ int master; /* Master channel if sigtype is ZT_SLAVE */ int idlebits; /* Idle bits (if this is a CAS channel) or channel to monitor (if this is DACS channel) */ +int ignoreflash; /* (CNET) Force FXO to ignore flash signals */ +int map_pulse; /* (CNET) Use Oslo/NZ or Swedish pulse dial mappings */ +int hearpulsing; /* (CNET) Make outpulsing audible to caller */ } ZT_CHANCONFIG; typedef struct zt_sfconfig @@ -676,6 +683,7 @@ #define ZT_TONE_CUST1 8 #define ZT_TONE_CUST2 9 #define ZT_TONE_STUTTER 10 +#define ZT_TONE_SECONDDIALTONE 11 /* (CNET) Secondary dialtone */ #define ZT_TONE_MAX 16 #define ZT_MAX_CADENCE 16 @@ -1251,6 +1259,9 @@ devfs_handle_t fhandle; /* File handle in devfs for the channel */ devfs_handle_t fhandle_symlink; #endif /* CONFIG_DEVFS_FS */ + short ignoreflash; /* (CNET) Force FXO channel to ignore flash signals */ + short map_pulse; /* (CNET) Use Oslo/NZ or Swedish pulse dial mappings */ + short hearpulsing; /* (CNET) Make outpulsing audible to caller */ }; /* defines for transmit signalling */ diff -Nru zaptel-1.2.25/zonedata.c zaptel-1.2.25-cnet/zonedata.c --- zaptel-1.2.25/zonedata.c 2007-05-01 11:20:50.000000000 -0500 +++ zaptel-1.2.25-cnet/zonedata.c 2008-05-08 14:00:57.000000000 -0500 @@ -38,6 +38,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "500+640" }, }, }, { 1, "au", "Australia", { 400, 200, 400, 2000 }, @@ -52,6 +53,7 @@ { ZT_TONE_RECORDTONE, "!425/1000,!0/15000,425/360,0/15000" }, { ZT_TONE_INFO, "425/2500,0/500" }, { ZT_TONE_STUTTER, "413+438/100,0/40" }, + { ZT_TONE_SECONDDIALTONE, "413+438" }, }, }, { 2, "fr", "France", { 1500, 3500 }, @@ -70,6 +72,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "440" }, }, }, { 3, "nl", "Netherlands", { 1000, 4000 }, @@ -87,6 +90,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "950/330,1400/330,1800/330,0/1000" }, { ZT_TONE_STUTTER, "425/500,0/50" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 4, "uk", "United Kingdom", { 400, 200, 400, 2000 }, @@ -101,6 +105,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/60000" }, { ZT_TONE_INFO, "950/330,0/15,1400/330,0/15,1800/330,0/1000" }, { ZT_TONE_STUTTER, "350+440/750,440/750" }, + { ZT_TONE_SECONDDIALTONE, "350+440" }, }, }, { 5, "fi", "Finland", { 1000, 4000 }, @@ -114,6 +119,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "950/650,0/325,950/325,0/30,1400/1300,0/2600" }, { ZT_TONE_STUTTER, "425/650,0/25" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 6,"es","Spain", { 1500, 3000}, @@ -127,6 +133,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "950/330,0/1000" }, { ZT_TONE_STUTTER, "425/500,0/50" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 7,"jp","Japan", { 1000, 2000 }, @@ -140,6 +147,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "400" }, }, }, { 8,"no","Norway", { 1000, 4000 }, @@ -153,6 +161,7 @@ { ZT_TONE_RECORDTONE, "1400/400,0/15000" }, { ZT_TONE_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" }, { ZT_TONE_STUTTER, "470/400,425/400" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 9, "at", "Austria", { 1000, 5000 }, @@ -168,6 +177,7 @@ { ZT_TONE_RECORDTONE, "1400/80,0/14920" }, { ZT_TONE_INFO, "950/330,1450/330,1850/330,0/1000" }, { ZT_TONE_STUTTER, "380+420" }, + { ZT_TONE_SECONDDIALTONE, "420" }, }, }, { 10, "nz", "New Zealand", { 400, 200, 400, 2000 }, @@ -181,6 +191,7 @@ { ZT_TONE_RECORDTONE, "1400/425,0/15000" }, { ZT_TONE_INFO, "400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "400" }, }, }, { 11,"it","Italy", { 1000, 4000 }, @@ -195,6 +206,7 @@ { ZT_TONE_RECORDTONE, "1400/400,0/15000" }, { ZT_TONE_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" }, { ZT_TONE_STUTTER, "470/400,425/400" }, + { ZT_TONE_SECONDDIALTONE, "425/200,0/200,425/600,0/1000" }, }, }, { 12, "us-old", "United States Circa 1950/ North America", { 2000, 4000 }, @@ -208,6 +220,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "600*120" }, }, }, { 13, "gr", "Greece", { 1000, 4000 }, @@ -221,6 +234,7 @@ { ZT_TONE_RECORDTONE, "1400/400,0/15000" }, { ZT_TONE_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" }, { ZT_TONE_STUTTER, "425/650,0/25" }, + { ZT_TONE_SECONDDIALTONE, "425/200,0/300,425/700,0/800" }, }, }, { 14, "tw", "Taiwan", { 1000, 4000 }, @@ -234,6 +248,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "350+440" }, }, }, { 15, "cl", "Chile", { 1000, 3000 }, @@ -247,6 +262,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "!950/333,!1400/333,!1800/333,0" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "400" }, }, }, { 16, "se", "Sweden", { 1000, 5000 }, @@ -265,6 +281,7 @@ "!950/332,!0/24,!1400/332,!0/24,!1800/332,0" }, /*{ ZT_TONE_STUTTER, "425/320,0/20" }, Real swedish standard, not used for now */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 17, "be", "Belgium", { 1000, 3000 }, @@ -281,6 +298,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "900/330,1400/330,1800/330,0/1000" }, { ZT_TONE_STUTTER, "425/1000,0/250" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 18, "sg", "Singapore", { 400, 200, 400, 2000 }, @@ -297,6 +315,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "950/330,1400/330,1800/330,0/1000" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 19, "il", "Israel", { 1000, 3000 }, @@ -310,6 +329,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "1000/330,1400/330,1800/330,0/1000" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "414" }, }, }, { 20, "br", "Brazil", { 1000, 4000 }, @@ -322,7 +342,9 @@ { ZT_TONE_DIALRECALL, "350+440" }, { ZT_TONE_RECORDTONE, "425/250,0/250" }, { ZT_TONE_INFO, "950/330,1400/330,1800/330" }, - { ZT_TONE_STUTTER, "350+440" } }, + { ZT_TONE_STUTTER, "350+440" }, + { ZT_TONE_SECONDDIALTONE, "425" }, + }, }, { 21, "hu", "Hungary", { 1250, 3750 }, { @@ -337,6 +359,7 @@ { ZT_TONE_RECORDTONE, "1400/400,0/15000" }, { ZT_TONE_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" }, { ZT_TONE_STUTTER, "350+375+400" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 22, "lt", "Lithuania", { 1000, 4000 }, @@ -354,6 +377,7 @@ { ZT_TONE_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" }, /* STUTTER not specified */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 23, "pl", "Poland", { 1000, 4000 }, @@ -371,6 +395,7 @@ { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,0" }, /* STUTTER not specified */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 24, "za", "South Africa", { 400, 200, 400, 2000 }, @@ -387,6 +412,7 @@ { ZT_TONE_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" }, /* STUTTER not specified */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "400*33" }, }, }, { 25, "pt", "Portugal", { 1000, 5000 }, @@ -403,6 +429,7 @@ { ZT_TONE_INFO, "950/330,1400/330,1800/330,0/1000" }, /* STUTTER not specified */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 26, "ee", "Estonia", { 1000, 4000 }, @@ -420,6 +447,7 @@ { ZT_TONE_INFO, "950/0,0/325,950/325,0/30,1400/1300,0/2600" }, /* STUTTER not specified */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 27, "mx", "Mexico", { 2000, 4000 }, @@ -433,6 +461,7 @@ { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, { ZT_TONE_INFO, "950/330,0/30,1400/330,0/30,1800/330,0/1000" }, { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 28, "in", "India", { 400, 200, 400, 2000 }, @@ -451,6 +480,7 @@ { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0/1000" }, /* STUTTER - not specified */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "400*25" }, }, }, { 29, "de", "Germany", { 1000, 4000 }, @@ -467,6 +497,7 @@ { ZT_TONE_RECORDTONE, "1400/80,0/15000" }, { ZT_TONE_INFO, "950/330,1400/330,1800/330,0/1000" }, { ZT_TONE_STUTTER, "425+400" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 30, "ch", "Switzerland", { 1000, 4000 }, @@ -483,6 +514,7 @@ { ZT_TONE_RECORDTONE, "1400/80,0/15000" }, { ZT_TONE_INFO, "950/330,1400/330,1800/330,0/1000" }, { ZT_TONE_STUTTER, "425+340/1100,0/1100" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 31, "dk", "Denmark", { 1000, 4000 }, @@ -500,6 +532,7 @@ { ZT_TONE_INFO, "950/330,1400/330,1800/330,0/1000" }, /* STUTTER - not specified */ { ZT_TONE_STUTTER, "425/450,0/50" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 32, "cz", "Czech Republic", { 1000, 4000 }, @@ -517,6 +550,7 @@ { ZT_TONE_INFO, "950/330,0/30,1400/330,0/30,1800/330,0/1000" }, /* STUTTER - not specified */ { ZT_TONE_STUTTER, "425/450,0/50" }, + { ZT_TONE_SECONDDIALTONE, "425/330,0/330,425/660,0/660" }, }, }, { 33, "cn", "China", { 1000, 4000 }, @@ -532,6 +566,7 @@ { ZT_TONE_INFO, "450/100,0/100,450/100,0/100,450/100,0/100,450/400,0/400" }, /* STUTTER - not specified */ { ZT_TONE_STUTTER, "450+425" }, + { ZT_TONE_SECONDDIALTONE, "450" }, }, }, { 34, "ve", "Venezuela", { 1000, 4000 }, @@ -547,6 +582,7 @@ { ZT_TONE_INFO, "!950/330,!1440/330,!1800/330,0/1000" }, /* STUTTER - not specified */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, { 39, "ph", "Philippines", { 1000, 4000 }, @@ -565,7 +601,52 @@ { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, /* STUTTER TONE - not specified */ { ZT_TONE_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" }, + { ZT_TONE_SECONDDIALTONE, "425" }, }, }, + /* (CNET) Extra tone zones; be sure to add + corresponding entries to /etc/asterisk/indications.conf */ + { 100, "xm", "Morris, IL experimental ESS (ca. 1960)", { 2000, 2000 }, + { + { ZT_TONE_DIALTONE, "560+690" }, + { ZT_TONE_BUSY, "560+690/500,0/500" }, + { ZT_TONE_RINGTONE, "430+454/2000,0/2000" }, + { ZT_TONE_CONGESTION, "560+690/300,0/200" }, + { ZT_TONE_CALLWAIT, "591/300,0/10000" }, + { ZT_TONE_DIALRECALL, "!560+690/100,!0/100,!560+690/100,!0/100,!560+690/100,!0/100,560+690" }, + { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, + { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, + { ZT_TONE_STUTTER, "!560+690/100,!0/100,!560+690/100,!0/100,!560+690/100,!0/100,!560+690/100,!0/100,!560+690/100,!0/100,!560+690/100,!0/100,560+690" }, + { ZT_TONE_SECONDDIALTONE, "350+440" }, + }, + }, + { 101, "xp", "North America (PBX)", { 2000, 4000 }, + { + { ZT_TONE_DIALTONE, "500+640" }, + { ZT_TONE_BUSY, "480+620/500,0/500" }, + { ZT_TONE_RINGTONE, "440+480/2000,0/4000" }, + { ZT_TONE_CONGESTION, "480+620/250,0/250" }, + { ZT_TONE_CALLWAIT, "440/300,0/10000" }, + { ZT_TONE_DIALRECALL, "!500+640/100,!0/100,!500+640/100,!0/100,!500+640/100,!0/100,500+640" }, + { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, + { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, + { ZT_TONE_STUTTER, "!500+640/100,!0/100,!500+640/100,!0/100,!500+640/100,!0/100,!500+640/100,!0/100,!500+640/100,!0/100,!500+640/100,!0/100,500+640" }, + { ZT_TONE_SECONDDIALTONE, "350+440" }, + }, + }, + { 102, "xu", "United Kingdom (old-school)", { 400, 200, 400, 2000 }, + { + { ZT_TONE_DIALTONE, "33/16,0/16" }, + { ZT_TONE_BUSY, "400/375,0/375" }, + { ZT_TONE_RINGTONE, "388+413/400,0/200,388+413/400,0/2000" }, + { ZT_TONE_CONGESTION, "400/400,0/350,400/225,0/525" }, + { ZT_TONE_CALLWAIT, "400/100,0/4000" }, + { ZT_TONE_DIALRECALL, "!400/100,!0/100,!400/100,!0/100,!400/100,0/100,33/16,0/16" }, + { ZT_TONE_RECORDTONE, "1400/500,0/15000" }, + { ZT_TONE_INFO, "!950/330,!1400/330,!1800/330,0" }, + { ZT_TONE_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,33/16,0/16" }, + { ZT_TONE_SECONDDIALTONE, "350+440" }, + }, + }, { -1 } }; diff -Nru zaptel-1.2.25/ztcfg.c zaptel-1.2.25-cnet/ztcfg.c --- zaptel-1.2.25/ztcfg.c 2008-02-15 17:33:44.000000000 -0600 +++ zaptel-1.2.25-cnet/ztcfg.c 2008-05-08 14:00:57.000000000 -0500 @@ -606,6 +606,118 @@ return 0; } +/* (CNET) Handle the "ignoreflash" keyword to tell an + FXO to ignore a remote flash command */ +static int setflash(char *keyword, char *args) +{ + int res; + short setting; + int x; + int chans[ZT_MAX_CHANNELS]; + + bzero(chans, sizeof(chans)); + res = apply_channels(chans, args); + if (res <= 0) + return -1; + if (!strcasecmp(keyword, "ignoreflash")) { + setting = 1; + } else { + fprintf(stderr, "Huh??? Don't know about '%s' flash setting\n", keyword); + return -1; + } + for (x=0;x= ZT_TONE_ZONE_MAX) { @@ -1107,6 +1219,10 @@ { "corthresh", cor_thresh }, { "channel", rad_chanconfig }, { "channels", rad_chanconfig }, + { "ignoreflash", setflash }, /* (CNET) Make FXOs ignore flash */ + { "pulse_nz_oslo", setnz_oslo }, /* (CNET) Use Oslo/NZ pulse dial mapping */ + { "pulse_sweden", setsweden }, /* (CNET) Use Swedish pulse mapping */ + { "hearpulsing", sethearpulsing }, /* (CNET) Make outpulsing audible to caller */ }; static char *readline()