[OpenSIPS-Users] permission module problem

Jayesh Nambiar jayesh.voip at gmail.com
Sat Jul 10 10:37:40 CEST 2010


Hey All,
The problem was with datatype of mask column.
This has to be updated in the doc mentioned here
http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#AEN3632.
The doc specifies mask column to be char while opensips expects it to be
int.

Its working now.

Thanks all,

--- Jayesh

On Sat, Jul 10, 2010 at 12:44 PM, Jayesh Nambiar <jayesh.voip at gmail.com>wrote:

> Hi Bogdan,
> Here is the resultset of the query "Select * from trusted_hosts"
>
> id             grp           host                 mask          port
>      protocol        pattern         context_info
> 1               1      122.160.231.66         32                0
>     udp            ^sip:.*$
>
> Note: The name of my address table was defined as trusted_hosts in the
> opensips.cfg script using address_table parameter.
> I've also checked for spaces and other errors, I couldn't find any.
>
> Let me know if you find anything wrong.
>
> Thanks,
> --- Jayesh
>
> Hi Jayesh,
>>
>> Could you post the exact content of the "address" table ?  Do a "select
>> * from address" .
>>
>> Regards,
>> Bogdan
>>
>>
>> Jayesh Nambiar wrote:
>> > Hi All,
>> > I am trying to use the permission module and test the address
>> > functions. But whenever I try to start opensips I get the following
>> error:
>> > ERROR:permissions:reload_address_table: database problem
>> > Jul  9 10:19:11 [10964] DBG:core:db_allocate_rows: allocate 272 bytes
>> > for result rows and values at 0x7b8870
>> > Jul  9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting
>> > STRING [216.XXX.XXX.9]
>> > Jul  9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting INT
>> [1]
>> > Jul  9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting
>> > STRING [31]
>> > Jul  9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting INT
>> [0]
>> > Jul  9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting
>> > STRING [UDP]
>> > Jul  9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting
>> > STRING [^sip:.*$]
>> > Jul  9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting
>> > STRING []
>> > Jul  9 10:19:11 [10964] DBG:db_mysql:db_mysql_str2val: converting INT
>> [1]
>> > Jul  9 10:19:11 [10964] DBG:permissions:reload_address_table: number
>> > of rows in address table: 1
>> > Jul  9 10:19:11 [10964] ERROR:permissions:reload_address_table:
>> > database problem
>> > Jul  9 10:19:11 [10964] DBG:core:db_free_columns: freeing result
>> > columns at 0x7b8778
>> > Jul  9 10:19:11 [10964] DBG:core:db_free_rows: freeing 1 rows
>> > Jul  9 10:19:11 [10964] DBG:core:db_free_row: freeing row values at
>> > 0x7b8880
>> > Jul  9 10:19:11 [10964] DBG:core:db_free_rows: freeing rows at 0x7b8870
>> > Jul  9 10:19:11 [10964] DBG:core:db_free_result: freeing result set at
>> > 0x7b86b0
>> > Jul  9 10:19:11 [10964] CRITICAL:permissions:init_address: reload of
>> > address table failed
>> > Jul  9 10:19:11 [10964] DBG:core:pool_remove: removing connection from
>> > the pool
>> > Jul  9 10:19:11 [10964] ERROR:permissions:mod_init: failed to
>> > initialize the allow_address function
>> > Jul  9 10:19:11 [10964] ERROR:core:init_mod: failed to initialize
>> > module permissions
>> > Jul  9 10:19:11 [10964] ERROR:core:main: error while initializing
>> modules
>> > Jul  9 10:19:11 [10964] DBG:xlog:destroy: destroy module...
>> >
>> > I am using MySQL version 5.1.48 as my backend. I've created tables
>> > using the schema mentioned
>> > here http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#AEN3632.
>> > I have changed the table and column names according to my requirement.
>> > While starting OpenSIPS, it executes this query on my DB:
>> > "select host,grp,mask,port,protocol,pattern,context_info,id from
>> > trusted_ips" for which the resultset is returned by my DB properly.
>> > The resultset returned is as follows:
>> > '216.XXX.XXX.9', 1, '31', 0, 'UDP', '^sip:.*$', '', 1.
>> > The public IP is masked on purpose while showing here. Does anyone
>> > find something missing in my setup. I am just not able to get this up
>> > and working.
>> > Any pointers or mistakes pointed out would be of great help.
>> >
>> > Thanks in advance.
>> >
>> > --- Jayesh
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>>
>>
>> --
>> Bogdan-Andrei Iancu
>> OpenSIPS Bootcamp
>> 20 - 24 September 2010, Frankfurt, Germany
>> www.voice-system.ro
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100710/cd70d8de/attachment-0001.htm 


More information about the Users mailing list