<?php
/**
* MiniClick
* Gestionnaire de tableau collaboratif
* Copyright (C) 2006 Guillaume Monet <gm@ibreizh.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 
*
* @package miniclick
* @version 5.0.0
*/
//include("http://192.168.1.158/User_Settings/search_call_phonebook_B.html?WINDWEB_URL=%2FUser_Settings%2Fsearch_call_phonebook_B.html&SelectName=6&sTBName=Rodolphe&TBNumber=".$_GET['phone']."&Dial_SC=+Appeler\r\n");

/*
session_start();
include_once("../../includes/utils/phpagi/phpagi-asmanager.php");
//include("../../includes/connection/connection.php");

$context="interne";
$PhoneNum = $_GET['phone'];
$PhoneCall = ereg_replace("[ ()-]+", "", $PhoneNum);
$Extension = "SIP/phone02";
$from=$Extension;
echo $PhoneNum;
?>
<html>
<br><b>Veuillez decrocher votre telephone</b><br>
<?
flush();
$channel = $from;
$exten = $PhoneCall;
$context = $context;
$priority = '1';
$timeout = '';
$callerid = '';
$variable = '';
$account = '';
$application = '';
$data = '';
$as = new AGI_AsteriskManager();
$res = $as->connect();
if (!$res){ echo 'Error connection to the Asterisk manager!'; exit();}
$res = $as->Originate ($channel, $exten, $context, $priority, $timeout, $callerid, $variable, $account, $application, $data);
$as->disconnect();
?>
<h1>Veuillez patienter</H1><hr>
<b>Composition du n<?=$PhoneNum;?></b><br>
<a href="#" onclick="if(window.opener){window.close()}else{alert('This page is not being displayed as a popup.')}">Fermer la fenetre</a>
</center>
</body>
</html>*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr-FR">
<head>
<meta http-equiv=refresh content="0; URL=http://192.168.1.158/?WINDWEB_URL=&sTBName= &TBNumber=<?echo $_GET['phone'];?>&Dial_SC=+Appeler\r\n">
<meta name="author" content="Guillaume Monet" />
<meta name="generator" content="author" />
</head>
<body>
</body>
</html>