diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-30 20:41:21 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-30 20:41:21 +0000 |
commit | c51a9ce1f20e32c41ce7beefc67c204cd6bc0468 (patch) | |
tree | 981079317eb5bc145bc33c1ada1a14a81a6326d2 /zaptel.c | |
parent | fdfb0fd99bb66ef957a7405c6dd7fdc780aed8a0 (diff) |
support minimum time for FXS flash
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@788 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-x | zaptel.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -5242,10 +5242,14 @@ static void __zt_hooksig_pvt(struct zt_chan *chan, zt_rxsig_t rxsig) 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; } |