Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

DTLS rekeying causes calls to lose audio

Aperta
#1,705 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Perl
Stelle
992
Fork
459
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sipwise/rtpengine

Tutte le issue di sipwise/rtpengine

Issue simili

Altre issue su Perl

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.