瀏覽代碼

kamailio-kemi-framework: couple of more examples

Daniel-Constantin Mierla 6 年之前
父節點
當前提交
d37388d717
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      kamailio-kemi-framework/docs/core.md

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

@@ -23,18 +23,34 @@ Exported functions from core directly to KSR module or KSR.hdr submodule are lis
 
 Set the internal flag to add rport parameter to local generated Via header.
 
+Example:
+
+```
+KSR.add_local_rport();
+```
+
 ### KSR.add_tcp_alias() ###
 
 `add_tcp_alias(int port)`
 
 Adds a tcp port alias for the current connection (if tcp). Useful if you want to send all the trafic to port_alias through the same connection this request came from (it could help for firewall or nat traversal). When the `aliased` connection is closed (e.g. it is idle for too much time), all the port aliases are removed.
 
+```
+KSR.add_tcp_alias(5080);
+```
+
 ### KSR.add_tcp_alias_via() ###
 
 `int add_tcp_alias_via()`
 
 Adds the port from the message via as an alias to TCP connection. See `add_tcp_alias(int port)` for more details.
 
+Example:
+
+```
+KSR.add_tcp_alias_via();
+```
+
 ### void KSR.dbg(...) ###
 
 `void KSR.dbg(str "msg")`