How to prevent Queue app from dispatching a caller to the logged in Agent

Hello,

I have two Agents with IDs say 5001 (logged in with PJSIP/5001 soft-phone) , 5002 (logged in with PJSIP/5002 soft-phone)
both are members of the same queue, to be requested on “agents” context.

Agent Show 5001

outputs

.
State: NOT_INUSE
LoggedInChannel: PJSIP/5001-00000005
.

and here is my “agents” context:

[agents]
exten => _XXXX,1,NoOp(Direct Transfer to Agent , called with extension: <${EXTEN}> by )

same => n,Set(agent_id={EXTEN}) same => n,Set(agent_state={DEVICE_STATE(agent:{agent_id})}) same => n,NoOp(Before requestion agent id {agent_id} . state is : {agent_state}) same => n,AgentRequest({EXTEN})
same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
same => n,Congestion()

both phone extensions are able to call each other (while both are in logged in state for there corresponding agents) or even external numbers.

Now if agent 5001 calls 5002 with the phone keypad, their state is still NOT_INUSE. and the queue still dispatches the Queued callers to any of those agents and all voice channels of the 3 parties mixes together.

I’m confused, how the Queue system dispatches the queued caller to the agents context (where there is AgentRequest application) while he is in fact busy in another call with another agent ?

Please provide the memeber entries from queues.conf, including, in particular, the state interface parameters.

I use realtime for the queues.

here are the only contents of the queues.conf

[general]
persistentmembers = yes

and here is the record , in queues table:

name:Jordan
musiconhold: moh_music
context: from_ivrs
wrapuptime: 10
strategy: rrmemory

other fields values are null

agents are registered using “static” realtime

I’ve added the agents using CLI like this:
queue add member Local/5001@agents to Jordan

in fact, I ignore (penality, as membername and state_interface) settings.

queue show Jordan

Output:

Jordan has 0 calls (max unlimited) in ‘rrmemory’ strategy (0s holdtime, 0s talktime), W:0, C:7, A:0, SL:71.4%, SL2:71.4% within 0s
Members:
Local/5001@agents (ringinuse enabled) (dynamic) (Not in use) has taken 4 calls (last was 160 secs ago)
Local/5002@agents (ringinuse enabled) (dynamic) (Not in use) has taken 3 calls (last was 290 secs ago)
No Callers

Local channels don’t have useful states. You need to use state interface.

I’ve tried this in CLI :

queue add member Local/5001@agents penalty 1 as Assem_5001 state_interface Agent:5001

as I’ve used information her:
https://blogs.asterisk.org/2016/02/10/converting-from-chan_agent-to-app_agent_pool/

still the same!

seems that I couldn’t comprehend the state interface with regards to agents .
I couldn’t find (recent) clear text that explains state interface and how can be related to agents (or devices that they use in log in) !

The agents: syntax is after my time, do I don’t know if it will work in that context. Unfortunately finding out requires trawling more code than I can do in answering a forum question.

1 Like

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