[OpenSIPS-Devel] [OpenSIPS/opensips] 3d6a4b: uac: Add basic detection for multiple uac_replace_...
Liviu Chircu
noreply at github.com
Tue Feb 7 12:36:52 UTC 2023
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: 3d6a4bb67ce6294449fc4f5d0f386fd207754337
https://github.com/OpenSIPS/opensips/commit/3d6a4bb67ce6294449fc4f5d0f386fd207754337
Author: Liviu Chircu <liviu at opensips.org>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M modules/uac/replace.c
M modules/uac/replace.h
M modules/uac/uac.c
Log Message:
-----------
uac: Add basic detection for multiple uac_replace_xxx() calls
This patch adds a lightweight detection of multiple calls to
uac_replace_from() or uac_replace_to() during the processing of a SIP
request, using an int bitmask stored in the current SIP message context.
Returning an error helps avoid producing a bad SIP From/To header, with
doubled URIs due to doubled lumps, etc.
Still, to compromise between safety and performance, the case where
multiple uac_replace_xxx() get called during a failure_route is not
detected, as this would require extra TMCB_ON_FAILURE callback, which is
a bit of overkill just for the sake of scripting QoL...
Fixes #2720
More information about the Devel
mailing list