[OpenSIPS-Users] CDRtool freeradius mysql error

osiris123d duane.larson at gmail.com
Tue Jan 12 20:28:07 CET 2010


I have read and re-installed CDRTool about 4 times and I don't think I am
missing anything in the INSTALL.txt file.  I apologize if you think I am
just brushing through the install and not actually trying to figure out the
issue before asking, but I have gone through the instructions many times and
the issue is not sticking out.  This is what I do to get Freeradius
installed and set up


Execute the following
	apt-get install freeradius-xs freeradius-xs-mysql
	mysqladmin -u root -p create radius
	mysql -u root -p radius <
/var/www/CDRTool/setup/radius/OpenSIPS/radacct.mysql

	***********
	At this point I do Option B instead of option A since I want "To
automatically create a table for each calendar month radacctYYYYMM" 
	instead of "To write data into one radacct table"
	***********
	cp /var/www/CDRTool/setup/radius/OpenSIPS/radius_accounting.conf
/etc/freeradius/sql.conf


Grant access to radius user to the radius database (I put in a bunch just to
troubleshoot that its not a permission issue)
	GRANT ALL ON radius.*  TO radius at 12.*.*.218 IDENTIFIED by '**********';
	GRANT ALL ON radius.*  TO radius at localhost IDENTIFIED by '**********';
	GRANT ALL ON radius.*  TO radius at 66.*.*.14 IDENTIFIED by '**********';
	GRANT ALL ON radius.*  TO radius at CDRTool.a.com IDENTIFIED by '**********';
	GRANT ALL ON cdrtool.* TO locker at localhost IDENTIFIED by 'lockadm18';

Execute the following
	mysql -u root -p -h localhost radius <
/var/www/CDRTool/setup/radius/OpenSIPS/radius_accounting.proc



Edit the following 
	nano /etc/freeradius/client.conf
	client 66.*.*.14 {                    <----------- OpenSIPS Server
        	secret=YourSecret
        	nastype=other
        	shortname=sip     
	}        

	client 66.*.*.13 {                    <----------- Mediaproxy Server
        	secret=YourSecret
        	nastype=other
        	shortname=mediaproxy
	}

	client 12.*.*.218 {                    <----------- CDRTool Server
        	secret=YourSecret
        	nastype=other
        	shortname=radius    
	}

	
Edit the following
	nano /etc/freeradius/sql.conf
    	driver                      = "rlm_sql_mysql"
    	server                      = "12.*.*.218"                   
<----------- CDRTool Server
    	login                       = "radius"
    	password                    = "**********"
    	radius_db                   = "radius"


Edit the following
	nano /etc/freeradius/radiusd.conf
	accounting {
        	detail
        	sql
        	ok   <----------The INSTALL.txt file doesn't mention anything about
the ok option, but your freeradius-xs package puts it here
	}

Edit the following
	nano /etc/freeradius/proxy.conf
	realm DEFAULT {
        	type            = radius
        	authhost        = 12.*.*.218:1812     <----------- CDRTool Server
        	accthost        = 12.*.*.218:1813     <----------- CDRTool Server
        	secret          = YourSecret
        	ldflag          = fail_over
        	nostrip
	}



Verify that /etc/freeradius/dictionary looks like this

	# standard radius dictionary
	$INCLUDE        /usr/share/freeradius/dictionary

	# OpenSER dictionary
	$INCLUDE        /etc/freeradius/dictionary.openser    <---INSTALL.txt file
says opensips, but your freeradius-xs package installs this

	# MediaProxy dictionary
	$INCLUDE        /etc/freeradius/dictionary.mediaproxy




This is all the INSTALL.txt file says to do from a Freeradius standpoint.  I
don't see how I can mess up the sql.conf file since you basically just have
to copy over radius_accounting.conf to /etc/freeradius/sql.conf and edit the
"server" line and "password" line.

The MySQL version is 5.1.41-3.  So thats not an issue
Mediaproxy version is >=1.8.0
I installed Freeradius by doing the apt-get of AG Projects Freeradius-xs
packages
I inserted the radius_accounting.proc stored procedures

So not sure what I could have missed.



Adrian Georgescu wrote:
> 
> This has nothing to do with the software but with its configuration  
> namely the Freeradius sql.conf file. Read the installation  
> instructions and the sample files in CDRTool/setup/ directory.
> Adrian
>  >I am still not able to get CDRTool to work because it never creates  
> the
> months radacct table in the radius database.  I have installed  
> everything on
> Debian 5.0.3 by just using the following repositories
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/CDRtool-freeradius-mysql-error-tp4293459p4293798.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list