[asterisk-users] Asterisk Radius CDR

Andrew Ivins andrew at ivins.id.au
Thu Sep 29 03:38:06 CDT 2016


You don't get anything in the Asterisk logs because freeradius-client
(formerly radiusclient-ng) returns a single failure code for any failure
when building a radius request.

Andrew

On 29 September 2016 at 15:55, Willy Offermans <asterisk at offermans.rompen.nl
> wrote:

> Hi Ahmed and asterisk friends,
>
> So asterisk cannot contact the radius server.
>
> The radiusclient __can__ contact the radius server.
>
> Check in the asterisk log files why asterisk cannot contact the radius
> server! Be also aware of the user, who is running the daemons. This user
> might need read access to certain configuration files.
>
> On Wed, Sep 28, 2016 at 01:24:58PM -0400, Ahmed Munir wrote:
> > Hi Andrew and Willy,
> >
> > Thanks for sharing the info.
> >
> > As for enabling radius server debugging 'radiusd -X', made some test
> calls
> > don't see the radiusclient sending data to radius server. However, using
> > radtest or radiusclient testing, able to send data to radius server
> (after
> > enabling debug).
> >
> > For further testing, on my other server  using OpenSIPs, setup the
> > radiusclient  and data was able to send over to radius server without any
> > issue i.e. using same radiusclient config that I'm using for Asterisk
> > radiusclient.
> >
> > Btw, will try to work on Andrew advise and will update you if I make any
> > progress.
> >
> >
> >
> > Date: Wed, 28 Sep 2016 10:09:51 +0200
> > > From: Willy Offermans <asterisk at Offermans.Rompen.nl>
> > > To: Asterisk Users Mailing List - Non-Commercial Discussion
> > >         <asterisk-users at lists.digium.com>
> > > Subject: Re: [asterisk-users] Asterisk Radius CDR
> > > Message-ID: <20160928080951.GA4977 at vpn.offrom.nl>
> > > Content-Type: text/plain; charset=us-ascii
> > >
> > > Hello Ahmed, Andrew, and asterisk friends,
> > >
> > > Some time ago, I ran into similar problems as well :) I can confirm the
> > > statement of Andrew: Turn on the logging facilities and you will find
> your
> > > issue most likely.  However, you need also a strategy. ``Radius client
> > > testing'' as you mentioned, can mean anything. The point is, can
> asterisk
> > > talk to the freeradius server via the client settings? To my opinion,
> this
> > > is easy to test. Maybe the message: ``cdr_radius.c:208 radius_log:
> Unable
> > > to create RADIUS record. CDR not recorded'' already implies that this
> is
> > > not possible. I cannot judge it. You can by turning on radiusd -X and
> have
> > > a close look to the output.
> > >
> > > On Wed, Sep 28, 2016 at 07:59:13AM +0800, Andrew Ivins wrote:
> > > > Hi Ahmed,
> > > >
> > > > I ran into similar problems. freeradius-client returns the same error
> > > code
> > > > for numerous failure cases, so Asterisk doesn't get an opportunity
> to log
> > > > anything useful. If you look here:
> > > >
> > > > https://github.com/FreeRADIUS/freeradius-client/blob/master/
> > > lib/buildreq.c
> > > >
> > > > You'll see many instances where it returns ERROR_RC. You are almost
> > > > certainly running into one of these. I ended up putting in print
> debug
> > > into
> > > > that file and recompiling. I think in my case it was as simple as a
> > > > hostname not resolving. Once you're not working blind, you'll find
> what
> > > is
> > > > happening pretty quickly.
> > > >
> > > > Andrew
> > > >
> > > > On 28 September 2016 at 03:32, Ahmed Munir <ahmedmunir007 at gmail.com>
> > > wrote:
> > > >
> > > > > I did radius client status testing with radius server, able to
> access
> > > the
> > > > > radius server. However, still getting radius CDR issue after
> setting
> > > debug
> > > > > level 8 even granting 666 access to radiusclient-ng config files.
> > > > >
> > > > > message: cdr_radius.c:208 radius_log: Unable to create RADIUS
> record.
> > > CDR
> > > > > not recorded!
> > > > >
> > > > > Please advise if I missed out anything.
> > > > >
> > > > >
> > > > > Date: Mon, 26 Sep 2016 12:09:34 +0200
> > > > >> From: Willy Offermans <asterisk at Offermans.Rompen.nl>
> > > > >> To: Asterisk Users Mailing List - Non-Commercial Discussion
> > > > >>         <asterisk-users at lists.digium.com>
> > > > >> Subject: Re: [asterisk-users] Asterisk Radius CDR
> > > > >> Message-ID: <20160926100934.GB4895 at vpn.offrom.nl>
> > > > >> Content-Type: text/plain; charset=us-ascii
> > > > >>
> > > > >>
> > > > >> Hello Ahmed,
> > > > >>
> > > > >> On Fri, Sep 23, 2016 at 04:12:42PM -0400, Ahmed Munir wrote:
> > > > >> > Hi,
> > > > >> >
> > > > >> > I've recently setup Asterisk with Radius CDR by following the
> > > document:
> > > > >> > https://wiki.asterisk.org/wiki/display/AST/RADIUS+CDR+Backend.
> > > > >> >
> > > > >> > The issue currently I'm facing is after turning on the debug
> getting
> > > > >> > message: cdr_radius.c:208 radius_log: Unable to create RADIUS
> > > record.
> > > > >> CDR
> > > > >> > not recorded!
> > > > >> >
> > > > >> > I've checked and grant access 666 to radiusclient config files:
> > > servers
> > > > >> &
> > > > >> > dictionary.digium and 777 to '/var/run/radius.seq'. I've noticed
> > > that
> > > > >> > /var/run/radius.seq is not getting updated.
> > > > >> >
> > > > >> >
> > > > >> > Further added, in asterisk CLI while running command: cdr show
> > > status
> > > > >> > getting results below;
> > > > >> >
> > > > >> > Call Detail Record (CDR) settings
> > > > >> > ----------------------------------
> > > > >> >   Logging:                    Enabled
> > > > >> >   Mode:                       Simple
> > > > >> >   Log unanswered calls:       No
> > > > >> >   Log congestion:             No
> > > > >> >
> > > > >> > * Registered Backends
> > > > >> >   -------------------
> > > > >> >     cdr-syslog
> > > > >> >     Adaptive ODBC
> > > > >> >     cdr-custom
> > > > >> >     csv
> > > > >> >     radius
> > > > >> >
> > > > >> >
> > > > >> > Please advise if I may missed any steps.
> > > > >> >
> > > > >> > --
> > > > >> > Regards,
> > > > >> >
> > > > >> > Ahmed Munir Chohan
> > > > >>
> > > > >> I cannot advice you about steps you might have missed, probably
> none.
> > > To
> > > > >> my
> > > > >> experience, the documentation is not sufficient.
> > > > >>
> > > > >> I can tell you that freeradius can be run in debug mode: radiusd
> -X Do
> > > > >> this
> > > > >> and have a close look to the output.
> > > > >>
> > > > >> If you cannot find any attempt to connect to the freeradius
> server you
> > > > >> need
> > > > >> to have a close look to the asterisk log files as well. Figure out
> > > what is
> > > > >> going wrong. There should be some clue.
> > > > >>
> > > > >> I don't understand the grant access settings. Figure out the user
> > > which is
> > > > >> running asterisk and set the setting appropriately! I remember
> that I
> > > > >> needed the following access setting:
> > > > >>
> > > > >> -rw-r-----  1 root  asterisk  /usr/local/etc/radiusclient-
> ng/servers
> > > > >>
> > > > >> So read access for asterisk to the servers file. This was not
> > > documented
> > > > >> at
> > > > >> all, but somehow logical, if you figured it out.
> > > > >>
> > > > >> --
> > > > >> Met vriendelijke groeten,
> > > > >> With kind regards,
> > > > >> Mit freundlichen Gruessen,
> > > > >> De jrus wah,
> > > > >>
> > > > >> Wiel
> > > > >>
> > > > >> *************************************
> > > > >>  W.K. Offermans
> > > > >>
> > > > >>                                        Powered by ....
> > > > >>
> > > > >>                                             (__)
> > > > >>                                          \\\'',)
> > > > >>                                            \/  \ ^
> > > > >>                                            .\._/_)
> > > > >>
> > > > >>                                        www.FreeBSD.org
> > > > >>
> > > > >>
> > > > >>
> > > > > --
> > > > > Regards,
> > > > >
> > > > > Ahmed Munir Chohan
> > > > >
> > > > >
> > > > > --
> > > > > ____________________________________________________________
> _________
> > > > > -- Bandwidth and Colocation Provided by http://www.api-digital.com
> --
> > > > >
> > > > > Join the Asterisk Community at the 13th AstriCon, September 27-29,
> 2016
> > > > >       http://www.asterisk.org/community/astricon-user-conference
> > > > >
> > > > > New to Asterisk? Start here:
> > > > >       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> > > > >
> > > > > asterisk-users mailing list
> > > > > To UNSUBSCRIBE or update options visit:
> > > > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > > > >
> > >
> > > > --
> > > > ____________________________________________________________
> _________
> > > > -- Bandwidth and Colocation Provided by http://www.api-digital.com
> --
> > > >
> > > > Join the Asterisk Community at the 13th AstriCon, September 27-29,
> 2016
> > > >       http://www.asterisk.org/community/astricon-user-conference
> > > >
> > > > New to Asterisk? Start here:
> > > >       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> > > >
> > > > asterisk-users mailing list
> > > > To UNSUBSCRIBE or update options visit:
> > > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > >
> > >
> > > --
> > > Met vriendelijke groeten,
> > > With kind regards,
> > > Mit freundlichen Gruessen,
> > > De jrus wah,
> > >
> > > Wiel
> > >
> > > *************************************
> > >  W.K. Offermans
> > >
> > >                                        Powered by ....
> > >
> > >                                             (__)
> > >                                          \\\'',)
> > >                                            \/  \ ^
> > >                                            .\._/_)
> > >
> > >                                        www.FreeBSD.org
> > >
> > >
> > >
> > >
> > > ***********************************************
> > >
> >
> >
> >
> > --
> > Regards,
> >
> > Ahmed Munir Chohan
>
> > --
> > _____________________________________________________________________
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> >
> > Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
> >       http://www.asterisk.org/community/astricon-user-conference
> >
> > New to Asterisk? Start here:
> >       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> --
> Met vriendelijke groeten,
> With kind regards,
> Mit freundlichen Gruessen,
> De jrus wah,
>
> Wiel
> Willy
>
> *************************************
> Dr. W.K. Offermans
> CAT Fellow
> CAT Catalytic Center
> Institut fuer Technische und Makromolekulare Chemie
> RWTH Aachen University
> Worringerweg 2, Raum 38C-150
> D-52074 Aachen, Germany
> Phone:  +49 241 80 26770
> Fax:    +49 241 80 22593
> Home:   +31 45 544 49 44
> Mobile: +31 681 15 87 68
> Mobile: +49 1575 414 60 55
> e-mail: Willem at Offermans.Rompen.nl
> e-mail: Willy.Offermans at CatalyticCenter.RWTH-Aachen.de
>
>                                        Powered by ....
>
>                                             (__)
>                                          \\\'',)
>                                            \/  \ ^
>                                            .\._/_)
>
>                                        www.FreeBSD.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>       http://www.asterisk.org/community/astricon-user-conference
>
> New to Asterisk? Start here:
>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160929/3f983a46/attachment.html>


More information about the asterisk-users mailing list