http://appradius.minitelecom.org/
Appradius is a GPL project that adds full RADIUS authorize and account features to Asterisk.
Supports
Example:
exten => s,1,Answer
exten => s,2,SetLanguage(en) ; if you want to change language replace 'en' with other like 'de'
exten => s,3,Radius(CPP) ; CPP-Parameter is mandatory!
exten => s,4,Hangup
Asterisk Addons
Appradius is a GPL project that adds full RADIUS authorize and account features to Asterisk.
Supports
- recording Asterisk CDR into Radius
- authenticating users via Radius
Example:
exten => s,1,Answer
exten => s,2,SetLanguage(en) ; if you want to change language replace 'en' with other like 'de'
exten => s,3,Radius(CPP) ; CPP-Parameter is mandatory!
exten => s,4,Hangup
See also
Asterisk Addons

Comments
333Appradius Docs
333My experience
- In order to compile properly add #define _GNU_SOURCE before includes in header file or Add -D_GNU_SOURCE to CFLAGS variable in src/Makefile
- path for radius.conf file is hard coded so modify it depending on you asterisk install pin header files (#define RADCONFIG "/your/asterisk/etc/path/radius.conf")
- For free Radisu add the content appradius1.0/contrib/dictionary.add to /usr/share/freeradius/dictionary
- In radacc table create an account to test with pin 4 digits and passwd 4 digits (or 6/6, or 8/8 ?)
- In radreply set up the Account-Cache and Session-Timeout (to some hard coded value just to test, ex 12 and 65)
- Notice that a minimum call time of 1 minute has been set in the defines whatever the called destination
- Modify the app_radius.c (around line 377) with
nHang = radius_cktime(usernm, passwd, phone, szSID);
(nhang instead of nCache)
What is missing for this module:
- The radius_cktime should return a nHang is seconds depending on the called destination (phone) (to be done as a module of the freeRadius, I suggest, as the nHang is returned in the Session-Timeout Radius attribute)
- Call time in CDR = total call time (including the time spent in IVR to enter login/passwd and time to set up the call with the extension) and not the call time with the reached extension. Don't know how to solve this yet ...
- Account-Cache should be updated based on the time of the call and the called destination (in the freeRadisu Module also ...)
Finnaly, this module is not usable out of the box, but I'm sure the minitelecom gys will be happy to help you ;)
333Where is radius.conf file located?
Thanks for this module!
Chris
333Hack for RH9 & 1.0.2 - but no records ???
- untar then:
cd /root/appradius1.0/srcperl -pi -e "s/CFLAGS =/CFLAGS = -D_GNU_SOURCE/g;" ./Makefile
- install then:
cd /usr/libln -s /usr/local/lib/librad.so.1.0 librad.so
333Re: Re: v1.4 works 0.9.1 stable only
333still in development?
I also keep to checking around functions too.
and I get result following that .
Sep 30 00:22:43 NOTICE393237: app_radius.c:391 auth_exec: SID=415b8a0c-49d3865d-1111 user=1111
Sep 30 00:22:43 NOTICE393237: app_radius.c:213 radius_cktime: user length = 4, pass length = 4, phone length = 3, sid length = 22
calling 400
— Executing MP3Player("IAX2/xx00@xx00/4", "/var/lib/asterisk/mohmp3/sample.mp3") in new stack
calling 400 returned -1, with 0 secs real usage
I think it seems still in development.
and I think the point of following source code is bit stranege.
in app_radius.c
nCache = radius_cktime(usernm, passwd, phone, szSID);
How can I set the attribute for account?
it seems radius_cktime routine is always return "0" by seting with int to = 0;
Does anyone have good idea?
333Re: How about this condition?
333Re: v1.4 works 0.9.1 stable only
+++ src/Makefile 2004-09-09 11:13:43.702550816 +0545 @@ -20,7 +20,7 @@
LIB=../lib
INC=../inc
-CFLAGS = -I${INC} -O -Wall -I${includedir} -g -O2
+CFLAGS = -D_GNU_SOURCE -I${INC} -O -Wall -I${includedir} -g -O2 LDFLAGS = -L${LIB} -L${libdir}
LDADD = -lrad
333why?
it can get a Access-Accept from radius server.
but app_radius cannot accept it.
What's that?
333How about this condition?
Is this correct?(:biggrin:)