This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
cookbooks:5.3.x:pseudovariables [2020/04/02 21:28] miconda [$xavp(id) - XAVPs] |
cookbooks:5.3.x:pseudovariables [2020/04/02 21:32] miconda [$xavp(id) - XAVPs] |
||
---|---|---|---|
Line 724: | Line 724: | ||
**xavp** - eXtended AVPs - are variables that can store multiple values, which can also be grouped in a structure-like fashion. Their value can be a string, an integer number or a list of named values. | **xavp** - eXtended AVPs - are variables that can store multiple values, which can also be grouped in a structure-like fashion. Their value can be a string, an integer number or a list of named values. | ||
- | They work like a stack, similar to AVPs, and are attached to SIP transactions. Each xavp has a name and can contain | + | They work like a stack, similar to AVPs, and are attached to SIP transactions |
+ | |||
+ | Each xavp has a string | ||
+ | |||
+ | To assign a single value use: | ||
+ | |||
+ | <code c> | ||
+ | $xavp(root)=" | ||
+ | $xavp(root)=intnumber; | ||
+ | </ | ||
+ | |||
+ | To assign a named value use: | ||
<code c> | <code c> | ||
Line 732: | Line 743: | ||
Like avps, xavp act like a stack. To refer to an existing value, use an index. The newest xavp has index zero [0]. | Like avps, xavp act like a stack. To refer to an existing value, use an index. The newest xavp has index zero [0]. | ||
+ | |||
<code c> | <code c> | ||
$xavp(root[0]=> | $xavp(root[0]=> |