Skip to content

Commit 8c12efe

Browse files
chore: use list of supported features from the client when initiating sip calls (#40880)
1 parent b6c3631 commit 8c12efe

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class OutgoingSipCall extends BaseSipCall {
4646

4747
public static async createCall(session: SipServerSession, params: InternalCallParams): Promise<IMediaCall> {
4848
logger.debug({ msg: 'OutgoingSipCall.createCall', sessionId: session.sessionId });
49-
const { callee, ...extraParams } = params;
49+
const { callee, features: requestedFeatures, ...extraParams } = params;
5050

5151
// pre-sign the callee to this session
5252
const signedCallee: MediaCallSignedContact = {
@@ -68,12 +68,13 @@ export class OutgoingSipCall extends BaseSipCall {
6868
throw new SipError(SipErrorCodes.NOT_FOUND, 'Caller agent not found');
6969
}
7070

71+
const features = requestedFeatures.filter((feature) => SIP_CALL_FEATURES.includes(feature));
7172
const call = await mediaCallDirector.createCall({
7273
...extraParams,
7374
callee: signedCallee,
7475
calleeAgent,
7576
callerAgent,
76-
features: SIP_CALL_FEATURES,
77+
features,
7778
});
7879

7980
const channel = await calleeAgent.getOrCreateChannel(call, session.sessionId);

0 commit comments

Comments
 (0)