[OpenSIPS-Devel] [OpenSIPS/opensips] c01a8d: dialog: support $DLG_dir in onreply_route via From...
Norm Brandinger
noreply at github.com
Tue Apr 21 10:59:06 UTC 2026
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: c01a8d71051147c43c6509a29e99f573b7ca98cc
https://github.com/OpenSIPS/opensips/commit/c01a8d71051147c43c6509a29e99f573b7ca98cc
Author: Norm Brandinger <n.brandinger at gmail.com>
Date: 2026-04-21 (Tue, 21 Apr 2026)
Changed paths:
M modules/dialog/dialog.c
Log Message:
-----------
dialog: support $DLG_dir in onreply_route via From-tag matching (#3817)
When $DLG_dir is used in onreply_route, get_dlg_direction() returns
DLG_DIR_NONE because ctx_lastdstleg is uninitialized in the reply
processing context (it is only set after onreply_route completes,
in the TMCB_RESPONSE_FWDED callback).
Fall back to matching the reply's From-tag against the dialog's leg
tags to determine direction:
- From-tag matches caller leg → upstream (reply to caller)
- From-tag matches callee leg → downstream (reply to callee)
All pointer dereferences are guarded against NULL to prevent any
possibility of segfault on malformed or incomplete state.
Fixes: https://github.com/OpenSIPS/opensips/issues/2132
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications
More information about the Devel
mailing list