This shows you the differences between two versions of the page.
Both sides previous 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/03 08:31] miconda [$rc - Returned code] |
||
---|---|---|---|
Line 437: | Line 437: | ||
**$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 ==== | ||