Browse Source

kamailio-kemi-framework: documented functions to test IP address family

Daniel-Constantin Mierla 5 years ago
parent
commit
d3521b32fd
1 changed files with 24 additions and 0 deletions
  1. 24 0
      kamailio-kemi-framework/docs/core.md

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

@@ -493,6 +493,30 @@ if KSR.is_proto("EW") then
 end
 end
 ```
 ```
 
 
+### KSR.is_IPv4() ###
+
+`bool is_IPv4()`
+
+Return true if the SIP message was received over IPv4.
+
+```Lua
+if KSR.is_IPv4() then
+  ...
+end
+```
+
+### KSR.is_IPv6() ###
+
+`bool is_IPv6()`
+
+Return true if the SIP message was received over IPv6.
+
+```Lua
+if KSR.is_IPv6() then
+  ...
+end
+```
+
 ### KSR.setflag(...) ###
 ### KSR.setflag(...) ###
 
 
 `bool KSR.setflag(int flag)`
 `bool KSR.setflag(int flag)`