E2EE Issue with SIP Hello LiveKit team! :wave: I ...
# telephony
p
E2EE Issue with SIP Hello LiveKit team! 👋 I have an issue with E2EE encryption during SIP calls and I need your help to resolve it. Context: • I'm using LiveKit for calls between web/mobile users and SIP participants (phone) • I'm using the createOutboundTrunk and createSipParticipant methods from the server SDK • I've implemented E2EE encryption with a passphrase generated on the server side • On the frontend, I'm using LiveKit components with the E2EE passphrase Current Issue: • When E2EE encryption is enabled on the frontend (with e2eePassphrase), audio works in only one direction • The web/mobile app user can hear the SIP user (phone) clearly • But the SIP user hears garbled/encrypted audio from the web/mobile user • When I disable E2EE encryption on the frontend (without e2eePassphrase), everything works perfectly Current Implementation:
Copy code
// Server side - E2EE passphrase generation
generateE2EEKey(roomName: string): string {
  const random = randomBytes(32)
  const hmac = createHmac('sha256', livekitConfig.serverSecret)
  hmac.update(roomName)
  hmac.update(random.toString('hex'))
  const finalKey = hmac.digest()
  return finalKey.toString('base64')
}

// Server side - SIP participant creation (without specific E2EE configuration)
const participant = await sipClient.createSipParticipant(
  trunkId,
  receiverPhone,
  roomName,
  {
    participantIdentity: receiver.username,
    participantName: receiver.displayUsername,
    hidePhoneNumber: true,
    playDialtone: true,
  }
)
Questions: 1. How to properly configure SIP participants so they can decrypt E2EE audio from web/mobile users? 2. Do SIP participants need special configuration to support E2EE encryption? 3. Are there parameters to add when creating the SIP participant so it can decrypt E2EE audio? 4. Is the issue that the SIP participant doesn't receive the necessary E2EE passphrase to decrypt? Technical Information: LiveKit server SDK version: "livekit-server-sdk": "^2.13.1"