[OpenSIPS-Users] CDRtool freeradius mysql error

Saúl Ibarra Corretgé saul at ag-projects.com
Tue Jan 12 21:37:45 CET 2010


Hi,

I just tested on a clean environment and it worked for me. As this 
configuration involves many pieces of software try to track down the 
problem by testing the database on it's own;

Once you have loaded the stored procedures test them like this:

mysql> use radius;
mysql> show procedure status;
+--------+---------------------------------------+-----------+----------------+---------------------+---------------------+---------------+---------+
| Db     | Name                                  | Type      | Definer 
       | Modified            | Created             | Security_type | 
Comment |
+--------+---------------------------------------+-----------+----------------+---------------------+---------------------+---------------+---------+
| radius | create_radacct_table                  | PROCEDURE | 
root at localhost | 2010-01-12 21:50:02 | 2010-01-12 21:50:02 | DEFINER 
    |         |
| radius | insert_radacct_record                 | PROCEDURE | 
root at localhost | 2010-01-12 21:50:02 | 2010-01-12 21:50:02 | DEFINER 
    |         |
| radius | proc_update_raddact_record_mediaproxy | PROCEDURE | 
root at localhost | 2010-01-12 21:50:02 | 2010-01-12 21:50:02 | DEFINER 
    |         |
| radius | update_radacct_record                 | PROCEDURE | 
root at localhost | 2010-01-12 21:50:02 | 2010-01-12 21:50:02 | DEFINER 
    |         |
| radius | update_raddact_record_mediaproxy      | PROCEDURE | 
root at localhost | 2010-01-12 21:50:02 | 2010-01-12 21:50:02 | DEFINER 
    |         |
+--------+---------------------------------------+-----------+----------------+---------------------+---------------------+---------------+---------+
5 rows in set (0.00 sec)

mysql> CALL insert_radacct_record ( 
'radius','3c3b5ff12bf2-m5udeydrjsuw at snom320-000413241247', 
'5af53194787eccf1', 'adi at umts.ro', 'adi at umts.ro', '83.149.75.105', 
'5060', '2006-12-10 12:09:19',  '0', '0', '0', '0', 
'sip:3333 at umts.ro=3Buser=3Dphone', 'sip:adi at umts.ro', '200', 
'Sip-Session', '', '', '0', '0', '200', 'Invite', 
'sip:3333 at vm01.dns-hosting.info', 'as5664a60b', '27qems1o2j', 
'31208005169', '81.23.228.147', '5060', 
'sip:3333 at vm01.dns-hosting.info', '', '', 'audio','','');
Query OK, 0 rows affected (0.03 sec)

mysql> show tables;
+------------------+
| Tables_in_radius |
+------------------+
| radacct          |
| radacct200612    |
+------------------+
2 rows in set (0.00 sec)

mysql> CALL insert_radacct_record (
     -> 'radius','c3b5ff12bf2-m5udeydrjsuw at snom320-000413241247', 
'5af53194787eccf1',
     -> 'adi at umts.ro', 'adi at umts.ro', '83.149.75.105', '5060', 
'2009-12-14 12:09:19',
     -> '0', '0', '0', '0', 'sip:3333 at umts.ro',
     -> 'sip:adi at umts.ro', '200', 'Sip-Session', '', '', '0', '0', 
'200', 'Invite',
     -> 'sip:test at umts.ro', 'a60bsss', 'qe222ms1o2j',
     -> '208005169', '81.23.228.147', '5060',
     -> 'sip:test at umts.ro', '', '', 'chat','Blink-0.11.1',''
     -> );
Query OK, 0 rows affected (0.00 sec)

mysql> show tables;+------------------+| Tables_in_radius |
+------------------+
| radacct          |
| radacct200612    |
| radacct200912    |
+------------------+
3 rows in set (0.00 sec)


As you can see, tables get created automatically, so this means the 
database and the stored procedures are OK.

If you still have problems with the whole setup then that means that 
FreeRADIUS is not calling the stored procedure so the table is not 
created. Then you need to check carefully the FreeRADIUS configuration.


Regards,

-- 
Saúl Ibarra Corretgé
AG Projects



More information about the Users mailing list