[asterisk-commits] russell: trunk r62219 - in /trunk: ./
channels/chan_agent.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Apr 27 14:11:47 MST 2007
Author: russell
Date: Fri Apr 27 16:11:46 2007
New Revision: 62219
URL: http://svn.digium.com/view/asterisk?view=rev&rev=62219
Log:
Merged revisions 62218 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r62218 | russell | 2007-04-27 16:10:51 -0500 (Fri, 27 Apr 2007) | 11 lines
Fix a weird problem where when a caller talking to someone sitting behind an
agent channel sent a digit, the digit would be played to the agent for forever.
This is because chan_agent always returned -1 from its send_digit_begin and _end
callbacks. This non-zero return value indicates to the Asterisk core that it
would like an inband DTMF generator put on the channel. However, this is the
wrong thing to do. It should *always* return 0, instead. When the digit begin
and end functions are called on the proxied channel, the underlying channel
will indicate whether inband DTMF is needed or not, and the generator will be
put on that one, and not the Agent channel.
(issue #9615, #9616, reported by jiddings and BigJimmy, and fixed by me)
........
Modified:
trunk/ (props changed)
trunk/channels/chan_agent.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=62219&r1=62218&r2=62219
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Fri Apr 27 16:11:46 2007
@@ -604,21 +604,19 @@
static int agent_digit_begin(struct ast_channel *ast, char digit)
{
struct agent_pvt *p = ast->tech_pvt;
- int res = -1;
ast_mutex_lock(&p->lock);
ast_senddigit_begin(p->chan, digit);
ast_mutex_unlock(&p->lock);
- return res;
+ return 0;
}
static int agent_digit_end(struct ast_channel *ast, char digit, unsigned int duration)
{
struct agent_pvt *p = ast->tech_pvt;
- int res = -1;
ast_mutex_lock(&p->lock);
ast_senddigit_end(p->chan, digit, duration);
ast_mutex_unlock(&p->lock);
- return res;
+ return 0;
}
static int agent_call(struct ast_channel *ast, char *dest, int timeout)
More information about the asterisk-commits
mailing list