Merge pull request #30 from chan-sccp/issue/28

Device SEP ID
This commit is contained in:
steve-lad 2021-07-30 11:54:02 +02:00 committed by GitHub
commit 49fd6a5c91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 20 deletions

View file

@ -1250,14 +1250,14 @@ and open the template in the editor. Base Version before all crash :-)
<page_group name="sccp_hw_dev">
<label>General Device configuration</label>
<item type="IE" id="1" seq="99">
<label>Device SEP ID.[XXXXXXXXXXXX]=MAC</label>
<label>Device ID.[XXXXXXXXXXXX]=MAC</label>
<input>
<name>mac</name>
<default></default>
<class>sccp-custom</class>
<options></options>
</input>
<help>The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX or XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX</help>
<help>The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX, XX:XX:XX:XX:XX:XX, XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX</help>
</item>
<item type="SDM" id="2" seq="99">
<label>Type</label>
@ -1280,7 +1280,7 @@ and open the template in the editor. Base Version before all crash :-)
<page_group name="sccp_hw_dev_edit">
<label>General Device configuration</label>
<item type="IE" id="1" seq="99">
<label>Device SEP ID</label>
<label>Device ID</label>
<input>
<name>mac</name>
<default></default>
@ -1388,7 +1388,7 @@ and open the template in the editor. Base Version before all crash :-)
<page_group name="sccp_hw_dev_button">
<label>Buttons Configuration</label>
<item type="IE" id="1" seq="99">
<label>Device MAC SEP.</label>
<label>Device MAC.</label>
<input>
<name>mac</name>
<default>000000000</default>
@ -1888,13 +1888,13 @@ and open the template in the editor. Base Version before all crash :-)
<page_group name="sccp_hw_sip_dev">
<label>General Device configuration</label>
<item type="IE" id="1" seq="99">
<label>Device SEP ID.[XXXXXXXXXXXX]=MAC</label>
<label>Device ID.[XXXXXXXXXXXX]=MAC</label>
<input>
<name>mac</name>
<default>000000000</default>
<class>sccp-custom</class>
</input>
<help>The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX or XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX</help>
<help>The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX, XX:XX:XX:XX:XX:XX, XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX</help>
</item>
<item type="SDMS" id="2" seq="99">
<label>Type</label>

View file

@ -910,8 +910,8 @@ msgid "General Device configuration"
msgstr "Абонентского устройство"
#: views/sccpgeneral.xml:
msgid "Device SEP ID.[XXXXXXXXXXXX]=MAC"
msgstr "Устройство SEP ID : [XXXXXXXXXXXX]=MAC"
msgid "Device ID.[XXXXXXXXXXXX]=MAC"
msgstr "Устройство ID : [XXXXXXXXXXXX]=MAC"
#: views/sccpgeneral.xml:
msgid ""
@ -955,8 +955,8 @@ msgid "Device Label"
msgstr "Название Устройства"
#: views/sccpgeneral.xml:
msgid "Device SEP ID"
msgstr "Идентификатор устройства SEP ID"
msgid "Device ID"
msgstr "Идентификатор устройства ID"
#: views/sccpgeneral.xml:
msgid "The information in the upper right corner of the device screen"
@ -1005,7 +1005,7 @@ msgid "Buttons Configuration"
msgstr "Настройка Кнопок"
#: views/sccpgeneral.xml:
msgid "Device MAC SEP."
msgid "Device MAC."
msgstr "Прямое подключение."
#: views/sccpgeneral.xml:

View file

@ -679,7 +679,7 @@ msgid "General Device configuration"
msgstr ""
#: views/sccpgeneral.xml:
msgid "Device SEP ID.[XXXXXXXXXXXX]=MAC"
msgid "Device ID.[XXXXXXXXXXXX]=MAC"
msgstr ""
#: views/sccpgeneral.xml:
@ -707,7 +707,7 @@ msgid "Device Label"
msgstr ""
#: views/sccpgeneral.xml:
msgid "Device SEP ID"
msgid "Device ID"
msgstr ""
#: views/sccpgeneral.xml:
@ -743,7 +743,7 @@ msgid "Buttons Configuration"
msgstr ""
#: views/sccpgeneral.xml:
msgid "Device MAC SEP."
msgid "Device MAC."
msgstr ""
#: views/sccpgeneral.xml:

