I need to save (e.g. record) audio from a sip call in original format, G.711 in my case. I need to record chunks real-time, that's why I'm looking into rtmp streaming. My only issue is I need original audio format, not converted one.
WCS does not dump audio in original formats. This means you can't record raw G.711 bytes.
However you can try to record PCM16 wav file.
It is raw decoded audio and you can encode this audio to G.711 anytime using a converter like Sox.
Steps to record raw pcm16.
1. Configure flashphoner.properties
#Here we set folder for wav files
record=/tmp
#Here we enable audio recording on streams
record_audio_processor_pcm=true
2. Make a call.
Code:
/call/startup
{
"toStream":"stream1"
...
}
4. Make sure you have recorded wav files in /tmp directory
5. Re-publish your stream1 to RTMP.
Code:
/push/startup
{
"streamName":"stream1",
"rtmpUrl":"rtmp://host:1935/live"
}