How to change re-registration behaviour -> reduce communication between Asterisk and phone

Hello,

I would like to reduce communication between asterisk and clients (peers).
Question/problem is with re-registration communication.

First log in to asterisk is standard:
REGISTER ->
<- UNAUTHORIZED
REGISTER ->
<- OK
(and registration expire 60 sec)

So after 60 seconds I have the same:
REGISTER ->
<- UNAUTHORIZED
REGISTER ->
<- OK
(and registration expire 60 sec)

and so on. Now I would like to reduce re-registration to:
REGISTER ->
<- OK

Because client still use the same login/password. What and where I have to set to achive communication like this?
Final result, which I would like to have is:

  • first register is full (REG - UNAUTH - REG - OK) and expire 60 sec
  • second, third… simple communication (without challenge) to keep client in database (REG - OK) and expire 60 sec
  • additionally after 1 hours we have one time full registration (REG - UNAUTH - REG - OK) to keep all correctly

Is it possible to configure like that?

Thank You in advance for support

Each SIP channel driver has options which control the minimum expiration. In the case of PJSIP this is the minimum_expiration option on the AOR[1]. As for not requiring authentication again, there is no option to control that or have that behavior. There is no persistent session or anything to guarantee the REGISTER is from the device, so authentication is done again.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip#Asterisk13Configuration_res_pjsip-aor_minimum_expiration