我需要星号拨号计划的帮助。我希望每次拨打电话时,当用户拿起电话时,我希望它说出一个特定的日期,但我无法弄清楚拨号计划中哪个应用程序可以做到这一点。我正在使用SayUnixTime
但它只说当前时间。如果您能帮助我,我将不胜感激。
[from-internal-custom]
exten => ***0005,1,Noop(---say money---)
same => n,answer()
same => n,wait(1)
same => n,Set(money=20.50)
same => n,gosub(saymoney,s,1(${money})
same => n,hangup()
exten => ***0004,1,NooP(-------------- saydate------------)
same => n,Answer()
same => n,wait(1)
same => n,set(date=03-31-2018)
same => n,gosub(saydate,s,1(${date}))
same => n,hangup()
[saydate]
exten => s,1,noop(----say date----)
same => n,set(fulldate=${ARG1})
same => n,set(month=${CUT(fulldate,-,1)})
same => n,set(date=${CUT(fulldate,-,2)})
same => n,set(year=${CUT(fulldate,-,3)})
same => n,Noop(Month = ${month} Date = ${date} Year = ${year})
same => n,gosub(months,s,1(${month}))
same => n,set(monthwav=${GOSUB_RETVAL})
same => n,Gosub(date,s,1(${date}))
same => n,Set(datewav=${GOSUB_RETVAL})
same => n,playback(${monthwav}&${datewav})
same => n,saynumber(${year})
same => n,return()
[months]
exten => s,1,Noop(------------- Get-Month-------------)
same => n,Set(mt=${MATH(${ARG1}-1,int)})
same => n,Set(monthwav=digits/mon-${mt})
same => n,return(${monthwav})
[date]
exten => s,1,Noop(SUB-----------Get-Date---------------)
same => n,set(d=${ARG1})
same => n,gotoif($[${d}>19]?Nums20-31
same => n,execif($[${d:0:1}=0]?set(d=${d:1:1}))
same => n(setordinal),set(date=digits/h-${d})
same => n,return(${date})
same => n(Nums20-31),Noop(----------Number 20 to 31 -------------)
same => n,gotoif($[${d:1:1}=0]?setordinal)
same => n,set(f=${ARG1:0:1}) ;get first digit
same => n,set(l=${ARG1:1:1}) ;get last digit
same => n,set(date=digits/${f}0&digits/h-${l}) ;put both wave files together
same => n(return),return(${date})
[saymoney]
exten => s,1,noop(SUB---------saying money------------)
same => n,set(money=${ARG1})
same => n,Set(dollars=${CUT(money,.,1)})
same => n,set(cents=${CUT(money,.,2)})
same => n,saynumber(${dollars})
same => n,playback(digits/dollars)
same => n,gotoif($["${cents}"=""]?return
same => n,gotoif($[${cents}=0]?return
same => n,playback(and)
same => n,saynumber(${cents})
same => n,execif($[${cents}=1]?playback(cent):playback(cents))
same => n(return),return()
您可以使用SayDigits,SayAlpha和dialplan函数的组合。
您也可以使用像倒谱这样的TTS系统。