Skip to content
mheadd edited this page Sep 14, 2010 · 6 revisions

The main Tropo Classes, can be used to render JSON objects that are executed by the Tropo WebAPI.

Simple Methods

These are methods that can be called “simply” by passing in a single argument (a string) or no argument at all. Note – some methods may be called either in simple fashion, or complex fashion (e.g., the Say() method).

  • Conference() string
  • Hangup() null
  • Redirect() string
  • Reject() null
  • Say() string
  • StopRecording() null
  • Transfer() string
  • RenderJSON() null
$tropo = new Tropo();
$tropo->Say("Hello World!");
$tropo->RenderJSON();

Complex Methods

These methods consume objects that are specific to the Tropo action desired.

  • Ask() Ask Object
  • Conference() Conference Object
  • On() On Object
  • Record() Record Object
  • Redirect() Endpoint Object
  • Say() Say Object
  • StartRecording() StartRecording Object
  • Transfer() Endpoint Object
$say = new Say("Please enter your five digit zip code.");
$choices = new Choices("[5 DIGITS]");	
$ask = new Ask(NULL, true, $choices, NULL, "foo", true, $say, 30);	
$tropo->Ask($ask);	

Clone this wiki locally