Permanent agent login on asterisk 11 (similar to deprecated agentcallbacklogin)

Hello,

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.

Please help.

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.

2 Likes

Thanks,

but that’s not my issue. I have agents statically assigned to queue.

The problem is agent is not available to receive calls untill it’s logged in (not into queue but logged in from SIP phone as agent e.g. Agent/1004.)

Any solution for this?

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.

I know Dial() options but I need to answer the call from queue.

How can I use Dial() with call from queue?

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.

This looks good.

Thank you very much for quick answers and help.

Regards

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?

I use asterisk 11.

Thanks

In RAM, in data structures within the scope of chan_agent.c.

Each agent also has an associated thread, and is actually running in AgentLogin all the time.