浏览代码

kamailio-kemi-framework: docs for KSR.ti_IPv4/6()

Daniel-Constantin Mierla 4 年之前
父节点
当前提交
8535882602
共有 1 个文件被更改,包括 26 次插入0 次删除
  1. 26 0
      kamailio-kemi-framework/docs/core.md

+ 26 - 0
kamailio-kemi-framework/docs/core.md

@@ -818,6 +818,32 @@ Example:
 KSR.route("REQINIT");
 ```
 
+### KSR.to_IPv4() ###
+
+`bool to_IPv4()`
+
+Return true if the outgoing protocol is IPv4, based on `host` part
+in destination URI or R-RUI (if it is an IP address, no DNS query is done).
+
+```Lua
+if KSR.to_IPv4() then
+  ...
+end
+```
+
+### KSR.to_IPv6() ###
+
+`bool to_IPv6()`
+
+Return true if the outgoing protocol is IPv6, based on `host` part
+in destination URI or R-RUI (if it is an IP address, no DNS query is done).
+
+```Lua
+if KSR.to_IPv6() then
+  ...
+end
+```
+
 ### KSR.to_TCP() ###
 
 `bool to_TCP()`