[Asterisk-Users] Can't capture "-1" return on Dial command

Eric Bullen ericb_asterisk at thedeepsky.com
Sat Dec 11 19:06:20 MST 2004


How can I capture a "-1" result on a Dial command? Basically, I have the
following setup, and I want to be able to process the audio file after the
outbound call has been done regardless how how it ends.

No matter how the call ends, I can't get "macro-record-stop" to run.

Any help would be great.

-Eric

<from extensions.conf>

[macro-dialanalog]
  exten => s,1,Macro(record-start)
  exten => s,2,Dial(${TRUNK}/${MACRO_EXTEN},70)
  exten => s,3,Macro(record-stop)
  exten => s,102,Macro(record-stop)
  exten => h,1,Macro(record-stop)

[macro-record-start]
  exten => s,1,SetVar(CFN=${MONITORPATH}/${TIMESTAMP}--${CALLERIDNUM})
exten => s,2,Monitor(${MONITORFILETYPE},${CFN})


[macro-record-stop]
  exten => s,1,System(/usr/bin/soxmix ${CFN}-in.${CFE} ${CFN}-out.WAV
${CFN}.WAV)
  exten => s,2,System(rm ${CFN}-in.WAV ${CFN}-out.WAV)
  exten => s,3,System(/usr/bin/sox ${CFN}.WAV -t uw - | /usr/bin/lame -r
-m m -s 8 - ${CFN}.mp3)
  exten => s,4,System(rm ${CFN}.WAV)







More information about the asterisk-users mailing list