Queues where agent also can make phonecalls

Well, i already have setup a “normal” queue on asterisk.
The problem i am facing atm is:

I need to make a queue where agents should be able to make phonecalls while they are in the queue. But there is a problem, when the agent is making a call, he cant be called on the queue.

So, take agent out of the queue, make the call, take him back in?
How to make this so taht agent dont need to push any buttons?
Does someone had done such Queues before?
Does someone have seen such queues on the web?

any help is welcome :smile:

update: can this be done with queues at all? without a database?

can hotdesking be a possibility?

I guess you could issue a pausequeuemember application for this. I’m sure there are other better ways to do this (maybe with call limits?) but here is 1 idea. (Not tested)

For example, in the agents context the outbound extension match looks like this:

[code]exten => NXXNXXXXXX,1,PauseQueueMember(|${AGENTBYCALLERID${CALLERID(num)}})
exten => _NXXNXXXXXX,n,Set(PAUSED=1)
exten => _NXXNXXXXXX,n,Dial(…)

exten => h,1,GotoIf($["${PAUSED}"=“1”]?:end)
exten => h,n,UnPauseQueueMember(|${AGENTBYCALLERID_${CALLERID(num)}})
exten => h(end),n,NoOp(Done)
[/code]

tried this idea, was a great start until i found out that i get no values for the Variables and that i cant dial anything while i am in the queue. :frowning:

Fix the issue with the callerid not showing 1st. If you Noop(${CALLERID(num)}) and it is blank you should resolve that.
How are you setting the callerid for the agents phones? In sip.conf or in the phone config? Try hard coding the callerid for each agent in sip.conf. Are you using 1.4 or 1.2? The example I posted above was for 1.4.

Here is a sample from my sip.conf showing how it can be set on the server side as well as using a template for maintainability.

[code]; My Users Template
users
context=default
canreinvite=no
nat=no
type=friend
disallow=all
allow=ulaw
host=dynamic

; List of Users
1223
callerid=My Full Name <1223>
mailbox=1223@default
secret=xxxxxxxxxx
username=1223
1220
callerid=Some User <1220>
mailbox=1220@default
secret=xxxxxxxxxx
username=1220
1226
callerid=Some Other User <1226>
mailbox=1226@default
secret=xxxxxxxxxx
username=1226
[/code]

Well, when my agents join the queue with AgentLogin() tehy cannot set themselves on pause, because they arent able to dial anything. Only possibility they have is to end the queue when they hangup the phone.
Maybe i have set something wrong, but where :confused:

AgentLogin

exten => 68,1,Answer()
exten => 68,n,AgentLogin()
exten => 68,n,NoOp(${AGENTNUMBER})
exten => 68,n,Hangup()

sip.conf

[27]
username = 27
type = friend
secret = 1234
callerid = "backoffice_27"
context = backoffice
host = dynamic
[28]
username = 28
type = friend
secret = 1234
callerid = "backoffice_28"
context = backoffice
host = dynamic

Extensions.conf


;Telefon Snom 27

exten => 27,1,Set(INCRufnummer=${CALLERID(num)})
exten => 27,n,SayDigits(${INCRufnummer})
exten => 27,n,NoOp(${CONTEXT})
exten => 27,n,Set(CALLERID(num)=${CONTEXT}@(${INCRufnummer}))                                       
exten => 27,n,Answer()
exten => 27,n,Dial(SIP/27,10,Tt)

;Telefon Snom 28

exten => 28,1,Set(INCRufnummer=${CALLERID(num)})
exten => 28,n,SayDigits(${INCRufnummer})
exten => 28,n,NoOp(${CONTEXT})
exten => 28,n,Set(CALLERID(num)=${CONTEXT}@(${INCRufnummer}))
exten => 28,n,Answer()
exten => 28,n,Dial(SIP/28,10,Tt)

2 Things.

Change from using AgentLogin to AgentCallBackLogin.

Fix where you are setting the callerid in sip.conf. You are not specifying the numeric extension.

Hi,

I would like to help but I don’t understand what you are saying here;

But there is a problem, when the agent is making a call, he cant be called on the queue.

Are you saying you don’t want the agent to be called if they are on a call?

We use queues I have a setting; ringinuse = no so if the agent is on a call they don’t get called.

[quote=“bwilks”]
Hi,

I would like to help but I don’t understand what you are saying here;

But there is a problem, when the agent is making a call, he cant be called on the queue.

Are you saying you don’t want the agent to be called if they are on a call?

We use queues I have a setting; ringinuse = no so if the agent is on a call they don’t get called.[/quote]

when i use AgentLogin()
The logged in user always get the call through, when he isnt on a call.
He also cant make outbound calls aslong he is in queue. To do so he must logout from queue, make the call and loginback to the queue.

Aye, did this already, but AgentCallBackLogin is marked to be deprecated in future.

thats how i set it up atm:

exten => 67,1,Answer()
exten => 67,n,Set(platz=${CALLERID(num)}|)
exten => 67,n,NoOp(${AGENTNUMBER})
exten => 67,n,AgentCallbackLogin(${AGENTNUMBER}||${platz}@backoffice)
exten => 67,n,Hangup()

so the Agents are logging in.

for logging out i am using:

exten => _9XXX,1,Answer()
exten => _9XXX,n,System(asterisk -rx "agent logoff Agent/${EXTEN:1}")

[backoffice]

[27]
username = 27
type = friend
secret = 1234
callerid = "27"
context = backoffice
host = dynamic

[28]
username = 28
type = friend
secret = 1234
callerid = "28"
context = backoffice
host = dynamic

But still asking myself how to get the functionality of AgentCallbacklogin → Agentlogin.

