Copyright © 2005 voice-system.ro
db_url
(str)user_column
(str)domain_column
(str)alias_user_column
(str)alias_domain_column
(str)use_domain
(int)domain_prefix
(str)alias_db_lookup(table_name)
db_url
parameteruser_column
parameterdomain_column
parameteralias_user_column
parameteralias_domain_column
parameteruse_domain
parameterdomain_prefix
parameteralias_db_lookup()
usageALIAS_DB module can be used as an alternative for user aliases via usrloc. The main feature is that it does not store all addiacent data as for user location and always uses database for search (no memory caching).
Having no memory caching the speed of search can decrease but the provisioning is easier. With very fast databases like MySQL the speed penalty can be lowered. Also, the search can be performed on different tables in the same script.
The following modules must be loaded before this module:
database module (mysql, dbtext, ...).
The following libraries or applications must be installed before running OpenSER with this module loaded:
None.
alias_user_column
(str)Name of the column storing alias username.
Default value is "alias_username".
alias_domain_column
(str)Name of the column storing alias domain.
Default value is "alias_domain".
use_domain
(int)Specifies whether to use or not the domain from R-URI when searching for alias. If set to 0, the domain from R-URI is not used, if set to 1 the domain from R-URI is used.
Default value is "o".
domain_prefix
(str)Specifies the prefix to be stripped from the domain in R-URI before doing the search.
Default value is "NULL".
alias_db_lookup(table_name)
The function takes the R-URI and search to see whether it is an alias or not. If it is an alias for a local user, the R-URI is replaced with user's SIP uri.
The function returns TRUE if R-URI is alias and it was replaced by user's SIP uri.
Meaning of the parameters is as follows:
table_name - the name of the table where to search for alias.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
The table structure used by alias_db module is defined by next SQL script (good for MySQL).
Example 1-9. alias_db sql script
... create table dbaliases ( alias_username varchar(64) not null default '', alias_domain varchar(128) not null default '', username varchar(64) not null default '', domain varchar(128) not null default '', unique key alias_key(alias_username, alias_domain) ); ...
The table "dbaliases" is create by default.
Take a look at http://openser.org/.
First at all check if your question was already answered on one of our mailing lists:
User Mailing List - http://openser.org/cgi-bin/mailman/listinfo/users
Developer Mailing List - http://openser.org/cgi-bin/mailman/listinfo/devel
E-mails regarding any stable OpenSER release should be sent to
<users@openser.org>
and e-mails regarding development versions
should be sent to <devel@openser.org>
.
If you want to keep the mail private, send it to
<team@openser.org>
.
Please follow the guidelines provided at: http://sourceforge.net/tracker/?group_id=139143.