]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_diversion: resolve race condition between Diversion header processing and...
authorMike Bradeen <mbradeen@sangoma.com>
Thu, 7 Aug 2025 22:33:36 +0000 (16:33 -0600)
committerGeorge Joseph <gjoseph@sangoma.com>
Wed, 17 Sep 2025 17:40:38 +0000 (11:40 -0600)
commit671615f2cfc18d24b8f4f6ab023a672bb647c4ec
tree7da1b83d354768b154a14a96bbcf11ad36be12b4
parent73b614ebefd535ad9a27a442879e9d50e1c1bca5
res_pjsip_diversion: resolve race condition between Diversion header processing and redirect

Based on the firing order of the PJSIP call-backs on a redirect, it was possible for
the Diversion header to not be included in the outgoing 181 response to the UAC and
the INVITE to the UAS.

This change moves the Diversion header processing to an earlier PJSIP callback while also
preventing the corresponding update that can cause a duplicate 181 response when processing
the header at that time.

Resolves: #1349
(cherry picked from commit 4705601f175b74d5ea687eb3731e95a6d994ac8c)
res/res_pjsip_diversion.c