UUID module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”This module provides a way to generate universally unique identifiers (UUID) as specified in RFC 4122. The UUID is provided as a string representation by reading the uuid pseudo-variable or calling the uuid script function.
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”This module does not depend on other modules.
External Libraries or Applications
Section titled “External Libraries or Applications”- libuuid - part of the util-linux package, can be downloaded from: ftp://ftp.kernel.org/pub/linux/utils/util-linux/
Exported Parameters
Section titled “Exported Parameters”The module does not export any parameters.
Exported Pseudo-Variables
Section titled “Exported Pseudo-Variables”The $uuid variable returns a newly generated version 4 UUID based on high-quality randomness from /dev/urandom, if available. Otherwise, a version 1 UUID (based on current time and the local ethernet MAC address) will be generated.
xlog("generated uuid: $uuid\n");Exported Functions
Section titled “Exported Functions”uuid(out_var, [version])
Section titled “uuid(out_var, [version])”Generates a new UUID.
- out_var - an output variable to return the generated UUID.
- version (optional) - UUID version
number. The supported values are:
- 0 - a RFC version 4 or version 1 UUID will be generated, depending on the availability of high-quality randomness from /dev/urandom. This is the default behavior, if the version parameter is missing.
- 1 - version 1 UUID based on current time and the local ethernet MAC address
- 4 - version 4 UUID based on a high-quality random number generator. If not available, a pseudo-random generator will be substituted.
If UUID version 1 is used, the function will return the value 2 if the UUID was generated in an unsafe manner. This refers to the posibility of two concurrently running processes generating the same UUID, in cases where synchronization mechanisms are not available (more details can be found in the uuid_generate man pages of libuuid).
This function can be used from any route.
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. | Stefan Darius (@dariusstefan) | 7 | 4 | 144 | 44 |
| 2. | Vlad Patrascu (@rvlad-patrascu) | 6 | 2 | 343 | 2 |
| 3. | Razvan Crainea (@razvancrainea) | 5 | 3 | 3 | 2 |
(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) | Aug 2019 - Jun 2026 |
| 3. | Vlad Patrascu (@rvlad-patrascu) | Jun 2019 - Jun 2019 |
(1) including any documentation-related commits, excluding merge commits
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Vlad Patrascu (@rvlad-patrascu).
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0