4 ms·
Build a Twilio Hard Phone with SIP from Twilio, Raspberry Pi, and Asterisk
- pla3rhat3r 14y agoCould this be deployed using OpenVBX?
- jonmarkgo 14y agoPotentially, though you may need to hack up a SIP module yourself.
- francesca 14y agoawesome! I love seeing Twilio devs using "old" landline tech with the API. Way to go!
- jonmarkgo 14y agoThanks! It was so satisfying to make a physical phone ring!
- josh2600 14y agoNot to be pedantic, but what does Twilio help here? Aren't you kind of just Jerryrigging Twilio onto an Asterisk install? Not that this isn't cool, I just don't understand what benefit you get from having Twilio connected here. It seems like if you want to make a physical phone ring you could take a time machine back to 2004 and achieve the same thing using Asterisk, no? Can you explain the benefit of integrating with Twilio instead of using just plain ol' Asterisk? Disclaimer: I work at 2600hz, the open-source cloud telecom company.
- RobSpectre 14y agoGreat question Josh. Big benefit here is being able to keep your voice application logic in your own code instead of in Asterisk. Often we find in business telephony applications, the really important information you want to get to and from the user isn't in the phone server, but in the CRM app or help desk app or support app that the phone server is trying to get to and from the user. The closer data like account numbers or service tags or support tickets is to the logic that directs your IVR tree or call queue, the easier it is to build experiences that delight users. Siloed telephony and business software manifest themselves in ugly ways like having to repeat information to multiple agents or waiting on hold while your account information is retrieved. We think if the code that makes your customers happy and the code that makes your phones ring can finally live in the same place, some pretty magical stuff can happen.
- josh2600 14y agoAs always Rob, great answer :). I think the part that made me scratch my head was the line where Jon said "It was so satisfying to make a physical phone ring!" which is funny when you take it out of context for a multitude of reasons. I hope you appreciated my quip about time travel ;). Having the logic separate from the delivery may make sense for some applications and might not for others. We wrestle with clients all the time that want various elements of the platform either directly under their control or as far away as humanly possible. There's usually little rhyme or reason to understanding which components are supposed to go where or for what reason, but that's Telecom in a nutshell. When dealing with large carriers, the question of what goes in the firewall, and what stays out, is a complete mystery until right before you ink the contract. To be fair, your point about siloed telephony and business software does ring a tad hollow when you talk about Twilio which is essentially a silo for business logic of a different color, right? Once again, I do really enjoy these chats :D. I also admire the hard work your team does writing these blogs which I point to as a great example of developer evangelism. Your team does a great job of getting out there and showing off the tech. I especially like the edge case stuff, like jamming Asterisk onto a Raspberry pi and connecting it to an obihai ;).
- RobSpectre 14y ago
- webwanderings 14y agoIt's cool to see Rpi in the mix but you could get the same feeling of using old fashioned phone ringing without the land line using magic jack. So what's the recurring cost with the above solution?
- masonhensley 14y agoWhat's with this on the blog background? "SECURITY WARNING: Please treat the URL above as you would your password and do not share it with anyone."
- jonmarkgo 14y agoWeird, I have no idea. Thanks for pointing it out...will check into it
- tkahn6 14y agoSeems to be a Facebook thing.
- RobSpectre 14y agoIt was - bug with our social widget. Corrected now.
- KarneAsada 14y agoCan't wait to resurrect my SI football phone!
- RobSpectre 14y agoThink I'm going to go with this: http://www.amazon.com/Crosley-Black-Candlestick-Phone-CR64/dp/B0002Z2U6A/ref=sr_1_4?ie=UTF8&qid=1363813735&sr=8-4&keywords=novelty+phone http://www.amazon.com/Crosley-Black-Candlestick-Phone-CR64/d...
- tankbot 14y agoI have an old Lego phone collecting dust somewhere that sprang instantly to mind when reading this. Great post!
- swalberg 14y agoWhy is Asterisk in the mix? If you call a SIP URI directly from Twilio, can't you land it directly on the ATA?
- superuser2 14y agoVoicemail, 7-digit dial (most SIP providers only take 10), forwarding, filtering, etc. Twilio could theoretically handle these things for you, but they're typically handled in a PBX.
- swalberg 14y agoHm, maybe I should have been more specific. Given that this is an interesting hack to get a PSTN call to an analogue set through Twilio, why did they bother with the SIP proxy?
- superuser2 14y agoI'm not sure I understand your question, but I think it's because the ATA (like most modern/cheap ATAs) only speaks SIP.
- taliban 14y agoNow to figure out how to make this work with a rotary phone...
- RobSpectre 14y agoThat would be hilarious.
- swalberg 14y agoWouldn't it just work? The FXS port will generate the 90VAC/20Hz signal and the device plugged into it interprets that as an incoming call. You guys only support termination through SIP, not origination, so the dialling mechanism doesn't matter. And if you did want to do origination, the ATA just has to understand pulse dialling.
- RobSpectre 14y agoYeah - I think it would. Going to eBay a fierce looking red one from the sixties and going to give it a spin.
- stcredzero 14y agoKeep it under a glass cake cover by a bust of William Shakespeare. Next up: installing firepoles DIY.
- car 14y agoSo many moving parts and cables. Raspberry Pi, an old phone, FreePBX, Asterisk, Obi100. Let's outcomplex the POTS. Seriously, how about you show us how to register an Android phone with your SIP service?
- sologoub 14y agoDon't think Twilio has SIP registration, but they do have Android SDK for Twilio Client that will do the trick.
- RobSpectre 14y agoYeah, this would definitely be the way to go for an Android device. Use the SDK examples to build a little dialer and use the ACTION_CALL intent, and it works great for outbound as well. Docs and download are here - http://www.twilio.com/docs/client/android http://www.twilio.com/docs/client/android
- josh2600 14y agoRob, are you guys looking to do SIP Reggie soon? I imagine it's gotta be coming at some point (I don't know why you guys don't do it now except for the obvious pain point of network overhead from all that registration traffic).
- RobSpectre 14y agoWe're pretty stoked on what we have planned for our SIP roadmap, but staying true to our discipline of announcing features only when they ship. SIP From Twilio is all we have to report right now.
- car 14y agoSo Twilio currently only offers SIP origination (DID/gateway from POTS -> IP/SIP), also known as inbound SIP trunking. I think this needs to be made more clear on their site. Android has a native SIP client (so do Nokia phones), which makes me wonder what purpose the Twilio Android SDK serves. And holy mackerel, 0.5c/minute for inbound. If I were running my own SIP enabled PBX I'd rather use Voxbone.com or one of their resellers. They have unlimited incoming minutes, charged per channel (concurrent calls). Edit: added bit about SIP trunking
- silasb 14y agoWhat would be slick is if you did a soft phone on the RPi and skipped the ATA. Then connect the speaker, mic, keypad directly to the phones old internals.
- jonmarkgo 14y agoThat's a great idea - perhaps for my next post! I liked the idea of the ATA though since it's more of a proof of concept on how to interface Twilio with an older phone system.
- koobe 14y agoWhat do you need twilio, raspi and asterisk for? You just need an ATA and a sip account like callcentric.
- RobSpectre 14y agoSIP From Twilio will send to any SIP solution you have, this was just a neat hack with one of our favorite hardware platforms.
- huslage 14y agoThis is ridiculously easy with Tropo. You plug in an ATA, register it and it works. We did this with an ATA to Rural India that forwarded local calls from a toll-free number to Tropo for an IVR. Works a treat. No computer needed. What a waste of time with this Twilio garbage.
- stevelaz 14y agoTrue that, Tropo just needs a marketing team like Twillio has and the this would be more obvious to others...
- newman314 14y agoAs a different configuration, I'm looking for a free solution that would let me dial 800 numbers from a VoIP connected home phone. I dial into a lot of conference calls and this would be an awesome setup. Just wondering if anyone else has tackled such a config yet?
- r4vik 14y agoI'm pretty sure sipgate supports free 800 calls
- eddieroger 14y agoWhere was this seven years ago when I had all the pieces of a decent Asterix server, minus the SIP provider? I had such plans then, but never got the last leg of the journey done. I wonder if my Sipura 1000 still works...
- ajaimk 14y agoI thought the whole purpose of Twilio was to not use Asterisk. Just saying. Great tech.