<!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">
####### Routing Logic ########<br>
<br>
<br>
# main request routing logic<br>
<br>
route{<br>
<br>
# if (!pike_check_req()) { exit; };<br>
<br>
<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
}<br>
<br>
if(!sanity_check("1511", "7"))<br>
{<br>
xlog("Malformed SIP message from $si:$sp\n");<br>
exit;<br>
}<br>
<br>
<u><b>topoh_required("1"); /* in order to test my function*/</b></u><br>
<br>
route(NAT);<br>
<br>
if (has_totag()) {<br>
# sequential request withing a dialog should<br>
# take the path determined by record-routing<br>
if (loose_route()) {<br>
if (is_method("BYE")) {<br>
setflag(1); # do accounting ...<br>
setflag(3); # ... even if the transaction fails<br>
}<br>
route(RELAY);<br>
} else {<br>
if (is_method("SUBSCRIBE") && uri == myself) {<br>
# in-dialog subscribe requests<br>
route(PRESENCE);<br>
exit;<br>
}<br>
if ( is_method("ACK") ) {<br>
if ( t_check_trans() ) {<br>
# non loose-route, but stateful ACK; must be an ACK
after a 487 or e.g. 404 from upstream server<br>
t_relay();<br>
exit;<br>
} else {<br>
# ACK without matching transaction ... ignore and
discard.\n");<br>
exit;<br>
}<br>
}<br>
sl_send_reply("404","Not here");<br>
}<br>
exit;<br>
}<br>
....<br>
<br>
I try with {"topoh_required", (cmd_function)m_topoh, 1, fixup_uint_null
, <u><b>ANY_ROUTE</b></u>}
<br>
<br>
no change ! :( always the same error <br>
<br>
Jérôme<br>
<br>
<br>
marius zbihlei a écrit :
<blockquote cite="mid:4C161822.90400@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">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>
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
<br>
<br>
ERROR: bad config file (1 errors)
<br>
----------------------------------------------------------------------------------------------------
<br>
<br>
</blockquote>
Hello,
<br>
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)
<br>
<blockquote type="cite">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>
</blockquote>
Not quite. The tm "problem" is a design decision that somehow manifests
the same why as your problem
<br>
<br>
I suggest that you add the cmd with this line
<br>
<br>
{"topoh_required", (cmd_function)m_topoh, 1, fixup_uint_null ,
ANY_ROUTE}
<br>
<br>
so you can call the function from any cfg block(it your resposability
to ensure that it makes sense to do it so)
<br>
<br>
<br>
<blockquote type="cite"><br>
thank you
<br>
<br>
</blockquote>
You're welcome
<br>
Marius
<br>
<blockquote type="cite">Jérôme
<br>
<br>
ps: 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>
</blockquote>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font face="TIMES"><font size="2"><img
src="cid:part1.05020309.02060602@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&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.00090401.05070009@orange-ftgroup.com"><br>
<br>
<br>
</font></font></div>
</body>
</html>