Forward voicemail to email based on length


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


// echo “$filename path <br><br>”;
foreach($vm_prop as $key=>$value) {
//echo" $key => $value<br>";

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