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
Next revision Both sides next revision
cookbooks:devel:core [2019/03/01 15:32]
miconda [kemi.received_route_callback]
cookbooks:devel:core [2019/03/18 09:27]
mslehto [reply_route] remove quote
Line 383: Line 383:
 ===== Core Keywords ===== ===== Core Keywords =====
  
-Keywords specific to SIP messages which can be used mainly in '''if''' expressions.+Keywords specific to SIP messages which can be used mainly in ''if'' expressions.
  
 ==== af ==== ==== af ====
Line 1130: Line 1130:
 ==== log_prefix ==== ==== log_prefix ====
  
-Specify the text to be prefixed to the log messages printed by Kamailio while processing a SIP message. It can contain script variables that are evaluated at runtime (see log_prefix_mode about when/how evaluation is done).+Specify the text to be prefixed to the log messages printed by Kamailio while processing a SIP message (that is, when executing route blocks). It can contain script variables that are evaluated at runtime
 +See [[#log_prefix_mode]] about when/how evaluation is done
 + 
 + 
 +If a log message is printed from a part of the code executed out of routing blocks actions (e.g., can be timer, evapi worker process, ...), there is no log prefix set, because this one requires a valid SIP message structure to work with.
  
 Example - prefix with message type (1 - request, 2 - response), CSeq and Call-ID: Example - prefix with message type (1 - request, 2 - response), CSeq and Call-ID:
Line 1140: Line 1144:
 ==== log_prefix_mode ==== ==== log_prefix_mode ====
  
-If set to 0 (default), then log_prefix is evaluated when the sip message is received and then reused (recommended if the log_prefix has only variables that have same value for same message). This is the current behaviour of log_prefix evaluation.+Control if [[#log_prefix|log prefix]] is re-evaluated. 
 + 
 +If set to 0 (default), then log prefix is evaluated when the sip message is received and then reused (recommended if the **log_prefix** has only variables that have same value for same message). This is the current behaviour of **log_prefix** evaluation.
  
-If set to 1, then the log prefix is evaluated before/after each config action (needs to be set when the log_prefix has variables that are different based on the context of config execution, e.g., $cfg(line)).+If set to 1, then the log prefix is evaluated before/after each config action (needs to be set when the **log_prefix** has variables that are different based on the context of config execution, e.g., $cfg(line)).
  
 Example: Example:
Line 3100: Line 3106:
 <code c> <code c>
 reply_route { reply_route {
-  if(status=="128"") {+  if(status=="128") {
     drop;     drop;
   }   }
cookbooks/devel/core.txt · Last modified: 2022/04/11 17:10 by bkaufman