[Kamailio-Users] help with custom module
Henning Westerholt
henning.westerholt at 1und1.de
Wed Oct 7 18:55:27 CEST 2009
On Dienstag, 6. Oktober 2009, liran tal wrote:
> I've written a very simple module, just exporting one function I need which
> does something simple
> like checking a file and returns -1 or 1 if the file exist or not.
Hello Liran,
ok, understand. Please allow me first two remarks: First of all you could use
the "exec" module to call an external bash script that does the check for you,
its not necessary to write a module for this, it should be also available in
your version. And then you should perhaps consider updating to a newer version
of kamailio (e.g. 1.5.2), 1.0.x is not supported anymore.
> The problem I'm facing is as follows: During call flow (extension1 calling
> extension2), it seems that the logic
> of the call flow is passed via that module and hangs the entire call
> process. And this happens without
> even calling that single exported function, but rather just by including
> the module itself via loadmodule.
>
> Log from the call flow:
> ...
> [..]
> 8(3827) After parse_msg...
> * 8(3827) forward_reply: found module exec_custom, passing
> reply to it
> * 8(3827) DEBUG:destroy_avp_list: destroying list (nil)
> 8(3827) receive_msg: cleaning up
> ...
>
> that forward_reply thing has the module involved there for whatever reason,
> I've no idea.
Do you've registered the module functions as reply callback? Then this could
happens as they get called during internal reply processing. And what is the
error code you return from the module function? On some return codes the
server will also stops the execution of the config script and drops the
message. This is explained in chapter "16.9.1. Return Values" in the devel
guide at: http://www.kamailio.org/docs/openser-devel-guide/
Regards,
Henning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20091007/bf79b038/attachment.htm>
More information about the Users
mailing list