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 revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cookbooks:devel:pseudovariables [2021/11/30 10:12]
miconda [$cnt(pv) - Count number of pvs]
cookbooks:devel:pseudovariables [2022/04/07 10:14]
miconda [Evrexec Module]
Line 285: Line 285:
 **$fd** - reference to domain in URI of 'From' header **$fd** - reference to domain in URI of 'From' header
  
-<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file)</fc>+<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file, but its value does not change)</fc>
  
 ==== $fn - From display name ==== ==== $fn - From display name ====
  
 **$fn** - reference to display name of 'From' header **$fn** - reference to display name of 'From' header
 +
 +<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file, but its value does not change)</fc>
  
 ==== $fs - Forced Send Socket ==== ==== $fs - Forced Send Socket ====
Line 333: Line 335:
 **$fu** - reference to URI of 'From' header **$fu** - reference to URI of 'From' header
  
-<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file)</fc>+<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file, but its value does not change)</fc>
  
 Note that changing the From: header may break backwards compatibility with SIP 1.0 devices. Note that changing the From: header may break backwards compatibility with SIP 1.0 devices.
Line 341: Line 343:
 **$fU** - reference to username in URI of 'From' header **$fU** - reference to username in URI of 'From' header
  
-<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file)</fc>+<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file, but its value does not change)</fc>
  
 Note that changing the From: header may break backwards compatibility with SIP 1.0 devices. Note that changing the From: header may break backwards compatibility with SIP 1.0 devices.
Line 580: Line 582:
  
 **$Rp** - reference to the port where the message was received **$Rp** - reference to the port where the message was received
 +
 +==== $Rn - Received socket name ====
 +
 +**$Rn** - reference to the name of the socket where the message was received
  
 ==== $RAu - Advertised socket URI ==== ==== $RAu - Advertised socket URI ====
Line 670: Line 676:
  
 **$td** - reference to domain in URI of 'To' header **$td** - reference to domain in URI of 'To' header
 +
 +<fc #0000FF>It is R/W variable (you can assign values to it directly in configuration file, but its value does not change)</fc>
  
 ==== $tn - To display name ==== ==== $tn - To display name ====
  
 **$tn** - reference to display name of 'To' header **$tn** - reference to display name of 'To' header
 +
 +<fc #0000FF>It is R/W variable (you can assign values to it directly in configuration file, but its value does not change)</fc>
  
 ==== $tt - To tag ==== ==== $tt - To tag ====
Line 689: Line 699:
  
 **$tu** - reference to URI of 'To' header **$tu** - reference to URI of 'To' header
 +
 +<fc #0000FF>It is R/W variable (you can assign values to it directly in configuration file, but its value does not change)</fc>
  
 ==== $tU - To URI Username ==== ==== $tU - To URI Username ====
  
 **$tU** - reference to username in URI of 'To' header **$tU** - reference to username in URI of 'To' header
 +
 +<fc #0000FF>It is R/W variable (you can assign values to it directly in configuration file, but its value does not change)</fc>
  
 ==== $tUl - To URI Username Length ==== ==== $tUl - To URI Username Length ====
Line 1906: Line 1920:
   * hdrs - SIP Headers   * hdrs - SIP Headers
   * body - Body   * body - Body
 +  * flags - flags for processing
 +    * 1 - the password is provided in HA1 format
   * auser - authentication username   * auser - authentication username
   * apasswd - authentication password   * apasswd - authentication password
Line 2229: Line 2245:
   * $msg(body) - sip message body   * $msg(body) - sip message body
   * $msg(body_len) - sip message body length   * $msg(body_len) - sip message body length
-  * $msg(hdrs) - sip message headers +  * $msg(hdrs) - sip message headers (surrounding white space and EoL chars trimmed) 
-  * $msg(fline) - sip message first line +  * $msg(fline) - sip message first line (surrounding white space and EoL chars trimmed) 
 +  * $msg(fpart) - sip message first line and the headers 
 +  * $msg(lpart) - sip message headers and the body
 ===== POSOPS Module ===== ===== POSOPS Module =====
  
Line 2642: Line 2659:
   * text - text of the code for the JSONRPC response   * text - text of the code for the JSONRPC response
   * body - the body of the JSONRPC response   * body - the body of the JSONRPC response
 +
 +===== $lsock(expr) =====
 +
 +Get attributes for listen sockets.
 +
 +The **expr** is an expression specifying what to match and return, the format is:
 +
 +<code>
 +matchid/value/field
 +</code>
 +
 +The **expr** can contain variables that are evaluated before parsing the expression.
 +
 +The **matchid** can be:
 +
 +  * n - match on name
 +  * l - match on listen address
 +
 +The **value** specifies what to match with.
 +
 +The **field** can be (only first character matches):
 +
 +  * name - return name
 +  * listen - return the listen address
 +  * advertise - return the advertise address
 +  * index - return the index in the list of all sockets
 +
 +Example:
 +
 +<code>
 +listen=udp:127.0.0.1:5060 advertise 127.0.0.1:5090 name "s0"
 +...
 +xinfo("$lsock(n/s0/listen)\n");
 +xinfo("$lsock(l/udp:127.0.0.1:5060/name)\n");
 +$var(s0) = "n/s0/listen";
 +xinfo("$lsock($var(s0))\n");
 +</code>
 +
 +===== Evrexec Module =====
 +
 +==== $evr(key) ====
 +
 +evrexec attributes:
 +
 +  * $evr(data) - processing data
 +  * $evr(srcip) - source ip
 +  * $evr(srcport) - sourceport as string
 +  * $evr(srcportno) - source port as number
 +
  
 ===== Presence Module ===== ===== Presence Module =====
cookbooks/devel/pseudovariables.txt · Last modified: 2022/04/11 15:24 by henningw