Hello all,<br>&nbsp;I am very new to ser<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am using 8.14 version of ser ... I build up ser from source code available from CVS repositry.<br><br>Actually
I wanted to make a simple module for logging of Source name and host
name that passes through ser (just for learning purpose) ...... I build
up the module and placed it in ser's source module directory and
recompiled the source .....Now problem is that when I try to call one
exported function from (
i.e. siplog) from ser.cfg .... It gives me following error message
...... <br><br><br style="text-decoration: underline; color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(51, 0, 0);">&nbsp;0(12672) parse error (89,8-9): unknown command, missing loadmodule?
</span></span><br><br>when I did ser -dd -c&nbsp; I got following <br><br><br>&nbsp;0(14407) find_export: &lt;siplog&gt; not found<br>&nbsp;0(14407) find_export: &lt;siplog&gt; not found<br>&nbsp;0(14407) parse error (90,9-10): unknown command, missing loadmodule?
<br><br>So I think siplog() is not exported ....... could not find the reason why it is so because I am exporting it ...........<br><br>My source code is following -----<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>#include &quot;../../sr_module.h&quot;
<br><br>#include &lt;stdio.h&gt;<br><br>char * str_param;<br>int int_param;<br><br>MODULE_VERSION<br><br>static int mod_init(void) ;<br><br>static int siplog(struct sip_msg *msg,char *str,char *str2);<br><br>static int mod_init(void) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fprintf(stdout,&quot;initializing siplog module&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<br>}<br><br>static cmd_export_t cmds[] = {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&quot;siplog&quot;,siplog,1,0,REQUEST<div>_ROUTE},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {0,0,0,0,0}<br>
};<br>
<br>struct module_exports exports = {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;siplog&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*module name */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmds,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*cmd-name registered by this module */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mod_init,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>};<br><br>static int siplog(struct sip_msg*msg,char*str,char*str2) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*the basic logic of module goes here*/<br>}<br><br><br><br>My ser.cfg file is as follows---<br><br>#<br># $Id: 
ser.cfg,v <a href="http://1.25.2.1/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">1.25.2.1</a> 2005/02/18 14:30:44 andrei Exp $<br>#<br># simple quick-start config script<br>#<br><br># ----------- global configuration parameters ------------------------
<br><br>#debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level (cmd line: -dddddddddd)
<br>#fork=yes<br>#log_stderror=no&nbsp;&nbsp;&nbsp; # (cmd line: -E)<br><br>/* Uncomment these lines to enter debugging mode <br>fork=no<br>log_stderror=yes<br>*/<br><br>check_via=no&nbsp;&nbsp;&nbsp; # (cmd. line: -v)<br>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -r)
<br>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -R)<br>#port=5060<br>#children=4<br>fifo=&quot;/tmp/ser_fifo&quot;<br><br># ------------------ module loading ----------------------------------<br><br># Uncomment this if you want to use SQL database
<br>#loadmodule &quot;/usr/local/lib/ser/modules/mysql.so&quot;<br><br>loadmodule &quot;/usr/local/lib/ser/modules/sl.so&quot;<br>loadmodule &quot;/usr/local/lib/ser/modules/tm.so&quot;<br>loadmodule &quot;/usr/local/lib/ser/modules/rr.so&quot;
<br>loadmodule &quot;/usr/local/lib/ser/modules/maxfwd.so&quot;<br>loadmodule &quot;/usr/local/lib/ser/modules/usrloc.so&quot;<br>loadmodule &quot;/usr/local/lib/ser/modules/registrar.so&quot;<br>loadmodule &quot;/usr/local/lib/ser/modules/textops.so&quot;
<br>loadmodule &quot;/usr/local/lib/ser/modules/print.so&quot;<br># Uncomment this if you want digest authentication<br># mysql.so must be loaded !<br>#loadmodule &quot;/usr/local/lib/ser/modules/auth.so&quot;<br>#loadmodule &quot;/usr/local/lib/ser/modules/auth_db.so&quot;
<br><br>#added by annirudh<br>loadmodule &quot;/usr/local/lib/ser/modules/pa.so&quot;<br><br>#added by shashwat<br>loadmodule &quot;/usr/local/lib/ser/modules/siplog.so&quot;<br><br># ----------------- setting module-specific parameters ---------------
<br><br># -- usrloc params --<br><br>modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,&nbsp;&nbsp; 0)<br><br># Uncomment this if you want to use SQL database <br># for persistent storage and comment the previous line<br>#modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)
<br><br># -- auth params --<br># Uncomment if you are using auth module<br>#<br>#modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)<br>#<br># If you set &quot;calculate_ha1&quot; parameter to yes (which true in this config), 
<br># uncomment also the following parameter)<br>#<br>#modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)<br><br># -- rr params --<br># add value to ;lr param to make some broken UAs happy<br>

modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)<br><br># -------------------------&nbsp; request routing logic -------------------<br><br># main routing logic<br><br>route{<br><br>&nbsp;&nbsp;&nbsp; # initial sanity checks -- messages with
<br>&nbsp;&nbsp;&nbsp; # max_forwards==0, or excessively long requests<br>&nbsp;&nbsp;&nbsp; if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp; if (msg:len &gt;=&nbsp; 2048 ) {
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp; print();&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; siplog();&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; # we record-route all messages -- to make sure that<br>&nbsp;&nbsp;&nbsp; # subsequent messages will go through our proxy; that's
<br>&nbsp;&nbsp;&nbsp; # particularly good if upstream and downstream entities<br>&nbsp;&nbsp;&nbsp; # use different transport protocol<br>&nbsp;&nbsp;&nbsp; if (!method==&quot;REGISTER&quot;) record_route();&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; # subsequent messages withing a dialog should take the
<br>&nbsp;&nbsp;&nbsp; # path determined by record-routing<br>&nbsp;&nbsp;&nbsp; if (loose_route()) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # mark routing logic in request<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; append_hf(&quot;P-hint: rr-enforced\r\n&quot;); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; };
<br><br>&nbsp;&nbsp;&nbsp; if (!uri==myself) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # mark routing logic in request<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; append_hf(&quot;P-hint: outbound\r\n&quot;); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp; # if the request is for other domain use UsrLoc
<br>&nbsp;&nbsp;&nbsp; # (in case, it does not work, use the following command<br>&nbsp;&nbsp;&nbsp; # with proper names and addresses in it)<br>&nbsp;&nbsp;&nbsp; if (uri==myself) {<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (method==&quot;REGISTER&quot;) {<br><br># Uncomment this if you want to use digest authentication
<br>#&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!www_authorize(&quot;<a href="http://iptel.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">iptel.org</a>&quot;, &quot;subscriber&quot;)) {<br>#&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; www_challenge(&quot;
<a href="http://iptel.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">iptel.org</a>&quot;, &quot;0&quot;);<br>
#&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>#&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; save(&quot;location&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; lookup(&quot;aliases&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!uri==myself) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; append_hf(&quot;P-hint: outbound alias\r\n&quot;); 
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # native SIP destinations are handled using our USRLOC DB<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!lookup(&quot;location&quot;)) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;404&quot;, &quot;Not Found&quot;);
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp; append_hf(&quot;P-hint: usrloc applied\r\n&quot;); <br>&nbsp;&nbsp;&nbsp; route(1);<br>}<br><br>route[1] <br>{<br>&nbsp;&nbsp;&nbsp; # send it out now; use stateful forwarding as it works reliably
<br>
&nbsp;&nbsp;&nbsp; # even for UDP2TCP<br>&nbsp;&nbsp;&nbsp; if (!t_relay()) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_reply_error();<br>&nbsp;&nbsp;&nbsp; };<br>}<br><br><br><br><br>I would be very thankful for any kind of help ....<br>Thanks <br><br><br>-------------------------------------------------------------------------------------------------------------------------------------------------------------
<br>result of nm siplog.so | grep '&nbsp; T ' --------------------&gt;<br>000009ec T _fini<br>00000748 T _init<br><br>result of uname -a ------------&gt; Linux server1.ims 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux
<br><br>reslut of ser -V ------------&gt;flags: STATS:Off, USE_IPV6,
USE_TCP, DISABLE_NAGLE, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<br>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
<br>@(#) $Id: main.c,v 1.168.4.3.2.1 2004/10/22 17:21:32 andrei Exp $<br>main.c compiled on 16:06:05 Jun 19 2006 with gcc 3.2</div><br clear="all"><br>-- <br>regards<br> <br>shashwat gupta <br>&nbsp;&nbsp;