VoicePHP by TringMe

TringMe, an Indian start-up just released its new VoicePHP service, which allows you to develop voice applications using PHP.

This is definitely cool stuff, though I see quite a few issues with implementation. HTTP, is, by design, a non-persistent transaction, and a phone call requires persistency while the call is in progress; therefore, there is no way for PHP alone, to handle “Voice” requests.

The only way to really make this work, is to have an external server (effectively a PBX of some kind) that handles the call traffic, that is simply polled (in some fashion) by PHP on a per request basis. Those requests could be polled via Ajax, or even a comet-like system, but it’s still not handled directly via PHP. I assume this is where their VoicePHP “Server” comes in.


So, in this sense, it sounds simply like a PHP wrapper around the TringMe REST API, which is something that can already be done in other ways, like accessing the Asterisk Manager interface via PHP using asterisk-php-api, but with one interesting twist-

It looks like (according to their FAQ) you can access the audio streams directly from PHP- which is pretty interesting, depending on how they’ve implemented it. Given the (generally) short transaction lengths of an HTTP request, I’m not sure how you would realistically pull audio from a real-time source (like a phone call), or play-back an audio clip on to a call, unless you used some sort of scheduling system.

ie- use PHP to decode and audio file (say .wav or .mp3), and then send the file to the VoicePHP server, which schedules the audio clip for playback, and returned immediately. It’s then played over the call in “real-time”. PHP could then poll the VoicePHP server to get status about the playback.

I’ve signed up for a beta account to play around with it, hopefully I’ll see something from them soon.

Leave a Reply

Your email address will not be published. Required fields are marked *