Email Recordings per Extension

A toggle to allow email call recordings to the extensions email would be great to have.

+1 for that.

However, if you want to get your hands dirty a bit, you can add a hangup handler to each channel and process the email in the hangup handler.

1 Like

Maybe no hangup handler needed.

DumpChan() can help as well.

2 Likes

That might help certainly, just need to figure out what arguments can be passed to the script to add some logic I guess.

Usually it is the standard channel variables that you can pass as args.

Please check underneath the screenshot:
DumpChan()

This will help you see every variable on the channel when you do a asterisk -r -vvvvvvvv

You can then pass every variable you want as an argument or better:

while getopts "a:b:c:d:e:f:g:h:i:" opt
do
   case "$opt" in
      a ) paraA="$OPTARG" ;;
      b ) paraB="$OPTARG" ;;
      c ) paraC="$OPTARG" ;;
	  d ) paraD="$OPTARG" ;;
      e ) paraE="$OPTARG" ;;
      f ) paraF="$OPTARG" ;;
	  g ) paraG="$OPTARG" ;;
	  h ) paraH="$OPTARG" ;;
	  i ) paraI="$OPTARG" ;;
   esac
done

Example recording script URL:

/var/lib/vitalpbx/scripts/rec1.sh -a "^{REC_FILENAME}" -b "^{CALL_SOURCE}" -c "^{CDR(billsec)}" -d "^{CALL_DESTINATION}" -e "^{email}"

I got a PHP/MYSQL script that gets the email to the corresponding extension . Write a PM if you need more information.

What you will find: you might run into issues when you transfer calls. You need to record internal calls then, even it used to be an external call.

Still:

+1

For this being implemented into VitalPBX.