how to access CallingStationId and CalledStationId propertes in diaup.conf (sql.conf) in a SQL query
Dear ALL I use this query by calling stored procedure in database : simul_count_query = "SELECT findout_cuncurrent_sessions_for_a_user('%{User-Name}','%{NAS-IP-Address}','%{CalledStationId}','%{CallingStationId}')" but I can not access to the value of CallingStationId and CalledStationId. my radius.log file : rlm_sql_postgresql: query: SELECT findout_cuncurrent_sessions_for_a_user('test1','5.190.103.4','','') rlm_sql_postgresql: Status: PGRES_FATAL_ERROR rlm_sql_postgresql: Error invalid input syntax for type inet: "" rlm_sql_postgresql: Postgresql Fatal Error: [22P02: INVALID TEXT REPRESENTATION] Occurred!! rlm_sql (sql) sql_checksimul: Database query failed
On 03/23/2013 10:31 AM, Mehdi Ravanbakhsh wrote:
Dear ALL
I use this query by calling stored procedure in database :
simul_count_query = "SELECT findout_cuncurrent_sessions_for_a_user('%{User-Name}','%{NAS-IP-Address}','%{CalledStationId}','%{CallingStationId}')"
but I can not access to the value of CallingStationId and CalledStationId.
You've spelt them wrong. They have hyphens in them. Run "radiusd -X" and look at what it shows you. Amongst other things, it will show you the actual attributes in the packet, and these are the names you can use.
Thanks i am find correct name . On Sat, Mar 23, 2013 at 5:35 PM, Phil Mayers <p.mayers@imperial.ac.uk>wrote:
On 03/23/2013 10:31 AM, Mehdi Ravanbakhsh wrote:
Dear ALL
I use this query by calling stored procedure in database :
simul_count_query = "SELECT findout_cuncurrent_sessions_**for_a_user('%{User-Name}','%{** NAS-IP-Address}','%{**CalledStationId}','%{**CallingStationId}')"
but I can not access to the value of CallingStationId and CalledStationId.
You've spelt them wrong. They have hyphens in them.
Run "radiusd -X" and look at what it shows you. Amongst other things, it will show you the actual attributes in the packet, and these are the names you can use. - List info/subscribe/unsubscribe? See http://www.freeradius.org/** list/users.html <http://www.freeradius.org/list/users.html>
participants (2)
-
Mehdi Ravanbakhsh -
Phil Mayers