vicidial / extras / MySQL_AST_CREATE_tables.sql
eduguru 1 Comment ; Phone, ' ', ' '); UPDATE system_settings SET qc_last_pull_time=NOW(); CREATE INDEX country_postal_code on vicidial_postal_codes (country_code, '', '') default '', ''); INSERT INTO vicidial_phone_codes (country_code, '0', '0') default '0', '0') default '1', '1') default '0', '1') default '1', '10', '100') default 'AUTO', '100'); INSERT INTO vicidial_lead_filters(lead_filter_id, '1000'); INSERT INTO vicidial_override_ids(id_table, '15', '20000'); INSERT INTO vicidial_override_ids(id_table, '227', '25', '30000'); INSERT INTO vicidial_override_ids(id_table, '343', '364', '40', '40000'); INSERT INTO vicidial_override_ids(id_table, '447', '5') default 'NONE', '50', '50000'); INSERT INTO vicidial_override_ids(id_table, '575', '581', '587', '60', '60000'); INSERT INTO vicidial_override_ids(id_table, '659', '667', '681', '70000'); INSERT INTO vicidial_override_ids(id_table, '730', '80', '80000'); INSERT INTO vicidial_override_ids(id_table, '829', '9', '99'); INSERT INTO vicidial_lists SET list_id='999', 'AB', 'ABANDON', 'ACTIVE', 'ADAPT_AVERAGE', 'ADAPT_HARD_LIMIT', 'ADAPT_TAPERED', 'ADDR3_ONLY', 'ADMIN_EXEMPT') default 'N', 'AFTERHOURS', 'AGENT_CHOOSE', 'AGENT_PHONE', 'AL', 'ALERT_AUDIO', 'ALERT_NOTICE', 'ALERT', 'ALL_ACTIVE') default 'ALL_ACTIVE', 'ALL_SERVERS') default 'DISABLED', 'ALL', 'ALL') default 'ALL', 'ALL') default 'DISABLED', 'ALL') default 'OFF', 'ALLCALLS', 'ALLFORCE') default 'DISABLED', 'ALLFORCE') default 'ONDEMAND', 'ALLOW_ALL', 'ALLOW_ALTER') default 'NOT_ACTIVE', 'ALT_AND_ADDR3_AND_EXTENDED', 'ALT_AND_ADDR3', 'ALT_AND_EXTENDED', 'ALT_IP', 'ALT_ONLY', 'ANYONE'), 'AREA', 'AREACODE') default 'N', 'ASK', 'AUDIO', 'BLINK_RED') default 'NONE', 'BLINK', 'BOTH') default 'FILE', 'BOTH') default 'WAIT', 'BOTTOM_AGENT') default 'STANDARD_AGENT', 'Call Notes and Appointment Setting', 'CALLBACK', 'CALLMENU', 'CALLMENU') default 'EXTEN', 'CALLS_WAIT_CUST_ACW_PAUSE') default 'CALLS_WAIT_CUST_ACW_PAUSE', 'campaign_rank', 'CAMPREC_60_WAV') default 'AGENT_XFER', 'CAN', 'CANCEL', 'CHECKBOX', 'CLEAR', 'CLOSER', 'CLOSER') default 'FRONTER', 'CLOSER') default 'PAUSED', 'COPY', 'CUSTOM_CID') default 'CAMPAIGN', 'CUSTOMER', 'D1_DIAL', 'D2_DIAL', 'D3_DIAL', 'D4_DIAL', 'D5_DIAL', 'DATE', 'DEAD'), 'Default Category'); INSERT INTO vicidial_user_groups SET user_group='ADMIN', 'DID', 'DISABLE_ALL') default 'NONE', 'DISCONNECT', 'DISPLAY', 'DISPO', 'DISPO') default 'NONE', 'DISPO') default 'Y', 'DNC') default 'READY', 'DOM', 'Dominican Republic'); INSERT INTO vicidial_conf_templates SET template_id='SIP_generic', 'DONE', 'DURING_CALL', 'EMPTY', 'ENABLED_BUTTON_HIDDEN') default 'DISABLED', 'ENABLED_PARK_ONLY', 'ENABLED_PREFIX', 'ENABLED_PRESERVE') default 'DISABLED', 'ENABLED', 'ENABLED') default 'DISABLED', 'ENABLED') default 'ENABLED', 'EXPORT', 'EXTENDED_ONLY') default 'NONE', 'EXTENSION', 'EXTERNAL_IP') default 'SERVER_IP', 'EXTERNAL', 'EXTERNAL') default 'SIP', 'F', 'fewest_calls_campaign', 'fewest_calls', 'FILE', 'FORCE') default 'N', 'FORM') default 'NONE', 'GROUP', 'HALF') default 'NO', 'HIDE') default 'Y', 'HOLD', 'HOLDRECALLXFER', 'HOLDTIME', 'IAX2', 'IF_WAIT_ONLY', 'IL', 'IN_GROUP', 'IN_GROUP') default 'MESSAGE', 'IN_GROUP') default 'NONE', 'IN_ORDER', 'INACTIVE') default 'INACTIVE', 'inbound_group_rank', 'INBOUND_MAN') default 'MANUAL', 'INCALL', 'INGROUP', 'IVR') default 'PAUSED', 'KY', 'LB', 'LIVE_AGENT', 'LIVE', 'LOAD', 'LOGIN', 'LOGOUT', 'longest_wait_time') default 'longest_wait_time', 'MANUAL') default 'MANUAL', 'MD', 'MESSAGE_ONLY', 'MESSAGE', 'MESSAGE') default 'DISABLED', 'MODIFY', 'monitor', 'MULTI', 'N') ); CREATE TABLE phone_favorites ( extension VARCHAR(100), 'N') default 'DISABLED', 'N') default 'N', 'N') default 'N' ); CREATE TABLE user_call_log ( user_call_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 'N') default 'N' ); CREATE TABLE vicidial_campaign_statuses ( status VARCHAR(6) NOT NULL, 'N') default 'N' ); CREATE TABLE vicidial_ivr ( ivr_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 'N') default 'N' ); CREATE TABLE vicidial_lists ( list_id BIGINT(14) UNSIGNED PRIMARY KEY NOT NULL, 'N') default 'N' ); CREATE TABLE vicidial_music_on_hold_files ( filename VARCHAR(100) NOT NULL, 'N') default 'N' ); CREATE UNIQUE INDEX user ON vicidial_users (user); CREATE TABLE vicidial_user_log ( user_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 'N') default 'Y', 'NEVER', 'NEW_WINDOW') default 'Y', 'NM', 'NO_PAUSED') default 'N', 'no', 'NOAGENT', 'NONE') default 'NONE', 'NONE') default 'STANDARD', 'NOTICE_AUDIO', 'NOTICE', 'OFF', 'oldest_call_finish', 'oldest_call_start', 'ON', 'ONDEMAND', 'OPTOUT') default 'OPTIN', 'other') default 'agc', 'OTHER') default 'OTHER', 'OUT', 'OUTBALANCE') default 'OUT', 'overall_user_level', 'OVERFLOW_ALLOWED') default 'OVERFLOW_ALLOWED', 'OVERRIDE', 'PAUSED', 'PHONE') default 'VOICEMAIL', 'PRESET_1', 'PRESET_2', 'PRESET_3', 'PRESET_4', 'PRESET_5') default 'N', 'Prevents dropped calls from being called within 72 hours of the last attempt', 'PREVIEW_AND_SKIP', 'PREVIEW_ONLY') default 'PREVIEW_AND_SKIP', 'PRINT', 'PROCESSED') default 'NEW', 'QC', 'QCSCRIPT', 'QCWEBFORM') default 'NONE', 'QUEUE_AND_AUTOCALL') default 'STANDARD', 'Queue', 'QUEUE') default 'READY', 'QUEUETIMEOUT', 'RADIO', 'RANDOM') default 'IN_ORDER', 'RATIO', 'RED', 'RESET', 'RESURRECT') default 'ASK', 'RINGING', 'SCRIPT', 'SCRIPT') default 'TEXT', 'SEARCH', 'SELECT', 'SENT', 'SET') default 'N', 'SHIP', 'Single Agent Direct Queue', 'SO') default 'LB', 'SSM-FSN', 'STANDARD_AGENT', 'START', 'STDERR', 'TERRITORY', 'TIME', 'TOGGLE_OFF') default 'DISABLED' ); CREATE TABLE vicidial_campaigns ( campaign_id VARCHAR(8) PRIMARY KEY NOT NULL, 'TOGGLE_OFF') default 'Y', 'TOGGLE', 'TOP') default 'LEFT', 'U') default 'U', 'UK 72 hour Drop No Call', 'UPDATED', 'URL') default 'DISABLED', 'USA', 'USED', 'USER_GROUP') default 'NONE', 'USER', 'VERTICAL') default 'HORIZONTAL', 'VoiceMail', 'VOICEMAIL') default 'MESSAGE', 'VOID') default 'GENERATE', 'WAIT_CUST_ACW_PAUSE', 'WAIT_CUST_ACW', 'WEBFORM', 'WEBFORM2', 'WEBFORMTWO', 'white', 'WV', 'XFER', 'Y_QUEUESTOP') default 'N', 'Y', 'Y') default 'N', 'Y') default 'N' ); CREATE TABLE vicidial_user_territory_log ( user VARCHAR(20), 'Y'); INSERT INTO vicidial_status_categories (vsc_id, 'Y1', 'Y10') default 'N', 'Y2', 'Y3', 'Y4', 'Y5', 'Y6', 'Y7', 'Y8', 'Y9', 'YES_UNLESS_NODELAY') default 'ALWAYS', 'YES') default 'DISABLED', 'Zap', "( ( (status='DROP') and (last_local_call_time < CONCAT(DATE_ADD(CURDATE(), ${EXTEN}, 1, 2, 2) DEFAULT '0.00', 2) default '0', 20, 2008 11:59:59 PM', 3, 30, 4, 5, 6, 7, 8, account_entry TEXT, account_entry="[paraxip]\ndisallow=all\nallow=ulaw\ntype=peer\nusername=paraxip\nfromuser=paraxip\nsecret=test\nfromdomain=10.10.10.16\nhost=10.10.10.15\ninsecure=port, account_entry="[testcarrier]\ndisallow=all\nallow=ulaw\ntype=friend\naccountcode=testcarrier\nsecret=test\nhost=dynamic\ncontext=trunkinbound\n", account_entry="[testcarrier]\ndisallow=all\nallow=ulaw\ntype=friend\nusername=testcarrier\nsecret=test\nhost=dynamic\ndtmfmode=rfc2833\ncontext=trunkinbound\n", acknowledged ENUM('Y', action VARCHAR(20), activate_time DATETIME, activate_user VARCHAR(20) default '', active ENUM('0', active ENUM('Y', active_agent_login_server ENUM('Y', active_asterisk_server ENUM('Y', active_voicemail_server VARCHAR(15) default '', active='N'; INSERT INTO system_settings (version, active='N'; INSERT INTO vicidial_inbound_dids SET did_pattern='default', active='N'; INSERT INTO vicidial_lists SET list_id='998', active='N'; INSERT INTO vicidial_server_carriers SET carrier_id='IAXEXAMPLE', active='N'; INSERT INTO vicidial_server_carriers SET carrier_id='SIPEXAMPLE', active='Y', adaptive_dl_diff_target SMALLINT(3) default '0', adaptive_dropped_percentage VARCHAR(4) default '3', adaptive_intensity VARCHAR(6) default '0', adaptive_latest_server_time VARCHAR(4) default '2100', adaptive_maximum_level VARCHAR(6) default '3.0', add_lead_url TEXT, add_timeclock_log ENUM('0', address1 VARCHAR(100), address2 VARCHAR(100), address3 VARCHAR(100), admin_hangup_enabled ENUM('0', admin_hijack_enabled ENUM('0', admin_home_url VARCHAR(255) default '../vicidial/welcome.php', admin_modify_refresh SMALLINT(5) UNSIGNED default '0', admin_monitor_enabled ENUM('0', admin_web_directory VARCHAR(255) default 'vicidial', AFLogging_enabled ENUM('0', after_hours_action ENUM('HANGUP', after_hours_exten VARCHAR(20) default '8300', after_hours_message_filename VARCHAR(255) default 'vm-goodbye', after_hours_voicemail VARCHAR(20), afterhours_xfer_group VARCHAR(20) default '---NONE---', agent, agent VARCHAR(20) default '', agent_acw_today BIGINT(14) UNSIGNED default '0', agent_alert_delay INT(6) default '1000', agent_alert_exten VARCHAR(100) default 'ding', agent_allow_group_alias ENUM('Y', agent_call_log_view ENUM('Y', agent_call_log_view_override ENUM('DISABLED', agent_calls_today INT(9) UNSIGNED default '0', agent_choose_blended ENUM('0', agent_choose_ingroups ENUM('0', agent_choose_territories ENUM('0', agent_clipboard_copy VARCHAR(50) default 'NONE', agent_custtalk_today BIGINT(14) UNSIGNED default '0', agent_dial_owner_only ENUM('NONE', agent_display_dialable_leads ENUM('Y', agent_dispo VARCHAR(6) default '', agent_extended_alt_dial ENUM('Y', agent_fullscreen ENUM('Y', agent_grab VARCHAR(20) default '', agent_log_id INT(9) UNSIGNED default '0', agent_non_pause_sec MEDIUMINT(8) UNSIGNED default '0', agent_only VARCHAR(20) default '', agent_pause_codes_active ENUM('Y', agent_pause_today BIGINT(14) UNSIGNED default '0' ); CREATE TABLE vicidial_dnc ( phone_number VARCHAR(18) PRIMARY KEY NOT NULL ); CREATE TABLE vicidial_lead_recycle ( recycle_id INT(9) UNSIGNED AUTO_I, agent_script_override VARCHAR(10) default '', agent_search_method ENUM('LO', agent_select_territories ENUM('Y', agent_shift_enforcement_override ENUM('DISABLED', agent_status_view_time ENUM('Y', agent_status_viewable_groups TEXT, agent_status_viewable_groups=' --ALL-GROUPS-- '; INSERT INTO vicidial_call_times SET call_time_id='24hours', agent_talk_min MEDIUMINT(8) default '0', agent_talk_sec MEDIUMINT(8) default '0', agent_territories TEXT, agent_time DATETIME, agent_user VARCHAR(20), agent_wait_today BIGINT(14) UNSIGNED default '0', agent_xfer_blind_transfer ENUM('Y', agent_xfer_consultative ENUM('Y', agent_xfer_dial_override ENUM('Y', agent_xfer_dial_with_customer ENUM('Y', agent_xfer_park_customer_dial ENUM('Y', agent_xfer_vm_transfer ENUM('Y', agentcall_manual ENUM('0', agentonly_callback_campaign_lock ENUM('0', agentonly_callbacks ENUM('0', agents_average_onemin VARCHAR(20) default '0', AGI_call_logging_enabled ENUM('0', agi_output ENUM('NONE', AGI(agi-NVA_recording.agi, AGI(agi://127.0.0.1:4577/call_log)\nexten => _5591999NXXXXXX, AGI(agi://127.0.0.1:4577/call_log)\nexten => _71999NXXXXXX, AGI(agi://127.0.0.1:4577/call_log)\nexten => _91999NXXXXXX, alert_enabled ENUM('0', alias_name VARCHAR(50), allcalls_delay SMALLINT(3) UNSIGNED default '0', allow_alerts ENUM('0', allow_closers ENUM('Y', allow_custom_dialplan ENUM('0', allow_sipsak_messages ENUM('0', allowed_campaigns TEXT, allowed_campaigns=' -ALL-CAMPAIGNS- - -', allowed_reports VARCHAR(2000) default 'ALL REPORTS', alt_dial VARCHAR(6) default 'NONE', alt_number_dialing ENUM('Y', alt_phone VARCHAR(12), alt_phone_count SMALLINT(5) UNSIGNED, alt_phone_note VARCHAR(30), alt_server_ip VARCHAR(100) default '', alter_agent_interface_options ENUM('0', alter_custdata_override ENUM('NOT_ACTIVE', alter_custphone_override ENUM('NOT_ACTIVE', am_message_exten VARCHAR(100) default 'vm-goodbye', am_message_exten_override VARCHAR(100) default '', amd_send_to_vmx ENUM('Y', answer_sec_pct_rt_stat_one SMALLINT(5) UNSIGNED default '20', answer_sec_pct_rt_stat_two SMALLINT(5) UNSIGNED default '30', answer_transfer_agent VARCHAR(20) NOT NULL default '8365', answered_time SMALLINT(4) UNSIGNED default '0', answers_fivemin INT(9) UNSIGNED default '0', answers_halfhour INT(9) UNSIGNED default '0', answers_hour INT(9) UNSIGNED default '0', answers_onemin INT(9) UNSIGNED default '0', answers_today INT(9) UNSIGNED default '0', aov SMALLINT(5) NOT NULL, api_date DATETIME, api_manual_dial ENUM('STANDARD', api_script VARCHAR(10), appointment_date DATE, appointment_time TIME, areacode, areacode CHAR(3), areacode VARCHAR(6), areacode); CREATE INDEX country_state on vicidial_phone_codes (country_code, ast_admin_access ENUM('0', ast_delete_phones ENUM('0', asterisk_version VARCHAR(20) default '1.4.21.1', ASTmgrSECRET VARCHAR(20) default '1234', ASTmgrSECRET VARCHAR(20) NOT NULL default '1234', ASTmgrUSERNAME VARCHAR(20) default 'cron', ASTmgrUSERNAME VARCHAR(20) NOT NULL default 'cron', ASTmgrUSERNAMElisten VARCHAR(20) NOT NULL default 'listencron', ASTmgrUSERNAMEsend VARCHAR(20) NOT NULL default 'sendcron', ASTmgrUSERNAMEupdate VARCHAR(20) NOT NULL default 'updatecron', attempt_delay SMALLINT(5) UNSIGNED default '1800', attempt_maximum TINYINT(3) UNSIGNED default '2', auto_alt_dial ENUM('NONE', auto_alt_dial_statuses VARCHAR(255) default ' B N NA DC -', auto_dial_level VARCHAR(6) default '0', auto_dial_limit VARCHAR(5) default '4', auto_dial_next_number ENUM('0', auto_hopper_level MEDIUMINT(8) UNSIGNED default '0', auto_hopper_multi VARCHAR(6) default '1', auto_trim_hopper ENUM('Y', auto_user_add_value INT(9) UNSIGNED default '101', available_only_ratio_tally ENUM('Y', balance_minutes SMALLINT(5) default '3', balance_minutes_start SMALLINT(5) default '3', balance_trunk_fill SMALLINT(5) UNSIGNED default '0', balance_trunks_offlimits SMALLINT(5) UNSIGNED default '0', batch VARCHAR(5) default '', billable ENUM('NO', blended ENUM('1', blind_monitor_filename VARCHAR(100) default '', blind_monitor_message VARCHAR(255) default 'Someone is blind monitoring your session', blind_monitor_warning ENUM('DISABLED', BOTH------Y---Y---Y)\nexten => _X., browser VARCHAR(255), BUSY, calculate_estimated_hold_seconds SMALLINT(5) UNSIGNED default '0', call_count_today MEDIUMINT(7) default '0', call_date DATETIME, call_handle_method VARCHAR(20) default 'CID', call_notes TEXT ); ALTER TABLE vicidial_call_notes AUTO_INCREMENT = 100; CREATE INDEX lead_id on vicidial_call_notes (lead_id); CREATE TABLE vicidial_custom_cid ( cid VARCHAR(18) NOT NULL, call_out_number_group VARCHAR(100) default 'Zap/g2/', call_parking_enabled ENUM('0', call_requeue_button ENUM('Y', call_server_ip VARCHAR(15), call_time DATETIME, call_time_comments VARCHAR(255) default '', call_time_id VARCHAR(20) default '', call_time_id VARCHAR(20) default '24hours', call_time_id='', call_time_name VARCHAR(30) NOT NULL, call_time_name='default 12pm to 5pm calling', call_time_name='default 12pm to 9pm calling', call_time_name='default 24 hours calling', call_time_name='default 5pm to 9pm calling', call_time_name='default 9am to 5pm calling', call_time_name='default 9am to 9pm calling', call_type ENUM('IN', call_type VARCHAR(20), callback_time DATETIME, callcard_admin ENUM('1', callcard_enabled ENUM('1', called_count SMALLINT(5) UNSIGNED default '0', called_since_last_reset ENUM('Y', caller_code VARCHAR(20), caller_code VARCHAR(30) NOT NULL, caller_id VARCHAR(30), caller_id_name VARCHAR(20), caller_id_number VARCHAR(18), caller_id_number VARCHAR(20), callerid VARCHAR(20), callerid VARCHAR(20) default '', CallerID_popup_enabled ENUM('0', calls MEDIUMINT(8) UNSIGNED default '0', calls_fivemin INT(9) UNSIGNED default '0', calls_halfhour INT(9) UNSIGNED default '0', calls_hour INT(9) UNSIGNED default '0', calls_onemin INT(9) UNSIGNED default '0', calls_today INT(9) UNSIGNED default '0', calls_today SMALLINT(5) UNSIGNED default '0', campaign_allow_inbound ENUM('Y', campaign_calldate DATETIME, campaign_changedate DATETIME, campaign_cid VARCHAR(20) default '0000000000', campaign_cid_override VARCHAR(20) default '', campaign_description VARCHAR(255), campaign_detail ENUM('0', campaign_groups TEXT, campaign_id VARCHAR(20), campaign_id VARCHAR(20) default '', campaign_id VARCHAR(20) NOT NULL, campaign_id VARCHAR(8), campaign_id VARCHAR(8) default '--ALL--', campaign_id VARCHAR(8) NOT NULL, campaign_id) ); CREATE TABLE vicidial_inbound_dids ( did_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, campaign_id='TESTCAMP', campaign_logindate DATETIME, campaign_name VARCHAR(40), campaign_rank TINYINT(1) default '0', campaign_rec_exten VARCHAR(20) default '8309', campaign_rec_filename VARCHAR(50) default 'FULLDATE_CUSTPHONE', campaign_recording ENUM('NEVER', campaign_script VARCHAR(10), campaign_stats_refresh ENUM('Y', campaign_vdad_exten VARCHAR(20) default '8368', campaign_weight TINYINT(1) default '0', card_id VARCHAR(20), carrier_description VARCHAR(255), carrier_logging_active ENUM('Y', carrier_name VARCHAR(50) NOT NULL, carrier_name='TEST IAX carrier example', carrier_name='TEST ParaXip CPD example', carrier_name='TEST SIP carrier example', category VARCHAR(20) default 'UNDEFINED', change_agent_campaign ENUM('0', channel VARCHAR(100), channel VARCHAR(100) NOT NULL, channel_data VARCHAR(100) ); CREATE TABLE live_sip_channels ( channel VARCHAR(100) NOT NULL, channel_data VARCHAR(100) ); CREATE TABLE parked_channels ( channel VARCHAR(100) NOT NULL, channel_group VARCHAR(30), channels_total SMALLINT(4) UNSIGNED NOT NULL, channels_total SMALLINT(4) UNSIGNED NOT NULL default '0', city VARCHAR(50), city VARCHAR(50) default '', client_browser VARCHAR(100) default '/usr/bin/mozilla', clients_iax SMALLINT(4) UNSIGNED NOT NULL, clients_local SMALLINT(4) UNSIGNED NOT NULL, clients_sip SMALLINT(4) UNSIGNED NOT NULL, clients_total SMALLINT(4) UNSIGNED NOT NULL, clients_zap SMALLINT(4) UNSIGNED NOT NULL, closer VARCHAR(20), closer_campaigns TEXT, closer_campaigns TEXT default '', closer_default_blended ENUM('0', closer); CREATE INDEX phone_number on vicidial_xfer_log (phone_number); CREATE INDEX phone_number on vicidial_closer_log (phone_number); CREATE INDEX date_user on vicidial_closer_log (call_date, cmd_line_b VARCHAR(100), cmd_line_c VARCHAR(100), cmd_line_d VARCHAR(100), cmd_line_e VARCHAR(100), cmd_line_f VARCHAR(100), cmd_line_g VARCHAR(100), cmd_line_h VARCHAR(100), cmd_line_i VARCHAR(100), cmd_line_j VARCHAR(100), cmd_line_k VARCHAR(100), code_name VARCHAR(30) ); CREATE TABLE vicidial_agent_sph ( campaign_group_id VARCHAR(20) NOT NULL, codecs_list VARCHAR(100) default '', codecs_with_template ENUM('0', comment VARCHAR(255) default '', comment_a VARCHAR(50), comment_b VARCHAR(50), comment_c VARCHAR(50), comment_d VARCHAR(50), comment_e VARCHAR(50), comment_e VARCHAR(50) ); CREATE TABLE inbound_numbers ( extension VARCHAR(30) NOT NULL, comments VARCHAR(20), comments VARCHAR(255), company VARCHAR(10), company_id VARCHAR(12), computer_ip VARCHAR(15), computer_ip VARCHAR(15) NOT NULL, concurrent_transfers ENUM('AUTO', conf_exten VARCHAR(20), conf_exten); CREATE TABLE vicidial_phone_codes ( country_code SMALLINT(5) UNSIGNED, conf_on_extension VARCHAR(10) default '8302', conf_override TEXT, conf_secret VARCHAR(20) default 'test', conferencing_enabled ENUM('0', country, country CHAR(3), country VARCHAR(2) default '' ); CREATE INDEX areaprefix on vicidial_nanpa_prefix_codes (areacode, country_code SMALLINT(5) UNSIGNED, country_code SMALLINT(5) UNSIGNED ); CREATE TABLE vicidial_pause_codes ( pause_code VARCHAR(6) NOT NULL, country_code VARCHAR(3), cpd_amd_action ENUM('DISABLED', cpd_seconds DECIMAL(7, cpu_idle_percent SMALLINT(3) UNSIGNED NOT NULL default '0', cpu_idle_percent SMALLINT(3) UNSIGNED NOT NULL default '0' ); CREATE TABLE vicidial_agent_log ( agent_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, cpu_system_percent SMALLINT(3) UNSIGNED NOT NULL default '0', cpu_user_percent SMALLINT(3) UNSIGNED NOT NULL default '0', CREATE on asterisk.* TO custom@'%' IDENTIFIED BY 'custom1234'; GRANT ALTER, CREATE on asterisk.* TO custom@localhost IDENTIFIED BY 'custom1234'; flush privileges;, CREATE TABLE phones ( extension VARCHAR(100), create_time DATETIME, create_user VARCHAR(20) default '', crm_login_address TEXT, crm_popup_login ENUM('Y', ct_default_start SMALLINT(4) unsigned NOT NULL default '900', ct_default_start='0', ct_default_start='1200', ct_default_start='1700', ct_default_start='900', ct_default_stop SMALLINT(4) unsigned NOT NULL default '2100', ct_default_stop='1200'; INSERT INTO vicidial_call_times SET call_time_id='5pm-9pm', ct_default_stop='1700'; INSERT INTO vicidial_call_times SET call_time_id='12pm-5pm', ct_default_stop='1700'; INSERT INTO vicidial_call_times SET call_time_id='12pm-9pm', ct_default_stop='2100'; INSERT INTO vicidial_call_times SET call_time_id='9am-5pm', ct_default_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='alabama', ct_default_stop='2400'; INSERT INTO vicidial_call_times SET call_time_id='9am-9pm', ct_friday_start SMALLINT(4) unsigned default '0', ct_friday_stop SMALLINT(4) unsigned default '0', ct_monday_start SMALLINT(4) unsigned default '0', ct_monday_stop SMALLINT(4) unsigned default '0', ct_saturday_start SMALLINT(4) unsigned default '0', ct_saturday_stop SMALLINT(4) unsigned default '0', ct_state_call_times TEXT default '', ct_sunday_start SMALLINT(4) unsigned default '0', ct_sunday_stop SMALLINT(4) unsigned default '0', ct_thursday_start SMALLINT(4) unsigned default '0', ct_thursday_stop SMALLINT(4) unsigned default '0', ct_tuesday_start SMALLINT(4) unsigned default '0', ct_tuesday_stop SMALLINT(4) unsigned default '0', ct_wednesday_start SMALLINT(4) unsigned default '0', ct_wednesday_stop SMALLINT(4) unsigned default '0', CURDATE(), CURTIME()) ) ) or (status != 'DROP') )"); INSERT INTO vicidial_drop_rate_groups SET group_id='101'; INSERT INTO vicidial_drop_rate_groups SET group_id='102'; INSERT INTO vicidial_drop_rate_groups SET , custom_call_id VARCHAR(100) ); CREATE TABLE vicidial_lists_fields ( field_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, custom_dialplan_entry TEXT, custom_dialplan_entry TEXT ); CREATE UNIQUE INDEX server_id on servers (server_id); CREATE TABLE live_channels ( channel VARCHAR(100) NOT NULL, custom_dialplan_entry='exten => _X., custom_fields_enabled ENUM('0', custom_fields_modify ENUM('0', custom_five VARCHAR(100) default '', custom_four VARCHAR(100) default '', custom_one VARCHAR(100) default '', custom_three VARCHAR(100) default '', custom_two VARCHAR(100) default '', customer_3way_hangup_action ENUM('NONE', customer_3way_hangup_logging ENUM('DISABLED', customer_3way_hangup_seconds SMALLINT(5) UNSIGNED default '5', customer_contact ENUM('Y', customer_hungup ENUM('BEFORE_CALL', customer_hungup_seconds SMALLINT(5) UNSIGNED default '0', data TEXT, data VARCHAR(255), date_of_birth DATE, DB_pass VARCHAR(15), DB_port VARCHAR(6) ); CREATE TABLE vicidial_remote_agents ( remote_agent_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, db_schema_update_date DATETIME, db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; GRANT ALTER, db_schema_version INT(8) UNSIGNED default '0', DB_server_ip VARCHAR(15) NOT NULL, db_time TIMESTAMP ); CREATE TABLE call_log ( uniqueid VARCHAR(20) PRIMARY KEY NOT NULL, DB_user VARCHAR(15), DBX_database VARCHAR(15) default 'asterisk', DBX_pass VARCHAR(15) default '1234', DBX_port INT(6) default '3306', DBX_server VARCHAR(15), DBX_user VARCHAR(15) default 'cron', DBY_database VARCHAR(15) default 'asterisk', DBY_pass VARCHAR(15) default '1234', DBY_port INT(6) default '3306', DBY_server VARCHAR(15), DBY_user VARCHAR(15) default 'cron', dead_epoch INT(10) UNSIGNED, dead_lead_category ENUM('Y', dead_sec SMALLINT(5) UNSIGNED default '0', dedicated_trunks SMALLINT(5) UNSIGNED default '0', default_afterhours_filename_override VARCHAR(255) default '', default_codecs VARCHAR(100) default '', default_external_server_ip ENUM('1', default_group_alias VARCHAR(30) default '', default_phone_code VARCHAR(8) default '1', default_phone_login_password VARCHAR(20) default 'test', default_phone_registration_password VARCHAR(20) default 'test', default_server_password VARCHAR(20) default 'test', default_webphone ENUM('1', default_xfer_group VARCHAR(20) default '---NONE---', DELETE, delete_call_times ENUM('0', delete_campaigns ENUM('0', delete_filters ENUM('0', delete_from_dnc ENUM('0', delete_inbound_dids ENUM('0', delete_ingroups ENUM('0', delete_lists ENUM('0', delete_remote_agents ENUM('0', delete_scripts ENUM('0', delete_timeclock_log ENUM('0', delete_user_groups ENUM('0', delete_users ENUM('0', delete_vm_after_email ENUM('N', department VARCHAR(30) ); CREATE TABLE server_updater ( server_ip VARCHAR(15) NOT NULL, dial_method ENUM('MANUAL', dial_prefix VARCHAR(20) default '9', dial_status_a VARCHAR(6), dial_status_b VARCHAR(6), dial_status_c VARCHAR(6), dial_status_d VARCHAR(6), dial_status_e VARCHAR(6), dial_statuses VARCHAR(255) default ' NEW -', dial_time SMALLINT(3) UNSIGNED default '0', dial_timeout TINYINT UNSIGNED default '60', Dial(${TESTIAXTRUNK}/${EXTEN:2}, Dial(${TESTSIPTRUNK}/${EXTEN:2}, Dial(${TESTSIPTRUNKP}/${EXTEN:4}, dialable_leads INT(9) UNSIGNED default '0', dialplan_entry TEXT, dialplan_entry="exten => _5591999NXXXXXX, dialplan_entry="exten => _71999NXXXXXX, dialplan_entry="exten => _91999NXXXXXX, dialplan_number VARCHAR(20), dialstatus VARCHAR(16), did_active ENUM('Y', did_active='Y', did_description VARCHAR(50), did_description='Default DID', did_id VARCHAR(9) default '', did_pattern VARCHAR(50) NOT NULL, did_route ENUM('EXTEN', did_route VARCHAR(9) default '', did_route='EXTEN', differential_onemin VARCHAR(20) default '0', digits VARCHAR(20), disable_alter_custdata ENUM('Y', disable_alter_custphone ENUM('Y', disk_usage VARCHAR(255) default '1', display_dialable_count ENUM('Y', display_leads_count ENUM('Y', display_queue_count ENUM('Y', dispo_call_url TEXT, dispo_epoch INT(10) UNSIGNED, dispo_sec SMALLINT(5) UNSIGNED default '0', dispo_time DATETIME, dnc ENUM('Y', download_lists ENUM('0', drop_action ENUM('HANGUP', drop_call_seconds SMALLINT(4) unsigned default '360', drop_call_seconds TINYINT(3) default '5', drop_exten VARCHAR(20) default '8307', drop_inbound_group VARCHAR(20) default '---NONE---', drop_inbound_group_override VARCHAR(20) default '', drop_lockout_time VARCHAR(6) default '0', drop_rate_group VARCHAR(20) default 'DISABLED', drops_answers_today_pct VARCHAR(6) default '0', drops_answers_today_pct VARCHAR(6) default '0' ); CREATE TABLE vicidial_process_triggers ( trigger_id VARCHAR(20) PRIMARY KEY NOT NULL, drops_fivemin INT(9) UNSIGNED default '0', drops_fivemin_pct VARCHAR(6) default '0', drops_halfhour INT(9) UNSIGNED default '0', drops_halfhour_pct VARCHAR(6) default '0', drops_hour INT(9) UNSIGNED default '0', drops_hour_pct VARCHAR(6) default '0', drops_onemin INT(9) UNSIGNED default '0', drops_onemin_pct VARCHAR(6) default '0', drops_today INT(9) UNSIGNED default '0', drops_today_pct VARCHAR(6) default '0', DST, DST enum('Y', DST_range, DST_range VARCHAR(8), dtmf_send_extension VARCHAR(100) default 'local/8500998@default', eht_minimum_prompt_filename VARCHAR(255) default '', eht_minimum_prompt_no_block ENUM('N', eht_minimum_prompt_seconds SMALLINT(5) default '10' ); CREATE TABLE vicidial_stations ( agent_station VARCHAR(10) PRIMARY KEY NOT NULL, email VARCHAR(100), email VARCHAR(100) default '', email VARCHAR(70), enable_agc_dispo_log ENUM('0', enable_agc_xfer_log ENUM('0', enable_fast_refresh ENUM('0', enable_persistant_mysql ENUM('0', enable_queuemetrics_logging ENUM('0', enable_second_webform ENUM('0', enable_sipsak_messages ENUM('0', enable_tts_integration ENUM('0', enable_vtiger_integration ENUM('0', enable_xfer_presets ENUM('DISABLED', end_epoch INT(10), end_epoch INT(10) UNSIGNED, end_time DATETIME, end_time); CREATE INDEX list_status on vicidial_list (list_id, entry_date DATETIME, entry_list_id BIGINT(14) UNSIGNED NOT NULL DEFAULT '0', entry_time DATETIME, event VARCHAR(50), event VARCHAR(50) NOT NULL, event_code VARCHAR(255) NOT NULL, event_date DATETIME, event_date DATETIME NOT NULL, event_date TIMESTAMP, event_datestamp TIMESTAMP NOT NULL, event_epoch INT(10) UNSIGNED, event_epoch INT(10) UNSIGNED NOT NULL, event_notes TEXT, event_section VARCHAR(30) NOT NULL, event_sql TEXT, event_time DATETIME, event_type ENUM('ADD', export_reports ENUM('0', ext_context VARCHAR(20) default 'default', ext_context VARCHAR(20) NOT NULL default 'default', exten_context VARCHAR(50) default 'default', exten_context='default'; INSERT INTO vicidial_override_ids(id_table, extension VARCHAR(100), extension VARCHAR(100) ); CREATE TABLE recording_log ( recording_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, extension VARCHAR(100) default '', extension VARCHAR(100) default '8300', extension VARCHAR(50), extension VARCHAR(50) default '9998811112', extension_appended_cidname ENUM('Y', extension_group VARCHAR(20) default 'NONE', extension_group_id VARCHAR(20) NOT NULL, extension_group_order VARCHAR(20) default 'NONE' ); CREATE TABLE live_inbound_log ( uniqueid VARCHAR(20) NOT NULL, extension='9998811112', extensions_list TEXT ); CREATE TABLE vicidial_callbacks ( callback_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, external_blended ENUM('0', external_dial VARCHAR(100) default '', external_dtmf VARCHAR(100) default '', external_hangup VARCHAR(1) default '', external_igb_set_user VARCHAR(20) default '', external_ingroups TEXT, external_park VARCHAR(40) default '', external_pause VARCHAR(20) default '', external_server_ip VARCHAR(100) default '', external_status VARCHAR(6) default '', external_timer_action VARCHAR(20) default '', external_timer_action_destination VARCHAR(100) default '', external_timer_action_message VARCHAR(255) default '', external_timer_action_seconds MEDIUMINT(7) default '-1', external_transferconf VARCHAR(100) default '', external_update_fields ENUM('0', external_update_fields_data VARCHAR(255) default '', fast_refresh_rate INT(5) default '1000', field_cost SMALLINT(5), field_default VARCHAR(255), field_description VARCHAR(100), field_help VARCHAR(1000), field_label VARCHAR(50), field_label); CREATE TABLE vicidial_filter_phone_groups ( filter_phone_group_id VARCHAR(20) NOT NULL, field_max SMALLINT(5), field_name VARCHAR(5000), field_options VARCHAR(5000), field_order SMALLINT(5) default '1' ); CREATE UNIQUE INDEX listfield on vicidial_lists_fields (list_id, field_rank SMALLINT(5), field_required ENUM('Y', field_size SMALLINT(5), field_type ENUM('TEXT', filename VARCHAR(255) default '', filename VARCHAR(50), filename='conf', filter_action ENUM('EXTEN', filter_agent_search_method ENUM('LO', filter_call_handle_method VARCHAR(20) default 'CID', filter_campaign_id VARCHAR(8), filter_clean_cid_number VARCHAR(20) default '', filter_exten_context VARCHAR(50) default 'default', filter_extension VARCHAR(50) default '9998811112', filter_group_id VARCHAR(20), filter_inbound_number ENUM('DISABLED', filter_list_id BIGINT(14) UNSIGNED default '999', filter_menu_id VARCHAR(50) default '', filter_phone VARCHAR(100), filter_phone_code VARCHAR(10) default '1', filter_phone_group_description VARCHAR(100), filter_phone_group_id VARCHAR(20) default '', filter_phone_group_id VARCHAR(20) NOT NULL, filter_phone_group_id) ); CREATE TABLE vicidial_xfer_presets ( campaign_id VARCHAR(20) NOT NULL, filter_phone_group_name VARCHAR(40) NOT NULL, filter_server_ip VARCHAR(15), filter_url VARCHAR(1000) default '', filter_user VARCHAR(20), filter_user_route_settings_ingroup VARCHAR(20) default 'AGENTDIRECT', filter_user_unavailable_action ENUM('IN_GROUP', filter_voicemail_ext VARCHAR(10), first_login_trigger ENUM('Y', first_login_trigger) values('2.4b0.5', first_name VARCHAR(30), force_change_password ENUM('Y', forced_timeclock_login ENUM('Y', freeram SMALLINT(5) UNSIGNED NOT NULL, friday_afterhours_filename_override VARCHAR(255) default '', fronter_display ENUM('Y', full_name VARCHAR(50), full_number VARCHAR(30) NOT NULL, fullname VARCHAR(100) NOT NULL, fullname VARCHAR(50), function VARCHAR(20) NOT NULL, gender ENUM('M', generate_cross_server_exten ENUM('0', generate_vicidial_conf ENUM('Y', geographic_description VARCHAR(30) ); CREATE TABLE vicidial_inbound_groups ( group_id VARCHAR(20) PRIMARY KEY NOT NULL, geographic_description) VALUES ('1', get_call_launch ENUM('NONE', globals_string VARCHAR(255), globals_string='TESTIAXTRUNK = IAX2/testcarrier', globals_string='TESTSIPTRUNK = SIP/testcarrier', globals_string='TESTSIPTRUNKP = SIP/paraxip', GMT_offset, GMT_offset VARCHAR(5), GMT_offset VARCHAR(6), gmt_offset_now DECIMAL(4, Goto(default, grab_calls_in_queue ENUM('Y', grab_time DATETIME, group_alias_id VARCHAR(30), group_alias_name VARCHAR(50), group_color, group_color VARCHAR(7), group_id VARCHAR(20), group_id) ); CREATE TABLE vicidial_campaign_agents ( user VARCHAR(20), group_name, group_name VARCHAR(30), group_name VARCHAR(40) NOT NULL, group_name='VICIDIAL ADMINISTRATORS', group_rank TINYINT(1) default '0', group_shifts TEXT, group_web_vars VARCHAR(255) default '', group_weight TINYINT(1) default '0', Hangup, hangup_cause TINYINT(1) UNSIGNED default '0', hangup_time DATETIME, Hangup\n", hide_xfer_number_to_dial ENUM('DISABLED', hold_recall_xfer_group VARCHAR(20) default '---NONE---', hold_sec_answer_calls MEDIUMINT(8) UNSIGNED default '0', hold_sec_drop_calls MEDIUMINT(8) UNSIGNED default '0', hold_sec_queue_calls MEDIUMINT(8) UNSIGNED default '0', hold_sec_stat_one MEDIUMINT(8) UNSIGNED default '0', hold_sec_stat_two MEDIUMINT(8) UNSIGNED default '0', hold_time_option VARCHAR(30) default 'NONE', hold_time_option_callback_filename VARCHAR(255) default 'vm-hangup', hold_time_option_callback_list_id BIGINT(14) UNSIGNED default '999', hold_time_option_callmenu VARCHAR(50) default '', hold_time_option_exten VARCHAR(20) default '8300', hold_time_option_minimum SMALLINT(5) default '0', hold_time_option_no_block ENUM('N', hold_time_option_press_filename VARCHAR(255) default 'to-be-called-back|digits/1', hold_time_option_prompt_seconds SMALLINT(5) default '10', hold_time_option_seconds SMALLINT(5) default '360', hold_time_option_voicemail VARCHAR(20) default '', hold_time_option_xfer_group VARCHAR(20) default '---NONE---', hold_time_second_option VARCHAR(30) default 'NONE', hold_time_third_option VARCHAR(30) default 'NONE', hopper_level INT(8) UNSIGNED default '1', hosted_settings VARCHAR(100) default '', hotkey VARCHAR(1) NOT NULL, hotkeys_active ENUM('0', human_answered ENUM('Y', ignore_list_script_override ENUM('Y', imu VARCHAR(10) NOT NULL, inbound_did VARCHAR(18), inbound_group_id VARCHAR(20) default '', inbound_name VARCHAR(30), inbound_number VARCHAR(12), inbound_number VARCHAR(20), inbound_queue_no_dial ENUM('DISABLED', index (areacode) ); CREATE TABLE callcard_accounts ( card_id VARCHAR(20) PRIMARY KEY NOT NULL, index (auto_call_id), index (call_date), index (call_date) ); CREATE TABLE twoday_recording_log ( recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL, index (call_date) ); CREATE TABLE twoday_vicidial_closer_log ( closecallid INT(9) UNSIGNED PRIMARY KEY NOT NULL, index (call_date) ); CREATE TABLE vicidial_api_log ( api_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (call_date) ); CREATE TABLE vicidial_closer_log ( closecallid INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (call_date) ); CREATE TABLE vicidial_list_update_log ( event_date DATETIME, index (call_date) ); CREATE TABLE vicidial_users ( user_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (call_time), index (call_time) ); CREATE TABLE vicidial_extension_groups ( extension_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (callback_time) ); CREATE TABLE vicidial_list_pins ( pins_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (called_since_last_reset), index (caller_code), index (caller_id_number), index (callerid), index (campaign_group_id), index (campaign_id), index (campaign_id) ); CREATE TABLE system_settings ( version VARCHAR(50), index (campaign_id) ); CREATE TABLE vicidial_campaign_hotkeys ( status VARCHAR(6) NOT NULL, index (campaign_id) ); CREATE TABLE vicidial_campaign_server_stats ( campaign_id VARCHAR(20) NOT NULL, index (campaign_id) ); CREATE TABLE vicidial_conferences ( conf_exten INT(7) UNSIGNED NOT NULL, index (campaign_id) ); CREATE TABLE vicidial_manual_dial_queue ( mdq_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (campaign_id) ); CREATE TABLE vicidial_status_categories ( vsc_id VARCHAR(20) PRIMARY KEY NOT NULL, index (campaign_id) ); CREATE TABLE vtiger_vicidial_roles ( user_level TINYINT(2), index (card_id), index (channel) ); CREATE TABLE park_log ( uniqueid VARCHAR(20) default '', index (channel) ); CREATE TABLE twoday_vicidial_log ( uniqueid VARCHAR(20) PRIMARY KEY NOT NULL, index (entry_time) ); ALTER TABLE vicidial_ivr AUTO_INCREMENT = 1000000; CREATE TABLE vicidial_inbound_group_agents ( user VARCHAR(20), index (entry_time) ); CREATE TABLE vicidial_lead_filters ( lead_filter_id VARCHAR(10) PRIMARY KEY NOT NULL, index (event_date), index (event_date) ); CREATE TABLE vicidial_drop_rate_groups ( group_id VARCHAR(20) PRIMARY KEY NOT NULL, index (event_date) ); CREATE TABLE vicidial_grab_call_log ( auto_call_id INT(9) UNSIGNED NOT NULL, index (event_date) ); CREATE TABLE vicidial_qc_codes ( code VARCHAR(8) PRIMARY KEY NOT NULL, index (event_section), index (event_time) ); CREATE TABLE vicidial_music_on_hold ( moh_id VARCHAR(100) PRIMARY KEY NOT NULL, index (event_time) ); CREATE TABLE vicidial_scripts ( script_id VARCHAR(10) PRIMARY KEY NOT NULL, index (extension_group_id) ); CREATE TABLE vicidial_remote_agent_log ( uniqueid VARCHAR(20) default '', index (extension), index (filter_phone_group_id) ); CREATE TABLE vicidial_filter_phone_numbers ( phone_number VARCHAR(18) NOT NULL, index (gmt_offset_now), index (group_alias_id) ); CREATE TABLE vicidial_tts_prompts ( tts_id VARCHAR(50) PRIMARY KEY NOT NULL, index (group_id), index (group_id) ); CREATE TABLE vicidial_did_log ( uniqueid VARCHAR(20) NOT NULL, index (group_weight), index (last_call_finish) ); CREATE TABLE vicidial_auto_calls ( auto_call_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (last_call_time), index (last_local_call_time), index (last_update_time), index (last_update_time) ); CREATE TABLE vicidial_log ( uniqueid VARCHAR(20) PRIMARY KEY NOT NULL, index (lead_id), index (lead_id) ); CREATE INDEX uniqueid_park on park_log (uniqueid); CREATE TABLE vicidial_manager ( man_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (lead_id) ); CREATE TABLE vicidial_live_agents ( live_agent_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (list_id), index (menu_id), index (owner) ); CREATE TABLE vicidial_hopper ( hopper_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (parameter) ); CREATE TABLE twoday_call_log ( uniqueid VARCHAR(20) PRIMARY KEY NOT NULL, index (parked_time), index (phone_ext), index (phone_number), index (phone_number) ); CREATE TABLE vicidial_campaign_dnc ( phone_number VARCHAR(18) NOT NULL, index (phone_number) ); CREATE TABLE vicidial_log_extended ( uniqueid VARCHAR(50) PRIMARY KEY NOT NULL, index (pin) ); CREATE TABLE callcard_accounts_details ( card_id VARCHAR(20) PRIMARY KEY NOT NULL, index (postal_code), index (preset_name) ); CREATE TABLE vicidial_xfer_stats ( campaign_id VARCHAR(20) NOT NULL, index (ra_user), index (random_id), index (rank), index (record_id) ); CREATE TABLE vicidial_list_alt_phones ( alt_phone_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (server_ip), index (server_ip) ); CREATE TABLE groups_alias ( group_alias_id VARCHAR(30) NOT NULL UNIQUE PRIMARY KEY, index (server_ip) ); CREATE TABLE vicidial_postal_codes ( postal_code VARCHAR(10) NOT NULL, index (server_ip) ); CREATE TABLE vicidial_server_trunks ( server_ip VARCHAR(15) NOT NULL, index (shift_id) ); CREATE TABLE vicidial_timeclock_log ( timeclock_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (start_time) ); CREATE TABLE web_client_sessions ( extension VARCHAR(100) NOT NULL, index (stat_date) ); CREATE TABLE phones_alias ( alias_id VARCHAR(20) NOT NULL UNIQUE PRIMARY KEY, index (state), index (status), index (timeclock_id), index (trigger_id), index (trigger_time) ); CREATE TABLE vtiger_rank_data ( account VARCHAR(20) PRIMARY KEY NOT NULL, index (uniqueid), index (uniqueid) ); CREATE TABLE twoday_vicidial_xfer_log ( xfercallid INT(9) UNSIGNED PRIMARY KEY NOT NULL, index (uniqueid) ); CREATE TABLE vicidial_xfer_log ( xfercallid INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (user), index (user) ); ALTER TABLE vicidial_campaign_server_stats ENGINE=MEMORY; ALTER TABLE live_channels ENGINE=MEMORY; ALTER TABLE live_sip_channels ENGINE=MEMORY; ALTER TABLE parked_channels ENGINE=MEMOR, index (user) ); CREATE TABLE vicidial_admin_log ( admin_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, index (user) ); CREATE TABLE vicidial_live_inbound_agents ( user VARCHAR(20), index (user) ); CREATE TABLE vicidial_timeclock_audit_log ( timeclock_id INT(9) UNSIGNED NOT NULL, index (user) ); CREATE TABLE vicidial_timeclock_status ( user VARCHAR(20) UNIQUE NOT NULL, index (user) ); CREATE TABLE vicidial_user_closer_log ( user VARCHAR(20), index (user) ); CREATE TABLE vicidial_user_groups ( user_group VARCHAR(20) NOT NULL, index serverstat(server_ip, index(api_date) ); CREATE TABLE vicidial_nanpa_prefix_codes ( areacode CHAR(3), index(callerid), index(filename), index(lead_id), index(lead_id) ); CREATE TABLE vicidial_conf_templates ( template_id VARCHAR(15) NOT NULL, index(uniqueid), index(user), index(vicidial_id) ); CREATE TABLE live_inbound ( uniqueid VARCHAR(20) NOT NULL, index(vicidial_id) ); CREATE TABLE twoday_vicidial_agent_log ( agent_log_id INT(9) UNSIGNED PRIMARY KEY NOT NULL, ingroup_rec_filename VARCHAR(50) default 'NONE', ingroup_recording_override ENUM('DISABLED', ingroup_script VARCHAR(10), initial_minutes SMALLINT(5) default '3', initial_value VARCHAR(6) default '0.00', install_date, install_date VARCHAR(50), install_directory VARCHAR(100) default '/usr/local/perl_TK', INTERVAL -3 DAY), invite\noutboundproxy=10.0.0.7", ip_address VARCHAR(15), ip_address VARCHAR(15) NOT NULL, is_webphone ENUM('Y', ivr_park_call ENUM('DISABLED', ivr_park_call_agi TEXT, label_address1 VARCHAR(40) default '', label_address2 VARCHAR(40) default '', label_address3 VARCHAR(40) default '', label_alt_phone VARCHAR(40) default '', label_city VARCHAR(40) default '', label_comments VARCHAR(40) default '', label_email VARCHAR(40) default '', label_first_name VARCHAR(40) default '', label_gender VARCHAR(40) default '', label_last_name VARCHAR(40) default '', label_middle_initial VARCHAR(40) default '', label_phone_code VARCHAR(40) default '', label_phone_number VARCHAR(40) default '', label_postal_code VARCHAR(40) default '', label_province VARCHAR(40) default '', label_security_phrase VARCHAR(40) default '', label_state VARCHAR(40) default '', label_title VARCHAR(40) default '', label_vendor_lead_code VARCHAR(40) default '', last_attempt_days SMALLINT(5) UNSIGNED NOT NULL, last_call_finish DATETIME, last_call_time DATETIME, last_callerid VARCHAR(20) default '', last_local_call_time DATETIME, last_name VARCHAR(30), last_state_change DATETIME, last_update DATETIME, last_update_time TIMESTAMP, latitude VARCHAR(17), lead_filter_comments, lead_filter_comments VARCHAR(255), lead_filter_id VARCHAR(10) default 'NONE', lead_filter_name, lead_filter_name VARCHAR(30) NOT NULL, lead_filter_sql TEXT ); CREATE TABLE vicidial_call_times ( call_time_id VARCHAR(10) PRIMARY KEY NOT NULL, lead_filter_sql) values('DROP72HOUR', lead_id INT(9) UNSIGNED, lead_id INT(9) UNSIGNED default '0', lead_id INT(9) UNSIGNED NOT NULL, lead_id VARCHAR(255), lead_order VARCHAR(30), lead_order_randomize ENUM('Y', leave_3way ENUM('0', leave_3way_datetime DATETIME ); CREATE UNIQUE INDEX serverconf on vicidial_conferences (server_ip, length_in_min DOUBLE(8, length_in_sec INT(10), length_in_sec MEDIUMINT(8) UNSIGNED, length_in_sec SMALLINT(5) UNSIGNED default '0', level ENUM('TOP_AGENT', list_changedate DATETIME, list_description VARCHAR(255), list_id BIGINT(14) UNSIGNED, list_id BIGINT(14) UNSIGNED default '999', list_id BIGINT(14) UNSIGNED NOT NULL, list_id BIGINT(14) UNSIGNED NOT NULL DEFAULT '0', list_id VARCHAR(255), list_id); CREATE INDEX list_phone on vicidial_list (list_id, list_lastcalldate DATETIME, list_mix_container TEXT, list_name VARCHAR(30), list_name='Default inbound list', list_name='Default Manual list', list_order_mix VARCHAR(20) default 'DISABLED', live_recordings SMALLINT(4) UNSIGNED NOT NULL, load_leads ENUM('0', local_call_time VARCHAR(10) DEFAULT '9am-9pm', local_gmt VARCHAR(6) default '-5.00', local_trunk_shortage SMALLINT(5) UNSIGNED default '0', local_web_callerID_URL VARCHAR(255) default 'http://astguiclient.sf.net/test_callerid_output.php', location VARCHAR(255), login VARCHAR(15), login_campaign VARCHAR(10), login_hours DECIMAL(5, login_pass VARCHAR(20), login_sec INT(10) UNSIGNED, login_sec MEDIUMINT(8) UNSIGNED default '0', login_user VARCHAR(20), logins_list VARCHAR(255) ); CREATE TABLE vicidial_shifts ( shift_id VARCHAR(20) NOT NULL, longitude VARCHAR(17), lower_range VARCHAR(20) NOT NULL, manager_change VARCHAR(20) default '', manager_ingroup_set ENUM('Y', manager_ip VARCHAR(15), manager_shift_enforcement_override ENUM('0', manager_user VARCHAR(20), manual_dial_call_time_check ENUM('DISABLED', manual_dial_filter VARCHAR(50) default 'NONE', manual_dial_list_id BIGINT(14) UNSIGNED default '998', manual_dial_override ENUM('NONE', manual_dial_prefix VARCHAR(20) default '', manual_preview_dial ENUM('DISABLED', max_vicidial_trunks SMALLINT(4) default '23', menu_id VARCHAR(50) default '', menu_invalid_prompt VARCHAR(255) default 'NONE', menu_invalid_prompt='NONE', menu_name VARCHAR(100), menu_name='logging of all outbound calls from agent phones', menu_prompt VARCHAR(255), menu_prompt='sip-silence', menu_repeat TINYINT(1) UNSIGNED default '0', menu_repeat='0', menu_time_check ENUM('0', menu_time_check='0', menu_timeout SMALLINT(2) UNSIGNED default '10', menu_timeout_prompt VARCHAR(255) default 'NONE', menu_timeout_prompt='NONE', menu_timeout='20', messages INT(4), messages INT(4) default '0', middle_initial VARCHAR(1), mix_method ENUM('EVEN_MIX', modify_call_times ENUM('0', modify_campaigns ENUM('0', modify_date TIMESTAMP, modify_filters ENUM('0', modify_inbound_dids ENUM('0', modify_ingroups ENUM('0', modify_leads ENUM('0', modify_lists ENUM('0', modify_remoteagents ENUM('0', modify_scripts ENUM('0', modify_servers ENUM('0', modify_timeclock_log ENUM('0', modify_usergroups ENUM('0', modify_users ENUM('0', moh_context VARCHAR(50) default 'default', moh_id VARCHAR(100) NOT NULL, moh_id) ); CREATE TABLE vicidial_voicemail ( voicemail_id VARCHAR(10) NOT NULL UNIQUE PRIMARY KEY, moh_name VARCHAR(255), moh_name='Default Music On Hold', monday_afterhours_filename_override VARCHAR(255) default '', monitor_prefix VARCHAR(10) default '8612', multi_position ENUM('HORIZONTAL', n, name_position ENUM('LEFT', net_sales SMALLINT(5) NOT NULL, net_sales_ly SMALLINT(5) NOT NULL, next_agent_call ENUM('random', no_agent_action ENUM('CALLMENU', no_agent_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye', no_agent_no_queue ENUM('N', no_delay_call_route ENUM('Y', no_hopper_dialing ENUM('Y', no_hopper_leads_logins ENUM('Y', nocache_admin ENUM('0', not_interested ENUM('Y', note_comments VARCHAR(255) default '', note_did VARCHAR(18) default '', note_language VARCHAR(10) default 'English', note_name VARCHAR(20) default '', note_printer VARCHAR(20) default '', note_purchase_order VARCHAR(20) default '', notes VARCHAR(255), number_dialed VARCHAR(15), number_dialed VARCHAR(30), number_of_lines TINYINT UNSIGNED default '1', old_messages INT(4), old_messages INT(4) default '0', old_status VARCHAR(255), omit_phone_code ENUM('Y', onhold_prompt_filename VARCHAR(255) default 'generic_hold', onhold_prompt_no_block ENUM('N', onhold_prompt_seconds SMALLINT(5) default '10', option_description VARCHAR(255) default '', option_description='hangup', option_route VARCHAR(20), option_route_value VARCHAR(255), option_route_value_context VARCHAR(1000), option_route_value_context=''; INSERT INTO vicidial_scripts (script_id, option_route_value='vm-goodbye', option_route='HANGUP', option_value VARCHAR(20) NOT NULL default '', option_value) ); CREATE TABLE vicidial_user_territories ( user VARCHAR(20) NOT NULL, option_value='TIMEOUT', order_id VARCHAR(20), orders SMALLINT(5) NOT NULL, outbound_autodial ENUM('Y', outbound_autodial_active ENUM('1', outbound_calls_per_second SMALLINT(3) UNSIGNED default '20', outbound_calls_per_second SMALLINT(3) UNSIGNED default '40', outbound_cid VARCHAR(20), owner VARCHAR(20) default '', pack VARCHAR(5) default '', parameter VARCHAR(20) NOT NULL, park_ext VARCHAR(10), park_file_name VARCHAR(100) default 'default', park_on_extension VARCHAR(10) default '8301', parked_by VARCHAR(100), parked_sec INT(10), parked_time DATETIME, parked_time DATETIME ); CREATE TABLE conferences ( conf_exten INT(7) UNSIGNED NOT NULL, pass VARCHAR(10), pass VARCHAR(10) NOT NULL, pass VARCHAR(20) NOT NULL, pause_after_each_call ENUM('Y', pause_code_name VARCHAR(30), pause_epoch INT(10) UNSIGNED, pause_sec SMALLINT(5) UNSIGNED default '0', percent_variance VARCHAR(10) NOT NULL, phone VARCHAR(100), phone_channel VARCHAR(100), phone_code VARCHAR(10), phone_code VARCHAR(10) default '1', phone_context VARCHAR(20) default 'default', phone_ext VARCHAR(40), phone_ip VARCHAR(15), phone_login VARCHAR(20), phone_number VARCHAR(100) default '', phone_number VARCHAR(18), phone_number VARCHAR(18) default '', phone_number VARCHAR(18) NOT NULL, phone_number VARCHAR(20), phone_number VARCHAR(255), phone_number); CREATE INDEX start_time on call_log (start_time); CREATE INDEX end_time on call_log (end_time); CREATE INDEX time on call_log (start_time, phone_pass VARCHAR(20), phone_ring_timeout SMALLINT(3) default '60', phone_type VARCHAR(50), picture VARCHAR(19), pin VARCHAR(10) NOT NULL, plaintext, play_estimate_hold_time ENUM('Y', play_place_in_line ENUM('Y', play_welcome_message ENUM('ALWAYS', points SMALLINT(5) NOT NULL, postal_code VARCHAR(10), postal_code VARCHAR(10) default '', postal_code); CREATE INDEX country_area_code on vicidial_phone_codes (country_code, prefix CHAR(3), prefix); CREATE TABLE vicidial_cpd_log ( cpd_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, prepopulate_transfer_preset ENUM('N', preset_dtmf VARCHAR(50) default '', preset_hide_number ENUM('Y', preset_name VARCHAR(40) default '', preset_name VARCHAR(40) NOT NULL, preset_number VARCHAR(50) NOT NULL, priority TINYINT(2) default '0', processed ENUM('Y', processes SMALLINT(4) UNSIGNED NOT NULL, product_code VARCHAR(20), program ENUM('agc', prompt_audio_1 VARCHAR(20), prompt_audio_10 VARCHAR(20), prompt_audio_11 VARCHAR(20), prompt_audio_12 VARCHAR(20), prompt_audio_13 VARCHAR(20), prompt_audio_14 VARCHAR(20), prompt_audio_15 VARCHAR(20), prompt_audio_16 VARCHAR(20), prompt_audio_17 VARCHAR(20), prompt_audio_18 VARCHAR(20), prompt_audio_19 VARCHAR(20), prompt_audio_2 VARCHAR(20), prompt_audio_20 VARCHAR(20), prompt_audio_3 VARCHAR(20), prompt_audio_4 VARCHAR(20), prompt_audio_5 VARCHAR(20), prompt_audio_6 VARCHAR(20), prompt_audio_7 VARCHAR(20), prompt_audio_8 VARCHAR(20), prompt_audio_9 VARCHAR(20), prompt_interval SMALLINT(5) UNSIGNED default '60', prompt_response_1 TINYINT(1) UNSIGNED default '0', prompt_response_10 TINYINT(1) UNSIGNED default '0', prompt_response_11 TINYINT(1) UNSIGNED default '0', prompt_response_12 TINYINT(1) UNSIGNED default '0', prompt_response_13 TINYINT(1) UNSIGNED default '0', prompt_response_14 TINYINT(1) UNSIGNED default '0', prompt_response_15 TINYINT(1) UNSIGNED default '0', prompt_response_16 TINYINT(1) UNSIGNED default '0', prompt_response_17 TINYINT(1) UNSIGNED default '0', prompt_response_18 TINYINT(1) UNSIGNED default '0', prompt_response_19 TINYINT(1) UNSIGNED default '0', prompt_response_2 TINYINT(1) UNSIGNED default '0', prompt_response_20 TINYINT(1) UNSIGNED default '0', prompt_response_3 TINYINT(1) UNSIGNED default '0', prompt_response_4 TINYINT(1) UNSIGNED default '0', prompt_response_5 TINYINT(1) UNSIGNED default '0', prompt_response_6 TINYINT(1) UNSIGNED default '0', prompt_response_7 TINYINT(1) UNSIGNED default '0', prompt_response_8 TINYINT(1) UNSIGNED default '0', prompt_response_9 TINYINT(1) UNSIGNED default '0', protocol ENUM('SIP', protocol='IAX2', protocol='SIP', province VARCHAR(50), qc_allowed_campaigns TEXT, qc_allowed_inbound_groups TEXT, qc_commit ENUM('0', qc_enabled ENUM('0', qc_enabled ENUM('Y', qc_features_active ENUM('1', qc_finish ENUM('0', qc_get_record_launch ENUM('NONE', qc_last_pull_time DATETIME, qc_lists TEXT, qc_pass ENUM('0', qc_script VARCHAR(10), qc_shift_id VARCHAR(20) default '24HRMIDNIGHT', qc_show_recording ENUM('Y', qc_statuses TEXT, qc_user_level INT(2) default '1', qc_web_form_address VARCHAR(255), QUEUE_ACTION_enabled ENUM('0', queue_position SMALLINT(4) UNSIGNED default '1', queue_priority TINYINT(2) default '0', queue_priority TINYINT(2) default '50', queue_priority) values('AGENTDIRECT', queue_seconds DECIMAL(7, queuemetrics_addmember_enabled ENUM('0', queuemetrics_callstatus ENUM('0', queuemetrics_callstatus_override ENUM('DISABLED', queuemetrics_dbname VARCHAR(50), queuemetrics_dispo_pause VARCHAR(6) default '' ); CREATE TABLE vicidial_campaigns_list_mix ( vcl_id VARCHAR(20) PRIMARY KEY NOT NULL, queuemetrics_eq_prepend VARCHAR(255) default 'NONE', queuemetrics_log_id VARCHAR(10) default 'VIC', queuemetrics_login VARCHAR(50), queuemetrics_loginout ENUM('STANDARD', queuemetrics_pass VARCHAR(50), queuemetrics_server_ip VARCHAR(15), queuemetrics_url VARCHAR(255), quick_transfer_button VARCHAR(20) default 'N', ra_extension VARCHAR(100) default '', ra_user VARCHAR(20), ra_user VARCHAR(20) default '', random ENUM('Y', random_id INT(8) UNSIGNED, random='N'; INSERT INTO vicidial_music_on_hold_files SET moh_id='default', rank MEDIUMINT(7) default '0', rank SMALLINT(5), rank SMALLINT(5) NOT NULL ); CREATE TABLE vtiger_rank_parameters ( parameter_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, rank SMALLINT(5) NOT NULL default '0', rank='1'; INSERT INTO vicidial_inbound_groups(group_id, realtime_agent_time_stats ENUM('DISABLED', realtime_block_user_info ENUM('0', rebuild_conf_files ENUM('Y', rebuild_music_on_hold ENUM('Y', recipient ENUM('USERONLY', record_call ENUM('Y', record_id VARCHAR(50) NOT NULL, recording_exten VARCHAR(10) default '8309', recording_filename VARCHAR(50), recording_id INT(9) UNSIGNED, recording_web_link ENUM('SERVER_IP', registration_string VARCHAR(255), registration_string='', registration_string='register => testcarrier:test@10.10.10.15:4569', registration_string='register => testcarrier:test@10.10.10.15:5060', remove ENUM('Y', reports_use_slave_db VARCHAR(2000) default '', reset_time VARCHAR(100) default '', response ENUM('Y', result VARCHAR(10), result VARCHAR(20), result_reason VARCHAR(255), result_rows SMALLINT(3) UNSIGNED default '0', returns SMALLINT(5) NOT NULL, role ENUM('FRONTER', rsa\ncontext=default"; INSERT INTO vicidial_server_carriers SET carrier_id='PARAXIP', run VARCHAR(4) default '', safe_harbor_exten VARCHAR(20) default '8307', sale ENUM('Y', sale_category ENUM('Y', sales MEDIUMINT(8) UNSIGNED default '0', saturday_afterhours_filename_override VARCHAR(255) default '' ); CREATE TABLE vicidial_state_call_times ( state_call_time_id VARCHAR(10) PRIMARY KEY NOT NULL, scheduled_callbacks ENUM('0', scheduled_callbacks ENUM('Y', scheduled_callbacks_alert ENUM('NONE', scheduled_callbacks_count ENUM('LIVE', script_comments, script_comments VARCHAR(255), script_name, script_name VARCHAR(50), script_text TEXT, script_text) values('CALLNOTES', sct_default_start SMALLINT(4) unsigned NOT NULL default '900', sct_default_start='1000', sct_default_start='800', sct_default_start='900', sct_default_stop SMALLINT(4) unsigned NOT NULL default '2100', sct_default_stop='1800', sct_default_stop='2000', sct_default_stop='2000'; INSERT INTO vicidial_shifts SET shift_id='24HRMIDNIGHT', sct_default_stop='2000'; INSERT INTO vicidial_state_call_times SET state_call_time_id='kentucky', sct_default_stop='2000'; INSERT INTO vicidial_state_call_times SET state_call_time_id='mississipp', sct_default_stop='2000'; INSERT INTO vicidial_state_call_times SET state_call_time_id='pennsylvan', sct_default_stop='2000'; INSERT INTO vicidial_state_call_times SET state_call_time_id='washington', sct_default_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='indiana', sct_default_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='louisiana', sct_default_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='nevada', sct_default_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='texas', sct_default_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='wyoming', sct_friday_start SMALLINT(4) unsigned default '0', sct_friday_stop SMALLINT(4) unsigned default '0', sct_monday_start SMALLINT(4) unsigned default '0', sct_monday_stop SMALLINT(4) unsigned default '0', sct_saturday_start SMALLINT(4) unsigned default '0', sct_saturday_start='1000', sct_saturday_stop SMALLINT(4) unsigned default '0' ); CREATE TABLE vicidial_campaign_stats ( campaign_id VARCHAR(20) PRIMARY KEY NOT NULL, sct_saturday_stop='1700'; INSERT INTO vicidial_state_call_times SET state_call_time_id='sdakota', sct_sunday_start SMALLINT(4) unsigned default '0', sct_sunday_start='1200', sct_sunday_start='1330', sct_sunday_start='2400', sct_sunday_stop SMALLINT(4) unsigned default '0', sct_sunday_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='rhodeislan', sct_sunday_stop='2100'; INSERT INTO vicidial_state_call_times SET state_call_time_id='utah', sct_sunday_stop='2400', sct_sunday_stop='2400'; INSERT INTO vicidial_state_call_times SET state_call_time_id='illinois', sct_sunday_stop='2400'; INSERT INTO vicidial_state_call_times SET state_call_time_id='massachuse', sct_sunday_stop='2400'; INSERT INTO vicidial_state_call_times SET state_call_time_id='nebraska', sct_sunday_stop='2400'; INSERT INTO vicidial_state_call_times SET state_call_time_id='tennessee', sct_thursday_start SMALLINT(4) unsigned default '0', sct_thursday_stop SMALLINT(4) unsigned default '0', sct_tuesday_start SMALLINT(4) unsigned default '0', sct_tuesday_stop SMALLINT(4) unsigned default '0', sct_wednesday_start SMALLINT(4) unsigned default '0', sct_wednesday_stop SMALLINT(4) unsigned default '0', security_phrase VARCHAR(100), selectable ENUM('Y', seqacct VARCHAR(20) UNIQUE NOT NULL, sequence VARCHAR(5) default '', server_description VARCHAR(255), server_ip VARCHAR(15), server_ip VARCHAR(15) NOT NULL, server_ip) ); CREATE TABLE servers ( server_id VARCHAR(10) NOT NULL, server_ip='10.10.10.15', session_id VARCHAR(20), session_name VARCHAR(40) UNIQUE NOT NULL ); CREATE TABLE server_performance ( start_time DATETIME NOT NULL, shift VARCHAR(20) NOT NULL, shift_enforcement ENUM('OFF', shift_id VARCHAR(20), shift_length VARCHAR(5) default '16:00', shift_length='24:00', shift_name VARCHAR(50), shift_name='24 hours 7 days a week', shift_override_flag ENUM('0', shift_start_time VARCHAR(4) default '0900', shift_start_time='0000', shift_weekdays VARCHAR(7) default '0123456', shift_weekdays='0123456'; INSERT INTO vicidial_phone_codes (country_code, slave_db_server VARCHAR(50) default '', sounds_central_control_active ENUM('0', sounds_update ENUM('Y', sounds_web_directory VARCHAR(255) default '', sounds_web_server VARCHAR(50) default '127.0.0.1', source VARCHAR(1) default '', source VARCHAR(20), source_id VARCHAR(50), sph DECIMAL(6, stage VARCHAR(20) default 'START', start_call_url TEXT, start_epoch INT(10), start_epoch INT(10) UNSIGNED, start_time DATETIME, start_time DATETIME NOT NULL, stat_date DATE NOT NULL, state, state VARCHAR(2), state VARCHAR(2) default '', state VARCHAR(20), state VARCHAR(4), state_call_time_comments VARCHAR(255) default '', state_call_time_name VARCHAR(30) NOT NULL, state_call_time_name='Alabama 8am-8pm and Sunday', state_call_time_name='Illinois 8am', state_call_time_name='Indiana 8pm restriction', state_call_time_name='Kentucky 10am restriction', state_call_time_name='Louisiana 8am-8pm and Sunday', state_call_time_name='Massachusetts 8am-8pm', state_call_time_name='Mississippi 8am-8pm and Sunday', state_call_time_name='Nebraska 8am', state_call_time_name='Nevada 8pm restriction', state_call_time_name='Pennsylvania sunday restriction', state_call_time_name='Rhode Island restrictions', state_call_time_name='South Dakota sunday restrict', state_call_time_name='Tennessee 8am', state_call_time_name='Texas sunday restriction', state_call_time_name='Utah 8pm restriction', state_call_time_name='Washington 8am', state_call_time_name='Wyoming 8am-8pm', state_call_time_state VARCHAR(2) NOT NULL, state_call_time_state='AL', state_call_time_state='IL', state_call_time_state='IN', state_call_time_state='KY', state_call_time_state='LA', state_call_time_state='MA', state_call_time_state='MS', state_call_time_state='NE', state_call_time_state='NV', state_call_time_state='PA', state_call_time_state='RI', state_call_time_state='SD', state_call_time_state='TN', state_call_time_state='TX', state_call_time_state='UT', state_call_time_state='WA', state_call_time_state='WY', state); CREATE INDEX country_code on vicidial_phone_codes (country_code); CREATE INDEX phone_list on vicidial_list (phone_number, static_agent_url VARCHAR(255) default '', status ENUM('ACTIVE', status ENUM('GENERATE', status ENUM('NEW', status ENUM('READY', status ENUM('SENT', status VARCHAR(10), status VARCHAR(50), status VARCHAR(6), status VARCHAR(6) NOT NULL, status_category_1 VARCHAR(20), status_category_2 VARCHAR(20), status_category_3 VARCHAR(20), status_category_4 VARCHAR(20), status_category_count_1 INT(9) UNSIGNED default '0', status_category_count_2 INT(9) UNSIGNED default '0', status_category_count_3 INT(9) UNSIGNED default '0', status_category_count_4 INT(9) UNSIGNED default '0', status_name VARCHAR(30), status) ); CREATE TABLE vicidial_list ( lead_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, status); CREATE INDEX time_user on vicidial_agent_log (event_time, sub_status VARCHAR(6), sunday_afterhours_filename_override VARCHAR(255) default '', survey_camp_record_dir VARCHAR(255) default '/home/survey', survey_dtmf_digits VARCHAR(16) default '1238', survey_first_audio_file VARCHAR(50) default 'US_pol_survey_hello', survey_fourth_audio_file VARCHAR(50) default 'US_thanks_no_contact', survey_fourth_digit VARCHAR(1) default '', survey_fourth_exten VARCHAR(20) default '8300', survey_fourth_status VARCHAR(6) default 'NI', survey_method ENUM('AGENT_XFER', survey_ni_audio_file VARCHAR(50) default 'US_thanks_no_contact', survey_ni_digit VARCHAR(1) default '8', survey_ni_status VARCHAR(6) default 'NI', survey_no_response_action ENUM('OPTIN', survey_opt_in_audio_file VARCHAR(50) default 'US_pol_survey_transfer', survey_response_digit_map VARCHAR(255) default '1-DEMOCRAT|2-REPUBLICAN|3-INDEPENDANT|8-OPTOUT|X-NO RESPONSE|', survey_third_audio_file VARCHAR(50) default 'US_thanks_no_contact', survey_third_digit VARCHAR(1) default '', survey_third_exten VARCHAR(20) default '8300', survey_third_status VARCHAR(6) default 'NI', survey_xfer_exten VARCHAR(20) default '8300', sys_perf_log ENUM('Y', sysload INT(6) NOT NULL, sysload INT(6) NOT NULL default '0', talk_epoch INT(10) UNSIGNED, talk_sec SMALLINT(5) UNSIGNED default '0', talked_sec INT(10), tcid_link INT(9) UNSIGNED, telnet_host VARCHAR(20) NOT NULL default 'localhost', telnet_port INT(5) NOT NULL default '5038', template_contents TEXT, template_contents="type=friend\nhost=dynamic\ncanreinvite=no\ncontext=default"; INSERT INTO vicidial_conf_templates SET template_id='IAX_generic', template_contents="type=friend\nhost=dynamic\nmaxauthreq=10\nauth=md5, template_id VARCHAR(15) NOT NULL, template_id='--NONE--', template_name VARCHAR(50) NOT NULL, template_name='IAX phone generic', template_name='SIP phone generic', term_reason ENUM('CALLER', territory VARCHAR(100) default '', territory_description VARCHAR(255) default '', territory) ); CREATE TABLE vicidial_territories ( territory_id MEDIUMINT(8) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, three_way_call_cid ENUM('CAMPAIGN', three_way_dial_prefix VARCHAR(20) default '', thursday_afterhours_filename_override VARCHAR(255) default '', timeclock_end_of_day VARCHAR(4) default '0000', timeclock_last_reset_date DATE, timer_action ENUM('NONE', timer_action_destination VARCHAR(30) default '', timer_action_message VARCHAR(255) default '', timer_action_seconds MEDIUMINT(7) default '-1', title VARCHAR(4), tovdad_display ENUM('Y', track_in_vdac ENUM('0', track_in_vdac='0', tracking_group VARCHAR(20) default 'CALLMENU' ); CREATE TABLE vicidial_call_menu_options ( menu_id VARCHAR(50) NOT NULL, tracking_group=''; INSERT INTO vicidial_call_menu_options SET menu_id='defaultlog', trigger_lines TEXT, trigger_lines TEXT ); CREATE TABLE vicidial_process_trigger_log ( trigger_id VARCHAR(20) NOT NULL, trigger_lines='/usr/share/astguiclient/VICIDIAL_IN_new_leads_file.pl'; INSERT INTO vicidial_call_menu SET menu_id='defaultlog', trigger_name VARCHAR(100), trigger_name='Load Leads', trigger_results TEXT, trigger_run ENUM('0', trigger_run='0', trigger_time DATETIME, trigger_time='2009-01-01 00:00:00', trunk_restriction ENUM('MAXIMUM_LIMIT', trunks_total SMALLINT(4) UNSIGNED NOT NULL, tTor)\nexten => _5591999NXXXXXX, tTor)\nexten => _71999NXXXXXX, tTor)\nexten => _91999NXXXXXX, tts_name VARCHAR(100), tts_text TEXT, tts_voice VARCHAR(100) default 'Allison-8kHz' ); CREATE TABLE vicidial_call_menu ( menu_id VARCHAR(50) PRIMARY KEY NOT NULL, tuesday_afterhours_filename_override VARCHAR(255) default '', type VARCHAR(10), unique index (did_pattern), unique index (template_id) ); CREATE TABLE vicidial_server_carriers ( carrier_id VARCHAR(15) NOT NULL, unique index extenserver (extension, unique index menuoption (menu_id, unique index mohfile (filename, unique index phonecamp (phone_number, unique index phonefilter (phone_number, unique index uniqueterritory (territory) ); CREATE TABLE vicidial_override_ids ( id_table VARCHAR(50) PRIMARY KEY NOT NULL, unique index userterritory (user, unique index vlia_user_group_id (user, unique index(carrier_id), uniqueid VARCHAR(20), uniqueid VARCHAR(20) default '', uniqueid VARCHAR(20) NOT NULL default '', uniqueid_status_display ENUM('DISABLED', uniqueid_status_prefix VARCHAR(50) default '', unworkable ENUM('Y', update_time TIMESTAMP, updater_check_enabled ENUM('0', upper_range VARCHAR(20) NOT NULL, use_auto_hopper ENUM('Y', use_campaign_dnc ENUM('Y', use_custom_cid ENUM('Y', use_external_server_ip ENUM('Y', use_internal_dnc ENUM('Y', use_non_latin ENUM('0', used_time DATETIME, used_user VARCHAR(20) default '', usedram SMALLINT(5) UNSIGNED NOT NULL, user VARCHAR(20), user VARCHAR(20) NOT NULL, user_code VARCHAR(100) default '', user_group VARCHAR(20), user_group VARCHAR(20) NOT NULL, user_level INT(2) default '0', user_level TINYINT(2) default '1', user_route_settings_ingroup VARCHAR(20) default 'AGENTDIRECT', user_start VARCHAR(20), user_switching_enabled ENUM('0', user_territories_active ENUM('0', user_unavailable_action ENUM('IN_GROUP', user); CREATE INDEX comment_a on live_inbound_log (comment_a); CREATE TABLE call_log_archive LIKE call_log; CREATE TABLE vicidial_log_archive LIKE vicidial_log; CREATE TABLE vicidial_agent_log_archive, user); CREATE INDEX date_closer on vicidial_xfer_log (call_date, user); CREATE INDEX date_user on vicidial_xfer_log (call_date, value INT(9) default '0' ); CREATE TABLE vicidial_carrier_log ( uniqueid VARCHAR(20) PRIMARY KEY NOT NULL, value VARCHAR(255), value) values('phones', value) values('vicidial_call_menu', value) values('vicidial_campaigns', value) values('vicidial_inbound_groups', value) values('vicidial_lead_filters', value) values('vicidial_lists', value) values('vicidial_scripts', value) values('vicidial_user_groups', value) values('vicidial_users', vcl_name VARCHAR(50), vd_server_logs ENUM('Y', vdc_agent_api_access ENUM('0', vdc_agent_api_active ENUM('0', vdc_customer_date_format VARCHAR(50) default 'AL_TEXT_AMPM OCT 24, vdc_header_date_format VARCHAR(50) default 'MS_DASH_24HR 2008-06-24 23:59:59', vdc_header_phone_format VARCHAR(50) default 'US_PARN (000)000-0000', VDstop_rec_after_each_call ENUM('0', vendor_id VARCHAR(255), vendor_lead_code VARCHAR(20), vicidial, vicidial / extras / MySQL_AST_CREATE_tables.sql, vicidial_agent_disable ENUM('NOT_ACTIVE', vicidial_balance_active ENUM('Y', vicidial_balance_rank TINYINT(3) UNSIGNED default '0', vicidial_id VARCHAR(20), VICIDIAL_park_on_extension VARCHAR(10) default '8301', VICIDIAL_park_on_filename VARCHAR(10) default 'park', vicidial_recording ENUM('0', vicidial_recording_limit MEDIUMINT(8) default '60', vicidial_recording_override ENUM('DISABLED', vicidial_transfers ENUM('0', VICIDIAL_web_URL VARCHAR(255) default 'http://astguiclient.sf.net/test_VICIDIAL_output.php', view_calls_in_queue ENUM('NONE', view_calls_in_queue_launch ENUM('AUTO', view_reports ENUM('0', voicemail_button_enabled ENUM('0', voicemail_dump_exten VARCHAR(20) default '85026666666666', voicemail_dump_exten VARCHAR(20) NOT NULL default '85026666666666', voicemail_ext VARCHAR(10), voicemail_exten VARCHAR(10) default '8501', voicemail_id VARCHAR(10), void_time DATETIME ); CREATE TABLE callcard_log ( uniqueid VARCHAR(20) PRIMARY KEY NOT NULL, void_user VARCHAR(20) default '', vsc_description VARCHAR(255), vsc_name VARCHAR(50), vsc_name) values('UNDEFINED', vtiger_create_call_record ENUM('Y', vtiger_create_lead_record ENUM('Y', vtiger_dbname VARCHAR(50), vtiger_login VARCHAR(50), vtiger_pass VARCHAR(50), vtiger_role VARCHAR(5) ); CREATE TABLE vicidial_call_notes ( notesid INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, vtiger_screen_login ENUM('Y', vtiger_search_category VARCHAR(100) default 'LEAD', vtiger_search_dead ENUM('DISABLED', vtiger_server_ip VARCHAR(15), vtiger_status_call ENUM('Y', vtiger_url VARCHAR(255), wait_epoch INT(10) UNSIGNED, wait_hold_option_priority ENUM('WAIT', wait_sec SMALLINT(5) UNSIGNED default '0', wait_time_option VARCHAR(30) default 'NONE', wait_time_option_callback_filename VARCHAR(255) default 'vm-hangup', wait_time_option_callback_list_id BIGINT(14) UNSIGNED default '999', wait_time_option_callmenu VARCHAR(50) default '', wait_time_option_exten VARCHAR(20) default '8300', wait_time_option_no_block ENUM('N', wait_time_option_press_filename VARCHAR(255) default 'to-be-called-back|digits/1', wait_time_option_prompt_seconds SMALLINT(5) default '10', wait_time_option_seconds SMALLINT(5) default '120', wait_time_option_voicemail VARCHAR(20) default '', wait_time_option_xfer_group VARCHAR(20) default '---NONE---', wait_time_second_option VARCHAR(30) default 'NONE', wait_time_third_option VARCHAR(30) default 'NONE', waitforsilence_options VARCHAR(25) default '', web_form_address TEXT, web_form_address_two TEXT, web_form_address_two TEXT ); CREATE TABLE vicidial_statuses ( status VARCHAR(6) PRIMARY KEY NOT NULL, web_form_target VARCHAR(100) NOT NULL default 'vdcwebform', webphone_dialpad ENUM('Y', webphone_dialpad_override ENUM('DISABLED', webphone_systemkey VARCHAR(100) default '', webphone_systemkey_override VARCHAR(100) default '', webphone_url VARCHAR(255) default '', webphone_url_override VARCHAR(255) default '', webroot_writable ENUM('0', wednesday_afterhours_filename_override VARCHAR(255) default '', welcome_message_filename VARCHAR(255) default '---NONE---', wrapup_message VARCHAR(255) default 'Wrapup Call', wrapup_seconds SMALLINT(3) UNSIGNED default '0', xfer_count SMALLINT(5) UNSIGNED default '0', xfer_groups TEXT default '', xfercallid INT(9) UNSIGNED, xferconf_a_dtmf VARCHAR(50), xferconf_a_number VARCHAR(50), xferconf_a_number VARCHAR(50) default '', xferconf_b_dtmf VARCHAR(50), xferconf_b_number VARCHAR(50), xferconf_b_number VARCHAR(50) default '', xferconf_c_number VARCHAR(50) default '', xferconf_d_number VARCHAR(50) default '', xferconf_e_number VARCHAR(50) default '', yes
CREATE TABLE phones ( extension VARCHAR(100), dialplan_number VARCHAR(20), voicemail_id VARCHAR(10), phone_ip VARCHAR(15), computer_ip VARCHAR(15), server_ip VARCHAR(15), login VARCHAR(15), pass VARCHAR(10),
Read more