I’ve been following TADHack and its related events for some time, and finally this month I got the opportunity to attend TADHack-mini Paris. Participants can join from remote too, but the personal full immersion is something different (even, ironically, when the topic is Real Time Communications, and more in particular WebRTC and Telecom APIs.
We met in central Paris and had from 10am on Saturday until 2pm on Sunday to benefit from the presence of to the API providers (Apidaze, Circuit by Unify, Cisco Spark / Tropo, Telestax, Truphone, Voximplant), create a project, make it work and prepare a 5 minute pitch.
Our team (Federico Cabiddu, Giacomo Vacca, Marco Barre, Karel Bourgois) wanted to build a system that fits the typical scenario of somebody traveling internationally and has a direct interest in receiving calls from various sources. For example a salesman or a consultant. The user we imagined wants to be contacted at GSM numbers from different countries or from a web page, and optionally wants to make a direct contact with the “prospect customers” by welcoming them with a video greeting and asking the caller to leave a video message.
Our user wants also to receive a notification about a new video message, possibly with a URL of the video, an attachment with just the audio, a transcription of the message, and a link to call back via web.
Yes, that’s a lot of stuff to do, so we tried as much as possible to use building box already existing, and link them through standard interfaces.
For the GSM numbers from different countries we used Truphone, we “bought” a UK number for the purpose of the project.
The core of the voicemail platform was provided by Telestax through Restcomm, its developer platform. We set up an account on Amazon AWS and spun-up a restcomm instance, associating a SIP URI, a greeting message (audio only) and a conditional redirection to a GSM number (a French one).
For the calls from web we had many choices among the sponsors Telestax, VoxImplant, Tropo, Apidaze all provide a solution. But since the time was extremely limited and the Apidaze.io developers prepared a test account for us in just minutes, we chose to integrate it in the project. We just needed a simple HTML5 page which connects to the Apidaze servers and after authentication generates a call to a GSM number of choice (we had some free credit too).
The interfaces between the user and the system, and between the components were standard: WebRTC APIs in the browser (we were happy to “limit” the project to Chrome and FireFox), SIP, HTTP.
But we wanted to push it a little with the video messages and transcriptions.
Telestax doesn’t offer yet the possibility to record a video as voicemail message, and VoxImplant told us that video was present in their offering but as a beta feature to be enabled for us on demand.
We went into re-using a tutorial provided by the Kurento media server (not a sponsor of the event but a very interesting platform/solution). The ‘kurento-recorder’ source code was modified to get as input a few pieces of data from the web page: caller name, callee name, caller “call me back” GSM number, time-stamp) and after establishing an audio/video WebRTC stream with the calling web page, store the recorded video on the same host.
As an aside, since Chrome has become more restrictive in terms of insecure origins, we had to enable HTTPS and WSS (Secure WebSockets). For the purpose of the project we just generated a self-signed certificate and made a little trick on the browser to make it accept the WSS connection (which is fine for a hackhathon).
Both the web page hosting the Apidaze-based web client and kurento media servers were hosted on an Ubuntu Digital Ocean machine created for this occasion.
So at a certain point we had:
- Calls from traditional telephony to a UK GSM number (provided by Truphone)
- Calls from a web page (enabled by apidaze) to that same UK GSM number
- Calls from a web page to a SIP URI reaching the Telestax platform, and then redirected to a French GSM number of choice
- Video messages recorded on a kurento media server, with some associated information
To complete the project we wanted to extract the audio from the video message, and include a transcription into the email notification. Push-To-Talk style audio and video messages are becoming very popular, and the automatic transcription can add some value, in our opinion. We didn’t have time to try out a solution based on existing APIs, so we just used incrontab to trigger a python script that uses ffmpeg to extract the audio and Google’s Speech Recognition to transcribe it. This integrated nicely with the Telecom APIs, and worked well in at least two more demos after the official TADHack mini Paris pitch.
Competition was tough and numerous: just the pitches took a total of 2h30m, with about 5m per project and people pitching also from remote. But we were very pleased to have our project awarded a prize from Telestax, apidaze and Truphone! Here’s the full story of all the winners.
The event planning and networking were also great on Saturday evening there was pizza, beer and live music! I’m personally looking forward for the next TADHack events (plan for 2016) around the world. It’d be great to attend at least one in person and many more remotely.
By Giacomo Vacca