[asterisk-users] Correct syntax for IF()?
Vincent
vincent.delporte at bigfoot.com
Thu Nov 29 22:12:52 CST 2007
On Mon, 26 Nov 2007 21:23:59 -0500, Adam Moffett <adam at plexicomm.net>
wrote:
>This method should work:
>
>${IF($["${STAT(e,/tmp/${CALLTIME}.wav)}" = "1"]?${CALLTIME}.wav:"")}
Yes indeed :-)
=======
[internal]
exten => 888,1,Playback(leave_msg)
exten => 888,n,Set(CALLTIME=${STRFTIME(${EPOCH},,%d-%b-%Y-%Hh%M)})
exten => 888,n,Record(/tmp/${CALLTIME}.wav,3,30,s)
exten => 888,n,Hangup()
exten => h,1,NoOp(Let's dance)
exten => h,n,Set(WAV_FILE=${IF($["${STAT(e,/tmp/${CALLTIME}.wav)}" =
"1"]?${CALLTIME}.wav:"")})
exten => h,n,Verbose(WAV_FILE is ${WAV_FILE})
=======
Thanks a lot for the help.
More information about the asterisk-users
mailing list