<html><body>
<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 src="http://u457912.sendgrid.org/wf/open?upn=oEMJ28Tbv3NCKzw6SHcfLpVLE8bX1Z0iCh9TCbI3FEj0aG2lnu-2FQNoD6KzezyVv0D0HjPTHHbAbmzvaoWpxdT-2Bbs7-2FbhwXO5m9eXiyYg-2FR6kdnEFyK4lJfWt3Ac6IE4fH-2BbjPhOQP9XAw0KjQfZ-2BryOuWZq1xcnzUEn0CQtb5nUXgb05G3D7fcjp7pYdMD-2F7" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>