From 039864f4847dc5fcb2c26e236e5a8f4aa876f57d Mon Sep 17 00:00:00 2001 From: jpeeler Date: Tue, 17 Feb 2009 21:54:34 +0000 Subject: Modify bridging to properly evaluate DTMF after first warning is played The main problem is currently if the Dial flag L is used with a warning sound, DTMF is not evaluated after the first warning sound. To fix this, a flag has been added in ast_generic_bridge for playing the warning which ensures that if a scheduled warning is missed, multiple warrnings are not played back (due to a feature evaluation or waiting for digits). ast_channel_bridge was modified to store the nexteventts in the ast_bridge_config structure as that information was lost every time ast_channel_bridge was reentered, causing a hangup due to incorrect time calculations. (closes issue #14315) Reported by: tim_ringenbach Reviewed on reviewboard: http://reviewboard.digium.com/r/163/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@176701 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_features.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'res') diff --git a/res/res_features.c b/res/res_features.c index 7fadaa61a..05bbd7fe4 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1730,7 +1730,15 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast if (config->feature_timer) { /* Update time limit for next pass */ diff = ast_tvdiff_ms(ast_tvnow(), config->start_time); - config->feature_timer -= diff; + if (res == AST_BRIDGE_RETRY) { + /* The feature fully timed out but has not been updated. Skip + * the potential round error from the diff calculation and + * explicitly set to expired. */ + config->feature_timer = -1; + } else { + config->feature_timer -= diff; + } + if (hasfeatures) { /* Running on backup config, meaning a feature might be being activated, but that's no excuse to keep things going -- cgit v1.2.3