--BEGIN TRANSACTION;
CREATE TABLE v_group_members (id SERIAL, v_id NUMERIC, groupid TEXT, username TEXT, CONSTRAINT  v_group_members_pk PRIMARY KEY(id));
INSERT INTO v_group_members VALUES(1,1,'user','admin');
INSERT INTO v_group_members VALUES(2,1,'agent','admin');
INSERT INTO v_group_members VALUES(3,1,'admin','admin');
INSERT INTO v_group_members VALUES(4,1,'user','superadmin');
INSERT INTO v_group_members VALUES(5,1,'agent','superadmin');
INSERT INTO v_group_members VALUES(6,1,'admin','superadmin');
INSERT INTO v_group_members VALUES(7,1,'superadmin','superadmin');
SELECT setval('v_group_members_id_seq', (SELECT MAX(id) FROM v_group_members)+1);
CREATE TABLE v_groups (id SERIAL, v_id NUMERIC, groupid TEXT, groupdesc TEXT, CONSTRAINT  v_groups_pk PRIMARY KEY(id));
INSERT INTO v_groups VALUES(1,1,'hidden','Hidden Group hides items in the menu');
INSERT INTO v_groups VALUES(2,1,'user','User Group');
INSERT INTO v_groups VALUES(3,1,'agent','Call Center Agent Group');
INSERT INTO v_groups VALUES(4,1,'admin','Administrator Group');
INSERT INTO v_groups VALUES(5,1,'superadmin','Super Administrator Group');
SELECT setval('v_groups_id_seq', (SELECT MAX(id) FROM v_groups)+1);
CREATE TABLE v_menu (menuid SERIAL, v_id NUMERIC, menulanguage TEXT, menutitle TEXT, menustr TEXT, menucategory TEXT, menugroup TEXT, menudesc TEXT, menuparentid TEXT, menuorder NUMERIC, menuadduser TEXT, menuadddate TEXT, menumoduser TEXT, menumoddate TEXT, menu_protected TEXT, menu_guid TEXT, menu_parent_guid TEXT, CONSTRAINT  v_menu_pk PRIMARY KEY(menuid));
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','System','/index.php','internal','user','','0','mcrane','2007-05-02 15:43:52','superadmin','2011-01-07 03:39:30','','02194288-6D56-6D3E-0B1A-D53A2BC10788','');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Menu Manager','/core/menu/menu_list.php','internal','superadmin','','57','mcrane','2007-05-02 15:24:32','superadmin','2010-09-06 03:49:35','','DA3A9AB4-C28E-EA8D-50CC-E8405AC8E76E','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','System Status','/index.php','internal','admin','','45','mcrane','2007-05-02 15:35:39','superadmin','2010-09-01 16:32:27','','5243E0D2-0E8B-277A-912E-9D8B5FCDB41D','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Content Manager','/mod/content/rsslist.php','internal','admin','','54','mcrane','2007-05-02 15:37:30','superadmin','2010-09-06 04:03:19','','90397352-395C-40F6-2087-887144ABC06D','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','User Manager','/core/users/index.php','internal','admin','','10','mcrane','2007-05-02 15:38:04','superadmin','2011-01-06 10:29:42','','0D57CC1E-1874-47B9-7DDD-FE1F57CEC99B','BC96D773-EE57-0CDD-C3AC-2D91ABA61B55');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Login','/login.php','internal','hidden','','50','mcrane','2007-05-02 16:34:06','mcrane','2009-10-23 22:08:45','','C85BF816-B88D-40FA-8634-11B456928AFA','92A43D5F-173C-48AD-173B-527FA032190D');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Logout','/logout.php','internal','user','','2','mcrane','2007-05-26 22:23:52','superadmin','2010-08-05 17:47:29','','0D29E9F4-0C9B-9D8D-CD2D-454899DC9BC4','02194288-6D56-6D3E-0B1A-D53A2BC10788');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Status','/mod/calls_active/v_calls_active_extensions.php','internal','user','','36','mcrane','2007-06-22 17:57:38','superadmin','2010-11-29 22:00:47','','0438B504-8613-7887-C420-C837FFB20CB1','');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Account Settings','/mod/users/usersupdate.php','internal','user','','1','mcrane','2007-07-12 01:05:51','superadmin','2010-08-05 18:09:16','','4D532F0B-C206-C39D-FF33-FC67D668FB69','02194288-6D56-6D3E-0B1A-D53A2BC10788');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Templates','/mod/templates/templates.php','internal','hidden','','64','mcrane','2007-08-22 14:03:34','superadmin','2010-09-06 03:21:06','','5D00ACA4-3F61-D5C8-5CAD-C19F1EAADD23','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Hidden','','internal','hidden','','49','mcrane','2007-08-25 18:59:08','admin','2009-11-04 18:21:23','','92A43D5F-173C-48AD-173B-527FA032190D','');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Sign Up','/mod/users/signup.php','internal','hidden','','51','mcrane','2007-08-25 19:17:44','mcrane','2009-10-27 23:09:37','','396B095B-DBE7-431C-34BF-FF73E1614EE5','92A43D5F-173C-48AD-173B-527FA032190D');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','System Settings','/core/system_settings/v_system_settings.php','internal','superadmin','','63','mcrane','2009-08-20 10:15:35','superadmin','2011-01-07 11:34:28','','03055A51-F8A2-6BDE-2A40-9743B2A2891F','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Settings','/core/settings/v_settings_edit.php?id=1','internal','superadmin','','4','mcrane','2009-08-20 10:16:20','superadmin','2010-09-01 16:22:01','','148EA42A-3711-3D64-181B-07A6A3C3ED60','02194288-6D56-6D3E-0B1A-D53A2BC10788');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Dialplan Manager','/mod/dialplan/v_dialplan_includes.php','internal','admin','','12','mcrane','2009-08-20 10:37:51','superadmin','2010-09-01 17:13:56','','52929FEE-81D3-4D94-50B7-64842D9393C2','B94E8BD9-9EB5-E427-9C26-FF7A6C21552A');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Extensions','/mod/extensions/v_extensions.php','internal','admin','','7','mcrane','2009-08-20 10:39:55','superadmin','2011-01-06 10:22:32','','D3036A99-9A9F-2AD6-A82A-1FE7BEBBE2D3','BC96D773-EE57-0CDD-C3AC-2D91ABA61B55');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Apps','/mod/xml_cdr/v_xml_cdr.php','internal','user','','15','mcrane','2009-08-20 10:40:31','superadmin','2011-01-06 10:37:15','','FD29E39C-C936-F5FC-8E2B-611681B266B5','');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Gateways','/mod/gateways/v_gateways.php','internal','admin','SIP Gateways','8','mcrane','2009-08-20 10:41:08','superadmin','2011-01-06 10:22:15','','237A512A-F8FE-1CE4-B5D7-E71C401D7159','BC96D773-EE57-0CDD-C3AC-2D91ABA61B55');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Dialplan','/mod/dialplan/v_dialplan_includes.php','internal','admin','','11','mcrane','2009-08-20 10:42:11','superadmin','2010-11-29 22:04:58','','B94E8BD9-9EB5-E427-9C26-FF7A6C21552A','');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Auto Attendant','/mod/auto_attendant/v_auto_attendant.php','internal','hidden','','16','mcrane','2009-08-20 10:46:04','superadmin','2010-09-06 18:33:02','','963785C6-4DF6-9BF1-E4A7-7183774CC741','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Fax Server','/mod/fax/v_fax.php','internal','user','','26','mcrane','2009-08-20 10:46:39','mcrane','2009-10-27 22:49:59','','9C9642E4-2B9B-2785-18D0-6C0A4EDE2B2F','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Hunt Group','/mod/hunt_group/v_hunt_group.php','internal','admin','','27','mcrane','2009-08-20 10:47:13','superadmin','2010-09-06 18:35:33','','632F87DE-7F86-B68F-C629-4C2D2B3CE545','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Modules','/mod/modules/v_modules.php','internal','superadmin','','3','mcrane','2009-08-20 10:47:46','superadmin','2010-09-01 16:26:19','','49FDB4E1-5417-0E7A-84B3-EB77F5263EA7','02194288-6D56-6D3E-0B1A-D53A2BC10788');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Music on Hold','/mod/music_on_hold/v_music_on_hold.php','internal','admin','','29','mcrane','2009-08-20 10:49:31','mcrane','2009-10-27 22:52:15','','1CD1D6CB-912D-DB32-56C3-E0D5699FEB9D','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Recordings','/mod/recordings/v_recordings.php','internal','admin','','30','mcrane','2009-08-20 10:50:12','mcrane','2009-10-27 22:51:39','','E4290FD2-3CCC-A758-1714-660D38453104','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','SIP Profiles','/mod/profiles/v_profiles.php','internal','superadmin','','61','mcrane','2009-08-20 10:51:17','superadmin','2010-09-06 03:13:43','','3FE562D4-B9D2-74D2-7DEF-BFF4707831E2','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Inbound Routes','/mod/public_includes/v_public_includes.php','internal','admin','','13','mcrane','2009-08-20 10:51:56','mcrane','2009-10-27 22:12:16','','B64B2BBF-F99B-B568-13DC-32170515A687','B94E8BD9-9EB5-E427-9C26-FF7A6C21552A');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','SIP Status','/core/status/v_status.php','internal','admin','','44','mcrane','2009-08-20 10:52:38','superadmin','2010-09-01 16:33:43','','B7AEA9F7-D3CF-711F-828E-46E56E2E5328','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Variables','/mod/vars/v_vars.php','internal','superadmin','','5','mcrane','2009-08-20 10:53:12','superadmin','2010-09-01 16:23:20','','7A4E9EC5-24B9-7200-89B8-D70BF8AFDD8F','02194288-6D56-6D3E-0B1A-D53A2BC10788');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Call Detail Records','/mod/xml_cdr/v_xml_cdr.php','internal','user','','20','mcrane','2009-09-05 00:30:16','superadmin','2010-08-08 10:04:05','','8F80E71A-31A5-6432-47A0-7F5A7B271F05','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','XML Editor','<!--{project_path}-->/mod/xml_edit/','external','superadmin','','66','mcrane','2009-09-08 17:50:37','superadmin','2010-09-06 03:14:06','','16013877-606A-2A05-7D6A-C1B215839131','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Voicemail Status','/mod/voicemail_status/v_voicemail.php','internal','admin','','48','mcrane','2009-09-10 22:26:54','superadmin','2010-09-06 03:57:04','','FF4CCD3D-E295-7875-04B4-54EB0C74ADC5','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Voicemail','/mod/voicemail_msgs/v_voicemail_msgs.php','internal','user','','35','mcrane','2009-09-16 04:04:11','superadmin','2011-01-05 13:30:37','','E10D5672-0F82-6E5D-5022-A02AC8545198','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','PHP Editor','<!--{project_path}-->/mod/php_edit/index.php','external','superadmin','','58','mcrane','2009-09-23 12:15:51','superadmin','2010-09-06 03:11:40','','EAE1F2D6-789B-807C-CC26-44501E848693','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Command','/mod/exec/v_exec.php','internal','superadmin','','53','mcrane','2009-09-23 21:55:57','superadmin','2010-09-06 03:17:57','','06493580-9131-CE57-23CD-D42D69DD8526','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Contact Manager','/mod/contacts/users.php','internal','admin','','24','mcrane','2009-10-03 13:48:07','superadmin','2010-09-06 18:42:41','','87AC2EC3-FA23-2A60-6DE6-07AC2A8AA4D9','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Soft Phone','/mod/soft_phone/v_softphone.php','internal','hidden','','33','mcrane','2009-10-10 12:23:39','superadmin','2010-09-06 18:39:19','','0875598D-BF25-D348-2E87-8D05AEF3CF78','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Call Broadcast','/mod/call_broadcast/v_call_broadcast.php','internal','admin','','18','mcrane','2009-10-13 11:40:28','mcrane','2009-10-27 22:44:50','','50153BBF-78C5-B49E-7BD9-4B3E4B1134E6','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','SQL Query','/mod/sql_query/v_sql_query.php','internal','superadmin','','62','mcrane','2009-10-28 01:00:41','superadmin','2010-08-05 18:03:52','','A894FED7-5A17-F695-C3DE-E32CE58B3794','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Script Editor','<!--{project_path}-->/mod/script_edit/index.php','external','superadmin','','60','mcrane','2009-09-23 12:15:51','superadmin','2010-09-06 03:13:52','','F1905FEC-0577-DAEF-6045-59D09B7D3F94','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Grammar Editor','<!--{project_path}-->/mod/grammar_edit/index.php','external','superadmin','','55','mcrane','2009-09-23 12:15:51','superadmin','2010-09-06 03:18:26','','C3DB739E-89F9-0FA2-44CE-0F4C2FF43B1A','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Call Detail Records','/mod/cdr/v_cdr.php','internal','hidden','','17','mcrane','2009-09-05 00:30:16','superadmin','2010-09-06 04:02:35','','57D6BEA3-EDD3-13C8-E841-CC4CD852B905','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Conferences','/mod/conferences/v_conferences.php','internal','user','','25','mcrane','2010-08-01 00:30:16','mcrane','2010-08-01 22:49:14','','9F2A8C08-3E65-C41C-A716-3B53D42BC4D4','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Call Forward','/mod/call_forward/v_call_forward.php','internal','admin','','21','mcrane','2010-02-02 00:30:16','mcrane','2010-02-12 22:49:14','','1B4ABB01-6F7C-7748-250E-736EDBFD42BE','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Active Calls','/mod/calls_active/v_calls_active.php','internal','admin','','37','mcrane','2010-02-26 00:30:16','superadmin','2010-08-06 01:47:15','','EBA3D07F-DD5C-6B7B-6880-493B44113ADE','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Active Extensions','/mod/calls_active/v_calls_active_extensions.php','internal','user','','39','mcrane','2010-02-26 00:30:16','superadmin','2010-08-06 01:47:49','','6DD85C19-CB6B-5CCA-BF32-499BBE936F79','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Click to Call','/mod/click_to_call/click_to_call.php','internal','admin','','23','mcrane','2010-05-26 20:55:15','mcrane','2010-05-26 20:55:15','','F862556F-9DDD-2697-FDF4-BED08EC63AA5','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','IVR Menu','/mod/ivr_menu/v_ivr_menu.php','internal','admin','','28','mcrane','2009-09-08 17:50:37','superadmin','2010-09-06 18:36:18','','72259497-A67B-E5AA-CAC2-0F2DCEF16308','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','PHP Service','/mod/php_service/v_php_service.php','internal','superadmin','','59','mcrane','2010-06-15 22:31:51','superadmin','2010-09-06 03:50:00','','A8196E2F-5F60-E723-AA3E-83ED76B2EF09','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Phones','/mod/hardware_phones/v_hardware_phones.php','internal','admin','','9','mcrane','2010-08-20 10:50:12','superadmin','2011-01-06 10:25:56','','F9DCE498-B7F9-740F-E592-9E8FF3DAC2A0','BC96D773-EE57-0CDD-C3AC-2D91ABA61B55');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Time Conditions','/mod/time_conditions/v_dialplan_includes.php','internal','admin','','31','mcrane','2010-07-15 10:00:01','mcrane','2010-07-15 10:00:01','','67AEDE56-8623-DF2D-6338-ECFBDE5825F7','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Queues','/mod/fifo/v_fifo.php','internal','admin','','32','mcrane','2010-07-15 13:10:57','superadmin','2010-09-06 18:36:57','','C535AC0B-1DA1-0F9C-4653-7934C6F4732C','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Active Queues','/mod/fifo_list/v_fifo_list.php','internal','admin','','41','mcrane','2010-07-15 13:10:57','superadmin','2010-09-06 18:37:39','','450F1225-9187-49AC-A119-87BC26025F7D','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','CDR CSV','/mod/cdr/v_cdr.php','internal','hidden','','22','superadmin','2010-08-04 08:41:24','superadmin','2010-09-06 18:40:30','','991E1D69-E86B-51F4-A2D1-74BD70B1C87D','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Advanced','/mod/exec/v_exec.php','internal','superadmin','','52','superadmin','2010-08-05 17:55:41','superadmin','2010-11-29 21:58:57','','594D99C5-6128-9C88-CA35-4B33392CEC0F','');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Active Conferences','/mod/conferences_active/v_conferences_active.php','internal','admin','','40','superadmin','2010-08-06 07:07:48','superadmin','2011-01-05 03:16:50','','2D857BBB-43B9-B8F7-A138-642868E0453A','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Accounts','/mod/extensions/v_extensions.php','internal','admin','','6','superadmin','2010-09-01 17:16:12','superadmin','2011-01-06 10:47:21','','BC96D773-EE57-0CDD-C3AC-2D91ABA61B55','');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Outbound Routes','/mod/dialplan_outbound/v_dialplan_outbound.php','internal','admin','','14','superadmin','2010-09-02 02:17:06','','','','17E14094-1D57-1106-DB2A-A787D34015E9','B94E8BD9-9EB5-E427-9C26-FF7A6C21552A');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Upgrade Schema','/core/upgrade/upgrade_schema.php','internal','superadmin','','65','mcrane','2010-09-23 17:50:37','superadmin','2010-09-23 03:14:06','','8C826E92-BE3C-0944-669A-24E5B915D562','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Services','/mod/services/v_services.php','internal','admin','','43','mcrane','2010-10-06 10:52:38','superadmin','2010-10-06 10:52:38','','C28F14E9-E5AD-E992-0931-D5F5F0DB6A79','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Active Call Center','/mod/call_center_active/v_call_center_queue.php','internal','admin','','38','mcrane','2010-10-06 10:52:38','superadmin','2010-10-06 10:52:38','','7FB0DD87-E984-9980-C512-2C76B887AEB2','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Call Center','/mod/call_center/v_call_center_queue.php','internal','admin','','19','mcrane','2010-10-19 10:52:38','superadmin','2010-10-19 10:52:38','','6C072B29-5B6C-49FC-008E-95E24C77DE99','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Traffic Graph','/mod/traffic_graph/status_graph.php?width=660&height=330','internal','admin','Traffic Graph','47','superadmin','2010-12-18 00:31:22','superadmin','2010-12-20 09:18:57','','05AC3828-DC2B-C0E2-282C-79920F5349E0','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','en','Group Manager','/core/users/grouplist.php','internal','superadmin','','56','superadmin','2010-12-27 14:53:17','superadmin','2011-01-06 10:28:54','','3B4ACC6D-827B-F537-BF21-0093D94FFEC7','594D99C5-6128-9C88-CA35-4B33392CEC0F');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','','Virtual Tables','/mod/virtual_tables/v_virtual_tables.php','internal','admin','','34','superadmin','2010-12-06 09:43:35','superadmin','2011-01-06 18:34:35','','6BE94B46-2126-947F-2365-0BEA23651A6B','FD29E39C-C936-F5FC-8E2B-611681B266B5');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','','Registrations','/core/status/v_status_registrations.php?show_reg=1&profile=internal','internal','admin','','42','superadmin','2011-01-05 13:29:32','superadmin','2011-01-05 13:34:23','','17DBFD56-291D-8C1C-BC43-713283A9DD5A','0438B504-8613-7887-C420-C837FFB20CB1');
INSERT INTO v_menu (v_id,menulanguage,menutitle,menustr,menucategory,menugroup,menudesc,menuorder,menuadduser,menuadddate,menumoduser,menumoddate,menu_protected,menu_guid,menu_parent_guid) VALUES ( '1','','Log Viewer','/mod/log_viewer/v_log_viewer.php','internal','admin','','46','superadmin','2011-01-05 13:37:27','superadmin','2011-01-06 23:17:23','','781EBBEC-A55A-9D60-F7BB-F54AB2EE4E7E','0438B504-8613-7887-C420-C837FFB20CB1');
SELECT setval('v_menu_menuid_seq', (SELECT MAX(menuid) FROM v_menu)+1);
CREATE TABLE v_rss (rssid SERIAL, v_id NUMERIC, rsslanguage TEXT, rsscategory TEXT, rsssubcategory TEXT, rsstitle TEXT, rsslink TEXT, rssdesc TEXT, rssimg bytea, rssoptional1 TEXT, rssoptional2 TEXT, rssoptional3 TEXT, rssoptional4 TEXT, rssoptional5 TEXT, rssadddate TEXT, rssadduser TEXT, rssdeldate TEXT, rssdeluser TEXT, rssorder NUMERIC, rsscontent TEXT, rssgroup TEXT);
CREATE TABLE v_rss_sub (rsssubid SERIAL, v_id NUMERIC, rssid NUMERIC, rsssublanguage TEXT, rsssubtitle TEXT, rsssublink TEXT, rsssubdesc TEXT, rsssuboptional1 TEXT, rsssuboptional2 TEXT, rsssuboptional3 TEXT, rsssuboptional4 TEXT, rsssuboptional5 TEXT, rsssubadddate TEXT, rsssubadduser TEXT, rsssubdeluser TEXT, rsssubdeldate TEXT, rsssubparentid TEXT);
CREATE TABLE v_rss_sub_category ( rsssubcategoryid SERIAL, v_id NUMERIC, rsssubcategorylanguage TEXT, rsscategory TEXT, rsssubcategory TEXT, rsssubcategorydesc TEXT, rssadduser TEXT, rssadddate TEXT);
CREATE TABLE v_software (id SERIAL, v_id NUMERIC, software TEXT, softwarename TEXT, softwareurl TEXT, softwareversion TEXT);
INSERT INTO v_software VALUES(1,1,'fusionpbx','Fusion PBX','http://www.fusionpbx.com','');
SELECT setval('v_software_id_seq', (SELECT MAX(id) FROM v_software)+1);
CREATE TABLE v_users (id SERIAL, v_id NUMERIC, username TEXT, password TEXT, usertype TEXT, usercategory TEXT, userfirstname TEXT, userlastname TEXT, usercompanyname TEXT, userphysicaladdress1 TEXT, userphysicaladdress2 TEXT, userphysicalcity TEXT, userphysicalstateprovince TEXT, userphysicalcountry TEXT, userphysicalpostalcode TEXT, usermailingaddress1 TEXT, usermailingaddress2 TEXT, usermailingcity TEXT, usermailingstateprovince TEXT, usermailingcountry TEXT, usermailingpostalcode TEXT, userbillingaddress1 TEXT, userbillingaddress2 TEXT, userbillingcity TEXT, userbillingstateprovince TEXT, userbillingcountry TEXT, userbillingpostalcode TEXT, usershippingaddress1 TEXT, usershippingaddress2 TEXT, usershippingcity TEXT, usershippingstateprovince TEXT, usershippingcountry TEXT, usershippingpostalcode TEXT, userurl TEXT, userphone1 TEXT, userphone1ext TEXT, userphone2 TEXT, userphone2ext TEXT, userphonemobile TEXT, userphoneemergencymobile TEXT, useremailemergency TEXT, userphonefax TEXT, user_template_name TEXT, useremail TEXT, usernotes TEXT, useroptional1 TEXT, useroptional2 TEXT, useradduser TEXT, useradddate TEXT);
INSERT INTO v_users VALUES(1,1,'admin','c7b194db01034581ad8fdf52de6036a8','Individual','user','admin','na','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',NULL,'','','','example@yahoo.com',NULL,NULL,NULL,'','2009-10-24 00:52:38');
INSERT INTO v_users VALUES(2,1,'superadmin','c7b194db01034581ad8fdf52de6036a8','Individual','user','superadmin','na','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',NULL,'','','','example@yahoo.com',NULL,NULL,NULL,'','2009-11-04 13:22:28');
SELECT setval('v_users_id_seq', (SELECT MAX(id) FROM v_users)+1);
CREATE TABLE v_auto_attendant (auto_attendant_id SERIAL, v_id NUMERIC, aaextension TEXT, aaname TEXT, recordingidaction TEXT, recordingidantiaction TEXT, aatimeout TEXT, aacalltimeout TEXT, aacontext TEXT, aadirectdial TEXT, aaringback TEXT, aacidnameprefix TEXT, aaconditionjs TEXT, aadescr TEXT);
CREATE TABLE v_auto_attendant_options (auto_attendant_option_id SERIAL, v_id NUMERIC, auto_attendant_id NUMERIC, optionaction TEXT, optionnumber TEXT, optiontype TEXT, optionprofile TEXT, optiondata TEXT, optionrecording TEXT, optiondescr TEXT);
CREATE TABLE v_call_broadcast (call_broadcast_id SERIAL, broadcast_name TEXT, broadcast_desc TEXT, broadcast_timeout NUMERIC, broadcast_concurrent_limit NUMERIC, recordingid TEXT, broadcast_caller_id_name TEXT, broadcast_caller_id_number TEXT, broadcast_destination_type TEXT, broadcast_phone_numbers TEXT, broadcast_destination_data TEXT);
CREATE TABLE v_dialplan_includes (dialplan_include_id SERIAL, v_id NUMERIC, extensionname TEXT, extensioncontinue TEXT, dialplanorder NUMERIC, context TEXT, enabled TEXT, descr TEXT, opt1name TEXT, opt1value TEXT);
INSERT INTO v_dialplan_includes VALUES(1,1,'Recordings','',9001,'default','true','*732673 default system recordings tool','recordings',732673);
INSERT INTO v_dialplan_includes VALUES(2,1,'DISA','',9001,'default','true','*3472 Direct Inward System Access ','disa',3472);
SELECT setval('v_dialplan_includes_dialplan_include_id_seq', (SELECT MAX(dialplan_include_id) FROM v_dialplan_includes)+1);
CREATE TABLE v_dialplan_includes_details (dialplan_includes_detail_id SERIAL, v_id NUMERIC, dialplan_include_id NUMERIC, parent_id NUMERIC, tag TEXT, fieldorder NUMERIC, fieldtype TEXT, fielddata TEXT, fieldbreak TEXT);
INSERT INTO v_dialplan_includes_details VALUES(1,1,1,NULL,'condition',0,'destination_number','^\\*732$|^\\*732673$','');
INSERT INTO v_dialplan_includes_details VALUES(2,1,1,NULL,'action',1,'set','pin_number=','');
INSERT INTO v_dialplan_includes_details VALUES(3,1,1,NULL,'action',2,'lua','recordings.lua','');
INSERT INTO v_dialplan_includes_details VALUES(4,1,2,NULL,'condition',0,'destination_number','^\\*3472$','');
INSERT INTO v_dialplan_includes_details VALUES(5,1,2,NULL,'action',1,'set','pin_number=34155','');
INSERT INTO v_dialplan_includes_details VALUES(6,1,2,NULL,'action',2,'lua','disa.lua','');
SELECT setval('v_dialplan_includes_details_dialplan_includes_detail_id_seq', (SELECT MAX(dialplan_includes_detail_id) FROM v_dialplan_includes_details)+1);
CREATE TABLE v_extensions (extension_id SERIAL, v_id NUMERIC, extension TEXT, password TEXT, user_list TEXT, provisioning_list TEXT, mailbox TEXT, vm_password TEXT, accountcode TEXT, effective_caller_id_name TEXT, effective_caller_id_number TEXT, outbound_caller_id_name TEXT, outbound_caller_id_number TEXT, vm_mailto TEXT, vm_attach_file TEXT, vm_keep_local_after_email TEXT, user_context TEXT, toll_allow TEXT, callgroup TEXT, auth_acl TEXT, cidr TEXT, sip_force_contact TEXT, nibble_account NUMERIC, enabled TEXT, description TEXT);
CREATE TABLE v_fax (fax_id SERIAL, v_id NUMERIC, faxextension TEXT, faxname TEXT, faxemail TEXT, fax_pin_number TEXT, fax_caller_id_name TEXT, fax_caller_id_number TEXT, fax_user_list TEXT, faxdescription TEXT);
CREATE TABLE v_gateways (gateway_id SERIAL, v_id NUMERIC, gateway TEXT, username TEXT, password TEXT, auth_username TEXT, realm TEXT, from_user TEXT, from_domain TEXT, proxy TEXT, register_proxy TEXT, outbound_proxy TEXT, expire_seconds NUMERIC, register TEXT, register_transport TEXT, retry_seconds NUMERIC, extension TEXT, ping TEXT, caller_id_in_from TEXT, supress_cng TEXT, sip_cid_type TEXT, extension_in_contact TEXT, effective_caller_id_name TEXT, effective_caller_id_number TEXT, outbound_caller_id_name TEXT, outbound_caller_id_number TEXT, context TEXT, enabled TEXT, description TEXT);
CREATE TABLE v_hunt_group (hunt_group_id SERIAL, v_id NUMERIC, huntgroupextension TEXT, huntgroupname TEXT, huntgrouptype TEXT, huntgroupcontext TEXT, huntgrouptimeout TEXT, huntgrouptimeoutdestination TEXT, huntgrouptimeouttype TEXT, huntgroupringback TEXT, huntgroupcidnameprefix TEXT, huntgrouppin TEXT, huntgroupcallerannounce TEXT, hunt_group_call_prompt TEXT, hunt_group_user_list TEXT, hunt_group_enabled TEXT, huntgroupdescr TEXT);
CREATE TABLE v_hunt_group_destinations (hunt_group_destination_id SERIAL, v_id NUMERIC, hunt_group_id NUMERIC, destinationdata TEXT, destinationtype TEXT, destinationprofile TEXT, destination_timeout TEXT, destinationorder NUMERIC, destination_enabled TEXT, destinationdescr TEXT);
CREATE TABLE v_modules (module_id SERIAL, v_id NUMERIC, modulelabel TEXT, modulename TEXT, moduledesc TEXT, modulecat TEXT, moduleenabled TEXT, moduledefaultenabled TEXT);
INSERT INTO v_modules VALUES(1,1,'Console','mod_console','Send logs to the console. ','Loggers','true','true');
INSERT INTO v_modules VALUES(2,1,'Log File','mod_logfile','Send logs to the local file system. ','Loggers','true','true');
INSERT INTO v_modules VALUES(3,1,'Syslog','mod_syslog','Send logs to a remote syslog server.','Loggers','false','false');
INSERT INTO v_modules VALUES(4,1,'ENUM','mod_enum','Route PSTN numbers over internet according to ENUM servers, such as e164.org.','Multi-Faceted','true','true');
INSERT INTO v_modules VALUES(5,1,'XML RPC','mod_xml_rpc','XML Remote Procedure Calls. Issue commands from your web application.','XML Interfaces','true','true');
INSERT INTO v_modules VALUES(6,1,'XML cURL','mod_xml_curl','XML Gateway Code. Configure FreeSWITCH from a web server on boot and on the fly.','XML Interfaces','false','false');
INSERT INTO v_modules VALUES(7,1,'XML CDR','mod_xml_cdr','XML based call detail record handler.','XML Interfaces','true','true');
INSERT INTO v_modules VALUES(8,1,'CDR CSV','mod_cdr_csv','CSV call detail record handler.','Event Handlers','false','false');
INSERT INTO v_modules VALUES(9,1,'Event Multicast','mod_event_multicast','Broadcasts events to netmask.','Event Handlers','false','false');
INSERT INTO v_modules VALUES(10,1,'Event Socket','mod_event_socket','Sends events via a single socket.','Event Handlers','true','true');
INSERT INTO v_modules VALUES(11,1,'Zeroconf','mod_zeroconf','Support for zeroconf.','Event Handlers','false','false');
INSERT INTO v_modules VALUES(12,1,'LDAP','mod_ldap','LDAP module made to obtain dialplans, user accounts, etc.','Directory Interfaces','true','true');
INSERT INTO v_modules VALUES(13,1,'Dingaling','mod_dingaling',NULL,'Endpoints','true','true');
INSERT INTO v_modules VALUES(14,1,'FreeTDM','mod_freetdm','Interface to TDM hardware.','Endpoints','false','false');
INSERT INTO v_modules VALUES(15,1,'PortAudio','mod_portaudio','Voice through a local soundcard.','Endpoints','true','true');
INSERT INTO v_modules VALUES(16,1,'ALSA','mod_alsa','','Endpoints','false','false');
INSERT INTO v_modules VALUES(17,1,'Sofia','mod_sofia','SIP module.','Endpoints','true','true');
INSERT INTO v_modules VALUES(18,1,'Loopback','mod_loopback','A loopback channel driver to make an outbound call as an inbound call.','Endpoints','true','true');
INSERT INTO v_modules VALUES(19,1,'Wanpipe','mod_wanpipe','','Endpoints','false','false');
INSERT INTO v_modules VALUES(20,1,'Woomera','mod_woomera','','Endpoints','false','false');
INSERT INTO v_modules VALUES(21,1,'OpenZAP','mod_openzap','Interface to Zaptel hardware.','Endpoints','false','false');
INSERT INTO v_modules VALUES(22,1,'CID Lookup','mod_cidlookup','Caller ID Lookup','Applications','false','false');
INSERT INTO v_modules VALUES(23,1,'Commands','mod_commands','API interface commands. ','Applications','true','true');
INSERT INTO v_modules VALUES(24,1,'Conference','mod_conference','Conference room module.','Applications','true','true');
INSERT INTO v_modules VALUES(25,1,'Dialplan Plan Tools','mod_dptools','Provides a number of apps and utilities for the dialplan.','Applications','true','true');
INSERT INTO v_modules VALUES(26,1,'Easyroute','mod_easyroute','DID routing engine that uses a database lookup to determine how to route an incoming call.','Applications','false','false');
INSERT INTO v_modules VALUES(27,1,'ESF','mod_esf','Holds the multi cast paging application for SIP.','Applications','true','true');
INSERT INTO v_modules VALUES(28,1,'Expr','mod_expr','Expression evaluation library.','Applications','true','true');
INSERT INTO v_modules VALUES(29,1,'Fax','mod_spandsp','FAX provides fax send and receive.','Applications','true','true');
INSERT INTO v_modules VALUES(30,1,'FIFO','mod_fifo','FIFO provides custom call queues including call park.','Applications','true','true');
INSERT INTO v_modules VALUES(31,1,'File String','mod_file_string','','Applications','false','false');
INSERT INTO v_modules VALUES(32,1,'FSV','mod_fsv','Video application (Recording and playback). ','Applications','true','true');
INSERT INTO v_modules VALUES(33,1,'Voicemail','mod_voicemail','Full featured voicemail module.','Applications','true','true');
INSERT INTO v_modules VALUES(34,1,'LCR','mod_lcr','Least Cost Routing.','Applications','false','false');
INSERT INTO v_modules VALUES(35,1,'Hash','mod_hash','Resource limitation. ','Applications','true','true');
INSERT INTO v_modules VALUES(36,1,'SoundTouch','mod_soundtouch','Modify pitch and other sound effects.','Applications','false','false');
INSERT INTO v_modules VALUES(37,1,'Spy','mod_spy','','Applications','false','false');
INSERT INTO v_modules VALUES(38,1,'VMD','mod_vmd','Voicemail Beep Detection.','Applications','true','true');
INSERT INTO v_modules VALUES(39,1,'Snom','mod_snom','','snom','false','false');
INSERT INTO v_modules VALUES(40,1,'Dialplan Directory','mod_dialplan_directory','Allows you to obtain a dialplan from a directory resource.','Dialplan Interfaces','true','true');
INSERT INTO v_modules VALUES(41,1,'Dialplan XML','mod_dialplan_xml','Allows you to program dialplans in XML format.','Dialplan Interfaces','true','true');
INSERT INTO v_modules VALUES(42,1,'Dialplan Asterisk','mod_dialplan_asterisk','Allows you to create dialplans the old-fashioned way.','Dialplan Interfaces','false','false');
INSERT INTO v_modules VALUES(43,1,'YAML','mod_yaml','','Dialplan Interfaces','false','false');
INSERT INTO v_modules VALUES(44,1,'Voip Codecs','mod_voipcodecs',NULL,'Codec Interfaces','true','true');
INSERT INTO v_modules VALUES(45,1,'G.723.1','mod_g723_1','G.723.1 codec.','Codec Interfaces','true','true');
INSERT INTO v_modules VALUES(46,1,'G.729','mod_g729','G729 codec supports passthrough mode. ','Codec Interfaces','true','true');
INSERT INTO v_modules VALUES(47,1,'AMR','mod_amr','AMR codec.','Codec Interfaces','true','true');
INSERT INTO v_modules VALUES(48,1,'AMRWB','mod_amrwb','AMRWB codec.','Codec Interfaces','false','false');
INSERT INTO v_modules VALUES(49,1,'iLBC','mod_ilbc','iLBC codec.','Codec Interfaces','true','true');
INSERT INTO v_modules VALUES(50,1,'Speex','mod_speex','Speex codec.','Codec Interfaces','true','true');
INSERT INTO v_modules VALUES(51,1,'Siren','mod_siren','Siren codec.','Codec Interfaces','true','true');
INSERT INTO v_modules VALUES(52,1,'CELT','mod_celt','CELT codec.','Codec Interfaces','false','true');
INSERT INTO v_modules VALUES(53,1,'H.26x','mod_h26x','H.26X signed linear codec. Video Pass-thru. ','Codec Interfaces','true','true');
INSERT INTO v_modules VALUES(54,1,'Sound File','mod_sndfile','Multi-format file format transcoder (WAV, etc).','File Format Interfaces','true','true');
INSERT INTO v_modules VALUES(55,1,'Native File','mod_native_file','File interface for codec specific file formats.','File Format Interfaces','true','true');
INSERT INTO v_modules VALUES(56,1,'Shout','mod_shout','MP3 files and shoutcast streams.','Streams / Files','true','true');
INSERT INTO v_modules VALUES(57,1,'Local Stream','mod_local_stream','For local streams (play all the files in a directory).','Streams / Files','true','true');
INSERT INTO v_modules VALUES(58,1,'Tone Stream','mod_tone_stream','Generate tone streams.','Streams / Files','true','true');
INSERT INTO v_modules VALUES(59,1,'SpiderMonkey','mod_spidermonkey','JavaScript support.','Languages','true','true');
INSERT INTO v_modules VALUES(60,1,'SpiderMonkey Core DB','mod_spidermonkey_core_db','JavaScript SQLite support.','Languages','false','false');
INSERT INTO v_modules VALUES(61,1,'SpiderMonkey cURL','mod_spidermonkey_curl','JavaScript cURL support.','Languages','false','false');
INSERT INTO v_modules VALUES(62,1,'SpiderMonkey ODBC','mod_spidermonkey_odbc','JavaScript ODBC support.','Languages','false','false');
INSERT INTO v_modules VALUES(63,1,'SpiderMonkey Socket','mod_spidermonkey_socket','JavaScript Socket support.','Languages','false','false');
INSERT INTO v_modules VALUES(64,1,'SpiderMonkey Teletone','mod_spidermonkey_teletone','JavaScript Teletone support.','Languages','false','false');
INSERT INTO v_modules VALUES(65,1,'Perl','mod_perl','Perl script.','Languages','false','false');
INSERT INTO v_modules VALUES(66,1,'Python','mod_python','Python','Languages','false','false');
INSERT INTO v_modules VALUES(67,1,'Java','mod_java','Java','Languages','false','false');
INSERT INTO v_modules VALUES(68,1,'Lua','mod_lua','Lua script.','Languages','true','true');
INSERT INTO v_modules VALUES(69,1,'Flite','mod_flite','Text to Speech.','ASR / TTS','true','true');
INSERT INTO v_modules VALUES(70,1,'PocketSphinx','mod_pocketsphinx','Speech Recognition. ','ASR / TTS','true','true');
INSERT INTO v_modules VALUES(71,1,'Cepstral','mod_cepstral','Text to Speech.','ASR / TTS','false','false');
INSERT INTO v_modules VALUES(72,1,'OpenMRCP','mod_openmrcp','Allows communication with Media Resource Control Protocol servers.','ASR / TTS','false','false');
INSERT INTO v_modules VALUES(73,1,'RSS','mod_rss','Reads RSS feeds via a TTS engine.','ASR / TTS','true','true');
INSERT INTO v_modules VALUES(74,1,'German','mod_say_de','','Say','false','false');
INSERT INTO v_modules VALUES(75,1,'English','mod_say_en',NULL,'Say','true','true');
INSERT INTO v_modules VALUES(76,1,'Spanish','mod_say_es','','Say','false','false');
INSERT INTO v_modules VALUES(77,1,'French','mod_say_fr','','Say','false','false');
INSERT INTO v_modules VALUES(78,1,'Italian','mod_say_it','','Say','false','false');
INSERT INTO v_modules VALUES(79,1,'Dutch','mod_say_nl','','Say','false','false');
INSERT INTO v_modules VALUES(80,1,'Russian','mod_say_ru','','Say','false','false');
INSERT INTO v_modules VALUES(81,1,'Chinese','mod_say_zh','','Say','false','false');
INSERT INTO v_modules VALUES(82,1,'Valet Parking','mod_valet_parking',NULL,'Applications','true','true');
INSERT INTO v_modules VALUES(83,1,'Directory','mod_directory',NULL,'Applications','true','true');
SELECT setval('v_modules_module_id_seq', (SELECT MAX(module_id) FROM v_modules)+1);
CREATE TABLE v_public_includes (public_include_id SERIAL, v_id NUMERIC, extensionname TEXT, extensioncontinue TEXT, publicorder NUMERIC, context TEXT, opt1name TEXT, opt1value TEXT, enabled TEXT, descr TEXT);
CREATE TABLE v_public_includes_details ( public_includes_detail_id SERIAL, v_id NUMERIC, public_include_id NUMERIC, parent_id NUMERIC, tag TEXT, fieldtype TEXT, fielddata TEXT, fieldorder NUMERIC, fieldbreak TEXT);
SELECT setval('v_public_includes_details_public_includes_detail_id_seq', (SELECT MAX(public_includes_detail_id) FROM v_public_includes_details)+1);
CREATE TABLE v_recordings ( recording_id SERIAL, v_id NUMERIC, filename TEXT, recordingname TEXT, recordingid TEXT, descr TEXT );
CREATE TABLE v_settings (setting_id SERIAL, v_id NUMERIC, numbering_plan TEXT, default_gateway TEXT, default_area_code TEXT, event_socket_ip_address TEXT, event_socket_port TEXT, event_socket_password TEXT, xml_rpc_http_port TEXT, xml_rpc_auth_realm TEXT, xml_rpc_auth_user TEXT, xml_rpc_auth_pass TEXT, admin_pin NUMERIC, smtphost TEXT, smtpsecure TEXT, smtpauth TEXT, smtpusername TEXT, smtppassword TEXT, smtpfrom TEXT, smtpfromname TEXT, mod_shout_decoder TEXT, mod_shout_volume TEXT);
INSERT INTO v_settings VALUES(1,1,'US','',208,'127.0.0.1',8021,'ClueCon',8787,'localhost','xmlrpc','7e4d3i',1234,'','none','','','','','Voicemail','i386',0.3);
SELECT setval('v_settings_setting_id_seq', (SELECT MAX(setting_id) FROM v_settings)+1);
CREATE TABLE v_system_settings (v_id SERIAL, v_domain TEXT, php_dir TEXT, tmp_dir TEXT, bin_dir TEXT, v_startup_script_dir TEXT, v_package_version TEXT, v_build_version TEXT, v_build_revision TEXT, v_label TEXT, v_name TEXT, v_dir TEXT, v_parent_dir TEXT, v_backup_dir TEXT, v_web_dir TEXT, v_web_root TEXT, v_relative_url TEXT, v_conf_dir TEXT, v_db_dir TEXT, v_htdocs_dir TEXT, v_log_dir TEXT, v_extensions_dir TEXT, v_dialplan_public_dir TEXT, v_dialplan_default_dir TEXT, v_mod_dir TEXT, v_scripts_dir TEXT, v_grammar_dir TEXT, v_storage_dir TEXT, v_voicemail_dir TEXT, v_recordings_dir TEXT, v_download_path TEXT, v_sounds_dir TEXT, v_provisioning_tftp_dir TEXT, v_provisioning_ftp_dir TEXT, v_provisioning_https_dir TEXT, v_provisioning_http_dir TEXT);
INSERT INTO v_system_settings (v_id, v_domain, php_dir, tmp_dir, bin_dir, v_startup_script_dir, v_package_version, v_build_version, v_build_revision, v_label, v_name, v_dir, v_parent_dir, v_backup_dir, v_web_dir, v_web_root, v_relative_url, v_conf_dir, v_db_dir, v_htdocs_dir, v_log_dir, v_extensions_dir, v_dialplan_public_dir, v_dialplan_default_dir, v_mod_dir, v_scripts_dir, v_grammar_dir, v_storage_dir, v_voicemail_dir, v_recordings_dir, v_download_path, v_provisioning_tftp_dir, v_provisioning_ftp_dir, v_provisioning_https_dir, v_provisioning_http_dir, v_sounds_dir) VALUES (1,'localhost','{program_dir}/php','{program_dir}/temp','{program_dir}/FreeSWITCH','/','','1.0.6','Release','FreeSWITCH','freeswitch','{program_dir}/FreeSWITCH','{program_dir}','{program_dir}/backup','{program_dir}/www/localhost','{program_dir}/www/localhost','/','{program_dir}/FreeSWITCH/conf','{program_dir}/FreeSWITCH/db','{program_dir}/FreeSWITCH/htodcs','{program_dir}/FreeSWITCH/log','{program_dir}/FreeSWITCH/conf/directory/default','{program_dir}/FreeSWITCH/conf/dialplan/public','{program_dir}/FreeSWITCH/conf/dialplan/default','{program_dir}/modules','{program_dir}/FreeSWITCH/scripts','{program_dir}/FreeSWITCH/grammar','{program_dir}/FreeSWITCH/storage','{program_dir}/FreeSWITCH/storage/voicemail','{program_dir}/FreeSWITCH/recordings','http://fusionpbx.com/downloads/fusionpbx.tgz','','','','','{program_dir}/FreeSWITCH/sounds');
SELECT setval('v_system_settings_v_id_seq', (SELECT MAX(v_id) FROM v_system_settings)+1);
CREATE TABLE v_vars (v_id NUMERIC, var_id SERIAL, var_name TEXT, var_value TEXT, var_cat TEXT, var_enabled TEXT, var_order NUMERIC, var_desc TEXT);
INSERT INTO v_vars VALUES(1,1,'sound_prefix','$${base_dir}/sounds/en/us/callie','Sound','true',3,'U2V0cyB0aGUgc291bmQgZGlyZWN0b3J5Lg==');
INSERT INTO v_vars VALUES(1,2,'domain','$${local_ip_v4}','Domain','true',1,'U2V0cyB0aGUgZGVmYXVsdCBkb21haW4u');
INSERT INTO v_vars VALUES(1,3,'domain_name','$${domain}','Domain','true',2,'');
INSERT INTO v_vars VALUES(1,4,'hold_music','local_stream://moh','Music on Hold','true',4,'');
INSERT INTO v_vars VALUES(1,5,'global_codec_prefs','G722,PCMU,PCMA,GSM','Codecs','true',5,'');
INSERT INTO v_vars VALUES(1,6,'outbound_codec_prefs','G722,PCMU,PCMA,GSM','Codecs','true',6,'');
INSERT INTO v_vars VALUES(1,7,'xmpp_client_profile','xmppc','Dingaling','true',7,'eG1wcF9jbGllbnRfcHJvZmlsZSBhbmQgeG1wcF9zZXJ2ZXJfcHJvZmlsZSB4bXBwX2NsaWVudF9wcm9maWxlIGNhbiBiZSBhbnkgc3RyaW5nLiB4bXBwX3NlcnZlcl9wcm9maWxlIGlzIGFwcGVuZGVkIHRvICJkaW5nYWxpbmdfIiB0byBmb3JtIHRoZSBkYXRhYmFzZSBuYW1lIGNvbnRhaW5pbmcgdGhlICJzdWJzY3JpcHRpb25zIiB0YWJsZS4gdXNlZCBieTogZGluZ2FsaW5nLmNvbmYueG1sIGVudW0uY29uZi54bWw=');
INSERT INTO v_vars VALUES(1,8,'xmpp_server_profile','xmpps','Dingaling','true',8,'');
INSERT INTO v_vars VALUES(1,9,'bind_server_ip','auto','Dingaling','true',9,'Q2FuIGJlIGFuIGlwIGFkZHJlc3MsIGEgZG5zIG5hbWUsIG9yICJhdXRvIi4gVGhpcyBkZXRlcm1pbmVzIGFuIGlwIGFkZHJlc3MgYXZhaWxhYmxlIG9uIHRoaXMgaG9zdCB0byBiaW5kLiBJZiB5b3UgYXJlIHNlcGFyYXRpbmcgUlRQIGFuZCBTSVAgdHJhZmZpYywgeW91IHdpbGwgd2FudCB0byBoYXZlIHVzZSBkaWZmZXJlbnQgYWRkcmVzc2VzIHdoZXJlIHRoaXMgdmFyaWFibGUgYXBwZWFycy4gVXNlZCBieTogZGluZ2FsaW5nLmNvbmYueG1s');
INSERT INTO v_vars VALUES(1,10,'external_rtp_ip','stun:stun.fwdnet.net','IP Address','true',10,'KElmIHlvdScncmUgZ29pbmcgdG8gbG9hZCB0ZXN0IHRoZW4gcGxlYXNlIGlucHV0IHJlYWwgSVAgYWRkcmVzc2VzIGZvciBleHRlcm5hbF9ydHBfaXAgYW5kIGV4dGVybmFsX3NpcF9pcCkNCg0KQ2FuIGJlIGFuIG9uZSBvZjoNCiAgIGlwIGFkZHJlc3M6ICIxMi4zNC41Ni43OCINCiAgIGEgc3R1biBzZXJ2ZXIgbG9va3VwOiAic3R1bjpzdHVuLnNlcnZlci5jb20iDQogICBhIEROUyBuYW1lOiAiaG9zdDpob3N0LnNlcnZlci5jb20iDQoNCndoZXJlIGZzLm15ZG9tYWluLmNvbSBpcyBhIEROUyBBIHJlY29yZC11c2VmdWwgd2hlbiBmcyBpcyBvbiBhIGR5bmFtaWMgSVAgYWRkcmVzcywgYW5kIHVzZXMgYSBkeW5hbWljIEROUyB1cGRhdGVyLiBJZiB1bnNwZWNpZmllZCwgdGhlIGJpbmRfc2VydmVyX2lwIHZhbHVlIGlzIHVzZWQuIFVzZWQgYnk6IHNvZmlhLmNvbmYueG1sIGRpbmdhbGluZy5jb25mLnhtbA==');
INSERT INTO v_vars VALUES(1,11,'external_sip_ip','stun:stun.fwdnet.net','IP Address','true',11,'VXNlZCBhcyB0aGUgcHVibGljIElQIGFkZHJlc3MgZm9yIFNEUC4NCg0KQ2FuIGJlIGFuIG9uZSBvZjoNCiAgIGlwIGFkZHJlc3M6ICIxMi4zNC41Ni43OCINCiAgIGEgc3R1biBzZXJ2ZXIgbG9va3VwOiAic3R1bjpzdHVuLnNlcnZlci5jb20iDQogICBhIEROUyBuYW1lOiAiaG9zdDpob3N0LnNlcnZlci5jb20iDQoNCndoZXJlIGZzLm15ZG9tYWluLmNvbSBpcyBhIEROUyBBIHJlY29yZC11c2VmdWwgd2hlbiBmcyBpcyBvbiBhIGR5bmFtaWMgSVAgYWRkcmVzcywgYW5kIHVzZXMgYSBkeW5hbWljIEROUyB1cGRhdGVyLiBJZiB1bnNwZWNpZmllZCwgdGhlIGJpbmRfc2VydmVyX2lwIHZhbHVlIGlzIHVzZWQuIFVzZWQgYnk6IHNvZmlhLmNvbmYueG1sIGRpbmdhbGluZy5jb25mLnhtbA==');
INSERT INTO v_vars VALUES(1,12,'unroll_loops','true','SIP','true',12,'VXNlZCB0byB0dXJuIG9uIHNpcCBsb29wYmFjayB1bnJvbGxpbmcu');
INSERT INTO v_vars VALUES(1,13,'call_debug','false','Defaults','true',13,'');
INSERT INTO v_vars VALUES(1,14,'console_loglevel','info','Defaults','true',14,'');
INSERT INTO v_vars VALUES(1,15,'default_areacode',208,'Defaults','true',15,'');
INSERT INTO v_vars VALUES(1,16,'uk-ring','%(400,200,400,450);%(400,2200,400,450)','Defaults','true',16,'');
INSERT INTO v_vars VALUES(1,17,'us-ring','%(2000, 4000, 440.0, 480.0)','Defaults','true',17,'');
INSERT INTO v_vars VALUES(1,18,'fr-ring','%(1500, 3500, 440.0, 0.0)','Defaults','true',18,'');
INSERT INTO v_vars VALUES(1,19,'rs-ring','%(1000, 4000, 425.0, 0.0)','Defaults','true',19,'');
INSERT INTO v_vars VALUES(1,20,'bong-ring','v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1400,0,350,440)','Defaults','true',20,'');
INSERT INTO v_vars VALUES(1,21,'sit','%(274,0,913.8);%(274,0,1370.6);%(380,0,1776.7)','Defaults','true',21,'');
INSERT INTO v_vars VALUES(1,22,'sip_tls_version','tlsv1','SIP and TLS','true',21,'U0lQIGFuZCBUTFMgc2V0dGluZ3Mu');
INSERT INTO v_vars VALUES(1,23,'internal_auth_calls','true','SIP Profile: Internal','true',22,'');
INSERT INTO v_vars VALUES(1,24,'internal_sip_port',5060,'SIP Profile: Internal','true',23,'');
INSERT INTO v_vars VALUES(1,25,'internal_tls_port',5061,'SIP Profile: Internal','true',24,'');
INSERT INTO v_vars VALUES(1,26,'internal_ssl_enable','false','SIP Profile: Internal','true',25,'');
INSERT INTO v_vars VALUES(1,27,'internal_ssl_dir','$${base_dir}/conf/ssl','SIP Profile: Internal','true',26,'');
INSERT INTO v_vars VALUES(1,28,'external_auth_calls','false','SIP Profile: External','true',27,'');
INSERT INTO v_vars VALUES(1,29,'external_sip_port',5080,'SIP Profile: External','true',28,'');
INSERT INTO v_vars VALUES(1,30,'external_tls_port',5081,'SIP Profile: External','true',29,'');
INSERT INTO v_vars VALUES(1,31,'external_ssl_enable','false','SIP Profile: External','true',29,'');
INSERT INTO v_vars VALUES(1,32,'external_ssl_dir','$${base_dir}/conf/ssl','SIP Profile: External','true',30,'');
INSERT INTO v_vars VALUES(1,33,'use_profile','internal','Defaults','true',31,'');
INSERT INTO v_vars VALUES(1,34,'default_language','en','Defaults','true',32,'');
INSERT INTO v_vars VALUES(1,35,'default_dialect','us','Defaults','true',33,'');
INSERT INTO v_vars VALUES(1,36,'default_voice','callie','Defaults','true',34,'');
SELECT setval('v_vars_var_id_seq', (SELECT MAX(var_id) FROM v_vars)+1);
CREATE TABLE v_cdr (cdr_id SERIAL, v_id NUMERIC, caller_id_name TEXT, caller_id_number TEXT, destination_number TEXT, context TEXT, start_stamp TEXT, answer_stamp TEXT, end_stamp TEXT, duration NUMERIC, billsec NUMERIC, hangup_cause TEXT, uuid TEXT, bleg_uuid TEXT, accountcode TEXT, read_codec TEXT, write_codec TEXT, remote_media_ip TEXT, network_addr TEXT );
CREATE TABLE v_ivr_menu (ivr_menu_id SERIAL,v_id NUMERIC,ivr_menu_name TEXT,ivr_menu_extension NUMERIC,ivr_menu_greet_long TEXT,ivr_menu_greet_short TEXT,ivr_menu_invalid_sound TEXT,ivr_menu_exit_sound TEXT,ivr_menu_confirm_macro TEXT,ivr_menu_confirm_key TEXT,ivr_menu_tts_engine TEXT,ivr_menu_tts_voice TEXT,ivr_menu_confirm_attempts NUMERIC,ivr_menu_timeout NUMERIC,ivr_menu_inter_digit_timeout NUMERIC,ivr_menu_max_failures NUMERIC,ivr_menu_max_timeouts NUMERIC,ivr_menu_digit_len NUMERIC,ivr_menu_direct_dial TEXT,ivr_menu_enabled TEXT,ivr_menu_desc TEXT);
CREATE TABLE v_ivr_menu_options (ivr_menu_option_id SERIAL, ivr_menu_id NUMERIC, v_id NUMERIC, ivr_menu_options_digits TEXT, ivr_menu_options_action TEXT, ivr_menu_options_param TEXT, ivr_menu_options_order NUMERIC, ivr_menu_options_desc TEXT);
CREATE TABLE v_php_service (php_service_id SERIAL, service_name TEXT, v_id NUMERIC, service_script TEXT, service_enabled TEXT, service_description TEXT);
CREATE TABLE v_hardware_phones (hardware_phone_id SERIAL, v_id NUMERIC, phone_mac_address TEXT, phone_vendor TEXT, phone_model TEXT, phone_provision_enable TEXT, phone_template TEXT, phone_username TEXT, phone_password TEXT, phone_description TEXT);
CREATE TABLE v_src (src_id SERIAL, v_id NUMERIC, type TEXT, last_mod TEXT, path TEXT);
CREATE TABLE v_xml_cdr (xml_cdr_id SERIAL, v_id NUMERIC, uuid TEXT, direction TEXT, default_language TEXT, context TEXT, xml_cdr TEXT, caller_id_name TEXT, caller_id_number TEXT, destination_number TEXT, start_epoch NUMERIC, start_stamp TEXT, start_uepoch NUMERIC, answer_stamp TEXT, answer_epoch NUMERIC, answer_uepoch NUMERIC, end_epoch NUMERIC, end_uepoch NUMERIC, end_stamp TEXT, duration NUMERIC, mduration NUMERIC, billsec NUMERIC, billmsec NUMERIC, bridge_uuid TEXT, read_codec TEXT, write_codec TEXT, remote_media_ip TEXT, network_addr TEXT, hangup_cause TEXT, hangup_cause_q850 NUMERIC);
CREATE TABLE v_services (service_id SERIAL, v_id TEXT, v_service_name TEXT, v_service_type TEXT, v_service_data TEXT, v_service_cmd_start TEXT, v_service_cmd_stop TEXT, v_service_desc TEXT);
CREATE TABLE v_call_center_queue (call_center_queue_id SERIAL, v_id TEXT, queue_name TEXT, queue_extension TEXT, queue_strategy TEXT, queue_moh_sound TEXT, queue_record_template TEXT, queue_time_base_score TEXT, queue_max_wait_time NUMERIC, queue_max_wait_time_with_no_agent NUMERIC, queue_tier_rules_apply TEXT, queue_tier_rule_wait_second NUMERIC, queue_tier_rule_no_agent_no_wait TEXT, queue_discard_abandoned_after NUMERIC, queue_abandoned_resume_allowed TEXT, queue_tier_rule_wait_multiply_level TEXT, queue_description TEXT);
CREATE TABLE v_call_center_agent (call_center_agent_id SERIAL, v_id TEXT, agent_name TEXT, agent_type TEXT, agent_call_timeout NUMERIC, agent_contact TEXT, agent_status TEXT, agent_max_no_answer NUMERIC, agent_wrap_up_time NUMERIC, agent_reject_delay_time NUMERIC, agent_busy_delay_time NUMERIC);
CREATE TABLE v_call_center_tier (call_center_tier_id SERIAL, v_id TEXT, agent_name TEXT, queue_name TEXT, tier_level NUMERIC, tier_position NUMERIC);
CREATE TABLE v_virtual_tables (virtual_table_id SERIAL, v_id NUMERIC, virtual_table_category TEXT, virtual_table_label TEXT, virtual_table_name TEXT, virtual_table_auth TEXT, virtual_table_captcha TEXT, virtual_table_parent_id TEXT, virtual_table_desc TEXT)
CREATE TABLE v_virtual_table_fields (virtual_table_field_id SERIAL, v_id NUMERIC, virtual_table_id NUMERIC, virtual_field_label TEXT, virtual_field_name TEXT, virtual_field_type TEXT, virtual_field_list_hidden TEXT, virtual_field_column TEXT, virtual_field_required TEXT, virtual_field_order NUMERIC, virtual_field_order_tab NUMERIC, virtual_field_desc TEXT, virtual_field_value TEXT) 
CREATE TABLE v_virtual_table_data_types_name_value (virtual_table_data_types_name_value_id SERIAL, v_id NUMERIC, virtual_table_id NUMERIC, virtual_table_field_id NUMERIC, virtual_data_types_name TEXT, virtual_data_types_value TEXT) 
CREATE TABLE v_virtual_table_data (virtual_table_data_id SERIAL, v_id NUMERIC, virtual_table_id NUMERIC, virtual_data_row_id TEXT, virtual_field_name TEXT, virtual_data_field_value TEXT, virtual_data_add_user TEXT, virtual_data_add_date TEXT, virtual_data_del_user TEXT, virtual_data_del_date TEXT, virtual_table_parent_id NUMERIC, virtual_data_parent_row_id TEXT)
CREATE INDEX index_billsec ON v_xml_cdr(billsec);
CREATE INDEX index_caller_id_name ON v_xml_cdr(caller_id_name);
CREATE INDEX index_destination_number ON v_xml_cdr(destination_number);
CREATE INDEX index_duration ON v_xml_cdr(duration);
CREATE INDEX index_hangup_cause ON v_xml_cdr(hangup_cause);
CREATE INDEX index_start_stamp ON v_xml_cdr(start_stamp);
--COMMIT;