Tropo is part of CiscoLearn More

Conference Call Apps Made Easy with Tropo

Posted on March 16, 2011 by Adam Kalsey

Tropo makes it super simple to create a conference call application.

In just a few lines of code, you can have a functional conference call application that you can use with Skype, SIP or a PSTN number.

Creating an app is as simple as this:

// Welcome the caller to the conference.
say("Welcome to the conference line. Press the star key to exit.");

// Start the conference.
conference("1337", {
terminator: "*",
playTones: true
});

// Play a message when the caller leaves the conference.
say("Thanks for calling the conference line. Goodbye.");

A conference call application – in JavaScript! How easy is that?

But it gets even better!

Tropo also makes it super simple to record a conference call if your use case requires it. With just a few extra lines of code (and a small bit of server side logic) you can record conference calls.

Again, in JavaScript:

// Start recording the conference call.
startCallRecording("http://url-for-your-server/record.php", { format: "audio/mp3" });

// Welcome the caller to the conference.
say("Welcome to the conference line. Press the star key to exit.");

// Start the conference.
conference("1337", {
terminator : "*",
playTones : true
});

// Play a message when the caller leaves the conference.
say("Thanks for calling the conference line. Goodbye.");

// Stop call recording.
stopCallRecording();

Using the Tropo startCallRecording() method, you can designate where your recorded audio file is sent and the format of the audio file. Saving the audio files on the server side can be done with a trivial amount of code.

For example, in PHP:

<?php

// Audio files saved to a parallel directory called 'recordings'

$target_path = 'recordings/' . $_FILES['filename']['name'];
move_uploaded_file($_FILES['filename']['tmp_name'], $target_path);

?>

With Tropo, it’s never been easier or more efficient to create powerful conference call applications in JavaScript, or any of the other languages support by the Tropo Scripting platform.

Happy conferencing!

Leave a Reply