/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;

--
-- Table structure for table `apikeys`
--

CREATE TABLE `apikeys` (
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `host` varchar(64) NOT NULL,
  `apikey` varchar(128) NOT NULL,
  PRIMARY KEY  (`apikey`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `authorizations`
--

CREATE TABLE `authorizations` (
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `authid` varchar(255) NOT NULL,
  `type` varchar(16) NOT NULL,
  `access_level` int(11) NOT NULL,
  PRIMARY KEY  (`authid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `number_pool`
--

CREATE TABLE `number_pool` (
  `id` int(11) NOT NULL auto_increment,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `number` varchar(128) character set utf8 NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `phones`
--

CREATE TABLE `phones` (
  `id` int(11) NOT NULL auto_increment,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `mac` varchar(32) character set utf8 NOT NULL,
  `user_rel` int(11) NOT NULL,
  `ua_type` int(11) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

--
-- Table structure for table `servers`
--

CREATE TABLE `servers` (
  `id` int(11) NOT NULL auto_increment,
  `domain` varchar(255) character set utf8 NOT NULL,
  `registrar` varchar(255) character set utf8 default NULL,
  `r_port` int(11) default NULL,
  `proxy` varchar(255) character set utf8 default NULL,
  `p_port` int(11) default NULL,
  `prov_url` text,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

--
-- Table structure for table `sessionkeys`
--

CREATE TABLE `sessionkeys` (
  `sessid` varchar(255) NOT NULL,
  `session` varchar(128) NOT NULL,
  `authid` varchar(128) NOT NULL,
  `client` varchar(255) NOT NULL,
  `key` varchar(128) NOT NULL,
  `last` datetime default NULL,
  PRIMARY KEY  (`session`,`authid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL auto_increment,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `username` varchar(128) character set utf8 NOT NULL,
  `password` varchar(128) character set utf8 NOT NULL,
  `displayname` varchar(255) character set utf8 NOT NULL,
  `domain` varchar(255) character set utf8 NOT NULL,
  `registrar` varchar(255) character set utf8 default NULL,
  `r_port` int(11) default NULL,
  `proxy` varchar(255) character set utf8 default NULL,
  `p_port` int(11) default NULL,
  `authid` varchar(128) character set utf8 default NULL,
  `dialplan` varchar(255) character set utf8 default NULL,
  `linetext` varchar(64) character set utf8 default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

SET character_set_client = @saved_cs_client;

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
