Parameters
<varname>user_column</varname> (string) Name of column containing usernames. Default value is "username". Set <varname>user_column</varname> parameter ... modparam("usrloc", "user_column", "username") ...
<varname>contact_column</varname> (string) Name of column containing contacts. Default value is "contact". Set <varname>contact_column</varname> parameter ... modparam("usrloc", "contact_column", "contact") ...
<varname>expires_column</varname> (string) Name of column containing expires value. Default value is "expires". Set <varname>expires_column</varname> parameter ... modparam("usrloc", "expires_column", "expires") ...
<varname>q_column</varname> (string) Name of column containing q values. Default value is "q". Set <varname>q_column</varname> parameter ... modparam("usrloc", "q_column", "q") ...
<varname>callid_column</varname> (string) Name of column containing callid values. Default value is "callid". Set <varname>callid_column</varname> parameter ... modparam("usrloc", "callid_column", "callid") ...
<varname>cseq_column</varname> (string) Name of column containing cseq numbers. Default value is "cseq". Set <varname>cseq_column</varname> parameter ... modparam("usrloc", "cseq_column", "cseq") ...
<varname>method_column</varname> (string) Name of column containing supported methods. Default value is "method". Set <varname>method_column</varname> parameter ... modparam("usrloc", "method_column", "method") ...
<varname>user_agent_column</varname> (string) Name of column containing user-agent values. Default value is "user_agent". Set <varname>user_agent_column</varname> parameter ... modparam("usrloc", "user_agent_column", "user_agent") ...
<varname>received_column</varname> (string) Name of column containing the source IP, port, and protocol from the REGISTER message. Default value is "received". Set <varname>received_column</varname> parameter ... modparam("usrloc", "received_column", "received") ...
<varname>db_url</varname> (string) URL of the database that should be used. Default value is "mysql://ser:heslo@localhost/ser". Set <varname>db_url</varname> parameter ... modparam("usrloc", "db_url", "mysql://username:password@localhost/ser") ...
<varname>timer_interval</varname> (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 <varname>timer_interval</varname> parameter ... modparam("usrloc", "timer_interval", 120) ...
<varname>db_mode</varname> (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 <varname>db_mode</varname> parameter ... modparam("usrloc", "db_mode", 2) ...