*45yyy*xxxx from CLI

We have fully remote cellphone agents that need to take calls via PSTN. We have been using @PitzKey’s work to build a login IVR that uses AddQueueMember. I am noticing using AddQueueMember to add agent to queues may be having unintended side effects, particularly in reporting. (Can’t see realtime agent status in Asternic and Sangoma Wallboard).

When we have extensions login via AddQueueMember, they show in asterisk info as:
Local/5621111@from-queue/n (ringinuse disabled) (dynamic) (Not in use) has taken no calls yet

Normally I would expect the entry to look more like:
John (Local/5621111@from-queue/n from hint:5621111@ext-local) (ringinuse enabled) (dynamic)

I know using *45yyy*xxxx may resolve this, but am looking for guidance on how to implement it. IT has to be via a dial-able IVR that agents can call from their cellphones.

I am thinking I need to replace the AddQueueMember with Dial, maybe? Any insights would be appreciated.
[q-agent-login-number]
exten => s,1,Read(agent,custom/log_alogin_enter,4,1,5)
exten => s,n,Read(queue,custom/log_qlogin_enter,4,1,5)
exten => s,n,Playback(custom/log_you_entered)
exten => s,n,SayDigits(${agent})
exten => s,n,SayDigits(${queue})
exten => s,n,Read(digi,custom/log_is_that_correct&custom/log_yes1_no2,1,1,5)
exten => s,n,GotoIf($["${digi}" = “1”]?qagentinconfirm:qagentinretry)

exten => s,n(qagentinconfirm),AddQueueMember(${queue},Local/${agent}@from-queue/n)

exten => s,n,playback(custom/log_agent_logged_in)
exten => s,n,SayDigits(${agent})
exten => s,n,playback(custom/log_goodbye)
exten => s,n,Hangup()
exten => s,n(qagentinretry),Playback(custom/log_invalid_response)
exten => s,n,Goto(qa-agent-login-number,s,1)
exten => s,n,Hangup()

Can you elaborate on this? What do you see there? They don’t show up at all?

Virtual extensions, as well as cellphone numbers will now show realtime information - such as who they are talking to, since it is not an endpoint.

Are these agents using virtual extensions? Otherwise, how do you plan on getting the names of these cellphones?

What I see there is this:
Local/5621111@from-queue/n (ringinuse disabled) (dynamic) (Not in use) has taken no calls yet

In Sangoma Wallboard and Asternic, it dosent show anyone singed into any queue. They are just blank.

The queue itself works (calls come in and agents answer), Reports>Asterisk>Queues show the agents logged in and correctly taking calls. It is just the reporting tools. And I am wondering if it has to do with the hint and display name missing.

I am not using virtual extension. I am instead using custom extensions and altering the dial field on the extension GUI.
local/CellPhoneNumber@from-internal

I am using custom (vs. CHAN/PJSIP) due to avoid creating an extension that can be registered on an endpoint (since they are 100% cell). I could use an normal extension and edit the dial field, if that made a difference.

Do you have FOP2 as well? I am curious how it looks there.

You can try to replace the AddQueueMember line with the following 4 lines, which is how FreePBX logs them in.

exten => s,n,ExecIf($[${DB_EXISTS(AMPUSER/${agent}/cidname)} = 1 & "${DB(AMPUSER/${agent}/queues/qnostate)}" != "ignorestate"]?AddQueueMember(${queue},Local/${agent}@from-queue/n,${DB(QPENALTY/${queue}/agents/${agent})},,${DB(AMPUSER/${agent}/cidname)},hint:${agent}@ext-local))
exten => s,n,ExecIf($[${DB_EXISTS(AMPUSER/${agent}/cidname)} = 1 & "${DB(AMPUSER/${agent}/queues/qnostate)}" = "ignorestate"]?AddQueueMember(${queue},Local/${agent}@from-queue/n,${DB(QPENALTY/${queue}/agents/${agent})},,${DB(AMPUSER/${agent}/cidname)}))
exten => s,n,ExecIf($[${DB_EXISTS(AMPUSER/${agent}/cidname)} = 0]?AddQueueMember(${queue},Local/${agent}@from-queue/n,${DB(QPENALTY/${queue}/agents/${agent})}))
exten => s,n,UserEvent(Agentlogin,Agent: ${agent})
1 Like

No FOP2, I will try the script and report back.

Alright @PitzKey
Okay, I played around further and noticed:

Dialplan:
AddQueueMember(${queue},Local/${agent}@from-queue/n,${DB(QPENALTY/${queue}/agents/${agent})},${DB(AMPUSER/${agent}/cidname)},,hint:${agent}@ext-local)

Produces:
J Test (Local/5612121@from-queue/n from hint:5612121@ext-local) (ringinuse disabled) (dynamic) (in call) (Not in use) has taken no calls yet

This looks correct and Queue Wallboard & Asternic shows the agent now, but FreePBX>Reporting>Asterisk Info>Queues & Asternic show the agent signed in but as not in use, even though they are on a queue call. The hint does not change while on the call either.


Removing one “,”

Dialplan:
AddQueueMember(${queue},Local/${agent}@from-queue/n,${DB(QPENALTY/${queue}/agents/${agent})},${DB(AMPUSER/${agent}/cidname)},hint:${agent}@ext-local)

Produces:
hint:5612121@ext-local (Local/5612121@from-queue/n) (ringinuse disabled) (dynamic) (Not in use) has taken no calls yet

This works, meaning Asternic and Queue Wallboard can see the agent status in realtime (Unavailable, Not in use, Busy), but the name shows up wrong (the name is showing the hint instead of the CID Name).

I feel like I am just missing one thing from being able to get this to work. Any ideas?

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