Hi there.<div>I'm trying to use permission module with db_text, and it's not working, and I can't understand what's wrong.</div><div>Opensips 1.6.1 svnrevision: 2:6509</div><div><br></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="border-collapse: separate;">In opensips.cfg:</span></span></font></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="Apple-style-span" style="font-family: arial, sans-serif; border-collapse: collapse; "> loadmodule "db_text.so"</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><div> modparam("db_text", "db_mode", 0)</div><div><div> loadmodule "permissions.so"</div>
<div> modparam("permissions","db_url", "text:///etc/opensips/dbtext")</div><div><span class="Apple-style-span" style="border-collapse: separate;"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></span></div><div>In /etc/opensips/dbtext/address:</div><div> id(int,auto) grp(int) ip(str) mask(int) port(int) proto(str) pattern(str,null) context_info(str,null)</div><div><div> 10:1:10.100.0.0:23:5060:udp::</div>
<div> 20:1:10.110.0.0:23:5060:udp::</div><div> 30:1:10.120.0.0:23:5060:udp::</div><div><br></div><div><span class="Apple-style-span" style="border-collapse: separate;">LOG:</span></div><div><span class="Apple-style-span" style="border-collapse: separate;"><br>
</span></div></div></div></span></font></div><div><div><div>DBG:core:init_mod: initializing module permissions</div><div>DBG:permissions:mod_init: initializing...</div><div>WARNING:permissions:parse_config_file: file not found: /etc/opensips/permissions.allow</div>
<div>WARNING:permissions:mod_init: default allow file (/etc/opensips/permissions.allow) not found => empty rule set</div><div>WARNING:permissions:parse_config_file: file not found: /etc/opensips/permissions.deny</div><div>
WARNING:permissions:mod_init: default deny file (/etc/opensips/permissions.deny) not found => empty rule set</div><div>DBG:core:find_mod_export: found <db_bind_api> in module db_text [/usr/lib/opensips/modules/]</div>
<div>DBG:core:db_bind_mod: using db bind api for db_text</div><div>INFO:db_text:dbt_init: using database at: /etc/opensips/dbtext/</div><div>DBG:db_text:dbt_cache_get_db: looking for db /etc/opensips/dbtext/!</div><div>DBG:db_text:dbt_cache_get_db: new db!</div>
<div>DBG:db_text:dbt_load_file: request for table [version]</div><div>DBG:db_text:dbt_load_file: db is [/etc/opensips/dbtext/]</div><div>DBG:db_text:dbt_load_file: loading file [/etc/opensips/dbtext//version]</div><div>DBG:db_text:dbt_table_new: mtime is 1263556066</div>
<div>DBG:db_text:dbt_load_file: column[0] is STR!</div><div>DBG:db_text:dbt_load_file: column[1] is INT!</div><div>DBG:db_text:dbt_query: new res with 1 cols</div><div>DBG:db_text:dbt_result_new: new res with 1 cols</div>
<div>DBG:core:db_new_result: allocate 28 bytes for result set at 0x816b044</div><div>DBG:core:db_allocate_columns: allocate 16 bytes for result columns at 0x816aedc</div><div>DBG:core:db_allocate_rows: allocate 28 bytes for result rows and values at 0x816b090</div>
<div>DBG:core:db_free_columns: freeing result columns at 0x816aedc</div><div>DBG:core:db_free_rows: freeing 1 rows</div><div>DBG:core:db_free_row: freeing row values at 0x816b098</div><div>DBG:core:db_free_rows: freeing rows at 0x816b090</div>
<div>DBG:core:db_free_result: freeing result set at 0x816b044</div><div>DBG:db_text:dbt_load_file: request for table [address]</div><div>DBG:db_text:dbt_load_file: db is [/etc/opensips/dbtext/]</div><div>DBG:db_text:dbt_load_file: loading file [/etc/opensips/dbtext//address]</div>
<div>DBG:db_text:dbt_table_new: mtime is 1263558311</div><div>DBG:db_text:dbt_load_file: column[0] is INT!</div><div>DBG:db_text:dbt_load_file: column[1] is INT!</div><div>DBG:db_text:dbt_load_file: column[2] is STR!</div>
<div>DBG:db_text:dbt_load_file: column[3] is INT!</div><div>DBG:db_text:dbt_load_file: column[4] is INT!</div><div>DBG:db_text:dbt_load_file: column[5] is STR!</div><div>DBG:db_text:dbt_load_file: column[6] is STR!</div><div>
DBG:db_text:dbt_load_file: column[7] is STR!</div><div>DBG:db_text:dbt_query: new res with 8 cols</div><div>DBG:db_text:dbt_result_new: new res with 8 cols</div><div>DBG:core:db_new_result: allocate 28 bytes for result set at 0x816b004</div>
<div>DBG:core:db_allocate_columns: allocate 128 bytes for result columns at 0x8186b68</div><div>DBG:core:db_allocate_rows: allocate 504 bytes for result rows and values at 0x8186bf4</div><div>DBG:permissions:reload_address_table: number of rows in address table: 3</div>
<div>ERROR:permissions:reload_address_table: database problem</div><div>DBG:core:db_free_columns: freeing result columns at 0x8186b68</div><div>DBG:core:db_free_rows: freeing 3 rows</div><div>DBG:core:db_free_row: freeing row values at 0x8186c0c</div>
<div>DBG:core:db_free_row: freeing row values at 0x8186cac</div><div>DBG:core:db_free_row: freeing row values at 0x8186d4c</div><div>DBG:core:db_free_rows: freeing rows at 0x8186bf4</div><div>DBG:core:db_free_result: freeing result set at 0x816b004</div>
<div>CRITICAL:permissions:init_address: reload of address table failed</div><div>ERROR:permissions:mod_init: failed to initialize the allow_address function</div><div>ERROR:core:init_mod: failed to initialize module permissions</div>
<div>ERROR:core:main: error while initializing modules</div><div>DBG:db_text:destroy: destroy ...</div><div><br></div></div><div><br></div>-- <br>WBR, Leonid Nasedkin<br>icq: 256816<br>skype: leonidnasedkin<br>
</div>