소스 검색

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()`