Deepak Rawat
2014-Aug-12 06:33 UTC
[asterisk-users] Asterisk 12.4 "Agent Busy" message on AgentRequest
Hi, I am upgrading from Asterisk 1.4 to 12.4. I am able to authenticate the user and call AgentLogin. But after that when I call AgentRequest I keep getting Agent '1234' is busy. If I put a delay of 5 second or more before calling AgentRequest then it works most of the times. Here's my dialplan: [login] exten => s,1,Background(thank-you-for-calling) same => n,WaitExten(.65) same => n,Background(press-1) same => n,WaitExten(15) exten => 1,1,Read(USER,"agent-user") same => n,Authenticate(${ODBC_AGENTPASSWORD(${USER})}) same => n,AgentLogin(${USER}) same => n,NoOp(${USER} AGENT_STATUS is ${AGENT_STATUS}) same => n,Hangup() [agents] exten => _X.,1,Set(UserNumber=${EXTEN}) same => n,Wait(5) ; it works most of the time with this wait of 5s same => n,AgentRequest(${EXTEN}) same => n,NoOp(${EXTEN} AGENT_STATUS is ${AGENT_STATUS}) same => n,Dial(Agent/${EXTEN},,g) same => n,NoOp(Dial Status: ${DIALSTATUS}) same => n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?done) same => n(done),Hangup() -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140812/5bc06f6e/attachment.html>
Richard Mudgett
2014-Aug-12 15:57 UTC
[asterisk-users] Asterisk 12.4 "Agent Busy" message on AgentRequest
On Tue, Aug 12, 2014 at 1:33 AM, Deepak Rawat <deepaksingh.rawat at gmail.com> wrote:> Hi, > > I am upgrading from Asterisk 1.4 to 12.4. I am able to authenticate the > user and call AgentLogin. But after that when I call AgentRequest I keep > getting Agent '1234' is busy. > If I put a delay of 5 second or more before calling AgentRequest then it > works most of the times. Here's my dialplan: > > [login] > exten => s,1,Background(thank-you-for-calling) > same => n,WaitExten(.65) > same => n,Background(press-1) > same => n,WaitExten(15) > exten => 1,1,Read(USER,"agent-user") > same => n,Authenticate(${ODBC_AGENTPASSWORD(${USER})}) > same => n,AgentLogin(${USER}) > same => n,NoOp(${USER} AGENT_STATUS is ${AGENT_STATUS}) > same => n,Hangup() > > [agents] > exten => _X.,1,Set(UserNumber=${EXTEN}) > same => n,Wait(5) ; it works most of the time with this wait of 5s > same => n,AgentRequest(${EXTEN}) > same => n,NoOp(${EXTEN} AGENT_STATUS is ${AGENT_STATUS}) > same => n,Dial(Agent/${EXTEN},,g) > same => n,NoOp(Dial Status: ${DIALSTATUS}) > same => n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?done) > same => n(done),Hangup() >There is an initial 5 second wait after an agent logs in. The wait is a necessary probation period to allow any local channel chain that the agent may have to optimize out. If the agent local channel optimization happens while the agent is on a call then the agent pool can lose track of the agent and the agent will be logged out. The agent will then have to log back in after the current call completes. Why are you attempting to request an agent that has a device state (Agent:agent_id) of busy anyway? That agent could be on another call or in a between call wrap-up time. Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140812/b84cc54a/attachment.html>