SOLVED Voice Mail Auto Call (Call extension when extension has new VM)

PBXinmyhouse

New Member
Joined
Dec 26, 2018
Messages
7
Reaction score
2
Is there a way to daily check if a extension has voicemail and if so, call that person attempting to force them to check their voicemail.

It seems possible.
 

PBXinmyhouse

New Member
Joined
Dec 26, 2018
Messages
7
Reaction score
2
Well, looking at how the reminder system works, this should be pretty straight forward. I'll work on it and post my results.

If someone else has done this, no sense in me repeating the work.
 
Last edited:

ostridge

Guru
Joined
Jan 22, 2015
Messages
1,618
Reaction score
517
a way to daily check if a extension has voicemail and
This doesn't directly answer the question; just to remind that the extension settings includes the email asddress that voicemails are sent to, and also a setting for the format to send.
 

PBXinmyhouse

New Member
Joined
Dec 26, 2018
Messages
7
Reaction score
2
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.
 
Last edited:

Members online

Forum statistics

Threads
25,782
Messages
167,512
Members
19,203
Latest member
frapu
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top