<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi Matt,<br>
<br>
The problem is your "group" column is not integer, but char (as
type). Permissions module expects an integer value there.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 01/04/2013 04:19 PM, <a class="moz-txt-link-abbreviated" href="mailto:list@mattn.com">list@mattn.com</a> wrote:
<blockquote cite="mid:50E6E4DE.1040101@mattn.com" type="cite">
<p>Hi Guys,</p>
<p>First post and just getting started with OpenSIPS so please be
gentle!</p>
<p>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.</p>
<p>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.</p>
<p>But when I start opensips I get this error –</p>
<p>ERROR:permissions:reload_address_table: invalid group column
type on row 0, skipping..</p>
<p>and here is the view in MySQL –</p>
<p>+--------------+-----------------+------+-----+---------+-------+
| 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 | | | |
+--------------+-----------------+------+-----+---------+-------+</p>
<p>The grp field are set to ‘1’ for all records.</p>
<p>and here is the opensips code generating the error –</p>
<p>if (VAL_TYPE(val + 1) != DB_INT || VAL_NULL(val + 1) ||</p>
<pre> VAL_INT(val + 1) < 0) {
LM_ERR("invalid group column type on row %d,</pre>
<p>skipping..\n", i);</p>
<pre>continue;</pre>
<p>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.</p>
<p>Thanks, Matt</p>
<img moz-do-not-send="true"
src="http://u457912.sendgrid.org/wf/open?upn=oEMJ28Tbv3NCKzw6SHcfLpVLE8bX1Z0iCh9TCbI3FEj0aG2lnu-2FQNoD6KzezyVv0D0HjPTHHbAbmzvaoWpxdT-2Bbs7-2FbhwXO5m9eXiyYg-2FR6kdnEFyK4lJfWt3Ac6IE4fH-2BbjPhOQP9XAw0KjQfZ-2BryOuWZq1xcnzUEn0CQtb5nUXgb05G3D7fcjp7pYdMD-2F7"
alt="" style="height: 1px ! important; width: 1px ! important;
border-width: 0pt ! important; margin: 0pt ! important; padding:
0pt ! important;" border="0" height="1" width="1">
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>