diff -ru zaptel-1.2.19/Makefile zaptel-1.2.19-cnet/Makefile --- zaptel-1.2.19/Makefile 2007-07-12 11:01:12.000000000 -0500 +++ zaptel-1.2.19-cnet/Makefile 2007-07-17 07:37:24.000000000 -0500 @@ -168,6 +168,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 Only in zaptel-1.2.19-cnet: Makefile.orig diff -ru zaptel-1.2.19/tonezone.c zaptel-1.2.19-cnet/tonezone.c --- zaptel-1.2.19/tonezone.c 2007-01-31 13:01:33.000000000 -0600 +++ zaptel-1.2.19-cnet/tonezone.c 2007-07-17 07:37:24.000000000 -0500 @@ -196,6 +196,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 -ru zaptel-1.2.19/wctdm.c zaptel-1.2.19-cnet/wctdm.c --- zaptel-1.2.19/wctdm.c 2007-07-03 13:57:42.000000000 -0500 +++ zaptel-1.2.19-cnet/wctdm.c 2007-07-17 07:37:24.000000000 -0500 @@ -124,6 +124,17 @@ } fxo_modes[] = { { "FCC", 0, 0, 0, 1, 0, 0x3, 0, 0, }, /* US, Canada */ + /* (CNET) Support for oddball ring frequencies */ + { "FCC17", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7f4c, }, /* 16.67 Hz */ + { "FCC25", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7e6c, }, + { "FCC30", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7dbb, }, + { "FCC33", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7d34, }, /* 33.33 Hz */ + { "FCC40", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7bfa, }, + { "FCC42", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7b91, }, + { "FCC50", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x79bc, }, + { "FCC54", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x78b3, }, + { "FCC60", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7702, }, + { "FCC67", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x74ef, }, /* 66.66 Hz */ { "TBR21", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7e6c, 0x023a, }, /* Austria, Belgium, Denmark, Finland, France, Germany, Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands, @@ -983,7 +994,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 -ru zaptel-1.2.19/zaptel-base.c zaptel-1.2.19-cnet/zaptel-base.c --- zaptel-1.2.19/zaptel-base.c 2007-07-05 13:08:53.000000000 -0500 +++ zaptel-1.2.19-cnet/zaptel-base.c 2007-07-17 07:37:24.000000000 -0500 @@ -2666,20 +2666,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 */ @@ -3388,6 +3400,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 */ @@ -4406,6 +4424,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); @@ -5733,13 +5752,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); @@ -6596,6 +6619,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 { Only in zaptel-1.2.19-cnet: zaptel-base.c.orig diff -ru zaptel-1.2.19/zaptel.h zaptel-1.2.19-cnet/zaptel.h --- zaptel-1.2.19/zaptel.h 2007-04-24 13:33:29.000000000 -0500 +++ zaptel-1.2.19-cnet/zaptel.h 2007-07-17 07:37:24.000000000 -0500 @@ -246,6 +246,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) */ @@ -255,6 +259,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 @@ -666,6 +673,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 @@ -1241,6 +1249,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 */ Only in zaptel-1.2.19-cnet: zaptel.h.orig diff -ru zaptel-1.2.19/zonedata.c zaptel-1.2.19-cnet/zonedata.c --- zaptel-1.2.19/zonedata.c 2007-05-01 11:20:50.000000000 -0500 +++ zaptel-1.2.19-cnet/zonedata.c 2007-07-17 07:54:21.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,38 @@ { 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" }, + }, + }, { -1 } }; diff -ru zaptel-1.2.19/ztcfg.c zaptel-1.2.19-cnet/ztcfg.c --- zaptel-1.2.19/ztcfg.c 2007-01-31 13:01:33.000000000 -0600 +++ zaptel-1.2.19-cnet/ztcfg.c 2007-07-17 07:37:24.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()