MT#12707 - add accounting.malicious_calls table

- add malicious_call_identification voip_preference
         - add malicious_call_identification sound set
         - add 'Applications' voip_preference_group

Change-Id: I6707913b576ec7066d6c5a5af06eeff903c2ce20
changes/91/2391/4
Kirill Solomko 11 years ago
parent 3ed962261e
commit 54f1988337

@ -0,0 +1,6 @@
use accounting;
set autocommit=0;
DROP TABLE accounting.malicious_calls;
commit;

@ -0,0 +1,18 @@
use accounting;
set autocommit=0;
CREATE TABLE accounting.malicious_calls (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
callee_uuid varchar(255) NOT NULL,
call_id varchar(255) NOT NULL,
start_time decimal(13,3) NOT NULL,
duration decimal(13,3) NOT NULL,
caller varchar(255) NOT NULL,
callee varchar(255) NOT NULL,
reported_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
KEY mcid_callee_uuid_idx (callee_uuid),
UNIQUE KEY mcid_callid_idx (call_id)
) ENGINE=InnoDB;
commit;

@ -0,0 +1,11 @@
use provisioning;
set autocommit=0;
SELECT id into @attr_id from voip_preferences where attribute = 'malicious_call_identification';
DELETE from voip_dom_preferences WHERE attribute_id=@attr_id;
DELETE from voip_usr_preferences WHERE attribute_id=@attr_id;
DELETE from voip_contract_preferences WHERE attribute_id=@attr_id;
DELETE from voip_preferences WHERE id=@attr_id;
DELETE from voip_preference_groups where name = 'Applications';
commit;

@ -0,0 +1,10 @@
use provisioning;
set autocommit=0;
INSERT INTO voip_preference_groups (name) VALUES ('Applications');
SELECT id into @vpg_id FROM voip_preference_groups where name = 'Applications';
INSERT INTO voip_preferences (voip_preference_groups_id, attribute, label, type, max_occur, usr_pref, prof_pref, dom_pref, peer_pref, contract_pref, modify_timestamp, internal, expose_to_customer, data_type, read_only, description)
VALUES
(@vpg_id, 'malicious_call_identification', "Malicious Call Identification", 0, 1, 1, 1, 1, 0, 1, NOW(), 0, 0, 'boolean', 0, 'Report last call as malicious by calling at malicious_call@');
commit;

@ -0,0 +1,7 @@
use provisioning;
set autocommit=0;
DELETE FROM voip_sound_handles WHERE name = 'malicious_call_report';
DELETE FROM voip_sound_groups WHERE name = 'malicious_call_identification';
commit;

@ -0,0 +1,8 @@
use provisioning;
set autocommit=0;
INSERT INTO voip_sound_groups (name) values ('malicious_call_identification');
SELECT id into @mcid_id from voip_sound_groups where name = 'malicious_call_identification';
INSERT INTO voip_sound_handles (name, group_id) VALUES ('malicious_call_report', @mcid_id);
commit;
Loading…
Cancel
Save