Time Bandit wrote:
At some point in my dial plan, I need to find out the length of a sound
file in seconds (to weed out things that are way too short)

the record application doesn't seem to have any facilities to do that.

any ideas ?
use "sox beep.wav -e stat" and parse the output

man is your friend
google also :)

something like this works... but is rather inefficient ...

#!/bin/bash
LENGTH=`sox /home/asterisk/$1.wav -e stat 2>&1 | grep Length | sed -e s/[^0-9]*//`; psql -c "update conferences set message_length=$LENGTH where conf_serial=12" -U asterisk asterisk
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to