Hi Daniel, thank you for quick response, kamailio doesn't start when I add the event_route for xcap_server, this are the errors:<div><br></div><div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing uac_req_send()</div>
<div> 0(5319) DEBUG: <core> [route.c:928]: fixing xdbg()</div><div> 0(5319) DEBUG: <core> [rvalue.c:2777]: RV fixing type 4</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing isbflagset()</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing fix_nated_contact()</div>
<div> 0(5319) DEBUG: <core> [rvalue.c:2777]: RV fixing type 4</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing fix_nated_sdp()</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing append_hf()</div>
<div> 0(5319) DEBUG: <core> [rvalue.c:2777]: RV fixing type 4</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing t_is_canceled()</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing xdbg()</div><div>
0(5319) DEBUG: <core> [route.c:928]: fixing append_hf()</div><div> 0(5319) DEBUG: <core> [rvalue.c:2777]: RV fixing type 4</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing isbflagset()</div><div> 0(5319) DEBUG: <core> [rvalue.c:2777]: RV fixing type 7</div>
<div> 0(5319) DEBUG: <core> [rvalue.c:2777]: RV fixing type 4</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing fix_nated_sdp()</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing append_hf()</div>
<div> 0(5319) DEBUG: <core> [route.c:928]: fixing xdbg()</div><div> 0(5319) DEBUG: <core> [rvalue.c:2777]: RV fixing type 4</div><div> 0(5319) DEBUG: <core> [route.c:928]: fixing www_authorize()</div><div>
0(5319) DEBUG: <core> [db.c:285]: connection 0xa6d830 not found in pool</div><div> 0(5319) DEBUG: db_mysql [km_my_con.c:94]: opening connection: mysql://xxxx:xxxx@localhost/asterisk</div><div> 0(5319) DEBUG: db_mysql [km_my_con.c:121]: connection type is Localhost via UNIX socket</div>
<div> 0(5319) DEBUG: db_mysql [km_my_con.c:122]: protocol version is 10</div><div> 0(5319) DEBUG: db_mysql [km_my_con.c:123]: server version is 5.1.41-3ubuntu12.10-log</div><div> 0(5319) DEBUG: <core> [db_res.c:118]: allocate 48 bytes for result set at 0xa6da40</div>
<div> 0(5319) DEBUG: db_mysql [km_res.c:68]: 1 columns returned from the query</div><div> 0(5319) DEBUG: <core> [db_res.c:155]: allocate 8 bytes for result names at 0xa04c28</div><div> 0(5319) DEBUG: <core> [db_res.c:165]: allocate 4 bytes for result types at 0xa017a8</div>
<div> 0(5319) DEBUG: db_mysql [km_res.c:85]: allocate 16 bytes for RES_NAMES[0] at 0xa6dad0</div><div> 0(5319) DEBUG: db_mysql [km_res.c:92]: RES_NAMES(0xa6dad0)[0]=[table_version]</div><div> 0(5319) DEBUG: db_mysql [km_res.c:100]: use DB1_INT result type</div>
<div> 0(5319) DEBUG: db_mysql [km_res.c:169]: no rows returned from the query</div><div> 0(5319) DEBUG: <core> [db.c:372]: no row for table subscriber found</div><div> 0(5319) ERROR: <core> [db.c:408]: invalid version 0 for table subscriber found, expected 6 (check table structure and table "version")</div>
<div> 0(5319) ERROR: auth_db [authdb_mod.c:252]: error during table version check.</div><div> 0(5319) DEBUG: <core> [db_pool.c:102]: removing connection from the pool</div><div> 0(5319) ERROR: <core> [route.c:1161]: fixing failed (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:1286</div>
<div> 0(5319) ERROR: <core> [route.c:1161]: fixing failed (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:1292</div><div>ERROR: error -1 while trying to fix configuration</div><div> 0(5319) DEBUG: presence_xml [presence_xml.c:329]: start</div>
<div> 0(5319) DEBUG: tm [t_funcs.c:122]: DEBUG: tm_shutdown : start</div><div> 0(5319) DEBUG: tm [t_funcs.c:125]: DEBUG: tm_shutdown : emptying hash table</div><div> 0(5319) DEBUG: tm [t_funcs.c:127]: DEBUG: tm_shutdown : removing semaphores</div>
<div> 0(5319) DEBUG: tm [t_funcs.c:129]: DEBUG: tm_shutdown : destroying tmcb lists</div><div> 0(5319) DEBUG: tm [t_funcs.c:132]: DEBUG: tm_shutdown : done</div><div> 0(5319) DEBUG: tls [tls_init.c:657]: tls module final tls destroy</div>
<div> 0(5319) DEBUG: <core> [mem/shm_mem.c:236]: shm_mem_destroy</div><div> 0(5319) DEBUG: <core> [mem/shm_mem.c:239]: destroying the shared memory lock</div><div><br></div><div><br></div><div>And this is the event_route cfg I have copied from the guide, I will mark lines 1286 and 1292</div>
<div><br></div><div><div>#!ifdef WITH_XCAPSRV</div><div>#!define WITH_XHTTPAUTH</div><div>event_route[xhttp:request] {</div><div> xdbg("===== xhttp: request [$rv] $rm => $hu\n");</div><div>#!ifdef WITH_XHTTPAUTH</div>
<div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);"> if (!www_authorize("xcap", "subscriber")) 1286<span style=""></span></span></div><div> {</div><div> www_challenge("xcap", "0");</div>
<div> exit;</div><div> }</div><div>#!endif</div><div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);"> if($hu=~"^/xcap-root/") 1292</span></div>
<div> {</div><div> set_reply_close();</div><div> set_reply_no_connect();</div><div> # xcap ops</div><div> $xcapuri(u=>data) = $hu;</div><div> if($xcapuri(u=>xuid)=~"^sip:.+@.+")</div>
<div> $var(uri) = $xcapuri(u=>xuid);</div><div> else if($xcapuri(u=>xuid)=~".+@.+")</div><div> $var(uri) = "sip:" + $xcapuri(u=>xuid);</div>
<div> else</div><div> $var(uri) = "sip:"+ $xcapuri(u=>xuid) + "@" + $Ri;</div><div> xlog("===== xhttp: $xcapuri(u=>auid) : $xcapuri(u=>xuid)\n");</div>
<div> if($xcapuri(u=>auid)=="xcap-caps")</div><div> {</div><div> $var(xbody) =</div><div>"<?xml version='1.0' encoding='UTF-8'?></div>
<div><xcap-caps xmlns='urn:ietf:params:xml:ns:xcap-caps'></div><div> <auids></div><div> <auid>rls-services</auid></div><div> <auid>pidf-manipulation</auid></div><div> <auid>xcap-caps</auid></div>
<div> <auid>resource-lists</auid></div><div> <auid>pres-rules</auid></div><div> <auid>org.openmobilealliance.pres-rules</auid></div><div> </auids></div><div> <extensions></div>
<div> </extensions></div><div> <namespaces></div><div> <namespace>urn:ietf:params:xml:ns:rls-services</namespace></div><div> <namespace>urn:ietf:params:xml:ns:pidf</namespace></div>
<div> <namespace>urn:ietf:params:xml:ns:xcap-caps</namespace></div><div> <namespace>urn:ietf:params:xml:ns:resource-lists</namespace></div><div> <namespace>urn:ietf:params:xml:ns:pres-rules</namespace></div>
<div> </namespaces></div><div></xcap-caps>";</div><div> xhttp_reply("200", "ok", "application/xcap-caps+xml",</div><div> "$var(xbody)");</div>
<div> exit;</div><div> }</div><div>#!ifdef WITH_XHTTPAUTH</div><div> # be sure auth user access only its documents</div><div> if ($au!=$(var(uri){uri.user})) {</div><div>
xhttp_reply("403", "Forbidden", "text/html",</div><div> "<html><body>$si:$sp</body></html>");</div><div> exit;</div>
<div> }</div><div><br></div><div>#!endif</div><div> switch($rm) {</div><div> case "PUT":</div><div> xcaps_put("$var(uri)", "$hu", "$rb");</div>
<div> if($xcapuri(u=>auid)=~"pres-rules")</div><div> {</div><div> xlog("===== xhttp put: refreshing watchers for $var(uri)\n");</div>
<div> pres_update_watchers("$var(uri)", "presence");</div><div> pres_refresh_watchers("$var(uri)", "presence", 1);</div>
<div> }</div><div> exit;</div><div> break;</div><div> case "GET":</div><div> xlog("===== xhttp: get $var(uri) => $hu\n");</div>
<div> xcaps_get("$var(uri)", "$hu");</div><div> exit;</div><div> break;</div><div> case "DELETE":</div>
<div> xcaps_del("$var(uri)", "$hu");</div><div> if($xcapuri(u=>auid)=~"pres-rules")</div><div> {</div>
<div> xlog("===== xhttp del: refreshing watchers for $var(uri)\n");</div><div> pres_update_watchers("$var(uri)", "presence");</div>
<div> pres_refresh_watchers("$var(uri)", "presence", 1);</div><div> }</div><div> exit;</div><div> break;</div>
<div> }</div><div> }</div><div><br></div><div> # http ops</div><div> xhttp_reply("200", "ok", "text/html",</div><div> "<html><body>OK: $si:$sp</body></html>");</div>
<div> exit;</div><div>}</div><div>#!endif</div></div><div><br></div>Thanks in advance,</div><div><br></div><div><br></div><div>Lucas</div><div><br></div><div><br></div><div><br></div><div><br><div class="gmail_quote">
On Thu, Nov 3, 2011 at 12:56 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
xcap_server has nothing to do with subscriber table. Can you make
sure you have all modules compiled at the same time, just in case
you updated system libraries.<br>
<br>
You can run kamailio with debug=3 to see exactly where it fails and
get more log messages.<br>
<br>
Cheers,<br>
Daniel<div><div class="h5"><br>
<br>
On 11/3/11 4:26 PM, Lucas Alvarez wrote:
</div></div><blockquote type="cite"><div><div class="h5">Hi, I've enabled xcap server in kamailio 3.1.3 and I'm
stuck with this error:
<div><br>
</div>
<div>
<div> 0(5073) ERROR: <core> [db.c:408]: invalid version 0
for table subscriber found, expected 6 (check table structure
and table "version")</div>
</div>
<div><br>
</div>
<div>I've already checked the version table and the table_name =
'subscriber' has table_version = 6. </div>
<div>Any help will be appreciated.</div>
<div>Regards.</div>
<div><br>
</div>
<div><br>
</div>
<div>Lucas </div>
<div><br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Dec 5-8, Berlin: <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
</font></span></div>
</blockquote></div><br></div>