Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

DTLS rekeying causes calls to lose audio

Abierto
#1,705 9 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
22/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
c

Línea de trabajo

Reproduce with a WebRTC-to-Asterisk call and a 2-minute DTLS rekey interval, watching for the res_srtp unprotect failures and the 'DTLS data received after handshake, code: 2' log lines. Read the diff of commit 2f4f6d52738984ab625525ccd18695b46365494c, the change bisected as the cause, and follow how post-handshake DTLS data is handled in the crypto layer. Done means SRTP/SRTCP keep authenticating across a rekey with no audio loss.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

We've been using rtpengine 11.2.1.12 with the corresponding kernel module to connect WebRTC calls to Asterisk (16.x and 20.x) via Kamailio (5.7). This setup has been working for quite a while. After an update to basically any newer rtpengine release (we've tried 11.3.1.11 and 11.4.1.3 initially), calls lose audio after exactly 2 minutes, which corresponds to the DTLS rekeying interval specified in our Asterisk PJSIP configuration for those endpoints.

Asterisk logs unprotect errors for both SRTP and SRTCP packets:

VERBOSE[66457][C-00000012] res_srtp.c: SRTP unprotect failed on SSRC 458523204 because of authentication failure 160
VERBOSE[66457][C-00000012] res_srtp.c: SRTCP unprotect failed on SSRC 458523204 because of authentication failure

rtpengine also logs INFO and WARNING level messages:

INFO: [i6qrqdih95obm7i4auob/6eddbd88-a2d6-42bd-83cf-a41c51d78507/1 port 11248]: [crypto] DTLS data received after handshake, code: 2
INFO: [27f810d3-8b40-4464-81b5-f6f43dc62610/3bbc999a-c4ba-493b-bb81-4f719d8b3ead/1 port 10264]: [crypto] DTLS data received after handshake, code: 2
INFO: [i6qrqdih95obm7i4auob/6eddbd88-a2d6-42bd-83cf-a41c51d78507/1 port 11248]: [crypto] DTLS data received after handshake, code: 2
INFO: [27f810d3-8b40-4464-81b5-f6f43dc62610/3bbc999a-c4ba-493b-bb81-4f719d8b3ead/1 port 10264]: [crypto] DTLS data received after handshake, code: 2
INFO: [27f810d3-8b40-4464-81b5-f6f43dc62610/3bbc999a-c4ba-493b-bb81-4f719d8b3ead/1 port 10264]: [crypto] DTLS data received after handshake, code: 2
WARNING: [27f810d3-8b40-4464-81b5-f6f43dc62610/3bbc999a-c4ba-493b-bb81-4f719d8b3ead/1 port 10264]: [rtcp] Discarded invalid SRTCP packet: authentication failed
WARNING: [i6qrqdih95obm7i4auob/6eddbd88-a2d6-42bd-83cf-a41c51d78507/1 port 11248]: [rtcp] Discarded invalid SRTCP packet: authentication failed

With git bisect, we narrowed down the cause to commit 2f4f6d52738984ab625525ccd18695b46365494c. As soon as this commit is reverted, calls no longer lose audio after 2 minutes. Also, disabling DTLS rekeying for the endpoints in Asterisk fixes the issue.

We thus suspect the code added in the mentioned commit does not handle DTLS rekeying correctly.

Lenguaje dominante
Perl
Estrellas
992
Forks
459
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sipwise/rtpengine

Todos los issues de sipwise/rtpengine

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.