Hi, I use different type of VoIP GWYs and SIP servers ( like Cisco, Asterisk, OpenSER ) in our VoIP network. They are writing detail accounting info to the freeradius server fine. But I am having some issues writing the accounting info to backend database like MySQL. For example the radius accounting attributes of Cisco is different from Asterisk or OpenSER. So the idea is to create multiple tables in the database where Freeradius is writing and store Cisco's accounting info to say radacct_1, Asterisk's to radacct_2, OpenSER's to radacct_3 tables. How do I assign a specific NAS like Cisco to use say sql_1.conf, Asterisk to use sql_2.conf and OpenSER to use sql_3.conf. Or if there is any other way to solve this.. thanks in advance Get more from your digital life. Find out how. _________________________________________________________________ Got Game? Win Prizes in the Windows Live Hotmail Mobile Summer Games Trivia Contest http://www.gowindowslive.com/summergames?ocid=TXT_TAGHM
Rana Dhekial wrote:
So the idea is to create multiple tables in the database where Freeradius is writing and store Cisco's accounting info to say radacct_1, Asterisk's to radacct_2, OpenSER's to radacct_3 tables.
You can update the table name on the fly. In 2.0.5, set SQL-Table-Name, and then edit the SQL queries to replace the references to ${acct_table} with %{%{SQL-Table-Name}:-${acct_table}} Alan DeKok.
Hi Alan, How do I create conditional statement to uniquely identify differenent NAS vendors to use its sql.conf ? Is it something like if ( NAS-IP-Address = "cisco's IP address" ) $INCLUDE ${confdir}/sql1.conf else ( NAS-IP-Address = "Asterisk's IP address" ) $INCLUDE ${confdire}/sql2.conf in the "radiusd.conf" file ? thanks,
Date: Sat, 9 Aug 2008 10:45:10 +0200> From: aland@deployingradius.com> To: freeradius-users@lists.freeradius.org> Subject: Re: Multiple NAS> > Rana Dhekial wrote:> > So the idea is to create multiple tables in the database where> > Freeradius is writing and store Cisco's accounting info to say> > radacct_1, Asterisk's to radacct_2, OpenSER's to radacct_3 tables.> > You can update the table name on the fly. In 2.0.5, set> SQL-Table-Name, and then edit the SQL queries to replace the references> to ${acct_table} with %{%{SQL-Table-Name}:-${acct_table}}> > Alan DeKok.> -> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Got Game? Win Prizes in the Windows Live Hotmail Mobile Summer Games Trivia Contest http://www.gowindowslive.com/summergames?ocid=TXT_TAGHM
Rana Dhekial wrote:
How do I create conditional statement to uniquely identify differenent NAS vendors to use its sql.conf ? Is it something like
if ( NAS-IP-Address = "cisco's IP address" ) $INCLUDE ${confdir}/sql1.conf
No. The configurations are static. You cannot use unlang in the "modules" section. Instead, you should list the module in the "modules" section (or in raddb/modules), and then refer to it in the authorize section. if (NAS-IP-Address == 1.2.3.4) { sq11 } elsif (NAS-IP-Address == 2.3.4.5) { sql2 } Alan DeKok.
participants (2)
-
Alan DeKok -
Rana Dhekial