Hi Vinayak,
There may be a sequence issue here, but I may be misunderstanding what is happening. Let me lay it out and please correct me if I’ve made an incorrect assumption.
You are issuing the record command, as you stated, which is telling the EMS to record stream v1 to the destination /home/mediaserver/v1, and record as an flv file.
The EMS accepts the command as a valid request (hence issuing the SUCCESS response), and then looks up the v1 stream to record.
It does not find a local stream with the name v1, and so it queues the recording request, waiting for v1 to be present.
So what you need to do is find out what the stream name of your user will be. You can predetermine that with your client, query the EMS once the streaming has started to find out, or listen for Event Notifications for a stream creation event. Once you know the localStreamName of the stream you want to record, you can issue the record command for that stream. That record command can be made before the stream is available, queuing the record for when it does become available.