Redirect calls if one member of a ring group is busy

Hello out there!

It might be a quite specific need for my home PBX but I would be very pleased, if someone could help me out with this:

In my home I’ve got multiple phones (living room, kitchen, first floor, etc.). Their extensions are all member of a ring group, which is called if a external call comes in.

SIP-Trunk -> … (Time Conditions, Call Flow, etc.) … -> Ring Group 01 -> Ext. 1 & 2 & 3 & 4

I’m using a Ring Group, because I want all my phones to ring for being able to take the call at the nearest phone. I am using this setup since years now and it does it’s job. But there is and always was the problem of an coming in call, while someone already is on one of the phones. In this case, the caller gets a normal ringing signal - that’s normal behavior, because the phones are ringing indeed. But the caller doesn’t know, that his call isn’t answered because there is someone on the phone already. That is often annoying for my callers.

The possible solution:
If one of the extensions in my ring group is busy, it better should redirect calls to that ring group to an IVR then simply ringing the other phones. They won’t be answered, as I can’t be at two locations at the same time.

So, this would be what I want, when a call comes in:

SIP-Trunk -> … (Time Conditions, Call Flow, etc.) … ->
-> check if one of the extensions (1 & 2 & 3 & 4) in Ring Group 01 is busy
if busy -> go to IVR -> Announcement “person you have called is on the phone right now” -> press 1 to dial ring group 01 even / press 2 to leave a message / hangup and try later / etc.
if not busy -> dial ring group 01

I’m not very good in dialplan-programming. That may be the reason, why I’m using the great FreePBX GUI. But as I life with Asterisk and FreePBX for quite a time now, I can’t imagine, my request would be a hard thing to implement. Maybe this feature even could be integrated into the GUI… :wink: Of course the feature must maintain the functionality all the other features like caller-id etc.

Can please someone help me with that? I would be very glad!

Thanks!

1 Like

I do something similar but instead of using ring groups I use a queue that gives me far more control over that kind of behavior. Especially in the latest version of FreePBX you can do pretty much what you are asking by having queue timeouts and setting rules for if someone is on the phone.

Thanks for your tip!

I have never used queues before - just tested them a few years ago. I don’t think a queue will do the job for me. It only supports one announcement that is played to the caller when in the queue and one, when pulled out. They also had the problem, that a queue didn’t support the “SIP answered elsewhere”, when a call was anserwed, showing a missed call on the other phones. But, as I said, I don’t know queues an my experience with them lays back some years. Perhaps you could explain me, how to set them up to work like I need.

I need ringing for 70 seconds, if all my extensions are available -> if nobody answers the call (i.e. not at home) I need a specific announcement for that situation.

I need an IVR, if one of my phones is in use, so that the caller knows just that -> he then should have the opportunity to decide between the described options.

In Microsoft Excel I would handle this with an If-Function If(RingGroup01=busy;goto IVR_busy;Dial RingGroup01)… But we aren’t with Excel… :grimacing:

Again, I don’t know what version of FreePBX you are using but a queue sounds like it’s perfect for the job:

  • Announcement played when you join
  • Announcement played during at whatever interval you want
  • Announcement played on fail (i.e., all “agents” or in your case extensions are busy)
  • Capacity option to decide how many callers can be waiting for someone to pick up
  • Far too many things to list here

So, again if it were me - and it is because I do something VERY similar at my house:

  • Inbound route to the queue with a timeout of 70 seconds that either rings all extensions or goes through the list
  • If anyone in the ring group picks up then it’s out of the queue
  • IVR kicks in after 70 seconds to give the caller options

Honestly I don’t see how a queue is NOT perfect for what you are asking. So far I haven’t seen anything in your request that would disqualify a queue as an option, but several that disqualify a ring group as an option. You could, if you wanted, use your ring group inside of a queue to give you all the options you think only a group will give you while also giving you the additional options of the queue.

Asterisk 13 allows you to register multiple endpoints to a single extension. I haven’t tested this scenario, but I am pretty sure that you could configure no phones to ring if any one of them is busy.

I am using the newest version of the FreePBX Distro, Asterisk 13.5, 32bit, running on a VMWare ESXi 6 Server.

