Radius Accounting Plug-in README (C) 2005-2007, Brekeke Software, Inc. All rights reserved. Date: Apr 20, 2007 1. Introduction ~~~~~~~~~~~~~~~~~~~~~~ This Radius Accounting plug-in is a sample program for learning how to develop a Brekeke SIP Server Session-Plugin. You can use it as it is, also you can modify the plug-in as you like. This plug-in is developed partially based on draft-schulzrinne-sipping-radius-accounting-00.txt. 2. Contents ~~~~~~~~~~~~~~~~~~~~~~ radius_sip_acct.zip includes the following contents. com (directory) ... Source files of Radius Accounting plug-in net (directory) ... Source file of Java Radius Client obtained from http://jradius-client.sourceforge.net (partially modified). radiuscalllog.jar ... a jar file which include compressed com and net directories. brekeke_sip_dictionary ... Additional Radius Attributes and values for SIP README_e.txt ... README (English) README_j.txt ... README (Japanese) 3. Installation ~~~~~~~~~~~~~~~~~~~~~~ 1)Put radius-sip-acct.jar file into \webapps\proxy (or pbx)\WEB-INF\lib directory. 2)Find \webapps\proxy (or pbx)\WEB-INF\work\sv\sv.properties file. Add the following lines. radius.authport = 1812 radius.acctport = 1813 radius.radiushost = Put_radius_server_IP_address radius.sharedsecret = Put_shared_secret When you need to check DEBUG log for this plug-in, please set net.sip.loglevel.file=255 3)Open Brekeke SIP Server's Admintool and click [Dial Plan] menu. Add the following rule on top of all rules. Matching Pattern: $request = ^INVITE Deploy Pattern: $session=com.sample.radius.proxy.RadiusAcct $continue = true 4) Restart Brekeke SIP Server machine 4. Radius Accounting Plug-in's behavior ~~~~~~~~~~~~~~~~~~~~~~ This plug-in sends RADIUS Request packets to your RADIUS Server. A Talk Start information is sent when Brekeke SIP Server receives 200 OK for a INVITE request. A TAlK Stop information when Brekeke SIP Server receives BYE. 5. Modification of the Radius Accounting Plug-in ~~~~~~~~~~~~~~~~~~~~~~ Source files are included in this package. Please modify it as you like. 6. Test with FreeRadius Server ~~~~~~~~~~~~~~~~~~~~~~ 1)Download the latest FreeRadius from http://www.freeradius.org/getting.html. 2)Extract the file and execute the followings. ./configure make make install 3)Open the file /usr/local/etc/raddb/clients.conf and add a radius client info, i.e. Brekeke SIP Server's information. Example: client 192.168.0.100 { secret = shortname = 192.168.0.100 } should be the same string text as the string you set for the property radius.sharedsecret in the sv.properties file. 4)Open the file /usr/local/etc/raddb/radiusd.conf. Please find the section "accounting{" in the file and comment out the line "detail". Detailed Call Log information will be stored in /usr/local/var/log/radius/radacct/ directory by default. You can check there what data was sent from the plug-in. 5)Copy the bundled file brekeke_sip_dictionary to /usr/local/etc/raddb/. Open /usr/local/etc/raddb/dictionay and add the following line. $INCLUDE /usr/local/etc/raddb/brekeke_sip_dictionay 6)Start your Radius server /usr/local/sbin/radiusd -X 7)Do some test calls and check if Radius packets are sent to your Radius Server. For details about FreeRadius Server, please visit http://www.freeradius.org 7. Change Log ~~~~~~~~~~~~~~~~~~~~~~ Nov. 29, 2005 Fixed the bug that throws exception when there is no sip user name in From url for a sip session.