TIPS Email Recorded calls to Voicemail Receipient

GlenPittman

New Member
Joined
Jun 29, 2008
Messages
27
Reaction score
1
In the style of the script I would probably do something like

# $MAILTO - recipient
.
.
MAILTO=$(grep $5 /etc/asterisk/voicemail.conf|cut -d "," -f3)
if [[ ! $MAILTO =~ .*@.*\.*. ]];then [email protected];fi
.
.
Please see the attached file \n\n" | mutt -s "New Call Recording" -a $dtpath$3.mp3 -- $MAILTO
.
.

mail does not have an easy attachment syntax, mutt does, you might need to install it.


I am trying to implement this on a system running PIAF Yellow. It works great for calls placed from a local extension, but not for calls from outside to a local extension. I thought it would be a fairly straight-forward modification to expand the if-then statement to include the option of using the extension which was the destination, if the originator extension didn't produce a valid email address. I think I have the code figured out, but I can't find the correct variable to include in the post recording script. I have tried ARG1, which returns "exten" instead of the extension number. I also tried a few other variables that I found in the dial plan extensions_additional.conf under [macro-dial-one] but haven't found anything.

I tried to figure out how to use DumpChan() to list the variables, but haven't been able to get anything to work. It's obvious that I know just enough about dial plans and scripting to be dangerous, but we all have to start somewhere I guess.

Is there anyone who can help with either directions on getting DumpChan() to work, or possibly a list of available variables that can be used in the Post Recording Script fields?

I have also just realized that I may have to modify the code again once I figure out this issue to cover a situation where one extension calls another. In that case, I will need it to be emailed to 2 users.

I do love a challenge though, but am stumped for a bit here with the first issue.
 

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
I actually was asked about doing this tonight. Anyone have a good implementation for Wazo?
 

Members online

Forum statistics

Threads
25,782
Messages
167,513
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