]> 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)
committerAsterisk Development Team <asteriskteam@digium.com>
Wed, 10 Sep 2025 19:52:59 +0000 (19:52 +0000)
commitd06310242ea17ef6a71a26329d28c9ea24b9b7ab
treee55f2670478bb8e0f169659c3b3a039de0340201
parente20d0fc912d1376690d16b437a3c63777f9b2505
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 8dce57f9ada76580cb6d5ea12779f2a0301069a2)
res/res_pjsip_diversion.c