[asterisk-users] send record file to email

A J Stiles asterisk_list at earthshod.co.uk
Fri Feb 1 09:35:21 CST 2013


On Friday 01 February 2013, Bob Kyeyune wrote:
> Hello;
> how do i embed and send the recorded file to email automagically
> 
> exten => _1XXX,3,MixMonitor(${CALLFILENAME}|b|/usr/sbin/wav2mp3
> ${CALLFILENAME} ${peeremail} ${EXTEN} ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}
> )
> 
> Regards.
> Kyeyune Bob
> Network & IT Engineer
> +256 774 702 258
> bob.kyeyune at onesolutions.ug

You will have to put some logic in the "h" extension, which gets called on 
HangUp() so that if "${CALLFILENAME}" != "" then it will fire off a script to e-
mail the recording.  It doesn't even need to be a full-on AGI script; you can 
just use System() to run it.

Your favourite scripting language should already be able to create e-mails 
with attachments  (or else you really should be looking for a new favourite).

-- 
AJS

Answers come *after* questions.



More information about the asterisk-users mailing list