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:
@@ -537,6 +537,26 @@ function get_call_number($call_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the extension status from the database
|
||||
*
|
||||
* @param int $operator_id The queXS Operator ID
|
||||
* @return bool the extension status (false for offline, true for online)
|
||||
*
|
||||
*/
|
||||
function get_extension_status($operator_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT o.voip_status
|
||||
FROM `operator` as o
|
||||
WHERE o.operator_id = '$operator_id'";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
if (!empty($rs) && $rs['voip_status'] == 1 ) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the extension password of an operator
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user