[OpenSIPS-Users] permissions mysql table format
list at mattn.com
list at mattn.com
Fri Jan 4 15:19:10 CET 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130104/08e38655/attachment.htm>
More information about the Users
mailing list