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

VoIP status is now part of VoIP monitoring so we don't query the Asterisk server often

Uses the "Register" and "Unregister" options of Asterisk to get extension status
Stores voip_status in operator table
This commit is contained in:
azammitdcarf
2010-07-30 03:18:14 +00:00
parent 864ba7968d
commit 3bbb234896
5 changed files with 89 additions and 15 deletions

View File

@@ -68,9 +68,6 @@ print "<div class='text'>" . get_operator_time($operator_id,"%a %d %b %h:%i%p")
if (is_voip_enabled($operator_id))
{
include("functions/functions.voip.php");
$v = new voip();
$v->connect(VOIP_SERVER);
$ext = get_extension($operator_id);
$exta = $ext;
//Get just the start of the extension for auto dial out
@@ -78,7 +75,7 @@ if (is_voip_enabled($operator_id))
if (isset($exts[1]))
$exta = $exts[1];
$extp = get_extension_password($operator_id);
if ($v->getExtensionStatus($ext))
if (get_extension_status($operator_id))
print "<div class='online statusbutton'><a href='news://turnvoipoff'>" . T_("VoIP On") . "</a></div>";
else
print "<div class='offline statusbutton'><a href='irc://$exta:$extp@" . VOIP_SERVER . "/'>" . T_("VoIP Off") . "</a></div>";