First, thank you for taking the time to contribute to Kamailio project!
The following is a set of guidelines for contributing to Kamailio sources and documentation. Kamailio source tree is hosted in the Kamailio Organization on GitHub.
These are intended to be more like guidelines to keep everything consistent and coherent, not very strict rules. Use your best judgment and feel free to propose changes to this document in a pull request.
Kamailio is a community managed project, with developers world wide. Any contribution to code or documentation is very welcome and appreciated.
In order to be easily able to track the changes and have a coherent ChangeLog and commit history, there are several rules required for each contribution.
.clang-format file is part of
Kamailio source code tree, in the root folder.Please create the commit messages following the GIT convention:
Think of the first line as of an email "Subject" line. In fact it will be used as "Subject" in the generated commit emails and it will also be used when generating the Changelog (e.g. git log --pretty=oneline).
The first line (subject has to contain meaningful text about what that commit does, do not put just a reference to bug tracker or pull request items
Please start always with the prefix of the component (subsystem) that is modified by the commit, for example:
core: more fixup helper functions
core: tcp - support for haproxy protocolcore: mem - added faster mallocmodname: support for foo rfc extension
usrloc: support for gruu rfc extensionlib: srutils - critical bug fix for abc caseetc: kamailio.cfg - added core reply route blockmisc: examples/kemi lua - added debug callback functionkamctl: added support for management of module xyzIt is acceptable to use slightly different formats, like etc/kamailio.cfg: ...
instead of etc: kamailio.cfg - ... or modules/usrloc: ... instead of
usrloc: ..., the important aspect is to indicate the component where the
changes were done.
At the end of the first line some CI flags can be added. Available at this moment:
[skip ci] - skip continuous integration builds for source code, recommended
to be added when updating documentation, example configs or other utilities.
Example:
msilo: docs - updated example for m_dump() function [skip ci]commit message must describe the changes done by the patch
other details (e.g., how to reproduce, backtrace, sip packets, ...) belong to content (comments) of the pull request. Example of a full commit message:
core: added latency_limit_cfg global parameter
- print execution time for configuration script only if it exceeds this value
- default is 0 - print always (behaviour so far)
- it is printed to latency_cfg_log level
avoid emoticons and non-technical statements in commit messages
e.g., if it was a feature request by John Smith, don't mention that in commit message, especially don't write it owns you now a beer
credits can be given within commit message as a short statement, mentioning the name of the person or entity
for commits introducing a new module, credits must not be included in the commit message, being expected that the respective entity will own the copyright and it is reflected in the README or copyright header of each file
when the case, make references in the commit body (not in the subject/first line) to the items on bug tracker or pull requests, using GH #XYZ -- replace XYZ with issue number id. Example:
dialplan: basic safety for concurrent rpc reload
- reported by GH #1874
commits related to reports by static analyzers or other tools must describe what was fixed or changed. The tool, if a well known one, can be mentioned in the body of the commit message, after the technical details presenting the changes. For example, do not use commit messages like:
...: fix for whatever-tool reports
do not reference non-public resources (e.g., private links, id of non-public static analyzer reports, ...). For example, do not use commit messages like:
...: fix for whatever-tool report #1234
...: fix for http://private-tracker.lab/1234
do not mention any developer name or yourself when fixing an issue introduced by an old commit done by that developer or you. That commit can be referenced by hash id.
changes to usrloc module from modules
usrloc: fixed name conflict
- destroy_avps() renamed to reg_destroy_avps() to avoid conflicts
with the usr_avp.h version
changes to core
core: loadpath can now use a list of directories
- loadpath can use a list of directories separated by ':',
e.g.: loadpath "modules:modules_s:modules_k".
First match wins (e.g. for loadmodule "textops" if
modules/textops.so or modules/textops/textops.so exists, it will
be loaded and the search will stop).
changes to etc/kamailio.cfg file
etc: kamailio.cfg - set load_backends to 1 for permissions module
- the config uses only address table
The above content about commit message format is taken from Kamailio wiki page:
developerid is the username on github.com portaldeveloperid/, e.g., alice/new-feature. Do not use just
new-feature or alice-new-feature or other variant without developerid/Whenever reporting an issue, along with the description of the problems, try to include following details:
Always useful to have:
Note: replace any sensitive information in the content you add to the issue (e.g., passwords in modparams can be replaced with xyz, each IP address can be replaced with tokens like a.b.c.d, f.g.h.j).
This section presents details about the automatic management of potential bug reports and requests for new features using github actions.
Kamailio is an open source collaborative project, in order to be fair for those that volunteer to spend time and resources for development of Kamailio, the users have to stay engaged, not just report and forget about.
To reduce the work load on volunteering contributors, GitHub Actions are used for various tasks related to project development and management (e.g., automatic builds on commits and pull requests to detect compile errors or code formatting mistakes).
One task managed with GitHub Actions is related to the check of open
issues and pull requests to evaluate the interest of submitter, developers and
community users. If there is no activity on an issue (potential bug or feature
request) or a pull request, after 6 weeks it is marked with the label stale.
After two more weeks of no activity, the issue or the pull request is marked
with the label expired and closed.
A registered developer can remove labels and reopen a closed issue or pull
request. The other contributors have to make a comment that includes the token
/notstale to remove the label stale or includes the token /notexpired to
reopen a closed item.
Kamailio Main License: GPLv2.
Each source code file refers to the license and copyright details in the top of the file. Most of the code is licensed under GPLv2 (with the "any later version" clause), some parts of the code are licensed under BSD.
New contributions to the core and several main modules (auth, corex, sl, tls, tm) have to be done under the BSD license. New contributions under the GPL must grant the GPL-OpenSSL linking exception. Contributions to existing components released under BSD must be done under BSD as well.
For any question, do not hesitate to contact other developers via mailing list: