Hi Matt,

The problem is your "group" column is not integer, but char (as type). Permissions module expects an integer value there.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 01/04/2013 04:19 PM, [email protected] wrote:

Hi Guys,

First post and just getting started with OpenSIPS so please be gentle!

I'm trying to use OpenSIPS alongside Asterisk and an Asterisk billing platform. I want to authorise calls based on the IP address using the permissions module.

The IP addresses that should be allowed are already stored in MySQL, so I'm trying to create the OpenSIPS table as a view to use the existing data. This part works OK and I can see the allowed IPs in the Permissions tab in opensips-cp.

But when I start opensips I get this error --

ERROR:permissions:reload_address_table: invalid group column type on row 0, skipping..

and here is the view in MySQL --

+--------------+-----------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+-----------------+------+-----+---------+-------+ | id | int(11) | NO | | 0 | | | grp | int(5) unsigned | NO | | 0 | | | ip | varchar(50) | NO | | NULL | | | mask | int(2) | NO | | 0 | | | port | int(4) | NO | | 0 | | | proto | varchar(3) | NO | | | | | pattern | char(0) | NO | | | | | context_info | char(0) | NO | | | | +--------------+-----------------+------+-----+---------+-------+

The grp field are set to '1' for all records.

and here is the opensips code generating the error --

if (VAL_TYPE(val + 1) != DB_INT || VAL_NULL(val + 1) ||

                 VAL_INT(val + 1)<  0) {
LM_ERR("invalid group column type on row %d,

skipping..\n", i);

continue;

So I'm trying to figure out what those checks are actually doing, and why it is failing. I assumed it was just checking it is an Integer, but it can't be. I'd rather not change the OpenSIPS source code to fix my issue.

Thanks, Matt


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to