This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cookbooks:devel:pseudovariables [2021/03/25 13:03] miconda [$T_branch_idx] |
cookbooks:devel:pseudovariables [2021/04/27 09:36] miconda |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{ : | ||
====== Pseudo-Variables ====== | ====== Pseudo-Variables ====== | ||
- | Version: Kamailio SIP Server v5.5.x (devel) | + | Version: Kamailio SIP Server v5.6.x (devel) |
+ | |||
+ | {{ : | ||
===== Introduction ===== | ===== Introduction ===== | ||
Line 437: | Line 438: | ||
**$retcode** - same as **$rc** | **$retcode** - same as **$rc** | ||
+ | Note that the value of $rc is overwritten by each new function call. | ||
+ | |||
+ | Example of use: | ||
+ | |||
+ | <code c> | ||
+ | lookup(" | ||
+ | $var(rc) = $rc; | ||
+ | if ($var(rc) < 0) { | ||
+ | t_newtran(); | ||
+ | switch ($var(rc)) { | ||
+ | case -1: | ||
+ | case -3: | ||
+ | send_reply(" | ||
+ | exit; | ||
+ | case -2: | ||
+ | send_reply(" | ||
+ | exit; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
==== $rd - Domain in R-URI ==== | ==== $rd - Domain in R-URI ==== | ||