Hello

I didn't find the answer in the ATOF 2nd Ed: When using the Record()
application, I need to know how it ended: Did the user leave a
message, or did he hang up?

If the latter, Asterisk stops right there, while I need to run some
other commands before hanging up:

========
exten => _[1-4],n,Playback(/root/asterisk_sound_files/leave_msg)
exten => _[1-4],n,Set(CALLTIME=${STRFTIME(${EPOCH},,%d-%b-%Y-%Hh%M)})

;check if left message : if nothing, script ends there!
exten => _[1-4],n,Record(/tmp/${CALLTIME}.wav,3,30)

exten => _[1-4],n,TrySystem(mv /tmp/${CALLTIME}.wav
/srv/www/lighttpd/asterisk)
exten => _[1-4],n,ExecIf($[${SYSTEMSTATUS}!= SUCCESS],Verbose,Failed
moving WAV file)

exten => _[1-4],n,TrySystem(/root/asterisk/send_call_notification.py
"${CALLERIDNAME}" ${CALLERIDNUM} ${SOFTWARE} ${CALLTIME}.wav)
exten => _[1-4],n,ExecIf($[${SYSTEMSTATUS} != SUCCESS],Verbose,Error
sending e-mail)

exten => _[1-4],n,Playback(/root/asterisk_sound_files/bye_bye)
exten => _[1-4],n,Hangup()
========

Should I use another application?

Thank you.


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to