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:devel:transformations [2019/08/19 14:30] miconda [Parameters List Transformations] |
cookbooks:devel:transformations [2020/03/06 17:50] miconda |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Kamailio SIP Server v5.3.x (devel): Transformations ====== | + | ====== Kamailio SIP Server v5.4.x (devel): Transformations ====== |
< | < | ||
Line 153: | Line 153: | ||
Decode base64 encoded PV and return value | Decode base64 encoded PV and return value | ||
+ | ==== {s.encode.base64t} ==== | ||
+ | |||
+ | Return base64 encoding of PV value without trailing padding characters(' | ||
+ | |||
+ | |||
+ | ==== {s.decode.base64t} ==== | ||
+ | |||
+ | Decode base64 encoded PV, handling missing trailing padding characters, and return value. | ||
+ | |||
+ | ==== {s.encode.base64url} ==== | ||
+ | |||
+ | Return base64-url encoding of PV value | ||
+ | |||
+ | ==== {s.decode.base64url} ==== | ||
+ | |||
+ | Decode base64-url encoded PV and return value | ||
+ | |||
+ | ==== {s.encode.base64urlt} ==== | ||
+ | |||
+ | Return base64-url encoding of PV value without trailing padding characters(' | ||
+ | |||
+ | |||
+ | ==== {s.decode.base64urlt} ==== | ||
+ | |||
+ | Decode base64-url encoded PV, handling missing trailing padding characters, and return value. | ||
Line 308: | Line 333: | ||
</ | </ | ||
+ | ==== {s.rmws} ==== | ||
+ | |||
+ | Remove occurrences of whitespace characters (' ', '\t, ' | ||
+ | |||
+ | <code c> | ||
+ | $(var(x){s.rmws}) | ||
+ | </ | ||
==== {s.corehash, | ==== {s.corehash, | ||
Line 335: | Line 367: | ||
$var(uri) = $(var(x){s.unbracket}); | $var(uri) = $(var(x){s.unbracket}); | ||
</ | </ | ||
+ | |||
+ | ==== {s.count,c} ==== | ||
+ | |||
+ | Count how many times c appears in the pv value. | ||
+ | |||
+ | <code c> | ||
+ | abababa" | ||
+ | # will return 4 | ||
+ | </ | ||
+ | |||
+ | |||
===== URI Transformations ===== | ===== URI Transformations ===== | ||
Line 418: | Line 461: | ||
Available transformations in this class are presented in the next sections. | Available transformations in this class are presented in the next sections. | ||
- | **Important Note:** the delimiter cannot be comma (,), because this trasformation | + | **Important Note:** the delimiter cannot be comma (,), because this transformation |