when i have a new voice mail on ext 172, it runs the 172 script (01colomF) and then it has to wait 20 minutes to check again if it has the new vm yet and runs the script again.
ok guys, i read cron functions and i understood that you can set the time to do some task. but i need to interact with the hasnewvoicemail() (asterisk). Remember i have to execute two time counters, first one with 20 minutes and the second one with 20 minutes after first one. all the time counters will be controled by the VM, for example:
New voicemail stars time counters, First one 20 min, Second one 40 min.
If the new voicemail is heard, kill the time counters.
If the first counter was executed, it ran a minicom script.
If the second counter was executed, it ran a minicom script.
[root@asterisk1 172]# ls
busy greet INBOX Old temp tmp unavail
[root@asterisk1 172]# cd INBOX/
[root@asterisk1 INBOX]# ls ---------- i have two new voice mails
msg0000.txt msg0000.wav msg0000.WAV msg0001.txt msg0001.wav msg0001.WAV
[root@asterisk1 INBOX]# cd …
[root@asterisk1 172]# cd Old
[root@asterisk1 Old]# ls -------- Old is empty
[root@asterisk1 Old]# ls -------- i heard the two voicemails and automatic pass to Old
msg0000.txt msg0000.wav msg0000.WAV msg0001.txt msg0001.wav msg0001.WAV
[root@asterisk1 Old]# cd …
[root@asterisk1 172]# cd INBOX/
[root@asterisk1 INBOX]# ls -------- INBOX is empty
[root@asterisk1 INBOX]#
ok with this information i can create a linux script to check the INBOX or the Old and put the sleeps (20 min and 40 min). but i donôt know the correct command to check if the directories has something.