Disclaimer

This information HAS errors and is made available WITHOUT ANY WARRANTY OF ANY KIND and without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It is not permissible to be read by anyone who has ever met a lawyer or attorney. Use is confined to Engineers with more than 370 course hours of engineering.
If you see an error contact:
+1(785) 841 3089
inform@xtronics.com

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" -- freeswitch@example.net' /> 
 <action application="hangup"/>
 </condition>
</extension>

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

Email

(C) Copyright 1994-2019
All trademarks are the property of their respective owners.