From cc3938c1989d0b9f6a907ee2d64f2f66a01b2e29 Mon Sep 17 00:00:00 2001 From: russell Date: Fri, 19 Jan 2007 17:49:38 +0000 Subject: Merge the changes from the /team/group/vldtmf_fixup branch. The main bug being addressed here is a problem introduced when two SIP channels using SIP INFO dtmf have their media directly bridged. So, when a DTMF END frame comes into Asterisk from an incoming INFO message, Asterisk would try to emulate a digit of some length by first sending a DTMF BEGIN frame and sending a DTMF END later timed off of incoming audio. However, since there was no audio coming in, the DTMF_END was never generated. This caused DTMF based features to no longer work. To fix this, the core now knows when a channel doesn't care about DTMF BEGIN frames (such as a SIP channel sending INFO dtmf). If this is the case, then Asterisk will not emulate a digit of some length, and will instead just pass through the single DTMF END event. Channel drivers also now get passed the length of the digit to their digit_end callback. This improves SIP INFO support even further by enabling us to put the real digit duration in the INFO message instead of a hard coded 250ms. Also, for an incoming INFO message, the duration is read from the frame and passed into the core instead of just getting ignored. (issue #8597, maybe others...) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51311 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_iax2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'channels/chan_iax2.c') diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index c13ab667a..6204dcc23 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -776,7 +776,7 @@ static int iax2_answer(struct ast_channel *c); static int iax2_call(struct ast_channel *c, char *dest, int timeout); static int iax2_devicestate(void *data); static int iax2_digit_begin(struct ast_channel *c, char digit); -static int iax2_digit_end(struct ast_channel *c, char digit); +static int iax2_digit_end(struct ast_channel *c, char digit, unsigned int duration); static int iax2_do_register(struct iax2_registry *reg); static int iax2_fixup(struct ast_channel *oldchannel, struct ast_channel *newchan); static int iax2_hangup(struct ast_channel *c); @@ -2388,7 +2388,7 @@ static int iax2_digit_begin(struct ast_channel *c, char digit) return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF_BEGIN, digit, 0, NULL, 0, -1); } -static int iax2_digit_end(struct ast_channel *c, char digit) +static int iax2_digit_end(struct ast_channel *c, char digit, unsigned int duration) { return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF_END, digit, 0, NULL, 0, -1); } -- cgit v1.2.3