Table of Contents
socket_name
(string)children_count
(string)unix_socket_mode
(integer)unix_socket_group
(integer)
unix_socket_group
(string)unix_socket_user
(integer)
unix_socket_group
(string)socket_timeout
(integer)reply_indent
(string)trace_destination
(string)trace_bwlist
(string)List of Tables
List of Examples
socket_name
parameterchildren_count
parameterunix_socket_mode
parameterunix_socket_group
parameterunix_socket_user
parametersocket_timeout
parameterreply_indent
parametertrace_destination
parametertrace_destination
parameterThis is a module which provides a UNIX/UDP SOCKET transport layer implementation for the Management Interface.
The external commands issued via DATAGRAM interface must follow the following syntax:
request = first_line (argument '\n')*
first_line = ':'command_name':''\n'
argument = (arg_name '::' (arg_value)? ) | (arg_value)
arg_name = not-quoted_string
arg_value = not-quoted_string | '"' string '"'
not-quoted_string = string - {',",\n,\r}
The following modules must be loaded before this module:
No dependencies on other OpenSIPS modules.
The name of a UNIX SOCKET or an IP address. The UNIX datagram or UDP socket will be created using this parameter in order to read the external commands. Both IPv4 and IPv6 are supported.
Default value is NONE.
Example 1.1. Set socket_name
parameter
... modparam("mi_datagram", "socket_name", "/tmp/opensips.sock") ... modparam("mi_datagram", "socket_name", "udp:192.168.2.133:8080") ...
The number of child processes to be created. Each child process will be a datagram server.
Default value is 1.
Permission to be used for creating the listening UNIX datagram socket. Not necessary for a UDP socket. It follows the UNIX conventions.
Default value is 0660 (rw-rw----).
Example 1.3. Set unix_socket_mode
parameter
... modparam("mi_datagram", "unix_socket_mode", 0600) ...
Group to be used for creating the listening UNIX socket.
Default value is the inherited one.
Example 1.4. Set unix_socket_group
parameter
... modparam("mi_datagram", "unix_socket_group", 0) modparam("mi_datagram", "unix_socket_group", "root") ...
User to be used for creating the listening UNIX socket.
Default value is the inherited one.
Example 1.5. Set unix_socket_user
parameter
... modparam("mi_datagram", "unix_socket_user", 0) modparam("mi_datagram", "unix_socket_user", "root") ...
The reply will expire after trying to sent it for socket_timeout milliseconds.
Default value is 2000.
Strings to be used for line indentation. As the MI data structure is tree oriendeted, the depth level will printed as indentation.
Default value is “"\t" (TAB)”.
Trace destination as defined in the tracing module. Currently the only tracing module is proto_hep. This is where traced mi messages will go.
WARNING: A tracing module must be loaded in order for this parameter to work. (for example proto_hep).
Default value is none(not defined).
Example 1.8. Set trace_destination
parameter
... modparam("proto_hep", "trace_destination", "[hep_dest]10.0.0.2;transport=tcp;version=3") modparam("mi_datagram", "trace_destination", "hep_dest") ...
Filter traced mi commands based on a blacklist or a whitelist. trace_destination must be defined for this parameter to have any purpose. Whitelists can be defined using 'w' or 'W', blacklists using 'b' or 'B'. The type is separate by the actual blacklist by ':'. The mi commands in the list must be separated by ','.
Defining a blacklists means all the commands that are not blacklisted will be traced. Defining a whitelist means all the commands that are not whitelisted will not be traced. WARNING: One can't define both a whitelist and a blacklist. Only one of them is allowed. Defining the parameter a second time will just overwrite the first one.
WARNING: A tracing module must be loaded in order for this parameter to work. (for example proto_hep).
Default value is none(not defined).
Example 1.9. Set trace_destination
parameter
... ## blacklist ps and which mi commands ## all the other commands shall be traced modparam("mi_datagram", "trace_bwlist", "b: ps, which") ... ## allow only sip_trace mi command ## all the other commands will not be traced modparam("mi_datagram", "trace_bwlist", "w: sip_trace") ...
2.1. | Both UNIX and UDP type of socket can be created simultaneusly? |
This version supports only one kind of socket at a time. If there are more than one value set for socket_name the last one will take effect. | |
2.2. | Is there a limit in the datagram request's size? |
The maximum length of a datagram request or reply is 65457 bytes. | |
2.3. | Where can I find more about OpenSIPS? |
Take a look at https://opensips.org/. | |
2.4. | Where can I post a question about this module? |
First at all check if your question was already answered on one of our mailing lists:
E-mails regarding any stable OpenSIPS release should be sent to
If you want to keep the mail private, send it to
| |
2.5. | How can I report a bug? |
Please follow the guidelines provided at: https://github.com/OpenSIPS/opensips/issues. |
Table 3.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
Name | DevScore | Commits | Lines ++ | Lines -- | |
---|---|---|---|---|---|
1. | Bogdan-Andrei Iancu (@bogdan-iancu) | 41 | 32 | 316 | 295 |
2. | Ancuta Onofrei | 26 | 2 | 2423 | 252 |
3. | Razvan Crainea (@razvancrainea) | 11 | 9 | 42 | 26 |
4. | Liviu Chircu (@liviuchircu) | 11 | 8 | 27 | 56 |
5. | Daniel-Constantin Mierla (@miconda) | 9 | 7 | 18 | 16 |
6. | Ionut Ionita (@ionutrazvanionita) | 7 | 4 | 252 | 25 |
7. | Henning Westerholt (@henningw) | 5 | 3 | 9 | 11 |
8. | Walter Doekes (@wdoekes) | 4 | 2 | 7 | 9 |
9. | Klaus Darilion | 3 | 1 | 4 | 4 |
10. | Julián Moreno Patiño | 3 | 1 | 3 | 3 |
All remaining contributors: Konstantin Bokarius, Dusan Klinec (@ph4r05), Vlad Patrascu (@rvlad-patrascu), Edson Gellert Schubert.
(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
Name | Commit Activity | |
---|---|---|
1. | Liviu Chircu (@liviuchircu) | Mar 2014 - Jul 2020 |
2. | Razvan Crainea (@razvancrainea) | Oct 2011 - Sep 2019 |
3. | Walter Doekes (@wdoekes) | May 2014 - Feb 2019 |
4. | Bogdan-Andrei Iancu (@bogdan-iancu) | Jun 2007 - Jun 2018 |
5. | Vlad Patrascu (@rvlad-patrascu) | May 2017 - May 2017 |
6. | Ionut Ionita (@ionutrazvanionita) | Jan 2017 - Feb 2017 |
7. | Julián Moreno Patiño | Feb 2016 - Feb 2016 |
8. | Dusan Klinec (@ph4r05) | Dec 2015 - Dec 2015 |
9. | Henning Westerholt (@henningw) | Aug 2007 - Jul 2008 |
10. | Klaus Darilion | Jul 2008 - Jul 2008 |
All remaining contributors: Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Ancuta Onofrei.
(1) including any documentation-related commits, excluding merge commits
Last edited by: Bogdan-Andrei Iancu (@bogdan-iancu), Liviu Chircu (@liviuchircu), Ionut Ionita (@ionutrazvanionita), Julián Moreno Patiño, Razvan Crainea (@razvancrainea), Klaus Darilion, Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Ancuta Onofrei.
doc copyrights:
Copyright © 2007 Voice Sistem SRL