[OpenSER-Users] Perl module and moduleFunction()

Bastian Friedrich bastian.friedrich at collax.com
Tue Feb 19 16:00:24 CET 2008


Hi,

On Tuesday 19 February 2008, kionez wrote:
>
> I can't notify UAC with classic sl_send_reply, in my debug log i found:
>
> ERROR:core:moduleFunc: Module function 'sl_send_reply' is unsafe. Call
> is refused.
> ERROR:core:XS_OpenSER__Message_moduleFunction: calling module function
> 'sl_send_reply' failed. Missing loadmodule?
>
> in my perl script i put a simple: $m->moduleFunction("sl_send_reply",
> "200", "OK"); as i read in module's example i found in
> samples/function.pl file.

I'm dearly sorry that the sample code in the README file was obsoleted by the 
work that led to sl_send_reply not being available any longer.

The reason for the error message you get is that module functions in some 
cases execute preprocessing steps (so-called "fixups") that cannot 
be "undone" by the Perl module. Executing them results in memory leaks; 
eventually, your OpenSER will run out of memory.

It is possible nonetheless to execute sl_send_reply (and all other functions 
of the same type) by setting a "hidden" flag (I'll give you a hint in a 
private mail). Be aware, though, that this will result in a memory leak; you 
should then restart OpenSER once in a while to release all allocated memory.

> there's some way to send replyes in perl scripts?

No other way that I am aware of :(

Fixing the underlying problems has been on the OpenSER "Todo" for quite a 
while; unfortunatley, things are not that easy...

   Bastian

-- 
Collax GmbH . Burkheimer Straße 3 . 79111 Freiburg . Germany
p: +49 (0) 761-45684-24
f: +49 (0) 761-45684-10        www.collax.com

Geschäftsführer: William K. Hite / Boris Nalbach
AG München HRB 158898 . Ust.-IdNr: DE 814464942
\ Do not believe in miracles -- rely on them.




More information about the Users mailing list