]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_diversion: resolve race condition between Diversion header processing and... certified/18.9
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:01 +0000 (13:58 +0000)
commitcc68c53af13b5c6fc65b9af2d5305283909e3e6c
tree91b637523d3b6f6889a2a92c833a53221748b5c7
parentbca984ab5f36ae303bff40ff29a4fe276bb548b4
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