--- /home/efutch/asterisk/1.2.13/asterisk-1.2.13/rtp.c 2006-10-28 13:52:20.000000000 -0400 +++ rtp.c 2006-12-29 15:28:29.000000000 -0500 @@ -290,21 +290,13 @@ } if (rtp->resp && (rtp->resp != resp)) { f = send_dtmf(rtp); - } else if(event_end & 0x80) { - if (rtp->resp) { - if(rtp->lasteventendseqn != seqno) { - f = send_dtmf(rtp); - rtp->lasteventendseqn = seqno; - } - rtp->resp = 0; - } - resp = 0; - duration = 0; - } else if (rtp->resp && rtp->dtmfduration && (duration < rtp->dtmfduration)) { + } else if (rtp->resp==0 && resp && !(event_end & 0x80)) { + rtp->resp = resp; f = send_dtmf(rtp); - } - if (!(event_end & 0x80)) rtp->resp = resp; + } else if (event_end & 0x80) { + rtp->resp = 0; + } rtp->dtmfcount = dtmftimeout; rtp->dtmfduration = duration; return f;