I think that can easily become a problem if all the users decide to send registrations as they please. I tried looking into ratelimit and pike and it wont solve my problem.
What is the extent of the setting min_expires on this module? Will it create a 423 reply to the user or is not the intended behavior?
In the mean time I am trying to craft a 423 Message when the expires in the Contact header or in the Expires header is less than the min_expires set in the config but I am having problems parsing and looking for the Expires header. With the expires in the contact is easy using the select feature or parsing the whole contact using $ct:
xlog("L_INFO","mylog: Contact Header: [$ct].\n");
$var(c_expires) = $(ct{s.select,1,=});
or this way, it is more accurate
$sel(@contact.expires)
but I can't find a way to do the same thing with the Expires headers. In the same page that I found the "select " it says:
"The
select is a READ-ONLY "function", that helps to get
direct access to some parts of SIP message within the script (like @to,
@cseg.method, @msg["P-anyheader-youwant"]) ...."
So I am trying to use this @msg["P-anyheader-youwant"] but I can't make it work.
Any ideas?
txs a lot in advance