Revision
14749
Author
anthm
Date
2009-09-02 14:55:08 -0500 (Wed, 02 Sep 2009)

Log Message

reduce poll timeout when dtmf is present

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch_rtp.c (14748 => 14749)


--- freeswitch/trunk/src/switch_rtp.c	2009-09-02 19:04:02 UTC (rev 14748)
+++ freeswitch/trunk/src/switch_rtp.c	2009-09-02 19:55:08 UTC (rev 14749)
@@ -1800,7 +1800,15 @@
 		}
 
 		if (!rtp_session->timer.interval && rtp_session->read_pollfd) {
-			poll_status = switch_poll(rtp_session->read_pollfd, 1, &fdr, poll_sec * 1000000);
+			int pt = poll_sec * 1000000;
+
+			if (rtp_session->dtmf_data.out_digit_dur > 0) {
+				pt = 20000;
+			}
+			poll_status = switch_poll(rtp_session->read_pollfd, 1, &fdr, pt);
+			if (rtp_session->dtmf_data.out_digit_dur > 0) {
+				do_2833(rtp_session);
+			}
 		} 
 		
 		if (poll_status == SWITCH_STATUS_SUCCESS) {