Hello Tropo!
March 26th, 2011 by cmatthieu
By now you have noticed that you can place free 10 minute phone calls to any number in the United States and Canada from the PhonoSDK. Are you ready to graduate to longer calls and other powerful features such as conferencing, call recording, user input with touch tones and speech recognition, text-to-speech, and call transfers? This is where Tropo comes in!
Let’s walk you through creating a simple Tropo application that will allow you to place calls to any phone number in the world without a time limit.
1. Sign into your Tropo account using the same credentials as your Phono account.
2. Create a Tropo Scripting API app.
3. Copy and paste this JavaScript code into the app
answer();
say("hold please");
transfer(currentCall.getHeader("x-sbc-numbertodial"));
4. Hit the “Create Application” button and that’s it on the Tropo side. You will notice that this app will also create a Phono AppID for you as well.
5. Open your Phono app and use the following code to pass your own telephone number to your Tropo app:
call = phono.phone.dial(your_phono_app_id_from_tropo, {
headers: [
{
name:"numbertodial",
value:"14805551212"
}
],
That’s it! Here’s what we did. We told Phono to place a SIP phone call directly into your Tropo AppID and passed the real phone number to dial in the SIP header. Tropo answers your SIP call from Phono, says “please hold”, and transfers your SIP call to the real phone number in the SIP header.
The best part is that you did this all using only Javascript! What will you build now?
No related posts.

RSS Feed
March 26th, 2011 at 1:01 pm
Where can we see all the headers passed? And why SBC? Does the provider matter or change?
March 27th, 2011 at 2:00 am
I already use phono app to make outgoing SIP calls using my API key. I’d like to know if the method in this post is any different. And how is Tropo/Phono able to provide SIP to PSTN calls without a time limit? When you say “calls around the world”, are these calls to SIP phones or actual PSTN numbers?
March 27th, 2011 at 9:37 am
Voxeo has SBCs that route and pass SIP headers from Phono to Tropo. In this example, numbertodial is a variable – not a reserved word. You can pass any string name in the header of your app as described in the Phono docs and you can access them in Tropo by adding the prefix “x-sbc-”.
March 27th, 2011 at 9:42 am
Phono can send and receive SIP calls natively. Tropo can route SIP calls to PSTN (and visa versa). This post demonstrates how to connect Phono to your Tropo account to place calls to any country using your Tropo account. If you are placing calls outside of North America, long distance rates will be billed to your Tropo account.