Wednesday, 16 July 2025

DROP AND CREATE ANY TABLE ON VICIDIAL DATABASE.

Backup as DB as DUMP:-

mysqldump -uroot -p asterisk > alldb_20250620.sql

1. First Procedure 
### First login as root on the Asterisk Database:
### Open your MySQL_AST_CREATE_tables.sql from your astguiclient files:

nano /usr/src/astguiclient/trunk/extras/MySQL_AST_CREATE_tables.sql    

### Find the table you want to copy the create table script:
### Save it to the notepad.
### Login as root on mysql:

2. Second Procedure

root@hostname:~# mysql -p asterisk

mysql> drop table vicidial_log;

### Copy and paste the commands below;

CREATE TABLE vicidial_log (
uniqueid VARCHAR(20) PRIMARY KEY NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
list_id BIGINT(14) UNSIGNED,
campaign_id VARCHAR(8),
call_date DATETIME,
start_epoch INT(10) UNSIGNED,
end_epoch INT(10) UNSIGNED,
length_in_sec INT(10),
status VARCHAR(6),
phone_code VARCHAR(10),
phone_number VARCHAR(18),
user VARCHAR(20),
comments VARCHAR(255),
processed ENUM('Y','N'),
user_group VARCHAR(20),
term_reason  ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','NONE') default 'NONE',
alt_dial VARCHAR(6) default 'NONE',
index (lead_id),
index (call_date)
);

mysql>quit

No comments: