fixed wrongly identify 3pcc call (#245)

* fixed wrongly identify 3pcc call

* update drachtio 5.0.27
This commit is contained in:
Hoan Luu Huu
2026-07-11 08:31:59 -04:00
committed by GitHub
parent 53b46f7e51
commit e353b751c0
3 changed files with 16 additions and 26 deletions
+5 -1
View File
@@ -109,7 +109,11 @@ class CallSession extends Emitter {
async connect() {
const {sdp} = this.req.locals;
const is3pcc = this.req.body?.length === 0;
// use the parsed SDP from middleware (req.locals.sdp), not req.body:
// for multipart (SIPREC) or IWF-originated bodies req.body may be empty
// or not represent the actual offer, which would wrongly send an
// SDP-bearing call down the no-offer 3pcc path.
const is3pcc = !sdp || sdp.length === 0;
this.logger.info(`inbound ${is3pcc ? '3pcc ' : ''}call accepted for routing`);
const engine = this.getRtpEngine();
if (!engine) {