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)
} 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 */
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));