Documentation |
Documentation.Script-CoreParameters-2-4 HistoryHide minor edits - Show changes to markup March 06, 2019, at 01:32 PM
by
- Changed line 846 from:
maximum number of tcp connections (if the number is exceeded no new tcp connections will be accepted). Default is defined in tcp_conn.h: #define DEFAULT_TCP_MAX_CONNECTIONS 2048 to:
Maximum number of active TCP accepted connections (i.e. initiated by remote endpoints). Once the limit is reached, any new incoming TCP connections will be rejected. The default is 2048. For outgoing TCP connections (initiated by OpenSIPS), there is currently no limit. March 05, 2019, at 05:18 PM
by
- Deleted lines 710-717:
September 25, 2018, at 04:45 PM
by
- Changed lines 880-886 from:
tcp_no_new_conn_bflag = 6 .... route{ .... if( destination_behin_nat && proto==TCP ) setbflag(6); .... to:
tcp_no_new_conn_bflag = TCP_NO_CONNECT ... route { ... if (isflagset(DST_NATED) && $proto == "TCP") setbflag(TCP_NO_CONNECT); ... Changed line 889 from:
if ($var(retcode)==-6) { to:
if ($var(retcode) == -6) { Changed line 892 from:
send_reply("404","Not found"); to:
send_reply("404", "Not Found"); Changed line 894 from:
} else if ($var(retcode)<0) { to:
} else if ($var(retcode) < 0) { Deleted line 897:
.... March 20, 2018, at 01:57 PM
by
- Added lines 435-436:
Added line 449:
listen = udp:10.10.10.10:5060 anycast January 08, 2018, at 10:52 AM
by
- Deleted lines 241-258:
December 19, 2017, at 11:53 AM
by
- Changed line 710 from:
The poll method to be used by the I/O internal reactor - by default the best one for the current OS is selected. The available types are: poll, epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll . to:
The poll method to be used by the I/O internal reactor - by default the best one for the current OS is selected. The available types are: poll, epoll, sigio_rt, select, kqueue, /dev/poll. December 06, 2017, at 12:23 PM
by
- Changed line 444 from:
Set the network addresses the SIP server should listen to. Its syntax is 'protocol:address[:port]', where: to:
Set the network addresses the SIP server should listen to. Its syntax is Changed line 446 from:
to:
December 06, 2017, at 12:21 PM
by
- Changed lines 76-77 from:
It is necessary to include the port (the port value used in the "port=" or "listen=" definitions) in the alias definition otherwise the loose_route() function will not work as expected for local forwards! to:
It is necessary to include the port (the port value used in the "listen=" definitions) in the alias definition otherwise the loose_route() function will not work as expected for local forwards! Changed lines 444-445 from:
Set the network addresses the SIP server should listen to. It can be an IP address, hostname or network interface id or combination of protocol:address:port (e.g., udp:10.10.10.10:5060). This parameter can be set multiple times in same configuration file, the server listening on all addresses specified. to:
Set the network addresses the SIP server should listen to. Its syntax is 'protocol:address[:port]', where:
This parameter can be set multiple times in same configuration file, the server listening on all addresses specified. Added line 458:
listen = udp:* July 14, 2017, at 06:00 PM
by
- Changed lines 13-22 from:
(:toc-float Table of Content:) This section lists the all the parameters exported by OpenSIPS core for script usage (to be used in opensips.cfg) to:
(:toc-float Table of Contents:) This section lists the all the parameters exported by OpenSIPS core for script usage (to be used in opensips.cfg). Changed lines 18-295 from:
Keywords specific to SIP messages which can be used mainly in 'if' expressions. afThe address family of the received SIP message. It is INET if the message was received over IPv4 or INET6 if the message was received over IPv6. Exampe of usage: if(af==INET6) { log("Message received over IPv6 link\n"); }; dst_ipThe IP of the local interface where the SIP message was received. When the proxy listens on many network interfaces, makes possible to detect which was the one that received the packet. Example of usage: if(dst_ip==127.0.0.1) { log("message received on loopback interface\n"); }; dst_portThe local port where the SIP packet was received. When OpenSIPS is listening on many ports, it is useful to learn which was the one that received the SIP packet. Example of usage: if(dst_port==5061) { log("message was received on port 5061\n"); }; from_uriThis script variable is a reference to the URI of 'From' header. It can be used to test 'From'- header URI value. Example of usage: if(is_method("INVITE") && from_uri=~".*@opensips.org") { log("the caller is from opensips.org\n"); }; methodThe variable is a reference to the SIP method of the message. Example of usage: if(method=="REGISTER") { log("this SIP request is a REGISTER message\n"); }; msg:lenThe variable is a reference to the size of the message. It can be used in 'if' constructs to test message's size. Example of usage: if(msg:len>2048) { sl_send_reply("413", "message too large"); exit; }; $retcodeIt represents the value returned by last function executed (similar to $? from bash -- if you wish, you can use also $? in OpenSIPS config, both names '$retcode' and '$?' are supported). If tested after a call of a route, it is the value retuned by that route. Example of usage: route { route(1); if($retcode==1) { log("The request is an INVITE\n"); }; } route[1] { if(is_method("INVITE")) return(1); return(2); } protoThis variable can be used to test the transport protocol of the SIP message. Example of usage: if(proto==UDP) { log("SIP message received over UDP\n"); }; statusIf used in onreply_route, this variable is a reference to the status code of the reply. If it used in a standard route block, the variable is a reference to the status of the last reply sent out for the current request. Example of usage: if(status=="200") { log("this is a 200 OK reply\n"); }; src_ipReference to source IP address of the SIP message. Example of usage: if(src_ip==127.0.0.1) { log("the message was sent from localhost!\n"); }; src_portReference to source port of the SIP message (from which port the message was sent by previous hop). Example of usage: if(src_port==5061) { log("message sent from port 5061\n"); } to_uriThis variable can be used to test the value of URI from To header. Example of usage: if(to_uri=~"sip:.+@opensips.org") { log("this is a request for opensips.org users\n"); }; uriThis variable can be used to test the value of the request URI. Example of usage: if(uri=~"sip:.+@opensips.org") { log("this is a request for opensips.org users\n"); }; (:toc-back:) Core ValuesValues that can be used in 'if' expressions to check against Core Keywords INETThis keyword can be used to test whether the SIP packet was received over an IPv4 connection. Example of usage: if(af==INET) { log("the SIP message was received over IPv4\n"); }; INET6This keyword can be used to test whether the SIP packet was received over an IPv6 connection. Example of usage: if(af==INET6) { log("the SIP message was received over IPv6\n"); }; TCPThis keyword can be used to test the value of 'proto' and check whether the SIP packet was received over TCP or not. Example of usage: if(proto==TCP) { log("the SIP message was received over TCP\n"); }; UDPThis keyword can be used to test the value of 'proto' and check whether the SIP packet was received over UDP or not. Example of usage: if(proto==UDP) { log("the SIP message was received over UDP\n"); }; max_lenThis keyword is set to the maximum size of an UDP packet. It can be used to test message's size. Example of usage: if(msg:len>max_len) { sl_send_reply("413", "message too large to be forwarded over UDP without fragmentation"); exit; } myselfIt is a reference to the list of local IP addresses, hostnames and aliases that has been set in OpenSIPS configuration file. This lists contain the domains served by OpenSIPS. The variable can be used to test if the host part of an URI is in the list. The usefulness of this test is to select the messages that has to be processed locally or has to be forwarded to another server. See "alias" to add hostnames,IP addresses and aliases to the list. Example of usage: if(uri==myself) { log("the request is for local processing\n"); }; nullCan be used in assignment to reset the value of a per-script variable or to delete an avp. Example of usage: $avp(i:12) = null; $var(x) = null; (:toc-back:) to:
All the core keywords along with their accepted core values available in previous versions were eliminated in v2.4 and the use of core variables and core functions is recommended instead. For detailed information about what you can use in place of the deprecated keywords, check the migration page keywords section. Core parametersGlobal parameters that can be set in configuration file. Accepted values are, depending on the actual parameters strings, numbers and yes/ no. If you need to specify either "yes" or "no" as part of a string, wrap this in double quotes. abort_on_assertDefault value: false
April 12, 2017, at 01:07 PM
by
- Deleted lines 382-392:
bin_listen (Removed in OpenSIPS 2.4)Replaced by the bin_port module parameter from proto_bin module (as a result of migrating the BIN implementation from core into a separate module). bin_children (Removed in OpenSIPS 2.4)Obsolete, simply removed. Deleted lines 470-474:
Deleted lines 701-710:
fork (Removed in OpenSIPS 2.4)Replaced by debug_mode parameter. group gid (Removed in OpenSIPS 2.4)Use the -u command line parameter instead. Deleted lines 1312-1319:
April 12, 2017, at 01:03 PM
by
- Changed lines 1246-1249 from:
Number of keepalives to send before closing the connection (Linux only). Default value: 0 (not set). Setting tcp_keepcount to any value will enable tcp_keepalive. to:
Number of keepalives to send before closing the connection (Linux only). Default value is Operating System dependent and can be found using Setting tcp_keepcount to any value will enable tcp_keepalive. Changed lines 1258-1261 from:
Amount of time before OpenSIPS will start to send keepalives if the connection is idle (Linux only). Default value: 0 (not set). Setting tcp_keepidle to any value will enable tcp_keepalive. to:
Amount of time before OpenSIPS will start to send keepalives if the connection is idle (Linux only). Default value is Operating System dependent and can be found using Setting tcp_keepidle to any value will enable tcp_keepalive. Changed lines 1270-1272 from:
Interval between keepalive probes, if the previous one failed (Linux only). Default value: 0 (not set). Setting tcp_keepinterval to any value will enable tcp_keepalive. to:
Interval between keepalive probes, if the previous one failed (Linux only). Default value is Operating System dependent and can be found using Setting tcp_keepinterval to any value will enable tcp_keepalive. March 24, 2017, at 11:33 AM
by
- Changed lines 892-893 from:
Only relevant when the HP_MALLOC compile flag is enabled. If set to "on", on each startup, OpenSIPS will attempt to restore the memory fragmentation pattern it had before the stop/restart. If no pattern_file from a previous run is found, memory warning is skipped, and the memory allocator simply starts with a big chunk of memory, like all other allocators. to:
Only relevant when the HP_MALLOC compile flag is enabled. If set to "on", on each startup, OpenSIPS will attempt to restore the memory fragmentation pattern it had before the stop/restart. If no pattern_file from a previous run is found, memory warming is skipped, and the memory allocator simply starts with a big chunk of memory, like all other allocators. Changed line 924 from:
The memory fragmentation pattern of a previous OpenSIPS run. Used at startup, if mem_warming is enabled. to:
Only relevant if mem_warming is enabled. It contains the memory fragmentation pattern of a previous OpenSIPS run. This file is overwritten during each OpenSIPS shutdown, and is used during startup in order to restore the service behavior as soon as possible. December 07, 2016, at 11:26 AM
by
- Deleted lines 14-15:
This document is for OpenSIPS 1.12.x December 07, 2016, at 11:25 AM
by
- Changed lines 866-868 from:
to:
Changed lines 871-873 from:
Example of usage: to:
In order for the feature to work you have to run "make generate-mem-stats" and complile with the variable SHM_EXTRA_STATS defined. Usage example: Changed lines 875-877 from:
memgroup = groupname: moduleA moduleB memgroup = runtime: dialog usrloc tm memgroup = routing: drouting to:
mem-group = "interest": "core" "tm" mem-group = "runtime": "dialog" "usrloc" "tm" Changed lines 880-886 from:
to:
For the above example the generated statistics will be named: shmem_group_interest:fragments, shmem_group_interest:memory_used, shmem_group_interest:real_used. Multiple groups can be defined, but they must not have the same name. If you want to generate the statistics for the default group (all the other modules not included in a group) you have to complile with the variable SHM_SHOW_DEFAULT_GROUP defined. Deleted lines 1419-1435:
mem-groupDefine a group of modules for which statistics will be generated regarding their shared memory usage. In order for the feature to work you have to run "make generate-mem-stats" and complile with the variable SHM_EXTRA_STATS defined. Usage example: mem-group = "interest" : "core" "tm" For the above example the generated statistics will be named: shmem_group_interest:fragments, shmem_group_interest:memory_used, shmem_group_interest:real_used. Multiple groups can be defined, they must not have the same name. If you want to generate the statistics for the default group (all the other modules not included in a group) you have to complile with the variable SHM_SHOW_DEFAULT_GROUP defined. October 12, 2016, at 04:57 PM
by
- Changed line 773 from:
If you omit this directive then the SIP server will listen on all interfaces. On startup, OpenSIPS reports all the interfaces that it is listening on. Even if you specify only UDP interfaces here, the server will start the TCP engine too. to:
On startup, OpenSIPS reports all the interfaces that it is listening on. The TCP engine processes will be created regardless if you specify only UDP interfaces here. October 12, 2016, at 04:51 PM
by
- Changed line 760 from:
Remember that the above parameters only affect the interface they are configured for; if they are not defined for each interface, the global values will be used instead. to:
Remember that the above parameters only affect the interface they are configured for; if they are not defined for a given interface, the global values will be used instead. October 12, 2016, at 04:49 PM
by
- Changed lines 757-763 from:
The listen definition may accept several optional parameters for:
Remember that this parameters have affect only for the interface they are configured for; if not defined per interface, the global values will be used. Example of usage: to:
The listen definition may accept several optional parameters for:
Remember that the above parameters only affect the interface they are configured for; if they are not defined for each interface, the global values will be used instead. Examples of usage: Changed lines 765-770 from:
listen=10.10.10.10 listen=eth1:5062 listen=udp:10.10.10.10:5064 listen=udp:127.0.0.1:5060 use_children 5 listen=udp:127.0.0.1:5060 as 99.88.44.33:5060 use_children 3 listen=127.0.0.1 use_children 3 to:
listen = udp:eth1 listen = tcp:eth1:5062 listen = tls:localhost:5061 listen = hep_udp:10.10.10.10:5064 listen = ws:127.0.0.1:5060 use_children 5 listen = sctp:127.0.0.1:5060 as 99.88.44.33:5060 use_children 3 Changed line 773 from:
If you omit this directive then the SIP server will listen on all interfaces. On start the SIP server reports all the interfaces that it is listening on. Even if you specify only UDP interfaces here, the server will start the TCP engine too. If you don't want this, you need to disable the TCP support completely with the core parameter disable_tcp. to:
If you omit this directive then the SIP server will listen on all interfaces. On startup, OpenSIPS reports all the interfaces that it is listening on. Even if you specify only UDP interfaces here, the server will start the TCP engine too. October 04, 2016, at 05:20 PM
by
- Changed line 359 from:
If the ":port" part is omitted, all ports will be considered an alias (similar behavior to port 0). to:
If the ":port" part is omitted, all ports of the given "hostname" will be considered an alias (similar behavior to port 0). October 04, 2016, at 05:19 PM
by
- Changed lines 359-361 from:
It is necessary to include the port (the port value used in the "port=" or "listen=" definitions) in the alias definition otherwise the loose_route() function will not work as expected for local forwards to:
If the ":port" part is omitted, all ports will be considered an alias (similar behavior to port 0). It is necessary to include the port (the port value used in the "port=" or "listen=" definitions) in the alias definition otherwise the loose_route() function will not work as expected for local forwards! June 21, 2016, at 11:49 AM
by
- Changed lines 1152-1153 from:
tcp_connection_lifetime!!!!to:
June 21, 2016, at 11:48 AM
by
- Changed lines 1122-1133 from:
to:
Default value 0 (disabled). If enabled, OpenSIPS will enforce RFC 5923 behaviour when detecting an ";alias" Via header field parameter and will reuse any TCP (or TLS, WS, WSS) connection opened for such SIP requests (source IP + Via port + proto) when sending other SIP requests backwards, towards the same (source IP + Via port + proto) pair. The final purpose of RFC 5923, after all, is to minimize the number of TLS connections a SIP proxy must open, due to the large CPU overhead of the connection setup phase.
On top of RFC 5923's connection reusage (aliasing) mechanism, TCP connections in OpenSIPS are also persistent across multiple SIP dialogs. This can be controlled with the tcp_connection_lifetime global parameter.
Changed line 1428 from:
(:toc-back:) to:
(:toc-back:) May 13, 2016, at 08:16 PM
by
- Changed lines 364-365 from:
alias=other.domain.com:5060 alias=another.domain.com:5060 to:
alias=udp:other.domain.com:5060 alias=tcp:another.domain.com:5060 March 28, 2016, at 11:16 PM
by
- Added lines 862-874:
memgroupDefines a group of modules (by name) to get separate memory statistics. OpenSIPS will provide per-group memory information - the number of allocated fragments, the amount of used memory and the amount of real used memory (with memory manager overhead). This is useful if you want to monitor the memory usage of a certain module (or group of modules). Example of usage: memgroup = groupname: moduleA moduleB memgroup = runtime: dialog usrloc tm memgroup = routing: drouting March 28, 2016, at 10:43 PM
by
- Added lines 393-400:
March 25, 2016, at 08:32 PM
by
- Changed lines 384-392 from:
bin_listenDefines a UDP listening interface for one or more Binary Packet Receivers. Default value is "null" (not listening). Example of usage: bin_listen=10.0.0.150:5062 to:
bin_listen (Removed in OpenSIPS 2.4)Replaced by the bin_port module parameter from proto_bin module (as a result of migrating the BIN implementation from core into a separate module). Changed lines 390-397 from:
bin_childrenThe number of UDP listeners for the Binary Internal Interface. Default value is 1. Example of usage: bin_children=4 to:
bin_children (Removed in OpenSIPS 2.4)Obsolete, simply removed. March 25, 2016, at 03:06 PM
by
- Changed lines 725-732 from:
group gidThe group id to run OpenSIPS. Example of usage: group="opensips" to:
group gid (Removed in OpenSIPS 2.4)Use the -u command line parameter instead. Changed lines 1312-1318 from:
user uidThe user id to run OpenSIPS (OpenSIPS will suid to it). Example of usage: user="opensips" to:
user uid (Removed in OpenSIPS 2.4)Use the -u command line parameter instead. March 25, 2016, at 11:28 AM
by
- Changed line 446 from:
This parameter was introduced as a replacement for the old debug options. to:
This parameter was introduced as a replacement for the old fork options. March 25, 2016, at 11:17 AM
by
- Added lines 432-446:
debug_modeEnabling the debug_mode option is a fast way to debug your OpenSIPS. This option will automatically force:
Default value is false/0 (disabled). NOTE that enabling this option will override all the other individual parameters like foreground mode, log level, children, etc. This parameter was introduced as a replacement for the old debug options. March 25, 2016, at 11:07 AM
by
- Added line 29:
Added line 42:
Added line 53:
Added line 65:
Added line 78:
Added line 91:
Added line 105:
Added line 128:
Added line 141:
Added line 153:
Added line 166:
Added line 179:
Added line 193:
Added line 214:
Added line 226:
Added line 238:
Added line 250:
Added line 262:
Added line 276:
Added line 291:
Added line 309:
Added line 322:
Added line 341:
Added line 354:
Added line 369:
Added line 383:
Added line 393:
Added line 403:
Added line 412:
Added line 424:
Added line 433:
Added line 444:
Added line 454:
Added line 468:
Added line 473:
Added line 480:
Added line 493:
Added line 507:
Added line 518:
Added line 528:
Added line 537:
Added line 546:
Added line 553:
Added line 563:
Added line 573:
Added line 583:
Added line 593:
Added line 603:
Added line 618:
Added line 645:
Added line 659:
Added line 670:
Added line 681:
Added line 692:
Added line 704:
Added line 709:
Added line 718:
Added line 729:
Added line 740:
Added line 763:
Added line 807:
Added line 819:
Added line 834:
Added line 844:
Added line 854:
Added line 872:
Added line 886:
Added line 900:
Added line 912:
Added line 923:
Added line 932:
Added line 941:
Added line 950:
Added line 968:
Added line 980:
Added line 990:
Added line 999:
Added line 1008:
Added line 1017:
Added line 1027:
Added line 1035:
Added line 1054:
Added line 1067:
Added line 1072:
Added line 1077:
Added line 1087:
Added line 1096:
Added line 1100:
Added line 1107:
Added line 1118:
Added line 1128:
Added line 1138:
Added line 1148:
Added line 1178:
Added line 1188:
Added line 1201:
Added line 1213:
Added line 1225:
Added line 1237:
Added line 1241:
Added line 1245:
Added line 1249:
Added line 1253:
Added line 1257:
Added line 1261:
Added line 1265:
Added line 1269:
Added line 1273:
Added line 1277:
Added line 1281:
Added line 1285:
Added line 1300:
Added line 1310:
Added line 1327:
Added line 1339:
Added line 1353:
Added line 1367:
Added line 1381:
Changed line 1398 from:
(:toc-back:) to:
(:toc-back:) March 25, 2016, at 10:46 AM
by
- Changed lines 386-387 from:
Number of children to fork for each UDP or SCTP interface you have defined. Default value is 8. to:
Number of worker processes (children) to be created for each UDP or SCTP interface you have defined. Default value is 8. Changed lines 650-660 from:
forkIf set to 'yes' the proxy will fork and run in daemon mode - one process will be created for each network interface the proxy listens to and for each protocol (TCP/UDP), multiplied with the value of 'children' parameter. When set to 'no', the proxy will stay bound to the terminal and runs as single process. First interface is used for listening to. OpenSIPS will only listen on UDP. Since the process is attached to the controlling terminal, not PID file will be created even if the -P command line option was specified. Default value is 'yes'. Example of usage: fork=no to:
fork (Removed in OpenSIPS 2.4)Replaced by debug_mode parameter. March 24, 2016, at 09:23 PM
by
- Changed line 751 from:
Value of 'log_level' parameter can also be get and set dynamically using log_level Core MI function or log_level scripting function to:
Value of 'log_level' parameter can also be get and set dynamically using log_level Core MI function or $log_level script variable. March 24, 2016, at 09:15 PM
by
- Changed line 751 from:
Value of 'log_level' parameter can also be get and set dynamically using log_level Core MI function or scipting function to:
March 24, 2016, at 09:02 PM
by - March 24, 2016, at 08:55 PM
by
- Deleted lines 774-775:
For more see: http://www.voice-system.ro/docs/ser-syslog/ March 24, 2016, at 08:52 PM
by
- Changed line 437 from:
Replaced by [[#log_level|log_level] parameter. to:
Replaced by log_level parameter. March 24, 2016, at 08:52 PM
by
- Changed lines 435-462 from:
debugSet the debug level. Higher values make OpenSIPS to print more debug messages. Examples of usage: debug=1 -- print only important messages (like errors or more critical situations) - recommended for running proxy as daemon debug=4 -- print a lot of debug messages - use it only when doing debugging sessions Actual values are:
The 'debug' parameter is usually used in concordance with 'log_stderror' parameter. Value of 'debug' parameter can also be get and set dynamically using 'debug' Core MI function. to:
debug (Removed in OpenSIPS 2.4)Replaced by [[#log_level|log_level] parameter. Deleted lines 717-718:
For more see: http://www.voice-system.ro/docs/ser-syslog/ Changed lines 724-725 from:
to:
log_levelSet the logging level (how verbose OpenSIPS should be). Higher values make OpenSIPS to print more messages. Examples of usage: log_level=1 -- print only important messages (like errors or more critical situations) - recommended for running proxy as daemon log_level=4 -- print a lot of debug messages - use it only when doing debugging sessions Actual values are:
The 'log_level' parameter is usually used in concordance with 'log_stderror' parameter. Value of 'log_level' parameter can also be get and set dynamically using log_level Core MI function or scipting function Changed lines 768-769 from:
With this parameter you can make OpenSIPS to write log and debug messages to standard error. Possible values are: to:
With this parameter you can make OpenSIPS to write log messages to standard error. Possible values are: Changed lines 845-846 from:
Log level to print memory status information (runtime and shutdown). It has to be less than the value of 'debug' parameter if you want memory info to be logged. Default: memdump=L_DBG (4) to:
Log level to print memory status information (runtime and shutdown). It has to be less than the value of 'log_level' parameter if you want memory info to be logged. Default: memdump=L_DBG (4) Changed line 856 from:
Log level to print memory debug info. It has to be less than the value of 'debug' parameter if you want memory info to be logged. Default: memlog=L_DBG (4) to:
Log level to print memory debug info. It has to be less than the value of 'log_level' parameter if you want memory info to be logged. Default: memlog=L_DBG (4) December 09, 2015, at 06:31 PM
by
- mem-group example error fixChanged line 1278 from:
mem-group = "interest" : "core", "tm" to:
mem-group = "interest" : "core" "tm" December 02, 2015, at 11:41 AM
by
- Changed lines 1128-1129 from:
''Default value: 0 (not set). Setting tcp_keepidle to any value will enable tcp_keepalive. to:
Default value: 0 (not set). Setting tcp_keepidle to any value will enable tcp_keepalive. Changed line 1139 from:
''Default value: 0 (not set). Setting tcp_keepinterval to any value will enable tcp_keepalive. to:
Default value: 0 (not set). Setting tcp_keepinterval to any value will enable tcp_keepalive. December 02, 2015, at 11:40 AM
by
- Changed lines 1117-1118 from:
Default value: 0 (not set). Setting tcp_keepcount to any value will enable tcp_keepalive. to:
Default value: 0 (not set). Setting tcp_keepcount to any value will enable tcp_keepalive. Changed lines 1128-1129 from:
''Default value: 0 (not set). Setting tcp_keepidle to any value will enable tcp_keepalive. to:
''Default value: 0 (not set). Setting tcp_keepidle to any value will enable tcp_keepalive. Changed line 1139 from:
''Default value: 0 (not set). Setting tcp_keepinterval to any value will enable tcp_keepalive. to:
''Default value: 0 (not set). Setting tcp_keepinterval to any value will enable tcp_keepalive. December 02, 2015, at 11:39 AM
by
- Changed lines 1128-1129 from:
''Default value: 0 (disabled). Setting tcp_keepidle to any value will enable tcp_keepalive. to:
''Default value: 0 (not set). Setting tcp_keepidle to any value will enable tcp_keepalive. Changed line 1139 from:
''Default value: 0 (disabled). Setting tcp_keepinterval to any value will enable tcp_keepalive. to:
''Default value: 0 (not set). Setting tcp_keepinterval to any value will enable tcp_keepalive. December 02, 2015, at 11:38 AM
by
- Changed lines 1103-1104 from:
Enable or disable TCP keepalive. to:
Enable or disable TCP keepalive (OS level). Changed line 1142 from:
to:
[@ Added line 1144:
@] December 02, 2015, at 11:37 AM
by
- Changed lines 1103-1104 from:
Enable or disable TCP keepalive. Enabled by default. to:
Enable or disable TCP keepalive. Enabled by default. Changed lines 1117-1118 from:
Default value: 0 (disabled). Setting tcp_keepcount to any value will enable tcp_keepalive?. to:
Default value: 0 (not set). Setting tcp_keepcount to any value will enable tcp_keepalive. Changed lines 1128-1131 from:
to:
''Default value: 0 (disabled). Setting tcp_keepidle to any value will enable tcp_keepalive. Changed lines 1139-1141 from:
to:
''Default value: 0 (disabled). Setting tcp_keepinterval to any value will enable tcp_keepalive. December 02, 2015, at 11:35 AM
by
- Changed line 1115 from:
''Default value: 0 (disabled). Setting tcp_keepcount to any value will enable tcp_keepalive?. to:
Default value: 0 (disabled). Setting tcp_keepcount to any value will enable tcp_keepalive?. December 02, 2015, at 11:35 AM
by
- Changed line 1115 from:
''Default value: 0 (disabled). Setting tcp_keepcount? to any value will enable tcp_keepalive?. to:
''Default value: 0 (disabled). Setting tcp_keepcount to any value will enable tcp_keepalive?. December 02, 2015, at 11:34 AM
by
- Deleted lines 1113-1114:
\\ December 02, 2015, at 11:33 AM
by
- Changed lines 1103-1104 from:
Enable / disable TCP keepalive to:
Enable or disable TCP keepalive. Enabled by default. Added line 1107:
[@ Changed lines 1109-1110 from:
to:
@] Changed lines 1113-1114 from:
Number of keepalives to send before closing the connection (Linux only) to:
Number of keepalives to send before closing the connection (Linux only).
Changed line 1120 from:
to:
[@ Changed lines 1122-1123 from:
to:
@] Changed lines 1126-1127 from:
Amount of time before OpenSIPS will start to send keepalives if the connection is idle (Linux only) to:
Amount of time before OpenSIPS will start to send keepalives if the connection is idle (Linux only).
Changed line 1133 from:
to:
[@ Changed lines 1135-1136 from:
to:
@] Changed lines 1139-1143 from:
Interval between keepalive probes, if the previous one failed (Linux only) to:
Interval between keepalive probes, if the previous one failed (Linux only).
December 02, 2015, at 11:25 AM
by
- Changed line 1056 from:
The maximum number of seconds that a SIP message is expected to arrive via TCP. If a single SIP packet is still not fully received after this number of seconds, the connection is dropped ( either the connection is very overloaded and this leads to high fragmentation - or we are the victim of an ongoing attack where the attacker is sending the traffic very fragmented in order to decrease our performance ). Default value is is 4 to:
The maximum number of seconds that a SIP message is expected to arrive via TCP. If a single SIP packet is still not fully received after this number of seconds, the connection is dropped ( either the connection is very overloaded and this leads to high fragmentation - or we are the victim of an ongoing attack where the attacker is sending the traffic very fragmented in order to decrease our performance ). Default value is 4 November 26, 2015, at 05:44 PM
by - November 26, 2015, at 05:44 PM
by
- Changed line 604 from:
dst_blacklist = gw:{( tcp , 192.468.2.400 , 5060 , "" ),( any , 192.468.2.401 , 0 , "" )} to:
dst_blacklist = gw:{( tcp , 192.168.2.400 , 5060 , "" ),( any , 192.168.2.401 , 0 , "" )} Changed line 606 from:
dst_blacklist = net_filter:{ ( any , 192.468.1.120/255.255.255.0 , 0 , "" )} to:
dst_blacklist = net_filter:{ ( any , 192.168.1.120/255.255.255.0 , 0 , "" )} Changed line 608 from:
dst_blacklist = msg_filter:{ ( any , 192.468.20.0/255.255.255.0 , 0 , "MESSAGE*ugly_word" )} to:
dst_blacklist = msg_filter:{ ( any , 192.168.20.0/255.255.255.0 , 0 , "MESSAGE*ugly_word" )} October 02, 2015, at 02:36 PM
by
- 'Defined the 'mem-group' parameterAdded lines 1257-1272:
mem-groupDefine a group of modules for which statistics will be generated regarding their shared memory usage. In order for the feature to work you have to run "make generate-mem-stats" and complile with the variable SHM_EXTRA_STATS defined. Usage example: mem-group = "interest" : "core", "tm" For the above example the generated statistics will be named: shmem_group_interest:fragments, shmem_group_interest:memory_used, shmem_group_interest:real_used. Multiple groups can be defined, they must not have the same name. If you want to generate the statistics for the default group (all the other modules not included in a group) you have to complile with the variable SHM_SHOW_DEFAULT_GROUP defined. July 10, 2015, at 03:54 PM
by
- Changed lines 1238-1239 from:
Only relevant when log_stderror is set to true. Enables the use of the color escape sequences, otherwise they will have no effect. to:
Only relevant when xlog is set to true. Enables the use of the color escape sequences, otherwise they will have no effect. Added lines 1243-1255:
@] xlog_default_levelDefault value: -1
Usage example: [@ xlog_default_level = 2 #L_NOTICE April 21, 2015, at 03:13 PM
by
- Changed lines 1028-1029 from:
Time in seconds before an ongoing blocking attempt to connect will be aborted. to:
Time in milliseconds before an ongoing blocking attempt to connect will be aborted. Default value is 100ms. Changed lines 1031-1034 from:
tcp_connect_timeout=5 to:
tcp_connect_timeout = 5 Changed lines 1041-1043 from:
tcp_connection_lifetime=3600 to:
tcp_connection_lifetime = 3600 Changed lines 1050-1052 from:
tcp_max_connections=4096 to:
tcp_max_connections = 4096 Changed lines 1059-1060 from:
tcp_max_msg_time=8 to:
tcp_max_msg_time = 8 March 13, 2015, at 07:00 PM
by
- Added lines 289-299:
abort_on_assertDefault value: false
Example of usage: abort_on_assert = true March 13, 2015, at 06:58 PM
by
- Added lines 608-620:
enable_assertsDefault value: false
Example of usage: enable_asserts = true March 11, 2015, at 07:11 PM
by
- Changed lines 985-988 from:
tcp_asyncIf the TCP connect and write operations should be done in an asynchronous mode. Default value is 0 ( blocking connect & write ) to:
tcp_childrenNumber of children processes to be created for reading from TCP connections. If no value is explicitly set, the same number of TCP children as UDP children (see "children" parameter) will be used. Changed lines 991-996 from:
tcp_async=1 tcp_async_local_connect_timeoutIf tcp_async is enabled, this specifies the number of microseconds that a connect will be tried in blocking mode ( optimization ). If the connect operation lasts more than this, the connect will go to async mode and will be passed to TCP MAIN for polling. Default value is 10000 ( 10 ms ) to:
tcp_children=4 tcp_accept_aliasestcp_listen_backlogThe backlog argument defines the maximum length to which the queue of pending connections for the TCP listeners may grow. If a connection request arrives when the queue is full, the client may receive an error with an indication of ECONNREFUSED or, if the underlying protocol supports retransmission, the request may be ignored so that a later reattempt at connection succeeds. Default configured value is 10. tcp_connect_timeoutTime in seconds before an ongoing blocking attempt to connect will be aborted. Changed lines 1008-1013 from:
tcp_async_local_connect_timeout=20000 tcp_async_local_write_timeoutIf tcp_async is enabled, this specifies the number of microseconds that a write op will be tried in blocking mode ( optimization ). If the write operation lasts more than this, the write will go to async mode and will be passed to TCP MAIN for polling. Default value is 10000 ( 10 ms ) to:
tcp_connect_timeout=5 tcp_connection_lifetime!!!!Lifetime in seconds for TCP sessions. TCP sessions which are inactive for >tcp_connection_lifetime will be closed by OpenSIPS. Default value is defined in tcp_conn.h: #define DEFAULT_TCP_CONNECTION_LIFETIME 120. Setting this value to 0 will close the TCP connection pretty quick ;-). You can also set the TCP lifetime to the expire value of the REGISTER by using the tcp_persistent_flag parameter of the registrar module. Changed lines 1017-1022 from:
tcp_async_local_write_timeout=20000 tcp_async_max_postponed_chunksIf tcp_async is enabled, this specifies the maximum number of SIP messages that can be stashed for later/async writing. If the connection pending writes exceed this number, the connection will be marked as broken and dropped. Default value is 32 to:
tcp_connection_lifetime=3600 tcp_max_connectionsmaximum number of tcp connections (if the number is exceeded no new tcp connections will be accepted). Default is defined in tcp_conn.h: #define DEFAULT_TCP_MAX_CONNECTIONS 2048 Changed lines 1025-1030 from:
tcp_async_max_postponed_chunks=64 tcp_childrenNumber of children processes to be created for reading from TCP connections. If no value is explicitly set, the same number of TCP children as UDP children (see "children" parameter) will be used. to:
tcp_max_connections=4096 tcp_max_msg_timeThe maximum number of seconds that a SIP message is expected to arrive via TCP. If a single SIP packet is still not fully received after this number of seconds, the connection is dropped ( either the connection is very overloaded and this leads to high fragmentation - or we are the victim of an ongoing attack where the attacker is sending the traffic very fragmented in order to decrease our performance ). Default value is is 4 Changed lines 1033-1048 from:
tcp_children=4 tcp_accept_aliasestcp_listen_backlogThe backlog argument defines the maximum length to which the queue of pending connections for the TCP listeners may grow. If a connection request arrives when the queue is full, the client may receive an error with an indication of ECONNREFUSED or, if the underlying protocol supports retransmission, the request may be ignored so that a later reattempt at connection succeeds. Default configured value is 10. tcp_send_timeoutTime in seconds after a TCP connection will be closed if it is not available for blocking writing in this interval (and OpenSIPS wants to send something on it). to:
tcp_max_msg_time=8 tcp_no_new_conn_bflagA branch flag to be used as marker to instruct OpenSIPS not to attempt to open a new TCP connection when delivering a request, but only to reuse an existing one (if available). If no existing conn, a generic send error will be returned. This is intended to be used in NAT scenarios, where makes no sense to open a TCP connection towards a destination behind a NAT (like TCP connection created during registration was lost, so there is no way to contact the device until it re-REGISTER). Also this can be used to detect when a NATed registered user lost his TCP connection, so that opensips can disable his registration as useless. Changed lines 1043-1048 from:
tcp_send_timeout=3 tcp_connect_timeoutTime in seconds before an ongoing blocking attempt to connect will be aborted. to:
tcp_no_new_conn_bflag = 6 .... route{ .... if( destination_behin_nat && proto==TCP ) setbflag(6); .... t_relay("0x02"); # no auto error reply $var(retcode) = $rc; if ($var(retcode)==-6) { #send error xlog("unable to send request to destination"); send_reply("404","Not found"); exit; } else if ($var(retcode)<0) { sl_reply_error(); exit; } .... } tcp_thresholdA number representing the maximum number of microseconds sending of a TCP request is expected to last. Anything above the set number will trigger a warning message to the logging facility. Default value is 0 ( logging disabled ). Changed lines 1071-1078 from:
tcp_connect_timeout=5 tcp_connection_lifetime!!!!Lifetime in seconds for TCP sessions. TCP sessions which are inactive for >tcp_connection_lifetime will be closed by OpenSIPS. Default value is defined in tcp_conn.h: #define DEFAULT_TCP_CONNECTION_LIFETIME 120. Setting this value to 0 will close the TCP connection pretty quick ;-). You can also set the TCP lifetime to the expire value of the REGISTER by using the tcp_persistent_flag parameter of the registrar module. to:
tcp_threshold = 60000 tcp_keepaliveEnable / disable TCP keepalive Changed lines 1079-1084 from:
tcp_connection_lifetime=3600 tcp_max_connectionsmaximum number of tcp connections (if the number is exceeded no new tcp connections will be accepted). Default is defined in tcp_conn.h: #define DEFAULT_TCP_MAX_CONNECTIONS 2048 to:
tcp_keepalive = 1 tcp_keepcountNumber of keepalives to send before closing the connection (Linux only) Changed lines 1087-1092 from:
tcp_max_connections=4096 tcp_max_msg_chunksThe maximum number of chunks that a SIP message is expected to arrive via TCP. If a packet is received more fragmented than this, the connection is dropped ( either the connection is very overloaded and this leads to high fragmentation - or we are the victim of an ongoing attack where the attacker is sending the traffic very fragmented in order to decrease our performance ). Default value is is 4 to:
tcp_keepcount = 5 tcp_keepidleAmount of time before OpenSIPS will start to send keepalives if the connection is idle (Linux only) Changed lines 1095-1100 from:
tcp_max_msg_chunks=8 tcp_max_msg_timeThe maximum number of seconds that a SIP message is expected to arrive via TCP. If a single SIP packet is still not fully received after this number of seconds, the connection is dropped ( either the connection is very overloaded and this leads to high fragmentation - or we are the victim of an ongoing attack where the attacker is sending the traffic very fragmented in order to decrease our performance ). Default value is is 4 to:
tcp_keepidle = 30 tcp_keepintervalInterval between keepalive probes, if the previous one failed (Linux only) Deleted lines 1102-1171:
tcp_max_msg_time=8 tcp_no_new_conn_bflagA branch flag to be used as marker to instruct OpenSIPS not to attempt to open a new TCP connection when delivering a request, but only to reuse an existing one (if available). If no existing conn, a generic send error will be returned. This is intended to be used in NAT scenarios, where makes no sense to open a TCP connection towards a destination behind a NAT (like TCP connection created during registration was lost, so there is no way to contact the device until it re-REGISTER). Also this can be used to detect when a NATed registered user lost his TCP connection, so that opensips can disable his registration as useless. Example of usage: tcp_no_new_conn_bflag = 6 .... route{ .... if( destination_behin_nat && proto==TCP ) setbflag(6); .... t_relay("0x02"); # no auto error reply $var(retcode) = $rc; if ($var(retcode)==-6) { #send error xlog("unable to send request to destination"); send_reply("404","Not found"); exit; } else if ($var(retcode)<0) { sl_reply_error(); exit; } .... } tcp_thresholdA number representing the maximum number of microseconds sending of a TCP request is expected to last. Anything above the set number will trigger a warning message to the logging facility. Default value is 0 ( logging disabled ). Example of usage: tcp_threshold = 60000 tcp_keepaliveEnable / disable TCP keepalive Example of usage: tcp_keepalive = 1 tcp_keepcountNumber of keepalives to send before closing the connection (Linux only) Example of usage: tcp_keepcount = 5 tcp_keepidleAmount of time before OpenSIPS will start to send keepalives if the connection is idle (Linux only) Example of usage: tcp_keepidle = 30 tcp_keepintervalInterval between keepalive probes, if the previous one failed (Linux only) Example of usage: Deleted lines 1103-1118:
tcp_crlf_pingpongSend CRLF pong (\r\n) to incoming CRLFCRLF ping. By default it is enabled (1). Example of usage: tcp_crlf_pingpong = 0 tcp_crlf_dropDrop CRLF (\r\n) ping messages. By default it is disabled (0). Example of usage: tcp_crlf_drop = 1 March 06, 2015, at 03:28 PM
by
- Changed line 783 from:
Memory warming is useful when dealing with high volumes of traffic (thousands of cps on multi-core machines - the more cores, the more useful), because processes must mutually exclude themselves when chopping up the initial big memory chunk. By performing fragmentation on startup, OpenSIPS will also behave optimally in the first minute(s) after a restart. Fragmentation usually lasts a few seconds (e.g. ~5 seconds on an 8GB shm pool and 2.4Ghz processor) - traffic will not be processed at all during this period. to:
Memory warming is useful when dealing with high volumes of traffic (thousands of cps on multi-core machines - the more cores, the more useful), because processes must mutually exclude themselves when chopping up the initial big memory chunk. By performing fragmentation on startup, OpenSIPS will also behave optimally in the first minute(s) after a restart. Fragmentation usually lasts a few seconds (e.g. ~5 seconds on an 8GB shm pool and 2.4Ghz CPU) - traffic will not be processed at all during this period. March 06, 2015, at 03:28 PM
by
- Changed line 783 from:
Memory warming is useful when dealing with high volumes of traffic (thousands of cps on multi-core machines - the more cores, the more useful), because processes must mutually exclude themselves when chopping up the initial big memory chunk. By performing fragmentation on startup, OpenSIPS will also behave optimally in the first minute(s) after a restart. Fragmentation usually lasts a few seconds - OpenSIPS will not process traffic during this period. to:
Memory warming is useful when dealing with high volumes of traffic (thousands of cps on multi-core machines - the more cores, the more useful), because processes must mutually exclude themselves when chopping up the initial big memory chunk. By performing fragmentation on startup, OpenSIPS will also behave optimally in the first minute(s) after a restart. Fragmentation usually lasts a few seconds (e.g. ~5 seconds on an 8GB shm pool and 2.4Ghz processor) - traffic will not be processed at all during this period. March 06, 2015, at 03:25 PM
by
- Changed line 779 from:
Only relevant when the HP_MALLOC compile flag is enabled. If set to "on", on each startup, OpenSIPS will attempt to restore the memory fragmentation pattern it had before the stop/restart. If no pattern_file from a previous run is found, memory warning is skipped, and the memory allocator simply starts with a big chunk of memory. to:
Only relevant when the HP_MALLOC compile flag is enabled. If set to "on", on each startup, OpenSIPS will attempt to restore the memory fragmentation pattern it had before the stop/restart. If no pattern_file from a previous run is found, memory warning is skipped, and the memory allocator simply starts with a big chunk of memory, like all other allocators. March 06, 2015, at 03:16 PM
by
- Changed line 805 from:
Default value: CFG_DIR/mem_warming_pattern to:
Default value: "CFG_DIR/mem_warming_pattern" March 06, 2015, at 03:16 PM
by
- Changed lines 779-780 from:
Only relevant when the HP_MALLOC compile flag is enabled. If set to "on", on each startup, OpenSIPS will attempt to restore the memory fragmentation pattern it had before the stop/restart. If no pattern_file ? from a previous run is found, memory warning is skipped, and the memory allocator simply starts with a big chunk of memory. to:
Only relevant when the HP_MALLOC compile flag is enabled. If set to "on", on each startup, OpenSIPS will attempt to restore the memory fragmentation pattern it had before the stop/restart. If no pattern_file from a previous run is found, memory warning is skipped, and the memory allocator simply starts with a big chunk of memory. Changed lines 790-793 from:
mem_warming_pattern_fileDefault value: CFG_DIR/mem_warming_pattern to:
mem_warming_percentageDefault value: 75 Changed lines 796-797 from:
The memory fragmentation pattern of a previous OpenSIPS run. Used at startup, if mem_warming ? is enabled. to:
How much of OpenSIPS's memory should be fragmented with the pattern of the previous run, upon a restart. Used at startup, if mem_warming is enabled. Changed line 800 from:
mem_warming_pattern_file = "/var/tmp/my_memory_pattern" to:
mem_warming_percentage = 50 Changed lines 803-806 from:
mem_warming_percentageDefault value: 75 to:
mem_warming_pattern_fileDefault value: CFG_DIR/mem_warming_pattern Changed lines 809-810 from:
How much of OpenSIPS's memory should be fragmented with the pattern of the previous run, upon a restart. Used at startup, if mem_warming ? is enabled. to:
The memory fragmentation pattern of a previous OpenSIPS run. Used at startup, if mem_warming is enabled. Changed line 813 from:
mem_warming_percentage = 50 to:
mem_warming_pattern_file = "/var/tmp/my_memory_pattern" March 06, 2015, at 03:14 PM
by
- Changed line 787 from:
mem_warming=on to:
mem_warming = on Changed lines 800-813 from:
mem_warming_pattern_file="/var/tmp/my_memory_pattern" to:
mem_warming_pattern_file = "/var/tmp/my_memory_pattern" @] mem_warming_percentageDefault value: 75
Example of usage: [@ mem_warming_percentage = 50 March 06, 2015, at 03:12 PM
by
- Deleted lines 787-799:
@] mem_warming_pattern_fileDefault value: CFG_DIR/mem_warming_pattern
Example of usage: [@ mem_warming_pattern_file="/var/tmp/my_memory_pattern" March 06, 2015, at 03:11 PM
by
- Changed lines 783-784 from:
Memory warming is useful when dealing with high volumes of traffic, because processes must mutually exclude themselves when chopping up the initial big memory chunk. By performing fragmentation on startup, OpenSIPS will also behave optimally in the first minute(s) after a restart. to:
Memory warming is useful when dealing with high volumes of traffic (thousands of cps on multi-core machines - the more cores, the more useful), because processes must mutually exclude themselves when chopping up the initial big memory chunk. By performing fragmentation on startup, OpenSIPS will also behave optimally in the first minute(s) after a restart. Fragmentation usually lasts a few seconds - OpenSIPS will not process traffic during this period. Added lines 788-813:
@] mem_warming_pattern_fileDefault value: CFG_DIR/mem_warming_pattern
Example of usage: mem_warming_pattern_file="/var/tmp/my_memory_pattern" mem_warming_pattern_fileDefault value: CFG_DIR/mem_warming_pattern
Example of usage: [@ mem_warming_pattern_file="/var/tmp/my_memory_pattern" March 06, 2015, at 03:02 PM
by
- Changed line 783 from:
Memory warming is useful when dealing with high volumes of traffic, because fragmenting the big chunk of memory is a "critical region" from locking point of view. The initial fragmentation allows the HP allocator to behave optimally in the first minute(s) after a restart. to:
Memory warming is useful when dealing with high volumes of traffic, because processes must mutually exclude themselves when chopping up the initial big memory chunk. By performing fragmentation on startup, OpenSIPS will also behave optimally in the first minute(s) after a restart. March 06, 2015, at 02:58 PM
by
- Added lines 780-783:
March 06, 2015, at 02:46 PM
by
- Changed lines 257-269 from:
mem_warmingDefault value: off
Example of usage: mem_warming=on to:
Added lines 772-784:
mem_warmingDefault value: off
Example of usage: mem_warming=on March 06, 2015, at 02:45 PM
by
- Changed lines 257-268 from:
to:
mem_warmingDefault value: off
Example of usage: mem_warming=on March 05, 2015, at 02:25 PM
by
- Changed line 1234 from:
Only relevant when is set to true. Enables the use of the , otherwise they will have no effect. to:
Only relevant when log_stderror is set to true. Enables the use of the color escape sequences, otherwise they will have no effect. March 05, 2015, at 02:20 PM
by
- Added lines 1217-1220:
Default value: 4096
Added lines 1226-1238:
@] xlog_force_colorDefault value: false
Usage example: [@ xlog_force_color = true March 05, 2015, at 02:13 PM
by
- Added lines 1213-1221:
@] xlog_buf_sizeSize of the buffer used to print a single line on the chosen logging facility of OpenSIPS. If the buffer is too small, an overflow error will be printed, and the concerned line will be skipped. Usage example: [@ xlog_buf_size = 8388608 #given in bytes January 29, 2015, at 12:48 PM
by
- Changed line 849 from:
The poll method to be used by the I/O internal reactor - by default the best one for the current OS is selected. The available types are: poll, epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll to:
The poll method to be used by the I/O internal reactor - by default the best one for the current OS is selected. The available types are: poll, epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll . January 29, 2015, at 12:44 PM
by
- Changed lines 847-850 from:
portThe port the SIP server listens to. The default value for it is 5060. to:
poll_methodThe poll method to be used by the I/O internal reactor - by default the best one for the current OS is selected. The available types are: poll, epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll Added lines 853-861:
poll_method=select portThe port the SIP server listens to. The default value for it is 5060. Example of usage: Deleted lines 1041-1048:
tcp_poll_methodpoll method used (by default the best one for the current OS is selected). For available types see io_wait.c and poll_types.h: none, poll, epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll Example of usage: tcp_poll_method=select January 23, 2015, at 01:31 PM
by
- Added line 421:
[@ Added line 423:
@] January 23, 2015, at 01:30 PM
by
- Added lines 411-421:
db_max_async_connectionsMaximum number of TCP connections opened from a single OpenSIPS worker to each individual SQL backend. Default value is 10. Individual backends are determined from DB URLs as follows: [ scheme, user, pass, host, port, database ] Example of usage: db_max_async_connections=220 December 19, 2014, at 01:50 PM
by
- Added lines 1098-1113:
tcp_crlf_pingpongSend CRLF pong (\r\n) to incoming CRLFCRLF ping. By default it is enabled (1). Example of usage: tcp_crlf_pingpong = 0 tcp_crlf_dropDrop CRLF (\r\n) ping messages. By default it is disabled (0). Example of usage: tcp_crlf_drop = 1 March 20, 2014, at 10:09 PM
by
- Changed line 906 from:
Only relevant when the HP_MALLOC compile flag is enabled. It controls how many memory buckets will be optimized. (e.g. setting it to 2% will optimize the first 81 most used buckets as frequency). The default value is 1%. to:
Only relevant when the HP_MALLOC compile flag is enabled. It controls how many memory buckets will be optimized. (e.g. setting it to 2% will optimize the first 81 most used buckets as frequency). The default value is 1. March 20, 2014, at 10:08 PM
by
- Changed lines 906-907 from:
Only relevant when the HP_MALLOC compile flag is enabled. It controls how many memory buckets will be optimized. (e.g. setting it to 2% will optimize the first 81 most used buckets as frequency) to:
Only relevant when the HP_MALLOC compile flag is enabled. It controls how many memory buckets will be optimized. (e.g. setting it to 2% will optimize the first 81 most used buckets as frequency). The default value is 1%. Changed line 910 from:
Only relevant when the HP_MALLOC compile flag is enabled. It represents the optimization factor of a single bucket (e.g. setting it to 4 will cause the optimized buckets to be further split into 4) to:
Only relevant when the HP_MALLOC compile flag is enabled. It represents the optimization factor of a single bucket (e.g. setting it to 4 will cause the optimized buckets to be further split into 4). The default value is 8. March 20, 2014, at 10:07 PM
by
- Changed lines 904-910 from:
shm_hash_split_percentage (with HP_MALLOC compile flag enabled)This parameter controls how many memory buckets will be optimized. (e.g. setting it to 2% will optimize the first 81 most used buckets as frequency) shm_secondary_hash_size (with HP_MALLOC compile flag enabled)This parameter represents the optimization factor of a single bucket (e.g. setting it to 4 will cause the optimized buckets to be further split into 4) to:
shm_hash_split_percentageOnly relevant when the HP_MALLOC compile flag is enabled. It controls how many memory buckets will be optimized. (e.g. setting it to 2% will optimize the first 81 most used buckets as frequency) shm_secondary_hash_sizeOnly relevant when the HP_MALLOC compile flag is enabled. It represents the optimization factor of a single bucket (e.g. setting it to 4 will cause the optimized buckets to be further split into 4) March 20, 2014, at 10:03 PM
by
- Added lines 903-910:
shm_hash_split_percentage (with HP_MALLOC compile flag enabled)This parameter controls how many memory buckets will be optimized. (e.g. setting it to 2% will optimize the first 81 most used buckets as frequency) shm_secondary_hash_size (with HP_MALLOC compile flag enabled)This parameter represents the optimization factor of a single bucket (e.g. setting it to 4 will cause the optimized buckets to be further split into 4) March 20, 2014, at 08:24 PM
by
- Added lines 1-1177:
Documentation -> Manuals -> Manual 2.4 -> Core Parameters(:title Core Parameters - 2.4:) (:allVersions Script-CoreParameters 2.4:)
(:toc-float Table of Content:) This section lists the all the parameters exported by OpenSIPS core for script usage (to be used in opensips.cfg) This document is for OpenSIPS 1.12.x
Core KeywordsKeywords specific to SIP messages which can be used mainly in 'if' expressions. afThe address family of the received SIP message. It is INET if the message was received over IPv4 or INET6 if the message was received over IPv6. Exampe of usage: if(af==INET6) { log("Message received over IPv6 link\n"); }; dst_ipThe IP of the local interface where the SIP message was received. When the proxy listens on many network interfaces, makes possible to detect which was the one that received the packet. Example of usage: if(dst_ip==127.0.0.1) { log("message received on loopback interface\n"); }; dst_portThe local port where the SIP packet was received. When OpenSIPS is listening on many ports, it is useful to learn which was the one that received the SIP packet. Example of usage: if(dst_port==5061) { log("message was received on port 5061\n"); }; from_uriThis script variable is a reference to the URI of 'From' header. It can be used to test 'From'- header URI value. Example of usage: if(is_method("INVITE") && from_uri=~".*@opensips.org") { log("the caller is from opensips.org\n"); }; methodThe variable is a reference to the SIP method of the message. Example of usage: if(method=="REGISTER") { log("this SIP request is a REGISTER message\n"); }; msg:lenThe variable is a reference to the size of the message. It can be used in 'if' constructs to test message's size. Example of usage: if(msg:len>2048) { sl_send_reply("413", "message too large"); exit; }; $retcodeIt represents the value returned by last function executed (similar to $? from bash -- if you wish, you can use also $? in OpenSIPS config, both names '$retcode' and '$?' are supported). If tested after a call of a route, it is the value retuned by that route. Example of usage: route { route(1); if($retcode==1) { log("The request is an INVITE\n"); }; } route[1] { if(is_method("INVITE")) return(1); return(2); } protoThis variable can be used to test the transport protocol of the SIP message. Example of usage: if(proto==UDP) { log("SIP message received over UDP\n"); }; statusIf used in onreply_route, this variable is a reference to the status code of the reply. If it used in a standard route block, the variable is a reference to the status of the last reply sent out for the current request. Example of usage: if(status=="200") { log("this is a 200 OK reply\n"); }; src_ipReference to source IP address of the SIP message. Example of usage: if(src_ip==127.0.0.1) { log("the message was sent from localhost!\n"); }; src_portReference to source port of the SIP message (from which port the message was sent by previous hop). Example of usage: if(src_port==5061) { log("message sent from port 5061\n"); } to_uriThis variable can be used to test the value of URI from To header. Example of usage: if(to_uri=~"sip:.+@opensips.org") { log("this is a request for opensips.org users\n"); }; uriThis variable can be used to test the value of the request URI. Example of usage: if(uri=~"sip:.+@opensips.org") { log("this is a request for opensips.org users\n"); }; (:toc-back:)
Core ValuesValues that can be used in 'if' expressions to check against Core Keywords INETThis keyword can be used to test whether the SIP packet was received over an IPv4 connection. Example of usage: if(af==INET) { log("the SIP message was received over IPv4\n"); }; INET6This keyword can be used to test whether the SIP packet was received over an IPv6 connection. Example of usage: if(af==INET6) { log("the SIP message was received over IPv6\n"); }; TCPThis keyword can be used to test the value of 'proto' and check whether the SIP packet was received over TCP or not. Example of usage: if(proto==TCP) { log("the SIP message was received over TCP\n"); }; UDPThis keyword can be used to test the value of 'proto' and check whether the SIP packet was received over UDP or not. Example of usage: if(proto==UDP) { log("the SIP message was received over UDP\n"); }; max_lenThis keyword is set to the maximum size of an UDP packet. It can be used to test message's size. Example of usage: if(msg:len>max_len) { sl_send_reply("413", "message too large to be forwarded over UDP without fragmentation"); exit; } myselfIt is a reference to the list of local IP addresses, hostnames and aliases that has been set in OpenSIPS configuration file. This lists contain the domains served by OpenSIPS. The variable can be used to test if the host part of an URI is in the list. The usefulness of this test is to select the messages that has to be processed locally or has to be forwarded to another server. See "alias" to add hostnames,IP addresses and aliases to the list. Example of usage: if(uri==myself) { log("the request is for local processing\n"); }; nullCan be used in assignment to reset the value of a per-script variable or to delete an avp. Example of usage: $avp(i:12) = null; $var(x) = null; (:toc-back:)
Core parametersGlobal parameters that can be set in configuration file. Accepted values are, depending on the actual parameters strings, numbers and yes/ no. If you need to specify either "yes" or "no" as part of a string, wrap this in double quotes. advertised_addressIt can be an IP address or string and represents the address advertised in Via header and other destination lumps (e.g RR header). If empty or not set (default value) the socket address from where the request will be sent is used. WARNING: - don't set it unless you know what you are doing (e.g. nat traversal) - you can set anything here, no check is made (e.g. foo.bar will be accepted even if foo.bar doesn't exist) Example of usage: advertised_address="opensips.org" NOTE: Aside this global approach, you can also define an advertise IP and port in a per-interface manner (see the "listen" parameter). When advertise values are defined per interface, they will be used only for traffic leaving that interface only. advertised_portThe port advertised in Via header and other destination lumps (e.g. RR). If empty or not set (default value) the port from where the message will be sent is used. Same warnings as for 'advertised_address'. Example of usage: advertised_port=5080 NOTE: Aside this global approach, you can also define an advertise IP and port in a per-interface manner (see the "listen" parameter). When advertise values are defined per interface, they will be used only for traffic leaving that interface only. aliasParameter to set alias hostnames for the server. It can be set many times, each value being added in a list to match the hostname when 'myself' is checked. It is necessary to include the port (the port value used in the "port=" or "listen=" definitions) in the alias definition otherwise the loose_route() function will not work as expected for local forwards Example of usage: alias=other.domain.com:5060 alias=another.domain.com:5060 auto_aliasesThis parameter controls if aliases should be automatically discovered and added during fixing listening sockets. The auto discovered aliases are result of the DNS lookup (if listen is a name and not IP) or of a reverse DNS lookup on the listen IP. Far backward compatibility reasons, the default value is "on". Example of usage: auto_aliases=no auto_aliases=0 bin_listenDefines a UDP listening interface for one or more Binary Packet Receivers. Default value is "null" (not listening). Example of usage: bin_listen=10.0.0.150:5062 bin_childrenThe number of UDP listeners for the Binary Internal Interface. Default value is 1. Example of usage: bin_children=4 check_viaCheck if the address in top most via of replies is local. Default value is 0 (check disabled). Example of usage: check_via=1 childrenNumber of children to fork for each UDP or SCTP interface you have defined. Default value is 8. Example of usage: children=16 NOTE: this global value (applicable for all UDP/SCTP interfaces) can be override if you set a different number of children in the definition of a specific interface - so actually you can define a different number of children for each interface (see the "listen" parameter for syntax). chrootThe value must be a valid path in the system. If set, OpenSIPS will chroot (change root directory) to its value. Example of usage: chroot=/other/fakeroot db_version_tableThe name of the table version to be used by the DB API to check the version of the used tables. Example of usage: db_version_table="version_1_8" db_default_urlThe default DB URL to be used by modules if no per-module URL is given. Default is NULL (not defined) Example of usage: db_default_url="mysql://opensips:opensipsrw@localhost/opensips" debugSet the debug level. Higher values make OpenSIPS to print more debug messages. Examples of usage: debug=1 -- print only important messages (like errors or more critical situations) - recommended for running proxy as daemon debug=4 -- print a lot of debug messages - use it only when doing debugging sessions Actual values are:
The 'debug' parameter is usually used in concordance with 'log_stderror' parameter. Value of 'debug' parameter can also be get and set dynamically using 'debug' Core MI function. disable_503_translationIf 'yes', OpenSIPS will not translate the received 503 replies into 500 replies (RFC 3261 clearly states that a proxy should never relay a 503 response, but instead it must transform it into a 500). Default value is 'no' (do translation). disable_core_dumpCan be 'yes' or 'no'. By default core dump limits are set to unlimited or a high enough value. Set this config variable to 'yes' to disable core dump-ing (will set core limits to 0). Default value is 'no'. Example of usage: disable_core_dump=yes disable_dns_blacklistThe DNS resolver, when configured with failover, can automatically store in a temporary blacklist the failed destinations. This will prevent (for a limited period of time) OpenSIPS to send requests to destination known as failed. So, the blacklist can be used as a memory for the DNS resolver. The temporary blacklist created by DNS resolver is named "dns" and it is by default selected for usage (no need use the use_blacklist()) function. The rules from this list have a life time of 4 minutes - you can change it at compile time, from resolve.c . Can be 'yes' or 'no'. By default the blacklist is disabled (Default value is 'yes'). Example of usage: disable_dns_blacklist=no disable_dns_failoverCan be 'yes' or 'no'. By default DNS-based failover is enabled. Set this config variable to 'yes' to disable the DNS-based failover. This is a global option, affecting the core and the modules also. Default value is 'no'. Example of usage: disable_dns_failover=yes disable_stateless_fwdCan be 'yes' or 'no'. This parameter controls the handling of stateless replies: yes - drop stateless replies if stateless fwd functions (like forward) are not used in script no - forward stateless replies Default value is 'yes'. disable_tcpGlobal parameter to disable TCP support in the SIP server. Default value is 'no'. Example of usage: disable_tcp=yes disable_tlsGlobal parameter to disable TLS support in the SIP server. Default value is 'yes'. Example of usage: disable_tcp=no dnsThis parameter controls if the SIP server should attempt to lookup its own domain name in DNS. If this parameter is set to yes and the domain name is not in DNS a warning is printed on syslog and a "received=" field is added to the via header. Default is no. dns_retr_timeTime in seconds before retrying a dns request. Default value is system specific, depends also on the '/etc/resolv.conf' content (usually 5s). Example of usage: dns_retr_time=3 dns_retr_noNumber of dns retransmissions before giving up. Default value is system specific, depends also on the '/etc/resolv.conf' content (usually 4). Example of usage: dns_retr_no=3 dns_servers_noHow many dns servers from the ones defined in '/etc/resolv.conf' will be used. Default value is to use all of them. Example of usage: dns_servers_no=2 dns_try_ipv6Can be 'yes' or 'no'. If it is set to 'yes' and a DNS lookup fails, it will retry it for ipv6 (AAAA record). Default value is 'no'. Example of usage: dns_try_ipv6=yes dns_try_naptrDisables the NAPTR lookups when doing DNS based routing for SIP requests - if disabled, the DNS lookup will start with SRV lookups. Can be 'yes' or 'no'. By default it is enabled, value 'yes'. Example of usage: dns_try_naptr=no dns_use_search_listCan be 'yes' or 'no'. If set to 'no', the search list in '/etc/resolv.conf' will be ignored (=> fewer lookups => gives up faster). Default value is 'yes'. HINT: even if you don't have a search list defined, setting this option to 'no' will still be "faster", because an empty search list is in fact search "" (so even if the search list is empty/missing there will still be 2 dns queries, eg. foo+'.' and foo+""+'.') Example of usage: dns_use_search_list=no dst_blacklistDefinition of a static (read-only) IP/destination blacklist. These lists can be selected from script (at runtime) to filter the outgoing requests, based on IP, protocol, port, etc. Its primary purposes will be to prevent sending requests to critical IPs (like GWs) due DNS or to avoid sending to destinations that are known to be unavailable (temporary or permanent). Example of usage: # filter out requests going to ips of my gws dst_blacklist = gw:{( tcp , 192.468.2.400 , 5060 , "" ),( any , 192.468.2.401 , 0 , "" )} # block requests going to "evil" networks dst_blacklist = net_filter:{ ( any , 192.468.1.120/255.255.255.0 , 0 , "" )} # block message requests with nasty words dst_blacklist = msg_filter:{ ( any , 192.468.20.0/255.255.255.0 , 0 , "MESSAGE*ugly_word" )} # block requests not going to a specific subnet dst_blacklist = net_filter2:{ !( any , 192.468.30.0/255.255.255.0 , 0 , "" )} Each rule is defined by:
event_pkg_thresholdA number representing the percentage threshold above which the E_CORE_PKG_THRESHOLD event is raised, warning about low amount of free private memory. It accepts integer values between 0 and 100. Default value is 0 ( event disabled ). Example of usage: event_pkg_threshold = 90 event_shm_thresholdA number representing the percentage threshold above which the E_CORE_SHM_THRESHOLD event is raised, warning about low amount of free shared memory. It accepts integer values between 0 and 100. Default value is 0 ( event disabled ). Example of usage: event_shm_threshold = 90 exec_dns_thresholdA number representing the maximum number of microseconds a DNS query is expected to last. Anything above the set number will trigger a warning message to the logging facility. Default value is 0 ( logging disabled ). Example of usage: exec_dns_threshold = 60000 exec_msg_thresholdA number representing the maximum number of microseconds the processing of a SIP msg is expected to last. Anything above the set number will trigger a warning message to the logging facility. Aside from the message and the processing time, the most time consuming function calls from the script will also be logged. Default value is 0 ( logging disabled ). Example of usage: exec_msg_threshold = 60000 forkIf set to 'yes' the proxy will fork and run in daemon mode - one process will be created for each network interface the proxy listens to and for each protocol (TCP/UDP), multiplied with the value of 'children' parameter. When set to 'no', the proxy will stay bound to the terminal and runs as single process. First interface is used for listening to. OpenSIPS will only listen on UDP. Since the process is attached to the controlling terminal, not PID file will be created even if the -P command line option was specified. Default value is 'yes'. Example of usage: fork=no group gidThe group id to run OpenSIPS. Example of usage: group="opensips" include_fileCan be called from outside route blocks to load additional routes/blocks or from inside them to simply preform more functions. The file path can be relative or absolute. If it is not an absolute path, first attempt is to locate it relative to current directory. If that fails, second try is relative to directory of the file that includes it. Will throw an error if file is not found. Example of usage: include_file "proxy_regs.cfg" import_fileSame as include_file but will not throw an error if file is not found. Example of usage: import_file "proxy_regs.cfg" listenSet the network addresses the SIP server should listen to. It can be an IP address, hostname or network interface id or combination of protocol:address:port (e.g., udp:10.10.10.10:5060). This parameter can be set multiple times in same configuration file, the server listening on all addresses specified. The listen definition may accept several optional parameters for:
Remember that this parameters have affect only for the interface they are configured for; if not defined per interface, the global values will be used. Example of usage: listen=10.10.10.10 listen=eth1:5062 listen=udp:10.10.10.10:5064 listen=udp:127.0.0.1:5060 use_children 5 listen=udp:127.0.0.1:5060 as 99.88.44.33:5060 use_children 3 listen=127.0.0.1 use_children 3 If you omit this directive then the SIP server will listen on all interfaces. On start the SIP server reports all the interfaces that it is listening on. Even if you specify only UDP interfaces here, the server will start the TCP engine too. If you don't want this, you need to disable the TCP support completely with the core parameter disable_tcp. log_facilityIf OpenSIPS logs to syslog, you can control the facility for logging. Very useful when you want to divert all OpenSIPS logs to a different log file. See the man page syslog(3) for more details. For more see: http://www.voice-system.ro/docs/ser-syslog/ Default value is LOG_DAEMON. Example of usage: log_facility=LOG_LOCAL0 log_nameSet the id to be printed in syslog. The value must be a string and has effect only when OpenSIPS runs in daemon mode (fork=yes), after daemonize. Default value is argv[0]. Example of usage: log_name="osips-5070" log_stderrorWith this parameter you can make OpenSIPS to write log and debug messages to standard error. Possible values are: - "yes" - write the messages to standard error - "no" - write the messages to syslog Default value is "no". For more see: http://www.voice-system.ro/docs/ser-syslog/ Example of usage: log_stderror=yes max_while_loopsThe parameters set the value of maximum loops that can be done within a "while". Comes as a protection to avoid infinite loops in config file execution. Default is 100. Example of usage: max_while_loops=200 maxbufferThe size in bytes not to be exceeded during the auto-probing procedure of discovering the maximum buffer size for receiving UDP messages. Default value is 262144. Example of usage: maxbuffer=65536 memdump | mem_dumpLog level to print memory status information (runtime and shutdown). It has to be less than the value of 'debug' parameter if you want memory info to be logged. Default: memdump=L_DBG (4) Example of usage: memdump=2 NOTE that setting memlog (see below), will also set the memdump parameter - if you want different values for memlog and memdump, you need to first set memlog and then memdump. memlog | mem_logLog level to print memory debug info. It has to be less than the value of 'debug' parameter if you want memory info to be logged. Default: memlog=L_DBG (4) Example of usage: memlog=2 NOTE: by setting memlog parameter, the memdump will automatically be set to the same value (see memdump docs). mcast_loopbackIt can be 'yes' or 'no'. If set to 'yes', multicast datagram are sent over loopback. Default value is 'no'. Example of usage: mcast_loopback=yes mcast_ttlSet the value for multicast ttl. Default value is OS specific (usually 1). Example of usage: mcast_ttl=32 mhomedSet the server to try to locate outbound interface on multihomed host. By default is not (0) - it is rather time consuming. Example of usage: mhomed=1 mpathSet the module search path. This can be used to simplify the loadmodule parameter Example of usage: mpath="/usr/local/lib/opensips/modules" loadmodule "mysql.so" loadmodule "uri.so" loadmodule "uri_db.so" loadmodule "sl.so" loadmodule "tm.so" ... open_files_limitIf set and bigger than the current open file limit, OpenSIPS will try to increase its open file limit to this number. Note: OpenSIPS must be started as root to be able to increase a limit past the hard limit (which, for open files, is 1024 on most systems). Example of usage: open_files_limit=2048 portThe port the SIP server listens to. The default value for it is 5060. Example of usage: port=5080 reply_to_viaIf it is set to 1, any local reply is sent to the address advertised in top most Via of the request. Default value is 0 (off). Example of usage: reply_to_via=0 query_buffer_sizeIf set to a value greater than 1, inserts to DB will not be flushed one by one. Rows to be inserted will be kept in memory until until they gather up to query_buffer_size rows, and only then they will be flushed to the database. Example of usage: query_buffer_size=5 query_flush_timeIf query_buffer_size is set to a value greater than 1, a timer will trigger once every query_flush_time seconds, ensuring that no row will be kept for too long in memory. Example of usage: query_flush_time=10 rev_dnsThis parameter controls if the SIP server should attempt to lookup its own IP address in DNS. If this parameter is set to yes and the IP address is not in DNS a warning is printed on syslog and a "received=" field is added to the via header. Default is no. server_headerThe body of Server header field generated by OpenSIPS when it sends a request as UAS. It defaults to "OpenSIPS (<version> (<arch>/<os>))". Example of usage: server_header="Server: My Company SIP Proxy" Please note that you have to add the header name "Server:", otherwise OpenSIPS will just write a header like: My Company SIP Proxy server_signatureThis parameter controls the "Server" header in any locally generated message. Example of usage: server_signature=no If it is enabled (default=yes) a header is generated as in the following example: Server: OpenSIPS (0.9.5 (i386/linux)) sip_warningCan be 0 or 1. If set to 1 (default value is 0) a 'Warning' header is added to each reply generated by OpenSIPS. The header contains several details that help troubleshooting using the network traffic dumps. Example of usage: sip_warning=0 tcp_asyncIf the TCP connect and write operations should be done in an asynchronous mode. Default value is 0 ( blocking connect & write ) Example of usage: tcp_async=1 tcp_async_local_connect_timeoutIf tcp_async is enabled, this specifies the number of microseconds that a connect will be tried in blocking mode ( optimization ). If the connect operation lasts more than this, the connect will go to async mode and will be passed to TCP MAIN for polling. Default value is 10000 ( 10 ms ) Example of usage: tcp_async_local_connect_timeout=20000 tcp_async_local_write_timeoutIf tcp_async is enabled, this specifies the number of microseconds that a write op will be tried in blocking mode ( optimization ). If the write operation lasts more than this, the write will go to async mode and will be passed to TCP MAIN for polling. Default value is 10000 ( 10 ms ) Example of usage: tcp_async_local_write_timeout=20000 tcp_async_max_postponed_chunksIf tcp_async is enabled, this specifies the maximum number of SIP messages that can be stashed for later/async writing. If the connection pending writes exceed this number, the connection will be marked as broken and dropped. Default value is 32 Example of usage: tcp_async_max_postponed_chunks=64 tcp_childrenNumber of children processes to be created for reading from TCP connections. If no value is explicitly set, the same number of TCP children as UDP children (see "children" parameter) will be used. Example of usage: tcp_children=4 tcp_accept_aliasestcp_listen_backlogThe backlog argument defines the maximum length to which the queue of pending connections for the TCP listeners may grow. If a connection request arrives when the queue is full, the client may receive an error with an indication of ECONNREFUSED or, if the underlying protocol supports retransmission, the request may be ignored so that a later reattempt at connection succeeds. Default configured value is 10. tcp_send_timeoutTime in seconds after a TCP connection will be closed if it is not available for blocking writing in this interval (and OpenSIPS wants to send something on it). Example of usage: tcp_send_timeout=3 tcp_connect_timeoutTime in seconds before an ongoing blocking attempt to connect will be aborted. Example of usage: tcp_connect_timeout=5 tcp_connection_lifetime!!!!Lifetime in seconds for TCP sessions. TCP sessions which are inactive for >tcp_connection_lifetime will be closed by OpenSIPS. Default value is defined in tcp_conn.h: #define DEFAULT_TCP_CONNECTION_LIFETIME 120. Setting this value to 0 will close the TCP connection pretty quick ;-). You can also set the TCP lifetime to the expire value of the REGISTER by using the tcp_persistent_flag parameter of the registrar module. Example of usage: tcp_connection_lifetime=3600 tcp_max_connectionsmaximum number of tcp connections (if the number is exceeded no new tcp connections will be accepted). Default is defined in tcp_conn.h: #define DEFAULT_TCP_MAX_CONNECTIONS 2048 Example of usage: tcp_max_connections=4096 tcp_max_msg_chunksThe maximum number of chunks that a SIP message is expected to arrive via TCP. If a packet is received more fragmented than this, the connection is dropped ( either the connection is very overloaded and this leads to high fragmentation - or we are the victim of an ongoing attack where the attacker is sending the traffic very fragmented in order to decrease our performance ). Default value is is 4 Example of usage: tcp_max_msg_chunks=8 tcp_max_msg_timeThe maximum number of seconds that a SIP message is expected to arrive via TCP. If a single SIP packet is still not fully received after this number of seconds, the connection is dropped ( either the connection is very overloaded and this leads to high fragmentation - or we are the victim of an ongoing attack where the attacker is sending the traffic very fragmented in order to decrease our performance ). Default value is is 4 Example of usage: tcp_max_msg_time=8 tcp_poll_methodpoll method used (by default the best one for the current OS is selected). For available types see io_wait.c and poll_types.h: none, poll, epoll_lt, epoll_et, sigio_rt, select, kqueue, /dev/poll Example of usage: tcp_poll_method=select tcp_no_new_conn_bflagA branch flag to be used as marker to instruct OpenSIPS not to attempt to open a new TCP connection when delivering a request, but only to reuse an existing one (if available). If no existing conn, a generic send error will be returned. This is intended to be used in NAT scenarios, where makes no sense to open a TCP connection towards a destination behind a NAT (like TCP connection created during registration was lost, so there is no way to contact the device until it re-REGISTER). Also this can be used to detect when a NATed registered user lost his TCP connection, so that opensips can disable his registration as useless. Example of usage: tcp_no_new_conn_bflag = 6 .... route{ .... if( destination_behin_nat && proto==TCP ) setbflag(6); .... t_relay("0x02"); # no auto error reply $var(retcode) = $rc; if ($var(retcode)==-6) { #send error xlog("unable to send request to destination"); send_reply("404","Not found"); exit; } else if ($var(retcode)<0) { sl_reply_error(); exit; } .... } tcp_thresholdA number representing the maximum number of microseconds sending of a TCP request is expected to last. Anything above the set number will trigger a warning message to the logging facility. Default value is 0 ( logging disabled ). Example of usage: tcp_threshold = 60000 tcp_keepaliveEnable / disable TCP keepalive Example of usage: tcp_keepalive = 1 tcp_keepcountNumber of keepalives to send before closing the connection (Linux only) Example of usage: tcp_keepcount = 5 tcp_keepidleAmount of time before OpenSIPS will start to send keepalives if the connection is idle (Linux only) Example of usage: tcp_keepidle = 30 tcp_keepintervalInterval between keepalive probes, if the previous one failed (Linux only) Example of usage: tcp_keepinterval = 10 tls_ca_listtls_certificatetls_ciphers_listtls_domaintls_handshake_timeouttls_logtls_methodtls_port_notls_private_keytls_require_certificatetls_send_timeouttls_verifytosThe TOS (Type Of Service) to be used for the sent IP packages (both TCP and UDP). Example of usage: tos=IPTOS_LOWDELAY tos=0x10 tos=IPTOS_RELIABILITY user uidThe user id to run OpenSIPS (OpenSIPS will suid to it). Example of usage: user="opensips" user_agent_headerThe body of User-Agent header field generated by OpenSIPS when it sends a request as UAC. It defaults to "OpenSIPS (<version> (<arch>/<os>))". Example of usage: user_agent_header="User-Agent: My Company SIP Proxy" Please note that you have to include the header name "User-Agent:" as OpenSIPS does not add it and you will get an erroneous header like: My Company SIP Proxy wdirThe working directory used by OpenSIPS at runtime. You might find it usefull when come to generating core files :) Example of usage: wdir="/usr/local/opensips" or wdir=/usr/opensips_wd (:toc-back:) |