Remove the Yealink hot desking as I believe I have created a better way that is more secure.
This commit is contained in:
parent
1bc39c31c4
commit
48bbced278
|
|
@ -296,30 +296,6 @@ include "root.php";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the device uuid using the username and password
|
|
||||||
if (strlen($_REQUEST['user_id']) > 0 || strlen($_REQUEST['userid']) > 0) {
|
|
||||||
//set the variables
|
|
||||||
$user_id = $_REQUEST['user_id'];
|
|
||||||
$password = $_REQUEST['password'];
|
|
||||||
if (strlen($_REQUEST['userid']) > 0) { $user_id = $_REQUEST['userid']; }
|
|
||||||
if (strlen($_REQUEST['passwd']) > 0) { $password = $_REQUEST['passwd']; }
|
|
||||||
//get the device uuid
|
|
||||||
$sql = "SELECT * FROM v_device_lines ";
|
|
||||||
$sql .= "WHERE user_id = :user_id ";
|
|
||||||
$sql .= "AND password = :password ";
|
|
||||||
$sql .= "AND domain_uuid = :domain_uuid ";
|
|
||||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
|
||||||
$prep_statement->bindParam(':user_id', $user_id);
|
|
||||||
$prep_statement->bindParam(':password', $password);
|
|
||||||
$prep_statement->bindParam(':domain_uuid', $domain_uuid);
|
|
||||||
$prep_statement->execute();
|
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
|
||||||
foreach($result as $row) {
|
|
||||||
$device_uuid = $row['device_uuid'];
|
|
||||||
}
|
|
||||||
unset ($prep_statement);
|
|
||||||
}
|
|
||||||
|
|
||||||
//alternate device_uuid
|
//alternate device_uuid
|
||||||
if (strlen($device_uuid) > 0) {
|
if (strlen($device_uuid) > 0) {
|
||||||
$sql = "SELECT * FROM v_devices ";
|
$sql = "SELECT * FROM v_devices ";
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<YealinkIPPhoneInputScreen
|
|
||||||
type="string"
|
|
||||||
Password="no"
|
|
||||||
Timeout="15"
|
|
||||||
LockIn="no"
|
|
||||||
inputLanguage="English"
|
|
||||||
displayMode = "normal"
|
|
||||||
defaultIndex="2" >
|
|
||||||
|
|
||||||
<Title wrap="yes">Login Cancelled</Title>
|
|
||||||
</YealinkIPPhoneInputScreen>
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
<YealinkIPPhoneConfiguration>
|
|
||||||
{foreach $lines as $row}
|
|
||||||
{if isset($user_password_1) }
|
|
||||||
<Item>account.{$row.line_number}.enable = 1</Item>
|
|
||||||
{else}
|
|
||||||
<Item>account.{$row.line_number}.enable = 0</Item>
|
|
||||||
{/if}
|
|
||||||
<Item>account.{$row.line_number}.label = {$row.display_name}</Item>
|
|
||||||
<Item>account.{$row.line_number}.display_name = {$row.display_name}</Item>
|
|
||||||
<Item>account.{$row.line_number}.user_name = {$row.user_id}</Item>
|
|
||||||
<Item>account.{$row.line_number}.password = {$row.password}</Item>
|
|
||||||
<Item>account.{$row.line_number}.auth_name = {$row.auth_id}</Item>
|
|
||||||
<Item>account.{$row.line_number}.sip_server_host = {$row.server_address}</Item>
|
|
||||||
<Item>account.{$row.line_number}.sip_server.1.address = {$row.server_address}</Item>
|
|
||||||
<Item>account.{$row.line_number}.sip_server_port = {$row.sip_port}</Item>
|
|
||||||
<Item>account.{$row.line_number}.outbound_host = {$row.outbound_proxy}</Item>
|
|
||||||
<Item>account.{$row.line_number}.outbound_port = {$row.sip_port}</Item>
|
|
||||||
<Item>account.{$row.line_number}.expires = {$row.register_expires}</Item>
|
|
||||||
<!-- Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV -->
|
|
||||||
{if $sip_transport_1 == 'udp'}<Item>account.{$row.line_number}.transport = 0</Item>{/if}
|
|
||||||
{if $sip_transport_1 == 'tcp'}<Item>account.{$row.line_number}.transport = 1</Item>{/if}
|
|
||||||
{if $sip_transport_1 == 'tls'}<Item>account.{$row.line_number}.transport = 2</Item>{/if}
|
|
||||||
{if $sip_transport_1 == 'dns srv'}<Item>account.{$row.line_number}.transport = 3</Item>{/if}
|
|
||||||
{/foreach}
|
|
||||||
|
|
||||||
{foreach $keys as $row}
|
|
||||||
{if $row.device_key_category == "line"}
|
|
||||||
<!-- Line Key {$row.device_key_id}-->
|
|
||||||
<Item>linekey.{$row.device_key_id}.line = {$row.device_key_line}</Item>
|
|
||||||
<Item>linekey.{$row.device_key_id}.value = {$row.device_key_value}</Item>
|
|
||||||
{if $row.device_key_category == "blf"}
|
|
||||||
<Item>linekey.{$row.device_key_id}.pickup_value = {$row.device_key_extension}</Item>
|
|
||||||
{/if}
|
|
||||||
<Item>linekey.{$row.device_key_id}.type = {$row.device_key_type}</Item>
|
|
||||||
<!--<Item>linekey.{$row.device_key_id}.xml_phonebook = </Item>-->
|
|
||||||
<Item>linekey.{$row.device_key_id}.label = {$row.device_key_label}</Item>
|
|
||||||
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
|
||||||
|
|
||||||
{foreach $keys as $row}
|
|
||||||
{if $row.device_key_category == "memory"}
|
|
||||||
<!-- Memory key {$row.device_key_id} -->
|
|
||||||
<Item>memorykey.{$row.device_key_id}.type = {$row.device_key_type}</Item>
|
|
||||||
<Item>memorykey.{$row.device_key_id}.line = {$row.device_key_line}</Item>
|
|
||||||
<Item>memorykey.{$row.device_key_id}.value = {$row.device_key_value}</Item>
|
|
||||||
{if $row.device_key_type == "blf"}
|
|
||||||
<Item>memorykey.{$row.device_key_id}.pickup_value = {$row.device_key_extension}</Item>
|
|
||||||
{/if}
|
|
||||||
<Item>memorykey.{$row.device_key_id}.label = {$row.device_key_label}</Item>
|
|
||||||
<Item>memorykey.{$row.device_key_id}.xml_phonebook = </Item>
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
|
||||||
|
|
||||||
{foreach $keys as $row}
|
|
||||||
{if $row.device_key_category == "expansion"}
|
|
||||||
<!-- Expansion module 1 key {$row.device_key_id} -->
|
|
||||||
<Item>expansion_module.1.key.{$row.device_key_id}.type = {$row.device_key_type}</Item>
|
|
||||||
<Item>expansion_module.1.key.{$row.device_key_id}.line = {$row.device_key_line}</Item>
|
|
||||||
<Item>expansion_module.1.key.{$row.device_key_id}.value = {$row.device_key_value}</Item>
|
|
||||||
{if $row.device_key_type == "blf"}
|
|
||||||
<Item>expansion_module.1.key.{$row.device_key_id}.pickup_value = {$row.device_key_extension}</Item>
|
|
||||||
{/if}
|
|
||||||
<Item>expansion_module.1.key.{$row.device_key_id}.label = {$row.device_key_label}</Item>
|
|
||||||
<Item>expansion_module.1.key.{$row.device_key_id}.xml_phonebook = </Item>
|
|
||||||
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
|
||||||
|
|
||||||
<Item>voice_mail.number.1 = {$voicemail_number}</Item>
|
|
||||||
</YealinkIPPhoneConfiguration>
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
<YealinkIPPhoneInputScreen
|
|
||||||
type="string"
|
|
||||||
Beep="yes"
|
|
||||||
Password="no"
|
|
||||||
Timeout="0"
|
|
||||||
LockIn="no"
|
|
||||||
inputLanguage="English"
|
|
||||||
cancelAction="http://{$domain_name}{$project_path}/app/provision/?file=cancel.xml&template={$template}"
|
|
||||||
displayMode = "condensed"
|
|
||||||
defaultIndex="1" >
|
|
||||||
<!-- displayMode parameter only for T46 T48 T28 model. -->
|
|
||||||
|
|
||||||
<Title>Login de usuario</Title>
|
|
||||||
|
|
||||||
<URL>http://{$domain_name}{$project_path}/app/provision/?file=config.xml&template={$template}</URL>
|
|
||||||
|
|
||||||
<InputField type="number" password="no" editable="yes">
|
|
||||||
<Prompt>Usuario:</Prompt>
|
|
||||||
<Parameter>userid</Parameter>
|
|
||||||
<Selection>1</Selection>
|
|
||||||
<Default>{$user_id}</Default>
|
|
||||||
</InputField>
|
|
||||||
|
|
||||||
<InputField type="string" password="yes" editable="yes">
|
|
||||||
<Prompt>Senha:</Prompt>
|
|
||||||
<Parameter>passwd</Parameter>
|
|
||||||
<Selection>2</Selection>
|
|
||||||
<Default>{$password}</Default>
|
|
||||||
</InputField>
|
|
||||||
</YealinkIPPhoneInputScreen>
|
|
||||||
Loading…
Reference in New Issue