If you hangup in the middle of recording it won't execute the rest of your dialplan unless you enable zombie exec mode.



On Thu, Jul 25, 2013 at 2:45 PM, Avi Marcus <avi@avimarcus.net> wrote:
Cool. Sounds like a great recipe to save on the wiki...
-Avi

On Thu, Jul 25, 2013 at 10:34 PM, Karl Schmidt <karl@xtronics.com> wrote:
This turns out to be utterly simple - no need for an external script - much better than phone based
voicemail:

  <include>
  <extension name="my_voicemail">
     <condition field="destination_number" expression="^.*$">
       <action application="playback" data="mysounds/answer.wav"/>
       <action application="set" data="file=/home/freeswitch/voicemail/${strepoch()}.wav"/>
       <action application="record" data="${file} 300 100 5"/>
       <action application="sleep" data="30"/>
<action application="system" data='echo "See attached Voice-mail message" | mutt -a ${file} -s
"Voicemail Message" -- user@example.com' />
     </condition>
  </extension>
  </include>

You can add a second system call to delete after you send if it makes your day.

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


--------------------------------------------------------------------------------
Karl Schmidt                                  EMail Karl@xtronics.com
Transtronics, Inc.                              WEB http://secure.transtronics.com
3209 West 9th Street                             Ph (785) 841-3089
Lawrence, KS 66049                              FAX (785) 841-0434

The only valid market survey is a signed purchase order. -- Jay Last
--------------------------------------------------------------------------------

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900