[Kamailio-Users] freeing innername from htable Re: perl module, "pv_sprintf: Memory exhausted!"

Christian Koch chri.koch.vier at googlemail.com
Tue Jun 9 15:56:17 CEST 2009


Hello Daniel,

Daniel-Constantin Mierla schrieb:
> unfortunately you cannot use $sht in this way from perl module. The 
> same limitation that prevent calling any function from modules apply 
> here -- the fixup system used at startup, when string parameters are 
> pre-compiled in different forms to speed up runtime execution.
So there is no way to access $sht from other moduls (like perl or xlog)? 
It seems to work, but obviously the memory isn't freed :-)

What we are trying to do is the following:
During processing of "INVITE" we need to save some call details (source 
IP, URI, ...) and want to write them to file when the call is finished 
(including duration, ...), while processing BYE or CANCEL, to have CDRs. 
As there are multiple childs of kamailio we tried to save the calls 
details from the INVITE in shared memory using htable (e.g. 
"$sht(a=>$ci::srcip) = $si"), so we can use them while processing the 
BYE (possibly in another child). There we wanted to use perl to be able 
to write the saved details to a file.
We used the shared memory module as we don´t want to save the infos to 
DB because of performance issues we suspect when using DBs.

But as you mentioned $sht is not supposed to be used in such a way. Do 
you have any idea what else we can do to generate CDRs as mentioned?
By using other modules for example or a complete other way you may know?

>
> It can be added as a feature request for future. For module functions 
> I added the core support for free fixup functions, but nobody 
> committed to continue the work in perl module.
>
> If you want to work on it, I can assist and guide you.
Well, honestly we are looking for a fast way to implement it.
How long will it take to implement it with your guidance?

Thanks and regards,
Christian




More information about the Users mailing list