diff --git a/channels/chan_agent.c b/channels/chan_agent.c index f3c33b434f..f18461e2e8 100644 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -2012,7 +2012,10 @@ static int login_exec(struct ast_channel *chan, void *data) } else { p->wrapuptime = wrapuptime; } - tmpoptions = pbx_builtin_getvar_helper(chan, "AGENTACCEPTDMTF"); + tmpoptions = pbx_builtin_getvar_helper(chan, "AGENTACCEPTDTMF"); + if (ast_strlen_zero(tmpoptions)) { + tmpoptions = pbx_builtin_getvar_helper(chan, "AGENTACCEPTDMTF"); + } if (!ast_strlen_zero(tmpoptions)) { p->acceptdtmf = *tmpoptions; ast_verb(3, "Saw variable AGENTACCEPTDTMF=%s, setting acceptdtmf to: %c for Agent '%s'.\n", tmpoptions, p->acceptdtmf, p->agent);