Skip to content

DB schema

This table is used by the ACC module to report on transactions - accounted calls. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/acc.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
methodstring16noA method is the primary function that a request is meant to invoke on a server.
from_tagstring64noThe tag parameter serves as a general mechanism to identify a dialog, which is the combination of the Call-ID along with two tags, one from participant in the dialog.
to_tagstring64noThe tag parameter serves as a general mechanism to identify a dialog, which is the combination of the Call-ID along with two tags, one from participant in the dialog.
callidstring64noCall-ID header field uniquely identifies a particular invitation or all registrations of a particular client.
sip_codestring3noSIP reply code
sip_reasonstring32noSIP reply reason
timedatetimenot specifieddefaultnoDate and time when this record was written.
durationunsigned int110noCall duration (from 200OK INVITE to BYE request) - this filed is populated only if CDR support is enabled in ACC module (see cdr_flag parameter)
setuptimeunsigned int110noCall initialization duration - (from INVITE request to 200 OK INVITE) - this filed is populated only if CDR support is enabled in ACC module (see cdr_flag parameter)
createddatetimenot specifiedNULLyesThe call creation date and time.

Indexes

nametypelinksdescription
callid_idxdefaultcallid

This table is used by the ACC module for keeping track of missed calls. This table is similar to the ‘acc’ table. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/acc.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
methodstring16noA method is the primary function that a request is meant to invoke on a server.
from_tagstring64noThe tag parameter serves as a general mechanism to identify a dialog, which is the combination of the Call-ID along with two tags, one from participant in the dialog.
to_tagstring64noThe tag parameter serves as a general mechanism to identify a dialog, which is the combination of the Call-ID along with two tags, one from participant in the dialog.
callidstring64noCall-ID header field uniquely identifies a particular invitation or all registrations of a particular client.
sip_codestring3noSIP reply code
sip_reasonstring32noSIP reply reason
timedatetimenot specifieddefaultnoDate and time when this record was written.

Indexes

nametypelinksdescription
callid_idxdefaultcallid

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://www.opensips.org/html/docs/modules/1.11.x/alias_db.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
alias_usernamestring64noAlias username / phone number
alias_domainstring64noAlias domain name
usernamestring64noUsername / phone number
domainstring64noDomain name

Indexes

nametypelinksdescription
alias_idxuniquealias_username, alias_domain
target_idxdefaultusername, domain

This table is used to provide authentication information. More information about the auth_db module can be found at: http://www.opensips.org/html/docs/modules/1.11.x/auth_db.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
usernamestring64noUsername / phone number
domainstring64noDomain name
passwordstring25noPassword
email_addressstring64noEmail address
ha1string64nomd5(username:realm:password)
ha1bstring64nomd5(username@domain:realm:password)
rpidstring64NULLyesThe 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.

Indexes

nametypelinksdescription
account_idxuniqueusername, domain
username_idxdefaultusername

This table us used by the avpops module to implement Attribute Value Pairs (AVP’s). More information about the avpops module can be found at: http://www.opensips.org/html/docs/modules/1.11.x/avpops.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
uuidstring64noUnique user ID
usernamestring1280noUsername / phone number
domainstring64noDomain name
attributestring32noAVP attribute
typeint110noAVP type
valuestring128noAVP value
last_modifieddatetimenot specified’1900-01-01 00:00:01’noDate and time when this record was last modified.

Indexes

nametypelinksdescription
ua_idxdefaultuuid, attribute
uda_idxdefaultusername, domain, attribute
value_idxdefaultvalue

Table for the b2b_entities module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/b2b_entities.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
typeint2defaultnoEntity type: 0-server, 1-client
stateint2defaultnoDialog state
ruristring128defaultyesRURI(stored only for server entities to correctly match CANCEL)
from_uristring128defaultnoFrom URI
to_uristring128defaultnoTo URI
from_dnamestring64defaultyesFrom display name
to_dnamestring64defaultyesTo display name
tag0string64defaultnoTO tag
tag1string64defaultyesFrom tag
callidstring64defaultnoCall ID
cseq0int11defaultnoCseq0
cseq1int11defaultyesCseq1
contact0string128defaultnoContact0
contact1string128defaultyesContact1
route0textnot specifieddefaultyesRecord route 0
route1textnot specifieddefaultyesRecord route 1
sockinfo_srvstring64defaultyesSocket Info
paramstring128defaultnoLogic parameter
lmint11defaultnoLast method
lrcint11defaultyesLast reply code
licint11defaultyesLast invite cseq
leg_cseqint11defaultyesLeg cseq
leg_routetextnot specifieddefaultyesLeg route
leg_tagstring64defaultyesLeg tag
leg_contactstring128defaultyesLeg contact
leg_sockinfostring128defaultyesLeg sockinfo

Indexes

nametypelinksdescription
b2b_entities_idxuniquetype, tag0, tag1, callid
b2b_entities_paramdefaultparam

