AgentRequest() And Which Agent Id?

Home » Asterisk Users » AgentRequest() And Which Agent Id?
Asterisk Users 3 Comments

If agents are already logged in via AgentLogin() and users dialled extension
300 which will be placed in Queue(support-queue).

How to find out which agent is available I can put their Agent id in AgentRequest() ?

If this is not a good approach then how it should be done?

Agent should automatically get next call when he/she is available.

extensions.conf

[LocalSets]
exten => 300,1,Answer()
same => n,Queue(support-queue)
same => n,hangup

[agents] ;callback exten => 800,1,AgentRequest(????) ; How to get Agent id that is available to take call?
same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
same => n,Playback(silence/1)
same => n,Hangup()

Example in the queue.conf

member => Local/800@agents,0,Name 1,Agent:1001
and more..

3 thoughts on - AgentRequest() And Which Agent Id?

  • Replace above line with the following line if your agent-ids are 4 digit numeric:
    exten => _XXXX,1,AgentRequest(${EXTEN})

    Replace the above line for agent 1001 with the following:
    member => Local/1001@agents,0,Name,1,Agent:1001

    For other agents follow the similar pattern:
    member => Local/@agents,0,Name,1,Agent:

    Richard

  • Thank you. I will test it today.

    Is it possible to build a list of agent-id in MySQL Database rather than agent.conf?

    I am not sure what is the best approach, maybe you can give me some direction.

  • Look at extconfig.conf.sample for using a database to hold the contents of an agents.conf file.

    Either way is fine as unused static agents don’t use much memory.

    Richard