From f91595d103f5afcf8b525f8481ef0bd6f9e5ac6f Mon Sep 17 00:00:00 2001 From: russell Date: Fri, 19 Jan 2007 18:06:03 +0000 Subject: Merged revisions 51311 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51311 | russell | 2007-01-19 11:49:38 -0600 (Fri, 19 Jan 2007) | 23 lines 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/trunk@51314 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_mgcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'channels/chan_mgcp.c') diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index bdb704754..ce685527c 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -428,7 +428,7 @@ static int mgcp_write(struct ast_channel *ast, struct ast_frame *frame); static int mgcp_indicate(struct ast_channel *ast, int ind, const void *data, size_t datalen); static int mgcp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan); static int mgcp_senddigit_begin(struct ast_channel *ast, char digit); -static int mgcp_senddigit_end(struct ast_channel *ast, char digit); +static int mgcp_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration); static int mgcp_devicestate(void *data); static const struct ast_channel_tech mgcp_tech = { @@ -1282,7 +1282,7 @@ static int mgcp_senddigit_begin(struct ast_channel *ast, char digit) return -1; } -static int mgcp_senddigit_end(struct ast_channel *ast, char digit) +static int mgcp_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration) { struct mgcp_subchannel *sub = ast->tech_pvt; char tmp[4]; -- cgit v1.2.3