diff -u -r ./zaptel/zaptel.c ./astmodules/zaptel/zaptel.c --- ./zaptel/zaptel.c Sun Mar 2 22:03:21 2003 +++ ./astmodules/zaptel/zaptel.c Sun Mar 2 22:05:50 2003 @@ -4325,6 +4325,12 @@ void zt_rbsbits(struct zt_chan *chan, int cursig) { if (cursig == chan->rxsig) + { + chan->rxsigtimer=0; + return; + } + + if( chan->rxsigtimer++ < ZT_RXSIGTIME && (chan->txstate == ZT_TXSTATE_RINGON || chan->txstate == ZT_TXSTATE_RINGOFF) ) return; switch(chan->sig) { @@ -4370,6 +4376,7 @@ } /* Keep track of signalling for next time */ chan->rxsig = cursig; + chan->rxsigtimer=0; } void zt_ec_chunk(struct zt_chan *ss, unsigned char *rxchunk, const unsigned char *txchunk) diff -u -r ./zaptel/zaptel.h ./astmodules/zaptel/zaptel.h --- ./zaptel/zaptel.h Sun Mar 2 22:03:24 2003 +++ ./astmodules/zaptel/zaptel.h Sun Mar 2 22:08:51 2003 @@ -756,6 +756,8 @@ #define ZT_KEWLTIME 500 /* 500ms for kewl pulse */ #define ZT_AFTERKEWLTIME 300 /* 300ms after kewl pulse */ +#define ZT_RXSIGTIME 30 /* 30??(loops) for prevent "autoanswer" */ + #define ZT_MAX_SPANS 128 /* Max, 128 spans */ #define ZT_MAX_CHANNELS 1024 /* Max, 1024 channels */ #define ZT_MAX_CONF 1024 /* Max, 1024 conferences */ @@ -946,6 +948,7 @@ int gotgs; int txstate; int rxsig; + int rxsigtimer; int txsig; int rxsigstate;