Injecting Sound to Stream Not Working (500 Internal Server Error) on 5.2

Williams Isaac

New Member
Hi Flashphoner Support, we at fireflies have been trying to use one of the flashphoner rest-api methods; /call/inject_sound, but we encountered same error below

```
{
"exception": "com.flashphoner.rest.server.exception.InternalErrorException",
"path": "/rest-api/call/inject_sound",
"error": "Internal Server Error",
"message": null,
"timestamp": 1561488410396,
"status": 500
}
```
What we tried.
1. Place audio in $WCS_HOME/media/
2. Updated to latest version of WCS
3. Power Cycle Server
4. Restart all processes
5. Setup a new WCS Server

We also searched your forum at: https://forum.flashphoner.com
But we didn't find anything relevant that could help us.
Please let us know what we need to right or that we are doing wrong.

Incase that endpoint doesn't fit, below is our simple use case.

We want to play a pre-recorded sound at the beginning of a call or end of the call.

Thanks, and we will be expecting your response as soon as possible.
 

Max

Administrator
Staff member
Good day.
Please check if you from /rest-api/call/inject_sound query as POST using Content-Type: application/json with the following parameters
Code:
{
"callId":"your_call_id",
"fileName":"your_file.wav"
}
Also check if your sound file meets the folowing equirements:
  • format: WAV
  • codec: PCM S16LE
  • channels: mono
  • sample rate: 44100 Hz
If problem still persists please collect a report as described here and send to support@flashphoner.com, we will check.
 

Williams Isaac

New Member
Good Day Admin, I have made sure audio format meets the requirement you specified.

Please see details of the audio below

Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'example_valid_1.wav':
Metadata:
artist : Kevin MacLeod
genre : Cinematic
title : Impact Moderato
album : YouTube Audio Library
encoder : Lavf58.12.100
Duration: 00:00:06.14, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s

I will compile the report to send.
 
Top