Session Time Limit

It appears the default session time limit is 1 hour, I’ve found a way to change this using the radius attributes, but I’d like to have this set dynamically, for example if the customer purchases 7 days of service, I’d like the session to last 7 days.

Session-Timeout = 604800 works for now.

Is there a way I can use a variable to get this working, like with the Tx/Rx speeds, Mikrotik-Rate-Limit = {{ mul .tx_rate_limit 1024 }}/{{ mul .rx_rate_limit 1024 }}

Could I do this - Session-Timeout = {{ .validity_days }}

Hello! The length of your online sessions depends on the settings of your router and tariff plans. By default, we do not send session timeout attributes. We don’t usually limit online sessions by their length, but we do offer flexible settings for tariff plans where you can configure different parameters.

You can find more information about this at Data plans | Powerlynx.
However, if your specific case requires session timeouts, your solution will work fine.

Also, you can push the sessions timeout like 1 day and if the voucher is still active the user will reconnect automatically.

Do you have a list of valid variables we could use within the radius attributes? Because the last example I gave for Session-Timeout = {{ .validity_days }} doesn’t function. It only works if I manually specify the number in seconds.

With the sessions being limited to an hour users are having to re-login.

"rx_rate_limit":             
"tx_rate_limit":             
"plan_id":                   
"plan_name":                 
"location_id":               
"location_name":             
"time_left":               
"time_left_by_expiration":  
"time_left_by_online_limit": 

I suppose you should use the “time_left” value here.

If “time_left_by_expiration” < “time_left_by_online_limit”
“time_left” = “time_left_by_expiration”
else
“time_left” = “time_left_by_online_limit”