Differences
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:pseudo-variables:devel [2011/07/17 10:23] 85.178.69.15 |
cookbooks:pseudo-variables:devel [2011/11/08 14:00] 182.3.198.58 [AVPs] |
||
---|---|---|---|
Line 453: | Line 453: | ||
**$ua** - reference to user agent header field | **$ua** - reference to user agent header field | ||
+ | |||
===== AVPs ===== | ===== AVPs ===== | ||
**$avp(id)** - the value of the AVP identified by ' | **$avp(id)** - the value of the AVP identified by ' | ||
+ | |||
**$(avp(id)[N])** - represents the value of N-th AVP identified by ' | **$(avp(id)[N])** - represents the value of N-th AVP identified by ' | ||
Line 461: | Line 463: | ||
* " | * " | ||
+ | |||
* " | * " | ||
+ | |||
+ | * pseudo variable - if value of pv is integer, id is integer, if string, id is string | ||
$(avp(id)[0]) can be written in shorter form as $avp(id) and $avp(s: | $(avp(id)[0]) can be written in shorter form as $avp(id) and $avp(s: | ||
Line 504: | Line 509: | ||
**$hdr(name)** - represents the body of first header identified by ' | **$hdr(name)** - represents the body of first header identified by ' | ||
+ | |||
**$(hdr(name)[N])** - represents the body of the N-th header identified by ' | **$(hdr(name)[N])** - represents the body of the N-th header identified by ' | ||
Line 520: | Line 526: | ||
<hi # | <hi # | ||
- | ==== Script variables ==== | + | ===== Script |
**$var(name)** - refers to variables that can be used in configuration script, having integer or string value. This kind of variables are faster the AVPs, being referenced directly to memory location. The value of script variables persists over the processing of SIP messages, being specific per each SIP-Router process. | **$var(name)** - refers to variables that can be used in configuration script, having integer or string value. This kind of variables are faster the AVPs, being referenced directly to memory location. The value of script variables persists over the processing of SIP messages, being specific per each SIP-Router process. | ||
Line 545: | Line 551: | ||
[b]pv[/b] module can be used to initialise the script variables. | [b]pv[/b] module can be used to initialise the script variables. | ||
- | ==== Shared | + | ===== Script shared |
**$shv(name)** | **$shv(name)** | ||
Line 562: | Line 568: | ||
<hi # | <hi # | ||
- | ==== Broken-down time ==== | + | |
+ | ===== Broken-down time ===== | ||
**$time(name)** - the PV provides access to broken-down time attributes. | **$time(name)** - the PV provides access to broken-down time attributes. | ||
Line 587: | Line 594: | ||
</ | </ | ||
- | ==== Selects ==== | + | ===== Selects |
**$sel(name)** - return the value of **select** specified by name. **select** refers a class of config variables introduced by SER 2.0, allowing to select and return parts of sip messages and not only. | **$sel(name)** - return the value of **select** specified by name. **select** refers a class of config variables introduced by SER 2.0, allowing to select and return parts of sip messages and not only. | ||
Line 603: | Line 610: | ||
} | } | ||
</ | </ | ||
- | ==== Send Addr Attributes ==== | ||
- | **$snd(name)** - return attributes of the address where the request is going to be sent. They are available in **onsend_route**. The name can be: | + | ===== Send Address Attributes ===== |
+ | |||
+ | **$snd(name)** - return attributes of the address | ||
+ | |||
+ | **$sndfrom(name)** - return attributes of the address from where the request is going to be sent (local socket, same as $snd(name)). | ||
+ | |||
+ | **$sndto(name)** - return attributes of the address to where the request is going to be sent (remote socket). | ||
+ | |||
+ | They are available in **onsend_route**. The name can be: | ||
* ip - IP address of destination | * ip - IP address of destination | ||
Line 1014: | Line 1028: | ||
</ | </ | ||
+ | |||
+ | ===== XHTTP module Pseudo-Variables ===== | ||
+ | |||
+ | ==== $hu ==== | ||
+ | |||
+ | * URL of http request. | ||
+ | |||
===== Special pseudo-variables - Escape Sequences ===== | ===== Special pseudo-variables - Escape Sequences ===== |