From 67453e8a47f4e3d54774334d493a6976df1456de Mon Sep 17 00:00:00 2001 From: laconicman Date: Tue, 6 Oct 2026 16:22:19 +0300 Subject: [PATCH 1/2] fix(pjsua): honour --rereg-delay for accounts given on the command line The "Add accounts" loop in app_init() set reg_retry_interval = 300 on every command-line account. The loop runs after option parsing, so the value parsed for --rereg-delay was discarded, and write_account_settings() never wrote the option back because the value always equalled the default. The assignment came in with r3804 on the 1.x branch, a change to the transport adapter sample (#1383) that does not mention it. The option is older (#1044). Accounts added at run time by ui_add_account() and cmd_add_account() were never overridden. reg_first_retry_interval = 60, set beside it, is left alone: no option sets it, so the first retry after a failure still comes after about 60 s, and --rereg-delay governs the retries after that. --- pjsip-apps/src/pjsua/pjsua_app.c | 1 - 1 file changed, 1 deletion(-) diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 20d59307c7..fd60ebb765 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -2186,7 +2186,6 @@ static pj_status_t app_init(void) /* Add accounts */ for (i=0; i Date: Tue, 6 Oct 2026 16:22:19 +0300 Subject: [PATCH 2/2] fix(pjsua): say in --help that --rereg-delay=0 disables retries With --rereg-delay honoured, a 0 now reaches reg_retry_interval, where pjsua-lib documents it as disabling auto re-registration. The option could not produce 0 before, because the app overwrote the value. Say so in the usage text. --- pjsip-apps/src/pjsua/pjsua_app_config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pjsip-apps/src/pjsua/pjsua_app_config.c b/pjsip-apps/src/pjsua/pjsua_app_config.c index a96985b3c7..b30153f70a 100644 --- a/pjsip-apps/src/pjsua/pjsua_app_config.c +++ b/pjsip-apps/src/pjsua/pjsua_app_config.c @@ -77,6 +77,7 @@ static void usage(void) PJSUA_REG_INTERVAL); printf(" --rereg-delay=SEC Optional auto retry registration interval (default %d)\n", PJSUA_REG_RETRY_INTERVAL); + puts (" 0 disables auto re-registration"); puts (" --reg-use-proxy=N Control the use of proxy settings in REGISTER."); puts (" 0=no proxy, 1=outbound only, 2=acc only, 3=all (default)"); puts (" --server-affinity[=on|off] Pin same SIP server across requests");