From 346f33e3747efdf20b3c846b41799310ae99464a Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Fri, 17 Nov 2023 08:43:24 +0700 Subject: [PATCH] Reset stored remote name in dialog (dlg->initial_dest) if transport is server. --- pjsip/src/pjsip/sip_dialog.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pjsip/src/pjsip/sip_dialog.c b/pjsip/src/pjsip/sip_dialog.c index 147397ec4a..1be1f0704c 100644 --- a/pjsip/src/pjsip/sip_dialog.c +++ b/pjsip/src/pjsip/sip_dialog.c @@ -1878,6 +1878,11 @@ static void dlg_update_routeset(pjsip_dialog *dlg, const pjsip_rx_data *rdata) { pj_strdup(dlg->pool, &dlg->initial_dest, &rdata->tp_info.transport->remote_name.host); + } else { + /* Reset the stored remote name if the transport is a server + * transport. + */ + dlg->initial_dest.slen = 0; } /* Ignore subsequent request from remote */