1

So my call app has a 'ring group' functionality. The idea being that certain numbers should fan the call out to multiple ring group members. Twilio has an article which describes this process here:

https://www.twilio.com/blog/2009/05/dialing-multiple-numbers-simultaneously-with-twilio.html

I want to do something similar. Loop through my available ring group members and do a dial.number to each of them. This would create a new call to each one of them that hits our regular incoming call webhook. Works great except if no one answers then the call will be sent to a random members voicemail.

I thought of a couple strategies to possibly fix this but none are quite working:

  1. Manage the timeouts. Set the timeout of the dial for the ring group to something shorter than the timeouts for our incoming call webhook. My thought was this might skip the after action on the incoming calls and go to the after action on the ring group - which is a ring group voicemail box. But in this case setting the timeout on the ring group dial doesn't do anything. Only the timeout on the incoming call webhook is being respected.
  2. Pass some context. If I could pass additional params from the ring group call through the dial.number method then I could recognize in the incoming call webhook that this is coming from a ring group and act accordingly. But apparently you cannot pass custom params. It seemed the only thing I could change was the callerId - which I could use to indicate the ring group number but then I lose the context of who the call is coming from.
  3. Attach a status_callback. I could put a status_callback on the dial.number in the ring group. Once the call is initiated it will post to me with a CallSid. I could use this sid to look through the calls created by my incoming call controller and link up the sids thereby identifying which calls are from a ring group. Unfortunately the CallSid i get on the status_callback for the ring group dial.number does not match any other sid that my app receives. The sids on the incoming call webhook are distinct - and if I fan it out to multiple members interestingly each incoming call webhook gets a different sid. I initially thought that since there was only one leg connected to the incoming call that they would all share the same sid...

I wonder if anyone has any other ideas?

Josh Forbes
  • 328
  • 3
  • 6

0 Answers0