Voicemain Notify - Manually trigger

We currently use a Zertron Sentryvoice auto dialer for in building alarms. This machine is very old (but still supported) and uses an analog phone line to dial out. I would like to automate the process a by using the voicemail notify module, which we currently use and depend heavily on.

What I am looking to do is this.
Write a script to copy a pre-recorded message to a voicemail “new” folder and the text file that would look like a new voicemail message.
Trigger the VM notify module to to see the new message and do its thing.

Trouble is I am having difficulties figuring out what calls the VM notify to see the new message and go to work. I see in the logs after a message is left something triggers VM notify, but it looks like the PHP files are encrypted (probably due to being a commercial module) Does anyone have any insight on how to accomplish this?

The trigger is a Comedian Mail (app_voicemail) feature externnotify that runs a script when a new message is created. asterisk/voicemail.conf.sample at master · asterisk/asterisk · GitHub

I’m not sure how (or if) you can get it to trigger if you’re manually copying a recording to the appropriate mailbox, but it might work if you have poll mailboxes enabled.

The asterisk forum might have more expertise in app_voicemail https://community.asterisk.org/

Stray thought, you may be able to use Asterisk AMI to trigger the externnotify as well:

CLI> manager show command VoicemailRefresh
[Syntax]
Action: VoicemailRefresh
[ActionID:] <value>
[Context:] <value>
[Mailbox:] <value>

[Synopsis]
Tell Asterisk to poll mailboxes for a change

[Description]
Normally, MWI indicators are only sent when Asterisk itself changes a mailbox.
With external programs that modify the content of a mailbox from outside the
application, an option exists called 'pollmailboxes' that will cause voicemail
to continually scan all mailboxes on a system for changes.  This can cause a
large amount of load on a system.  This command allows external applications to
signal when a particular mailbox has changed, thus permitting external
applications to modify mailboxes and MWI to work without introducing
considerable CPU load.
If <Context> is not specified, all mailboxes on the system will be polled for
changes.  If <Context> is specified, but <Mailbox> is omitted, then all
mailboxes within <Context> will be polled. Otherwise, only a single mailbox
will be polled for changes.

Good thought, but this did not work. I did connect through the AMI and send the “VoicemailRefresh” command, which returned successfully.

I have found the “eternal notify” trigger is executed from two different actions. First a caller enters the VM and leaves a message, second being the extension calls his VM. So if I dump an audio file in my VM INBOX folder, the MWI on my desk phone lights almost immediately. The message will then stay in my inbox until I dial my VM. I can hang up immediately, and then MN notify does it’s thing.

If you are using 15+ this was moved in to fwconsole…

fwconsole voicemail --notification [context] [extension] [vmcount] [oldvmcount] [urgvmcount]

James, I origionally started there with no success. The argument --notification returns “The “”–notification” option does not exist" If I send the command without the – so I get a return back to command prompt, but nothing happens. If I send:

fwconsole voicemail notification default 5907

I am returned:
#!/usr/bin/php -q
0

Voicemail Notifications 15.0.13
Copyright 2021 by Sangoma Technologies Inc., All rights reserved

By installing, copying, downloading, distributing, inspecting or using
the materials provided herewith, you agree to all of the terms of use as
outlined in our End User Agreement which can be found and reviewed at
https://www.freepbx.org/legal/

Am I missing an argument?

notification should be have a -- as it is an argument itself. Everything that follows it is parsed as an array of items

When entered as:
fwconsole voicemail --notification default 5907

I receive:
The “–notification” option does not exist.