When a user tries to login to a RADIUS Client, the Client sends an Access_Request to the RADIUS server. In Evolynx RADIUS, this request is received by the RADIUS engine and forwarded to the Business Layer to be processed. A function named Authenticate is responsible for processing the Access Requests. This function uses the “User-Name” RADIUS attribute to find the correct Customer.
The following steps describe how an Access Request is processed in the Business Layer DLL:
Database is accessed to read the following information about this LoginID (stored in “User-Name” attribute)
Password
Which Customer this Login belongs to
If the customer is disabled or not
Maximum number of concurrent connections for this Customer
“End Date” for Customer
Number of current connection for Customer
Customer's Balance
Which Service is assigned to Customer
Billing Mode (debit, credit)
Charge per minute (if any) (per period)
Minimum minutes (per period)
Charge per Kilo Byte (if any)
If the Service is disabled or not
IP address which should be assigned to customer (if enabled)
If any surcharges should apply
Note: If the VoIP switch in config file is enabled, “Called-Station-Id” attribute will be used as the destination phone number
If there is no LoginID in the database that matches the User-Name, request will be rejected, with “Invalid User” message.
If there is no Service assigned to this customer, request will be rejected, with “No Service Assigned” message.
Password coming from Access Request is compared with password stored in the database. If they don't match, request will be rejected, with “Invalid xxxx Password” message, which xxxx shows the authentication method. If a client try to authenticate using an authentication protocol which is disabled in config file, request will be rejected, with “xxxx protocol is not allowed.” message.
Note: If the VoIP switch in config file is enabled, Evolynx will skip the password check process described above.
If the Customer is disabled (using Admin program / Customer Edit page / Service Info tab) then request will be rejected, with “Account Disabled” message.
If today's date is greater than the “End Date” (same location) then request will be rejected, with “Account Expired” message.
If the Service is disabled (using Admin program / Service Edit page), request will be rejected, with “Service is Disabled” message.
If customer has already logged in to the system and (s)he is exceeding the maximum number of allowed concurrent connections (specified in Admin program / Customer Edit page / Service Info tab), then request will be rejected, with “Exceeding Concurrent Connections” message.
At this step, it's determined which Service Period the user is trying to connect. In each service, 24 hours of a day can be divided to two parts; Primary and Secondary Service Periods. This feature gives you the ability to have 2 different rates for usage time, or even disable access at certain times (using “Charge Per Minute” less than 0). If the time of day which user tries to connect is between Start Time and End Time of the Primary Period, Service is considered at Primary Period. If not, Service will be in Secondary Period.
Based on the Service Period determined in previous step, if the “Charge Per Minute” of the Period is less than “0”, request will be rejected, with “Service not allowed in this Period” message.
If there are any surcharges which apply to this call, they will be calculated. Per minute surcharges are added to per minute fees and “per call” surcharges are also summed up to be used later.
If the Customer is assigned a Service which has “Debit/Pre-Paid” billing mode, A minimum call cost is calculated based on per minute fees and per call fees (if any). This minimum call cost is then compared with current Balance to see if customer has enough funds available to make this call. If not request will be rejected, with “Insufficient Credit” message.
If the Customer is assigned a Service which has a non-zero “Charge per Minute” fee, and the Service “Billing Mode” is “Debit/Pre-Paid”, a “Session-Timeout” RADIUS attribute will be sent to the Client, specifying how many seconds this Customer can stay connected. Also, if any of the Service Periods have a “Charge Per Minute” less than 0 meaning that Customer can not stay connected during that period, “Session-Timeout” RADIUS attribute will be calculated and sent to client, regardless of the “Billing Mode”.
If the Accounting Interim Interval value in configuration options is greater than 60 seconds, “Acct-Interim-Interval” attribute will be sent to the client.
If the VoIP switch in configuration options is enabled, “h323-credit-amount” or “h323-credit-time” (depending on “Called-Station-Id”) will be sent to the client.
If customer is set to be assigned an IP address from a pool of IPs, that IP will be sent to the client.
If the “LoadCustomAttributes” switch in configuration options is enabled, and there is any Custom Attribute assigned to the Service or Customer, those attributes will be added to the RADIUS response based on rules defined for those custom attributes.
Since all the conditions met, an Access_Accept RADIUS packet will be sent to the Client.