Hey All,<div>The problem was with datatype of mask column.</div><div>This has to be updated in the doc mentioned here <a href="http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#AEN3632">http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#AEN3632</a>.</div>
<div>The doc specifies mask column to be char while opensips expects it to be int.</div><div><br></div><div>Its working now.</div><div><br></div><div>Thanks all,</div><div><br></div><div>--- Jayesh<br><br><div class="gmail_quote">
On Sat, Jul 10, 2010 at 12:44 PM, Jayesh Nambiar <span dir="ltr"><<a href="mailto:jayesh.voip@gmail.com">jayesh.voip@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 class="gmail_quote"><div>Hi Bogdan,</div><div>Here is the resultset of the query "Select * from trusted_hosts"</div><div><br></div><div>id grp host mask port protocol pattern context_info</div>
<div>1 1 122.160.231.66 32 0 udp ^sip:.*$ </div><div><br></div><div>Note: The name of my address table was defined as trusted_hosts in the opensips.cfg script using address_table parameter.</div>
<div>I've also checked for spaces and other errors, I couldn't find any.</div><div><br></div><div>Let me know if you find anything wrong.</div><div><br></div><div>Thanks,</div><div>--- Jayesh</div><div><br></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Jayesh,<br>
<br>
Could you post the exact content of the "address" table ? Do a "select<br>
* from address" .<br>
<br>
Regards,<br>
Bogdan<div><div></div><div class="h5"><br>
<br>
Jayesh Nambiar wrote:<br>
> Hi All,<br>
> I am trying to use the permission module and test the address<br>
> functions. But whenever I try to start opensips I get the following error:<br>
> ERROR:permissions:reload_address_table: database problem<br>
> Jul 9 10:19:11 [10964] DBG:core:db_allocate_rows: allocate 272 bytes<br>
> for result rows and values at 0x7b8870<br>
> Jul 9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting<br>
> STRING [216.XXX.XXX.9]<br>
> Jul 9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting INT [1]<br>
> Jul 9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting<br>
> STRING [31]<br>
> Jul 9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting INT [0]<br>
> Jul 9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting<br>
> STRING [UDP]<br>
> Jul 9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting<br>
> STRING [^sip:.*$]<br>
> Jul 9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting<br>
> STRING []<br>
> Jul 9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting INT [1]<br>
> Jul 9 10:19:11 [10964] DBG:permissions:reload_address_table: number<br>
> of rows in address table: 1<br>
> Jul 9 10:19:11 [10964] ERROR:permissions:reload_address_table:<br>
> database problem<br>
> Jul 9 10:19:11 [10964] DBG:core:db_free_columns: freeing result<br>
> columns at 0x7b8778<br>
> Jul 9 10:19:11 [10964] DBG:core:db_free_rows: freeing 1 rows<br>
> Jul 9 10:19:11 [10964] DBG:core:db_free_row: freeing row values at<br>
> 0x7b8880<br>
> Jul 9 10:19:11 [10964] DBG:core:db_free_rows: freeing rows at 0x7b8870<br>
> Jul 9 10:19:11 [10964] DBG:core:db_free_result: freeing result set at<br>
> 0x7b86b0<br>
> Jul 9 10:19:11 [10964] CRITICAL:permissions:init_address: reload of<br>
> address table failed<br>
> Jul 9 10:19:11 [10964] DBG:core:pool_remove: removing connection from<br>
> the pool<br>
> Jul 9 10:19:11 [10964] ERROR:permissions:mod_init: failed to<br>
> initialize the allow_address function<br>
> Jul 9 10:19:11 [10964] ERROR:core:init_mod: failed to initialize<br>
> module permissions<br>
> Jul 9 10:19:11 [10964] ERROR:core:main: error while initializing modules<br>
> Jul 9 10:19:11 [10964] DBG:xlog:destroy: destroy module...<br>
><br>
> I am using MySQL version 5.1.48 as my backend. I've created tables<br>
> using the schema mentioned<br>
> here <a href="http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#AEN3632" target="_blank">http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#AEN3632</a>.<br>
> I have changed the table and column names according to my requirement.<br>
> While starting OpenSIPS, it executes this query on my DB:<br>
> "select host,grp,mask,port,protocol,pattern,context_info,id from<br>
> trusted_ips" for which the resultset is returned by my DB properly.<br>
> The resultset returned is as follows:<br>
> '216.XXX.XXX.9', 1, '31', 0, 'UDP', '^sip:.*$', '', 1.<br>
> The public IP is masked on purpose while showing here. Does anyone<br>
> find something missing in my setup. I am just not able to get this up<br>
> and working.<br>
> Any pointers or mistakes pointed out would be of great help.<br>
><br>
> Thanks in advance.<br>
><br>
> --- Jayesh<br></div></div>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
<br>
--<br>
Bogdan-Andrei Iancu<br>
OpenSIPS Bootcamp<br>
20 - 24 September 2010, Frankfurt, Germany<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br></blockquote></div>
</blockquote></div><br></div>