Table for the b2b_logic module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/b2b_logic.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
si_keystring64defaultnoScenario instantiation key
scenariostring64defaultnoScenario id
sstateint2defaultnoScenario State
next_sstateint2defaultnoNext Scenario State
sparam0string64defaultyesScenario id
sparam1string64defaultyesScenario id
sparam2string64defaultyesScenario id
sparam3string64defaultyesScenario id
sparam4string64defaultyesScenario id
sdptext64defaultyesScenario id
lifetimeint100noLifetime
e1_typeint2defaultnoE1 type
e1_sidstring64defaultnoE1 Scenario ID
e1_fromstring128defaultnoE1 From URI
e1_tostring128defaultnoE1 To URI
e1_keystring64defaultnoE1 Key
e2_typeint2defaultnoE2 type
e2_sidstring64defaultnoE2 Scenario ID
e2_fromstring128defaultnoE2 From URI
e2_tostring128defaultnoE2 To URI
e2_keystring64defaultnoE2 Key
e3_typeint2defaultyesE3 type
e3_sidstring64defaultyesE3 Scenario ID
e3_fromstring128defaultyesE3 From URI
e3_tostring128defaultyesE3 To URI
e3_keystring64defaultyesE3 Key

Indexes

nametypelinksdescription
b2b_logic_idxuniquesi_key

Persistent sca information for the b2b_sca module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/b2b_sca.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
shared_linestring64defaultnoThe shared line.
watchersstring255defaultnoThe URI list of watchers
app1_shared_entityunsigned int1NULLyesThe entity to keep.
app1_call_stateunsigned int1NULLyesThe state of the appearance index.
app1_call_info_uristring128NULLyesThe URI of the Call-Info header
app1_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app1_b2bl_keystring64NULLyesThe b2b_logic key.
app2_shared_entityunsigned int1NULLyesThe entity to keep.
app2_call_stateunsigned int1NULLyesThe state of the appearance index.
app2_call_info_uristring128NULLyesThe URI of the Call-Info header
app2_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app2_b2bl_keystring64NULLyesThe b2b_logic key.
app3_shared_entityunsigned int1NULLyesThe entity to keep.
app3_call_stateunsigned int1NULLyesThe state of the appearance index.
app3_call_info_uristring128NULLyesThe URI of the Call-Info header
app3_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app3_b2bl_keystring64NULLyesThe b2b_logic key.
app4_shared_entityunsigned int1NULLyesThe entity to keep.
app4_call_stateunsigned int1NULLyesThe state of the appearance index.
app4_call_info_uristring128NULLyesThe URI of the Call-Info header
app4_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app4_b2bl_keystring64NULLyesThe b2b_logic key.
app5_shared_entityunsigned int1NULLyesThe entity to keep.
app5_call_stateunsigned int1NULLyesThe state of the appearance index.
app5_call_info_uristring128NULLyesThe URI of the Call-Info header
app5_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app5_b2bl_keystring64NULLyesThe b2b_logic key.
app6_shared_entityunsigned int1NULLyesThe entity to keep.
app6_call_stateunsigned int1NULLyesThe state of the appearance index.
app6_call_info_uristring128NULLyesThe URI of the Call-Info header
app6_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app6_b2bl_keystring64NULLyesThe b2b_logic key.
app7_shared_entityunsigned int1NULLyesThe entity to keep.
app7_call_stateunsigned int1NULLyesThe state of the appearance index.
app7_call_info_uristring128NULLyesThe URI of the Call-Info header
app7_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app7_b2bl_keystring64NULLyesThe b2b_logic key.
app8_shared_entityunsigned int1NULLyesThe entity to keep.
app8_call_stateunsigned int1NULLyesThe state of the appearance index.
app8_call_info_uristring128NULLyesThe URI of the Call-Info header
app8_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app8_b2bl_keystring64NULLyesThe b2b_logic key.
app9_shared_entityunsigned int1NULLyesThe entity to keep.
app9_call_stateunsigned int1NULLyesThe state of the appearance index.
app9_call_info_uristring128NULLyesThe URI of the Call-Info header
app9_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app9_b2bl_keystring64NULLyesThe b2b_logic key.
app10_shared_entityunsigned int1NULLyesThe entity to keep.
app10_call_stateunsigned int1NULLyesThe state of the appearance index.
app10_call_info_uristring128NULLyesThe URI of the Call-Info header
app10_call_info_appearance_uristring128NULLyesThe URI of the appearance in Call-Info header
app10_b2bl_keystring64NULLyesThe b2b_logic key.

Indexes

nametypelinksdescription
sca_idxuniqueshared_line

DB implementation of the CacheDB interface: http://www.opensips.org/html/docs/modules/1.11.x/cachedb_sql.html

nametypesizedefaultnulldescriptionkeyextra attributes
keynamestring255defaultnoThe Keyprimary
valuetext512defaultnoThe value
counterint100noThe value of the counter
expiresunsigned int100noThe unix timestamp when the key will expires

