Skip to content

URI_DB module

Various checks related to SIP URI.

The following modules must be loaded before this module:

  • a OpenSIPS database module.

The following libraries or applications must be installed before running OpenSIPS with this module loaded:

  • None.

URL of the database to be used.

If the db_url string is empty, the default database URL will be used.

Default value is “mysql://opensipsro:opensipsro@localhost/opensips”.

Set db_url parameter
...
modparam("uri_db", "db_url", "mysql://username:password@localhost/opensips")
...

The DB table that should be used. Its possible to use the “subscriber” and “uri” table. If the “uri” table should be used, an additional parameter (use uri table) must be set.

Default value is “subscriber”.

Set uri_table parameter
...
modparam("uri_db", "db_table", "uri")
...

Column holding usernames in the table.

Default value is “username”.

Set user_column parameter
...
modparam("uri_db", "user_column", "username")
...

Column holding domain in the table.

Default value is “domain”.

Set domain_column parameter
...
modparam("uri_db", "domain_column", "domain")
...

Column holding URI username in the table.

Default value is “uri_user”.

Set uriuser_column parameter
...
modparam("uri_db", "uriuser_column", "uri_user")
...

Specify if the “uri” table should be used for checkings instead of “subscriber” table. A non-zero value means true.

Default value is “0 (false)“.

Set use_uri_table parameter
...
modparam("uri_db", "use_uri_table", 1)
...

Specify if the domain part of the URI should be used to identify the users (along with username). This is useful in multi domain setups, a non-zero value means true.

This parameter is only evaluated for calls to “does_uri_exist”, all other functions checks the digest username and realm against the given username, if the “uri” table is used.

Default value is “0 (false)”.

Set use_domain parameter
...
modparam("uri_db", "use_domain", 1)
...

Check To username against URI table (if use_uri_table is set) or digest credentials (no DB backend required).

This function can be used from REQUEST_ROUTE.

check_to usage
...
if (check_to()) {
...
};
...

Check From username against URI table (if use_uri_table is set) or digest credentials (no DB backend required).

This function can be used from REQUEST_ROUTE.

check_from usage
...
if (check_from()) {
...
};
...

Check if username in the request URI belongs to an existing user.

As the checking is done against URI table (if use_uri_table is set) or subscriber table.

This function can be used from REQUEST_ROUTE.

does_uri_exist usage
...
if (does_uri_exist()) {
...
};
...

Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

#NameDevScoreCommitsLines++Lines—
1.Jan Janak (@janakj)177103614
2.Daniel-Constantin Mierla (@miconda)1611137131
3.Bogdan-Andrei Iancu (@bogdan-iancu)1511159107
4.Henning Westerholt (@henningw)127111182
5.Stefan Darius (@dariusstefan)7325523
6.Sergio Gutierrez53135
7.Dan Pascu (@danpascu)423853
8.Andrei Pelinescu-Onciul3110444
9.Razvan Crainea (@razvancrainea)3122
10.Konstantin Bokarius3125

All remaining contributors: Norman Brandinger (@NormB), Edson Gellert Schubert, Elena-Ramona Modroiu.

(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)

(2) including any documentation-related commits, excluding merge commits

(3) ignoring whitespace edits, renamed files and auto-generated files

#NameCommit Activity
1.Stefan Darius (@dariusstefan)Jun 2026 - Jul 2026
2.Razvan Crainea (@razvancrainea)Jun 2026 - Jun 2026
3.Sergio GutierrezMar 2009 - Mar 2009
4.Dan Pascu (@danpascu)Oct 2007 - Aug 2008
5.Bogdan-Andrei Iancu (@bogdan-iancu)Jul 2005 - Jul 2008
6.Henning Westerholt (@henningw)Aug 2007 - Jun 2008
7.Daniel-Constantin Mierla (@miconda)Nov 2006 - Mar 2008
8.Konstantin BokariusMar 2008 - Mar 2008
9.Edson Gellert SchubertFeb 2008 - Feb 2008
10.Norman Brandinger (@NormB)Aug 2006 - Aug 2006

All remaining contributors: Elena-Ramona Modroiu, Jan Janak (@janakj), Andrei Pelinescu-Onciul.

(1) including any documentation-related commits, excluding merge commits

Last edited by: Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Henning Westerholt (@henningw), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Elena-Ramona Modroiu, Jan Janak (@janakj).

All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0