Skip to content

Commit

Permalink
Truncate session call id on early media dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
bogue committed Mar 6, 2024
1 parent fe4ecb1 commit 8c5b761
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/domain/Phone/WebRTCPhone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1577,17 +1577,26 @@ export default class WebRTCPhone extends Emitter implements Phone {
this.client.on(this.client.ON_PROGRESS, session => {
logger.info('WebRTC progess (180)');

this.eventEmitter.emit(ON_PROGRESS, this._createCallSession(session, null, {
const callSession = this._createCallSession(session, null, {
incoming: false,
ringing: true,
}), this.audioOutputDeviceId, this.audioOutputVolume);
});

callSession.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');

const callSession = this._createCallSession(session);
const callSession = this._createCallSession(session, null, {
incoming: false,
ringing: true,
});

callSession.callId = this.getSipSessionId(session);

this.eventEmitter.emit(ON_EARLY_MEDIA, callSession);
this.eventEmitter.emit(ON_EARLY_MEDIA, callSession, this.audioOutputDeviceId, this.audioOutputVolume);
});
this.client.on(this.client.REGISTERED, () => {
logger.info('WebRTC registered', {
Expand Down

0 comments on commit 8c5b761

Please sign in to comment.