Parameters
user_column (string)
Name of column containing usernames.
Default value is "username".
Set user_column parameter
...
modparam("usrloc", "user_column", "username")
...
expires_column (string)
Name of column containing expires value.
Default value is "expires".
Set expires_column parameter
...
modparam("usrloc", "expires_column", "expires")
...
q_column (string)
Name of column containing q values.
Default value is "q".
Set q_column parameter
...
modparam("usrloc", "q_column", "q")
...
callid_column (string)
Name of column containing callid values.
Default value is "callid".
Set callid_column parameter
...
modparam("usrloc", "callid_column", "callid")
...
cseq_column (string)
Name of column containing cseq numbers.
Default value is "cseq".
Set cseq_column parameter
...
modparam("usrloc", "cseq_column", "cseq")
...
method_column (string)
Name of column containing supported methods.
Default value is "method".
Set method_column parameter
...
modparam("usrloc", "method_column", "method")
...
user_agent_column (string)
Name of column containing user-agent values.
Default value is "user_agent".
Set user_agent_column parameter
...
modparam("usrloc", "user_agent_column", "user_agent")
...
received_column (string)
Name of column containing the source IP, port, and protocol from
the REGISTER message.
Default value is "received".
Set received_column parameter
...
modparam("usrloc", "received_column", "received")
...
db_url (string)
URL of the database that should be used.
Default value is "mysql://ser:heslo@localhost/ser".
Set db_url parameter
...
modparam("usrloc", "db_url", "mysql://username:password@localhost/ser")
...
timer_interval (integer)
Number of seconds between two timer runs. The module uses timer to
delete expired contacts, synchronize with database and other tasks,
that need to be run periodically.
Default value is 60.
Set timer_interval parameter
...
modparam("usrloc", "timer_interval", 120)
...
db_mode (integer)
The usrloc module can utilize database for persistent contact
storage. If you use database, your contacts will survive machine
restarts or SW crashes. The disadvantage is that accessing database
can be very time consuming. Therefore, usrloc module implements
four database accessing modes:
0 - This disables database completely. Only memory will be
used. Contacts will not survive restart. Use this value if
you need a really fast usrloc and contact persistence is
not necessary or is provided by other means.
1 - Write-Through scheme. All changes to usrloc are
immediately reflected in database too. This is very slow,
but very reliable. Use this scheme if speed is not your
priority but need to make sure that no registered contacts
will be lost during crash or reboot.
2 - Write-Back scheme. This is a combination of previous
two schemes. All changes are made to memory and database
synchronization is done in the timer. The timer deletes all
expired contacts and flushes all modified or new contacts
to database. Use this scheme if you encounter high-load
peaks and want them to process as fast as possible. The
mode will not help at all if the load is high all the time.
Also, latency of this mode is much lower than latency of
mode 1, but slightly higher than latency of mode 0.
3 - Read-Only scheme. Disables commits to database. Upon start
contacts are read from the database but changes are not written.
Contacts will thus not survive a restart unless taken care of
otherwise. Use this if you need the benefits of mode 0 with a
databases backed preloading feature. Attention: There is a
slight window where updated contacts might not make it into
memory while reading and parsing contacts from the database
before going into full production mode.
In case of crash or restart contacts that are in memory only
and haven't been flushed yet will get lost. If you want
minimize the risk, use shorter timer interval.
Default value is 0.
Set db_mode parameter
...
modparam("usrloc", "db_mode", 2)
...