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