User Tools

Site Tools


cookbooks:4.2.x: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
cookbooks:4.2.x:pseudovariables [2015/01/09 11:02]
neuhaus [$cnt(pv) - Count number of pvs]
cookbooks:4.2.x:pseudovariables [2015/06/03 12:07] (current)
mslehto $pr / $proto - lowercase sample values
Line 88: Line 88:
 The 'name' can be: The 'name' can be:
  
-  * uri - return uri of the branch +  * uri - return URI of the branch 
-  * dst_uri - return destination uri (next hop address)+  * dst_uri - return destination URI (next hop address)
   * path - return the path vector for the branch   * path - return the path vector for the branch
   * q - return the q value of the branch   * q - return the q value of the branch
Line 118: Line 118:
 If index is missing, first branch is used. If index is -1 the last branch is used. If index is missing, first branch is used. If index is -1 the last branch is used.
  
-Assigning $null to uri attribute will drop the branch, for the rest of attributes will just set the value to null.+Assigning $null to the uri attribute will drop the branch, for the rest of attributes will just set the value to null.
  
 <code c> <code c>
Line 129: Line 129:
 **$br** - reference to request's first branch **$br** - reference to request's first branch
  
-<fc #0000ff>It is R/W variable, you can assign values to it directly in configuration file (will add a new branch).</fc>+<fc #0000ff>It is R/W variable, you can assign values to it directly in configuration file (will add a new branch).</fc>
  
 ==== $bR - Request's all branches ==== ==== $bR - Request's all branches ====
Line 139: Line 139:
 **$bf** - reference to branch flags of branch 0 (RURI) - decimal output **$bf** - reference to branch flags of branch 0 (RURI) - decimal output
  
-<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)</fc>
 ==== $bF - Branch flags ==== ==== $bF - Branch flags ====
  
 **$bF** - reference to branch flags of branch 0 (RURI) - hexa output **$bF** - reference to branch flags of branch 0 (RURI) - hexa output
  
-<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)</fc>
  
 ==== $bs - Body size ==== ==== $bs - Body size ====
Line 184: Line 184:
 ==== $dd - Domain of destination URI ==== ==== $dd - Domain of destination URI ====
  
-**$dd** - reference to domain of destination uri (without port)+**$dd** - reference to domain of destination URI (without port)
  
  
Line 205: Line 205:
 ==== $dp - Port of destination URI ==== ==== $dp - Port of destination URI ====
  
-**$dp** - reference to port of destination uri+**$dp** - reference to port of destination URI
  
 ==== $dP - Transport protocol of destination URI ==== ==== $dP - Transport protocol of destination URI ====
  
-**$dP** - reference to transport protocol of destination uri+**$dP** - reference to transport protocol of destination URI
  
 ==== $ds - Destination set ==== ==== $ds - Destination set ====
Line 218: Line 218:
 ==== $du - Destination URI ==== ==== $du - Destination URI ====
  
-**$du** - reference to destination uri+**$du** - reference to destination URI
  
-If loose_route() returns TRUE a destination uri is set according to the first Route header.+If loose_route() returns TRUE a destination URI is set according to the first Route header.
 $du is also set if lookup() function of 'registrar' module finds contact(s) behind NAT. $du is also set if lookup() function of 'registrar' module finds contact(s) behind NAT.
  
-<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)</fc>
  
 To reset $du: To reset $du:
Line 241: Line 241:
 **$fs** - reference to the forced socket for message sending (if any) in the form proto:ip:port **$fs** - reference to the forced socket for message sending (if any) in the form proto:ip:port
  
-<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file). Transport proto can be omitted when assigning value, in which case it is taken from destination URI of the message.</fc>+<fc #0000ff>It is R/W variable (you can assign values to it directly in configuration file). Transport proto can be omitted when assigning value, in which case it is taken from destination URI of the message.</fc>
  
 ==== $ft - From tag ==== ==== $ft - From tag ====
Line 251: Line 251:
 **$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)</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 258: Line 258:
 **$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)</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 269: Line 269:
 **$mf** - reference to message/transaction flags set for current SIP request **$mf** - reference to message/transaction flags set for current SIP request
  
-<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)</fc>
  
 ==== $mF - Flags in hexadecimal ==== ==== $mF - Flags in hexadecimal ====
Line 275: Line 275:
 **$mF** -reference to message/transaction flags set for current SIP request in hexa-decimal **$mF** -reference to message/transaction flags set for current SIP request in hexa-decimal
  
-<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)</fc>
  
 ==== $mi - SIP message id ==== ==== $mi - SIP message id ====
Line 324: Line 324:
 ==== $pr - Protocol of received message ==== ==== $pr - Protocol of received message ====
  
-**$pr** or **$proto** - protocol of received message (UDPTCPTLSSCTPWSWSS)+**$pr** or **$proto** - protocol of received message (udptcptlssctpwswss)
  
 ==== $pU - User in P-Preferred-Identity header URI ==== ==== $pU - User in P-Preferred-Identity header URI ====
