Skip to content

Commit 52423d4

Browse files
authored
fix: telephony session event missing (#737)
1 parent 5108a82 commit 52423d4

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/modules/ActiveCallControl/index.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ export class ActiveCallControl extends ActiveCallControlBase {
3232
this._onTelephonySessionUpdateHandlers = [];
3333
}
3434

35-
// override
36-
_initRcCall() {
37-
const rcCall = super._initRcCall();
38-
if (rcCall) {
39-
rcCall.callControl.on('new', this._newTelephonySessionHandler)
40-
}
41-
return rcCall
42-
}
43-
4435
onTelephonySessionUpdated(handler) {
4536
this._onTelephonySessionUpdateHandlers.push(handler);
4637
}
@@ -110,10 +101,10 @@ export class ActiveCallControl extends ActiveCallControlBase {
110101
// TODO: workaround of bug:
111102
// WebRTC outbound call with wrong sequences of telephony sessions then call log section will not show
112103
// @ts-ignore
113-
rcCall._callControl?.on('new', (session: Session) =>
114-
this._onNewCall(session),
115-
);
116-
104+
rcCall._callControl?.on('new', (session: Session) => {
105+
this._onNewCall(session);
106+
this._newTelephonySessionHandler(session); // for telephony session notification
107+
});
117108
return rcCall;
118109
}
119110

0 commit comments

Comments
 (0)