Unable to maintain connection to the Prosody from Jigasi

We have been trying to implement audio recording through Jigasi. We see that the connection is lost just a few minutes (around 3-5 minutes) and we loose the recording for rest of the meeting. We then tried to create the same web-socket connection to prosody through NodeJS. Again we are able to connect but after a few minutes prosody does not respond and the connection is terminated.
Is there anything that needs to be changed/added to prosody configuration that will enable us to be connected to it till we manually terminate the connection? Or is there something else that is need to keep the connection alive?
Please help us find a way to do so.
Thank you in advance!