Table of Contents
List of Tables
List of Examples
This module provides an HTTP transport layer for OpenSIPS.
Implementation of httpd module's http server is based on libmicrohttpd library.
TLS for the http server is enabled by setting the
tls_key_file parameters. If this is enabled, support for plain
http is disabled.
The following modules must be loaded before this module:
No dependencies on other OpenSIPS modules.
The IP address used by the HTTP server to listen for incoming requests.
The default value is an empty string. If no IP address is set, then the http server will bind to all available IPs.
The port number used by the HTTP server to listen for incoming requests.
The default value is 8888. Ports lower than 1024 are not accepted.
It specifies the maximum length (in bytes) of the buffer used to write in the html response.
If the size of the buffer is set to zero, it will be automatically set to a quarter of the size of the pkg memory.
The default value is 0.
It specifies the length (in bytes) of the POST HTTP requests processing buffer. For large POST request, the default value might require to be increased.
The default value is 1024. The minumal value is 256.
Public certificate file for httpd. It will be used as server-side certificate for incoming TLS connections.
The default value is ""
Example 1.5. Set
... modparam("httpd", "tls_cert_file", "/etc/opensips/tls/server.pem") ...
Private key of the above certificate. I must be kept in a safe place with tight permissions!
The default value is ""
Example 1.6. Set
... modparam("httpd", "tls_key_file", "/etc/opensips/tls/server.key") ...
You can specify the list of algorithms for authentication and encryption that you allow. To obtain a list of ciphers and then choose, use the gnutls-cli application:
Do not use the NULL algorithms (no encryption) ... never!!!
The default value is "SECURE256:+SECURE192:-VERS-ALL:+VERS-TLS1.2"
Example 1.7. Set
... modparam("httpd", "tls_ciphers", "SECURE256:+SECURE192:-VERS-ALL:+VERS-TLS1.2") ...
Lists all the registered http root paths into the httpd module. When a request comes in, if the root parth is in the list, the request will be sent to the module that register it.
MI FIFO Command Format:
opensips-cli -x mi httpd_list_root_path
Due to the fact that OpenSIPS is a multiprocess application, the microhttpd library is used in "external select" mode. This ensures that the library is not running in multithread mode and the library is entirely controled by OpenSIPS. Due to this particular mode of operations, for now, the entire http response is built in a pre-allocated buffer (see buf_size parameter).
Future realeases of this module will address this issue.
Running the http daemon as non root on ports below 1024 is forbidden by default in linux (kernel>=2.6.24). To allow the port binding, one can use setcap to give extra privilleges to opensips binary:
setcap 'cap_net_bind_service=+ep' /usr/local/sbin/opensips
Register a new http root with it's associated callbacks into the httpd module.
Meaning of the parameters is as follows:
const char *mod - name of the module that register an http root path to be handled;
str *root_path - the registered root path;
httpd_acces_handler_cb f1 - handler to the callback method to be called on root path match;
httpd_flush_data_cb f2 - handler to the callback method to be called for sending extra data (at a later time);
httpd_init_proc_cb f3 - handler to the callback method to be called during httpd process init;
Table 3.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
|Name||DevScore||Commits||Lines ++||Lines --|
|1.||Ovidiu Sas (@ovidiusas)||47||30||1667||147|
|2.||Razvan Crainea (@razvancrainea)||20||18||71||57|
|3.||Bogdan-Andrei Iancu (@bogdan-iancu)||13||11||93||52|
|4.||Liviu Chircu (@liviuchircu)||11||9||26||49|
|5.||Vlad Patrascu (@rvlad-patrascu)||10||7||52||89|
|6.||Ionut Ionita (@ionutrazvanionita)||8||6||65||21|
|7.||Fabian Gast (@fgast)||4||1||150||3|
|10.||Dusan Klinec (@ph4r05)||3||1||1||1|
All remaining contributors: Peter Lemenkov (@lemenkov).
(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. Regarding imported patches/code, we do our best to count the work on behalf of the proper owner, as per the "fix_authors" and "mod_renames" arrays in opensips/doc/build-contrib.sh. If you identify any patches/commits which do not get properly attributed to you, please submit a pull request which extends "fix_authors" and/or "mod_renames".
(3) ignoring whitespace edits, renamed files and auto-generated files
Table 3.2. Most recently active contributors(1) to this module
|1.||Bogdan-Andrei Iancu (@bogdan-iancu)||Jan 2013 - Apr 2021|
|2.||Razvan Crainea (@razvancrainea)||Mar 2015 - Feb 2021|
|3.||Fabian Gast (@fgast)||Aug 2020 - Aug 2020|
|4.||Liviu Chircu (@liviuchircu)||Mar 2014 - Jun 2019|
|5.||Vlad Patrascu (@rvlad-patrascu)||May 2017 - Apr 2019|
|6.||Ovidiu Sas (@ovidiusas)||Jan 2012 - Jan 2019|
|7.||Peter Lemenkov (@lemenkov)||Jun 2018 - Jun 2018|
|8.||Ionut Ionita (@ionutrazvanionita)||Jan 2017 - Feb 2017|
|9.||Dusan Klinec (@ph4r05)||Dec 2015 - Dec 2015|
|10.||Stas Kobzar||Feb 2015 - Feb 2015|
All remaining contributors: Stephane Alnet.
(1) including any documentation-related commits, excluding merge commits
Copyright © 2012-2013 VoIP Embedded, Inc.