User Tools

Site Tools


cookbooks:devel:core

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cookbooks:devel:core [2021/12/13 14:47]
miconda [tcp_rd_buf_size]
cookbooks:devel:core [2022/04/11 17:10] (current)
bkaufman [substdefs]
Line 439: Line 439:
  
 Similar to **subst**, but in addition it adds a **#!define ID "subst"** (note the difference from #!substdef that the value for define is enclosed in double quotes, useful when the define is used in a place for a string value). Similar to **subst**, but in addition it adds a **#!define ID "subst"** (note the difference from #!substdef that the value for define is enclosed in double quotes, useful when the define is used in a place for a string value).
 +
 +==== trydefenv ====
 +
 +<code c>
 +#!trydefenv ID=ENVVAR
 +</code>
 +
 +Similar to **defenv**, but will not error if the environmental variable is not set.  This allows for boolean defines via system ENVVARs.  For example, using an environmental variable to toggle loading of db_mysql:
 +
 +<code c>
 +#!trydefenv WITH_MYSQL
 +
 +#!ifdef WITH_MYSQL
 +loadmodule "db_mysql.so"
 +#!ifdef
 +</code>
 +
 +==== trydefenvns ====
 +
 +Similar to **#!trydefenv**, but the value is defined in between double quotes to make it convenient to be used as a string token.
 +
 +<code c>
 +#!trydefenvs ENVVAR
 +#!trydefenvs ID=ENVVAR
 +</code>
 +
 ===== Core Keywords ===== ===== Core Keywords =====
  
Line 1229: Line 1255:
  
 Note that there is no internal check for uniqueness of the socket names, the admin has to ensure it in order to be sure the desired socket is selected, otherwise the first socket with a matching name is used. Note that there is no internal check for uniqueness of the socket names, the admin has to ensure it in order to be sure the desired socket is selected, otherwise the first socket with a matching name is used.
 +
 +As of 5.6, there is now a **virtual** identifier which can be added to the end of each listen directive. This can be used in combination with any other identifier, but must be added at the end of the line.
 +
 +<code c>
 +    listen=udp:10.1.1.1:5060 virtual
 +    listen=udp:10.0.0.10:5060 name "s1" virtual
 +    listen=udp:10.10.10.10:5060 advertise 11.11.11.11:5060 virtual
 +    listen=udp:10.10.10.20:5060 advertise "mysipdomain.com" name "s3" virtual
 +</code>
 +
 +The **virtual** identifier is meant for use in situations where you have a floating/virtual IP address on your system that may not always be active on the system. It is particularly useful for active/active virtual IP situations, where otherwise things like usrloc PATH support can break due to incorrect "check_self" results.
 +
 +This identifier will change the behaviour of how "myself", "is_myself" or "check_self" matches against traffic destined to this IP address. By default, Kamailio always considers traffic destined to a listen IP as "local" regardless of if the IP is currently locally active. With this flag set, Kamailio will do an extra check to make sure the IP is currently a local IP address before considering the traffic as local. 
 +
 +This means that if Kamailio is listening on an IP that is not currently local, it will recognise that, and can relay the traffic to another Kamailio node as needed, instead of thinking it always needs to handle the traffic.
 +
 ==== loadmodule ==== ==== loadmodule ====
  
Line 1535: Line 1577:
   * 4 - summary of pkg used blocks   * 4 - summary of pkg used blocks
   * 8 - summary of shm used blocks   * 8 - summary of shm used blocks
 +  * 16 - short status
  
 If set to 0, nothing is printed. If set to 0, nothing is printed.
  
-Default value: 3+Default value: 12
  
 Example: Example:
Line 2438: Line 2481:
  
   tcp_reuse_port = yes (default no)   tcp_reuse_port = yes (default no)
 +
 +==== tcp_script_mode ====
 +
 +Specify if connection should be closed (set to CONN_ERROR) if processing the received message results in error (that can also be due to negative return code from a configuration script main route block). If set to 1, the processing continues with the connection open.
 +
 +Default 0 (close connection)
 +
 +<code>
 +tcp_script_mode = 1
 +</code>
  
 ==== tcp_send_timeout ==== ==== tcp_send_timeout ====
cookbooks/devel/core.1639403259.txt.gz ยท Last modified: 2021/12/13 14:47 by miconda