]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
reduce poll timeout when dtmf is present
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 2 Sep 2009 19:55:08 +0000 (19:55 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 2 Sep 2009 19:55:08 +0000 (19:55 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14749 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_rtp.c

index 58931c109f3ee2e907467448780a7c8856a4f53c..23072cacc60aa593c7d8ee90a583a6b280d6ce95 100644 (file)
@@ -1800,7 +1800,15 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
                }
 
                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) {