]> 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)
commit9fa3bb031efb0e78a2472cf187f758413fb3fb28
treec8671275899ae3c39febdc2f91f62dedcb0febb8
parent80fd6508810585c7e5572a88691bb0e517145173
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