Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| presence:database-tables [2007/03/02 17:45] – 81.180.83.75 | presence:database-tables [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Database Tables for Presence Module ====== | ||
| + | ==== presentity ==== | ||
| + | |||
| + | The table is used for storing PUBLISH messages information. | ||
| + | |||
| + | |||
| + | ^Keys | ||
| + | |username | ||
| + | |domain | ||
| + | |event | ||
| + | |etag | | ||
| + | |expires | ||
| + | |received_time | int | ||
| + | |body | | ||
| + | < | ||
| + | CREATE TABLE `presentity` ( | ||
| + | `username` varchar(64) NOT NULL, | ||
| + | `domain` varchar(124) NOT NULL, | ||
| + | `event` varchar(64) NOT NULL, | ||
| + | `etag` varchar(64) NOT NULL, | ||
| + | `expires` int(11) NOT NULL, | ||
| + | `received_time` int(11) NOT NULL, | ||
| + | `body` text NOT NULL, | ||
| + | PRIMARY KEY (`username`, | ||
| + | ) ENGINE=MyISAM; | ||
| + | </ | ||
| + | |||
| + | ==== active-watchers ==== | ||
| + | |||
| + | The table is used for storing the information about the dialog initiated by a Subscribe request, used for sending Notify with presence or presence.winfo information. | ||
| + | The to and from from the names of the columns have the same meaning as in the Subscribe | ||
| + | |||
| + | ^Keys | ||
| + | | to_user | ||
| + | | to_domain| varchar(124)| | ||
| + | | from_user| varchar(64) | | the subscriber' | ||
| + | | from_domain| varchar(124)| | ||
| + | | event | varchar(64) | | it can be either " | ||
| + | | event_id|varchar(128)| | ||
| + | | from_tag| varchar(128)| | ||
| + | | to_tag| varchar(128)| | ||
| + | | callid| varchar(128)| | ||
| + | | cseq | int | ||
| + | | contact| varchar(128)| | ||
| + | |record_route| varchar(255)| | ||
| + | | expires| int | |the time at which the subscription expires - Expires header field value + time() | | ||
| + | |staus | ||
| + | |version | int | |used for sending Notify for presence.winfo events ; incremented each time a new Notify is sent | | ||
| + | |||
| + | < | ||
| + | CREATE TABLE `active_watchers` ( | ||
| + | `to_user` varchar(64) NOT NULL, | ||
| + | `to_domain` varchar(128) NOT NULL, | ||
| + | `from_user` varchar(64) NOT NULL, | ||
| + | `from_domain` varchar(128) NOT NULL, | ||
| + | `event` varchar(64) NOT NULL default ' | ||
| + | `event_id` varchar(64), | ||
| + | `to_tag` varchar(128) NOT NULL, | ||
| + | `from_tag` varchar(128) NOT NULL, | ||
| + | `callid` varchar(128) NOT NULL, | ||
| + | `cseq` int(11) NOT NULL, | ||
| + | `contact` varchar(128) NOT NULL, | ||
| + | `record_route` varchar(255), | ||
| + | `expires` int(11) NOT NULL, | ||
| + | `status` varchar(32) NOT NULL default ' | ||
| + | `version` int(11) default ' | ||
| + | PRIMARY KEY (`from_tag`) | ||
| + | ) ENGINE=MyISAM; | ||
| + | </ | ||
| + | |||
| + | ==== xcap_xml ==== | ||
| + | |||
| + | The table is used for storing xcap files containing authorization information. | ||
| + | |||
| + | ^Keys | ||
| + | | username | ||
| + | | domain | ||
| + | | xcap | | ||
| + | | doc_type | ||
| + | |||
| + | < | ||
| + | CREATE TABLE `xcap_xml` ( | ||
| + | `username` varchar(64) NOT NULL, | ||
| + | `domain` varchar(128) NOT NULL, | ||
| + | `xcap` text NOT NULL, | ||
| + | `doc_type` int NOT NULL, | ||
| + | PRIMARY KEY (`username`, | ||
| + | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
| + | </ | ||
| + | |||
| + | - doc_type can have one of the following values: | ||
| + | 1 - presence_rules; | ||
| + | 2 - resource-list; | ||
| + | 3 - rls-services; | ||
| + | |||
| + | ==== watchers ==== | ||
| + | |||
| + | This table is used for storing informations about acceptance for Subscribe messages for presence. The subscription state when sending a new notify is take from this table if it exists. Otherwise it takes a default value which is: ' | ||
| + | |||
| + | ^Keys | ||
| + | |p_user | ||
| + | |p_domain | ||
| + | |w_user | ||
| + | |w_domain | ||
| + | |subs_status | ||
| + | |reason | ||
| + | |inserted_time | int(11)| | ||
| + | < | ||
| + | CREATE TABLE `watchers` ( | ||
| + | `p_user` varchar(64) NOT NULL, | ||
| + | `p_domain` varchar(128) NOT NULL, | ||
| + | `w_user` varchar(64) NOT NULL, | ||
| + | `w_domain` varchar(128) NOT NULL, | ||
| + | `subs_status` varchar(64) NOT NULL, | ||
| + | `reason` varchar(64), | ||
| + | `inserted_time` int(11) NOT NULL, | ||
| + | PRIMARY KEY (`p_user`, | ||
| + | ) ENGINE=MyISAM; | ||
| + | </ | ||
| + | |||
| + | ===== Presence-Related Stuff ===== | ||
| + | |||
| + | {{indexmenu> | ||