Setting agent busy status

Hi -

I wrote a short dialplan extension that allowed me to set speed dial buttons on Cisco Phones to log the agent in and out of the queue. Each agent has two extensions. One uses the addqueuemember and the other the removequeuemember application.

In the queue being referenced the option ‘skip busy agents’ is selected. This is not working now and I can assume it is because I need to update the database so dialparties.agi can properly select the busy status.

Does anyone have any ideas on code extensions that would maintain the ‘skip busy agents’ functionality.

Thanks in advance.

You mentioned cisco phones, are you using SCCP or SIP firmware… and if SCCP, what module are you using?

Also, can you provide some additional info on your dialplan extension? It’s tough for us to give you some ideas on extending code, without knowing what code you are trying to extend.

Richard,

You are right, I should have posted more information. The phones are running SIP software.

The problem is that when I join the queue using this method the ‘skip busy agents’ does not skip the agent when they are on the phone. Logging in the normal 800* works fine.

[code]exten => 5223,1,Answer()
exten => 5223,n,AddQueueMember(800|SIP/223)
exten => 5223,n,Playback(agent-loginok)
exten => 5223,n,Wait(2)
exten => 5223,n,Hangup()

exten => 6223,1,Answer()
exten => 6223,n,RemoveQueueMember(800|SIP/223)
exten => 6223,n,Playback(agent-loggedoff)
exten => 6223,n,Wait(2)
exten => 6223,n,Hangup()
[/code]

I think it is as simple as your AddQueueMember is just formatted wrong.

Here is what I have for the original:
[macro-agent-add]

exten => s,n(a9),AddQueueMember(${ARG1},Local/${CALLBACKNUM}@from-internal/n)

and I can successully run the following:
asterisk -rx "queue add member Local/[email protected]/n to 800"
and skip busy works…

so I suspect instead of SIP/223 (which does work for calling) is just updating the database wrong.
Try using Local/[email protected] instead of SIP/223

If not, then I’m lost, but here is what you can try to narrow it down.

First, while the user is NOT in the queue, run this:
asterisk -rx “database show” > NotInQueue.txt
->Then join the queue in the method that works
asterisk -rx “database show” > QueueWorks.txt
->Then join the queue with your method
asterisk -rx “database show” > QueueNotWorks.txt

Then compare the 3 outputs, and you’ll likely find what in the database is not being updated right, and can resolve it.

Let us know!

Richard -

Appreciate the tip, I also see how you where able to find the entry in the dial plan. I should have noticed that agents joining the queue where displayed as local in the CLI.

I never saw anything in the database the Asterisk DB that seemed relevant.

The full test will come tomorrow, I will let you know.

Thanks…Scott