Line 338: Line 338:
 **$rd** - reference to domain in request's URI (without port) or to the Namespace Specific String of a URN (see RFC 2141) **$rd** - reference to domain in request's URI (without port) or to the Namespace Specific String of a URN (see RFC 2141)
  
-<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)</fc>
  
 ==== $rb - Body of request/reply ==== ==== $rb - Body of request/reply ====
Line 370: Line 370:
 **$rp** - reference to port of R-URI **$rp** - reference to port of R-URI
  
-<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)</fc>
  
 ==== $rP - Protocol of R-URI ==== ==== $rP - Protocol of R-URI ====
Line 392: Line 392:
 **$ru** - reference to request's URI (address in the first line of a SIP request) **$ru** - reference to request's URI (address in the first line of a SIP request)
  
-<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)</fc>
  
 ==== $rU - Username in R-URI ==== ==== $rU - Username in R-URI ====
Line 398: Line 398:
 **$rU** - reference to username in request's URI or to the Namespace Identifier of a URN (see RFC 2141) **$rU** - reference to username in request's URI or to the Namespace Identifier of a URN (see RFC 2141)
  
-<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)</fc>
  
 ==== $ruid - Record internal Unique ID ==== ==== $ruid - Record internal Unique ID ====
Line 533: Line 533:
 </code> </code>
  
-It is R/W variable (you can assign values to it directly in configuration file).+It is R/W variable (you can assign values to it directly in configuration file).
  
 ===== $xavp(id) - XAVPs ===== ===== $xavp(id) - XAVPs =====
Line 625: Line 625:
 **Note:** A script variable persists over the SIP-Router process in which it was initialized, so be sure of giving it a new value before reading it or you'll get the value asigned in any other previous message processed by the same SIP-Router process (pid). **Note:** A script variable persists over the SIP-Router process in which it was initialized, so be sure of giving it a new value before reading it or you'll get the value asigned in any other previous message processed by the same SIP-Router process (pid).
  
-<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)</fc>
  
 **pv** module can be used to initialize the script variables. **pv** module can be used to initialize the script variables.
Line 645: Line 645:
 </code> </code>
  
-<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)</fc>
  
 ===== $time(name) - Broken-down time ===== ===== $time(name) - Broken-down time =====
Line 758: Line 758:
   * sflags - dialog script flags   * sflags - dialog script flags
   * callid - sip call id   * callid - sip call id
-  * to_uri - To uri+  * to_uri - To URI
   * to_tag - To tag   * to_tag - To tag
-  * from_uri - From uri+  * from_uri - From URI
   * from_tag - From tag   * from_tag - From tag
   * toroute - timeout route   * toroute - timeout route
Line 776: Line 776:
 Return the attribute of the context for current processed dialog. Return the attribute of the context for current processed dialog.
  
-<fc #0000ff>It is R/W variable.</fc>+<fc #0000ff>It is R/W variable.</fc>
  
 The 'attr' can be: The 'attr' can be:
Line 788: Line 788:
 Store and retrieve custom variable for current processed dialog. Store and retrieve custom variable for current processed dialog.
  
-<fc #0000ff>It is R/W variable.</fc>+<fc #0000ff>It is R/W variable.</fc>
  
 The 'key' can be any string. The 'key' can be any string.
Line 798: Line 798:
 Access hash table entries. Access hash table entries.
  
-<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.</fc>
  
 The “htname” must be a hash table name defined via “htable” parameter. The “htname” must be a hash table name defined via “htable” parameter.
Line 820: Line 820:
 Access hash table entry expire value. Value represents the seconds until the htable entry will expire and be deleted from htable. Access hash table entry expire value. Value represents the seconds until the htable entry will expire and be deleted from htable.
  
-<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.</fc>
  
 The “htname” must be a hash table name defined via “htable” parameter and have auto-expire greater than 0. The “htname” must be a hash table name defined via “htable” parameter and have auto-expire greater than 0.
Line 916: Line 916:
 Access hash table entries stored in the memcached server. Access hash table entries stored in the memcached server.
  
-<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.</fc>
  
 The “key” can be: The “key” can be:
Line 953: Line 953:
 Do a atomic increment operation on the value stored in memcached. You need to add a value previously. Do a atomic increment operation on the value stored in memcached. You need to add a value previously.
  
-<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.</fc>
  
 The “key” can be: The “key” can be:
Line 972: Line 972:
 Do a atomic decrement operation on the value stored in memcached. You need to add a value previously. Do a atomic decrement operation on the value stored in memcached. You need to add a value previously.
  
-<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.</fc>
  
 The “key” can be: The “key” can be:
cookbooks/4.2.x/pseudovariables.1420797771.txt.gz · Last modified: 2015/01/09 11:02 by neuhaus