Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| database:1.0.x [2006/12/14 14:17] – 86.121.147.36 | database:1.0.x [2012/03/22 12:30] (current) – removed spam 80.250.1.245 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== OpenSER 1.0.x Database Table Structure ====== | ||
| + | |||
| + | |||
| + | < | ||
| + | Authors of initial tutorial: | ||
| + | Norman Brandinger | ||
| + | </ | ||
| + | |||
| + | ===== Accounting ===== | ||
| + | |||
| + | This table is used by the ACC module to report on transactions - accounted calls. | ||
| + | |||
| + | More information is available at: http:// | ||
| + | |||
| + | |||
| + | ** Accounting (//acc//) Table ** | ||
| + | < | ||
| + | Column Name | ||
| + | |||
| + | caller_UUID varchar(64) | ||
| + | |||
| + | callee_UUID varchar(64) Callee Unique User ID (not used by OpenSER ?) | ||
| + | |||
| + | sip_from varchar(128) From header field indicates the initiator of the request | ||
| + | |||
| + | sip_to | ||
| + | |||
| + | sip_status varchar(128) Response codes are consistent with, and extend, HTTP/ | ||
| + | | ||
| + | SIP defines a new class, 6xx | ||
| + | |||
| + | sip_method varchar(16) A method is the primary function that a request is meant to | ||
| + | | ||
| + | |||
| + | i_uri | ||
| + | |||
| + | o_uri | ||
| + | |||
| + | from_uri varchar(128) From URI | ||
| + | |||
| + | to_uri | ||
| + | |||
| + | sip_callid varchar(128) Call-ID header field uniquely identifies a particular invitation | ||
| + | or all registrations of a particular client. | ||
| + | |||
| + | username varchar(64) Username / Phone Number | ||
| + | |||
| + | domain | ||
| + | |||
| + | fromtag | ||
| + | | ||
| + | tags, one from participant in the dialog | ||
| + | |||
| + | totag | ||
| + | dialog, which is the combination of the Call-ID along with two | ||
| + | tags, one from participant in the dialog | ||
| + | |||
| + | time datetime | ||
| + | |||
| + | timestamp timestamp(14) | ||
| + | to the UAS | ||
| + | |||
| + | caller_deleted char(1) | ||
| + | |||
| + | callee_deleted char(1) | ||
| + | |||
| + | src_leg | ||
| + | A call leg is another name for a dialog. | ||
| + | |||
| + | dst_leg | ||
| + | call-leg). A call leg is another name for a dialog. | ||
| + | </ | ||
| + | |||
| + | |||
| + | ** Accounting (//acc//) Table Indexes ** | ||
| + | < | ||
| + | Keyname | ||
| + | |||
| + | INDEX: acc_user | ||
| + | |||
| + | KEY: sip_callid | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Active Sessions ===== | ||
| + | |||
| + | This table is used by SERWeb. It is not used by OpenSER. | ||
| + | ** Active Sessions (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | sid | ||
| + | name | ||
| + | val text | ||
| + | changed | ||
| + | </ | ||
| + | |||
| + | ** Active Sessions (// | ||
| + | < | ||
| + | PRIMARY KEY (name, sid) | ||
| + | KEY changed (changed) | ||
| + | </ | ||
| + | |||
| + | ===== Administrative Privileges | ||
| + | |||
| + | Multi-domain SERWeb Access Control List (ACL). It is not used by OpenSER. | ||
| + | |||
| + | ** Administrative Privileges (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | username varchar(64) | ||
| + | domain | ||
| + | priv_name varchar(64) | ||
| + | priv_value varchar(64) | ||
| + | </ | ||
| + | |||
| + | ** Administrative Privileges (// | ||
| + | < | ||
| + | PRIMARY KEY (username, | ||
| + | </ | ||
| + | |||
| + | ===== Aliases ===== | ||
| + | |||
| + | This table is similar to the " | ||
| + | |||
| + | More information is available at: http:// | ||
| + | |||
| + | ** Aliases (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | username varchar(64) | ||
| + | |||
| + | domain | ||
| + | |||
| + | contact | ||
| + | the type of request or response it is in | ||
| + | |||
| + | received varchar(255) | ||
| + | |||
| + | path varchar(255) | ||
| + | |||
| + | expires | ||
| + | |||
| + | q float(10, | ||
| + | |||
| + | callid | ||
| + | all registrations of a particular client. | ||
| + | |||
| + | cseq int(11) | ||
| + | request method | ||
| + | last_modified timestamp(14) | ||
| + | |||
| + | flags | ||
| + | |||
| + | user_agent varchar(255) | ||
| + | the request | ||
| + | |||
| + | socket | ||
| + | |||
| + | methods | ||
| + | </ | ||
| + | |||
| + | ** Aliases (// | ||
| + | < | ||
| + | PRIMARY KEY (username, | ||
| + | INDEX | ||
| + | </ | ||
| + | |||
| + | ===== Database Aliases ===== | ||
| + | This table us used by the alias_db module as an alternative for user aliases via userloc. | ||
| + | |||
| + | More information about the alias_db module can be found at: http:// | ||
| + | |||
| + | ** Database Aliases (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | alias_username varchar(64) | ||
| + | alias_domain varchar(128) | ||
| + | username varchar(64) | ||
| + | domain | ||
| + | </ | ||
| + | |||
| + | ** Database Aliases (// | ||
| + | < | ||
| + | UNIQUE KEY alias_key (alias_username, | ||
| + | INDEX | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Domains ===== | ||
| + | This table is used by the domain module to determine if a host part of a URI is " | ||
| + | |||
| + | More information about the domain module can be found at: http:// | ||
| + | |||
| + | ** Domains (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | domain | ||
| + | last_modified datetime | ||
| + | </ | ||
| + | |||
| + | ** Domains (// | ||
| + | < | ||
| + | PRIMARY KEY (domain) | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Groups ===== | ||
| + | |||
| + | This table us used by the group module as a means of group membership checking. Used primarily for Access Control Lists (ACL' | ||
| + | |||
| + | More information about the group module can be found at: http:// | ||
| + | |||
| + | ** Groups (//grp//) Table ** | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | username varchar(64) | ||
| + | domain | ||
| + | grp varchar(50) | ||
| + | last_modified datetime | ||
| + | </ | ||
| + | |||
| + | ** Groups (//grp//) Indexes ** | ||
| + | < | ||
| + | PRIMARY KEY (username, | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Gateways ===== | ||
| + | This table contains Least Cost Routing Gateway definitions | ||
| + | |||
| + | More information can be found at: http:// | ||
| + | |||
| + | ** Gateways (//gw//) Table ** | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | gw_name | ||
| + | grp_id | ||
| + | ip_addr | ||
| + | port smallint | ||
| + | uri_scheme | ||
| + | transport | ||
| + | strip | ||
| + | prefix | ||
| + | </ | ||
| + | |||
| + | ** Gateways (//gw//) Indexes ** | ||
| + | < | ||
| + | PRIMARY KEY (gw_name) | ||
| + | KEY (grp_id) | ||
| + | </ | ||
| + | |||
| + | ===== Gateway Groups ===== | ||
| + | This table is used for administrative purposes only to associate names with gateway group ids | ||
| + | |||
| + | More information can be found at: http:// | ||
| + | |||
| + | ** Gateway Groups (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | grp_id | ||
| + | grp_name | ||
| + | </ | ||
| + | |||
| + | ===== Least Cost Routing ===== | ||
| + | This table is used by the lcr (Least Cost Routing) rules | ||
| + | |||
| + | More information about the lcr module can be found at: http:// | ||
| + | |||
| + | ** Least Cost Routing (//lcr//) Table ** | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | prefix | ||
| + | from_uri varchar(128) | ||
| + | grp_id | ||
| + | priority tinyint unsigned Priority | ||
| + | </ | ||
| + | |||
| + | ** Least Cost Routing (//lcr//) Indexes ** | ||
| + | < | ||
| + | KEY (prefix) | ||
| + | KEY (from_uri) | ||
| + | KEY (grp_id) | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== User Locations ===== | ||
| + | Persistent user location information | ||
| + | |||
| + | More information can be found at: http:// | ||
| + | |||
| + | ** User Locations (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | username varchar(64) | ||
| + | |||
| + | domain | ||
| + | |||
| + | contact | ||
| + | the type of request or response it is in | ||
| + | |||
| + | received varchar(255) | ||
| + | |||
| + | path varchar(255) | ||
| + | |||
| + | expires | ||
| + | (or content) expires | ||
| + | |||
| + | q float(10, | ||
| + | |||
| + | callid | ||
| + | registrations of a particular client. | ||
| + | |||
| + | cseq int(11) | ||
| + | |||
| + | last_modified timestamp(14) | ||
| + | |||
| + | flags | ||
| + | |||
| + | user_agent varchar(255) | ||
| + | |||
| + | socket | ||
| + | |||
| + | methods | ||
| + | </ | ||
| + | |||
| + | ** User Locations (// | ||
| + | < | ||
| + | PRIMARY KEY (username, | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Missed Calls ===== | ||
| + | acc like table for keeping track of missed calls | ||
| + | |||
| + | **Missed Calls (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | sip_from varchar(128) | ||
| + | |||
| + | sip_to | ||
| + | |||
| + | sip_status varchar(128) | ||
| + | Not all HTTP/1.1 response codes are appropriate. SIP defines a new class, 6xx | ||
| + | |||
| + | sip_method varchar(16) | ||
| + | |||
| + | i_uri | ||
| + | |||
| + | o_uri | ||
| + | |||
| + | from_uri varchar(128) | ||
| + | |||
| + | to_uri | ||
| + | |||
| + | sip_callid varchar(128) | ||
| + | registrations of a particular client. | ||
| + | |||
| + | username varchar(64) | ||
| + | |||
| + | domain | ||
| + | |||
| + | fromtag | ||
| + | the combination of the Call-ID along with two tags, one from participant in the dialog | ||
| + | |||
| + | totag | ||
| + | the combination of the Call-ID along with two tags, one from participant in the dialog | ||
| + | |||
| + | time datetime | ||
| + | |||
| + | timestamp timestamp(14) | ||
| + | |||
| + | src_leg | ||
| + | A call leg is another name for a dialog. | ||
| + | |||
| + | dst_leg | ||
| + | A call leg is another name for a dialog. | ||
| + | </ | ||
| + | |||
| + | ** Missed Calls (// | ||
| + | < | ||
| + | INDEX mc_user (username, domain) | ||
| + | </ | ||
| + | |||
| + | ===== Pending ===== | ||
| + | SerWEB - Not used by OpenSER. | ||
| + | |||
| + | Unconfirmed subscription requests | ||
| + | |||
| + | ** Pending (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | phplib_id | ||
| + | username | ||
| + | domain | ||
| + | password | ||
| + | first_name | ||
| + | last_name | ||
| + | phone | ||
| + | email_address | ||
| + | datetime_created | ||
| + | datetime_modified | ||
| + | confirmation | ||
| + | flag char(1) | ||
| + | sendnotification | ||
| + | greeting | ||
| + | ha1 varchar(128) md5(username: | ||
| + | ha1b varchar(128) md5(username@domain: | ||
| + | allow_find | ||
| + | timezone | ||
| + | rpid varchar(128) The SIP Remote-Party-ID header identifies the calling party and includes user, | ||
| + | | ||
| + | domn int(10) | ||
| + | uuid varchar(64) | ||
| + | </ | ||
| + | |||
| + | ** Pending (// | ||
| + | < | ||
| + | PRIMARY KEY (username, | ||
| + | KEY user_2 (username) | ||
| + | UNIQUE KEY phplib_id (phplib_id) | ||
| + | </ | ||
| + | |||
| + | ===== Phone Book ===== | ||
| + | SERWeb - Not used by OpenSER. User's Phonebook | ||
| + | |||
| + | ** Phone Book (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | id int(10) | ||
| + | username varchar(64) | ||
| + | domain | ||
| + | fname | ||
| + | lname | ||
| + | sip_uri | ||
| + | </ | ||
| + | |||
| + | ** Phone Book (// | ||
| + | < | ||
| + | PRIMARY KEY (id) | ||
| + | </ | ||
| + | |||
| + | ===== Regular Expression Group ===== | ||
| + | This table is used by the group module to check membership based on regular expressions | ||
| + | |||
| + | More information about the group module can be found at: http:// | ||
| + | |||
| + | ** Regular Expression Group (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | reg_exp | ||
| + | group_id int(11) | ||
| + | </ | ||
| + | |||
| + | ** Regular Expression Group (// | ||
| + | < | ||
| + | UNIQUE KEY reg_exp (reg_exp) | ||
| + | </ | ||
| + | |||
| + | ===== Server Monitoring ===== | ||
| + | SERWeb - Not used by OpenSER | ||
| + | |||
| + | ** Server Monitoring (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | time | ||
| + | id | ||
| + | param | ||
| + | value | ||
| + | increment int(10) | ||
| + | </ | ||
| + | |||
| + | ** Server Monitoring (// | ||
| + | < | ||
| + | PRIMARY KEY (id, param) | ||
| + | </ | ||
| + | |||
| + | ===== Server Monitoring ===== | ||
| + | SERWeb - Not used by OpenSER | ||
| + | |||
| + | ** Server Monitoring (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | param | ||
| + | s_value | ||
| + | s_increment | ||
| + | last_aggregated_increment | ||
| + | av | ||
| + | mv | ||
| + | ad | ||
| + | lv | ||
| + | min_val | ||
| + | max_val | ||
| + | min_inc | ||
| + | max_inc | ||
| + | lastupdate | ||
| + | </ | ||
| + | |||
| + | ** Server Monitoring (// | ||
| + | < | ||
| + | PRIMARY KEY (param) | ||
| + | </ | ||
| + | |||
| + | ===== Offline Message Storage ===== | ||
| + | This table us used by the msilo module to provide offline message storage | ||
| + | |||
| + | More information about the msilo module can be found at: http:// | ||
| + | |||
| + | ** Offline Message Storage (//silo//) Table ** | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | mid integer | ||
| + | src_addr varchar(255) | ||
| + | dst_addr varchar(255) | ||
| + | r_uri | ||
| + | username varchar(64) | ||
| + | domain | ||
| + | inc_time integer | ||
| + | exp_time integer | ||
| + | snd_time integer | ||
| + | ctype | ||
| + | body blob Body of the message | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Speed Dial===== | ||
| + | This table is used by the speeddial module to provide on-server speed dial facilities | ||
| + | |||
| + | More information about the speeddial module can be found at: http:// | ||
| + | |||
| + | ** Speed Dial (// | ||
| + | < | ||
| + | Column Name | ||
| + | |||
| + | uuid varchar(64) Unique User ID | ||
| + | username varchar(64) Username / Phone Number | ||
| + | domain | ||
| + | sd_username varchar(64) Speed Dial Username | ||
| + | sd_domain varchar(128) Speed Dial Domain | ||
| + | new_uri | ||
| + | fname | ||
| + | lname | ||
| + | description varchar(64) Description | ||
| + | </ | ||
| + | |||
| + | ** Speed Dial (// | ||
| + | < | ||
| + | PRIMARY KEY (username, | ||
| + | </ | ||
| + | |||
| + | ===== Subscriber ===== | ||
| + | This table is used to provide authentication information | ||
| + | |||
| + | More information about the speeddial module can be found at: http:// | ||
| + | |||
| + | ** Subscriber (// | ||
| + | < | ||
| + | Column Name | ||
| + | |||
| + | phplib_id | ||
| + | username | ||
| + | domain | ||
| + | password | ||
| + | first_name | ||
| + | last_name | ||
| + | phone | ||
| + | email_address | ||
| + | datetime_created datetime Date / Time this record was created | ||
| + | datetime_modified datetime Date / Time this record was last modified | ||
| + | confirmation | ||
| + | flag char(1) | ||
| + | sendnotification varchar(50) | ||
| + | greeting | ||
| + | ha1 varchar(128) md5(username: | ||
| + | ha1b varchar(128) md5(username@domain: | ||
| + | allow_find | ||
| + | timezone | ||
| + | rpid varchar(128) The SIP Remote-Party-ID header identifies the calling party | ||
| + | and includes user, party, screen and privacy headers that specify | ||
| + | how a call is presented and screened. | ||
| + | domn int(10) | ||
| + | uuid varchar(64) Unique User ID | ||
| + | </ | ||
| + | |||
| + | ** Subscriber (// | ||
| + | < | ||
| + | UNIQUE KEY phplib_id (phplib_id) | ||
| + | PRIMARY KEY (username, | ||
| + | KEY user_2 (username) | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Trusted ===== | ||
| + | This table is used by the permissions module to determine if a call has the appropriate permission to be established | ||
| + | |||
| + | More information about the permissions module can be found at: http:// | ||
| + | |||
| + | ** Trusted (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | src_ip | ||
| + | |||
| + | proto | ||
| + | Possible values that can be stored are " | ||
| + | |||
| + | from_pattern varchar(64) regular expression matches From URI of request | ||
| + | </ | ||
| + | |||
| + | ** Trusted (// | ||
| + | < | ||
| + | PRIMARY KEY (src_ip, | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== URI ===== | ||
| + | |||
| + | This table is used by uri_db module to implement various SIP URI checks. | ||
| + | |||
| + | A configuration parm: modparam(" | ||
| + | |||
| + | More information about the uri_db module can be found at: http:// | ||
| + | |||
| + | ** URI (//uri//) Table ** | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | username varchar(64) | ||
| + | domain | ||
| + | uri_user varchar(50) | ||
| + | last_modified datetime | ||
| + | </ | ||
| + | |||
| + | |||
| + | ** URI (//uri//) Indexes ** | ||
| + | < | ||
| + | PRIMARY KEY (username, | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== User Preferences ===== | ||
| + | This table us used by the avpops module to implement Attribute Value Pairs (AVP' | ||
| + | |||
| + | More information about the avpops module can be found at: http:// | ||
| + | |||
| + | ** User Preferences (// | ||
| + | < | ||
| + | Column Name | ||
| + | |||
| + | uuid varchar(64) Unique User ID | ||
| + | username varchar(100) Username / Phone Number | ||
| + | domain | ||
| + | attribute varchar(32) AVP Attribute | ||
| + | type int(11) | ||
| + | value | ||
| + | modified timestamp(14) Date/ | ||
| + | </ | ||
| + | |||
| + | ** User Preferences (// | ||
| + | < | ||
| + | PRIMARY KEY (uuid, username, domain, attribute, type,v alue) | ||
| + | INDEX | ||
| + | INDEX | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== User Preference Types ===== | ||
| + | ** User Preference Types (// | ||
| + | < | ||
| + | Column Name Column Attribute Column Description | ||
| + | |||
| + | att_name varchar(32) | ||
| + | att_rich_type varchar(32) | ||
| + | att_raw_type int | ||
| + | att_type_spec text | ||
| + | default_value varchar(100) | ||
| + | </ | ||
| + | |||
| + | ** User Preference Types (// | ||
| + | < | ||
| + | PRIMARY KEY (att_name) | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== Table Versions ===== | ||
| + | This table contains OpenSER table names and version numbers. It is used by various OpenSER routines to ensure that the correct version of a particular table is being used. | ||
| + | |||
| + | ** Table Versions (// | ||
| + | < | ||
| + | Column Name | ||
| + | |||
| + | table_name varchar(64) | ||
| + | table_version smallint(5) | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Database Structure Stuff ===== | ||
| + | |||
| + | {{indexmenu> | ||