diff options
author | Olle Johansson <oej@edvina.net> | 2011-09-30 13:21:17 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2011-09-30 13:21:17 +0000 |
commit | 6e0f9614321ab92b637f69f53d7025923f38f1e3 (patch) | |
tree | 193d58ab5f4dc16b59399010ac2caf356571d3ef /main/features.c | |
parent | dbb8332ff7d71f397d8d215ffd02def3b5ef110f (diff) |
Preserve DTMF length in main/features.c
Review: https://reviewboard.asterisk.org/r/1463/
A small part of much larger work with DTMF duration in Asterisk,
funded by IPvision AS in Denmark.
Thanks to irroot for the review!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/features.c b/main/features.c index ac41a358c..f194274ff 100644 --- a/main/features.c +++ b/main/features.c @@ -3908,11 +3908,11 @@ int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer, struct a digits to come in for features. */ ast_debug(1, "Timed out for feature!\n"); if (!ast_strlen_zero(peer_featurecode)) { - ast_dtmf_stream(chan, peer, peer_featurecode, 0, 0); + ast_dtmf_stream(chan, peer, peer_featurecode, 0, f->len); memset(peer_featurecode, 0, sizeof(peer_featurecode)); } if (!ast_strlen_zero(chan_featurecode)) { - ast_dtmf_stream(peer, chan, chan_featurecode, 0, 0); + ast_dtmf_stream(peer, chan, chan_featurecode, 0, f->len); memset(chan_featurecode, 0, sizeof(chan_featurecode)); } if (f) @@ -4039,6 +4039,7 @@ int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer, struct a } else if (f->frametype == AST_FRAME_DTMF_END) { char *featurecode; int sense; + unsigned int dtmfduration = f->len; hadfeatures = hasfeatures; /* This cannot overrun because the longest feature is one shorter than our buffer */ @@ -4072,7 +4073,7 @@ int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer, struct a res = feature_interpret(chan, peer, config, featurecode, sense); switch(res) { case AST_FEATURE_RETURN_PASSDIGITS: - ast_dtmf_stream(other, who, featurecode, 0, 0); + ast_dtmf_stream(other, who, featurecode, 0, dtmfduration); /* Fall through */ case AST_FEATURE_RETURN_SUCCESS: memset(featurecode, 0, sizeof(chan_featurecode)); |