Call Recording

Make a record of conversations, everything works fine, but when using the Speex codec recording stops working, created by each call wav file size of 44 bytes and all.
What could be the problem?