-- Added new features for the future (now disabled)

-- Changed time zone settings
-- Changed the list of supported codecs
-- Added the ability to specify the DNS name as the server interface
-- Bug Fix
-- Add Vendor Config Options
This commit is contained in:
PhantomVl 2020-04-16 20:35:50 +03:00
parent 363bfbc658
commit 2d57895fc1
16 changed files with 1163 additions and 278 deletions

View file

@ -382,6 +382,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO
"name" => _("SCCP Device"),
"page" => 'views/server.device.php'
),
"sccpurl" => array(
"name" => _("SCCP Device URL"),
"page" => 'views/server.url.php'
),
"sccpinfo" => array(
"name" => _("SCCP info"),
"page" => 'views/server.info.php'
@ -401,6 +405,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO
"name" => _("SCCP Device"),
"page" => 'views/server.device.php'
),
"sccpurl" => array(
"name" => _("SCCP Device URL"),
"page" => 'views/server.url.php'
),
"sccpntp" => array(
"name" => _("SCCP Time"),
"page" => 'views/server.datetime.php'
@ -1512,7 +1520,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO
public function getCodecs($type, $showDefaults = false)
{
$allSupported = array();
$Sccp_Codec = array('alaw', 'ulaw', 'g722', 'g723', 'g726', 'g729', 'gsm', 'ilbc', 'h264', 'h263', 'h261');
$Sccp_Codec = array('alaw', 'ulaw', 'g722', 'g723', 'g726', 'g729', 'gsm', 'h264', 'h263', 'h261');
switch ($type) {
case 'audio':
$lcodecs = $this->getMyConfig('voicecodecs');
@ -1861,10 +1869,9 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO
global $amp_conf;
$save_settings = array();
if (empty($save_value)) {
foreach ($this->sccpvalues as $key => $val) {
if (!trim($val['data']) == '') {
if ((trim($val['data']) !== '') or ($val['data'] == '0') ) {
$save_settings[] = array($key, $db->escapeSimple($val['data']), $val['seq'], $val['type']);
}
}

View file

@ -250,6 +250,20 @@ class dbinterface
switch ($db_name) {
case 'sccpsettings':
foreach ($save_value as $key_v => $data) {
if (!empty($data)) {
if (isset($data[1])) {
if ($data[1] == $this->val_null) {
unset($save_value[$key_v]);
}
}
if (isset($data['data'])) {
if ($data['data'] == $this->val_null) {
unset($save_value[$key_v]);
}
}
}
}
if ($mode == 'clear') {
$sql = 'truncate `sccpsettings`';
$stmt = $db->prepare($sql);

View file

@ -10,15 +10,13 @@
namespace FreePBX\modules\Sccp_manager;
class srvinterface
{
class srvinterface {
var $error;
var $_info;
var $ami_mode;
public function __construct($parent_class = null)
{
public function __construct($parent_class = null) {
$this->paren_class = $parent_class;
if ($this->paren_class == null) {
$this->paren_class = $this;
@ -43,6 +41,13 @@ class srvinterface
} else {
throw new \Exception("Invalid Class inside in the include folder" . $freepbx);
}
} else {
if (is_null($this->$key)) {
if (class_exists($class, false)) {
$this->$key = new $class($this->paren_class);
$this->_info [] = $this->$key->info();
}
}
}
}
if ($this->aminterface->status()) {
@ -51,8 +56,7 @@ class srvinterface
$this->ami_mode = $this->aminterface->status();
}
public function info()
{
public function info() {
$Ver = '14.0.1';
$info = '';
foreach ($this->_info as $key => $value) {
@ -62,8 +66,7 @@ class srvinterface
'about' => 'Server interface data ver: ' . $Ver . "\n " . $info);
}
public function sccpDeviceReset($id = '')
{
public function sccpDeviceReset($id = '') {
if ($this->ami_mode) {
return $this->aminterface->sccpDeviceReset($id, 'reset');
} else {
@ -71,8 +74,7 @@ class srvinterface
}
}
public function sccpDeviceRestart($id = '')
{
public function sccpDeviceRestart($id = '') {
if ($this->ami_mode) {
return $this->aminterface->sccpDeviceReset($id, 'restart');
} else {
@ -80,8 +82,7 @@ class srvinterface
}
}
public function sccp_device_reload($id = '')
{
public function sccp_device_reload($id = '') {
if ($this->ami_mode) {
return $this->aminterface->sccpDeviceReset($id, 'full');
} else {
@ -89,8 +90,7 @@ class srvinterface
}
}
public function sccp_reset_token($id = '')
{
public function sccp_reset_token($id = '') {
if ($this->ami_mode) {
return $this->aminterface->sccpDeviceReset($id, 'tokenack');
} else {
@ -98,8 +98,7 @@ class srvinterface
}
}
public function sccp_reload()
{
public function sccp_reload() {
if ($this->ami_mode) {
return $this->aminterface->core_sccp_reload();
// return $this->oldinterface->sccp_core_commands(array('cmd' => 'sccp_reload')); // !!!!!!!!!!!!!!!!!!!!!!!!!--------------------------- Remove
@ -108,8 +107,7 @@ class srvinterface
}
}
public function sccp_line_reload($id = '')
{
public function sccp_line_reload($id = '') {
if ($this->ami_mode) {
return $this->oldinterface->sccp_core_commands(array('cmd' => 'reload_line', 'name' => $id));
} else {
@ -117,8 +115,7 @@ class srvinterface
}
}
private function sccp_core_commands($params = array())
{
private function sccp_core_commands($params = array()) {
if ($this->ami_mode) {
if (!empty($params['cmd'])) {
@ -164,8 +161,7 @@ class srvinterface
}
}
public function sccp_getdevice_info($dev_id)
{
public function sccp_getdevice_info($dev_id) {
if (empty($dev_id)) {
return array();
}
@ -176,8 +172,7 @@ class srvinterface
}
}
public function sccp_list_hints()
{
public function sccp_list_hints() {
if ($this->ami_mode) {
return $this->aminterface->core_list_hints();
} else {
@ -185,8 +180,7 @@ class srvinterface
}
}
public function sccp_list_all_hints()
{
public function sccp_list_all_hints() {
if ($this->ami_mode) {
return $this->aminterface->core_list_all_hints();
@ -195,8 +189,7 @@ class srvinterface
}
}
public function sccp_realtime_status()
{
public function sccp_realtime_status() {
if (!$this->ami_mode) {
return $this->oldinterface->sccp_realtime_status();
} else {
@ -213,8 +206,7 @@ class srvinterface
}
}
public function get_compatible_sccp()
{
public function get_compatible_sccp() {
$res = $this->getSCCPVersion();
if (empty($res)) {
@ -245,8 +237,7 @@ class srvinterface
// return $res["vCode"];
}
public function getSCCPVersion()
{
public function getSCCPVersion() {
$res = $this->getChanSCCPVersion();
if (empty($res)) {
$res = $this->oldinterface->getCoreSCCPVersion();
@ -254,8 +245,7 @@ class srvinterface
return $res;
}
public function sccp_list_keysets()
{
public function sccp_list_keysets() {
if ($this->ami_mode) {
return $this->aminterface->sccp_list_keysets();
@ -264,8 +254,7 @@ class srvinterface
}
}
public function sccp_get_active_device()
{
public function sccp_get_active_device() {
if ($this->ami_mode) {
return $this->aminterface->sccp_get_active_device();
} else {
@ -273,8 +262,7 @@ class srvinterface
}
}
function getChanSCCPVersion()
{
function getChanSCCPVersion() {
if (!$this->ami_mode) {
return $this->oldinterface->getChanSCCPVersion();
} else {
@ -337,8 +325,7 @@ class srvinterface
}
// ---------------------------- Debug Data -------------------------------------------
function t_get_ami_data()
{
function t_get_ami_data() {
global $amp_conf;
$fp = fsockopen("127.0.0.1", "5038", $errno, $errstr, 10);
if (!$fp) {
@ -354,7 +341,6 @@ class srvinterface
// fputs($fp, "Action: SCCPShowDevice\r\n");
// fputs($fp,"Segment: general\r\n");
// fputs($fp,"DeviceName: SEP00070E36555C\r\n");
// fputs ($fp,"Action: DeviceStateList\r\n");
fputs($fp, "Action: SCCPShowDevices\r\n");
fputs($fp, "Segment: general\r\n");
@ -403,7 +389,7 @@ class srvinterface
$resp .= fgets($fp);
}
$time_resp = microtime_float();
$resp .= "\r\n\r\n Connect :".($time_send - $time_connect). " Logoff :".($time_logoff- $time_send). " Response :".($time_resp-$time_logoff)."\r\n\r\n ";
$resp .= "\r\n\r\n Connect :" . ($time_send - $time_connect) . " Logoff :" . ($time_logoff - $time_send) . " Response :" . ($time_resp - $time_logoff) . "\r\n\r\n ";
// print_r(fgets($fp));
// print_r('<br>');
// echo fgets($fp, 128);
@ -411,4 +397,5 @@ class srvinterface
fclose($fp);
return $resp;
}
}

View file

@ -36,7 +36,9 @@ class xmlinterface
if (empty($store_path) || empty($data_path) || empty($data_values)) {
return;
}
$def_xml_fields = array('authenticationURL', 'informationURL', 'messagesURL', 'servicesURL', 'directoryURL', 'proxyServerURL', 'idleTimeout', 'idleURL');
$def_xml_fields = array('authenticationURL', 'informationURL', 'messagesURL', 'servicesURL', 'directoryURL',
'secureauthenticationURL', 'secureinformationURL', 'securemessagesURL', 'secureservicesURL', 'securedirectoryURL', 'secureidleURL',
'proxyServerURL', 'idleTimeout', 'idleURL');
$def_xml_locale = array('userLocale', 'networkLocaleInfo', 'networkLocale');
$xml_name = $store_path . '/XMLDefault.cnf.xml';
$xml_template = $data_values['tftp_path'] . '/templates/XMLDefault.cnf.xml_template';
@ -67,11 +69,12 @@ class xmlinterface
if (!empty($data_values['dev_' . $value])) {
$xml_work->$value = trim($data_values['dev_' . $value]);
} else {
// $xml_work->$value = '';
$node = $xml_work->$value;
if (!empty($node)) {
unset($node[0][0]);
}
}
}
foreach ($def_xml_locale as $key) {
if (!empty($xml_work->$key)) {
$xnode = &$xml_work->$key;
@ -118,11 +121,14 @@ class xmlinterface
function create_SEP_XML($store_path = '', $data_values = array(), $dev_config = array(), $dev_id = '', $lang_info = array())
{
$var_xml_general_fields = array('authenticationURL' => 'dev_authenticationURL', 'informationURL' => 'dev_informationURL', 'messagesURL' => 'dev_messagesURL',
'servicesURL' => 'dev_servicesURL', 'directoryURL' => 'dev_directoryURL', 'proxyServerURL' => 'dev_proxyServerURL', 'idleTimeout' => 'dev_idleTimeout',
'idleURL' => 'dev_idleURL', 'sshUserId' => 'dev_sshUserId', 'sshPassword' => 'dev_sshPassword', 'deviceProtocol' => 'dev_deviceProtocol',
'phonePersonalization' => 'phonePersonalization'
$var_xml_general_fields = array('authenticationurl' => 'dev_authenticationURL', 'informationurl' => 'dev_informationURL', 'messagesurl' => 'dev_messagesURL',
'servicesurl' => 'dev_servicesURL', 'directoryurl' => 'dev_directoryURL', 'idleurl' => 'dev_idleURL',
'secureauthenticationurl' => 'dev_secureauthenticationURL',
'secureinformationurl' => 'dev_secureinformationURL', 'securemessagesurl'=>'dev_securemessagesURL',
'secureservicesurl'=>'dev_secureservicesURL', 'securedirectoryurl'=>'dev_securedirectoryURL', 'secureidleurl' => 'dev_secureidleURL',
'proxyserverurl' => 'dev_proxyServerURL', 'idletimeout' => 'dev_idleTimeout',
'sshuserid' => 'dev_sshUserId', 'sshpassword' => 'dev_sshPassword', 'deviceprotocol' => 'dev_deviceProtocol',
'phonepersonalization' => 'phonePersonalization'
);
$var_xml_general_vars = array('capfAuthMode' => 'null', 'capfList' => 'null', 'mobility' => 'null',
'phoneServices' => 'null', 'certHash' => 'null',
@ -161,17 +167,18 @@ class xmlinterface
foreach ($xml_work as $key => $data) {
// Set System global Values
if (!empty($var_xml_general_fields[$key])) {
$xml_work->$key = $data_values[$var_xml_general_fields[$key]];
$key_l = strtolower($key);
if (!empty($var_xml_general_fields[$key_l])) {
$xml_work->$key = $data_values[$var_xml_general_fields[$key_l]];
}
// Set section Values
$xml_node = $xml_work->$key;
switch ($key) {
case 'devicePool':
switch ($key_l) {
case 'devicepool':
$xml_node = $xml_work->$key;
foreach ($xml_work->$key->children() as $dkey => $ddata) {
switch ($dkey) {
case 'dateTimeSetting':
switch (strtolower($dkey)) {
case 'datetimesetting':
$xnode = &$xml_node->$dkey;
$tz_id = $data_values['ntp_timezone'];
$TZdata = $data_values['ntp_timezone_id'];
@ -191,7 +198,7 @@ class xmlinterface
}
// Ntp Config
break;
case 'srstInfo':
case 'srstinfo':
if ($data_values['srst_Option'] == 'user') {
break;
}
@ -224,10 +231,10 @@ class xmlinterface
}
}
break;
case 'connectionMonitorDuration':
case 'connectionmonitorduration':
$xml_node->$dkey = strval(intval(intval($data_values['keepalive']) * 0.75));
break;
case 'callManagerGroup':
case 'callmanagergroup':
$xnode = &$xml_node->$dkey->members;
$bind_tmp = $this->get_server_sccp_bind($data_values);
$ifc = 0;
@ -235,8 +242,15 @@ class xmlinterface
$xnode_obj = clone $xnode->member;
$xnode_obj['priority'] = $ifc;
$xnode_obj->callManager->name = $data_values['servername'];
if (!is_null($xnode_obj->callManager->description)) {
$xnode_obj->callManager->description = $data_values['servername'];
}
$xnode_obj->callManager->ports->ethernetPhonePort = $bind_value['port'];
$xnode_obj->callManager->processNodeName = $bind_value['ip'];
if (!empty($xnode_obj->callManager->ports->mgcpPorts)) {
unset($xnode_obj->callManager->ports->mgcpPorts);
}
if ($ifc === 0) {
$this->replaceSimpleXmlNode($xnode->member, $xnode_obj);
} else {
@ -292,10 +306,25 @@ class xmlinterface
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
break;
case 'versionStamp':
case 'vendorconfig':
$xml_node = $xml_work->$key;
foreach ($xml_work->$key->children() as $dkey => $ddata) {
$dkey_l = strtolower($dkey);
$vtmp_key = $key_l.'_'.$dkey_l;
if (isset($data_values[$vtmp_key])) {
$vtmp_data = $data_values[$vtmp_key];
if ((!empty($vtmp_data)) || ($vtmp_data == "0")) {
$xml_node->$dkey = $vtmp_data;
}
}
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
break;
case 'versionstamp':
$xml_work->$key = time();
break;
case 'loadInformation':
case 'loadinformation':
// Set Path Image ????
if (isset($dev_config["tftp_firmware"])) {
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["tftp_firmware"] . $dev_config["loadimage"] : '';
@ -320,33 +349,33 @@ class xmlinterface
// $this->appendSimpleXmlNode($xml_work , $xnode_obj);
}
break;
case 'commonProfile':
case 'commonprofile':
$xml_node->phonePassword = $data_values['dev_sshPassword'];
$xml_node->backgroundImageAccess = (($data_values['backgroundImageAccess'] == 'on') || ($data_values['backgroundImageAccess'] == 'true') ) ? 'true' : 'false';
$xml_node->callLogBlfEnabled = $data_values['callLogBlfEnabled'];
break;
case 'userLocale':
case 'networkLocaleInfo':
case 'networkLocale':
case 'userlocale':
case 'networklocaleinfo':
case 'networklocale':
$hwlang = '';
$lang = '';
if (!empty($dev_config["_hwlang"])) {
$hwlang = explode(':', $dev_config["_hwlang"]);
}
if (($key == 'networkLocaleInfo') || ($key == 'networkLocale')) {
if (($key_l == 'networklocaleinfo') || ($key_l == 'networklocale')) {
$lang = (empty($hwlang[0])) ? $data_values['netlang'] : $hwlang[0];
} else {
$lang = (empty($hwlang[1])) ? $data_values['devlang'] : $hwlang[1];
}
if (($lang != 'null') && (!empty($lang))) {
if ($key == 'networkLocale') {
if ($key_l == 'networklocale') {
$xml_work->$key = $lang;
} else {
if (isset($lang_info[$lang])) {
$xml_node->name = $lang_info[$lang]['locale'];
$xml_node->langCode = $lang_info[$lang]['code'];
if ($key == 'userLocale') {
if ($key_l == 'userlocale') {
$xml_node->winCharSet = $lang_info[$lang]['codepage'];
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);

View file

@ -0,0 +1,237 @@
<?xml version="1.0"?>
<device xsi:type="axl:XIPPhone" ctiid="406" uuid="{aed907f9-9e22-72d8-c218-b7165fff6d37}">
<fullConfig>true</fullConfig>
<portalDefaultServer>x.x.x.x</portalDefaultServer>
<deviceProtocol>SCCP</deviceProtocol>
<sshUserId/>
<sshPassword/>
<ipAddressMode>0</ipAddressMode>
<allowAutoConfig>true</allowAutoConfig>
<dadEnable>true</dadEnable>
<redirectEnable>false</redirectEnable>
<echoMultiEnable>false</echoMultiEnable>
<ipPreferenceModeControl>0</ipPreferenceModeControl>
<ipMediaAddressFamilyPreference>0</ipMediaAddressFamilyPreference>
<tzdata>
<tzolsonversion>2016g</tzolsonversion>
<tzupdater>tzupdater.jar</tzupdater>
</tzdata>
<mlppDomainId>000000</mlppDomainId>
<mlppIndicationStatus>Off</mlppIndicationStatus>
<preemption>Disabled</preemption>
<executiveOverridePreemptable>false</executiveOverridePreemptable>
<devicePool uuid="{f8d7c5cb-5d3b-e6c0-0200-8608c8138e66}">
<revertPriority>0</revertPriority>
<name>MyDeviceName</name>
<dateTimeSetting uuid="{ce543907-40b1-efe8-21e1-bdd1853c9594}">
<name>timezone name</name>
<dateTemplate>M-D-Y</dateTemplate>
<timeZone/>
<olsonTimeZone>Europe/Amsterdam</olsonTimeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Directed Broadcast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<name>MyGroupName</name>
<tftpDefault>false</tftpDefault>
<members>
<member priority="0">
<callManager>
<name>My CM1 name</name>
<description>My CM Description</description>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
<mgcpPorts>
<listen>2427</listen>
<keepAlive>2428</keepAlive>
</mgcpPorts>
</ports>
<processNodeName>y.y.y.y</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo uuid="{cd241e11-4a58-4d3d-9661-f06c912a18a3}">
<name>Disable</name>
<srstOption>Disable</srstOption>
<userModifiable>false</userModifiable>
<ipAddr1/>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
<sipIpAddr1/>
<sipPort1>5060</sipPort1>
<sipIpAddr2/>
<sipPort2>5060</sipPort2>
<sipIpAddr3/>
<sipPort3>5060</sipPort3>
<isSecure>false</isSecure>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<commonProfile>
<phonePassword/>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<loadInformation>CP7925G-1.4.8.4</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<garp>0</garp>
<webAccess>2</webAccess>
<WlanProfile1>0</WlanProfile1>
<WlanProfile2>0</WlanProfile2>
<WlanProfile3>0</WlanProfile3>
<WlanProfile4>0</WlanProfile4>
<loadServer>MyAdminUsername</loadServer>
<adminPassword>MyPassword#$%^!</adminPassword>
<specialNumbers/>
<PushToTalkURL/>
<sendKeyAction>0</sendKeyAction>
<phoneBookWebAccess>0</phoneBookWebAccess>
<unlockSettingsSequence>1</unlockSettingsSequence>
<appButtonTimer>0</appButtonTimer>
<appButtonPriority>0</appButtonPriority>
<outOfRangeAlert>0</outOfRangeAlert>
<scanningMode>0</scanningMode>
<restrictDataRates>0</restrictDataRates>
<powerOffWhenCharging>0</powerOffWhenCharging>
<cdpEnable>1</cdpEnable>
<g722CodecSupport>0</g722CodecSupport>
<homeScreen>0</homeScreen>
<fipsMode>0</fipsMode>
<autoSelectLineEnable>0</autoSelectLineEnable>
<fileSystemVerificationEnable>0</fileSystemVerificationEnable>
<minimumRingVolume>0</minimumRingVolume>
<java>1</java>
</vendorConfig>
<commonConfig>
<sshAccess>1</sshAccess>
<RingLocale>0</RingLocale>
<companyPhotoDir>http://z.z.z.z/pictures/%%sAMAccountName%%.jpg</companyPhotoDir>
<ice/>
<instantMessaging/>
<desktopClient/>
</commonConfig>
<enterpriseConfig>
<ciscoCamera>1</ciscoCamera>
<energyWiseDomain>MyaAdminUsername</energyWiseDomain>
<energyWiseSecret>MyPassword#$%^!</energyWiseSecret>
<webProtocol>0</webProtocol>
<companyPhotoDir>http://z.z.z.z/pictures/%%sAMAccountName%%.jpg</companyPhotoDir>
<ice/>
<instantMessaging/>
<desktopClient/>
</enterpriseConfig>
<versionStamp>1234562241-013d4ba4-5b51-4be6-9792-b7165fff6d37</versionStamp>
<userLocale>
<name>English_United_States</name>
<uid>1</uid>
<langCode>en_US</langCode>
<version>10.0.0.0(1)</version>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version>10.0.0.0(1)</version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<idleTimeout>0</idleTimeout>
<authenticationURL>http://z.z.z.z:8080/sccp/authenticate.php</authenticationURL>
<directoryURL>http://z.z.z.z:8080/sccp/xmldirectory.php</directoryURL>
<idleURL/>
<informationURL>http://z.z.z.z:8080/sccp/helptext.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://z.z.z.z:8080/sccp/servicesmenu.php</servicesURL>
<secureAuthenticationURL>https://z.z.z.z:8443/sccp/authenticate.php</secureAuthenticationURL>
<secureDirectoryURL>https://z.z.z.z:8443/sccp/xmldirectory.php</secureDirectoryURL>
<secureIdleURL/>
<secureInformationURL>https://z.z.z.z:8443/sccp/helptext.php</secureInformationURL>
<secureMessagesURL/>
<secureServicesURL>https://z.z.z.z:8443/sccp/servicesmenu.php</secureServicesURL>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>96</dscpForCm2Dvce>
<transportLayerProtocol>1</transportLayerProtocol>
<dndCallAlert>5</dndCallAlert>
<phonePersonalization>0</phonePersonalization>
<rollover>0</rollover>
<singleButtonBarge>0</singleButtonBarge>
<joinAcrossLines>0</joinAcrossLines>
<autoCallPickupEnable>false</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
<processNodeName>y.y.y.y</processNodeName>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
<advertiseG722Codec>0</advertiseG722Codec>
<mobility>
<handoffdn/>
<dtmfdn/>
<ivrdn/>
<dtmfHoldCode>*81</dtmfHoldCode>
<dtmfExclusiveHoldCode>*82</dtmfExclusiveHoldCode>
<dtmfResumeCode>*83</dtmfResumeCode>
<dtmfTxfCode>*84</dtmfTxfCode>
<dtmfCnfCode>*85</dtmfCnfCode>
</mobility>
<TLSResumptionTimer>3600</TLSResumptionTimer>
<userId/>
<ownerId/>
<phoneServices useHTTPS="true">
<provisioning>2</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Corporate Directory</name>
<url>Application:Cisco/CorporateDirectory</url>
<vendor/>
<version/>
</phoneService>
</phoneServices>
</device>

View file

@ -0,0 +1,237 @@
<?xml version="1.0"?>
<device ctiid="406" uuid="{aed907f9-9e22-72d8-c218-b7165fff6d37}">
<fullConfig>true</fullConfig>
<portalDefaultServer>x.x.x.x</portalDefaultServer>
<deviceProtocol>SCCP</deviceProtocol>
<sshUserId/>
<sshPassword/>
<ipAddressMode>0</ipAddressMode>
<allowAutoConfig>true</allowAutoConfig>
<dadEnable>true</dadEnable>
<redirectEnable>false</redirectEnable>
<echoMultiEnable>false</echoMultiEnable>
<ipPreferenceModeControl>0</ipPreferenceModeControl>
<ipMediaAddressFamilyPreference>0</ipMediaAddressFamilyPreference>
<tzdata>
<tzolsonversion>2016g</tzolsonversion>
<tzupdater>tzupdater.jar</tzupdater>
</tzdata>
<mlppDomainId>000000</mlppDomainId>
<mlppIndicationStatus>Off</mlppIndicationStatus>
<preemption>Disabled</preemption>
<executiveOverridePreemptable>false</executiveOverridePreemptable>
<devicePool uuid="{f8d7c5cb-5d3b-e6c0-0200-8608c8138e66}">
<revertPriority>0</revertPriority>
<name>MyDeviceName</name>
<dateTimeSetting uuid="{ce543907-40b1-efe8-21e1-bdd1853c9594}">
<name>timezone name</name>
<dateTemplate>M-D-Y</dateTemplate>
<timeZone/>
<olsonTimeZone>Europe/Amsterdam</olsonTimeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Directed Broadcast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<name>MyGroupName</name>
<tftpDefault>false</tftpDefault>
<members>
<member priority="0">
<callManager>
<name>My CM1 name</name>
<description>My CM Description</description>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
<mgcpPorts>
<listen>2427</listen>
<keepAlive>2428</keepAlive>
</mgcpPorts>
</ports>
<processNodeName>y.y.y.y</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo uuid="{cd241e11-4a58-4d3d-9661-f06c912a18a3}">
<name>Disable</name>
<srstOption>Disable</srstOption>
<userModifiable>false</userModifiable>
<ipAddr1/>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
<sipIpAddr1/>
<sipPort1>5060</sipPort1>
<sipIpAddr2/>
<sipPort2>5060</sipPort2>
<sipIpAddr3/>
<sipPort3>5060</sipPort3>
<isSecure>false</isSecure>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<commonProfile>
<phonePassword/>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<loadInformation>CP7925G-1.4.8.4</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<garp>0</garp>
<webAccess>2</webAccess>
<WlanProfile1>0</WlanProfile1>
<WlanProfile2>0</WlanProfile2>
<WlanProfile3>0</WlanProfile3>
<WlanProfile4>0</WlanProfile4>
<loadServer>MyAdminUsername</loadServer>
<adminPassword>MyPassword#$%^!</adminPassword>
<specialNumbers/>
<PushToTalkURL/>
<sendKeyAction>0</sendKeyAction>
<phoneBookWebAccess>0</phoneBookWebAccess>
<unlockSettingsSequence>1</unlockSettingsSequence>
<appButtonTimer>0</appButtonTimer>
<appButtonPriority>0</appButtonPriority>
<outOfRangeAlert>0</outOfRangeAlert>
<scanningMode>0</scanningMode>
<restrictDataRates>0</restrictDataRates>
<powerOffWhenCharging>0</powerOffWhenCharging>
<cdpEnable>1</cdpEnable>
<g722CodecSupport>0</g722CodecSupport>
<homeScreen>0</homeScreen>
<fipsMode>0</fipsMode>
<autoSelectLineEnable>0</autoSelectLineEnable>
<fileSystemVerificationEnable>0</fileSystemVerificationEnable>
<minimumRingVolume>0</minimumRingVolume>
<java>1</java>
</vendorConfig>
<commonConfig>
<sshAccess>1</sshAccess>
<RingLocale>0</RingLocale>
<companyPhotoDir>http://z.z.z.z/pictures/%%sAMAccountName%%.jpg</companyPhotoDir>
<ice/>
<instantMessaging/>
<desktopClient/>
</commonConfig>
<enterpriseConfig>
<ciscoCamera>1</ciscoCamera>
<energyWiseDomain>MyaAdminUsername</energyWiseDomain>
<energyWiseSecret>MyPassword#$%^!</energyWiseSecret>
<webProtocol>0</webProtocol>
<companyPhotoDir>http://z.z.z.z/pictures/%%sAMAccountName%%.jpg</companyPhotoDir>
<ice/>
<instantMessaging/>
<desktopClient/>
</enterpriseConfig>
<versionStamp>1234562241-013d4ba4-5b51-4be6-9792-b7165fff6d37</versionStamp>
<userLocale>
<name>English_United_States</name>
<uid>1</uid>
<langCode>en_US</langCode>
<version>10.0.0.0(1)</version>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version>10.0.0.0(1)</version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<idleTimeout>0</idleTimeout>
<authenticationURL>http://z.z.z.z:8080/sccp/authenticate.php</authenticationURL>
<directoryURL>http://z.z.z.z:8080/sccp/xmldirectory.php</directoryURL>
<idleURL/>
<informationURL>http://z.z.z.z:8080/sccp/helptext.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://z.z.z.z:8080/sccp/servicesmenu.php</servicesURL>
<secureAuthenticationURL>https://z.z.z.z:8443/sccp/authenticate.php</secureAuthenticationURL>
<secureDirectoryURL>https://z.z.z.z:8443/sccp/xmldirectory.php</secureDirectoryURL>
<secureIdleURL/>
<secureInformationURL>https://z.z.z.z:8443/sccp/helptext.php</secureInformationURL>
<secureMessagesURL/>
<secureServicesURL>https://z.z.z.z:8443/sccp/servicesmenu.php</secureServicesURL>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>96</dscpForCm2Dvce>
<transportLayerProtocol>1</transportLayerProtocol>
<dndCallAlert>5</dndCallAlert>
<phonePersonalization>0</phonePersonalization>
<rollover>0</rollover>
<singleButtonBarge>0</singleButtonBarge>
<joinAcrossLines>0</joinAcrossLines>
<autoCallPickupEnable>false</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
<processNodeName>y.y.y.y</processNodeName>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
<advertiseG722Codec>0</advertiseG722Codec>
<mobility>
<handoffdn/>
<dtmfdn/>
<ivrdn/>
<dtmfHoldCode>*81</dtmfHoldCode>
<dtmfExclusiveHoldCode>*82</dtmfExclusiveHoldCode>
<dtmfResumeCode>*83</dtmfResumeCode>
<dtmfTxfCode>*84</dtmfTxfCode>
<dtmfCnfCode>*85</dtmfCnfCode>
</mobility>
<TLSResumptionTimer>3600</TLSResumptionTimer>
<userId/>
<ownerId/>
<phoneServices useHTTPS="true">
<provisioning>2</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Corporate Directory</name>
<url>Application:Cisco/CorporateDirectory</url>
<vendor/>
<version/>
</phoneService>
</phoneServices>
</device>

View file

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<device>
<fullConfig>true</fullConfig>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<ipAddressMode>2</ipAddressMode>
<ipPreferenceModeControl>1</ipPreferenceModeControl>
<allowAutoConfig>true</allowAutoConfig>
<devicePool uuid="{1b1b9eb6-7803-11d3-bdf0-00108302ead1}">
<revertPriority>1</revertPriority>
<dateTimeSetting>
<dateTemplate>M/D/YA</dateTemplate>
<timeZone>Eastern Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>213.109.127.195</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<name>pbxserver1</name>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<srstOption>Disable</srstOption>
<ipAddr1>x.x.x.x</ipAddr1>
<port1>2443</port1>
<ipAddr2/>
<port2/>
<isSecure>false</isSecure>
</srstInfo>
<connectionMonitorDuration>60</connectionMonitorDuration>
</devicePool>
<versionStamp>1b1b9eb6-7803-11d3-bdf0-00108302ead1</versionStamp>
<commonProfile>
<phonePassword>1234</phonePassword>
<defaultBackground>http://x.x.x.x/Chan-SCCP-b.png</defaultBackground>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<forwardingDelay>1</forwardingDelay>
<settingsAccess>1</settingsAccess>
<videoCapability>1</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<webAccess>0</webAccess>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:30</displayOnTime>
<displayOnDuration>11:30</displayOnDuration>
<displayIdleTimeout>01:00</displayIdleTimeout>
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
<loggingDisplay>1</loggingDisplay>
<autoCallSelect>0</autoCallSelect>
<logServer>x.x.x.x:9001</logServer>
<enableCdpSwPort>1</enableCdpSwPort>
<enableCdpPcPort>1</enableCdpPcPort>
<enableLldpSwPort>1</enableLldpSwPort>
<enableLldpPcPort>1</enableLldpPcPort>
<lldpAssetId>Cisco Phone</lldpAssetId>
<powerPriority>1</powerPriority>
<detectCMConnectionFailure>0</detectCMConnectionFailure>
<g722CodecSupport>2</g722CodecSupport>
<sshAccess>0</sshAccess>
<pcPort>0</pcPort>
<spanToPCPort>0</spanToPCPort>
<callHoldRingback>1</callHoldRingback>
<rtcp>1</rtcp>
<rtpcontrolprotocol>1</rtpcontrolprotocol>
<videoRtcp>1</videoRtcp>
</vendorConfig>
<userLocale>
<name>English_United_States</name>
<uid>39</uid>
<langCode>en_US</langCode>
<version>9.3(2.9902)US</version>
<winCharSet>utf-8</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<informationURL>http://x.x.x.x/shiftkey/handle_shift.php</informationURL>
<authenticationURL>http://x.x.x.x/authenticate.php</authenticationURL>
<!--<servicesURL>http://x.x.x.x/cisco/service.php?emcc=#EMCC#</servicesURL>-->
<directoryURL>http://x.x.x.x/CiscoDirectory/phonebook.php</directoryURL>
<messagesURL/>
<proxyServerURL/>
<dndCallAlert>5</dndCallAlert>
<dndReminderTimer>60</dndReminderTimer>
<phonePersonalization>0</phonePersonalization>
<rollover>0</rollover>
<singleButtonBarge>1</singleButtonBarge>
<joinAcrossLines>1</joinAcrossLines>
<autoCallPickupEnable>true</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>1</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>1</blfAudibleAlertSettingOfBusyStation>
<advertiseG722Codec>1</advertiseG722Codec>
<userId>dkgroot</userId>
<transportLayerProtocol>2</transportLayerProtocol>
<deviceSecurityMode>1</deviceSecurityMode>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<phoneServices>
<provisioning>0</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="0" category="0">
<name>Services</name>
<url>http://x.x.x.x/cisco/service.php?emmcmode=#EMCC#</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="0" category="0">
<name>Login</name>
<url>http://x.x.x.x/cisco/service.php?name=#DEVICENAME#&amp;emmcmode=#EMCC#&amp;action=loginform</url>
<vendor/>
<version/>
</phoneService>
</phoneServices>
</device>

View file

@ -5,9 +5,7 @@
// Templete for Sccp Driver
//
namespace FreePBX\modules\Core\Drivers;
class Sccp extends \FreePBX\modules\Core\Driver
{
class Sccp extends \FreePBX\modules\Core\Driver {
private $data_fld = array("pin"=>'pin', "label" => 'label', "accountcode" => 'account',
"context" =>'lcontext',"incominglimit"=>'incominglimit',
"callgroup"=>'callgroup',"pickupgroup"=>'pickupgroup',
@ -20,8 +18,7 @@ class Sccp extends \FreePBX\modules\Core\Driver
'namedcallgroup'=>'namedcallgroup', 'namedpickupgroup' => 'namedpickupgroup'
);
public function getInfo()
{
public function getInfo() {
return array(
"rawName" => "sccp",
"hardware" => "sccp_custom",
@ -44,16 +41,15 @@ class Sccp extends \FreePBX\modules\Core\Driver
return true;
}
*/
public function addDevice($id, $settings)
{
public function addDevice($id, $settings) {
$add_fld = array ("name"=>'label',"outboundcid"=>'cid_num',"langcode"=>'language',"extdisplay"=>'description');
// print_r($_REQUEST);
// echo '<br><br>';
// die(print_r($settings));
// print_r($_REQUEST);
// echo '<br><br>';
// die(print_r($settings));
$settings['cid_num']['value']='';
if (isset($_REQUEST)) {
foreach ($add_fld as $key => $val) {
if (!empty($_REQUEST[$key])) {
if (isset($_REQUEST)){
foreach($add_fld as $key => $val) {
if (!empty($_REQUEST[$key])){
$settings[$val]['value'] = $_REQUEST[$key];
}
}
@ -63,9 +59,9 @@ class Sccp extends \FreePBX\modules\Core\Driver
}
$sql = 'INSERT INTO sccpline (name';
$sqlv = 'values ("'.$id.'"';
foreach ($this->data_fld as $key => $val) {
if (!empty($settings[$val])) {
if (!empty($settings[$val]['value'])) {
foreach($this->data_fld as $key => $val) {
if (!empty($settings[$val]) ) {
if (!empty($settings[$val]['value'])){
$sql .= ', '.$key;
$sqlv .= ", '".$settings[$val]['value']."' ";
}
@ -77,8 +73,7 @@ class Sccp extends \FreePBX\modules\Core\Driver
return true;
}
public function delDevice($id)
{
public function delDevice($id) {
$sql = "DELETE FROM sccpline WHERE name = ?";
$sth = $this->database->prepare($sql);
$sth->execute(array($id));
@ -86,12 +81,11 @@ class Sccp extends \FreePBX\modules\Core\Driver
}
public function getDevice($id)
{
public function getDevice($id) {
$sccp_line = array();
// $sql = "SELECT name as id, name as name";
// $sql = "SELECT name as id, name as name";
$sql = "SELECT name as id, name as name ";
foreach ($this->data_fld as $key => $val) {
foreach($this->data_fld as $key => $val) {
$sql .= ',`'. $key .'` as '.$val;
}
$sql .= " FROM sccpline WHERE name = ?";
@ -103,14 +97,12 @@ class Sccp extends \FreePBX\modules\Core\Driver
$result = $sth->fetch(\PDO::FETCH_ASSOC);
$tech = $result;
$tech['dial']='SCCP/'.$id;
} catch (\Exception $e) {
}
} catch(\Exception $e) {}
return $tech;
}
public function getDefaultDeviceSettings($id, $displayname, &$flag)
{
public function getDefaultDeviceSettings($id, $displayname, &$flag) {
$dial = 'SCCP';
$settings = array(
"pin" => array(
@ -181,31 +173,30 @@ class Sccp extends \FreePBX\modules\Core\Driver
}
# !TODO!: -TODO-: Would it not be better to put this part in the view directory (MVC) ? No, This is a template for Freepbx.
public function getDeviceDisplay($display, $deviceInfo, $currentcomponent, $primarySection)
{
public function getDeviceDisplay($display, $deviceInfo, $currentcomponent, $primarySection) {
$section = _("Settings");
$category = "general";
$tmparr = array();
$tt = _("The maximum number of incoming calls on this line.");
// $tmparr['incominglimit'] = array('prompttext' => _('Incoming Call Limit'), 'value' => '2', 'tt' => $tt, 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidChannel);
// !TODO!: Please change the default value for incominglimit to '6' or higher
// $tmparr['incominglimit'] = array('prompttext' => _('Incoming Call Limit'), 'value' => '2', 'tt' => $tt, 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidChannel);
// !TODO!: Please change the default value for incominglimit to '6' or higher
$tmparr['incominglimit'] = array('prompttext' => _('Incoming Call Limit'), 'value' => '2', 'tt' => $tt, 'level' => 1);
$tt = _("Asterisk context which this line will use to send and receive calls (Note: Only change this is you know what you are doing).");
$tmparr['lcontext'] = array('prompttext' => _('Line context'), 'value' => 'from-internal', 'tt' => $tt, 'level' => 1);
// !TODO!: -TODO-: Maybe completely remove support for old numberic callgroup/pickupgroup in favor of the named version ? See Sccp.class.php.v431
// !TODO!: -TODO-: Maybe completely remove support for old numberic callgroup/pickupgroup in favor of the named version ? See Sccp.class.php.v431
$tt = _("Phone call group (numeric only, example:1,3-4)");
$tmparr['callgroup'] = array('prompttext' => _('Call group id'),'value' => '', 'tt' => $tt, 'level' => 1);
// !TODO!: -TODO-: multiple allowed (not sure if that is implemented here). See Sccp.class.php.v431
// !TODO!: -TODO-: multiple allowed (not sure if that is implemented here). See Sccp.class.php.v431
$tt = _("Phone named call group (>asterisk-11)");
$tmparr['namedcallgroup'] = array('prompttext' => _('Named Call Group'),'value' => '', 'tt' => $tt, 'level' => 1);
$tt = _("Sets the pickup group (numeric only, example:1,3-4) this line is a member of. Allows this line to pickup calls from remote phones which are in this callhroup.");
$tmparr['pickupgroup'] = array('prompttext' => _('Pickup group id'),'value' => '', 'tt' => $tt, 'level' => 1);
// !TODO!: -TODO-: multiple allowed (not sure if that is implemented here). See Sccp.class.php.v431
// !TODO!: -TODO-: multiple allowed (not sure if that is implemented here). See Sccp.class.php.v431
$tt = _("Sets the named pickup name group this line is a member of. Allows this line to pickup calls from remote phones which are in this name callgroup (>asterisk-11).");
$tmparr['namedpickupgroup'] = array('prompttext' => _('Named Pickup Group'),'value' => '', 'tt' => $tt, 'level' => 1);
@ -258,8 +249,8 @@ class Sccp extends \FreePBX\modules\Core\Driver
$select[] = array( 'value' => '0x7A', 'text' => 'MLPP Bpa');
$select[] = array( 'value' => '0x7B', 'text' => 'MLPP Bnea');
$select[] = array( 'value' => '0x7C', 'text' => 'MLPP Upa');
/* !TODO!: +TODO+: I would remove the values below this line, except for 'No Tone' */
// $select[] = array( 'value' => '0x7F', 'text' => 'No Tone');
/* !TODO!: +TODO+: I would remove the values below this line, except for 'No Tone' */
// $select[] = array( 'value' => '0x7F', 'text' => 'No Tone');
$select[] = array( 'value' => '0x80', 'text' => 'Meetme Greeting Tone');
$select[] = array( 'value' => '0x81', 'text' => 'Meetme Number Invalid Tone');
$select[] = array( 'value' => '0x82', 'text' => 'Meetme Number Failed Tone');
@ -276,7 +267,7 @@ class Sccp extends \FreePBX\modules\Core\Driver
$tt = _("Outside dialtone frequency (defaul 0x22)");
$tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone'), 'value' => '0x22', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'select');
# !TODO!: -TODO-: is there no easier way to specify a boolean radio group ? No.
# !TODO!: -TODO-: is there no easier way to specify a boolean radio group ? No.
unset($select);
$select[] = array('value' => 'yes', 'text' => 'Yes');
$select[] = array('value' => 'no', 'text' => 'No');
@ -294,8 +285,8 @@ class Sccp extends \FreePBX\modules\Core\Driver
$select[] = array('value' => 'reject', 'text' => 'Reject');
$select[] = array('value' => 'silent', 'text' => 'Silent');
$select[] = array('value' => 'UserDefined', 'text' => 'UserDefined');
# !TODO!: -TODO-: The next entry should be "null/empty" (not UserDefined) -> to indicate the trie-state behaviour
# !TODO!: -TODO-: Userdefined is also a possible state, but it is not used or implemented (and it should not be implemented here, i think). See Sccp.class.php.v431, See Sccp.class.php - Old Style
# !TODO!: -TODO-: The next entry should be "null/empty" (not UserDefined) -> to indicate the trie-state behaviour
# !TODO!: -TODO-: Userdefined is also a possible state, but it is not used or implemented (and it should not be implemented here, i think). See Sccp.class.php.v431, See Sccp.class.php - Old Style
$tt = _("DND: How will dnd react when it is set on the device level dnd can have three states: off / busy(reject) / silent / UserDefined").'<br>'.
_("UserDefined - dnd that cycles through all three states off -> reject -> silent -> off (this is the normal behaviour)").'<br>'.
_("Reject - Usesr can only switch off and on (in reject/busy mode)").'<br>'.
@ -310,7 +301,7 @@ class Sccp extends \FreePBX\modules\Core\Driver
unset($select);
$select[] = array('value' => 'default', 'text' => _('default'));
if (function_exists('music_list')) {
if (function_exists('music_list')){
$moh_list = music_list();
} else {
$moh_list = array('default');

View file

@ -301,7 +301,7 @@ class Sccp extends \FreePBX\modules\Core\Driver {
$currentcomponent->addTabTranslation('sccp',_('SCCP'));
// $currentcomponent->addTabTranslation('Codec',_('Codec'));
//Fill Codecs Information
//Fill Codecs Informations
$Sccp_Codec = array('gsm','slin16','alaw','ulaw','g722','g723','g726','g728','g729','ilibc','opus','h264','h263','h265','h261');
$allCodecs = $this->freepbx->Codecs->getAudio(true);

View file

@ -536,6 +536,162 @@ and open the template in the editor. Base Version before all crash :-)
</item>
</page_group>
<page_group name="sccp_advant">
<label>Device Vendor Setting</label>
<item type="IE" id="3" seq="98">
<label>Log Server</label>
<input>
<name>vendorconfig_logserver</name>
<default></default>
<class>sccp-custom</class>
<options placeholder="x.x.x.x:9001" />
</input>
<help>Log server Address: x.x.x.x:9001 </help>
</item>
<item type="IE" id="3" seq="98">
<label>Display Not Active</label>
<input>
<name>vendorconfig_daysdisplaynotactive</name>
<default></default>
<class>sccp-custom</class>
<options placeholder="1,7" />
</input>
<help>Comma separated list of days that the phone's display is not active and will be automatically turned off after the time specified by "displayIdleTimeout" has elapsed (1 - Sunday, 7 - Saturday)</help>
</item>
<item type="IE" id="3" seq="98">
<label>Display Not Active</label>
<input>
<name>vendorconfig_displayontime</name>
<default></default>
<class>sccp-custom</class>
<options placeholder="08:00" />
</input>
<help>Time in HH:MM format to automatically turn on the phone display.</help>
</item>
<item type="IE" id="3" seq="98">
<label>Display On Duration</label>
<input>
<name>vendorconfig_displayonduration</name>
<default></default>
<class>sccp-custom</class>
<options placeholder="10:00" />
</input>
<help>Time duration in HH:MM format to automatically turn off the phone display after it was turned on.</help>
</item>
<item type="IE" id="3" seq="98">
<label>Display Idle Timeout</label>
<input>
<name>vendorconfig_displayidletimeout</name>
<default></default>
<class>sccp-custom</class>
<options placeholder="00:10" />
</input>
<help>Timeout in HH:MM format to automatically turn off phone display if outside the time specified by "daysDisplayNotActive", "displayOnTime" and "displayOnTimeout".</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_settingsaccess</name>
<label>Settings Access</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help>Whether a user can access the phone settings.</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_videocapability</name>
<label>Video Capability</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help></help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_webaccess</name>
<label>Web Access</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help>Enable the phone's HTTP server.</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_webadmin</name>
<label>Web Admin</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help>Enable remote administration using the phone's HTTP server. 8821 model only.</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_pcport</name>
<label>Pc Port</label>
<default></default>
<button value="">Inherit</button>
<button value="1">Disabled</button>
<button value="0">Enabled</button>
<help>Disable the PC (computer) port</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_spantopcport</name>
<label>Span to PC Port</label>
<default></default>
<button value="">Inherit</button>
<button value="1">Disabled</button>
<button value="0">Enabled</button>
<help>Forward packets sent and received on the SW (network) port to the PC (computer) port.</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_voicevlanaccess</name>
<label>Voice Vlan Access</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help>Allow devices connected to the PC (computer) port to access the voice VLAN.</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_enablecdpswport</name>
<label>Cdp Sw Port</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help>Enable Cisco Discovery Protocol on the SW (network) port.</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_enablecdppcport</name>
<label>Cdp PC Port</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help>Enable Cisco Discovery Protocol on the PC (computer) port.</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_enablelldpswport</name>
<label>Link Layer Discovery Sw</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help>Enable Link Layer Discovery Protocol on the SW (network) port.</help>
</item>
<item type="IS" id="6" seq="98">
<name>vendorconfig_enablelldppcport</name>
<label>Link Layer Discovery PC</label>
<default></default>
<button value="">Inherit</button>
<button value="0">Disabled</button>
<button value="1">Enabled</button>
<help> Enable Link Layer Discovery Protocol on the PC (computer) port.</help>
</item>
</page_group>
<page_group name="sccp_srst">
<label>SCCP Phone SRST</label>
<item type="HLP" id="2">
@ -623,7 +779,16 @@ and open the template in the editor. Base Version before all crash :-)
<default></default>
<value></value>
<options placeholder="http://x.x.x.x/cisco_menu/service.php"></options>
</input>
<help></help>
</item>
<item type="IE" id="1" seq="10">
<label>Phone Secure Service URL</label>
<input>
<name>dev_secureservicesURL</name>
<default></default>
<value></value>
<options placeholder="https://x.x.x.x:port/cisco_menu/service.php"></options>
</input>
<help></help>
</item>
@ -637,15 +802,15 @@ and open the template in the editor. Base Version before all crash :-)
</input>
<help>The above is simply a dummy authentication page. It literally contains one word: AUTHORIZED (it receives UserId, Password, and devicename in the url - if you truly wish to implement special auth)</help>
</item>
<item type="IE" id="3" seq="10">
<label>Phone Idle information URL</label>
<item type="IE" id="2" seq="10">
<label>Phone Secure authentication URL</label>
<input>
<name>dev_idleURL</name>
<options placeholder="http://x.x.x.x/cisco_menu/idle.php"></options>
<name>dev_secureauthenticationURL</name>
<options placeholder="https://x.x.x.x:port/cisco_menu/authentication.php"></options>
<default></default>
<value></value>
</input>
<help>URL of CiscoIPPhoneImage. Requires a non-zero setting in idleTimeout.</help>
<help></help>
</item>
<item type="IE" id="4" seq="10">
<label>Phone information URL</label>
@ -656,11 +821,29 @@ and open the template in the editor. Base Version before all crash :-)
</input>
<help></help>
</item>
<item type="IE" id="4" seq="10">
<label>Phone Secure information URL</label>
<input>
<name>dev_secureinformationURL</name>
<options placeholder="https://x.x.x.x/cisco_menu/information.php"></options>
<default></default>
</input>
<help></help>
</item>
<item type="IE" id="5" seq="10">
<label>Phone messages URL</label>
<input>
<name>dev_messagesURL</name>
<options placeholder="http://x.x.x.x/cisco_menu/messages.php"></options>
<options placeholder="http://x.x.x.x:port/cisco_menu/messages.php"></options>
<default></default>
</input>
<help></help>
</item>
<item type="IE" id="5" seq="10">
<label>Phone Secure messages URL</label>
<input>
<name>dev_securemessagesURL</name>
<options placeholder="https://x.x.x.x:port/cisco_menu/messages.php"></options>
<default></default>
</input>
<help></help>
@ -674,6 +857,36 @@ and open the template in the editor. Base Version before all crash :-)
</input>
<help>This is the URL for a CiscoIPPhoneMenu which gets appended to the end of the Missed/Received/Placed calls. I don't use it (I find it makes more sense to put my phone book under services)</help>
</item>
<item type="IE" id="6" seq="10">
<label>Phone Secure directory service URL</label>
<input>
<name>dev_securedirectoryURL</name>
<options placeholder="https://x.x.x.x/cisco_menu/directories.php"></options>
<default></default>
</input>
<help></help>
</item>
<item type="IE" id="3" seq="10">
<label>Phone Idle information URL</label>
<input>
<name>dev_idleURL</name>
<options placeholder="http://x.x.x.x/cisco_menu/idle.php"></options>
<default></default>
<value></value>
</input>
<help>URL of CiscoIPPhoneImage. Requires a non-zero setting in idleTimeout.</help>
</item>
<item type="IE" id="3" seq="10">
<label>Phone Secure Idle information URL</label>
<input>
<name>dev_secureidleURL</name>
<options placeholder="https://x.x.x.x/cisco_menu/idle.php"></options>
<default></default>
<value></value>
</input>
<help></help>
</item>
<item type="IE" id="7" seq="10">
<label>Phone proxyServer URL</label>
<input>

View file

@ -154,7 +154,7 @@ msgstr "Внешний адрес"
#: views/sccpgeneral.xml:
msgid ""
"External IP Address of the firewall, required in case the PBX is running on "
"a seperatehost behind it. IP Address that we're going to notify in RTP media "
"a separatehost behind it. IP Address that we're going to notify in RTP media "
"stream as the pbx source address."
msgstr ""
"Внешнее имя FQDN в системе DNS на внешнем интерфейсе (WAN) роутера, которое "
@ -504,7 +504,7 @@ msgid "NTP Server name or IP"
msgstr "Адрес Сервера NTP"
#: views/sccpgeneral.xml:
msgid "Configure NTP Server protocol time syncronization"
msgid "Configure NTP Server protocol time synchronization"
msgstr "Настойка протокола синхронизации времени"
#: views/sccpgeneral.xml:
@ -1306,7 +1306,7 @@ msgid "Close"
msgstr "Закрыть"
#: views/server.model:
msgid "Add New model whithout Enabled"
msgid "Add New model without Enabled"
msgstr "Добавить шаблон как неактивный"
#: views/server.model:

View file

@ -670,10 +670,10 @@ function InstallDB_fillsccpdevmodel()
global $db;
outn("<li>" . _("Fill sccpdevmodel") . "</li>");
$sql = "REPLACE INTO `sccpdevmodel` (`model`, `vendor`, `dns`, `buttons`, `loadimage`, `loadinformationid`, `enabled`, `nametemplate`) VALUES ('12 SP', 'CISCO', 1, 1, '', 'loadInformation3', 0, NULL)," .
"('12 SP+', 'CISCO', 1, 1, '', 'loadInformation2', 0, NULL), ('30 SP+', 'CISCO', 1, 1, '', 'loadInformation1', 0, NULL), ('30 VIP', 'CISCO', 1, 1, '', 'loadInformation5', 0, NULL), ('3911', 'CISCO', 1, 1, '', 'loadInformation446', 0, NULL), ('3951', 'CISCO', 1, 1, '', 'loadInformation412', 0, ''), ('6901', 'CISCO', 1, 0, 'SCCP6901.9-2-1-a', 'loadInformation547', 0, NULL), ('6911', 'CISCO', 1, 0, 'SCCP6911.9-2-1-a', 'loadInformation548', 0, NULL), ('6921', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation496', 0, NULL), ('6941', 'CISCO', 1, 1, 'SCCP69xx.9-2-1-0', 'loadInformation495', 0, NULL), ('6945', 'CISCO', 1, 0, 'SCCP6945.9-2-1-0', 'loadInformation564', 0, NULL), ('6961', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation497', 0, NULL), ('7902', 'CISCO', 1, 1, 'CP7902080002SCCP060817A', 'loadInformation30008', 0, NULL), " .
"('12 SP+', 'CISCO', 1, 1, '', 'loadInformation2', 0, NULL), ('30 SP+', 'CISCO', 1, 1, '', 'loadInformation1', 0, NULL), ('30 VIP', 'CISCO', 1, 1, '', 'loadInformation5', 0, NULL), ('3911', 'CISCO', 1, 1, '', 'loadInformation446', 0, NULL), ('3951', 'CISCO', 1, 1, '', 'loadInformation412', 0, ''), ('6901', 'CISCO', 1, 0, 'SCCP6901.9-2-1-a', 'loadInformation547', 0, NULL), ('6911', 'CISCO', 1, 0, 'SCCP6911.9-2-1-a', 'loadInformation548', 0, NULL), ('6921', 'CISCO', 1, 0, 'SCCP69xx.9-4-1-3SR3', 'loadInformation496', 0, NULL), ('6941', 'CISCO', 1, 1, 'SCCP69xx.9-3-1-3', 'loadInformation495', 0, NULL), ('6945', 'CISCO', 1, 0, 'SCCP6945.9-3-1-3', 'loadInformation564', 0, NULL), ('6961', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation497', 0, NULL), ('7902', 'CISCO', 1, 1, 'CP7902080002SCCP060817A', 'loadInformation30008', 0, NULL), " .
"('7905', 'CISCO', 1, 1, 'CP7905080003SCCP070409A', 'loadInformation20000', 0, NULL), ('7906', 'CISCO', 1, 1, 'SCCP11.9-4-2SR3-1S', 'loadInformation369', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7910', 'CISCO', 1, 1, 'P00405000700', 'loadInformation6', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7911', 'CISCO', 1, 1, 'SCCP11.9-4-2SR3-1S', 'loadInformation307', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7912', 'CISCO', 1, 1, 'CP7912080004SCCP080108A', 'loadInformation30007', 0, NULL), ('7914', 'CISCO', 0, 14, 'S00105000400', 'loadInformation124', 1, NULL),('7914;7914', 'CISCO', 0, 28, 'S00105000400', 'loadInformation124', 1, NULL), ('7915', 'CISCO', 0, 24, 'B015-1-0-4-2', 'loadInformation227', 1, NULL), ('7915;7915', 'CISCO', 0, 48, 'B015-1-0-4-2', 'loadInformation228', 1, NULL), ('7916', 'CISCO', 0, 24, 'B016-1-0-4-2', 'loadInformation229', 1, NULL), " .
"('7916;7916', 'CISCO', 0, 48, 'B016-1-0-4-2', 'loadInformation230', 1, NULL), ('7920', 'CISCO', 1, 1, 'cmterm_7920.4.0-03-02', 'loadInformation30002', 0, NULL), ('7921', 'CISCO', 1, 1, 'CP7921G-1.4.6.3', 'loadInformation365', 0, NULL),('7925', 'CISCO', 1, 6, 'CP7925G-1.4.1SR1', 'loadInformation484', 0, NULL), ('7926', 'CISCO', 1, 1, 'CP7926G-1.4.1SR1', 'loadInformation557', 0, NULL), ('7931', 'CISCO', 1, 34, 'SCCP31.9-2-1S', 'loadInformation348', 0, NULL), ('7935', 'CISCO', 1, 2, 'P00503021900', 'loadInformation9', 0, NULL), ('7936', 'CISCO', 1, 1, 'cmterm_7936.3-3-21-0', 'loadInformation30019', 0, NULL), ('7937', 'CISCO', 1, 1, 'apps37sccp.1-4-5-7', 'loadInformation431', 0, 'SEP0000000000.cnf.xml_7937_template'), ('7940', 'CISCO', 1, 2, 'P0030801SR02', 'loadInformation8', 1, 'SEP0000000000.cnf.xml_7940_template'), " .
"('7941', 'CISCO', 1, 2, 'SCCP41.9-4-2SR3-1S', 'loadInformation115', 0, 'SEP0000000000.cnf.xml_796x_template'),('7941G-GE', 'CISCO', 1, 2, 'SCCP41.9-4-2SR3-1S', 'loadInformation309', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7942', 'CISCO', 1, 2, 'SCCP42.9-4-2SR3-1S', 'loadInformation434', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7945', 'CISCO', 1, 2, 'SCCP45.9-3-1SR1-1S', 'loadInformation435', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7960', 'CISCO', 3, 6, 'P0030801SR02', 'loadInformation7', 1, 'SEP0000000000.cnf.xml_796x_template'), ('7961', 'CISCO', 3, 6, 'SCCP41.9-4-2SR3-1S', 'loadInformation30018', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7961G-GE', 'CISCO', 3, 6, 'SCCP41.9-4-2SR3-1S', 'loadInformation308', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7962', 'CISCO', 3, 6, 'SCCP42.9-4-2SR3-1S', 'loadInformation404', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7965', 'CISCO', 3, 6, 'SCCP45.9-3-1SR1-1S', 'loadInformation436', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7970', 'CISCO', 3, 8, 'SCCP70.9-4-2SR3-1S', 'loadInformation30006', 0, NULL), ('7971', 'CISCO', 1, 2, 'SCCP70.9-4-2SR3-1S', 'loadInformation119', 0, NULL), ('7975', 'CISCO', 3, 8, 'SCCP75.9-4-2SR3-1S', 'loadInformation437', 0, NULL), ('7985', 'CISCO', 3, 8, 'cmterm_7985.4-1-7-0', 'loadInformation302', 0, NULL), ('8941', 'CISCO', 1, 0, 'SCCP894x.9-2-2-0', 'loadInformation586', 0, NULL), ('8945', 'CISCO', 1, 0, 'SCCP894x.9-2-2-0', 'loadInformation585', 0, NULL), ('ATA 186', 'CISCO', 1, 1, 'ATA030204SCCP090202A', 'loadInformation12', 0, 'SEP0000000000.cnf.xml_ATA_template'), ('ATA 187', 'CISCO', 1, 1, 'ATA187.9-2-3-1', 'loadInformation550', 0, 'SEP0000000000.cnf.xml_ATA_template'), ('CN622', 'MOTOROLA', 1, 1, '', 'loadInformation335', 0, NULL), ('Digital Access', 'CISCO', 1, 1, 'D001M022', 'loadInformation40', 0, NULL), ('Digital Access+', 'CISCO', 1, 1, 'D00303010033', 'loadInformation42', 0, NULL), ('E-Series', 'NOKIA', 1, 1, '', '', 0, NULL), ('ICC', 'NOKIA', 1, 1, '', '', 0, NULL), " .
"('7916;7916', 'CISCO', 0, 48, 'B016-1-0-4-2', 'loadInformation230', 1, NULL), ('7920', 'CISCO', 1, 1, 'cmterm_7920.4.0-03-02', 'loadInformation30002', 0, NULL), ('7921', 'CISCO', 1, 1, 'CP7921G-1.4.6.3', 'loadInformation365', 0, NULL),('7925', 'CISCO', 1, 6, 'CP7925G-1.4.1SR1', 'loadInformation484', 0, 'SEP0000000000.cnf.xml_7925_template'), ('7926', 'CISCO', 1, 1, 'CP7926G-1.4.1SR1', 'loadInformation557', 0, NULL), ('7931', 'CISCO', 1, 34, 'SCCP31.9-2-1S', 'loadInformation348', 0, NULL), ('7935', 'CISCO', 1, 2, 'P00503021900', 'loadInformation9', 0, NULL), ('7936', 'CISCO', 1, 1, 'cmterm_7936.3-3-21-0', 'loadInformation30019', 0, NULL), ('7937', 'CISCO', 1, 1, 'apps37sccp.1-4-5-7', 'loadInformation431', 0, 'SEP0000000000.cnf.xml_7937_template'), ('7940', 'CISCO', 1, 2, 'P0030801SR02', 'loadInformation8', 1, 'SEP0000000000.cnf.xml_7940_template'), " .
"('7941', 'CISCO', 1, 2, 'SCCP41.9-4-2SR3-1S', 'loadInformation115', 0, 'SEP0000000000.cnf.xml_796x_template'),('7941G-GE', 'CISCO', 1, 2, 'SCCP41.9-4-2SR3-1S', 'loadInformation309', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7942', 'CISCO', 1, 2, 'SCCP42.9-4-2SR3-1S', 'loadInformation434', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7945', 'CISCO', 1, 2, 'SCCP45.9-3-1SR1-1S', 'loadInformation435', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7960', 'CISCO', 3, 6, 'P0030801SR02', 'loadInformation7', 1, 'SEP0000000000.cnf.xml_7940_template'), ('7961', 'CISCO', 3, 6, 'SCCP41.9-4-2SR3-1S', 'loadInformation30018', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7961G-GE', 'CISCO', 3, 6, 'SCCP41.9-4-2SR3-1S', 'loadInformation308', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7962', 'CISCO', 3, 6, 'SCCP42.9-4-2SR3-1S', 'loadInformation404', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7965', 'CISCO', 3, 6, 'SCCP45.9-3-1SR1-1S', 'loadInformation436', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7970', 'CISCO', 3, 8, 'SCCP70.9-4-2SR3-1S', 'loadInformation30006', 0, 'SEP0000000000.cnf.xml_797x_template'), ('7971', 'CISCO', 1, 2, 'SCCP70.9-4-2SR3-1S', 'loadInformation119', 0, 'SEP0000000000.cnf.xml_797x_template'), ('7975', 'CISCO', 3, 8, 'SCCP75.9-4-2SR3-1S', 'loadInformation437', 0, 'SEP0000000000.cnf.xml_797x_template'), ('7985', 'CISCO', 3, 8, 'cmterm_7985.4-1-7-0', 'loadInformation302', 0, NULL), ('8941', 'CISCO', 1, 0, 'SCCP894x.9-2-2-0', 'loadInformation586', 0, NULL), ('8945', 'CISCO', 1, 0, 'SCCP894x.9-2-2-0', 'loadInformation585', 0, NULL), ('ATA 186', 'CISCO', 1, 1, 'ATA030204SCCP090202A', 'loadInformation12', 0, 'SEP0000000000.cnf.xml_ATA_template'), ('ATA 187', 'CISCO', 1, 1, 'ATA187.9-2-3-1', 'loadInformation550', 0, 'SEP0000000000.cnf.xml_ATA_template'), ('CN622', 'MOTOROLA', 1, 1, '', 'loadInformation335', 0, NULL), ('Digital Access', 'CISCO', 1, 1, 'D001M022', 'loadInformation40', 0, NULL), ('Digital Access+', 'CISCO', 1, 1, 'D00303010033', 'loadInformation42', 0, NULL), ('E-Series', 'NOKIA', 1, 1, '', '', 0, NULL), ('ICC', 'NOKIA', 1, 1, '', '', 0, NULL), " .
"('Analog Access', 'CISCO', 1, 1, 'A001C030', 'loadInformation30', 0, ''),('WS-X6608', 'CISCO', 1, 1, 'D00404000032', 'loadInformation43', 0, ''), ('WS-X6624', 'CISCO', 1, 1, 'A00204000013', 'loadInformation43', 0, ''), ('WS-X6608', 'CISCO', 1, 1, 'C00104000003', 'loadInformation51', 0, ''), ('H.323 Phone', 'CISCO', 1, 1, '', 'loadInformation61', 0, ''), ('Simulator', 'CISCO', 1, 1, '', 'loadInformation100', 0, ''), ('MTP', 'CISCO', 1, 1, '', 'loadInformation111', 0, ''), ('MGCP Station', 'CISCO', 1, 1, '', 'loadInformation120', 0, ''), ('MGCP Trunk', 'CISCO', 1, 1, '', 'loadInformation121', 0, ''), ('UPC', 'CISCO', 1, 1, '', 'loadInformation358', 0, ''), ".
"('TelePresence', 'TELEPRESENCE', 1, 1, '', 'loadInformation375', 0, ''), ('1000', 'TELEPRESENCE', 1, 1, '', 'loadInformation478', 0, ''), ('3000', 'TELEPRESENCE', 1, 1, '', 'loadInformation479', 0, ''), ('3200', 'TELEPRESENCE', 1, 1, '', 'loadInformation480', 0, ''), ('500-37', 'TELEPRESENCE', 1, 1, '', 'loadInformation481', 0, ''), ('1300-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation505', 0, ''), ('1100', 'TELEPRESENCE', 1, 1, '', 'loadInformation520', 0, ''), ('200', 'TELEPRESENCE', 1, 1, '', 'loadInformation557', 0, ''), ('400', 'TELEPRESENCE', 1, 1, '', 'loadInformation558', 0, ''), ('EX90', 'TELEPRESENCE', 1, 1, '', 'loadInformation584', 0, ''), ('500-32', 'TELEPRESENCE', 1, 1, '', 'loadInformation590', 0, ''), ('1300-47', 'TELEPRESENCE', 1, 1, '', 'loadInformation591', 0, ''), ('TX1310-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation596', 0, ''), ('EX60', 'TELEPRESENCE', 1, 1, '', 'loadInformation604', 0, ''), ('C90', 'TELEPRESENCE', 1, 1, '', 'loadInformation606', 0, ''), ('C60', 'TELEPRESENCE', 1, 1, '', 'loadInformation607', 0, ''), ('C40', 'TELEPRESENCE', 1, 1, '', 'loadInformation608', 0, ''), ('C20', 'TELEPRESENCE', 1, 1, '', 'loadInformation609', 0, ''), ('C20-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation610', 0, ''), ('C60-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation611', 0, ''), ('C40-52', 'TELEPRESENCE', 1, 1, '', 'loadInformation612', 0, ''), ('C60-52', 'TELEPRESENCE', 1, 1, '', 'loadInformation613', 0, ''), ('C60-52D', 'TELEPRESENCE', 1, 1, '', 'loadInformation614', 0, ''),('C60-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation615', 0, ''), ('C90-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation616', 0, ''), ('MX200', 'TELEPRESENCE', 1, 1, '', 'loadInformation617', 0, ''), ('TX9000', 'TELEPRESENCE', 1, 1, '', 'loadInformation619', 0, ''), ('TX9200', 'TELEPRESENCE', 1, 1, '', 'loadInformation620', 0, ''), ('SX20', 'TELEPRESENCE', 1, 1, '', 'loadInformation626', 0, ''), ('MX300', 'TELEPRESENCE', 1, 1, '', 'loadInformation627', 0, ''), ('C40-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation633', 0, ''), ('Jabber', 'CISCO', 1, 1, '', 'loadInformation652', 0, ''), ".
"('S60', 'NOKIA', 0, 1, '', 'loadInformation376', 0, ''), ('9971', 'CISCO', 1, 1, '', 'loadInformation493', 0, ''), ('9951', 'CISCO', 1, 1, '', 'loadInformation537', 0, ''), ('8961', 'CISCO', 1, 1, '', 'loadInformation540', 0, ''), ('Iphone', 'APPLE', 0, 1, '', 'loadInformation562', 0, ''), ('Android', 'ANDROID', 0, 1, '', 'loadInformation575', 0, ''), ('7926', 'CISCO', 1, 1, 'CP7926G-1.4.5.3', 'loadInformation577', 0, ''), ('7821', 'CISCO', 1, 1, '', 'loadInformation621', 0, ''), ('7841', 'CISCO', 1, 1, '', 'loadInformation622', 0, ''), ('7861', 'CISCO', 1, 1, '', 'loadInformation623', 0, ''), ('VXC 6215', 'CISCO', 1, 1, '', 'loadInformation634', 0, ''), ('8831', 'CISCO', 1, 1, '', 'loadInformation659', 0, ''), ('8841', 'CISCO', 1, 1, '', 'loadInformation683', 0, ''), ('8851', 'CISCO', 1, 1, '', 'loadInformation684', 0, ''), ('8861', 'CISCO', 1, 1, '', 'loadInformation685', 0, ''), ".

View file

@ -354,16 +354,15 @@ foreach ($items as $child) {
$i = 0;
// $res_v = 'no';
$opt_hide = '';
if (empty($child->default)) {
$res_v = 'no';
} else {
$res_v = '';
if (!empty($child->default)) {
$res_v = (string)$child->default;
}
if (!empty($child->value)) {
$res_v = (string)$child->value;
}
if (!empty($fvalues[$res_n])) {
if (!empty($fvalues[$res_n]['data'])) {
if (($fvalues[$res_n]['data'] != '') ) {
$res_v = (string)$fvalues[$res_n]['data'];
}
}
@ -377,11 +376,15 @@ foreach ($items as $child) {
$opt_hide .= ' data-vshow="'.$child->option_show.'" data-clshow="'.$child->option_show['class'].'" ';
}
foreach ($child->xpath('button') as $value) {
$val_check = (string)$value[@value];
if ($val_check == '' || $val_check == 'NONE' || $val_check == 'none') {
$val_check = (((string)$value[@value] == $res_v) ? " checked" : "");
$val_check = strtolower((string)$value[@value]);
if ($val_check == strtolower($res_v)) {
$val_check = " checked";
} else {
$val_check = (strtolower((string)$value[@value]) == strtolower($res_v) ? " checked" : "");
if ($val_check == '' || $val_check == 'none' ) {
if (strtolower($res_v) == 'none' || $res_v == '' ) {
$val_check = " checked";
} else {$val_check = "";}
} else {$val_check = "";}
}
echo '<input type="radio" name="' . $res_id . '" id="' . $res_id. '_' . $i .'" value="' . $value[@value] . '"' . $val_check . $opt_hide.'>';
echo '<label for="' . $res_id. '_' . $i . '">' . _($value) . '</label>';

View file

@ -13,6 +13,7 @@
<?php
echo $this->showGroup('sccp_srst', 1);
echo $this->showGroup('sccp_advant', 1);
// echo $this->showGroup('sccp_dev_time',1);
?>

View file

@ -5,17 +5,7 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
$data = 'none;';
foreach ($this->getDialPlanList() as $value) {
$data .= $value['id'].';';
}
if (strlen($data) >0 ){
$data = substr ($data,0,-1);
}
$this->sccpvalues['dial_template'] = array('keyword' => 'dial_template', 'data' => $data, 'type' => '10', 'seq' => '90');
*
*/
?>
<form autocomplete="off" name="frm_device" id="frm_device" class="fpbx-submit" action="" method="post">
<input type="hidden" name="category" value="deviceform">
@ -26,7 +16,6 @@ if (strlen($data) >0 ){
echo $this->showGroup('sccp_dev_group_config', 1);
echo $this->showGroup('sccp_dev_advconfig', 1);
echo $this->showGroup('sccp_dev_softkey', 1);
echo $this->showGroup('sccp_dev_url', 1);
echo $this->showGroup('sccp_hotline_config', 1);
?>
</form>

14
views/server.url.php Normal file
View file

@ -0,0 +1,14 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
?>
<form autocomplete="off" name="frm_url" id="frm_url" class="fpbx-submit" action="" method="post">
<input type="hidden" name="category" value=" deviceurlform">
<input type="hidden" name="Submit" value="Submit">
<?php
echo $this->showGroup('sccp_dev_url', 1);
?>
</form>