Knowing the duration of a record?

Hello to all.

I have a same => n,Record(‘test’.wav,5,15,ky) in my dialplan.

Is there a function (or any other way) for retrieving the duration time of the recorded file ???

Thank you.

This is the wrong forum for support questions.

Use a shell script that runs the stat function in sox and extracts the relevant figure, then use the Asterisk function that returns the output of a shell command. (Using the size of the file would also give a good estimate.