Twilio Functions to do live call routing
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

This bounty requires purchasing a phone number from Twilio for $1/month. It can be cancelled after this bounty is complete.

For this task, you may use Twilio Functions and/or TwiML bins.

  1. Incoming call to phone number
  2. Caller is prompted to enter a 4-digit "pin code" through the keypad
  3. If it's a valid pin, for example "1-2-3-4" or "5-6-3-4", the call continues. Otherwise, it says invalid number and prompts them to leave a voicemail which is transcribed and logged by Twilio.
  4. If the pin is valid, we want it to ring a pre-specified set of phone numbers until the first person answers the call and it is connected.

Twilio has some logic like Gather, Simulring and Whisper which may be useful, however the tricky part is that for Step 4, if it goes to voicemail on any of the numbers, then the call is connected. We want to make sure a human answers the call, so you may need to prompt the person to enter a digit or something so you know it's not voicemail, before the call is connected.

There's a stackoverflow accepted answer about this problem at

With Twilio Functions, you should be able to write the logic and have it hosted all through Twilio automatically.

Deliverable should be code for the Twilio functions that I can copy and paste to get this all working with my own Twilio phone number. Values for the phone numbers to call, and pin codes to accept, can be hard coded into the Function.

Hope this is challenging and fun!

Thanks in advance!

3 months ago

Crowdsource coding tasks.

0 Solutions