[asterisk-users] externnotify script not running

Mike Diehl mdiehl at diehlnet.com
Thu Mar 17 15:54:53 CDT 2022


These were all good ideas.  I changed my script to a bash script called 
deliver_vm.sh:

======================================================
#!/bin/bash

echo testme >> /home/phones/test.txt
======================================================

The permissions are correct:

# ls -la commands/deliver_vm.*
-rwxr-xr-x 1 root root 254 Mar 16 21:12 commands/deliver_vm.pl
-rwxrwxrwx 1 root root  50 Mar 17 14:17 commands/deliver_vm.sh

It does run from the command line, but still not from Asterisk.

It feels like a configuration issue in Asterisk.  Here is what I have:

externnotify=/home/phones/commands/deliver_vm.sh ${VM_NAME} ${VM_DUR} $
{VM_MSGNUM} ${VM_MAILBOX} ${VM_CALLERID} ${VM_DATE}

After I made the change, I did:

module reload app_voicemail.so


Anything else I can check/do?

Thanks again,

Mike.



On Thursday, March 17, 2022 3:53:46 PM EDT TTT wrote:
> Can I suggest you eliminate a few obvious factors...
> 
> Like 1. try a bash script first instead of perl, 2. Have the bash script
> just issue a "logger' command
> 
> If that works go back to perl which does the same.  If that works, change
> you perl script to dump all vars to a file..etc.
> 
> Also, check your script for nonprintable characters.  Does the script run
> from the command line?  (if you feed it vars)
> 
> -----Original Message-----
> From: asterisk-users [mailto:asterisk-users-bounces at lists.digium.com] On
> Behalf Of Mike Diehl Sent: Thursday, March 17, 2022 3:37 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users at lists.digium.com> Subject: Re: [asterisk-users]
> externnotify script not running
> 
> No, this machine doesn't have selinus installed/configured/enforced.
> 
> Is there a debug setting I could use to debug this?  I didn't see anything
> in the logs.
> 
> Perhaps there is a working configuration that someone would share?
> 
> Thanks again,
> 
> Mike.
> 
> On Thursday, March 17, 2022 2:22:47 AM EDT Marek Greško wrote:
> > Hello,
> > 
> > maybe selinux could be the cause?
> > 
> > Marek
> > 
> > 
> > Sent with ProtonMail secure email.
> > 
> > ------- Original Message -------
> > 
> > On Wednesday, March 16th, 2022 at 21:10, Mike Diehl
> > <mdiehl at diehlnet.com>
> 
> wrote:
> > > Hi all,
> > > 
> > > I'm trying to build a custom voicemail delivery system using
> > > externnotify in
> > > 
> > > voicemail.conf. But, the configured script doesn't seem to run.
> > > 
> > > I have:
> > > 
> > > externnotify=/home/phones/commands/deliver_vm.pl ${VM_NAME}
> > > ${VM_DUR} $
> > > 
> > > {VM_MSGNUM} ${VM_MAILBOX} ${VM_CALLERID} ${VM_DATE}
> > > 
> > > The deliver_vm.pl has read and execute permissions.
> > > 
> > > Here is the file I have:
> > > 
> > > ===============================================================
> > > 
> > > #!/usr/bin/perl
> > > 
> > > $a = join("\t", @ARGV);
> > > 
> > > open FILE, ">>/tmp/test.txt";
> > > 
> > > print FILE "$a\n";
> > > 
> > > close FILE;
> > > 
> > > ===============================================================
> > > 
> > > After I leave a voicemail message, I expect to find something in
> > > /tmp/test.txt,
> > > 
> > > but I don't.
> > > 
> > > What am I missing?
> > > 
> > > Thanks in advance.
> > > 
> > > Mike.
> > > 
> > > --
> > > 
> > > ____________________________________________________________________
> > > _
> > > 
> > > -- Bandwidth and Colocation Provided by http://www.api-digital.com
> > > --
> > > 
> > > Check out the new Asterisk community forum at:
> > > https://community.asterisk.org/
> > > 
> > > New to Asterisk? Start here:
> > > 
> > > https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> > > 
> > > asterisk-users mailing list
> > > 
> > > To UNSUBSCRIBE or update options visit:
> > > 
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
> 
> New to Asterisk? Start here:
>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20220317/8ba50ef8/attachment.sig>


More information about the asterisk-users mailing list