From bd94d2d2a8722740652f580c8c682c9df5ea1243 Mon Sep 17 00:00:00 2001
From: Grzegorz Sluja <grzegorz.sluja@iopsys.eu>
Date: Tue, 11 Jun 2024 15:30:47 +0200
Subject: [PATCH] Send Re-Register after (expires of 200OK - 10%) REF 14594

---
 res/res_pjsip_outbound_registration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c
index a20a818564..3f325a6e03 100644
--- a/res/res_pjsip_outbound_registration.c
+++ b/res/res_pjsip_outbound_registration.c
@@ -1551,7 +1551,7 @@ static int handle_registration_response(void *data)
 			update_client_state_status(response->client_state, SIP_REGISTRATION_REGISTERED);
 			sip_outbound_registration_send_ubus_event("REGISTERED",response->expiration,client_uri);
 			response->client_state->retries = 0;
-			next_registration_round = response->expiration - REREGISTER_BUFFER_TIME;
+			next_registration_round = response->expiration - (response->expiration/10);
 			if (next_registration_round < 0) {
 				/* Re-register immediately. */
 				next_registration_round = 0;
-- 
GitLab