How to invoke a script / context AFTER called has left a voicemail

FreePBX 13.0.197.31 (soon to go to 16!)

I have a dialplan that if I accept the call then callers go to a ring group for all phones. If nobody answers then callers are sent to ext 9000 VoiceMail. After they leave a message an email is sent (as defined in ext 9000).

I would also like to send an SMS. I can already send an SMS from the dialplan by calling a python script but cannot see how to do that after a VM has been left (or after nobody answered but VM left).

I did try setting Voicemail Context field to “voicemailleft” in Settings / Voicemail Admin / Extension 9000 / Context Config / and then adding a context [voicemailleft] in my dialplan but that was not invoked. I noted that the voicemail.conf file should not be edited in FreePBX.

Has anyone done this? A web search found nothing,

Many thanks for reading,
Alan in UK

In the [general] section of /etc/asterisk/voicemail.conf set mailcmd=PATH TO YOUR SCRIPT

Many thanks for such a quick reply. Problem is at the top of the edit window it says:

Working on voicemail.conf

File is not writable

That’s presumably as FreePBX updates that file. In fact I can see the variables that I entered into FreePBX’s forms. And setting mailcmd= would perhaps mean that my emails would not be sent.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.