diff --git a/conf/Sccp.class.php.v433 b/conf/Sccp.class.php.v433 index c847fb2..46fbbda 100644 --- a/conf/Sccp.class.php.v433 +++ b/conf/Sccp.class.php.v433 @@ -307,10 +307,10 @@ class Sccp extends \FreePBX\modules\Core\Driver { $tmparr['transfer'] = array('prompttext' => _('Call Transfer'), 'value' => 'on', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio'); unset($select); - $select[] = array('value' => 'yes', 'text' => 'Yes'); - $select[] = array('value' => 'no', 'text' => 'No'); + $select[] = array('value' => 'on', 'text' => 'On'); + $select[] = array('value' => 'off', 'text' => 'Off'); $tt = _("Echo cancel"); - $tmparr['echocancel'] = array('prompttext' => _('Echo cancel'), 'value' => 'yes', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio'); + $tmparr['echocancel'] = array('prompttext' => _('Echo cancel'), 'value' => 'off', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio'); unset($select); $select[] = array('value' => 'off', 'text' => 'Off'); @@ -326,10 +326,10 @@ class Sccp extends \FreePBX\modules\Core\Driver { $tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => 'UserDefined', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio'); unset($select); - $select[] = array('value' => 'yes', 'text' => 'Yes'); - $select[] = array('value' => 'no', 'text' => 'No'); + $select[] = array('value' => 'on', 'text' => 'On'); + $select[] = array('value' => 'off', 'text' => 'Off'); $tt = _("Silence Suppression. Asterisk Not supported"); - $tmparr['silencesuppression'] = array('prompttext' => _('Silence Suppression'), 'value' => 'no', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio'); + $tmparr['silencesuppression'] = array('prompttext' => _('Silence Suppression'), 'value' => 'off', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio'); unset($select); $select[] = array('value' => 'default', 'text' => _('default')); diff --git a/install.php b/install.php index 3dd85d5..90bdeca 100644 --- a/install.php +++ b/install.php @@ -100,7 +100,8 @@ function Get_DB_config($sccp_compatible) 'pickupmodeanswer' => array('drop' => "yes"), 'disallow' => array('drop' => "yes"), 'disallow' => array('drop' => "yes"), - 'callhistory_answered_elsewhere' => array('create' => "enum('Ignore','Missed Calls','Received Calls', 'Placed Calls') NULL default NULL", 'modify' => "enum('Ignore','Missed Calls','Received Calls','Placed Calls')"), + 'callhistory_answered_elsewhere' => array('create' => "enum('Ignore','Missed Calls','Received Calls', 'Placed Calls') NOT NULL default 'Ignore'", + 'modify' => "enum('Ignore','Missed Calls','Received Calls','Placed Calls')"), 'description' => array('rename' => "_description"), 'hwlang' => array('rename' => "_hwlang"), @@ -111,32 +112,37 @@ function Get_DB_config($sccp_compatible) 'useRedialMenu' => array('create' => "VARCHAR(5) NULL DEFAULT 'no' AFTER `_dialrules`"), 'dtmfmode' => array('drop' => "yes"), - 'force_dtmfmode' => array('create' => "ENUM('auto','rfc2833','skinny') NOT NULL default 'auto'", 'modify' => "ENUM('auto','rfc2833','skinny')", 'def_modify'=> 'auto'), + 'force_dtmfmode' => array('create' => "ENUM('auto','rfc2833','skinny') NOT NULL default 'auto'", + 'modify' => "ENUM('auto','rfc2833','skinny')", 'def_modify'=> 'auto'), 'deny' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL', 'modify' => "VARCHAR(100)"), 'permit' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL', 'modify' => "VARCHAR(100)"), 'backgroundImage' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL', 'modify' => "VARCHAR(255)"), 'ringtone' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL', 'modify' => "VARCHAR(255)"), - 'transfer' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"), - 'cfwdall' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"), - 'cfwdbusy' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"), - 'cfwdnoanswer' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"), - 'park' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"), - 'directrtp' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"), - 'dndFeature' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"), - 'earlyrtp' => array('create' => "ENUM('immediate','offHook','dialing','ringout','progress','none') NULL default NULL", 'modify' => "ENUM('immediate','offHook','dialing','ringout','progress','none')"), - 'monitor' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"), + 'transfer' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"), + 'cfwdall' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"), + 'cfwdbusy' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"), + 'cfwdnoanswer' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"), + 'park' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"), + 'directrtp' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"), + 'dndFeature' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"), + 'earlyrtp' => array('create' => "ENUM('immediate','offHook','dialing','ringout','progress','none') NOT NULL default 'none'", + 'modify' => "ENUM('immediate','offHook','dialing','ringout','progress','none')", + 'def_modify' => 'none'), + 'monitor' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"), 'audio_tos' => array('def_modify' => "0xB8"), 'audio_cos' => array('def_modify' => "6"), 'video_tos' => array('def_modify' => "0x88"), 'video_cos' => array('def_modify' => "5"), 'trustphoneip' => array('drop' => "yes"), - 'transfer_on_hangup' => array('create' => "enum('on','off') NULL DEFAULT NULL", 'modify' => "enum('on','off')"), + 'transfer_on_hangup' => array('create' => "enum('on','off') NOT NULL DEFAULT 'off'", 'modify' => "enum('on','off')"), 'phonecodepage' => array('create' => 'VARCHAR(50) NULL DEFAULT NULL', 'modify' => "VARCHAR(50)"), - 'mwilamp' => array('create' => "enum('on','off','wink','flash','blink') NULL default 'on'", 'modify' => "enum('on','off','wink','flash','blink')"), - 'mwioncall' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"), + 'mwilamp' => array('create' => "enum('on','off','wink','flash','blink') NOT NULL default 'on'", + 'modify' => "enum('on','off','wink','flash','blink')"), + 'mwioncall' => array('create' => "enum('on','off') NOT NULL default 'on'", + 'modify' => "enum('on','off')"), 'private' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"), // Что-то лишенне 'privacy' => array('create' => "enum('full','on','off') NOT NULL default 'full'", 'modify' => "enum('full','on','off')"), // Что-то лишенне - 'nat' => array('create' => "enum('on','off','auto') NULL default NULL", 'modify' => "enum('on','off','auto')"), + 'nat' => array('create' => "enum('on','off','auto') NOT NULL default 'off'", 'modify' => "enum('on','off','auto')"), 'conf_allow' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"), 'conf_play_part_announce' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"), 'conf_mute_on_entry' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"), @@ -146,9 +152,9 @@ function Get_DB_config($sccp_compatible) 'softkeyset' => array('def_modify' => "softkeyset") ), 'sccpline' => array( - 'directed_pickup' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"), + 'directed_pickup' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"), 'directed_pickup_context' => array('create' => "VARCHAR(100) NULL DEFAULT NULL"), - 'pickup_modeanswer' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"), + 'pickup_modeanswer' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"), 'namedcallgroup' => array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `setvar`", 'modify' => "VARCHAR(100)"), 'namedpickupgroup' => array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `namedcallgroup`", 'modify' => "VARCHAR(100)"), 'adhocNumber' => array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `namedpickupgroup`"), @@ -161,9 +167,9 @@ function Get_DB_config($sccp_compatible) 'audio_cos' => array('drop' => "yes"), 'video_tos' => array('drop' => "yes"), 'video_cos' => array('drop' => "yes"), - 'videomode' => array('create' => "enum('user','auto','off') NULL default 'auto'", 'modify' => "enum('user','auto','off')"), + 'videomode' => array('create' => "enum('user','auto','off') NOT NULL default 'auto'", 'modify' => "enum('user','auto','off')"), 'incominglimit' => array('create' => "INT(11) DEFAULT '6'", 'modify' => 'INT(11)', 'def_modify' => "6"), - 'transfer' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"), + 'transfer' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"), 'vmnum' => array('def_modify' => "*97"), 'musicclass' => array('def_modify' => "default"), 'disallow' => array('create' => "VARCHAR(255) NULL DEFAULT NULL"), @@ -178,13 +184,14 @@ function Get_DB_config($sccp_compatible) 'pin' => array('create' => "varchar(7) NOT NULL", 'modify' => "VARCHAR(7)" ), 'password' => array('create' => "varchar(7) NOT NULL", 'modify' => "VARCHAR(7)" ), 'description' => array('create' => "varchar(45) NOT NULL", 'modify' => "VARCHAR(45)" ), - 'roaminglogin' => array('create' => "ENUM('on','off','multi') NULL DEFAULT 'off'", 'modify' => "ENUM('on','off','multi')" ), - 'auto_logout' => array('create' => "ENUM('on','off') NULL DEFAULT 'off'", 'modify' => "ENUM('on','off')" ), + 'roaminglogin' => array('create' => "ENUM('on','off','multi') NOT NULL DEFAULT 'off'", 'modify' => "ENUM('on','off','multi')" ), + 'auto_logout' => array('create' => "ENUM('on','off') NOT NULL DEFAULT 'off'", 'modify' => "ENUM('on','off')" ), 'homedevice' => array('create' => "varchar(20) NOT NULL", 'modify' => "VARCHAR(20)" ), 'devicegroup' => array('create' => "varchar(7) NOT NULL", 'modify' => "VARCHAR(7)" ), ), 'sccpbuttonconfig' => array( - 'reftype' => array('create' => "enum('sccpdevice', 'sipdevice', 'sccpuser') NOT NULL default 'sccpdevice'", 'modify' => "enum('sccpdevice', 'sipdevice', 'sccpuser')" ), + 'reftype' => array('create' => "enum('sccpdevice', 'sipdevice', 'sccpuser') NOT NULL default 'sccpdevice'", + 'modify' => "enum('sccpdevice', 'sipdevice', 'sccpuser')" ), ) ); // Hardware Mobile. Can switch Softwate to Hardware @@ -302,30 +309,38 @@ function InstallDB_updateSchema($db_config) } $count_modify = 0; outn("