How to setup FreePBX to direct to queue only if busy otherwise wait for Voicemal

Hi everyone,
I’m trying to implement a custom call flow in FreePBX 17 for a Ring Group (multiple extensions).
Desired behavior

Incoming call goes to a Ring Group and chooses between 2 scenarios:

  • IF any of the Extentions is BUSY
    • Ring Time - 2 Sec
    • Play an announcement: “All lines are busy, please wait or press 1 to leave a message”
    • If caller presses 1 → voicemail
    • If no input:
    o Play Music for 15 seconds
    o Repeat the announcement
    o Loop this behavior

  • IF none of the Extentions is BUSY and no one answers the call
    • Phones ring for 20–30 seconds
    • If no one answers → go to voicemail

Is this achievable via GUI only?
Or is custom dialplan required?
Thanks!

Yes i think you can do all this setups with Queues module. Also that module has Agent(s) Penalty Rule. If you didn’t checked yet that module check first.

https://sangomakb.atlassian.net/wiki/spaces/PG/pages/35390529/PBX+GUI+-+Queue+Penalty+Rules#Max-Penalty-Change

Sorry, but I think you’re mistaken here.

When a call enters the queue, there’s no way for the system to check whether the lines are busy and then play a different scenario. This means that whenever someone enters the queue, they will always hear the message “All lines are busy, please press 1.” I don’t want that.

I want a different scenario to be executed when the lines are not busy.


Incoming Call (Ring Group)
      │
      ▼
      │
 ┌────┴─────┐
    ?????? - what module desides here where to send  ???????
 │          │
 ▼          ▼
Free       Busy
 │          │
 │          ▼
 │      Queue + IVR (Busy Message)
 │          │
 │   "All lines are busy.
 │    Please wait or press 1"
 │          │
 │    ┌─────┴─────┐
 │    │           │
 │    ▼           ▼
 │  Press 1     Timeout (15s)
 │    │           │
 │    ▼           ▼
 │ Voicemail   Music on Hold (15s)
 │                │
 │                ▼
 │            Repeat IVR
 │
 ▼
No Answer (20–30s)
 │
 ▼
Voicemail

This is the hard part. You should be able to use the technique described in this post

Inbound Route decision where call(s) to send or re-direct.

How many Extensions you have it ?
I said Queue for adding many Extensions (Agents) in that group. But you can do via Ring Groups.

NO. They R not for “busy” condition

that doesn´t matter.. 3 in a Group e.g.

Common, How its hard/difficult to be make a setup Extension(s) on FreePBX to be Busy position? DND mode ? or Enable Follow Me for not existing (custom extension) user and make a test. Your test scenario is not hard you have to make some test and adjustment.

The bottom line here is there is no way to do this in the GUI per the specs laid out. Additionally, a lot of the logic isn’t being taken into account for some of the suggestions being offered. Here are some big picture things to consider:

  1. FreePBX does not limit inbound calls to extensions.
  2. Both chan_pjsip and legacy chan_sip require you to tell the endpoint/peer how many concurrent calls trigger a BUSY state. By default it’s 0 (as in never BUSY)
  3. Each phone has it’s own configuration setting for how many calls a line can have before being busy. Again, in those cases it’s set to something like 24 or unlimited depending on phone.
  4. The FreePBX dialplan checks the exten/device state before sending a call to it. If that state is BUSY it won’t even attempt to ring the endpoint/peer. It will trigger the BUSY logic flow (voicemail, forwarding, FM, etc) unless told not to.
  5. Ring Timers are Ring Timers. You cannot change the ring time from 30 to 2 seconds for just one endpoint/peer because it’s BUSY. It got a BUSY reply so it stops ringing. If the Ring Timer is 30 seconds all the extensions in the Ring Group/Queue are rung for 30 seconds.
  6. Ring Groups don’t care what the state returned by the phone is. No answer, rejected, busy, doesn’t matter. If no one answers the call it goes to the post destination. It doesn’t care if they were all busy or not answering or any combo of the two.
  7. Queues pretty much work the same way except you have to limit how long they stay in the queue before being dump to the post destination.

On top of all that, this logic for post destinations will require a queue since you want to hold the call, play MoH, play announcement again (breakout IVR) and if nothing is pressed then repeat until you kick them out of the queue and force them to voicemail anyways.

So to track the individual states of each extension being called or the response from each is going to require a custom method in doing so since a simultaneous dial will not let you do that.

This will require custom dialplan if the logic request needs to be followed as much as possible.