From 1d599ba1d155ee200273231c78f86429d714c9d1 Mon Sep 17 00:00:00 2001 From: Jeff Gauthier Date: Wed, 6 Mar 2024 13:55:24 -0500 Subject: [PATCH] Truncate session call id on early media dispatch --- src/domain/Phone/WebRTCPhone.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/domain/Phone/WebRTCPhone.ts b/src/domain/Phone/WebRTCPhone.ts index 6a3a097b..d3e12d2f 100644 --- a/src/domain/Phone/WebRTCPhone.ts +++ b/src/domain/Phone/WebRTCPhone.ts @@ -1577,10 +1577,13 @@ export default class WebRTCPhone extends Emitter implements Phone { this.client.on(this.client.ON_PROGRESS, session => { logger.info('WebRTC progress (180)'); - this.eventEmitter.emit(ON_PROGRESS, this._createCallSession(session, null, { + const callSession = this._createCallSession(session, null, { incoming: false, ringing: true, - }), this.audioOutputDeviceId, this.audioOutputVolume); + callId: this.getSipSessionId(session), + }); + + this.eventEmitter.emit(ON_PROGRESS, callSession, this.audioOutputDeviceId, this.audioOutputVolume); }); this.client.on(this.client.ON_EARLY_MEDIA, session => { logger.info('WebRTC early media'); @@ -1588,6 +1591,7 @@ export default class WebRTCPhone extends Emitter implements Phone { const callSession = this._createCallSession(session, null, { incoming: false, ringing: true, + callId: this.getSipSessionId(session), }); this.eventEmitter.emit(ON_EARLY_MEDIA, callSession, this.audioOutputDeviceId, this.audioOutputVolume);