News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
How do I route a call to a user before routing to a queue?
Tags: rest api
May 5, 2022 at 1:00am   •   3 replies  •  0 likes

I own a property management software system. It basically holds reservations that guests make for vacation rentals. Today, I use Heroku in order to get a notification that a new call has been received and directed to an extension. Most companies just use extensions and then use the forward feature within the extension to forward calls to different agents in sequential order. Now the complicated part :)

When I get this new call that went to the extension posted to my system, I have the ability to check my database to find out if an agent was already working with the guest. In an ideal world, I would want to connect that caller to the agent they were working with.

However, most companies have menus set up such as:

Press 1 for reservations, Press 2 for owner support.

When you press 1, you go into a sequential order for people to answer. So now I have the call, but how do I try to give it to the specific extension I want to connect taking into account they may not answer and therefore I need the call to continue going through the rest of the sequential numbers?

I could create a generic first person in the sequence of forwarding numbers/extensions that wants to do this type of smart transfer.

When that call comes in, I will be able to identify if there was an agent that worked with that guest. What do you recommend doing so that I can ring that agent but if they don't answer, it goes back in the queue? Should I use the API and update the sequence of numbers to ring each time a call comes in?

This seems like a mess because then I would need to put it back to the original setting once the call ends. I need to attempt to transfer the call to that agent. Give them X rings and if there is no answer, then let the call continue to flow through the queue.

Any suggestions?

on May 10, 2022 at 9:43am   •  0 likes

@carloscorzo - I took the liberty of updating the title and formatting of your question to make it easier to find. If you disagree with my edits, please let me know and I can revert my changes.

2 Answers
answered on May 6, 2022 at 9:46am  

There is one more option that may help is that the "assistant" extension (the listener, NOT the call queue) will detect and find an agent, and if found, it will make a call to the agent. As soon as the agent picks up the call, the "assistant" will accept the incoming call and perform a warm transfer to transfer the call to the agent. If the agent does not pick up the call from the assistant for a period of time, the assistant will forward the call to a call queue to handle incoming call as set in the call queue.

on May 6, 2022 at 10:05am   •  0 likes

So just to clarify

me and you have extensions.

105 Carlos,106 Phong

I also create 1051 Carlos, 1060 Phong

I have extension 107 as my assistant

I receive a call in extension 107, I look up if there is an assigned agent that has an extension and I do a warm transfer. Why a warm transfer?

In this case, do I even need to check if that extension is available? I guess it would speed things up? Or is it so fast if the extension is not available that I don't really need to check if available?


I get a call i 107. Match to Carlos. It sounds like the moment I do a warm transfer to an extension where I matched an agent, it would skip that number if it was not available. Then forward to 108. Then check 1050 which is my other extension without a forward. Assume I had done a warm transfer to 1050. It will ring 1050 again, it's busy, it will ring 1060. Then go to voicemail.

I would create extension 1050 and 1060 for us. So that the rotation now does not return to 107 for those extensions and can just go to voicemail,

Only thing here is I can't do weights for who they prefer to get calls but if this is the only solution, I will do this one. Actually, I could do weights when there is no match. I just could not do weighing if I find an agent match because the queue is just sequential or simultaneous.

answered on May 5, 2022 at 9:59am  

Unfortunately, a call coming to a call queue cannot be forwarded to other destinations using the /forward API. This is an expected limitation and currently being discussed if it can be supported.

To receive an incoming call to a specific extension then forward the call to an agent (if found) would work as you assumed. But it would not work for your use case to forward the call again to a call queue if the agent is not available!

I have a couple of options for you here:

1. When looking up for an agent to forward the call to, you can check the agent availability, like agent's presence (available/busy/DnD etc). Then decide to forward the call to the agent or to a call queue.

2. All the agents who are supposed to take forwarding calls, will need to have their call forwarding setting to redirect to the call queue if they are not available. See the settings screenshot below


on May 6, 2022 at 9:38am   •  0 likes

