Hi everyone, I have a setup using *Matrix, LiveKi...
# telephony
h
Hi everyone, I have a setup using Matrix, LiveKit, and LiveKit SIP: • I installed Matrix Synapse on one server. • I installed LiveKit and LiveKit SIP on a different server using Docker images. • I created an outbound trunk to connect to PSTN using LiveKit CLI commands. • I created a participant to call an external number. When I use the LiveKit CLI to create the participant: • The call is established successfully. • The external number is connected. • The participant is added to a pre-existing room that already has other Matrix participants joined. Issue: • I am getting one-way audio for the call. • No audio on the Matrix/LiveKit side. • The PSTN side receives distorted audio. Could you please suggest: • What could be causing these audio issues? • Where should I start troubleshooting this setup? Thanks in advance!
c
Maybe Matrix side is using E2EE? SIP cannot automatically decrypt audio right now.
h
Thanks for the suggestion! I tried creating a Matrix room without E2EE enabled, but the audio still does not work. The call connects successfully, and the participant is added to the room, but I’m still seeing one-way audio on the Matrix/LiveKit side and distorted audio on the PSTN side. Could this be related to media codecs, NAT, or RTP configuration? Any guidance on where to start troubleshooting would be appreciated.
c
Could be. It would help if you capture PCAP in the SIP container. Maybe I can spot something unusual there (e.g. incorrect media IPs, codes, etc).
h
Sure. How do you want me to share it?
sip_call.pcap
I checked the RTP in the PCAP and found that the RTP from the Element app to LiveKit is present, and the audio from the external PSTN to LiveKit SIP is also visible and I can hear both the audio clearly. However, for some reason, the participant on the Element app side cannot hear any audio — the audio from LiveKit SIP is not reaching the Element client. FYI: I am using the self-hosted version of livekit and livekit sip.
c
First of all, lets remove Element from the equation. Can you run a LiveKit Meet as well and join the same room that SIP joins? Check the audio there first. If you don't hear anything, or cannot talk to SIP participant, that would indicate issues with SIP setup (e.g. firewall issues).
h
When I join the same room as the SIP participant using LiveKit Meet, audio works both ways, and I can talk to each other and hear audio on both the sides.
I think the element call application is not adding the sip participant to the room in the client side even though the sip participant is part of the livekit room.