Using Twilio to make a call forwarding and voice messaging system
thedarkside.frantzmiccoli.com
thedarkside.frantzmiccoli.com
I built it because I was on Android and wanted to keep my moms voicemails. :)
Some services require companies to have a public phone number. This doesn't need to be a real support phone number, but it shouldn't be completely unattended.
Your service would fit right into that, and if you (optionally) handled the purchase of the number itself (Twilio will do that), it would make it quite literally a 5 minute setup.
The only other thing I haven't found is a forwarding service, that would allow such companies to purchase a number in a particular country, to forward calls/sms to another arbitrary phone number (or an email/voicemail box). I'd certainly use that for myself as well.
I wanted my phone number to "ring forever" if I didn't pick up, and here is the Twilio twiml bin that does that:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Pause length="600"/>
<Hangup />
</Response>
OK, actually ring for 10 minutes, but that might as well be forever ...<Response><Reject /></Response> is free
But for just the end goal, depending on use case specifics, another option is to use Twimlets which has the added bonus of the missing voicemail to email. https://www.twilio.com/labs/twimlets
I've been thinking of building something a little bit more in depth, using Twilio Studio and Google Firebase, with proper dial-in voicemail retrieval, SMS notification, and maybe Sendgrid voicemail to email.
Does anyone has a ready-rolled Twilio Studio direct to Firebase example?
I built something similar as a side project but switched to Nexmo, purely because they charge per second. It was a fun thing to build and test.
I recently did this for a firm that is fully remote now during pandemic. They had non voip line for main number. Set the office phone to FW to a GV number and put GV in DND so it goes straight to voicemail which was what they wanted. Then setup GV to send voicemail to email and gmail to forward to slack channel using the basic slack email integration app.
All in all very easy to setup in 20 min or less and get transcribed VM in slack channel with link to play the message as well.
I haven't looked in a while, but running a Virtual PBX via Twilio or similar is really interesting to me... and something I'm surprised more aren't taking on, considering I've seen the amount of what providers for SIP support are charging.
Would you be interested in a functions script that does this? I've got one kicking around I can share.
[0] https://github.com/2600hz/kazoo [1] https://docs.2600hz.com/dev/applications/crossbar/doc/device...
For example I hooked I setup a simple "on-call" system by monitoring a specific Slack channel, and when emergency-messages were present, would dial and play a message to an engineer. Wonderfully reliable and worked really well.
Standard call:
- A places an outbound leg to C. A pays for this leg
- C receives an inbound leg from A. C pays for this leg
Forwarded call with B (your Twilio/some other telephony API provider number) in the middle:
- A places an outbound leg to B. A pays for this leg
- B receives an inbound leg from A. B pays for this leg.
- B places outbound leg to C. B pays for this leg
- C receives an inbound leg from B. C pays for this leg
In this scenario the two "sides" of the call could be going through completely different underlying telcos so there's no "Oh it's just forwarding!" The two different telcos don't really care about that. To them they're still each setting up 1 outbound & 1 inbound leg.
Although the billing structure is standard, Twilio is not considered a low cost provider for what they offer. They kind of rely on their customers being software people that need an API but don't know enough about telecom billing to demand better.
The value-add is real though, you would never want to go about this on your own. Companies like Twilio (and their competitors) gloss over the millions of rough edges that exist when working with a telco directly. It's just that the markup is very high for Twilio.
We are based in EU where this is not the norm. We are charged for the call transfer, the caller is not.
No clue about how this works elsewhere.
You could forward via VOIP! The biggest downside IMO is losing iMessage, or I probably would've ported mine years ago :)
Like you mentioned, you can use call forwarding — there's even things like conditional call forwarding if you just want to forward your missed calls or things that go to voicemail. I did exactly this to build https://tinyvoicemail.com (which I'll be open-sourcing in the near future)
[1] https://support.twilio.com/hc/en-us/articles/223181668-Can-T...