[RADIATOR] Custom Reply-Message for each AuthSQL inside REALM
alby26 at gmail.com
Wed Jul 4 08:32:28 CDT 2012
I am using Radiator in a Telecommunication group. I have only one REALM,
with 3 AuthSQL statements inside (the policy used is ContinueWhileIgnore).
The first one checks that the user is allowed to occupy another port in the
system. If the check goes OK, then the next AuthSQL statement is executed,
otherwise the user is rejected due to the unavailability of physical
resources. The second one checks that the call originating form
Calling-Station-ID to Called-Station-ID (attributes present in the user's
request packet) is not prohibited, like a sort of blacklist. If also this
check goes OK then the last AuthSQL statement performs the real user
My question is: each AuthSQL modules can add (independently to others Auth
modules) custom messages to the log (maybe with the function &main::log)
and to the reply packet? In other words, I would like that if a user is
rejected because of lack of resources, a string like "User rejected because
of lack of resources" is written on the logs and maybe in the user's
response with a Reply-Message attribute. In a similar way, if the user is
rejected due to blacklist rules, a string like "User rejected due to
blacklist" is added to the log and to the user's response packet. My first
try was to do this using PostAuthHooks like done in the past, but Hooks are
for REALMs, not for single AuthBy statements if I am not mistaken. I have
noticed that AuthSQL have the PostAuthSelectHook, but this is executed
before Radiator performs the authentication operations. This force me to
understand if the user is blocked twice, one time in the Hook and another
time by Radiator and this does not make very sense I think. Maybe there is
a better way to reach my goal, but I really can't see how to do that.
Thank you for your attention!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the radiator