<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
probably it was forgotten to export the internal API bind function.
I just committed the fix on GIT master branch (devel version):<br>
<br>
<a class="moz-txt-link-freetext" href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=db188fbcf4d752a2afab2e298a2f081f836d7e92">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=db188fbcf4d752a2afab2e298a2f081f836d7e92</a><br>
<br>
I couldn't test it for now, so if you can give it a try and report
whether it is working ok or not, then I can backport the fix to 3.1.<br>
<br>
Thanks,<br>
Daniel<br>
<br>
On 7/28/11 12:46 PM, Timo Klecker wrote:
<blockquote
cite="mid:assp.01907fc55a.000001cc4d13$a1fd4830$e5f7d890$@decoit.de"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’m trying to extend a
Kamailio Module and need to add and remove headers in a SIP
Message. To do this I want to use the textops module and I
am importing the api and trying to bind the textops module.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal">#include "../textops/api.h"<o:p></o:p></p>
<p class="MsoNormal">[..]<o:p></o:p></p>
<p class="MsoNormal">struct textops_binds tob;<o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">[..]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">/* register callbacks to
TEXTOPS */<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">if
(load_textops_api(&tob)!=0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
LM_ERR("can't load textops api. Is module textops
loaded?\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> return
-1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Later I use
tob.append_hf to add a header field.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Everything compiles fine
but on Kamailio startup there is a Error Message:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[..]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21782) DEBUG:
<core> [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/
(nil)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21782) DEBUG:
<core> [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/
(nil)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21782) DEBUG:
<core> [sr_module.c:625]: find_export_record: found
<is_method> in module textops
[/usr/lib/kamailio/modules_k/textops.so]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21782) DEBUG:
<core> [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/
(nil)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21782) DEBUG:
<core> [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/
(nil)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21782) DEBUG:
<core> [sr_module.c:625]: find_export_record: found
<is_method> in module textops
[/usr/lib/kamailio/modules_k/textops.so]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21782) DEBUG:
<core> [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/
(nil)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21782) DEBUG:
<core> [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/
(nil)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[..]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21784) DEBUG:
<core> [sr_module.c:625]: find_export_record: found
<t_release> in module tm
[/usr/lib/kamailio/modules/tm.so]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21784) DEBUG:
<core> [sr_module.c:631]: find_export_record:
<load_textops> not found<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21784) ERROR:
siptrace [../../modules_k/textops/api.h:63]: Failed to
import load_textops<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21784) ERROR:
siptrace [siptrace.c:314]: can't load textops api. Is module
textops loaded?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21784) ERROR:
<core> [sr_module.c:875]: init_mod(): Error while
initializing module siptrace
(/usr/lib/kamailio/modules_k/siptrace.so)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ERROR: error while
initializing modules<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21784) DEBUG: tm
[t_funcs.c:122]: DEBUG: tm_shutdown : start<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 0(21784) DEBUG: tm
[t_funcs.c:125]: DEBUG: tm_shutdown : emptying hash table<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[..]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am running Kamailio
3.1.4.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is this a bug in
Kamailio or am I doing anything wrong in my approach to use
textops?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">Kind
regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">Timo
Klecker </span><span style="mso-fareast-language:DE"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:12.0pt;mso-fareast-language:DE"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span
style="font-size:12.0pt;mso-fareast-language:DE"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>