UAC REGISTRANT module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”The module enable OpenSIPS to register itself on a remote SIP registrar.
At startup, the registrant records are loaded into a hash table in memory and a timer is started. The hash index is computed over the AOR field.
The timer interval for checking records in a hash bucket is computed by dividing the timer_interval module param by the number of hash buckets. When the timer fires for the first time, the first hash bucket will be checked and REGISTERs will be sent out for each record that is found. On the next timeout fire, the second hash bucket will be checked and so on. If the configured timer_interval module param is lower then the number of buckets, the module will fail to start.
Example: setting the timer_interval module to 8 with a hash_size of 2, will result in having 4 hash buckets (2^2=4) and buckets will be checked one by one every 2s (8/4=2).
Each registrant has it’s own state. Registranr’s status can be inspected via “reg_list” MI comand.
UAC registrant states:
- 0 - NOT_REGISTERED_STATE - the initial state (no REGISTER has been sent out yet);
- 1 - REGISTERING_STATE - waiting for a reply from the registrar after a REGISTER without authentication header was sent;
- 2 - AUTHENTICATING_STATE - waiting for a reply from the registrar after a REGISTER with authentication header was sent;
- 3 - REGISTERED_STATE - the uac is successfully registered;
- 4 - REGISTER_TIMEOUT_STATE : no reply received from the registrar;
- 5 - INTERNAL_ERROR_STATE - some errors were found/encountered during the processing of a reply;
- 6 - WRONG_CREDENTIALS_STATE - credentials rejected by the registrar;
- 7 - REGISTRAR_ERROR_STATE - error reply received from the registrar;
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”The following modules must be loaded before this module:
- uac_auth - UAC authentication module
External Libraries or Applications
Section titled “External Libraries or Applications”None.
Exported Parameters
Section titled “Exported Parameters”hash_size (integer)
Section titled “hash_size (integer)”The size of the hash table internally used to keep the registrants. A larger table distributes better the registration load in time but consumes more memory. The hash size is a power of number two.
Default value is 1.
...modparam("uac_registrant", "hash_size", 2)...timer_interval (integer)
Section titled “timer_interval (integer)”Defines the periodic timer for checking the registrations status.
Default value is 100.
...modparam("uac_registrant", "timer_interval", 120)...db_url (string)
Section titled “db_url (string)”Database where to load the registrants from.
Default value is “NULL” (use default DB URL from core).
...modparam("uac_registrant", "db_url", "mysql://user:passw@localhost/database")...table_name (string)
Section titled “table_name (string)”The database table that holds the registrant records.
Default value is “registrant”.
...modparam("uac_registrant", "table_name", "my_registrant")...registrar_column (string)
Section titled “registrar_column (string)”The column’s name in the database storing the URI pointing to the remote registrar (mandatory field). OpenSIPS expects a valid URI.
Default value is “registrar”.
...modparam("uac_registrant", "registrar_column", "registrant_uri")...proxy_column (string)
Section titled “proxy_column (string)”The column’s name in the database storing the URI pointing to the outbond proxy (not mandatory field). An empty or NULL value means no outbound proxy, otherwise OpenSIPS expects a valid URI.
Default value is “proxy”.
...modparam("uac_registrant", "proxy_column", "proxy_uri")...aor_column (string)
Section titled “aor_column (string)”The column’s name in the database storing the URI defining the address of record (mandatory field). The URI stored here will be used in the To URI of the REGISTER. OpenSIPS expects a valid URI.
Default value is “aor”.
...modparam("uac_registrant", "aor_column", "to_uri")...third_party_registrant_column (string)
Section titled “third_party_registrant_column (string)”The column’s name in the database storing the URI defining the third party registrant (not mandatory field). The URI stored here will be used in the From URI of the REGISTER. An empty or NULL value means no third party registration (the From URI will be identical to To URI), otherwise OpenSIPS expects a valid URI.
Default value is “third_party_registrant”.
...modparam("uac_registrant", "third_party_registrant_column", "from_uri")...username_column (string)
Section titled “username_column (string)”The column’s name in the database storing the username for authentication (mandatory if the registrar requires authentication).
Default value is “username”.
...modparam("uac_registrant", "username_column", "auth_username")...password_column (string)
Section titled “password_column (string)”The column’s name in the database storing the password for authentication (mandatory if the registrar requires authntication).
Default value is “password”.
...modparam("uac_registrant", "password_column", "auth_passowrd")...binding_URI_column (string)
Section titled “binding_URI_column (string)”The column’s name in the database storing the binding URI in REGISTER (mandatory field). The URI stored here will be used in the Contact URI of the REGISTER. OpenSIPS expects a valid URI.
Default value is “binding_URI”.
...modparam("uac_registrant", "binding_URI_column", "contact_uri")...binding_params_column (string)
Section titled “binding_params_column (string)”The column’s name in the database storing the binding params in REGISTER (not mandatory field). If not NULL or not empty, the string stored here will be added as params to the Contact URI in REGISTER (it MUST start with ”;”. There is no validation on the string stored here.
Default value is “binding_params”.
...modparam("uac_registrant", "binding_params_column", "contact_params")...expiry_column (string)
Section titled “expiry_column (string)”The column’s name in the database storing the expiration time (not mandatory).
Default value is “expiry”.
...modparam("uac_registrant", "expiry_column", "registration_timeout")...forced_socket_column (string)
Section titled “forced_socket_column (string)”The column’s name in the database storing the socket for sending the REGISTER (not mandatory). If a forced socket is provided, the socket MUST be explicitely set as a global listening socket in the config (see “listen” core parameter).
Default value is “forced_socket”.
...modparam("uac_registrant", "forced_socket_column", "fs")...Exported Functions
Section titled “Exported Functions”None to be used in configuration file.
Exported MI Functions
Section titled “Exported MI Functions”reg_list
Section titled “reg_list”Lists the registrant records and their status.
Name: reg_list
Parameters: none
MI FIFO Command Format:
:reg_list:_reply_fifo_file__empty_line_reg_reload
Section titled “reg_reload”Reloads the registrant records from the database.
Name: reg_reload
Parameters: none
MI FIFO Command Format:
:reg_reload:_reply_fifo_file__empty_line_doc copyrights:
Contributors
Section titled “Contributors”By Commit Statistics
Section titled “By Commit Statistics”Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
| # | Name | DevScore | Commits | Lines++ | Lines— |
|---|---|---|---|---|---|
| 1. | Ovidiu Sas (@ovidiusas) | 136 | 33 | 5582 | 3358 |
| 2. | Liviu Chircu (@liviuchircu) | 17 | 14 | 55 | 72 |
| 3. | Stefan Darius (@dariusstefan) | 11 | 5 | 461 | 65 |
| 4. | Razvan Crainea (@razvancrainea) | 9 | 7 | 17 | 15 |
| 5. | Bogdan-Andrei Iancu (@bogdan-iancu) | 7 | 5 | 8 | 4 |
| 6. | Nick Altmann (@nikbyte) | 4 | 2 | 36 | 5 |
| 7. | Vlad Paiu (@vladpaiu) | 4 | 2 | 13 | 10 |
| 8. | Vlad Patrascu (@rvlad-patrascu) | 2 | 1 | 1 | 0 |
(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
By Commit Activity
Section titled “By Commit Activity”| # | Name | Commit Activity |
|---|---|---|
| 1. | Stefan Darius (@dariusstefan) | Jun 2026 - Jul 2026 |
| 2. | Razvan Crainea (@razvancrainea) | Sep 2011 - Jun 2026 |
| 3. | Liviu Chircu (@liviuchircu) | Mar 2014 - Sep 2020 |
| 4. | Bogdan-Andrei Iancu (@bogdan-iancu) | Dec 2012 - Jun 2018 |
| 5. | Vlad Patrascu (@rvlad-patrascu) | May 2017 - May 2017 |
| 6. | Ovidiu Sas (@ovidiusas) | Feb 2011 - May 2017 |
| 7. | Nick Altmann (@nikbyte) | Nov 2015 - Dec 2015 |
| 8. | Vlad Paiu (@vladpaiu) | Jul 2011 - Sep 2011 |
(1) including any documentation-related commits, excluding merge commits
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Liviu Chircu (@liviuchircu), Ovidiu Sas (@ovidiusas).
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0