mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Status updated to handle extension password for switching VoIP on an off
VoIP Functions can properly handle IAX2 extensions
This commit is contained in:
10
status.php
10
status.php
@@ -72,10 +72,16 @@ if (is_voip_enabled($operator_id))
|
||||
$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
|
||||
$exts = explode('/', $ext, 2);
|
||||
if (isset($exts[1]))
|
||||
$exta = $exts[1];
|
||||
$extp = get_extension_password($operator_id);
|
||||
if ($v->getExtensionStatus($ext))
|
||||
print "<div class='online statusbutton'>" . T_("VoIP On") . "</div>";
|
||||
print "<div class='online statusbutton'><a href='news://turnvoipoff'>" . T_("VoIP On") . "</a></div>";
|
||||
else
|
||||
print "<div class='offline statusbutton'>" . T_("VoIP Off") . "</div>";
|
||||
print "<div class='offline statusbutton'><a href='irc://$exta:$extp@" . VOIP_SERVER . "/'>" . T_("VoIP Off") . "</a></div>";
|
||||
}
|
||||
else
|
||||
print "<div class='online statusbutton'>" . T_("No VoIP") . "</div>";
|
||||
|
||||
Reference in New Issue
Block a user