Record + mail problem

Hi.
I am using Asterisk 1.8.25.0 on FreeBSD 9.2
I want to record call and send it , but I could not, all I can see in CLI after recording is “Spawn extension”, and email with record has not been sent.
What have I done wrong?

exten => 9,1,Playback(en/beep)
same => n,Set(fname=${STRFTIME(${EPOCH},%Y%m%d%H%M)}-${CALLERID(number)}-${
EXTEN})
same => n,Record(/home/asterisk/records/${fname}.wav,0,30,k)
same => n,System(/bin/echo “record” | /usr/local/bin/mutt -s “Call from ${CALLER
ID(number)}” -a /usr/home/asterisk/records/${FILE} – support@mail-mail.ru)
same => n,System(/bin/rm/usr/home/asterisk/records/${FILE})

Spawn Extension is only part of a message. I don’t believe that is all you see. Please provide the actual logs.

Also, if using FreePBX, explain why this can be debugged without regard to FreePBX. I think this is the case here, but the mention of FreePBX will often trigger an immediate redirect to the FreePBX support site.

My guess is that you are getting an “exited non-zero on…” message in the log, in which case you need to use an h extension.

Is there some reason for not using VoiceMail()?

david55, thx for a fast answer.

[quote=“david55”]Spawn Extension is only part of a message. I don’t believe that is all you see. Please provide the actual logs.[/quote]Spawn extension (default, 2999999, 1) exited non-zero on ‘SIP/base-0000cd55’
== Spawn extension (ivr-menu, 9, 3) exited non-zero on ‘SIP/nettrans-0000cd57’

[quote=“david55”]Also, if using FreePBX, explain why this can be debugged without regard to FreePBX. I think this is the case here, but the mention of FreePBX will often trigger an immediate edirect to the FreePBX support site.[/quote] I don’t use FreePBX

earlier time i did use h extension, i get same error.

I don’t use voiceMail because i can’t configure it properly :smiley:

my dialplan with 9 or h:

exten => 9,1,Playback(en/beep) same => n,Set(fname=${STRFTIME(${EPOCH},,%Y%m%d%H%M)}-${CALLERID(number)}-${EXTE N}) same => n,Record( /home/asterisk/records/${fname}.wav,0,30,k) same(or i change it on "exten => h,n,System" )=> n,System( /bin/echo "record" | /usr/local/bin/mutt -s "Call from ${CALLERID(number)}" -a /usr/home/asterisk/records/*.wav -- mail@mail.ru) same(or i change it on "exten => h,n,System" ) => n,System(/bin/rm /usr/home/asterisk/records/*.wav same => n,Hangup()

Misread FreeBSD as FreePBX.

Exited non-zero is not an error. You would get that if you had an h extension, but then the h extension would run.

Doing things the non-obvious limits the people with the experience to help you.

[quote=“david55”]Misread FreeBSD as FreePBX.

Exited non-zero is not an error. You would get that if you had an h extension, but then the h extension would run.

Doing things the non-obvious limits the people with the experience to help you.[/quote]
My problem was simple. Error in dialplan. Man in russian asterisk forum helped me.

exten => 9,1,Playback(en/beep) same => n,Set(fname=${STRFTIME(${EPOCH},,%Y%m%d%H%M)}-${CALLERID(number)}-${EXTE N}) same => n,Record( /home/asterisk/records/${fname}.wav,0,30,k) exten => h,[b][size=150][color=#FF4000]1[/color][/size][/b],System( /bin/echo "record" | /usr/local/bin/mutt -s "Call from ${CALLERID(number)}" -a /usr/home/asterisk/records/*.wav -- mail@mail.ru) exten => h,n,System(/bin/rm /usr/home/asterisk/records/*.wav same => n,Hangup()
and… it’s working, it’s working!