]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_diversion: resolve race condition between Diversion header processing and... certified/20.7
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:02 +0000 (13:58 +0000)
commit5635686559a3217b151087e6c863422d6d3786a1
tree715f0c2f4fd750bb54d3a629c8f9754ee06274e1
parent0f3bc8362b1c86c8c4fbead03dd9243be9831056
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