]> 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:55:23 +0000 (19:55 +0000)
commit8506e18e0cc55203fe9d360f6635e4cc53efb1f1
tree726aaa5a7c8759c3fb4e4444610555aa7546c887
parent5f470e366d281aba36cb0fd8c9a5e11ddca01e1f
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 9fa3bb031efb0e78a2472cf187f758413fb3fb28)
res/res_pjsip_diversion.c