Repository navigation
sipbot serve's play command now accepts μ-law and A-law WAV files, as its documentation already said.
Fix (#29, #30)
- The bug:
playrejected 8 kHz μ-law WAV files with "not a readable WAV … decode produced no PCM".AudioAlgospassed the WAV reader to NAudio'sToSampleProvider(), which only takes PCM and IEEE float. - The fix: WAV data in μ-law or A-law is now decoded to 16-bit PCM with NAudio's managed decoders before resampling.
- Where it applies:
ConvertWavToPcm(behindsipbot play),ReadWelcomeWavBytesAsPcmu, andReadWelcomeWavBytesAsPcm16kHz. - Compatibility: no public API change. PCM WAV files behave as before.
Testing
- Unit tests: 114, including 8 new decode tests for μ-law and A-law, resampling, both welcome-WAV readers, and
PlayWavwith a μ-law file. - Live against a VitalPBX (Asterisk 20.14) lab PBX, with the downloaded release binary:
- the agent E2E suite passed 5/5
- calls in both directions were answered
sipbot serveplayed an 8 kHz μ-law WAV into an answered call, and the far end's recording matched it (correlation 0.993)
🤖 Generated with Claude Code