Freeswitch extentions

Voice-mail to Email

 <extension name="my_voicemail">
 <condition field="destination_number" expression="^voicemail$" >
 <action application="set" data="file=/home/freeswitch/voicemail/${strftime(%Y-%m-%d_%H-%M-%S)}"/>
 <action application="set_zombie_exec"/>
 <action application="answer"/>
 <action application="playback" data="mysounds/answer.wav"/>
 <action application="record" data="${file}.wav 300 100 5"/>
 <action application="sleep" data="50"/>
 <action application="system" data='lame -b 32 --resample 8 -a ${file}.wav ${file}.mp3' />
 <action application="system" data='rm ${file}.wav' />
 <action application="system" data='echo "See attached Voicemail message" | mutt -a ${file}.mp3 -s "Voice-mail Message" --' /> 
 <action application="hangup"/>

You could add another system call to delete after you send the mp3 file if it makes your day.

<action application="system" data='rm -f ${file}.mp3'/>

Top Page wiki Index


This information may have errors; It is not permissible to be read by anyone who has ever met a lawyer.
Use is confined to Engineers with more than 370 course hours of electronic engineering for theoretical studies.
ph +1(785) 841-3089


(C) Copyright 1994-2017, Transtronics, Inc. All rights reserved
TranstronicsĀ® is a registered trademark of Transtronics, Inc.
All trademarks are the property of their respective owners.