cookbooks:3.2.x:core
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
cookbooks:3.2.x:core [2011/10/18 16:42] – created miconda | cookbooks:3.2.x:core [2016/02/02 15:31] (current) – !~ does not exist in 3.2 alexh | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Kamailio | + | ====== Kamailio |
This tutorial collects the functions and parameters exported by Kamailio core to configuration file. | This tutorial collects the functions and parameters exported by Kamailio core to configuration file. | ||
Line 59: | Line 59: | ||
* #!else - swtich to false branch of ifdef/ | * #!else - swtich to false branch of ifdef/ | ||
* #!endif - end ifdef/ | * #!endif - end ifdef/ | ||
+ | * #!trydef - add a define if not already defined | ||
+ | * #!redefine - force redefinition even if already defined | ||
Among benefits: | Among benefits: | ||
Line 182: | Line 184: | ||
<code c> | <code c> | ||
- | #!subst "/ | + | #!substdef |
</ | </ | ||
Line 643: | Line 645: | ||
Prototype: **loadmodule " | Prototype: **loadmodule " | ||
- | If modulepath is only modulename or modulename.so, | + | If modulepath is only modulename or modulename.so, |
Example of usage: | Example of usage: | ||
Line 808: | Line 810: | ||
==== mem_summary ==== | ==== mem_summary ==== | ||
- | Parameter to control printing of mmemory | + | Parameter to control printing of memory |
* 1 - dump all the pkg used blocks (status) | * 1 - dump all the pkg used blocks (status) | ||
* 2 - dump all the shm used blocks (status) | * 2 - dump all the shm used blocks (status) | ||
Line 826: | Line 828: | ||
==== mhomed ==== | ==== mhomed ==== | ||
- | Set the server to try to locate outbound interface on multihomed host. This parameter affects the selection of the outgoing socket for forwarding requests. By default is off (0) - it is rather time consuming. When decativated, the incoming socket will be used or the first one for a different protocol, disregarding the destination location. When activated, sip-router will select a socket that can reach the destination (to be able to connect to the remote address). (sip-router opens a UDP socket to the destination, | + | Set the server to try to locate outbound interface on multihomed host. This parameter affects the selection of the outgoing socket for forwarding requests. By default is off (0) - it is rather time consuming. When deactivated, the incoming socket will be used or the first one for a different protocol, disregarding the destination location. When activated, sip-router will select a socket that can reach the destination (to be able to connect to the remote address). (sip-router opens a UDP socket to the destination, |
Example of usage: | Example of usage: | ||
Line 856: | Line 858: | ||
==== phone2tel ==== | ==== phone2tel ==== | ||
- | By enabling this feature, SIP-Router internally treats SIP URIs with user=phone parameter as TEL URIs. If you do not want thi behavior, you have to turn it off. | + | By enabling this feature, SIP-Router internally treats SIP URIs with user=phone parameter as TEL URIs. If you do not want this behavior, you have to turn it off. |
Default value: 1 (enabled) | Default value: 1 (enabled) | ||
Line 971: | Line 973: | ||
CSeq exactly the same way as TM does. This is good for reboot - than messages belonging to transaction lost due to reboot will still be forwarded with the same branch parameter and will be match-able downstream. | CSeq exactly the same way as TM does. This is good for reboot - than messages belonging to transaction lost due to reboot will still be forwarded with the same branch parameter and will be match-able downstream. | ||
- | If it is turned on, just a simple value is put into the branch | + | If it is turned on (default, value is 1), just a simple value is put into the branch |
+ | <code c> | ||
+ | syn_branch=0 | ||
+ | </ | ||
==== tos ==== | ==== tos ==== | ||
Line 1045: | Line 1050: | ||
If the internal resolver/ | If the internal resolver/ | ||
- | dns.add_srv, | + | dns.add_srv, |
Note: During startup of SIP-Router, before the internal resolver is loaded, the system resolver will be used (it will be used for queries done from module register functions or modparams fixups, but not for queries done from mod_init() or normal fixups). | Note: During startup of SIP-Router, before the internal resolver is loaded, the system resolver will be used (it will be used for queries done from module register functions or modparams fixups, but not for queries done from mod_init() or normal fixups). | ||
Line 1571: | Line 1576: | ||
sctp_max_burst = number | sctp_max_burst = number | ||
+ | |||
+ | |||
+ | ===== UDP Parameters ===== | ||
+ | |||
+ | ==== udp4_raw ==== | ||
+ | |||
+ | Enables raw socket support for sending UDP IPv4 datagrams (40-50% performance increase on linux multi-cpu). | ||
+ | |||
+ | Possible values: 0 - disabled (default), 1 - enabled, -1 auto. | ||
+ | |||
+ | In " | ||
+ | |||
+ | The parameter can be set at runtime as long as sr was started with enough privileges (core.udp4_raw). | ||
+ | |||
+ | < | ||
+ | udp4_raw = on | ||
+ | </ | ||
+ | |||
+ | ==== udp4_raw_mtu ==== | ||
+ | |||
+ | MTU value used for UDP IPv4 packets when udp4_raw is enabled. | ||
+ | |||
+ | The parameter can be set at runtime (core.udp4_raw_mtu). | ||
+ | |||
+ | ==== udp4_raw_ttl ==== | ||
+ | |||
+ | TTL value used for UDP IPv4 packets when udp4_raw is enabled. By default it is set to auto mode (-1), meaning that the same TTL will be used as for normal UDP sockets. | ||
+ | |||
+ | The parameter can be set at runtime (core.udp4_raw_ttl). | ||
Line 1876: | Line 1910: | ||
resetflag(b); | resetflag(b); | ||
+ | ==== is_int ==== | ||
+ | Checks if a pseudo variable argument contains integer value. | ||
+ | if(is_int(" | ||
+ | log(" | ||
+ | } | ||
==== log ==== | ==== log ==== | ||
Line 1964: | Line 2003: | ||
Example of usage: | Example of usage: | ||
- | rewritehostporttrans(???" | + | rewritehostporttrans(" |
==== rewritehost ==== | ==== rewritehost ==== | ||
Line 2091: | Line 2130: | ||
Try to close the connection (the one on which the message is sent out) after forwarding the current message. Can be used in same route blocks as set_forward_no_connect(). | Try to close the connection (the one on which the message is sent out) after forwarding the current message. Can be used in same route blocks as set_forward_no_connect(). | ||
- | Note: Use with care as you might not receive the replies anymore as the connection is closed. | + | Note: Use with care as you might not receive the replies anymore as the connection is [[http:// |
Line 2391: | Line 2430: | ||
!= not equal | != not equal | ||
=~ regular expression matching: Note: Posix regular expressions will be used, e.g. use [[: | =~ regular expression matching: Note: Posix regular expressions will be used, e.g. use [[: | ||
- | !~ regular expression not-matching | ||
> | > | ||
>= greater or equal | >= greater or equal |
cookbooks/3.2.x/core.1318956140.txt.gz · Last modified: 2011/10/18 16:42 by miconda