Forward voicemail to email based on length

Hello,

Is there a way, using ‘minsecs’ in the voicemail.conf file, to forward voicemail messages that don’t meet the minsecs requirement to an email address other than the address configured for the voicemail box? Instead of just deleting the messages we’d like the emailed to another address.

You would have to modify the source of app_voicemail to do that.

There is a text file generated on each voice which hold the minsecs value, you can make an script who check that file on each Voiicemail and based on that take an action

I made this piece of code you can modify it
<?php

$db_values=array();

$filename=$argv[1];
// echo “$filename path <br><br>”;
$vm_prop=file($filename);
foreach($vm_prop as $key=>$value) {
//echo" $key => $value<br>";
$db_values[]=$value;
}
print_r($db_values);

function clean($var) {
$var=stristr($var, ‘=’);
$var=str_replace ("=" ,"",$var);
echo “\n”;

return $var;

}

echo clean($db_values[10]);

echo clean($db_values[11]);
echo clean($db_values[12]);

?>
php db_bk.php /var/spool/asterisk/voicemail/default/101/INBOX/msg0002.txx