2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

VoIP is done on an operator by operator basis

This commit is contained in:
azammitdcarf
2009-11-12 03:45:25 +00:00
parent 24b4f9e0e0
commit 2288dc8134
8 changed files with 68 additions and 21 deletions

View File

@@ -58,19 +58,28 @@ $callstatus = is_on_call($operator_id);
if ($callstatus == 3) //On a call
{
if (VOIP_ENABLED)
if (is_voip_enabled($operator_id))
{
if (isset($_GET['callsupervisor']))
{
include("functions/functions.voip.php");
$v = new voip();
$v->connect(VOIP_SERVER);
$v->addParty(get_extension($operator_id),SUPERVISOR_EXTENSION);
print "<p>" . T_("Calling the supervisor, you may close this window") . "</p>";
if (strcmp($_GET['callsupervisor'],"hangup") == 0)
{
$v->hangup(get_extension($operator_id));
print "<p>" . T_("You may now close this window") . "</p>";
}
else
{
$v->addParty(get_extension($operator_id),SUPERVISOR_EXTENSION);
print "<p>" . T_("Calling the supervisor, you may close this window") . "</p>";
}
}
else
{
print "<p><a href='?callsupervisor=callsupervisor'>" . T_("Click here to call the supervisor's phone. A conference call will be created with the respondent, yourself and the supervisor. Otherwise close this window") . "</a></p>";
// print "<p><a href='?callsupervisor=hangup'>" . T_("Hangup when calling the supervisor") . "</a></p>";
}
}
else
@@ -80,19 +89,28 @@ if ($callstatus == 3) //On a call
}
else if ($callstatus == 0 || $callstatus == 4 || $callstatus == 5)
{
if (VOIP_ENABLED)
if (is_voip_enabled($operator_id))
{
if (isset($_GET['callsupervisor']))
{
include("functions/functions.voip.php");
$v = new voip();
$v->connect(VOIP_SERVER);
$v->dial(get_extension($operator_id),SUPERVISOR_EXTENSION);
print "<p>" . T_("Calling the supervisor, you may close this window") . "</p>";
if (strcmp($_GET['callsupervisor'],"hangup") == 0)
{
$v->hangup(get_extension($operator_id));
print "<p>" . T_("You may now close this window") . "</p>";
}
else
{
$v->dial(get_extension($operator_id),SUPERVISOR_EXTENSION);
print "<p>" . T_("Calling the supervisor, you may close this window") . "</p>";
}
}
else
{
print "<p><a href='?callsupervisor=callsupervisor'>" . T_("Click here to call the supervisor's phone. Otherwise close this window") . "</a></p>";
// print "<p><a href='?callsupervisor=hangup'>" . T_("Hangup when calling the supervisor") . "</a></p>";
}
}
else