Commit b78995c660 for freeswitch.com

commit b78995c6609d76b050eb093173a504f199ace03d
Author: Dmitry Verenitsin <morbit85@gmail.com>
Date:   Fri Sep 25 01:04:49 2026 +0500

    [mod_sofia] Keep the dialog handle after answering a refer NOTIFY (#3189)

    `sofia_handle_sip_i_notify()` answered an in-dialog `refer` NOTIFY and then
    fell through to the generic handling, which sent a second response and,
    on a terminated subscription, destroyed the dialog's handle. A channel kept
    up after the REFER outcome (`sip_refer_continue_after_reply=true`) could no
    longer send a REFER, re-INVITE or BYE. Return right after the `200 OK`;
    `refer` NOTIFYs are no longer forwarded under `proxy-notify-events`.

    Co-authored-by: Chris Rienzo <chris@signalwire.com>

diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c
index 98c0becf6f..93583895c7 100644
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -693,6 +693,7 @@ void sofia_handle_sip_i_notify(switch_core_session_t *session, int status,
 			}
 		}
 		nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_IF(!zstr(session_id_header), SIPTAG_HEADER_STR(session_id_header)), TAG_END());
+		return;
 	}

 	/* if no session, assume it could be an incoming notify from a gateway subscription */