Actually, I would because I forwarded the call. If I create a dummy return extension? I am the one that is controlling the flow. At the end, I send it to voicemail. The thing is whether someone can have multiple extensions. For example, my actual extension and then my phone queue rotation extension. This is pretty funny.

on May 6, 2022 at 8:34am   •  0 likes

107 just listens to calls.

So I guess the call can just go directly to 107.

Then I can check the status of the person, if not available, i send to a sequential queue 200 with 106, 105, 104, 103 or whatever they do.

If available, I send to their extension where the next ring goes to for example

103. There it rings that person and forwards to 300

300 is the rest of the agents 104, 105, 106

104 first. Then forwards to 400

400 is the rest of the agents 105,106, 105

105 first. Then forwards to 500

500 is 106,104,103

106 first. Then forwards to 600

600 rings 103,104,105

I think this would work. It is annoying, but it would work. Unless an extension used different people and there were mixes of people. But then, they could follow the same flow. Can you assign an extension multiple times as the forwarding extensions?

on May 6, 2022 at 8:50am   •  0 likes

You wrote this "In extension 107, the forwarded calls are set up sequentially to be 106, 105, 104, 103".

It means that 107 is a call queue preset to route incoming calls sequentially to other extensions (agents). So it is not the listener you are talking about.

on May 5, 2022 at 3:59pm   •  0 likes

Let me give you the scenario to see if there is a solution.

We have John with extension 103

We have Carlos with extension 104

We have Phong with extension 105

We have Listener with extension 106

When you receive a call, you can press 1 for reservations which goes to extension 107.

In extension 107, the forwarded calls are set up sequentially to be 106, 105, 104, 103

I receive a call and someone presses 1.

This goes to extension 107, which first rings extension 106.

Extension 106 let's our software know there is a new call and we look up the number. We find that Carlos (Ext 104) worked with this client before.

I use presence to the status of extension 104. If Available, I use the call forwarding feature to forward the call.

What if his status is available but Carlos is away from his desk? I would still want to ring Phong and John in case they could answer......

:). Any ideas?

on May 5, 2022 at 5:19pm   •  0 likes

This does not work as I mentioned earlier. Because the extension 107 is a call queue (as you expected it would route the call sequentially to 106, 105, 104, 103).

on May 5, 2022 at 2:59pm   •  0 likes

wouldn't that potentially create an endless loop?

If I receive a call and I find that extension 555 had the relationship with that guest.

So I check if they are available and they are. I send the call but they don't answer and then it says to forward it back to the extension that represents the queue.

isn't that an endless loop when it comes back to that extension again since it's part of the queue?

Do you consider an extension with multiple sequential forwarding numbers different than a queue? Is there an advantage from one over the other.

on May 5, 2022 at 3:42pm   •  0 likes

Yes, the second option could end up in a loop if the agent who supposes to take the forwarding call is one of the agents in the call queue.

on May 5, 2022 at 2:55pm   •  0 likes

I like the redirect to the call queue but if someone is more than one queue, it would not work correct?

on May 5, 2022 at 3:38pm   •  0 likes

"if someone is more than one queue" => Do you mean if an agent belong to more than 1 queue?

on May 6, 2022 at 8:46am   •  0 likes

What if I let them define the call flow in Streamline and if there's a match, I check the extension to see if it's available.

Can I get that call back if they don't answer? If so, I can then do the same through their extensions based on the order they set in Streamline. I could even let them put weights on it. It would help me sell this thing to hundreds of companies.

on May 6, 2022 at 9:35am   •  0 likes

Carlos, the biggest problem here is that you want to return the forwarded call to the forwarder if the agent does not pickup the forwarded call. Forwarding back the call to the original forwarder is not possible except if you preset the forwarder. But then you have to implement a feature for each agent to forward the call back to a designated extension (the original forwarder). But the original forwarder will potentially not know if that the call is forwarded back.

A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

Developer Platform
Integrated Apps
App Gallery
Developer support
Games and rewards

Resource center
Product Releases
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us