jerome.marchet@orange-ftgroup.com wrote:
Thank you Marius,
I do loadmodule "/home/path/to/kamailio/modules/topoh/topoh.so"
and now I have another problem, When it starts, Kamailio says :
Not starting kamailio: invalid configuration file!
0(19622) : <core> [cfg.y:3329]: parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 328, column 19: Command cannot be used in the block
ERROR: bad config file (1 errors)
Hello, In what block are you using the function ? As I check the module exports you kind of have everything there . Can you provide a snippet of your cfg that shows how the function is used along with the block information (failure_route, reply_route)
I search on google and i find this:
http://www.mail-archive.com/users@lists.kamailio.org/msg07610.html
Is it the same problem for topoh as in this mail with tm ?
Not quite. The tm "problem" is a design decision that somehow manifests the same why as your problem
I suggest that you add the cmd with this line
{"topoh_required", (cmd_function)m_topoh, 1, fixup_uint_null , ANY_ROUTE}
so you can call the function from any cfg block(it your resposability to ensure that it makes sense to do it so)
thank you
You're welcome Marius
Jérôme
ps: I check if the m_topoh function is compiled by looking at the symbol table in the topoh.so file
nm -a topoh.so | grep m_topoh 00008c70 t m_topoh