<?php

/**
 * Updating an Application to Add a Voice Token
 * The updateApplicationAddress() method can be used to add a voice token to your application; you can add a messaging token just by
 * changing the channel to "messaging" instead of "voice".
 * 
 */
require_once '../tropo.class.php';
$userid = "";
$password = "";
$applicationID = "";
$tropo = new Tropo();
try {
    echo $tropo->updateApplicationAddress($userid, $password, $applicationID, array("type" => AddressType::$token, "channel" => "messaging"));
} catch (TropoException $ex) {
    echo $ex->getMessage();
}
<?php

/**
 * Updating an Application to Add a Number from the Pool
 * the updateApplicationAddress() method can be used to add a number from the pool of available Tropo numbers, 
 * based on a specified prefix.
 * 
 */
require_once '../tropo.class.php';
$userid = "";
$password = "";
$applicationID = "";
$tropo = new Tropo();
try {
    echo $tropo->updateApplicationAddress($userid, $password, $applicationID, array("type" => AddressType::$number, "prefix" => "1407"));
} catch (TropoException $ex) {
    echo $ex->getMessage();
}
<?php

/**
 * Updating an Application to Add an AIM Address
 * The updateApplicationAddress() method can be used to add an AIM account to your application.
 * The same method can be used to add YAHOO, MSN, JABBER, GTALK and SKYPE.
 *
 */
use Tropo\Exception\TropoException;
use Tropo\REST\AddressType;
require_once '../tropo.class.php';
$userid = "";
$password = "";
$applicationID = "";
$tropo = new Tropo();
try {
    $params = array("type" => AddressType::$aim, "username" => "AIMUser01", "password" => "secret");
    echo $tropo->updateApplicationAddress($userid, $password, $applicationID, $params);
} catch (TropoException $ex) {
    echo $ex->getMessage();
}
<?php

/**
 * Updating an Application to Add an AIM Address
 * The updateApplicationAddress() method can be used to add an AIM account to your application. 
 * The same method can be used to add YAHOO, MSN, JABBER, GTALK and SKYPE.
 * 
 */
require_once '../tropo.class.php';
$userid = "";
$password = "";
$applicationID = "";
$tropo = new Tropo();
try {
    echo $tropo->updateApplicationAddress($userid, $password, $applicationID, array("type" => AddressType::$aim, "username" => "AIMUser01", "password" => "secret"));
} catch (TropoException $ex) {
    echo $ex->getMessage();
}