I notied that egress records the livekit session a...
# ask-ai
m
I notied that egress records the livekit session as follows: - Agent turn: very high quality, as it comes from the TTS. - User turn: lower quality, as it comes from telephony. this means the recording does not fully reflect how the conversation actually went, and with what latency, given that it's recording from the livekit room's POV. is there a way to record the actual phone call from the user's perspective, with both the agent and user turns? I don't think my telephony provider supports this kind of recording, so I wanna know if there's a native way of doing it in livekit
t
Thanks for reaching out, Anas. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear you: you want a recording that reflects the phone caller’s perspective (both sides at the phone-quality and with real-world latency), not the LiveKit room’s mixed/room-side egress. Short answer: LiveKit cannot natively record the actual phone call from the user’s side. Egress records the LiveKit room (the WebRTC session) so agent audio (TTS) will be high quality and the telephone-side audio will reflect how it’s bridged into the room, not the raw PSTN handset mix or exact caller-side latency. Options you can consider: • Use your telephony provider’s call recording (records the call from the PSTN side). This is the only way to capture the caller’s true phone-side audio and timing. • If the provider can’t record, create an external bridge that records both sides before/while bridging into LiveKit: ◦ Terminate the PSTN call into a media server or SIP gateway you control, record both legs there, and also bridge that media into the LiveKit room. ◦ Or run a media relay that captures the RTP/SRTP streams from the telephony leg and writes them to a file while also forwarding into LiveKit. • If your goal is simply to avoid extra audio at the end of a recording, stop/clean up egress when the human participant leaves (for example delete the room or stop the egress) to avoid post-call artifacts. This doesn’t change perspective or quality, only trimming. If you want, tell me: • which telephony provider or SIP gateway you’re using, and • whether you can route calls through a server you control, and I’ll suggest the most practical bridge/recording approach and outline the steps. Sources: sip | livekit/livekit_composite | DeepWiki