On 28 Nov 2006, at 17:54, Doug Crompton wrote:

How does one process a return code in Asterisk?

Example...

exten => s,n,Playback(/tmp/podcast/${CALLERIDNUM})
exten => s,n,System(rm "/tmp/podcast/${CALLERIDNUM}.gsm")


If the caller hangs up on the playback command the file remove System
statement after it never gets executed. The playback command returns a -1 in this case and logs a warning. The only thing mentioned in the command
reference is 101 for file not found.

This isn't the answer to your question, but in that particular case, I'd put the rm into the 'h'
extension, that way it gets run whenever the user hangs up.

exten => s,n,Playback(/tmp/podcast/${CALLERIDNUM})
exten => h,1,System(rm "/tmp/podcast/${CALLERIDNUM}.gsm")


Tim Panton

www.mexuar.net
www.westhawk.co.uk/



_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

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

Reply via email to