Browse Source

kamailio-kemi-framework: docs for KSR.pv.getw()

Daniel-Constantin Mierla 7 years ago
parent
commit
2e2f83bcbb
1 changed files with 14 additions and 0 deletions
  1. 14 0
      kamailio-kemi-framework/docs/kemimods.md

+ 14 - 0
kamailio-kemi-framework/docs/kemimods.md

@@ -27,6 +27,20 @@ Example:
 KSR.dbg("ruri is: " + KSR.pv.get("$ru") + "\n");
 ```
 
+### KSR.pv.getw(...) ###
+
+`val KSR.pv.getw("pvname")`
+
+Return the value of pseudo-variable `pvname` if it is different than `$null` or the string `<<null>>`
+if the variable is having the `$null` value. This should be used instead of `KSR.pv.get(...)`
+in the scripting languages that throw and error when attempting to print a `NULL` (or `NIL`) value.
+
+Example:
+
+```
+KSR.dbg("ruri is: " + KSR.pv.getw("$avp(x)") + "\n");
+```
+
 ### KSR.pv.seti(...) ###
 
 `void KSR.pv.seti("pvname", intval)`