Using Custom table in FreeRadius
Hi, I've successfully using table sip_buddies instead of radcheck table(which is used by default by FreeRadius). The problem I'm facing is that I can not call more than 5 attribute in table sip_buddies in dialup.conf i.e. id, name, attribute, secret and op. But when I call more than 5 attributes i.e. id, name, zero_name, attribute, secret, op I'm getting error as listed below; [sql] expand: SELECT id, name, attribute, zero_name, secret, op FROM sip_buddies WHERE name = '%{SQL-User-Name}' ORDER BY id -> SELECT id, name, attribute, zero_name, secret, op FROM sip_buddies WHERE name = '3225555025' ORDER BY id rlm_sql: Invalid operator "3225555025" for attribute Cleartext-Password rlm_sql (sql): Error getting data from database [sql] SQL query error; rejecting user rlm_sql (sql): Released sql socket id: 3 ++[sql] returns fail Using Post-Auth-Type Reject +- entering group REJECT {...} But when I use this query as mentioned below; SELECT id, name, attribute, secret, op FROM sip_buddies WHERE name = '%{SQL-User-Name}' ORDER BY id Its working fine then. Kindly advise me how can I resolve this(calling more than 5 attributes in sip_buddies table) issue. Please reply this at your earliest. -- Regards, Ahmed Munir
Ahmed Munir wrote:
I've successfully using table sip_buddies instead of radcheck table(which is used by default by FreeRadius). The problem I'm facing is that I can not call more than 5 attribute in table sip_buddies in dialup.conf i.e. id, name, attribute, secret and op. But when I call more than 5 attributes i.e. id, name, zero_name, attribute, secret, op I'm getting error as listed below;
The SQL module expects certain fields in the response to the SELECT query. If you give it *different* data, it will get confused. See doc/rlm_sql.
Kindly advise me how can I resolve this(calling more than 5 attributes in sip_buddies table) issue. Please reply this at your earliest.
Kindly read the existing documentation, and *understand* what you're doing before making random changes to the tables and queries. Alan DeKok.
participants (2)
-
Ahmed Munir -
Alan DeKok