Module: kamailio
Branch: master
Commit: 9b00362149e5caf03aa90710908e12a120d5a0bd
URL: https://github.com/kamailio/kamailio/commit/9b00362149e5caf03aa90710908e12a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-29T11:14:39+02:00
examples/kemi: notes about use of return code -255 and exit
---
Modified: examples/kemi/kamailio-basic-kemi-lua.lua
---
Diff: https://github.com/kamailio/kamailio/commit/9b00362149e5caf03aa90710908e12a…
Patch: https://github.com/kamailio/kamailio/commit/9b00362149e5caf03aa90710908e12a…
---
diff --git a/examples/kemi/kamailio-basic-kemi-lua.lua b/examples/kemi/kamailio-basic-kemi-lua.lua
index 70593bb..f62bc77 100644
--- a/examples/kemi/kamailio-basic-kemi-lua.lua
+++ b/examples/kemi/kamailio-basic-kemi-lua.lua
@@ -4,6 +4,14 @@
-- sr - the old static object exporting Kamailio functions
--
+-- Relevant remarks:
+-- * return code -255 is used to propagate the 'exit' behaviour to the
+-- parent route block. The alternative is to use KSR.sr.exit() instead
+-- of return -255. Do not use native Lua exit(), that kills the Lua
+-- interpreter and implicitely stops Kamailio as the Lua interpreter is
+-- embedded
+
+
-- global variables corresponding to defined values (e.g., flags) in kamailio.cfg
FLT_ACC=1
FLT_ACCMISSED=2
Hi, All.
I have some problems with pkg_memory leak.
After each call used private memory of the "udp receiver" process
increases at 2500 bytes.
On test environment I hav set it to 2Mbyte, but it is full after 700 calls.
I need to modify SDP in invite and other packets.
When I do in script
====================================================
if(has_body("application/sdp"))
set_body_multipart();
if (msg_apply_changes())
{
xlog("L_INFO", "ISUP 1 Changes Applied Succesfully");
}
}
record_route();
dlg_manage
route(RELAY);
====
I make test this on kamailio 4.3.5 and 4.4.0 - same issue.
After discussion in mailing list with Daniel-Constantin Mierla, I have done debugging memory usage by process and found 3 points where memory hase not freeing after execution.
This patch solves it for me.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/587
-- Commit Summary --
* Update textops.c
* Update msg_translator.c
-- File Changes --
M modules/textops/textops.c (2)
M msg_translator.c (7)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/587.patchhttps://github.com/kamailio/kamailio/pull/587.diff
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/587