Skip to content

Fix recording-file parameter ignores for pcap recording method#2087

Closed
fergusean wants to merge 1 commit intosipwise:masterfrom
fergusean:fix/recording-file-parameter
Closed

Fix recording-file parameter ignores for pcap recording method#2087
fergusean wants to merge 1 commit intosipwise:masterfrom
fergusean:fix/recording-file-parameter

Conversation

@fergusean
Copy link
Contributor

Summary

When using the pcap recording method, the recording-file parameter passed in a "start recording" NG command was silently ignored — the file was always created at an auto-generated path (<spooldir>/pcaps/<callid>-<random>.pcap) instead of the caller-specified one.

Root Cause

The recording-file value is correctly parsed and stored in the call struct, but the pcap initialization code never consulted it when opening the file.

Changes

  • Add recording_setup_file_explicit() to open a pcap file at a caller-specified absolute path
  • Update pcap init to use the explicit path when recording-file is set, falling back to auto-generation otherwise
  • Clear stored file path after recording finishes to prevent stale reuse
  • Add NULL guards and fix memory leak in cleanup routines
  • Fix use-after-free crash on shutdown (reorder recording_fs_free() after call_free())
  • Add regression tests covering the explicit-path recording flow

sipwise-jenkins pushed a commit that referenced this pull request Mar 24, 2026
Closes #2087

Change-Id: Ib25aeabecfcad78578f3d98162a4418c243a8dbe
(cherry picked from commit b916bdc)
sipwise-jenkins pushed a commit that referenced this pull request Mar 24, 2026
Closes #2087

Change-Id: Ib25aeabecfcad78578f3d98162a4418c243a8dbe
(cherry picked from commit b916bdc)
sipwise-jenkins pushed a commit that referenced this pull request Mar 24, 2026
Closes #2087

Change-Id: Ib25aeabecfcad78578f3d98162a4418c243a8dbe
(cherry picked from commit b916bdc)
sipwise-jenkins pushed a commit that referenced this pull request Mar 24, 2026
Closes #2087

Change-Id: Ib25aeabecfcad78578f3d98162a4418c243a8dbe
(cherry picked from commit b916bdc)
(cherry picked from commit c61c40f)
sipwise-jenkins pushed a commit that referenced this pull request Mar 24, 2026
Closes #2087

Change-Id: Ib25aeabecfcad78578f3d98162a4418c243a8dbe
(cherry picked from commit b916bdc)
(cherry picked from commit 6c9ef6e)
sipwise-jenkins pushed a commit that referenced this pull request Mar 24, 2026
Closes #2087

Change-Id: Ib25aeabecfcad78578f3d98162a4418c243a8dbe
(cherry picked from commit b916bdc)
(cherry picked from commit 6a1ead7)
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