View file

@ -28,7 +28,7 @@ if (!empty($_REQUEST['new_id'])) {
// Overwrite some specific defaults based on $_REQUEST
$val = str_replace(array('SEP','ATA','VG'), '', $dev_id);
$val = implode('.', sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
$val = implode(':', sscanf($val, '%2s%2s%2s%2s%2s%2s')); // Convert to Cisco display Format
$def_val['mac'] = array("keyword" => 'mac', "data" => $val, "seq" => "99");
$val = $_REQUEST['type'];
$def_val['type'] = array("keyword" => 'type', "data" => $val, "seq" => "99");
@ -66,7 +66,7 @@ if (!empty($_REQUEST['id'])) {
case 'name':
$key = 'mac'; //This is the key that formShow expects
$val = str_replace(array('SEP','ATA','VG'), '', $val);
$val = implode('.', sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
$val = implode(':', sscanf($val, '%2s%2s%2s%2s%2s%2s')); // Convert to Cisco display Format
$def_val[$key] = array("keyword" => $key, "data" => $val, "seq" => "99");
break;
// case 'permit':

View file

@ -17,7 +17,7 @@ $def_val['directed_pickup_context'] = array("keyword" => 'directed_pickup_conte
if (!empty($_REQUEST['new_id'])) {
$dev_id = $_REQUEST['new_id'];
$val = str_replace(array('SEP','ATA','VG'), '', $dev_id);
$val = implode('.', sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
$val = implode(':', sscanf($val, '%2s%2s%2s%2s%2s%2s')); // Convert to Cisco display Format
$def_val['mac'] = array("keyword" => 'mac', "data" => $val, "seq" => "99");
$val = $_REQUEST['type'];
$def_val['type'] = array("keyword" => 'type', "data" => $val, "seq" => "99");
@ -51,7 +51,8 @@ if (!empty($_REQUEST['id'])) {
case 'name':
$key = 'mac';
$val = str_replace(array('SEP','ATA','VG'), '', $val);
$val = implode('.', sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
$val = implode(':', sscanf($val, '%2s%2s%2s%2s%2s%2s')); // Convert to Cisco display Format
$def_val[$key] = array("keyword" => $key, "data" => $val, "seq" => "99");
break;
case '_hwlang':
$tmpar = explode(":", $val);

View file

@ -35,7 +35,7 @@
<thead>
<tr>
<th data-checkbox="true"></th>
<th data-sortable="true" data-field="mac"><?php echo _('Device SEP ID') ?></th>
<th data-sortable="true" data-field="mac"><?php echo _('Device ID') ?></th>
<th data-sortable="true" data-field="description"><?php echo _('Device Description') ?></th>
<th data-sortable="true" data-formatter="DispayTypeFormatter" data-field="type"><?php echo _('Device type') ?></th>
<th data-sortable="true" data-field="button" data-formatter="LineFormatter"><?php echo _('Line') ?></th>

View file

@ -29,7 +29,7 @@
<thead>
<tr>
<th data-checkbox="true"></th>
<th data-sortable="true" data-field="mac"><?php echo _('Device SEP ID') ?></th>
<th data-sortable="true" data-field="mac"><?php echo _('Device ID') ?></th>
<th data-sortable="true" data-field="description"><?php echo _('Device Descriptions') ?></th>
<th data-sortable="true" data-formatter="DispayTypeFormatter" data-field="type"><?php echo _('Device type') ?></th>
<th data-sortable="true" data-field="button" data-formatter="LineFormatter"><?php echo _('Line') ?></th>