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()
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to