浏览代码

kamailio-kemi-framework: core - added several examples

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

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

@@ -231,6 +231,8 @@ end
 
 Return true if the method type of the SIP message is `INVITE`.
 
+Example:
+
 ```Lua
 if KSR.is_INVITE() then
   ...
@@ -243,24 +245,56 @@ end
 
 Return true if the method type of the SIP message is `ACK`.
 
+Example:
+
+```Lua
+if KSR.is_ACK() then
+  ...
+end
+```
+
 ### KSR.is_BYE() ###
 
 `bool is_BYE()`
 
 Return true if the method type of the SIP message is `BYE`.
 
+Example:
+
+```Lua
+if KSR.is_BYE() then
+  ...
+end
+```
+
 ### KSR.is_CANCEL() ###
 
 `bool is_CANCEL()`
 
 Return true if the method type of the SIP message is `CANCEL`.
 
+Example:
+
+```Lua
+if KSR.is_CANCEL() then
+  ...
+end
+```
+
 ### KSR.is_REGISTER() ###
 
 `bool is_REGISTER()`
 
 Return true if the method type of the SIP message is `REGISTER`.
 
+Example:
+
+```Lua
+if KSR.is_REGISTER() then
+  ...
+end
+```
+
 ### KSR.is_MESSAGE() ###
 
 `bool is_MESSAGE()`