Skip to content

Fix: Auto-add dtls_auto_generate_cert for DTLS media_encryption endpoints#186

Open
harrybirdnz wants to merge 1 commit intoFreePBX:release/17.0from
harrybirdnz:fix/pjsip-dtls-auto-generate-cert
Open

Fix: Auto-add dtls_auto_generate_cert for DTLS media_encryption endpoints#186
harrybirdnz wants to merge 1 commit intoFreePBX:release/17.0from
harrybirdnz:fix/pjsip-dtls-auto-generate-cert

Conversation

@harrybirdnz
Copy link
Copy Markdown

When a PJSIP endpoint is configured with media_encryption=dtls (required for WebRTC), Asterisk needs dtls_auto_generate_cert=yes and dtls_setup=actpass to successfully negotiate DTLS-SRTP. Without these lines, WebRTC calls fail with "Couldn't negotiate stream" errors.

This patch automatically appends the required DTLS parameters whenever media_encryption is set to dtls, ensuring WebRTC extensions work out of the box without manual custom_post.conf entries.

Changes:

  • functions.inc/drivers/PJSip.class.php: add dtls_auto_generate_cert=yes and dtls_setup=actpass when media_encryption === 'dtls'

…endpoints

When a PJSIP endpoint is configured with media_encryption=dtls (required
for WebRTC), Asterisk needs dtls_auto_generate_cert=yes and
dtls_setup=actpass to successfully negotiate DTLS-SRTP. Without these
lines, WebRTC calls fail with 'Couldn't negotiate stream' errors.

This patch automatically appends the required DTLS parameters whenever
media_encryption is set to 'dtls', ensuring WebRTC extensions work out
of the box without manual custom_post.conf entries.
@sangoma-oss-cla
Copy link
Copy Markdown

sangoma-oss-cla bot commented Apr 16, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant