diff -ru zaptel-1.2.13/wctdm.c zaptel-1.2.13-cnet/wctdm.c --- zaptel-1.2.13/wctdm.c 2007-01-31 08:06:34.000000000 -0600 +++ zaptel-1.2.13-cnet/wctdm.c 2007-02-15 21:21:40.000000000 -0600 @@ -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.13/zaptel-base.c zaptel-1.2.13-cnet/zaptel-base.c --- zaptel-1.2.13/zaptel-base.c 2007-01-31 18:55:41.000000000 -0600 +++ zaptel-1.2.13-cnet/zaptel-base.c 2007-02-15 21:22:21.000000000 -0600 @@ -3364,6 +3364,8 @@ !(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; /* Setup default law */ chans[ch.chan]->deflaw = ch.deflaw; /* Copy back any modified settings */ @@ -4360,6 +4362,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); diff -ru zaptel-1.2.13/zaptel.h zaptel-1.2.13-cnet/zaptel.h --- zaptel-1.2.13/zaptel.h 2007-02-06 15:57:38.000000000 -0600 +++ zaptel-1.2.13-cnet/zaptel.h 2007-02-15 21:21:40.000000000 -0600 @@ -255,6 +255,7 @@ 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 */ } ZT_CHANCONFIG; typedef struct zt_sfconfig @@ -1237,6 +1238,7 @@ 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 */ }; /* defines for transmit signalling */ Only in zaptel-1.2.13-cnet: zaptel.h.orig diff -ru zaptel-1.2.13/zonedata.c zaptel-1.2.13-cnet/zonedata.c --- zaptel-1.2.13/zonedata.c 2007-01-31 13:01:33.000000000 -0600 +++ zaptel-1.2.13-cnet/zonedata.c 2007-02-15 21:21:40.000000000 -0600 @@ -549,5 +549,33 @@ { 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" }, }, }, + /* (CNET) Extra tone zones; be sure to add + corresponding entries to /etc/asterisk/indications.conf */ + { 35, "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" }, + }, + }, + { 36, "xp", "North America (PBX)", { 1000, 3000 }, + { + { ZT_TONE_DIALTONE, "500+640" }, + { ZT_TONE_BUSY, "480+620/500,0/500" }, + { ZT_TONE_RINGTONE, "440+480/1000,0/3000" }, + { 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" }, + }, + }, { -1 } }; diff -ru zaptel-1.2.13/ztcfg.c zaptel-1.2.13-cnet/ztcfg.c --- zaptel-1.2.13/ztcfg.c 2007-01-31 13:01:33.000000000 -0600 +++ zaptel-1.2.13-cnet/ztcfg.c 2007-02-15 21:21:40.000000000 -0600 @@ -606,6 +606,32 @@ 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 +1133,7 @@ { "corthresh", cor_thresh }, { "channel", rad_chanconfig }, { "channels", rad_chanconfig }, + { "ignoreflash", setflash }, /* (CNET) Make FXOs ignore flash */ }; static char *readline()