Okay, finished. It comes in 3 parts. Pretty happy with myself. Seems to work great. Turning debug on writes the call file to the /tmp file rather than the asterisk/outgoing folder, so you can look over the file.
1. Entry within /etc/
crontab file
2. /var/lib/asterisk/agi-bin/
pushvm.php script i wrote
3. Context created in
extensions_custom.conf
There is a config option at the beginning of the pushvm.php. The mapping one is important if you want to call an extension different than the voicemail box number. The other options are self explanatory.
$RequirePassword = 0; //REQUIRE PASSWORD FOR VOICEMAIL (0=NO 1=YES)
$CallerName = "Voice Mail Push"; //CALLER ID NAME
$Context = "vmpush"; //CONTEXT CALLED IN CUSTOM EXTENSIONS
$MaxRetries = 0; //AFTER INITIAL CALL, HOW MANY REATTEMPTS.
$WaitTime = 30; //TIME TO WAIT BETWEEN RETRIES
$MailboxMAP = "1000>1001,9999>1003"; //MAPPING VOICEMAIL # CALLS EXTENSION
$Debug = 0; // 0 = USE call_dir 1 = USE tmp_dir
Also, the next option - You can call the pushvm.php with an argument. If no argument is given, it will check all voicemail accounts. But, you can also give a argument of the voice mail box # and it will only process that one. Any second argument (no matter what the value) will put it in debug mode.
Example : pushvm.php 1000 : It will only process voicemail box 1000.
Exampe : pushvm.php 1000 1 : process 1000 but in debug mode.
This way, you may not want to have this process for every user, and/or you might want it to call the people at different times. (Different time zones)
cronttab example :
#Daily @ 7pm
0 19 * * * root /var/lib/asterisk/agi-bin/pushvm.php 1000
#Daily @ 10pm
0 22 * * * root /var/lib/asterisk/agi-bin/pushvm.php 9008
#Daily @ 10pm - With LOGGING
0 22 * * * root /var/lib/asterisk/agi-bin/pushvm.php 9008 >> /var/log/vmpush.log
Here is the context as within the
extensions_custom.conf
[vmpush]
exten => s,1,Answer
exten => s,n,VoiceMailMain(${vmuser}@default)
Here is the php script (placed in the /var/lib/asterisk/agi-bin/ )
http://s000.tinyupload.com/?file_id=24726890365358724698
Ps. Thank you
PhoneBuff. The link you posted aided me in ideas.