[Asterisk-cvs] zaptel zaptel.c,1.122,1.123 zaptel.h,1.48,1.49
kpfleming
kpfleming
Fri Sep 30 16:44:55 CDT 2005
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv22400
Modified Files:
zaptel.c zaptel.h
Log Message:
support minimum time for FXS flash
Index: zaptel.c
===================================================================
RCS file: /usr/cvsroot/zaptel/zaptel.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- zaptel.c 30 Sep 2005 15:19:45 -0000 1.122
+++ zaptel.c 30 Sep 2005 20:41:21 -0000 1.123
@@ -5242,10 +5242,14 @@
if (chan->txstate != ZT_TXSTATE_OFFHOOK) break;
#ifdef FXSFLASH
if (rxsig == ZT_RXSIG_ONHOOK) {
- chan->itimer = ZT_FXSFLASHTIME * ZT_CHUNKSIZE;
+ chan->itimer = ZT_FXSFLASHMAXTIME * ZT_CHUNKSIZE;
break;
} else if (rxsig == ZT_RXSIG_OFFHOOK) {
- if (chan->itimer) __qevent(chan, ZT_EVENT_WINKFLASH);
+ if (chan->itimer) {
+ /* did the offhook occur in the window? if not, ignore both events */
+ if (chan->itimer <= ((ZT_FXSFLASHMAXTIME - ZTFXSFLASHMINTIME) * ZT_CHUNKSIZE))
+ __qevent(chan, ZT_EVENT_WINKFLASH);
+ }
chan->itimer = 0;
break;
}
Index: zaptel.h
===================================================================
RCS file: /usr/cvsroot/zaptel/zaptel.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- zaptel.h 30 Sep 2005 15:19:45 -0000 1.48
+++ zaptel.h 30 Sep 2005 20:41:21 -0000 1.49
@@ -906,7 +906,8 @@
#define ZT_MAX_CONF 1024 /* Max, 1024 conferences */
#ifdef FXSFLASH
-#define ZT_FXSFLASHTIME 550 /* max 550ms */
+#define ZT_FXSFLASHMINTIME 450 /* min 450ms */
+#define ZT_FXSFLASHMAXTIME 550 /* max 550ms */
#endif
#ifdef __KERNEL__
More information about the svn-commits
mailing list