Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
asterisk (8:22.8.1-1~wazo2) wazo-dev-bookworm; urgency=medium

* Fix deadlock in chan_pjsip_new when PJSIP_HEADER used as endpoint channel var

-- Wazo Maintainers <dev+pkg@wazo.community> Thu, 05 Mar 2026 10:00:00 -0500

asterisk (8:22.8.1-1~wazo1) wazo-dev-bookworm; urgency=medium

* asterisk 22.8.1
Expand Down
27 changes: 27 additions & 0 deletions debian/patches/fix-pjsip-channel-creation-deadlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Set endpoint channel variables after unlock to prevent deadlock
# when variables invoke dialplan functions (e.g., PJSIP_HEADER)
# that block on serializer tasks while the channel lock is held.
# pbx_builtin_setvar_helper will acquire and release channel lock on each invocation in the loop
Index: asterisk-22.8.1/channels/chan_pjsip.c
===================================================================
--- asterisk-22.8.1.orig/channels/chan_pjsip.c 2026-03-05 15:42:57.508015668 +0000
+++ asterisk-22.8.1/channels/chan_pjsip.c 2026-03-05 15:43:19.673013563 +0000
@@ -665,15 +665,15 @@
ast_channel_zone_set(chan, zone);
}

+ ast_channel_stage_snapshot_done(chan);
+ ast_channel_unlock(chan);
+
for (var = session->endpoint->channel_vars; var; var = var->next) {
char buf[512];
pbx_builtin_setvar_helper(chan, var->name, ast_get_encoded_str(
var->value, buf, sizeof(buf)));
}

- ast_channel_stage_snapshot_done(chan);
- ast_channel_unlock(chan);
-
set_channel_on_rtp_instance(session, ast_channel_uniqueid(chan));

SCOPE_EXIT_RTN_VALUE(chan);
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ mix_monitor_announce_file
fix-application-playback-update
expose-app-queues-mutex
fix-queue-deadlock
fix-pjsip-channel-creation-deadlock