]> 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)
committerMike Bradeen <mbradeen@sangoma.com>
Mon, 11 Aug 2025 13:58:00 +0000 (13:58 +0000)
commit4705601f175b74d5ea687eb3731e95a6d994ac8c
treecc115bad742af01ce61611ca4f75ca9486f0838b
parent3ea4289a9a6504c0482d2fc0f50df5effd367ede
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
res/res_pjsip_diversion.c