This module aims to implement several sanity checks on incoming requests which are suggested or even required by a RFC, but are not available yet in the core of Kamailio. These checks are not required by Kamailio itself for its functionality. But on the other side it does not make much sense if a broken request traverses through a SIP network if it is rejected sooner or later by a SIP device any way. As every sanity check cost extra performance because of additional parsing and evaluation it is with this module now up to the Kamailio administrator what checks should be done on which request. The following checks are available: * ruri sip version - (1) - checks if the SIP version in the request URI is supported, currently only 2.0. * ruri scheme - (2) - checks if the URI scheme of the request URI is supported (sip[s]|tel[s]) by Kamailio * required headers - (4) -checks if the minimum set of required headers To, From, CSeq, Call-ID and Via is present in the request. * via sip version - (8) - disabled. * via protocol - (16) - disabled. * Cseq method - (32) - checks if the method from the CSeq header is equal to the request method. * Cseq value - (64) - checks if the number in the CSeq header is a valid unsigned integer. * content length - (128) - checks if the size of the body matches with the value from the Content-Length header. * expires value - (256) - checks if the value of the Expires header is a valid unsigned integer. * proxy require - (512) - checks if all items of the
| Parámetro | Tipo | Descripción |
|---|---|---|
| default_checks | integer | 3.2. uri_checks (integer) 3.3. proxy_require (string) 3.4. autodrop (integer) 3.5. noreply (int) |
| uri_checks | integer | 3.3. proxy_require (string) 3.4. autodrop (integer) 3.5. noreply (int) |
| proxy_require | string | 3.4. autodrop (integer) 3.5. noreply (int) |
| autodrop | integer | 3.5. noreply (int) |
| noreply | int | 3.1. default_checks (integer) |
| default_checks | integer | This parameter determines which of the checks from the sanity module are executed if no parameter was given to the sanity_check function call. By default all implemented checks are included in the exe |
| uri_checks | integer | This parameter determines which URIs are going to be checked if the 'parse uri' will be executed. |
| proxy_require | string | This parameter sets the list of supported SIP extensions for this Kamailio. The value is expected as a comma separated list (leading and trailing whitespaces are stripped from each token) of extension |
| autodrop | integer | This parameter controls whether the module drops the SIP message automatically if the sanity checks fail. Default value is 1 (auto drop). If set to 0, sanity_check() function will return -1 (false) to |
| noreply | int | If set to 1, then the module does not send a SIP reply internally in case there is an error detected when performing the sanity checks. There is the option to send the reply from config file with func |
4.2. sanity_reply()
4.1. sanity_check([msg_checks [, uri_checks]])
This function makes a row of sanity checks over the given SIP request. The behavior of the function is also controlled by autodrop parameter. If autodrop=0, the function returns false (-1) if one of the checks failed. When autodrop=1, the function st
Send a SIP reply using the code and reason text set internally by the module when detecting errors while performing the sanity checks. It is done only when parameter noreply is set to 1.
Copyright © 2006 iptelorg GmbH