Brekeke SIP Server Wiki

Restrict REGISTER requests

The following Dial Plan rule can restrict REGISTER requests.
When there are 100 concurrent threads, Brekeke SIP Server rejects the incoming REGISTER requests with “480 Temporarily Unavailable” response, and add the Retry-After header in the response. The SIP client will resend a new REGISTER after the time in Retry-After.

For example, if the Retry-After is set to 600, the SIP client will resend a new REGISTER after 10min.

Dial Plan Rule:

-----------------------------------
[Matching Pattern]
$request = ^REGISTER
$math.ge( $threadnum, "100" )=true
$math.rand( "300", "1200" ) = (.+)

[Deploy Pattern]
$response = 480
_Retry-After = %1
-----------------------------------
Yes No
Suggest Edit