Skip to content

Commit 330545f

Browse files
committed
refactor(voice-call): drop unused stream helpers
1 parent 2b0a72b commit 330545f

3 files changed

Lines changed: 0 additions & 24 deletions

File tree

extensions/voice-call/src/media-stream.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -709,25 +709,6 @@ export class MediaStreamHandler {
709709
this.clearAudio(streamSid);
710710
}
711711

712-
/**
713-
* Get active session by call ID.
714-
*/
715-
getSessionByCallId(callId: string): StreamSession | undefined {
716-
return [...this.sessions.values()].find((session) => session.callId === callId);
717-
}
718-
719-
/**
720-
* Close all sessions.
721-
*/
722-
closeAll(): void {
723-
for (const session of this.sessions.values()) {
724-
this.clearTtsState(session.streamSid);
725-
session.sttSession.close();
726-
session.ws.close();
727-
}
728-
this.sessions.clear();
729-
}
730-
731712
private getTtsQueue(streamSid: string): TtsQueueEntry[] {
732713
const existing = this.ttsQueues.get(streamSid);
733714
if (existing) {

extensions/voice-call/src/providers/twilio.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ export class TwilioProvider implements VoiceCallProvider {
156156
this.currentPublicUrl = url;
157157
}
158158

159-
getPublicUrl(): string | null {
160-
return this.currentPublicUrl;
161-
}
162-
163159
setTTSProvider(provider: TelephonyTtsProvider): void {
164160
this.ttsProvider = provider;
165161
}

extensions/voice-call/src/webhook.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ describe("VoiceCallWebhookServer realtime transcription provider selection", ()
250250
}
251251
expect(mediaStreamHandler["handleUpgrade"]).toBeTypeOf("function");
252252
expect(mediaStreamHandler["sendAudio"]).toBeTypeOf("function");
253-
expect(mediaStreamHandler["closeAll"]).toBeTypeOf("function");
254253
} finally {
255254
await server.stop();
256255
}

0 commit comments

Comments
 (0)