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

Set VoIP status in database functions

This commit is contained in:
azammitdcarf
2010-08-31 00:51:07 +00:00
parent 02b84a2dd0
commit d88f03d974
2 changed files with 26 additions and 4 deletions

View File

@@ -537,6 +537,28 @@ function get_call_number($call_id)
return false;
}
/**
* Set the extension status in the database
*
* @param int $operator_id The queXS Operator ID
* @param bool the extension status (false for offline, true for online)
*
*/
function set_extension_status($operator_id,$online = true)
{
global $db;
$s = 0;
if ($online) $s = 1;
$sql = "UPDATE `operator`
SET voip_status = '$s'
WHERE operator_id = '$operator_id'";
$db->Execute($sql);
}
/**
* Return the extension status from the database
*