Created
January 17, 2011 22:06
-
-
Save mheadd/783592 to your computer and use it in GitHub Desktop.
Simple outbound call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Include the Tropo WebAPI class. | |
| require('classes/tropo.class.php'); | |
| // Create a new Session object and get the value of the number_to_dial parameter. | |
| $session = new Session(); | |
| $number_to_dial = $session->getParameters("number_to_dial"); | |
| // Create a new Tropo object, dial and say the message. | |
| $tropo = new Tropo(); | |
| $tropo->call("tel:+1".$number_to_dial); | |
| $tropo->say("This is a test call."); | |
| // Render the JSON for Tropo to consume. | |
| $tropo->renderJSON(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl "http://api.tropo.com/1.0/sessions/?action=create&token=[your-token-value]&number_to_dial=XXXXXXXXXX"