Exemple #1
0
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//ini_set("display_errors", 1 );
header("content-type: text/xml");
$user_id = $_GET["user_id"];
echo '<?xml version="1.0"?>';
require_once 'class/global.config.php';
require_once 'class/database.inc.php';
require_once 'class/config.inc.php';
require_once 'class/class.yui.php';
require_once 'class/class.asterisk.php';
$yui = new phpyui("/yui2");
if (PHONE_SYSTEM == "asterisk") {
    $phone = new Asterisk();
    $calls = $phone->get_current_calls($user_id);
    $printr = print_r($calls, true);
    /* cid = number
     * name = full name
     * contact_id = cid
     * type = Type
     *
     */
    $printr = "<textarea style='width: 300px;height: 300px;'> {$printr} </textarea>";
    $printr = $yui->string_to_xml($printr);
} else {
    $calls = array();
}
$tmparr = array();
function display_number($t)
{