cookbooks:3.2.x:transformations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
cookbooks:3.2.x:transformations [2011/10/18 16:52] – [Kamailio SIP Server v3.2.x: Transformations] miconda | cookbooks:3.2.x:transformations [2011/12/15 16:11] – [{s.replace,match,repl}] 85.178.75.55 | ||
---|---|---|---|
Line 6: | Line 6: | ||
</ | </ | ||
- | **Transformation** is basically a function that is applied to a pseudo-variable (PV) to get a special value from it. The value of PV is not altered. | + | **Transformation** is basically a function that is applied to a pseudo-variable (PV) to get a special value from it. The value of PV is not affected at all. |
Transformations are implemented by various modules, most of them being in **pv** module. | Transformations are implemented by various modules, most of them being in **pv** module. | ||
Line 177: | Line 177: | ||
</ | </ | ||
+ | ==== {s.replace, | ||
+ | |||
+ | Replace all occurrences of **match** with **repl**. The parameters can be pseudo-variables. | ||
+ | |||
+ | Example: | ||
+ | <code c> | ||
+ | $var(x) = " | ||
+ | $(var(x){s.replace, | ||
+ | </ | ||
+ | |||
+ | ==== {s.ftime, | ||
+ | |||
+ | |||
+ | Format the epoch in the pv according to the parameter. The parameter has to be strftime formatting string. | ||
+ | | ||
+ | <code c> | ||
+ | $(TS{s.ftime, | ||
+ | </ | ||
===== URI Transformations ===== | ===== URI Transformations ===== | ||
cookbooks/3.2.x/transformations.txt · Last modified: 2018/07/12 06:31 by gaaf