diff -Nru asterisk-1.2.27/channels/chan_zap.c asterisk-1.2.27-cnet/channels/chan_zap.c --- asterisk-1.2.27/channels/chan_zap.c 2007-08-07 12:44:04.000000000 -0500 +++ asterisk-1.2.27-cnet/channels/chan_zap.c 2008-04-03 14:55:05.000000000 -0500 @@ -536,6 +536,7 @@ int priindication_oob; int radio; + int hearpulsing; /* (CNET) FXO pulsing audible to caller */ }; /** returns a new zt_chan_conf with default values (by-value) */ @@ -665,7 +666,10 @@ * kept as the one without the comma. for the moment, * until we add all fields. */ - .radio = 0 + .radio = 0, + + /* (CNET) Make FXO pulsing audible */ + .hearpulsing = 0 }; return chan_conf; @@ -750,6 +754,7 @@ unsigned int r2blocked:1; unsigned int sigchecked:1; #endif + unsigned int hearpulsing:1; /* (CNET) FXO pulsing audible to caller */ struct zt_distRings drings; @@ -4810,8 +4815,9 @@ #if 0 ast_log(LOG_DEBUG, "Read %d of voice on %s\n", p->subs[index].f.datalen, ast->name); #endif - if (p->dialing || /* Transmitting something */ - (index && (ast->_state != AST_STATE_UP)) || /* Three-way or callwait that isn't up */ + /* (CNET) Let audio through when FXO is dialing */ + if ((!p->hearpulsing && (p->dialing || /* Transmitting something */ + (index && (ast->_state != AST_STATE_UP)))) || /* Three-way or callwait that isn't up */ ((index == SUB_CALLWAIT) && !p->subs[SUB_CALLWAIT].inthreeway) /* Inactive and non-confed call-wait */ ) { /* Whoops, we're still dialing, or in a state where we shouldn't transmit.... @@ -5425,7 +5431,7 @@ if (len && !ast_ignore_pattern(chan->context, exten)) tone_zone_play_tone(p->subs[index].zfd, -1); else - tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALTONE); + tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_SECONDDIALTONE); /* (CNET) Secondary Dialtone */ if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num)) timeout = matchdigittimeout; else @@ -5716,7 +5722,7 @@ if (!ast_ignore_pattern(chan->context, exten)) tone_zone_play_tone(p->subs[index].zfd, -1); else - tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALTONE); + tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_SECONDDIALTONE); /* (CNET) Secondary Dialtone */ if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num) && strcmp(exten, ast_parking_ext())) { if (!res || !ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) { if (getforward) { @@ -7331,6 +7337,7 @@ tmp->use_callingpres = chan_conf.use_callingpres; tmp->priindication_oob = chan_conf.priindication_oob; tmp->priexclusive = chan_conf.priexclusive; + tmp->hearpulsing = chan_conf.hearpulsing; /* (CNET) Make FXO pulsing audible */ if (tmp->usedistinctiveringdetection) { if (!tmp->use_callerid) { ast_log(LOG_NOTICE, "Distinctive Ring detect requires 'usecallerid' be on\n"); @@ -9854,6 +9861,7 @@ ast_cli(fd, "Fax Handled: %s\n", tmp->faxhandled ? "yes" : "no"); ast_cli(fd, "Pulse phone: %s\n", tmp->pulsedial ? "yes" : "no"); ast_cli(fd, "Echo Cancellation: %d taps%s, currently %s\n", tmp->echocancel, tmp->echocanbridged ? "" : " unless TDM bridged", tmp->echocanon ? "ON" : "OFF"); + ast_cli(fd, "Caller Hears Pulsing: %s\n", tmp->hearpulsing ? "yes" : "no"); /* (CNET) */ if (tmp->master) ast_cli(fd, "Master Channel: %d\n", tmp->master->channel); for (x=0;xvalue); } else if (!strcasecmp(v->name, "sendcalleridafter")) { chan_conf.sendcalleridafter = atoi(v->value); + } else if(!strcasecmp(v->name, "hearpulsing")) { + /* (CNET) FXO pulsing audible to caller */ + chan_conf.hearpulsing = ast_true(v->value); } else if(!reload){ if (!strcasecmp(v->name, "signalling")) { if (!strcasecmp(v->value, "em")) { diff -Nru asterisk-1.2.27/Makefile asterisk-1.2.27-cnet/Makefile --- asterisk-1.2.27/Makefile 2007-07-16 13:33:02.000000000 -0500 +++ asterisk-1.2.27-cnet/Makefile 2008-04-03 14:55:05.000000000 -0500 @@ -336,6 +336,9 @@ endif endif +# mark as a CNET version +ASTERISKVERSION:=${ASTERISKVERSION}-cnet + ASTCFLAGS+= $(DEBUG_THREADS) ASTCFLAGS+= $(TRACE_FRAMES) ASTCFLAGS+= $(MALLOC_DEBUG) diff -Nru asterisk-1.2.27/READMEFIRST.cnet asterisk-1.2.27-cnet/READMEFIRST.cnet --- asterisk-1.2.27/READMEFIRST.cnet 1969-12-31 18:00:00.000000000 -0600 +++ asterisk-1.2.27-cnet/READMEFIRST.cnet 2008-04-03 15:03:43.000000000 -0500 @@ -0,0 +1,15 @@ +asterisk-cnet: Asterisk modified for antique telephony purposes. + +Modifications by Russ Price , with help from Max Parke. + +This is a modified version of Digium's Asterisk that provides a couple +of features not provided in conventional Asterisk: + + * An option to allow incoming callers to hear a Zap channel pick up + an FXO port and dial into a switch + * A distinctive dial tone when using the "ignorepat" option in + extensions.conf. + +NOTE! This version MUST be used with the modified Zaptel driver +available at . See the READMEFIRST.cnet file +in the zaptel-cnet distribution for further details.