Browse Source

kamailio-kemi-framework: couple of more examples

Daniel-Constantin Mierla 6 years ago
parent
commit
d37388d717
1 changed files with 16 additions and 0 deletions
  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.
 Set the internal flag to add rport parameter to local generated Via header.
 
 
+Example:
+
+```
+KSR.add_local_rport();
+```
+
 ### KSR.add_tcp_alias() ###
 ### KSR.add_tcp_alias() ###
 
 
 `add_tcp_alias(int port)`
 `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.
 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() ###
 ### KSR.add_tcp_alias_via() ###
 
 
 `int 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.
 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(...) ###
 
 
 `void KSR.dbg(str "msg")`
 `void KSR.dbg(str "msg")`