Can you please tell me is there a way to permanently login agent (until he/she logout).
As far as I can see I can login agent e.g. dialing some extension that will call AgentLogin() in dialplan. Problem is agent stays login only until hangup, which is unacceptable.
You can use AddQueueMember and RemoveQueueMember from the dialplan to dynamically add an agent to a queue, this does not require them to remain on the phone.
The solution are the dialplan applications I mentioned. You don’t use Agent channels for this. You add the SIP channel they are located at (determined when calling the extension that executes AddQueueMember) to the queue when they dial. When they are no longer there a different extension is dialed which removes them.
I know I can use SIP channel inside queue and that works as expected.
But I need Agent channel because my client wants to hear annonucement how long customer has been waiting into queue and then answer the call by pressing dtmf code, e.g. **
Feature that allows agent to answer call on dtmf press can be defined in agents.conf. That’s why I need to use agent channel instead od SIP.
Or I can use sip if you can tell me how to archieve answer on queue call using dtmf?
You can’t use Agent channels for it as that functionality no longer exists.
You can add a Local channel to the queue instead, which would call into the dialplan and execute additional logic. There are also Dial() options which can require a DTMF digit before accepting the call, and for playback to the called party.
You add a Local channel, for example: Local/1000@agent
This creates a channel which goes into the dialplan at extension 1000 in context agent. In that extension you can execute the Dial() application. Once answered then they would be connected to the caller in the queue.
Using Local channel in queue doesn’t ring them all (ringall method is set
in queue).
The other issue is that Dial doesn’t have option to not answer call on
pickup, but on dtmf input that is provided after pickup. I want to hear
announce from queue and regarding that choose whether to answer it or not.
Are you sure there is no way to use agents (to somehow permanently login
agents)? Where asterisk stores info about agent login, database?