aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_agent.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-27 21:10:51 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-27 21:10:51 +0000
commit3b189af017af3e4984f5a87e92dba0f4b9f1e7c6 (patch)
tree5babc66b9ec83110297887edce0f6e92be5c97fa /channels/chan_agent.c
parent6e173df0b65126893d84a6fcc3578218e51280cc (diff)
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) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62218 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_agent.c')
-rw-r--r--channels/chan_agent.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index fac8aa049..cba176761 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -611,21 +611,19 @@ static int agent_indicate(struct ast_channel *ast, int condition, const void *da
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)