To assist our developers to quickly build enterprise grade voice enable applications, TringMe has released source code for it's widgets. It can be downloaded from here.
Below are sample examples of how easy it is to use TringMe APIs.
Create Account
Following is an implementation of a Create Account using TringMe APIs.
<?php
include_once ("tringmehelper.php");
$publickey = "yourpublicapikey";
$privatekey = "yourprivateapikey";
$email ='someemail@somedomain.com';
$name ='Some Name';
$password ='SomePassword';
TringMeCreateUser($email, $password, $result, $name);
?>
LogIn
Following is an implementation of how to LogIn using TringMe APIs.
<?php
include_once ("tringmehelper.php");
$publickey = "yourpublicapikey";
$privatekey = "yourprivateapikey";
$email ='someemail@somedomain.com';
$password ='SomePassword';
TringMeLogin($email, $password, $result);
?>
Call
Following is an implementation of a Click To Call application using TringMe APIs.
<?php
include_once ("tringmehelper.php");
$publickey = "yourpublicapikey";
$privatekey = "yourprivateapikey";
$callsrc ='18585551111';
$calldest ='18585552222';
TringMeCall($privatekey, $publickey, $callsrc, $calldest);
?>
Conference
Following is an implementation of how to Create a Conference using TringMe APIs.
<?php
include_once ("tringmehelper.php");
$publickey = "yourpublicapikey";
$privatekey = "yourprivateapikey";
$pin ='1234';
$apin ='5678';
TringMeCreateConference($pin, $apin, $result);
?>
Send SMS
Following is an implementation of how to send an SMS using TringMe APIs.
<?php
include_once ("tringmehelper.php");
$publickey = "yourpublicapikey";
$privatekey = "yourprivateapikey";
$destination ='18585552222';
TringMeSendSMS($privatekey, $publickey, $destination, "Hello World");
?>
Channel
Following is an implementation of how to create a Channel using TringMe APIs.
<?php
include_once ("tringmehelper.php");
$publickey = "yourpublicapikey";
$privatekey = "yourprivateapikey";
$destination ='18585552222';
TringMeSendSMS($privatekey, $publickey, $destination, "Hello World");
?>
Get Rates
Following is an implementation to Get the Rates for a number using TringMe APIs.
<?php
include_once ("tringmehelper.php");
$publickey = "yourpublicapikey";
$privatekey = "yourprivateapikey";
$callsrc ='18585551111';
$calldest ='18585552222';
TringMeCall($privatekey, $publickey, $callsrc ,$calldest);
?>
SIP Settings
Following is an implementation to set your SIP Settings using TringMe APIs.
<?php
include_once ("tringmehelper.php");
$publickey = "yourpublicapikey";
$privatekey = "yourprivateapikey";
$destination ='18585552222';
TringMeSendSMS($privatekey, $publickey, $destination, "Hello World");
?>
More examples can be found in the code samples available for download here