User Tools

Site Tools


cookbooks:devel:pseudovariables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
cookbooks:devel:pseudovariables [2021/03/25 12:03] – [$T_branch_idx] micondacookbooks:devel:pseudovariables [2021/04/27 07:36] miconda
Line 1: Line 1:
-{{ :cookbooks:devel:pseudovariables.png?200|}} 
 ====== Pseudo-Variables ====== ====== Pseudo-Variables ======
  
-Version: Kamailio SIP Server v5.5.x (devel)+Version: Kamailio SIP Server v5.6.x (devel) 
 + 
 +{{ :cookbooks:devel:pseudovariables.png?200|}}
  
 ===== 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("location");
 + $var(rc) = $rc;
 + if ($var(rc) < 0) {
 + t_newtran();
 + switch ($var(rc)) {
 + case -1:
 + case -3:
 + send_reply("404", "Not Found");
 + exit;
 + case -2:
 + send_reply("405", "Method Not Allowed");
 + exit;
 + }
 + }
 +
 +</code>
 ==== $rd - Domain in R-URI ==== ==== $rd - Domain in R-URI ====
  
cookbooks/devel/pseudovariables.txt · Last modified: 2022/04/11 13:24 by henningw

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki