This is the most compact I can make it just by tidying up your variables
and playbacks:
same =>
n,Set(ARRAY(minSpeech,playFile)=minutes&and,/var/lib/asterisk/sounds/en/abandon-all-hope)
same => n,Gosub(setup)
same => n,set(playFile=/tmp/reno_project-system)
same => n,Gosub(setup)
same => n,Hangup(); tidy up
same => n(setup),Set(totalTime=$[CEIL(${STAT(s,${playFile}.alaw)} /
8000)])
same =>
n(play),ControlPlayback(${playFile},0,3,1,045679#*,,2,o(${CPLAYBACKOFFSET}))
same => n,GosubIf($["${CPLAYBACKSTATUS}"="USERSTOPPED"]?pause)
same => n,GoToIf($["${CPLAYBACKSTATUS}"="SUCCESS"]?done:play)
same =>
n(pause),Set(ARRAY(totalMin,totalSec,pauseTime)=$[FLOOR(${totalTime} /
60)],$[REMAINDER(${totalTime},60)],$[{CEIL(${CPLAYBACKOFFSET})} / 1000])
same => n,Set(pauseTime=${MATH(${pauseTime}+0,i)})
same => n,Set(ARRAY(pauseMin,pauseSec)=$[FLOOR(${pauseTime} /
60)],$[REMAINDER(${pauseTime},60)])
same => n,Playback(dictate/paused&digits/at)
same => n,ExecIF($[${pauseTime} > 59
]?Playback(digits/${pauseMin}&${minSpeech}))
same => n,SayNumber(${pauseSec})
same => n,Playback(seconds&vm-duration)
same => n,ExecIF($[${totalTime} > 59
]?Playback(digits/${totalMin}&${minSpeech}))
same => n,SayNumber(${totalSec})
same => n,Playback(seconds)
same => n,Return() ; continue where we left
same => n(done),Set(CPLAYBACKOFFSET=0)
same => n,Return()
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
http://www.asterisk.org/community/astricon-user-conference
New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users