Ringgroup/queue with at most 1 active call

I’d like to implement the following behavior - I have 2 extensions which are part of the same ring group/queue. When a call is routed to this rg/queue then I want both of the phones to ring, however when one of the phones answers a call then I would like when a second call comes into the group to get a busy signal? How do I do that? I guess ring group is not the answer, instead I tried creating a queue with 2 static members, max callers set to 1 and join empty set to Ultra Strict. As I was testing this in fact the second phone continued to ring when the first one was on a call destined to the queue.

Can something like that be achieved with freepbx?

Well put a call in a queue will have it ring available members. Having two members in the queue and one on the phone means the second one is “available” and will get calls.

What you are looking to do isn’t standard. DIDs and Extensions are not linked in that manner. So if an inbound call comes in over a DID and then you want those calls to ring two extensions but when the next call comes in you want to give it a busy (whatever) because one of those two agents are on a call already. That means you would have to check each of their states and if one is “busy” then the call gets returned busy.

I don’t know if it was you or another person but someone had basically this exact request in another thread. So based on that, this second agent is a “backup” so really if you just need that agent to answer calls when the first agent doesn’t and isn’t busy then just setup FollowMe on the first agent.

Set Agent 1 (the main one to get calls) No Answer Destination to “Force FollowMe”, set the FollowMe list to have Agent 2 in it and then when Agent 1 doesn’t answer a call it goes to Agent 2. And when Agent 1 is on a call (with call waiting turned off, of course) then the next caller gets a busy and won’t attempt to call Agent 2.

So where is the custom dial string is it the ‘Dial’ text field in ‘Advanced’ tab?

Currently I have an ivr hooked up to the ring group, judging from the suggested setup it seems that now I need to modify it to actually ring the custom extension, which then will ring the group and when someone answers this custom extension is really going to act like a “bridge” between the real call and the ring group. So on subsequent calls if this bridge is in use people will get busy tone?

One other thing, doesn’t this also break CID, since the phones from the ring group will be getting as CID the “display name” of the custom extension?


I tested that and unfortunately it doesn’t work. So I create a queue

as per the screenshot and ‘join empty’ set to Ultra Strict. Then I have a custom extension with the dial string set to local/[email protected] where 1150 is the extension of the ring group that has 2 phones. I’ve also set up my IVR to send incoming calls to the queue. And when phone 1 is talking and a second calls comes in phone 2 also starts ringing.

Unfortunately what Lorne suggested doesn’t work for me.

What I tried is create 1 custom extension with dial string local/[email protected], where 1150 is the extension number of the ring group where there are two extensions: 1101 and 1102. For the 3 extension - 1151 (custom extension ), 1101 and 1102 I have disabled call waiting. When I ring 1151 both physical phones ring and when one of them is picked up, subsequently when I ring 1151 for the second time (while the first call is in progress) the second phone also starts rining but it should really give busy signal.

I eventually arrived at that custom dialplan:

exten => 9000,1,ChanIsAvail(SIP/1210&SIP/1211,as) ; check if lines are busy
exten => 9000,n,NoOp(${AVAILSTATUS}) ; debug status
exten => 9000,n,GotoIf($["${AVAILSTATUS}" =~ “2”]?busy:call) ; 2 means busy, check and redirect
exten => 9000,n(call),Dial(SIP/1210&SIP/1211,25) ; ring both phones for 25 sec, then voicemail
exten => 9000,n(busy),Busy()

It’s working as expected w.r.t giving busy signal however, the problem is this completely overrides the recoding settings and calls are not recorded. Even if i set the “incoming internal” recording to forced for extensions 1210 and 1211 it’s not working.

Right, because you have now bypassed the entire section of dialplan that actually does those checks. So you are just straight up Dial()ing the phone with no other checks outside of checking if they are available.

So I take it this second person isn’t a “backup”?

What about recording on the inbound route?

You can dial to the local ring group instead of individual SIP channels:

Dial(local/[email protected])     ; sub ring group number in place of x's
1 Like

It is set to force, but the reason is apparently using Dial I’m completely bypassing everything.

What if you add the force recording to your custom context?

To reply to myself, I managed to achieve what I wanted with the following custom dialplan (thanks to the people on the irc channel):

exten => 9000,1,ExecIf($[${GROUP_COUNT(SUPCALL)} > 0]?Busy)
exten => 9000,n,GotoIf($[${DEVICE_STATE(SIP/1101)} = INUSE]?callsecond)
exten => 9000,n,Set(GROUP()=SUPCALL)
exten => 9000,n,GotoIf($[${DEVICE_STATE(SIP/1102)} = INUSE]?callfirst)
exten => 9000,n,NoOp(Calling both / ring group)
exten => 9000,n,Goto(from-internal,1150,1)
exten => 9000,n(callfirst),NoOp(Calling Primary)
exten => 9000,n,Goto(from-internal,1101,1)
exten => 9000,n(callsecond),NoOp(Calling secondary)
exten => 9000,n,ExecIf($[${DEVICE_STATE(SIP/1102)} = INUSE]?Busy)
exten => 9000,n,Set(GROUP()=SUPCALL)
exten => 9000,n,Goto(from-internal,1102,1)

1 Like

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