Hello all,
How can we do an agent login (agent id / password / phone extension) with the ‘originate’ manager api?
What are the required api parameter values?
What are the required Asterisk settings (in conf files)?
I have found the following but It is not enough clear for me (for example I don’t found any reference to the agent password):
Login / Logout using the Manager API
I had a need to be able to login/Logout agents from management console that I developed to manage ACD queues.
My solution was to setup some extension and use the manager originate command to dial those extensions allowing me to login/logout agents.
To extensions.conf add
exten => 02000000001,1,AgentCallBackLogin(${CALLERIDNUM}|s|${CALLERIDNUM}@to-your-agent-context)
exten => 02000000002,1,Dial(Local/02000000003/n,D(#))
exten => 02000000003,1,AgentCallbackLogin(${CALLERIDNUM}|s|’#’)
; for local channel
exten => 1234,1,Answer
exten => 1234,2,Hangup
use the manager API originate command to login/logout see examplse below
Action: Originate
Channel: Local/02000000001/n
Context: default’
Exten: 1234
Priority: 1
Callerid:
Timeout: 30000’
to logout do exactly the same but change the channel to Local/02000000002/n as per the dial-plan.