There are two options to do this:
1. (Low cost way) You can record video and audio stream to different files and then mux them using ffmpeg. This way cannot provide audio and video synchronization especially if two different sources are used, so out of lipsync will occur.
2. You can use mixer by adding audio and video streams to it
- add the following parameter to flashphoner.properties
- use REST API to create mixer and to add video and audio streams to it
- record the stream mixer1 using /stream/startRecording REST API
Note that mixer requires CPU resources (at least one CPU core per two mixers with default settings), so this is not low cost way.
Please read details about mixer here and here.