Tropo WebAPI Development Guide Home  |  Frameset Home

  Rejecting a Call  |  TOC  |  Working with Simple Grammar  

Creating a Conference Call


The conference call - one of the most basic and common needs for any company of any size. Tropo makes conferencing absurdly simple - all you really need to get one going is a few lines of code:

require 'tropo-webapi-ruby'
require 'sinatra'

post '/index.json' do
  
  t = Tropo::Generator.new
  
  t.say("Welcome to the conference!")
  t.conference({:name => 'conference',
                :id => '1234'})
  
  t.response
  
end
var http = require('http');
var tropo_webapi = require('tropo-webapi');

var server = http.createServer(function (request, response) {  
  
	var tropo = new TropoWebAPI();
	
	tropo.say("Welcome to the conference!");
	//(id, mute, name, playTones, required, terminator)
	tropo.conference("1234", null, "conference", null, null, null);
	
	response.end(TropoJSON(tropo));

}).listen(8000); 


<?php

require 'tropo.class.php';

$tropo = new Tropo();

$tropo->say("Transferring you now, please wait");

$tropo->conference(null, array("name"=>"conference", "id" => "1234"));
	
$tropo->RenderJson();

?>
from itty import *
from tropo import Tropo

@post('/index.json')

def index(request):

	t = Tropo()
	
	t.say("Welcome to the conference!")
	t.conference(id = "1234", name = "conference")
	
	return t.RenderJson()

run_itty(server='wsgiref', host='0.0.0.0', port=8888)
{"tropo":[
      {
         "say":[{"value":"Welcome to the conference!"}]
      },
      {
         "conference":{
            "name":"conference",
            "id":"1234"
         }
      }
   ]}

Voila, you have a conference room capable of holding up to 100 people at one time - if you need more, let us know and we can help. Note that the maximum session time with Tropo is 2 hours, so any conference call will also have a maximum uptime of 2 hours before sessions will begin to disconnect.

You can get fancy with conferencing, too, though - add a terminator to disconnect from the call, add the ability to hear keypad tones pressed by a conference user, mute a user when they join (for presentations rather than a standard conference call), and play an exit message when they disconnect using the terminator:

require 'tropo-webapi-ruby'
require 'sinatra'

post '/index.json' do
  
  t = Tropo::Generator.new
  
  t.say("Welcome to the conference!")
  t.conference({:name => "conference",
                :id => "1234",
                :terminator => "#",
                :mute => true})
  t.say("We hope you had fun, call back soon!")
  
  t.response
  
end
var http = require('http');
var tropo_webapi = require('tropo-webapi');

var server = http.createServer(function (request, response) {  
  
	var tropo = new TropoWebAPI();
	
	tropo.say("Welcome to the conference!");

	//(id, mute, name, playTones, required, terminator)
	tropo.conference("1234", true, "conference", null, null, "#");

	tropo.say("We hope you had fun, call back soon!");
	
	response.end(TropoJSON(tropo));

}).listen(8000); 
<?php

require 'tropo.class.php';

$tropo = new Tropo();

$tropo->say("Welcome to the conference!");

$tropo->conference('1234', array("name" => "conference", "id" => "1234", "mute" => true, "terminator" => "#"));

$tropo->say("We hope you had fun, call back soon!");
	
$tropo->RenderJson();
	
?>
from itty import *
from tropo import Tropo

@post('/index.json')

def index(request):

	t = Tropo()
	
	t.say("Welcome to the conference!")
	t.conference(id = "1234", name = "conference", mute = True, terminator = "#")
	t.say("We hope you had fun, call back soon!")
	
	return t.RenderJson()

run_itty(server='wsgiref', host='0.0.0.0', port=8888)
{"tropo":[
      {
         "say":[{"value":"Welcome to the conference!"}]
      },
      {
         "conference":{
            "name":"conference",
            "terminator":"#",
            "id":"1234",
            "mute":true
         }
      },
      {
         "say":[{"value":"We hope you had fun, call back soon!"}]
      }
   ]
}

Any conference ID you use in production will be shared among all your production applications; likewise any development app conference IDs are shared among all your development apps. These IDs are not shared with other accounts, so if you have conference ID 1234, you won't conflict if another Tropo user is also using 1234.

Good to go with call control?

Next Step: Working with Simple Grammar



  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  Rejecting a Call  |  TOC  |  Working with Simple Grammar  

© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site