In a world where we can barely memorize friend’s phone numbers without the help of our cellphone contact list, we are fast approaching a day when the phone number won’t be the primary way to call someone. Instead, people can instantly contact friends and colleagues with a click of a button from their social network. 2600hz developer Alexander Shvaryov is making this happen on the popular Russian social network, VK.com
Alexander is a VoIP engineer at a Russian ITSP in St. Petersburg. While he uses a proprietary softswitch for client purposes, he quickly became interested in the 2600hz platform after realizing it was open source software. In order to better understand the 2600hz APIs, he decided to build the VkPhone application.
“For my application I used almost all the Crossbar APIs (Accounts API, Devices, API, Users API, etc.). It was really interesting and easy to use. Within a few days I had the ability to create an IP PBX with minimal features.” This presentation shares a high level overview and demo of the application.
Note: This application is currently in testing and is not be ready for public use yet.
You can follow Alexander’s updates on Twitter @Shvaryov or on VK.com.
Are you using 2600hz APIs to build something cool? Email rachel@2600hz.com to share your project idea.
Update: Speaking engagements
The 2600hz team is always giving talks around the world. These talks are a great way to get up close and personal with the project and our latest progress on it. This is a quick update on where you can catch Darren and the 2600hz crew speaking over the next couple months. They’re a combination of workshops, conferences and meetups so come join us at whichever event fits your fancy.
Business of Javascript Talk at the O’Reilly FluentConf | Tuesday, May 29
- Darren will be giving an overview of how we’ve used AmplifyJS, jQuery and HTML5 to build the GUI in lightning speed. Catch his talk at 2:15.
San Francisco Telephony Meetup | Tuesday, May 29
- We’ve invited Phil Leggetter of Pusher and Mike Hostetler of AppendTo to give overviews of HTML5, APIs, Websockets and how they all tie into telephony.
FreeSWITCH Conference Call - SIP Protocol workshop | Wednesday, June 13
- Remember when we had SIP training in the office? We’ll be sharing all you need to know about SIP protocol and more in a workshop on the weekly FreeSWITCH Conference call on Wednesday, June 13 at 10 am PST.
ClueCon 2012 | August 7-9
- ClueCon is coming around again this year and for the first time Darren will be giving a talk himself! Register in advance and don’t worry about doing it last minute.
We hope to see you there at any (or all) of these events. Don’t forget you can always get the most recent updates on the events section of the blog. See our past events here.
CouchDB/BigCouch Bulk Insert/Update
This post is cross-posted from James Aimonetti’s personal blog.
While writing a bulk importer for Crossbar, I took a look at squeezing some performance out of BigCouch for the actual inserting of documents into the database. My first time running all the documents into BigCouch at the same time resulted in some poor performance, so I went digging around for some ideas on how to improve the insertions. Reading up on the High Performance Guide for CouchDB (which BigCouch is API-compliant with), I started to play with chunking my inserts up to get better overall execution time.
Note: The following are very unscientific results, but I think they’re fairly instructive for what one might expect.
Based on the CouchDB guide, I decided to not pursue this further, as dropping insertion time 2 orders of magnitude was fine enough for me! I may have to bake this into the platform natively.
For those interested in the Erlang code, it is pretty simple. Taking a list of documents to save, use lists:split/2 to try and split the list. By catching the error, we can know that the list is less than our threshold, and can save the remaining list to BigCouch. Otherwise, lists:split/2 chunks our list into one for saving, and one for recursing back into the function. Since we don’t really care about the results of couch_mgr:save_docs/2, we could put the calls in the second clause of the case in a spawn to speed this up (relative to the calling process).
A PBX with a RESTful API
This guest article is brought to you by developer Michael Phillips. His work is focused on creating tools that make lives easier ranging from voicemail to P2P lending. You can reach Michael on Twitter at @NSRInvesting or learn more about his work at his website.
2600hz is a cloud based telephony platform that provides APIs for creating and maintaining all key components of a voice network. The list includes but is not limited to:
- User Management
- Devices
- Voicemail Boxes
- Conferences
- Sub-accounts (Great for resellers)
Traditionally, someone that wanted to host their own PBX would download FreePBX or the like. From that point they would take their own hardware, install the OS, setup the devices and continue the outgoing maintenance. The Cloud evolution is changing all of this and 2600hz is at the forefront of this in the telephony arena. The entire hosting, hardware and device deployment has been combined into the 2600hz platform for a robust and easy experience creating and maintaining phone networks.
I’m a huge fan of the work that 2600hz is doing. I leverage their APIs to give all my customers custom portals in my web apps that allow them to see their CDR and Voicemails. They love being able to login on an iPad and see their call log or check voicemail. Using the Crossbar API I can also empower my users to configure routing settings like time of day or call forwarding. All this translates to saved cost and time. With 2600hz you can have an office up and running in hours, not weeks at a cost unheard of. It’s really the smart way to do voice.
Twilio Experience
I have also used Twilio extensively in the past. Without a doubt, it’s one of the most disruptive technologies we’ve seen for developers when it comes to telephony. Most developers don’t have dialplan experience so when confronted with creating innovative voice enabled applications, the project would usually end before it even started. Twilio changed that.
With Twilio you can control the telephony switch with simple XML and RESTful calls. For instance, if you wanted to transfer a call to another phone you would simply produce this body in an HTTP request:
Very simple and easy for developers to implement! Overnight you had developers creating really neat ways to interact with phone systems that previously was not possible without a considerable amount of dial plan experience. Twilio is great product, but there are some limitations.
Twilio Limitations
Twilio wasn’t designed to run your office. Some will disagree, but this opinion comes from trying to do so. They do have an offering called OpenVBX but it’s powered by their APIs, hence forth their pricing and feature set are too. So if you want to call Joe who sits down the hall you will be charged unlike 2600hz where it’s an internal (free) call since you never hit an external SIP gateway.
If you plan to use desktop phones you will be charged up 3 cents a minute to make that call (and you still need some type of voice line). You will also lose all of the features offered by SIP signaling like assisted transfers, 3-way calling, forwarding and hold.
If you used Twilio’s new client, it’s considerably cheaper at 0.25 cents a minute, but you are stuck using a USB headset or some other non-SIP based audio device since the call is dependent on your browser being open. 2600hz supports all the full features of the most complete SIP device, even video enabled devices.
Twilio + 2600hz = 2600hz + Plivo
What if you could tap all the richness of Twilio and 2600hz in one platform. You can’t. But there is an alternative that I feel is even better. Plivo.
Plivo is an open source project that shares a lot in common with Twilio. If you are a Twilio programmer, learning Plivo will take about 10 minutes. All of the core concepts translate 1 to 1. The XML syntax is not compatible, but it is very close. In many cases they offer rich features that will simplify your code and make it cleaner. They also have a RESTful API that again offers some great features, including a bulk call API that allows you initiate many calls in one command.
For instance, to do a dial command like in Twilio you would use the following syntax:
You specify the gateway to use (you can specify more than one for failover) but beside that the syntax is very close.
Plivo is open source and runs on top of FreeSWITCH. The installation is painless. Setup is pretty easy and the awesomeness is vast especially when coupled with 2600hz. Similar to 2600hz, their mission is to lower the barriers to telephony. They offer an open source DIY framework as well as a hosted service. Both the hosted and the self-hosted allows you to bring your own SIP trunks, allowing you to access Twilio-like APIs at your SIP cost. That’s worth repeating. You can use your minutes at cost. No middle-man markup.
Step 1 Installation and Setup
To setup Plivo I recommend using a brand new install. I’m a big fan of Debian so I used Debian 6.0 x64 for my OS.
Vist http://www.plivo.org/get-started/ for the latest instructions. There are only two steps to get a fully installed Plivo instance setup. The install will include FreeSWITCH and Plivo.
Step 2 The Hook Into 2600hz
I setup Plivo as a device on my 2600hz account.
I created a new SIP device, set the credentials and then created a call flow so a DID would ring that number.
Caution: The default Plivo dial plan will only process numbers so if your user name starts with user_ followed by alphanums the call will fail. Two ways around this are to make the login for the SIP device be numbers or to change the dialplan. It’s easier to just change the login but if you want to change the dialplan you will have to edit /usr/local/freeswitch/conf/dialplan/default.xml and change the line:
<condition field=”destination_number” expression=”^(\d+)$”>
to meet your needs. You could use a catch all but this is cautioned against. Please refer to http://wiki.freeswitch.org/wiki/Mod_dialplan_xml
So now when a call hits your FreeSWITCH instance it will be processed by Plivo. But how do we get calls from our SIP provider to our Plivo system? What we will do is register a gateway using the SIP device settings you created in this step:
Step 3 Gateway Configuration
Edit the file /usr/local/freeswitch/conf/sip_profiles/external/2600hz.xml and add the following:
Obviously be sure to replace the values in here with the values you specified on your device in step 2.
Step 4 Plivo Configuration
Now we finally get to Plivo. The file is located at /usr/local/plivo/etc/plivo/default.conf. There are really only two things you need to get started:
# Incoming calls will always use those urls to post answer/hangup events
# By default, hangup url is same as answer url
DEFAULT_ANSWER_URL = http://example.com/plivo/answer
# This is optional but will contain the call status when the call ends.
#DEFAULT_HANGUP_URL = http://example.com/plivo/hangup
Step 5 Restart FreeSWITCH and Plivo
You now have to reload sofia in FreeSWITCH, you can do this from the command utility fs_cli and type the commands:
reloadxml
sofia gateway external reload
Or simply restart FreeSWITCH. Also be sure to restart Plivo.
If you call your DID on 2600hz now and monitor your web log you will see a POST request to http://example.com/plivo/answer
If you place the following contents
into an index.html and re-dail your DID, you should hear the text to speech engine talk to you then hangup.
Conclusion
Plivo with 2600hz is an incredibly powerful combination. 2600hz allows you to manage all of your voice network and with Plivo you can create robust, powerful and flexibly call flows by routing calls through the 2600hz call flow interface.
You can sign up for a 2600hz account here.
COMPTEL Soirée and Open House, you’re all invited!
Thank you to all who came by to our “COMPTEL Soirée” last night! We had a blast with everyone at one of the best places in town. If you couldn’t tell already, we love telecom and we love a good time so if you’re still in town, feel free to come by our office this week. We’re having an open house for the rest of COMPTEL. If you need a place to rest for a bit, come by and chat with us or check out our phone lab, you’re all invited!
Our offices are located at:
116 Natoma St. (Link will give you directions from the Marriott)
See you there! And thanks again for joining us. Stay tuned, because there’s more to come!
Erlang Factory
It is no secret that we love Erlang. This week Erlang Factory is returning to the Bay Area this Thursday thru Friday, and 2600hz will be well-represented. If you are attending, place Karl Anderson’s talk on your calendar. He will be talking about Handling a Polyglotten WAN and taking a deep dive into messaging across back-end systems.
Additionally, James Aimonetti will be running the Case Studies and Architecture track, on Friday. James has given talks at previous Erlang Factories on the 2600hz architecture and how we’ve implemented multiple Erlang-based components into our architecture and will be taking the other side of the stage this time around.
And don’t forget, 2600hz is hosting the Unconference on the Community Day at the same location this Saturday. We’re also celebrating with a happy hour afterward and drinks are on us. Come join us!
Unconference 2012
If you haven’t heard about it already, we are hosting our first conference!!! It’s happening next Saturday March 31 in conjunction with the Erlang Factory that is taking place in San Francisco all of next week. The Unconference: Tools for Success will gather speakers like Jeff Ma (subject of Bringing Down the House the hit movie21), CTO and co-founder of Cloudant, CEO and co-founder of Podio, back-end scalability engineer of Mashape, and of course our very own Darren Schreiber.
We’re inviting entrepreneurs, start up founders, developers, back-end engineers and anyone else who’s interested in an awesome sponsored happy hour to come and join us. The speakers will be sharing all about their best tips and practices of starting their company from the ground up and the tools they used to get there. We’ll be talking about APIs, big data, workflow, datacenters and some of the industry’s best kept secrets.
Our readers can use code: Friendsof2600hz to get 25% of their ticket. Sign up.
March 22nd Service Impact Follow Up
On Thursday, March 22 at approximately 11:40am PST we experienced our first system impact that lasted for roughly 45 minutes.
After we got services back up and running and contacted all our affected customers with apologies and full detailed recaps, we had to make a choice. The question: To bring this to the attention of all our community through a blog post or simply stay put after notifying our impacted customers. Moments such as these force you to come face to face with your values, and it is always our goal to be transparent and forthcoming with our community.
So, what exactly happened yesterday?
We log a lot of data on our platform. It basically breaks down to 10,000 lines of data bouncing around every second. About 3 weeks ago, we initiated a monitoring server to aggregate and condense this data into one sequential log which allows us to locate and resolve user issues more quickly. In doing so, all our enormous amounts of data over the span of three weeks unexpectedly overloaded the monitoring server, causing a blocked operation (traffic jam of data, if you will) in all our other servers that were waiting to register to this server. While we tested this internally before putting it into production, the amount of load we experienced was unanticipated. In short, our monitoring system temporarily broke our system. (We know…the irony is not lost on us.)
Next Steps Forward
Our engineers have taken a lot of time to investigate and analyze this unusual event and create preventative measures. Because this service impact is highly uncharacteristic to our service’s design, it has given us another opportunity to fail-proof our testing even more. While we heavily test our production servers prior to deployment and have beefed up on QA in recent months, we do less testing on new operational scripts and programs. Specifically, the issue here lies in understanding the impact of our syslog program – heavy testing could have caught this, so we’ll be revising our test plans to include more aggressive testing at higher volumes and for longer periods of time.
We encourage you to contact our Communications Director directly at rachel@2600hz.com to get more details or learn more so we can work together to ensure this doesn’t occur again. We’re an open source company which means we are very much an open book in how we do things, but we aren’t perfect. This unusual event is proof of that, and we are committed to doing better.
As always, thank you for your commitment to open-source, open standards communications networks.
- The 2600hz Team
Clearing up the Cloud
The Cloud is a funny thing. It’s become this elusive, abstract, yet incredibly catchy buzzword that’s unfortunately terribly misused. Darren offers some practical questions to ask your cloud provider, with the answers they should be able to offer you if they truly are the real deal. His article is on the cover of OSP Magazine this month.
Erlang Love
Concurrency and reliability are baked into Erlang in a way that is different than most other languages I have worked with. This leads developers to think differently about application architecture, especially when it comes to error handling and failures within a large, distributed system.
Many of today’s most interesting problems in software development are also the most challenging. Concurrency in a multicore world and reliability when applications are growing ever larger and ever more complex must rank up there, along with naming and cache invalidation, as some of the most challenging problems in modern software development. Erlang is a pragmatic programming language aimed squarely at those problems. These traits make Erlang an excellent choice for building backend systems and APIs. For Example, the Riak and CouchDB databases are both implemented in Erlang as well as the RabbitMQ message queue. The Webmachine library makes writing RESTful APIs a snap.
A great post by Rackspace on Erlang that hits the nail on the head. We have to say, we agree.









