I recorded test RAW file with FS and record application at max bitrate and resulting file was indeed stream of 62 bytes RTP payloads. 2 bytes AMR-WB header + 60 bytes of voice data.
I recompiled mod_amrwb with encoded_bytes_per_packet set to 62 and was able to successfully play RAW file!
There was warning "switch_core_file.c:358 File /tmp/recording.AMR-WB sample rate 8000 doesn't match requested rate 16000" but it sounded fine nevertheless.
I think this will work with passthrough mode too (change encoded_bytes_per_packet param from 0 to 62), but I don't have time to test it yet.
Of course I don't know if this change will not break other FS functions, any ideas?
And second problem is that caller may request lower bitrate with frame size 40 for example and RAW file will be sliced incorrectly.
Thats the real deal breaker. Any tips how to make native playback honor negotiated codec and set proper encoded_bytes_per_packet value?