Luigi Rizzo wrote: > as you see, if ast_streamfile() fails, ast_stopstream() is not called. > Can someone explain which way is correct or whether they > are equivalent ? There is no harm in calling ast_stopstream() if ast_streamfile() failed, since chan->stream will be empty. However, there is no value in calling in that situation either :-)