Agent status & BLF

Hi guys,

Testing Call Center Queues with agents for the first time; going well so far and queues are all working and agents log in/log out fine.

What we're now trying to achieve is to use one of the buttons on the Yealink's to show the anget's queue status (available / not available) using BLF.

We already have a button set-up that logs an agent in an out; we'd like to use that same button for agent queue status/BLF. If that's not possible, we can use another key for BLF/status (we have sidecars for each phone, so plently of spare keys).

Is it possible to use BLF for agent status within a call center queue? Has anyone attempted / succeeded with this and can offer any pointers?



Staff member
I have definitely done this, cannot remember how but I definitely had BLF, and still do at one of my clients, if I remember rightly though I could not do it on a single button, I think I had top button showing status and bottom button doing the actual login/out.
Yeah I got the button that does login / out via DTMF tone and adds a pause then inputs password. Not very sleek but does the job. Seems too messy adding a different button just for the BLF though, I'd probably prefer a web app?


Staff member
Can't remember what I did, just looked at the lua that sets it, its this:
                --set presence in - turn lamp on
                        if (action == "login") then
                                event = freeswitch.Event("PRESENCE_IN");
                                event:addHeader("proto", "sip");
                                event:addHeader("login", agent_name.."@"..domain_name);
                                event:addHeader("from", agent_name.."@"..domain_name);
                                event:addHeader("status", "Active (1 waiting)");
                                event:addHeader("rpid", "unknown");
                                event:addHeader("event_type", "presence");
                                event:addHeader("alt_event_type", "dialog");
                                event:addHeader("event_count", "1");
                                event:addHeader("unique-id", agent_uuid);
                                event:addHeader("Presence-Call-Direction", "outbound");
                                event:addHeader("answer-state", "confirmed");
So that looks like you would be subscribing to agent_name@domain_name
Thanks Daz, you are a legend. The only issue I had was the agent name was the same as the extension number so it was not working correctly.

Once I changed the agent name to something different, then set up the BLF with agent_name@domain_name it works a treat.
I managed to get them to turn on with above method but they only show logged in for a few minutes then go off, they will come back on when the user logs off and back on again.
I'm using version 4.4.3
For status change with a single button you have to add a rule in your dialplan.

As agent name i have jvs[ext] so BLF is working on this but when you press the BLF it send jvs[ext] to fusionpbx.
With the above dialplan rule i catch this and fusionpbx is changing the status.

Attached Files:

Last edited:
Thanks Robert. When you say "As agent name I have jvs[ext]", what do you mean by that? Is that what you call the agent, or something else? What do you program on the phone's button to make this work? Do you also have to update the dialplan in the phone? (using gransdstream here)... Thanks!
Just a heads up. I added agent status (logged in/logged out) to BLF in the master branch a few weeks ago. It works just like Park and Call Flow. Set the BLF to monitor "agent+agentname". The pull request has a little more info.

As written this is not a speed dial for the agents to login/logout. Just a monitor line. However a dialplan step could easily be written to use this as an agent login/logout button too. I'll have to play around with it sometime.
Almost forgot...I need to update "/app/call_centers/call_center_agent_status.php" too. When you change the agent status on this page, it should fire off an event into the ESL that will trigger a NOTIFY to the BLF. That way the light on the phone will change if you update the agent status on the web page.
Pull Request added.

Once committed you can use the BLF as a speed dial for login/logout. The BLF will turn red if the agent is logged in and green if they are logged out. (Yealink) When you update the agent status using call_center_agent_status.php, the BLF will update.

One thing noticed is that you seem to need to make the agent name different than the extension. I didn't dig into why that is the case. So in my testing I set the agent name = "suzzy" and the blf = "agent+suzzy".
Thanks very much for this. I took this and changed it so my customer can use one button to log in and out of different queue. (Sales and Service) I changed it a bit to make the BLF work on the same extension to sign in as out. Customer loves it. Thanks

I had to do some tricky stuff with the sign in and out of queues as one you sign agent in it rings in all queues they are a part of unless you remove them from the teir. (I made the script do that)