[asterisk-commits] jpeeler: branch 1.6.0 r191499 - in /branches/1.6.0: ./ main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 1 13:19:10 CDT 2009


Author: jpeeler
Date: Fri May  1 13:19:05 2009
New Revision: 191499

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=191499
Log:
Merged revisions 191489 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r191489 | jpeeler | 2009-05-01 13:09:23 -0500 (Fri, 01 May 2009) | 15 lines
  
  Merged revisions 191488 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r191488 | jpeeler | 2009-05-01 12:40:46 -0500 (Fri, 01 May 2009) | 9 lines
    
    Fix DTMF not being sent to other side after a partial feature match
    
    This fixes a regression from commit 176701. The issue was that
    ast_generic_bridge never exited after the feature digit timeout had elapsed,
    which prevented the queued DTMF from being sent to the other side.
    
    This issue was reported to me directly.
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/channel.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/channel.c?view=diff&rev=191499&r1=191498&r2=191499
==============================================================================
--- branches/1.6.0/main/channel.c (original)
+++ branches/1.6.0/main/channel.c Fri May  1 13:19:05 2009
@@ -4447,6 +4447,13 @@
 
 	ast_poll_channel_add(c0, c1);
 
+	if (config->feature_timer > 0 && ast_tvzero(config->nexteventts)) {
+		/* nexteventts is not set when the bridge is not scheduled to
+ 		 * break, so calculate when the bridge should possibly break
+ 		 * if a partial feature match timed out */
+		config->nexteventts = ast_tvadd(ast_tvnow(), ast_samp2tv(config->feature_timer, 1000));
+	}
+
 	for (;;) {
 		struct ast_channel *who, *other;
 
@@ -4469,8 +4476,20 @@
 				}
 				break;
 			}
-		} else
+		} else {
+			/* If a feature has been started and the bridge is configured to 
+ 			 * to not break, leave the channel bridge when the feature timer
+			 * time has elapsed so the DTMF will be sent to the other side. 
+ 			 */
+			if (!ast_tvzero(config->nexteventts)) {
+				int diff = ast_tvdiff_ms(config->nexteventts, ast_tvnow());
+				if (diff <= 0) {
+					res = AST_BRIDGE_RETRY;
+					break;
+				}
+			}
 			to = -1;
+		}
 		/* Calculate the appropriate max sleep interval - in general, this is the time,
 		   left to the closest jb delivery moment */
 		if (jb_in_use)




More information about the asterisk-commits mailing list