The idea with queue pause the member is nice, but it cant work when the queue member cant call anything ;/

Why carn’t your agents make calls? We don’t have this problem.
How do you have it setup?

In your last example, the callerid should be as follows.

[code][27]
username = 27
type = friend
secret = 1234
callerid = Agent 27 <27>
context = backoffice
host = dynamic

[28]
username = 28
type = friend
secret = 1234
callerid = Extension 28 <28>
context = backoffice
host = dynamic [/code]

Yes agentcallbacklogin is going to be deprecated. If you look in doc/queues-with-callback-members.txt there is an example of how to do it in asterisk versions going forward. (Including pause/unpause)

already looked into it, cant figure it out tho :confused:

Here is a sample with the “new” way, change the extensions to the one you want to use. It assumes your agents are in the agents context and you are only logging into 1 queue “somequeuename”.

[code]exten => login,1,Answer()
exten => login,n,Read(AID,agent-user);
; Next line I used to authenticate against the agents.conf file,
; The agents in this scenerio did not have voicemail
; This could change to VMAuthenticate as the other example uses if needed.
exten => login,n,Authenticate(${AGENT(${AID}:password)})
exten => login,n,AddQueueMember(somequeuename|Local/${CALLERID(num)}@agents/n)
exten => login,n,Playback(agent-loginok)
exten => login,n,Hangup

exten => logout,1,Answer()
exten => logout,n,RemoveQueueMember(somequeuename|Local/${CALLERID(num)}@agents/n)
exten => logout,n,Playback(agent-loggedoff)
exten => logout,n,Hangup

exten => pause,1,Answer()
exten => pause,n,PauseQueueMember(|Local/${CALLERID(num)}@agents/n)
exten => pause,n,PlayTones(stutter)
exten => pause,n,Wait(1.2)
exten => pause,n,Hangup

exten => unpause,1,Answer()
exten => unpause,n,UnPauseQueueMember(|Local/${CALLERID(num)}@agents/n)
exten => unpause,n,Playback(silence/1)
exten => unpause,n,Playback(available)
exten => unpause,n,Hangup
[/code]

i aint getting through it tbh.

What do the agents have to dial to come into the queue?
Cant see the jump in point, where the agents come to authentificate.

Maybe i totaly misunderstand what it is about :confused:

login,n,Authenticate(${AGENT(${AID}:password)})

–> channel Agent, AID = Agent ID : password from the Agents.conf

exten => login,n,AddQueueMember(somequeuename|Local/${CALLERID(num)}@agents/n)

Ok, logging in the agent into the somequeuename,
where is local coming from?
with CALLERID(num) = AgentID from agents.conf
@ agent context

[quote=“disceptator”]i aint getting through it tbh.

What do the agents have to dial to come into the queue?
Cant see the jump in point, where the agents come to authentificate.

Maybe i totaly misunderstand what it is about :confused:

where is local coming from?[/quote]

Change login, logout, pause, unpause to the extensions you wish to use to perform those actions. For example, if you want to use *54 to have agents log into the system. Change the login example to be:

; Agent Login exten => *54,1,Answer() exten => *54,n,Read(AID,agent-user); exten => *54,n,Authenticate(${AGENT(${AID}:password)}) exten => *54,n,AddQueueMember(somequeuename|Local/${CALLERID(num)}@agents/n) exten => *54,n,Playback(agent-loginok) exten => *54,n,Hangup
The extension names were just examples to signify what they do. Using Local to specify the device is so you can use multiple channel types. As long as asterisk can get to the agents extension in the agents context, it should work.

Now i halfway through it :bulb: , BIG THANKS.
althought still having problems with the read command.
It should read the agent logins from the agents.conf file, but it doesnt.

user login is : 303 and pass: 0000

the authentification failed and user is prompted for password.

Or is my problem that userid must be callerid? and must be specified in the sip.conf at the stations name?

[quote=“disceptator”]Now i halfway through it :bulb: , BIG THANKS.
althought still having problems with the read command.
It should read the agent logins from the agents.conf file, but it doesnt.

user login is : 303 and pass: 0000

the authentification failed and user is prompted for password.

Or is my problem that userid must be callerid? and must be specified in the sip.conf at the stations name?[/quote]

The userid it received was 302… Once you get passed the authentication, you will have problems with the next step unless you resolved the callerid problem on the sip peers.

This is my dilemma too.
I’d like to use AgentLogin() because of it’s always-loggedin-and-incoming-call-beeps functionality. Trying to minimize as many steps as possible for the Agent to potentially waste time on.

Also minimizing lost calls, and deadair (possibly caused due to caller hanging up yet the call still comes through to the agents).

But during this procedure, the agent is always-on, so the agent cannot make an outbound call unless the agent logs out of the queue by exiting the softphone.

So is there a way to actually make a call while logged in? I think that’s what the OP wants to do as well.

Let’s see your configs we use queues and the agents can still make calls.

But how? The agent is basically ON a call. I’m not talking about AgentCallbackLogin(), I’m talking about AgentLogin().

[quote]Asks the agent to login to the system. Always returns -1. While
logged in, the agent can receive calls and will hear a ‘beep’
when a new call comes in. The agent can dump the call by pressing
the star key.
[/quote]

AgentLogin requires the agent to login to the system, and once logged in, Asterisk keeps this agent constantly logged on and on a constant call connection with Asterisk. When a real call comes by, the agent hears a beep in his/her ear and the call is autoanswered.

Due to this nature of the agent being always-on, I find it a little hard to believe that agents can make calls. Unless you have some kind of a DTMF procedure that puts the agents on a dialtone?