DROP TABLE IF EXISTS `realoperators`;

CREATE TABLE `realoperators` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(80) NOT NULL,
  `secret` varchar(80) NOT NULL,
  `transport` varchar(31) DEFAULT 'udp',
  `host` varchar(31) DEFAULT 'dynamic',
  `context` varchar(80) DEFAULT 'default',
  `deny` varchar(95) DEFAULT NULL,
  `permit` varchar(95) DEFAULT NULL,
  `md5secret` varchar(80) DEFAULT NULL,
  `remotesecret` varchar(250) DEFAULT NULL,
  `nat` varchar(20) NOT NULL DEFAULT 'yes',
  `type` enum('user','peer','friend') NOT NULL DEFAULT 'friend',
  `accountcode` varchar(20) DEFAULT NULL,
  `amaflags` varchar(13) DEFAULT NULL,
  `callgroup` varchar(10) DEFAULT NULL,
  `callerid` varchar(80) DEFAULT NULL,
  `defaultip` varchar(15) DEFAULT NULL,
  `dtmfmode` varchar(7) DEFAULT NULL,
  `fromuser` varchar(80) DEFAULT NULL,
  `fromdomain` varchar(80) DEFAULT NULL,
  `insecure` varchar(50) DEFAULT NULL,
  `language` char(2) DEFAULT NULL,
  `mailbox` varchar(50) DEFAULT NULL,
  `pickupgroup` varchar(10) DEFAULT NULL,
  `qualify` char(3) DEFAULT NULL,
  `regexten` varchar(80) DEFAULT NULL,
  `rtptimeout` char(3) DEFAULT NULL,
  `rtpholdtimeout` char(3) DEFAULT NULL,
  `setvar` varchar(100) DEFAULT NULL,
  `disallow` varchar(100) DEFAULT 'all',
  `allow` varchar(50) NOT NULL DEFAULT 'ulaw;alaw;gsm',
  `fullcontact` varchar(80) NOT NULL DEFAULT '',
  `ipaddr` varchar(50) DEFAULT NULL,
  `port` mediumint(5) unsigned NOT NULL DEFAULT '0',
  `username` varchar(80) NOT NULL DEFAULT '',
  `defaultuser` varchar(80) NOT NULL DEFAULT '',
  `subscribecontext` varchar(80) DEFAULT NULL,
  `directmedia` enum('yes','no') DEFAULT NULL,
  `trustrpid` enum('yes','no') DEFAULT NULL,
  `sendrpid` enum('yes','no') DEFAULT NULL,
  `progressinband` enum('never','yes','no') DEFAULT NULL,
  `callingpres` enum('allowed_not_screened','allowed_passed_screen','allowed_failed_screen','allowed','prohib_not_screened','prohib_passed_screen','prohib_failed_screen','prohib','unavailable') DEFAULT 'allowed_not_screened',
  `promiscredir` enum('yes','no') DEFAULT NULL,
  `useclientcode` enum('yes','no') DEFAULT NULL,
  `callcounter` enum('yes','no') DEFAULT 'yes',
  `busylevel` int(10) unsigned DEFAULT NULL,
  `allowoverlap` enum('yes','no') DEFAULT 'yes',
  `allowsubscribe` enum('yes','no') DEFAULT 'yes',
  `allowtransfer` enum('yes','no') DEFAULT 'yes',
  `ignoresdpversion` enum('yes','no') DEFAULT 'no',
  `videosupport` enum('yes','no','always') DEFAULT 'no',
  `maxcallbitrate` int(10) unsigned DEFAULT NULL,
  `rfc2833compensate` enum('yes','no') DEFAULT 'yes',
  `session-timers` enum('originate','accept','refuse') DEFAULT 'accept',
  `session-expires` int(5) unsigned DEFAULT '1800',
  `session-minse` int(5) unsigned DEFAULT '90',
  `session-refresher` enum('uac','uas') DEFAULT 'uas',
  `t38pt_usertpsource` enum('yes','no') DEFAULT NULL,
  `outboundproxy` varchar(250) DEFAULT NULL,
  `callbackextension` varchar(250) DEFAULT NULL,
  `registertrying` enum('yes','no') DEFAULT 'yes',
  `timert1` int(5) unsigned DEFAULT '500',
  `timerb` int(8) unsigned DEFAULT NULL,
  `qualifyfreq` int(5) unsigned DEFAULT '120',
  `contactpermit` varchar(250) DEFAULT NULL,
  `contactdeny` varchar(250) DEFAULT NULL,
  `lastms` int(11) NOT NULL,
  `regserver` varchar(100) NOT NULL DEFAULT '',
  `regseconds` int(11) NOT NULL DEFAULT '0',
  `useragent` varchar(50) NOT NULL DEFAULT '',
  `avpf` varchar(10) DEFAULT 'yes',
  `force_rport` varchar(30) DEFAULT 'yes',
  `email` varchar(50) DEFAULT NULL,
  `register` varchar(10) DEFAULT NULL,
  `canreinvite` varchar(10) DEFAULT 'no',
  `provider_id` int(11) DEFAULT NULL,
  `vip_line` varchar(3) DEFAULT 'off',
  `icesupport` enum('yes','no') NOT NULL DEFAULT 'yes',
  `encryption` enum('yes','no') NOT NULL DEFAULT 'yes',
  `sip_restaurant_id` int(11) DEFAULT NULL,
  `force_avp` varchar(10) DEFAULT 'yes',
  `dtlsenable` varchar(10) DEFAULT 'yes',
  `dtlsfingerprint` varchar(10) DEFAULT 'sha-1',
  `dtlsverify` varchar(50) NOT NULL DEFAULT 'no',
  `dtlscertfile` varchar(255) NOT NULL DEFAULT '/etc/asterisk/keys/TLS.pem',
  `dtlscafile` varchar(255) NOT NULL DEFAULT '/etc/asterisk/keys/fullchain.pem',
  `dtlssetup` varchar(30) NOT NULL DEFAULT 'actpass',
  `rtcp_mux` varchar(10) DEFAULT 'yes',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `name_2` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;


