mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Grandstream translate the name to to the number required to set the mode.
This commit is contained in:
@@ -333,6 +333,45 @@ include "root.php";
|
||||
$device_key_value = $row['device_key_value']; //1
|
||||
$device_key_extension = $row['device_key_extension'];
|
||||
$device_key_label = $row['device_key_label']; //label
|
||||
|
||||
//grandstream modes are different based on the category
|
||||
if ($device_vendor == "grandstream") {
|
||||
if ($device_key_category == "line") {
|
||||
switch ($device_key_type) {
|
||||
case "line": $device_key_type = "0"; break;
|
||||
case "shared line": $device_key_type = "1"; break;
|
||||
case "speed dial": $device_key_type = "10"; break;
|
||||
case "blf": $device_key_type = "11"; break;
|
||||
case "presence watcher": $device_key_type = "12"; break;
|
||||
case "eventlist blf": $device_key_type = "13"; break;
|
||||
case "speed dial active": $device_key_type = "14"; break;
|
||||
case "dial dtmf": $device_key_type = "15"; break;
|
||||
case "voicemail": $device_key_type = "16"; break;
|
||||
case "call return": $device_key_type = "17"; break;
|
||||
case "transfer": $device_key_type = "18"; break;
|
||||
case "call park": $device_key_type = "19"; break;
|
||||
case "intercom": $device_key_type = "20"; break;
|
||||
case "ldap search": $device_key_type = "21"; break;
|
||||
}
|
||||
}
|
||||
if ($device_key_category == "memory") {
|
||||
switch ($device_key_type) {
|
||||
case "speed dial": $device_key_type = "0"; break;
|
||||
case "blf": $device_key_type = "1"; break;
|
||||
case "presence watcher": $device_key_type = "2"; break;
|
||||
case "eventlist blf": $device_key_type = "3"; break;
|
||||
case "speed dial active": $device_key_type = "4"; break;
|
||||
case "dial dtmf": $device_key_type = "5"; break;
|
||||
case "voicemail": $device_key_type = "6"; break;
|
||||
case "call return": $device_key_type = "7"; break;
|
||||
case "transfer": $device_key_type = "8"; break;
|
||||
case "call park": $device_key_type = "9"; break;
|
||||
case "intercom": $device_key_type = "10"; break;
|
||||
case "ldap search": $device_key_type = "11"; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//assign the variables
|
||||
if (strlen($device_key_category) == 0) {
|
||||
$view->assign("key_id_".$device_key_id, $device_key_id);
|
||||
|
||||
Reference in New Issue
Block a user