Add timer for features so that backup bridge config can go away

The biggest change done here was elimination of the backup_config for use with
features. Previously, the bridging code upon detecting a feature would set the
start time of the bridge to the start time of the feature. Then after the 
feature had either expired or timed out the start time would be reset to the
true bridge start time from the backup_config. Now, the time differences are
calculated with respect to the newly added feature_start_time timeval instead.

There should be no behavior changes from the previous functionality aside from
the bridge timing being unaffected by either valid or partial feature matches.
Previously the timing would be increased by the length of time configured for
featuredigittimeout, which was probably never noticed.

(closes issue #14503)
Reported by: KNK
Tested by: jpeeler

Review: http://reviewboard.digium.com/r/179/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jeff Peeler
2009-04-08 21:00:39 +00:00
parent c02cec19b3
commit f57fddb5bb
3 changed files with 72 additions and 84 deletions

View File

@@ -738,6 +738,7 @@ struct ast_bridge_config {
struct ast_flags features_callee;
struct timeval start_time;
struct timeval nexteventts;
struct timeval feature_start_time;
long feature_timer;
long timelimit;
long play_warning;
@@ -745,7 +746,6 @@ struct ast_bridge_config {
const char *warning_sound;
const char *end_sound;
const char *start_sound;
int firstpass;
unsigned int flags;
void (* end_bridge_callback)(void *); /*!< A callback that is called after a bridge attempt */
void *end_bridge_callback_data; /*!< Data passed to the callback */