<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you Marius,<br>
<br>
I do loadmodule "/home/path/to/kamailio/modules/topoh/topoh.so"
<br>
<br>
and now I have another problem, When it starts, Kamailio says :<br>
<br>
-----------------------------------------------------------------------------------------------<br>
<br>
Not starting kamailio: invalid configuration file!<br>
<br>
&nbsp;0(19622) : &lt;core&gt; [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<br>
<br>
ERROR: bad config file (1 errors)<br>
----------------------------------------------------------------------------------------------------<br>
<br>
I search on google and i find this: <br>
<br>
<a class="moz-txt-link-freetext" href="http://www.mail-archive.com/users@lists.kamailio.org/msg07610.html">http://www.mail-archive.com/users@lists.kamailio.org/msg07610.html</a><br>
<br>
Is it the same problem for topoh as in this mail with tm ? <br>
<br>
thank you<br>
<br>
J&eacute;r&ocirc;me<br>
<br>
ps:&nbsp; I check if the m_topoh function is compiled by looking at the
symbol table in the topoh.so file
<br>
<br>
nm -a topoh.so | grep m_topoh<br>
00008c70 t m_topoh<br>
<br>
marius zbihlei a &eacute;crit&nbsp;:
<blockquote cite="mid:4C15F453.4080106@1and1.ro" type="cite"><a class="moz-txt-link-abbreviated" href="mailto:jerome.marchet@orange-ftgroup.com">jerome.marchet@orange-ftgroup.com</a>
wrote:
  <br>
  <blockquote type="cite"><br>
Hi all,
    <br>
    <br>
    <br>
I use Kamailio 3.0.0 currently, but I have a problem with the topoh
module.
    <br>
    <br>
    <br>
Indeed, I want to create an exported function called &laquo; topoh_required
&raquo;( so, to be used in the config file) for this module, I read and
execute the instruction of the devel guide to do this:
    <br>
    <br>
    <br>
in topoh_mod.c, I add or modify:
    <br>
    <br>
    <br>
int th_param_mask = 0;
    <br>
    <br>
    <br>
...
    <br>
    <br>
    <br>
static cmd_export_t cmds[] = {
    <br>
    <br>
{"topoh_required", (cmd_function)m_topoh, 1, fixup_uint_null ,
REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
    <br>
    <br>
{0, 0, 0, 0, 0}
    <br>
    <br>
};
    <br>
    <br>
    <br>
...
    <br>
    <br>
    <br>
struct module_exports exports= {
    <br>
    <br>
"topoh",
    <br>
    <br>
DEFAULT_DLFLAGS, /* dlopen flags */
    <br>
    <br>
*cmds, /*added*/*
    <br>
    <br>
params,
    <br>
    <br>
0, /* exported statistics */
    <br>
    <br>
0, /* exported MI functions */
    <br>
    <br>
0, /* exported pseudo-variables */
    <br>
    <br>
0, /* extra processes */
    <br>
    <br>
mod_init, /* module initialization function */
    <br>
    <br>
0,
    <br>
    <br>
0,
    <br>
    <br>
0 /* per-child init function */
    <br>
    <br>
};
    <br>
    <br>
    <br>
...
    <br>
    <br>
    <br>
static int m_topoh(struct sip_msg *msg, char *value)
    <br>
    <br>
{
    <br>
    <br>
unsigned int temp = (unsigned int) value;
    <br>
    <br>
if(temp==1)
    <br>
    <br>
{
    <br>
    <br>
th_param_mask=1;
    <br>
    <br>
return 1;
    <br>
    <br>
}
    <br>
    <br>
else if (temp==0)
    <br>
    <br>
{
    <br>
    <br>
th_param_mask=0;
    <br>
    <br>
return 0;
    <br>
    <br>
}
    <br>
    <br>
else return -1;
    <br>
    <br>
}
    <br>
    <br>
    <br>
I do make module and make ... no problem,
    <br>
    <br>
    <br>
  </blockquote>
  <br>
Hello Jerome
  <br>
  <br>
Have you installed your module? Can you double check that the module
loaded from the config is the same as your patched one? You can also
use full paths to load module, so I suggest to do a
  <br>
  <br>
loadmodule "/home/path/to/kamailio/modules/topoh/topoh.so"
  <br>
  <br>
Also check if the m_topoh function is compiled by looking at the symbol
table in the topoh.so file
  <br>
  <br>
nm -a topoh.so | grep m_topoh should work just fine.
  <br>
  <br>
As I look thru your code, I can't see any possible errors. I will look
more closely if with these suggestions don't work
  <br>
  <br>
Cheers
  <br>
Marius
  <br>
  <br>
  <br>
  <blockquote type="cite">but when I start Kamailio with the function
topoh_required(&laquo; 1 &raquo;); in the config file, it says:
    <br>
    <br>
    <br>
    <br>
Not starting kamailio: invalid configuration file!
    <br>
    <br>
    <br>
0(19524) : &lt;core&gt; [cfg.y:3329]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 328, column 20: unknown
command, missing loadmodule?
    <br>
    <br>
    <br>
ERROR: bad config file (1 errors)
    <br>
    <br>
    <br>
So It doesn't know the topoh_required function. But I don't know how to
solve this problem.
    <br>
    <br>
    <br>
Can somebody help me please? Thank you very much for your help.
    <br>
    <br>
    <br>
J&eacute;r&ocirc;me
    <br>
    <br>
    <br>
    <br>
  </blockquote>
  <br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font face="TIMES"><font size="2"><img
 src="cid:part1.08010604.09090700@orange-ftgroup.com"><br>
<font color="BLACK">
<b> MARCHET Jerome RD-CORE-LAN</b></font><br>
<b> LAN/CORE/M2V</b><br>
Tel : +33 296052479 <br>
<a href="mailto:jerome.marchet@orange-ftgroup.com">Email:
jerome.marchet@orange-ftgroup.com</a><br>
R&amp;D Lannion 2, avenue Pierre Marzin 22307 LANNION Cedex - France
<br>
<br>
<br>
Mailer ThunderBird sous YourDev Linux<br>
Installez simplement votre poste de travail Linux avec <a
 href="http://web2000.rd.francetelecom.fr">
http://web2000.rd.francetelecom.fr</a><br>
<img src="cid:part2.00070509.03030107@orange-ftgroup.com"><br>
<br>
<br>
</font></font></div>
</body>
</html>