This table is used by the Call Center module to store the definition of the call queues / flows. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/call_center.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoFlow unique ID in DBprimaryautoincrement
flowidstring64defaultnoThe unique ID of the flow in the Call Center module - to be used to identify the flow/queue in the module and from outside the module; It is an alphanumerical string.
priorityunsigned int11256noThe priority of the flow (in relation to the other flows); 0 is maximum priority and calls for this flow will be processed first all the time.
skillstring64defaultnoThe skill required from an agent in order to receive calls from this flow/queue.
prependcidstring32defaultnoAphanumerical prefix to be added to the caller displayname when sending calls from this flow to agents (so agent - serving muliple flows - can see what was the flow the call was received on.
message_welcomestring128NULLyesSIP URI point to a media server; this is used for playing the welcome message for this flow.
message_queuestring128defaultnoSIP URI point to a media server; this is used for playing the onhold message for this flow. IMPORTANT - this message must cycle and media server must never hung up on it.

Indexes

nametypelinksdescription
unique_flowiduniqueflowid

This table is used by the Call Center module to store the definition of the agents serving the flows/queues. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/call_center.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoAgent unique ID in DBprimaryautoincrement
agentidstring128defaultnoThe unique ID of the agent in the Call Center module - to be used to identify the agent in the module and from outside the module; It is an alphanumerical string.
locationstring128defaultnoSIP URI point to the agent location; All calls for this agents will be sent to this SIP address.
logstateunsigned int100noThe login state of the agent; 0 - not logged in; 1 - logged in ; Agent will start receiving calls only if logged in.
skillsstring255defaultnoComma separated list of skills offered by the agent; these skills must match the skills used in the queues/flows definition; In order to receive calls from a flow, the agent must have the skill required by that flow.
last_call_endint110noThe timestamp of the last call of an agent. If different than 0, the agent will only receive calls after wrapup seconds pass after this timestamp.

Indexes

nametypelinksdescription
unique_agentiduniqueagentid

This table is used by the Call Center module to store the Call Data Records (CDRs) for all the handled calls. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/call_center.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoCDR unique ID in DBprimaryautoincrement
callerstring64defaultnoThe SIP URI identifing the caller.
received_timestampdatetimenot specifieddefaultnoWhen the call was received.
wait_timeunsigned int110noTime (in seconds) spent by the call in queue (onhold).
pickup_timeunsigned int110noTime (in seconds) spent by the call in ringing to the agent.
talk_timeunsigned int110noThe duration (in seconds) of the call.
flow_idstring128defaultnoThe ID of the flow the call was received on.
agent_idstring128NULLyesThe ID of the agent who picked this call (if any).
call_typeint11-1noType of call: -2 - call rejected by agent; -1 - call dropped because of internal error; 0 - call handled by agent; 1 - call dropped while in queue;
rejectedunsigned int110noHow many times the call was rejected by agents (agent not answering his phone).
fstatsunsigned int110noBitmask of the following binary flags: 0 - it is inbound call; 1 - call was distributed to agents; 2 - call was answered; 3 - call was abandoned.
cidunsigned int110yesSequence number of the call.

This table is used by the Call Center module to store ongoing calls for restart persitancy. It consists only of runtime data and should not be manually provisioned. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/call_center.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique ID of the call.autoincrement
stateint11defaultnoThe state of the call.
ig_cbackint11defaultnoIndicates if the call should be ignored.
no_rejint11defaultnoIndicates whether the call can be rejected or not.
setup_timeint11defaultnoStores the call setup time.
etaint11defaultnoThe estimated wait time for a call until it is answered by an agent.
last_startint11defaultnoStores the timestamp when the last call has started.
recv_timeint11defaultnoStores the timestamp when the call was received by the call center.
caller_dnstring128defaultnoCaller Display Name.
caller_unstring128defaultnoCaller User Name.
b2buaidstring128noThe B2B id internally used by the B2B module to identify the call.primary
flowstring128defaultnoThe flow/queue this call belongs to.
agentstring128defaultnoThe agent that handles the call.

Indexes

nametypelinksdescription
unique_iduniqueid

This table is used by the carrierroute module to provides routing, balancing and blacklisting capabilities. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/carrierroute.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
carrierunsigned int100noThis column contains the carrier id.
domainstring64noThis column contains the route domain. Additional domains could be used for example as fallback.
scan_prefixstring64noThis column contains the scan prefix, which define the matching portion of a phone number.
flagsunsigned int110noThis column contains the flags used for rule matching.
maskunsigned int110noThis column contains the mask that is applied to the message flags before rule matching.
probfloatnot specified0noName of column containing the probability. The probability value is used to distribute the traffic between several gateways.
stripunsigned int110noName of the column containing the number of digits to be stripped of the userpart of an URI before prepending rewrite_prefix.
rewrite_hoststring128noName of column containing rewrite prefixes. Here you can define a rewrite prefix for the localpart of the SIP URI.
rewrite_prefixstring64noRewrite prefix for the localpart of the SIP URI.
rewrite_suffixstring64noRewrite suffix for the localpart of the SIP URI.
descriptionstring255NULLyesA comment for the route entry, useful for larger routing tables.

This table is used by the carrierroute module to provide failure routing capabilities. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/carrierroute.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
carrierunsigned int100noThis column contains the carrier id.
domainstring64noThis column contains the route domain. Additional domains could be used for example as fallback.
scan_prefixstring64noThis column contains the scan prefix, which define the matching portion of a phone number.
host_namestring128noThis column contains the routing destination used for rule matching.
reply_codestring3noThis column contains the reply code used for rule matching.
flagsunsigned int110noThis column contains the flags used for rule matching.
maskunsigned int110noThis column contains the mask that is applied to the message flags before rule matching.
next_domainstring64noThis column contains the route domain that should be used for the next routing attempt.
descriptionstring255NULLyesA comment for the route entry, useful for larger routing tables.

This table is used by the carrierroute module to provides routing, balancing and blacklisting capabilities. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/carrierroute.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
carrierstring64NULLyesThis column contains the carrier name.

This table is used by the closeddial module to provide closed dial functionality for groups of usernames; This is a functionality similar to a Centrex. More information about the closeddial module can be found at: http://www.opensips.org/html/docs/modules/1.11.x/closeddial.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
usernamestring64noUsername / phone number
domainstring64noDomain name
cd_usernamestring64noClosed dial username
cd_domainstring64noClosed dial domain
group_idstring64noAttribute use to group usernames
new_uristring128noNew URI

Indexes

nametypelinksdescription
cd_idx1uniqueusername, domain, cd_domain, cd_username, group_id
cd_idx2defaultgroup_id
cd_idx3defaultcd_username
cd_idx4defaultusername

Table for the call processing language “cpl” module. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/cpl-c.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
usernamestring64defaultno
domainstring64no
cpl_xmltextnot specifieddefaultyes
cpl_bintextnot specifieddefaultyes

Indexes

nametypelinksdescription
account_idxuniqueusername, domain

Persistent dialog information for the dialog module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/dialog.html

nametypesizedefaultnulldescriptionkeyextra attributes
dlg_idunsigned long10defaultnoh_entry | h_idprimary
callidstring255defaultnoCall-ID of the dialog
from_uristring128defaultnoThe URI of the FROM header (as per INVITE)
from_tagstring64defaultnoThe tag parameter serves as a general mechanism to identify a dialog, which is the combination of the Call-ID along with two tags, one from participant in the dialog.
to_uristring128defaultnoThe URI of the TO header (as per INVITE)
to_tagstring64defaultnoThe tag parameter serves as a general mechanism to identify a dialog, which is the combination of the Call-ID along with two tags, one from participant in the dialog.
mangled_from_uristring64NULLyesThe mangled from URI, in case uac_replace_from was called for this dialog.
mangled_to_uristring64NULLyesThe mangled to URI, in case uac_replace_to was called for this dialog
caller_cseqstring11defaultnoLast Cseq number on the caller side.
callee_cseqstring11defaultnoLast Cseq number on the callee side.
caller_ping_csequnsigned int11defaultnoLast Cseq number of pings generated on caller side.
callee_ping_csequnsigned int11defaultnoLast Cseq number of pings generated on callee side.
caller_route_settext512defaultyesRoute set on the caller side.
callee_route_settext512defaultyesRoute set on on the caller side.
caller_contactstring128defaultyesCaller’s contact uri.
callee_contactstring128defaultyesCallee’s contact uri.
caller_sockstring64defaultnoLocal socket used to communicate with caller
callee_sockstring64defaultnoLocal socket used to communicate with callee
stateunsigned int10defaultnoThe state of the dialog.
start_timeunsigned int10defaultnoThe timestamp (unix time) when the dialog was confirmed.
timeoutunsigned int10defaultnoThe timestamp (unix time) when the dialog will expire.
varsbinary4096NULLyesVariables attached to this dialog.
profilestext512NULLyesProfiles this dialog belongs to.
script_flagsunsigned int100noScript flags for the dialog.
flagsunsigned int100noInternal flags used by the module.

This table is used by the dialplan module for the translation rules. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/dialplan.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
dpidint11defaultnoDialplan ID.
print11defaultnoPriority of rule.
match_opint11defaultnoMatching operator for rule (0-equal, 1-regexp).
match_expstring64defaultnoMatching expresion (regexp or string).
match_flagsint11defaultnoMatching flags (0-case sensitive, 1-case insensitive).
subst_expstring64defaultyesSubstitution expression.
repl_expstring32defaultyesReplacement expression (sed like).
disabledint110noSpecifies if the command can be used, or is disabled.
attrsstring32defaultyesGeneral attributes string to be returned in case of rule matching.

This table is used by the dispatcher module. It contains the sets of destinations used for load balancing and dispatching. More information about the dispatcher module can be found at: http://www.opensips.org/html/docs/modules/1.11.x/dispatcher.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
setidintnot specified0noDestination set id
destinationstring192noDestination SIP address
socketstring128NULLyesLocal Socket to be used when sending requests (traffic and probes) to the destination - must be an listener configured in opensips.
stateintnot specified0noThe state of the destination (0 enabled, 1 disabled , 2 probing)
weightintnot specified1noThe weight of the destination
attrsstring128noAttribute string - custom, opaque string that will be pushed into script when this destination will be selected
descriptionstring64noDescription for this destination

This table is used by the domain module to determine if a host part of a URI is “local” or not. More information about the domain module can be found at: http://www.opensips.org/html/docs/modules/1.11.x/domain.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
domainstring64noDomain name
last_modifieddatetimenot specified’1900-01-01 00:00:01’noDate and time when this record was last modified.

Indexes

nametypelinksdescription
domain_idxuniquedomain

Table for the domainpolicy module. More information at http://www.opensips.org/html/docs/modules/1.11.x/domainpolicy.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
rulestring255defaultnoDomain policy rule name which is equal to the URI as published in the domain policy NAPTRs.
typestring255defaultnoDomain policy rule type. In the case of federation names, this is “fed”. For standard referrals according to draft-lendl-speermint-technical-policy-00, this is “std”. For direct domain lookups, this is “dom”. Default value is “type”.
attstring255defaultyesIt contains the AVP’s name. If the rule stored in this row triggers, than dp_can_connect() will add an AVP with that name.
valstring128defaultyesIt contains the values for AVPs created by dp_can_connect(). Default value is “val”
descriptionstring255defaultnoComment about the rule

Indexes

nametypelinksdescription
rav_idxuniquerule, att, val
rule_idxdefaultrule

This table is used by the Dynamic Routing module to store information about the destinations/gateways where to route calls. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/drouting.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoTable primary key, not used by moduleprimaryautoincrement
gwidstring64defaultnoGW unique ID - used to link the GW from the routing rules
typeunsigned int110noType/class of the GW (user defined)
addressstring128defaultnoGW/destination address as name/IP[:port]
stripunsigned int110noNumber of digits to be striped out for the begining of the username when using this GW/destination
pri_prefixstring16NULLyesString to prefix the username of RURI when using this GW/destination
attrsstring255NULLyesGeneric string describing GW attributes - this string is to be interpreted from the script
probe_modeunsigned int110no0- No probing; 1-Probe on disable only ; 2-Always probe;
stateunsigned int110noState of the gateway: 0 - enabled; 1 - permanent disabled; 2 - temporary disabled (probing)
socketstring128NULLyesLocal Socket to be used when sending requests (traffic and probes) to the destination - must be an listener configured in opensips.
descriptionstring128noText description of the GW/destination

Indexes

nametypelinksdescription
dr_gw_idxuniquegwid

This table is used by the Dynamic Routing module to store information about the routing rules. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/drouting.html.

nametypesizedefaultnulldescriptionkeyextra attributes
ruleidunsigned int10defaultnoRule unique IDprimaryautoincrement
groupidstring255defaultnoThe ID(s) of the routing group(s) this rule is to be used for - comma separeted list of numerical Ids
prefixstring64defaultnoNumerical prefix to match this rule
timerecstring255defaultnoTime recurrence used for matching this rule.
priorityint110noPriority of this rule (among rules with same prefix and timerec).
routeidstring255NULLyesRoute block (from cfg script) to be called when rule matches.
gwliststring255defaultnoReference to the GWs/destinations to be used when rule matches.
attrsstring255NULLyesGeneric string describing RULE attributes - this string is to be interpreted from the script
descriptionstring128noText description of the rule

This table is used by the Dynamic Routing module to define carriers (a carrier is defined by a list of gateways and an ordering rule). More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/drouting.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoTable key, not used by moduleprimaryautoincrement
carrieridstring64defaultnoUnique ID of the carrier
gwliststring255defaultnoReference to the GWs/destinations from the list.
flagsunsigned int110noFlags (for different purposes) of the carriers
stateunsigned int110noThe state of the carrier (on / off).
attrsstring255yesAttributes string for the carrier
descriptionstring128noText description of the GW list

Indexes

nametypelinksdescription
dr_carrier_idxuniquecarrierid

This table is used by the Dynamic Routing module to store information about the routing groups (users mapped over groups). More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/drouting.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
usernamestring64defaultnoUsername part of user
domainstring128noDomain part of user
groupidunsigned int110noThe ID of the routing group the user belongs to.
descriptionstring128noText description of the group/user

This table us used by the group module as a means of group membership checking. Used primarily for Access Control Lists (ACL’s). More information about the group module can be found at: http://www.opensips.org/html/docs/modules/1.11.x/group.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
usernamestring64noUsername / phone number
domainstring64noDomain name
grpstring64noGroup name
last_modifieddatetimenot specified’1900-01-01 00:00:01’noDate and time when this record was last modified.

Indexes

nametypelinksdescription
account_group_idxuniqueusername, domain, grp

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://www.opensips.org/html/docs/modules/1.11.x/group.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
reg_expstring128noRegular expression
group_idint110noGroup ID

Indexes

nametypelinksdescription
group_idxdefaultgroup_id

Room table for the IMC module. More information at http://www.opensips.org/html/docs/modules/1.11.x/imc.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
namestring64defaultnoName of the room
domainstring64defaultnoDomain of the room
flagint11defaultnoFlags

Indexes

nametypelinksdescription
name_domain_idxuniquename, domain

Member table for the IMC module. More information at http://www.opensips.org/html/docs/modules/1.11.x/imc.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
usernamestring64defaultnoUsername
domainstring64defaultnoDomain
roomstring64defaultno
flagint11defaultnoFlags

Indexes

nametypelinksdescription
account_room_idxuniqueusername, domain, room

This table is used by the Load-Balancer module to store information about the destinations the balance the calls between. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/load_balancer.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique ID of the destinationprimaryautoincrement
group_idunsigned int110noThe group the destination belongs to
dst_uristring128defaultnoDestination address as a SIP URI
resourcesstring255defaultnoString with the definition of the resource provided by the destination and the capacity of each resource
probe_modeunsigned int110noProbing mode (0-none, 1-if disabled, 2-all the time)
descriptionstring128noText description of the destination

Indexes

nametypelinksdescription
dsturi_idxdefaultdst_uri

This table us used by the msilo module to provide offline message storage More information about the msilo module can be found at: http://www.opensips.org/html/docs/modules/1.11.x/msilo.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
src_addrstring128noSource address - From URI
dst_addrstring128noDestination address - To URI
usernamestring64noSIP domain of target user
domainstring64noUsername / phone number of target user
inc_timeintnot specified0noIncoming time
exp_timeintnot specified0noExpiration time
snd_timeintnot specified0noReminder send time
ctypestring255NULLyesContent type
bodybinarynot specifiedNULLyesBody of the message

Indexes

nametypelinksdescription
account_idxdefaultusername, domain

Prefix-Domain Translation means to change the host and port in R-URI, based on the prefix found in R-URI and source domain (that is domain in From-URI). More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/pdt.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
sdomainstring128defaultnoSource domain
prefixstring32defaultnoPrefix found in the username part of R-URI.
domainstring128noDomain corresponding to (sdomain, prefix) pair where the message must be sent.

Indexes

nametypelinksdescription
sdomain_prefix_idxuniquesdomain, prefix

This table is used by the permissions module. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/permissions.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
grpunsigned short50noThe group ID - each address may belong to a group/set
ipstring50defaultnoIP address, IPv4 or IPv6 format
maskcharnot specified32noNetwork mask, a number from 0 to 32
portunsigned short50noPort number, 0 value meaning ‘any’ (wildcard)
protostring4’any’noTransport protocol is either “any” or equal to transport protocol of request. Possible values that can be stored are “any”, “udp”, “tcp”, “tls”, and “sctp”.
patternstring64NULLyesA shell wildcard pattern to be used for matching string provided by the check address functions.
context_infostring32NULLyesExtra context information, not used by OpenSIPS, but simply exposed to the script level via scripting variables

Table for the presence module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/presence.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
usernamestring64defaultnoUser name
domainstring64defaultnoDomain
eventstring64defaultnoEvent
etagstring64defaultnoUser name
expiresint11defaultnoExpires
received_timeint11defaultnoReveived time
bodybinarynot specifieddefaultno
extra_hdrsbinarynot specifiedno
senderstring128defaultnoSender contact

Indexes

nametypelinksdescription
presentity_idxuniqueusername, domain, event, etag

Table for the presence module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/presence.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
presentity_uristring128defaultnoPresence URI
watcher_usernamestring64defaultnoFrom User
watcher_domainstring64defaultnoFrom Domain
to_userstring64defaultnoTo User
to_domainstring64defaultnoTo Domain
eventstring64’presence’noEvent description
event_idstring64defaultyesEvent ID
to_tagstring64defaultnoTO tag
from_tagstring64defaultnoFrom tag
callidstring64defaultnoCall ID
local_cseqint11defaultnoLocal cseq
remote_cseqint11defaultnoRemote cseq
contactstring128defaultnoContact
record_routetextnot specifieddefaultyesRecord route
expiresint11defaultnoExpires
statusint112noStatus
reasonstring64defaultnoReason
versionint110noVersion
socket_infostring64defaultnoSocket info
local_contactstring128defaultnoLocal contact

Indexes

nametypelinksdescription
active_watchers_idxuniquepresentity_uri, callid, to_tag, from_tag

Table for the presence module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/presence.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
presentity_uristring128defaultnoPresentity Uri
watcher_usernamestring64defaultnoWatcher User
watcher_domainstring64defaultnoWatcher Domain
eventstring64’presence’noEvent description
statusint11defaultnoStatus
reasonstring64defaultyesReason
inserted_timeint11defaultno

Indexes

nametypelinksdescription
watcher_idxuniquepresentity_uri, watcher_username, watcher_domain, event

Table for the presence module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/presence.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
usernamestring64defaultnoUser name
domainstring64defaultnoDomain
docbinarynot specifieddefaultnodoc
doc_typeint11defaultnoDocument type
etagstring64defaultnoDocument Etag
sourceint11defaultnoEntity inserting the record
doc_uristring128defaultnoDocument uri
portint11defaultnoXCAP server port

Indexes

nametypelinksdescription
account_doc_type_idxuniqueusername, domain, doc_type, doc_uri
source_idxdefaultsource

Table for the presence related pua module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/pua.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
pres_uristring128defaultnoURI
pres_idstring255defaultnoID
eventint11defaultnoEvent
expiresint11defaultnoExpires
desired_expiresint11defaultnoDesired Expires
flagint11defaultnoFlags
etagstring64defaultyesEtag
tuple_idstring64defaultyesTuple ID
watcher_uristring128defaultyesWatcher URI
to_uristring128defaultyesURI
call_idstring64defaultyesCall ID
to_tagstring64defaultyesTo tag
from_tagstring64defaultyesFrom tag
cseqint11defaultyes
record_routetextnot specifieddefaultyesRecord route
contactstring128defaultyesContact
remote_contactstring128defaultyesRemote contact
versionint11defaultyes
extra_headerstextnot specifieddefaultyesExtra Headers

Indexes

nametypelinksdescription
del1_idxdefaultpres_uri, event
del2_idxdefaultexpires
update_idxdefaultpres_uri, pres_id, flag, event

Registrant information for the uac_registrant module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/uac_registrant.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
registrarstring128noURI pointing to the remote registrar.
proxystring128NULLyesURI pointing to the outbond proxy.
aorstring128noURI defining the address of record.
third_party_registrantstring128NULLyesURI defining the third party registrant.
usernamestring64NULLyesUsername for authentication.
passwordstring64NULLyesPassword for authentication.
binding_URIstring128noContact URI in REGISTER.
binding_paramsstring64NULLyesContact params in REGISTER.
expiryunsigned int1NULLyesExpiration time.
forced_socketstring64NULLyessocket for sending the REGISTER.

Indexes

nametypelinksdescription
aor_idxuniqueaor

This table for the registrar module is similar to the “location” table, (the aliases index makes lookup of missed calls much faster). Thus, the function lookup(“alias”) can be used to map aliases to AORs. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/registrar.html. Most people uses the dbaliases table with the alias_db module now.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
usernamestring64noAlias Username / Phone Number
domainstring64noDomain name
contactstring255noContact header field value provides a URI whoses meaning depends on the type of request or response it is in.
receivedstring128NULLyesReceived IP:PORT in the format SIP:IP:PORT
pathstring255NULLyesPath Header(s) per RFC 3327
expiresdatetimenot specified’2020-05-28 21:32:15’noDate and time when this entry expires.
qfloat10,21.0noValue used for preferential routing.
callidstring255’Default-Call-ID’noCall-ID header field uniquely identifies a particular invitation or all registrations of a particular client.
cseqint1113noCSeq header field contains a single decimal sequence number and the request method.
last_modifieddatetimenot specified’1900-01-01 00:00:01’noDate and time when this entry was last modified.
flagsint110noFlags
cflagsstring255NULLyesCFlags
user_agentstring255noUser-Agent header field contains information about the UAC originating the request.
socketstring64NULLyesSocket used to connect to OpenSIPS. For example: UDP:IP:PORT
methodsint11NULLyesFlags that indicate the SIP Methods this contact will accept.
sip_instancestring255NULLyesSIP Instance for this particular contact
attrstring255NULLyesOptional information specific to each registration

Indexes

nametypelinksdescription
alias_idxuniqueusername, domain, contact, callid

Table for the RLS module.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
rlsubs_didstring255defaultnoResource list subscribe dialog id
resource_uristring128defaultnoList Uri
content_typestring255defaultnoContent type
presence_statebinarynot specifieddefaultno
expiresint11defaultnoExpires
updatedint11defaultnoUpdate flag
auth_stateint11defaultnoWatcher authorization state
reasonstring64defaultnoreason for watcher authorization state

Indexes

nametypelinksdescription
rls_presentity_idxuniquerlsubs_did, resource_uri
updated_idxdefaultupdated

Table for RLS module used for storing resource lists subscribe information.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
presentity_uristring128defaultnoPresence URI
to_userstring64defaultnoTo user
to_domainstring64defaultnoTo domain
watcher_usernamestring64defaultnoFrom user
watcher_domainstring64defaultnoFrom domain
eventstring64’presence’noEvent description
event_idstring64defaultyesEvent ID
to_tagstring64defaultnoTo tag
from_tagstring64defaultnoFrom tag
callidstring64defaultnoCall ID
local_cseqint11defaultnoLocal cseq
remote_cseqint11defaultnoRemote cseq
contactstring64defaultnoContact
record_routetextnot specifieddefaultyesRecord route
expiresint11defaultnoExpires
statusint112noStatus
reasonstring64defaultnoReason
versionint110noVersion
socket_infostring64defaultnoSocket info
local_contactstring128defaultnoLocal contact

Indexes

nametypelinksdescription
rls_watcher_idxuniquepresentity_uri, callid, to_tag, from_tag

This table is used by the NAT Helper module to store definitions of socket(s) used to connect to (a set) RTPProxy. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/nathelper.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoUnique IDprimaryautoincrement
rtpproxy_socktextnot specifieddefaultnoA list of sockets use to connect to a set of RTPProxy. Example: “udp:localhost:12221 udp:localhost:12222”.
set_idunsigned int10defaultnoThe ID of the RTPProxy set.

This table is used to store incoming/outgoing SIP messages in database. More informations can be found in the siptrace module documentation at: http://www.opensips.org/html/docs/modules/1.11.x/siptrace.html.

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
time_stampdatetimenot specified’1900-01-01 00:00:01’noRecording date
callidstring255nocall ID from SIP message
traced_userstring128NULLyesSIP URI of the user being traced
msgtextnot specifieddefaultnoFull SIP message
methodstring32noSIP method name
statusstring128NULLyesSIP reply status
fromipstring50noSource IP address
toipstring50noDestination IP address
fromtagstring64noFrom tag
directionstring4noDestination IP address

Indexes

nametypelinksdescription
traced_user_idxdefaulttraced_user
date_idxdefaulttime_stamp
fromip_idxdefaultfromip
callid_idxdefaultcallid

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://www.opensips.org/html/docs/modules/1.11.x/speeddial.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
usernamestring64noUsername / phone number
domainstring64noDomain name
sd_usernamestring64noSpeed dial username
sd_domainstring64noSpeed dial domain
new_uristring128noNew URI
fnamestring64noFirst name
lnamestring64noLast name
descriptionstring64noDescription

Indexes

nametypelinksdescription
speed_dial_idxuniqueusername, domain, sd_domain, sd_username
nametypesizedefaultnulldescriptionkeyextra attributes
table_namestring32defaultno
table_versionunsigned intnot specified0no

Indexes

nametypelinksdescription
t_name_idxuniquetable_name

This table is used by uri_db module to implement various SIP URI checks. More information about the uri_db module can be found at: http://www.opensips.org/html/docs/modules/1.11.x/uri_db.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnoprimaryautoincrement
usernamestring64noUsername / phone number
domainstring64noDomain name
uri_userstring64noUsername / phone number
last_modifieddatetimenot specified’1900-01-01 00:00:01’noDate and time when this record was last modified.

Indexes

nametypelinksdescription
account_idxuniqueusername, domain, uri_user

This table is used by the userblacklist module for the user specific blacklists. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/userblacklist.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
usernamestring64noThe user that is used for the blacklist lookup.
domainstring64noThe domain that is used for the blacklist lookup.
prefixstring64noThe prefix that is matched for the blacklist.
whitelistchar10noSpecify if this a blacklist (0) or a whitelist (1) entry.

Indexes

nametypelinksdescription
userblacklist_idxdefaultusername, domain, prefix

This table is used by the userblacklist module for the global blacklists. More information is available at: http://www.opensips.org/html/docs/modules/1.11.x/userblacklist.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
prefixstring64noThe prefix that is matched for the blacklist.
whitelistchar10noSpecify if this a blacklist (0) or a whitelist (1) entry.
descriptionstring255NULLyesA comment for the entry.

Indexes

nametypelinksdescription
globalblacklist_idxdefaultprefix

Persistent user location information for the usrloc module. More information can be found at: http://www.opensips.org/html/docs/modules/1.11.x/usrloc.html

nametypesizedefaultnulldescriptionkeyextra attributes
idunsigned int10defaultnounique IDprimaryautoincrement
usernamestring64noUsername / phone number
domainstring64noDomain name
contactstring255noContact header field value provides a URI whoses meaning depends on the type of request or response it is in.
receivedstring128NULLyesReceived IP:PORT in the format SIP:IP:PORT
pathstring255NULLyesPath Header(s) per RFC 3327
expiresdatetimenot specified’2020-05-28 21:32:15’noDate and time when this entry expires.
qfloat10,21.0noValue used for preferential routing.
callidstring255’Default-Call-ID’noCall-ID header field uniquely identifies a particular invitation or all registrations of a particular client.
cseqint1113noCSeq header field contains a single decimal sequence number and the request method.
last_modifieddatetimenot specified’1900-01-01 00:00:01’noDate and time when this entry was last modified.
flagsint110noFlags
cflagsstring255NULLyesCFlags
user_agentstring255noUser-Agent header field contains information about the UAC originating the request.
socketstring64NULLyesSocket used to connect to OpenSIPS. For example: UDP:IP:PORT
methodsint11NULLyesFlags that indicate the SIP Methods this contact will accept.
sip_instancestring255NULLyesSIP Instance for this particular contact
attrstring255NULLyesOptional information specific to each registration

Indexes

nametypelinksdescription
account_contact_idxuniqueusername, domain, contact, callid