If it plays back ok, then the Red5 connection is ok. But what is not ok is when Moodle tries to copy the file back into Moodle's file system
Check these things:
i) the location of the recorded file.
It should be in the dir specified in /webapps/poodll/WEB-INF/red-properties.xml (need trailing slash)
ii) the port on which Moodle is trying to connect to copy the file.
this is 443 by default, but if Red5 and Moodle are on the same server then Apache is probably hogging port 443. So try 5080. Either way check that the port is actually matched on the Red5 side. To do that go into red5/conf/red5.properties. The HTTP port is the one that needs to match. (RTMP is probably ok with 1935. RTMPT is also interesting but it won't cause the problems you are describing. It is the port to use tunnel RTMP connections through a firewall.)
Also don't auto convert files to mp4 or mp3 while testing. Conversion is another place where things can go wrong. When you get to that stage, use FFMPEG to do the conversion in Moodle. I have another document on setting all that up somewhere.