Introduction To Apidaze / Programmable Telco

 This article will go in-depth on writing your first script with our Programmable Telco application, APIDaze. We will start with a simple inbound application that provides information to the customer and then we will get into more sophisticated projects.
This manual assumes that you already have a login to the VoIP Innovations Back Office and that you have a local DID in your inventory we can play with. All set? Let's do it!

Click Apps:


 
Click the Menu button at the top right of the page. Once the drop-down appears, click on Developer Services.
The page will load, and you will see a list of Apps already created as well as the option to Create Dev App. Now, let's click Create a Dev App!


On this page, you will be prompted to select New Script or Specify External Script URL. Let's create a simple <speak> script.

When done, give it a name at the top, assign which Region to assign the DID location and then click Create App. *The region is important because it helps with redundancy. If the DID or external script is located in PA then you want to choose US East, etc.*
Great job! We are halfway there. The only thing left is to link it to a DID. Easy, right? Sure is! Click the Edit option to the left of the script you just created and click Assign Numbers.


Once you have assigned your DID to the script, please allow 15-20 minutes for propagation before testing out your script. You can now test out your script by calling the DID that you assigned to it.

Now that we have given a quick intro into programmable telco and our admin console, let's take this a step forward and create a little more advanced script. We will show how the speak script ties into a forward command.
We will call our DID and after playing an automated message, we will forward the caller to an external number that we will use as an after hours support line.
 
Receive Call, Speak and Forward
Our first app was basic. It just called the DID and read back a prompt. This was a speak command.
Let's do something a little more interesting. In this example, we will provide the customer with information and then forward them onto another number.
Now go ahead and Create a new script and drop this example code into it.
<?xml version="1.0" encoding="UTF-8"?>
<document>
<work>
<answer/>
<speak lang="en-US">
Our office is currently closed. We will forward you to our after hours support team. </speak>
<dial>
<number>11234567891</number>
</dial>
</work>
</document>

You will see your second app created. Assign your DID to it and then call the number.