Disallowing Non-Queue Calls When Logged In

I’ve looked through the settings multiple times, I’m probably missing a big neon sign saying, “I’m Here!!” (I swear I saw a setting like this before): is there a way to / how can I have it so queue agents currently logged into the queue cannot take calls that didn’t originate in the queue?

Ideally, I’d want it so if someone called an agent’s extension while the agent is logged into the queue (even if they’re not currently on a call) that the caller would be sent straight to that agent’s voicemail. We don’t want people trying to bypass the queue because it’s unfair to those who have been waiting. If they’re logged off the queue though, they’re free to take whatever calls from people who might want to call them directly.

I’m mainly trying to head this off at the pass. The current queue software we use with our Alcatel phone system doesn’t seem to have that option (I’ve at least made it more difficult for people to call the agents directly by making their extensions hidden from the dial by name directory). When we do eventually move to FreePBX, I’d like to have something like this in place.

If there’s not a GUI setting for this, is there a way to implement it in the dialplan? Maybe something as simple:

exten => [QueueAgent’sExtension],Goto(callercheck)
same => (callercheck)
same => [DidCallComeThroughQueue]?Yes(ring through to agent):No(agentloggedoncheck)
same => (agentloggedoncheck)
same => [IsAgentCurrentlyLoggedIntoQueue]?Yes(send caller to VM):No(ring through to agent)

I’m still in the learning stages of FreePBX, so not sure how to check the calling number to see if it came from the outside world or the queue.

I don’t necessarily want the caller to be sent to the queue if they’re trying to call directly in case the agent does double duty and has legitimate reasons someone would be calling them directly. (Like my real-life case: I occasionally fill in on the helpdesk so if I’m logged into the queue, I don’t want someone to be able to call me directly, but I’d like them to be able to leave me a VM; when I’m not filling in I’d be free to take anybody who calls me)

Interesting. I don’t think there is a toggle for this, but you could submit a feature request. If the calls you are wanting to block are coming from the outside, you could do a custom dialplan attached to the inbound route, or if you wanted to keep things in the GUI, you could use dynamic routes to query if the user is signed signed into the queues sql table, if yes route to voicemail otherwise route to extension.

Thanks! I’d probably want it to do a check on both inbound calls from the outside as well as internal calls. It came up because a principal repeatedly called an agent’s phone yesterday and the agent finally picked up, thinking it was a queue call. It turned out not to be, so they just don’t want anyone to be able to circumvent that whether they’re a staff member or a parent.

I’ll play around with the dialplan a bit and see what I can come up with.

Extension_override.conf or I think the extensions have include hooks in them that you could tap into.

I would use the predial hook and with the help of the variables and Asterisk applications/functions:

  • Check if this is a non-queue call.
  • If so, check if they are logged into a queue
  • If so, redirect or reject the call.
1 Like

I’ve gone ahead and used that for reference. This seems to be working for me. This is the test for if someone from within the school district tries calling the queue agent directly. I did test with the person logged into the queue and also not logged into the queue. I also adjusted it for [from-pstn-custom] so people calling from the outside would be subject to this same check.

Is there someone who is more knowledgeable in writing dial plans that can see if there would be any unforeseen problems with this dial plan?

You don’t need this. Replace it with:

same => n,MacroExit()

I don’t think you need to do that. The predial hook should already catch those calls.

Nice, I think I have this working now! My test cases seem to work well at least.

Here’s the final dial plan if anyone is interested:

1 Like

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