From f3d8aed3426b95217e22279492f6f0bb1259cd53 Mon Sep 17 00:00:00 2001 From: Tinet-mucw Date: Mon, 2 Nov 2026 22:45:40 -0800 Subject: [PATCH] res_pjsip: Pass the monitor matcher through register_replace. ast_sip_transport_monitor_register_replace() dropped the caller-supplied matcher and always passed NULL to register_replace_key(). Duplicate monitors were then compared by pointer, so a new contact monitor was appended on every registration instead of replacing the existing one. Monitors accumulated on a reliable transport until that transport closed. Fixes: #2270 --- res/res_pjsip/pjsip_transport_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/res_pjsip/pjsip_transport_events.c b/res/res_pjsip/pjsip_transport_events.c index 5aeb8f87b4..6c91aed1fa 100644 --- a/res/res_pjsip/pjsip_transport_events.c +++ b/res/res_pjsip/pjsip_transport_events.c @@ -496,7 +496,7 @@ enum ast_transport_monitor_reg ast_sip_transport_monitor_register_replace(pjsip_ char key[IP6ADDR_COLON_PORT_BUFLEN]; AST_SIP_MAKE_REMOTE_IPADDR_PORT_STR(transport, key); - return ast_sip_transport_monitor_register_replace_key(key, cb, ao2_data, NULL); + return ast_sip_transport_monitor_register_replace_key(key, cb, ao2_data, matches); } enum ast_transport_monitor_reg ast_sip_transport_monitor_register_replace_key(const char *transport_key,