Commit 2ceb77088d3ca035c99edab3f44f9a32ceb856de

Authored by Flavio H Somensi
1 parent 7b3b1ac9
Exists in master

Ajustes SQL e nome diretorio do update da base de dados

install/database/system_data.sql
@@ -84,7 +84,7 @@ INSERT INTO `group_queues` (name) VALUES ('Default'); @@ -84,7 +84,7 @@ INSERT INTO `group_queues` (name) VALUES ('Default');
84 -- 84 --
85 -- Default rule 85 -- Default rule
86 -- 86 --
87 -INSERT INTO `regras_negocio` VALUES ('',0,'Internas - Ramal para Ramal','G:all','G:all','00:00:00-23:59:59','sun,mon,tue,wed,thu,fri,sat',0,1,0,0); 87 +INSERT INTO `regras_negocio` VALUES ('',0,'Internas - Ramal para Ramal','G:all','G:all','00:00:00-23:59:59','sun,mon,tue,wed,thu,fri,sat',0,1,0,0,'others');
88 INSERT INTO `regras_negocio_actions` VALUES (1,0,'PBX_Rule_Action_CCustos'),(1,1,'PBX_Rule_Action_DiscarRamal'); 88 INSERT INTO `regras_negocio_actions` VALUES (1,0,'PBX_Rule_Action_CCustos'),(1,1,'PBX_Rule_Action_DiscarRamal');
89 INSERT INTO `regras_negocio_actions_config` VALUES (1,0,'ccustos','9'),(1,1,'allow_voicemail','false'),(1,1,'dial_flags','twk'),(1,1,'dial_timeout','60'),(1,1,'diff_ring','false'),(1,1,'dont_overflow','false'),(1,1,'resolv_agent','false'); 89 INSERT INTO `regras_negocio_actions_config` VALUES (1,0,'ccustos','9'),(1,1,'allow_voicemail','false'),(1,1,'dial_flags','twk'),(1,1,'dial_timeout','60'),(1,1,'diff_ring','false'),(1,1,'dont_overflow','false'),(1,1,'resolv_agent','false');
90 90
install/database/update/3.0/update.sql
@@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
1 ---  
2 --- Table structure for table `core_config`  
3 ---  
4 -CREATE TABLE IF NOT EXISTS `core_config` (  
5 - `id` INTEGER PRIMARY KEY AUTO_INCREMENT,  
6 - `config_module` VARCHAR (255) NOT NULL,  
7 - `config_name` VARCHAR (255) NOT NULL,  
8 - `config_value` VARCHAR(255) NOT NULL  
9 -) ENGINE=InnoDB DEFAULT CHARSET=utf8;  
10 -  
11 -ALTER TABLE `regras_negocio` ADD COLUMN `type` ENUM('incoming','outgoing','others') NOT NULL DEFAULT 'others' ;  
12 -  
13 -ALTER TABLE `core_notifications` ADD COLUMN `id_itc` INT(11) DEFAULT 1;  
14 -ALTER TABLE `core_notifications` ADD COLUMN `from` VARCHAR(128) DEFAULT "Opens";  
15 -INSERT INTO `core_config` (`config_module`, `config_name`, `config_value`) VALUES ('CORE', 'HOST_NOTIFICATION', 'http://api.opens.com.br:3003/notifications');  
16 -  
17 -  
18 -  
install/database/update/3.0/updateCallerid.php
@@ -1,52 +0,0 @@ @@ -1,52 +0,0 @@
1 -<?php  
2 -/**  
3 - * This file is part of SNEP.  
4 - *  
5 - * SNEP is free software: you can redistribute it and/or modify  
6 - * it under the terms of the GNU General Public License as published by  
7 - * the Free Software Foundation, either version 3 of the License, or  
8 - * (at your option) any later version.  
9 - *  
10 - * SNEP is distributed in the hope that it will be useful,  
11 - * but WITHOUT ANY WARRANTY; without even the implied warranty of  
12 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
13 - * GNU General Public License for more details.  
14 - *  
15 - * You should have received a copy of the GNU General Public License  
16 - * along with SNEP. If not, see <http://www.gnu.org/licenses/>.  
17 - *  
18 - * This routine update callerid for used module billing and should  
19 - * be performed when migrating from versions prior to 3.0 stable release.  
20 - *  
21 - * @author : Opens Developers Team  
22 - * @package : snep  
23 - * @version : 3.0 - 2016, march  
24 - *  
25 - */  
26 -  
27 -$conecta = mysql_connect("localhost", "snep", "sneppass") or print (mysql_error());  
28 -mysql_select_db("snep", $conecta) or print(mysql_error());  
29 -  
30 -$sql = "SELECT callerid,name FROM peers";  
31 -  
32 -$result = mysql_query($sql, $conecta);  
33 -/* Escreve resultados até que não haja mais linhas na tabela */  
34 -while($consulta = mysql_fetch_array($result)) {  
35 -  
36 - $nameValue = explode("<", $consulta['callerid']);  
37 - if(count($nameValue) <= 1){  
38 - $new_callerid = $consulta['callerid']. " <".$consulta['name'].">";  
39 - }else{  
40 - $new_callerid = $consulta['callerid'];  
41 - };  
42 -  
43 - $name = $consulta['name'];  
44 - $sql = "UPDATE peers SET callerid = '$new_callerid' WHERE name='$name'";  
45 -  
46 - mysql_query($sql) or die(mysql_error());  
47 -  
48 -};  
49 -  
50 -mysql_free_result($result);  
51 -mysql_close($conecta);  
52 -?>