Agents and queue authentication problems

Dearest friends,
I gave you a little respite after the important information and help I received last week. In the meantime, I have tried, weather permitting, to continue understanding the Asterisk ecosystem.
This time I have some difficulties. I must say that in some sections, the available documentation is not clear enough.
Coming to the point, I set out to approach queues and create agents that could log on to a queue from any phone device. If I have not misunderstood, the steps to be taken are as follows:

1. In agents.conf

fullname=Jhon Doe
agent => 8888,2708,xxxx-mob-lv

2. pjsip_wizard.conf
inbound_auth/password=X ? cUmy2? HvG&dnxq*! V

3. queues.conf

Here is my extension.conf where the extension is configured to login:


exten=> 1099,1,AgentLogin(8888)
exten=> 1100,1,Queue(xxxx-test)

Dialing 1099 AgentLogin should ask for the password and authenticate the operator on the device from which it is requesting authentication. Calling 1100 should be added to the queue xxxx-test-

Unfortunately I get the following authentication error:

Executing [1099@dialxxxx:1] AgentLogin (“PJSIP/xxxx-desk-lv-val-00000061”, “Agent/8888”) in new stack
> 0x7f2e6c041c10 – Strict RTP learning after remote address set to: 93.XXX.XXX.XXX:12240
> 0x7f2e6c041c10 – Strict RTP switching to RTP target address 93.XXX.XXX.XXX:12240 as source
– Agent ‘Agent/8888’ does not exist.

I’m trying to authenticate myself from the phone
I also tried to insert AgentLogin(8888) (without Agent/), but I got a similar error.

Where and what am I doing wrong?
Moreover, I am not really clear on the meaning of AgentLogin, which wants agentId as a mandatory parameter. I do not know in advance which agent id, composing the extension 1099, would like to authenticate.
I would like a queue to have agents who can authenticate themselves inside a queue by entering agentId and password and hang up the phone until an incoming call in that queue rings the phone the agent has authenticated to. Last question, how do I make a label appear on the phone display that informs which queue the call comes from? How is it possible to log out? Is it possible that after a certain number of unanswered calls from the agent and/or unused, the agent is automatically removed from the queue?

Thank you very much.

Before the agent logic was radically updated, there used to be an AgentCallbackLogin.

However, for many years, the advice has been to use Local channels as the queue members, and handle registration for callback in dialplan code. That’s what many FreePBX users seem to do.

There is an article on this at Migrating from AgentCallbackLogin() to Standard Dialplan Methods (part 1) | Asterisk, and other worldly endeavours. however, it is quite old, and I am not sure whether it is still valid.

Dear @david551 ,
Thank you so much. I realized that something had changed over time. But it is still not clear to me how the goal I set myself can be achieved, which I believe is a fairly common and fundamental goal in managing an inbound call center. Thanks again for your availability and kindness. I will keep you updated on my progress and/or failures! LoL

I went through this a while back, took me a while to figure it out.


monitor-type = MixMonitor
persistentmembers = yes
musicclass = silence
joinempty = no
member => Local/501@agents,,Jay,Agent:501


exten = _XXX,1,NoOp(Set active variable)
same = n,Set(CHANNEL(dtmf_features)=H)
;same = n,Set(CONNECTEDLINE(all)="Awaiting call" <${EXTEN}>)
same = n,Answer()
same = n,AgentLogin(${EXTEN})
same = n,Hangup()
same = n,NoOp(End Variable)

exten = _XXX,1,NoOp()
same = n,AgentRequest(${EXTEN})
same = n,Congestion()



From there I have an extension in the context for my phone:

exten = 6000,1,Goto(agent_login,501,1)

I don’t have anything in pjsip.conf for call queues. The method greatly changed and pretty much 99% of the information out there for setting it up is incorrect.

Converting from chan_agent to app_agent_pool ⋆ Asterisk is the document that made everything fall in to place for me.

Hello @dewdude ,
Thank you for your contribution.
A couple of things are not clear to me:
Does the agent have a password?
Can’t I have a single extension for all agents to authenticate on? I suppose there is an asterisk application that the agentId asks to insert the agentId and the password if not indicated.
Am I missing something?
Thank you so much.

I will fully admit I didn’t worry about authentication since I’m the only user of my PBX. But with the way my contexts are setup you can only login as an agent from a specific phone. I think one of the examples I read buried on the internet didn’t have authentication either since only a specific set of phones would have the agent login context and there’d be some sort of physical access anyway (employees in a call center)

The documentation doesn’t indicate so and my testing said no. You can, in theory, have a single extension for agents to auth on and use the AUTHENTICATE function to require a password…but there’s no option to enter agent ID. You could automate that by using part of the extension as the agent ID and make the dialplan generate the agentid…but you’ll have to still configure each agent in your configs.

Hi @dewdude,
Thank you for your further reply.
Not how to realize what you recommend, but I’ll try.
But I’m really confused.
The solution you previously posted to me works, but the prerequisite for it to work is that once logged in is that I have to keep the handset off the hook. So again, I’m missing something, or I’m really perplexed. How is it possible to manage such a situation in a context where several people can go from time to time to authenticate themselves on different (not busy) phones? Thus Asterisk could not manage any type of Inbound call center. I am confused, and thank you again for your help.

Hi @dewdude,
I apologize, but why with AgentLogin do I have to keep the phone handset up to stay logged in? If not, is the agent automatically logged out? Don’t understand the meaning? Is there a way to authenticate and hang up while remaining logged in?
Thank you

Hello @jcolp ,
Sorry if I write on this old post.
I don’t have much experience with Asterisk yet. But I think I have the same problem. I need a person who works in a call center to access a queue after login and log out with a logout. Since the person (Agent) who works at the Call Center does not have a dedicated device but accesses the first free device (telephone), I need to authenticate on the queue, also because otherwise, I do not understand how reporting could be carried out. Also, for security reasons, I cannot let a person access the queue by guessing only the agentId of a colleague.
Could you help me understand with an example of how to do it? Thank you so much.

Please don’t tag me. If I have anything of value to add to threads, then I post on them.

I’m sorry.
Thank you,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.