How do I send Asterisk recording emails with a post-call script executed from FreePBX?

0

The script I have designated FreePBX to call, when called directly from the CLI sends the email flawlessly. The emails are not triggered after a call takes place, however.

Background context: https://community.freepbx.org/t/solved-how-to-email-call-recordings-post-call-recording-script/26747/24

FreePBX 14.0.1.24

Asterisk 13.18.3

Otto Cortes

Posted 2018-01-18T22:07:57.630

Reputation: 1

Answers

0

In most cases asterisk pbx is running by asterisk user and running path can be virtualy anything.

So you need ensure

  1. Your script can run under asterisk user(permissions to logs file, read permissions for libs dirs etc etc)
  2. Your script path always full, from root. Library path full or system-wide.

arheops

Posted 2018-01-18T22:07:57.630

Reputation: 977

Those are both good things to check. They got me thinking more about permissions and I eventually came to the solution below. Cheers! – Otto Cortes – 2018-01-19T17:28:35.583

0

The problem in my case was the mutt configuration file .muttrc (mutt being the utility recommended for this application) was initially set up by root and not by asterisk and so asterisk did not know how to send out emails.

Solution: -make a new .muttrc file in the ~/ directory of the asterisk user (or cp the one from root if you have one there) -make sure all your mutt email credentials are stated in the .muttrc

For a rundown of how to configure mutt: http://nickdesaulniers.github.io/blog/2016/06/18/mutt-gmail-ubuntu/

Otto Cortes

Posted 2018-01-18T22:07:57.630

Reputation: 1