Yes, eagle, I see your point. It is close to what I want. But it’s not there yet. I want the caller to be informed via IVR that the called party is busy before any phone is actually ringing. I don’t want the caller to wait until the queue times out to get options. As this would be the same announcement he would get, if the called party just didn’t answer because there is nobody at home… I’m considering to give queues a try (again) - but I still don’t think they help me on my idea.

What I think I need is a step before calling the extension / ring group / queue. That is checking, if it is busy.
When dialing an extension directly, I may set different destinations for “busy”, “unavailable”, “no answer”. That is more or less, what I need on the ring group / queue level.

@Igaetz: Yes. That were my thoughts as well. I tryed out PJSIP and it might do the job. I only have one and the same extension registered to every phone, and if one of them is in use, it will go to the “call forward on busy” destination set in the extensions menu. Simple and perfect. But, I encountered some problems with PJSIP that made me switching back to CHAN_SIP. I.e. I suffered from the audio-issue with h.264 and PJSIP doesn’t support “sip answered elsewhere” like it is with ring groups (giving me a missed call on every phone, even the call has been answered)…

Whatever I try, there always is a bit left missing. :angry:

Does no one have an idea?

Can’t be so difficult for all you experts… :wink:

Bump - related to http://community.freepbx.org/t/queue-if-busy-voicemail-if-no-answer

1 Like

Two years have passed with no one having an idea to solve my (and few others) problems. Two years have passed - and now, I found the solution!

I’m sorry - it is a very simple solution. And I don’t really understand, why all you experts out there didn’t shout it out immediately.

I have to thank tom3311 - who solved it all alone here. Thank you very much!

Such a simple thing - I modified his dialplan for my needs and extensions, and it is working brilliantly! The calls now behave as I wrote in my first post. Finally, as a single person in my house, I don’t need to answer three phones simultanously!! Yipee!!!

Maybe, the FreePBX-Guys could implement that tiny feature into the FreePBX code, so that everyone could use the feature in a comfortable and more flexible way, than using custom destinations and custom dialplan. Can’t be that hard, I think…

File a feature request issues.freepbx.org

Oh… wow… such a dirty hint… :wink:
See here: https://issues.freepbx.org/browse/FREEPBX-16805?filter=12806
Please vote for the feature request! :sunglasses:

Okay folks, just wanted to add my solution for all of you, who might be interested in. Of course, as I already wrote, I’m not quite good in dialplan programming - so if you have any suggestions to make it better, please let me know :smiley:

This is my call flow setup:
---> SIP Trunk ---> Inbound Route ---> Call Flow Control ---> 
        ---> IVR ---> End
        ---> Time Condition 1 ---> 
                ---> IVR ---> End
                ---> Misc Destination "Busy Check" ---> 
                       ---> If Busy go to IVR ---> End
                       ---> Time Condition 2 --->
                               ---> Ring Group 1
                               ---> Ring Group 2

The Misc Destination “Busy Check” is a custom dialplan in a custom context [busycheck-rg] which I included into [from-internal-custom].
The dial command is like this:
exten -> s,1,GotoIf ($[ $["${DEVICE_STATE(SIP/900)}"="INUSE"] | [ $["${DEVICE_STATE(SIP/901)}"="INUSE"] | [ $["${DEVICE_STATE(SIP/902)}"="INUSE"] ]?ivr-2,s,1:timecondtion-2,s,1)

I created a Misc Destination in the gui which dials in busycheck-rg,s,1

So, the incoming call reaches the busycheck-app where some of my extensions are checked about their device state. Depending on the result, the call is routed to an IVR or to time conditions.

Works just fine. CDRs are a bit of a mess and I wish CDR could be supressed until the call has reached the ring group - but that doesn’t bother me at the moment. Maybe someone has an idea on that.

Of course it would be great to have the ability, to “busy-check” an existing ring group, as the included extensions might change, but I don’t see a way to accomplish that.

2 Likes

IIRC, there is a “no CDR” function in Asterisk that turns off CDR until you turn it back on or the current call flow is terminated.

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