<div dir="ltr">The attribute is not NAS-Id its NAS-Identifier so try<br><br> ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \<br> '%{SQL-User-Name}', \<br> '%{Realm}', <b>%{NAS-Identifier}</b>, '%{NAS-IP-Address}', '%{NAS-Port}', \<br>
'%{NAS-Port-Type}', '%S', NULL, \<br> '0', '%{Acct-Authentic}', '%{Connect-Info}', \<br> '', '0', '0', \<br> '%{Called-Station-Id}', '%{Calling-Station-Id}', '', \<br>
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \<br> '%{%{Acct-Delay-Time}:-0}', '0', '%{X-Ascend-Session-Svr-Key}')<div dir="ltr">
"</div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 12 April 2014 05:20, Benoit <span dir="ltr"><<a href="mailto:goony@hotmail.fr" target="_blank">goony@hotmail.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Sorry I have to come back with my problem. I tried to figure out some way to get what I want but with no success. What I want is basically to add the row_id of the nas in the radacct table. So OK I added the field nasid in the radacct table (radacct.nasid = <a href="http://nas.id" target="_blank">nas.id</a>). <br>
<br>In the dialup.conf file, I see the queries that insert lines in the radacct table. So I could add<br><br>INSERT INTO ${acct_table1} \<br> (acctsessionid, acctuniqueid, username, \<br> realm, <b> nasid</b>, nasipaddress, nasportid, \<br>
nasporttype, acctstarttime, acctstoptime, \<br> acctsessiontime, acctauthentic, connectinfo_start, \<br> connectinfo_stop, acctinputoctets, acctoutputoctets, \<br> calledstationid, callingstationid, acctterminatecause, \<br>
servicetype, framedprotocol, framedipaddress, \<br> acctstartdelay, acctstopdelay, xascendsessionsvrkey) \<br>VALUES \<br> ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \<br>
'%{SQL-User-Name}', \<br> '%{Realm}', <b>%{NAS-Id}</b>, '%{NAS-IP-Address}', '%{NAS-Port}', \<br> '%{NAS-Port-Type}', '%S', NULL, \<br> '0', '%{Acct-Authentic}', '%{Connect-Info}', \<br>
'', '0', '0', \<br> '%{Called-Station-Id}', '%{Calling-Station-Id}', '', \<br> '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \<br>
'%{%{Acct-Delay-Time}:-0}', '0', '%{X-Ascend-Session-Svr-Key}')"<br><br><br>But of course the %{NAS-Id} variable does not exist. Is there any variable where this information is stored? Seems like all the NAS-related vars are coming from the client and not from a local query on the database.<br>
<br>I have little understanding yet about the freeradius system but hope to get it. This file for me is just a list of SQL queries, but I don't even get how and where they are ever executed... Each query name is used in this file only, which makes me clueless on how to retrieve anything from those.<br>
<br>Any help would be very appreciated.<br><br>Benoit.<br><br><br><br><div>Subject: Re: nas id in radacct table<br>From: <a href="mailto:a.cudbardb@freeradius.org" target="_blank">a.cudbardb@freeradius.org</a><br>Date: Wed, 9 Apr 2014 07:42:51 +0100<br>
To: <a href="mailto:freeradius-users@lists.freeradius.org" target="_blank">freeradius-users@lists.freeradius.org</a><div><div class="h5"><br><br><pre> <br>> Am I missing a reference that can identify the NAS used for a connection, and other than the nas IP?<br>
<br>rfc2865 speaketh of a legendary second identifier. The NAS-Identifier, which may be used to identify<br>a NAS, even when it hopeth between ipeth.<br> <br>> Do you guys know a workaround for me? Even modifying the code a little bit so that I can save the NAS (database) id in the radacct table would not bother me but I would appreciate some help to locate this part of the code if it comes to this.<br>
<br>The queries are editable... look in the appropriate dialup.conf or queries.conf (v3.0.x) for your SQL dialect.<br> <br>Arran Cudbard-Bell <<a href="mailto:a.cudbardb@freeradius.org" target="_blank">a.cudbardb@freeradius.org</a>><br>
FreeRADIUS Development Team<br> <br>FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2<br> <br></pre><br></div></div>-
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a></div> </div></div>
<br>-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br></blockquote></div><br></div>