Asterisk and icecast streaming, is the logic wrong?


I tried to stream a voice call to icecast2 using the Ices(conf) command and it sort of works but with a huge latency and choppy voice. Further more, it seems that if there is no audio data from the caller, nothing is written to the pipe(ices2).

Would this simply be a wrong way of implementing it ? The output is supposed to be 8000Hz mono and since it is intended to be streamed, should it be filled with silence data when there is nothing from the caller instead of just wait till there is voice data then pass it on ?

I have made a simple test to instead of ices, just dump it to a raw pcm file. So that file should have size proportional to how long the caller is connected, not how often there is voice.

But what I have found is there if I kept silent for 3 min, the file is just a few K.

any comment ?