aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-24 20:44:34 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-24 20:44:34 +0000
commite603fcee14cc84dd6d0985177eddcbf52f7339bf (patch)
tree63d8b147bf1bd15f6d7990bc17af5af1ded9777f
parent98b4bffd3426c4a3d3a1e7172e1840e5bcf443c6 (diff)
Merged revisions 178374 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r178374 | russell | 2009-02-24 14:39:57 -0600 (Tue, 24 Feb 2009) | 14 lines Merged revisions 178373 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r178373 | russell | 2009-02-24 14:36:19 -0600 (Tue, 24 Feb 2009) | 6 lines Only set dtmfcount on BEGIN, and ensure it gets reset to 0 properly. (issue #14460) Reported by: moliveras Tested by: russell ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@178379 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--Makefile2
-rw-r--r--main/rtp.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 444a7e476..4e33a1330 100644
--- a/Makefile
+++ b/Makefile
@@ -234,7 +234,7 @@ endif
ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
ifeq ($(AST_DEVMODE),yes)
- ASTCFLAGS+=-Werror
+ #ASTCFLAGS+=-Werror
ASTCFLAGS+=-Wunused
ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
diff --git a/main/rtp.c b/main/rtp.c
index 8aad80a5b..6a0a95dfc 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1044,10 +1044,11 @@ static struct ast_frame *process_rfc2833(struct ast_rtp *rtp, unsigned char *dat
ast_log(LOG_DEBUG, "Ignoring RTP 2833 Event: %08x. Not a DTMF Digit.\n", event);
return &ast_null_frame;
}
-
+
if (ast_test_flag(rtp, FLAG_DTMF_COMPENSATE)) {
if ((rtp->lastevent != timestamp) || (rtp->resp && rtp->resp != resp)) {
rtp->resp = resp;
+ rtp->dtmfcount = 0;
f = send_dtmf(rtp, AST_FRAME_DTMF_END);
f->len = 0;
rtp->lastevent = timestamp;
@@ -1056,15 +1057,16 @@ static struct ast_frame *process_rfc2833(struct ast_rtp *rtp, unsigned char *dat
if ((!(rtp->resp) && (!(event_end & 0x80))) || (rtp->resp && rtp->resp != resp)) {
rtp->resp = resp;
f = send_dtmf(rtp, AST_FRAME_DTMF_BEGIN);
+ rtp->dtmfcount = dtmftimeout;
} else if ((event_end & 0x80) && (rtp->lastevent != seqno) && rtp->resp) {
f = send_dtmf(rtp, AST_FRAME_DTMF_END);
f->len = ast_tvdiff_ms(ast_samp2tv(samples, 8000), ast_tv(0, 0)); /* XXX hard coded 8kHz */
rtp->resp = 0;
+ rtp->dtmfcount = 0;
rtp->lastevent = seqno;
}
}
- rtp->dtmfcount = dtmftimeout;
rtp->dtmfsamples = samples;
return f;