Сообщений: 243
|
Re: Read()
У меня в диалплане работает...
[macro-prepaid-cards]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Read(PIN,card-number,10)
exten => s,4,AGI(dtl_check_valid_account.py|${PIN})
exten => s,5,Playback(press-1)
exten => s,6,Playback(for)
exten => s,7,Playback(call)
exten => s,8,Playback(or-press)
exten => s,9,SayNumber(2)
exten => s,10,Playback(for)
exten => s,11,Playback(billing)
exten => s,12,Read(CHOICE,,1)
exten => s,13,GotoIf($[${CHOICE} = 1]?20:)
exten => s,14,GotoIf($[${CHOICE} = 2]?30:)
exten => s,15,Goto(i,1)
exten => s,20,Read(DST,telephone-number)
exten => s,21,Playback(pls-wait-connect-call)
exten => s,22,Ringing
exten => s,23,Dial(OH323/${DST}@${ARG1},60,tr)
exten => s,24,Playback(number-not-answering)
exten => s,25,Playback(please-hang-up-and-try-again)
exten => s,26,Hangup
exten => s,124,Playback(the-number-u-dialed)
exten => s,125,Playback(is-curntly-busy)
exten => s,126,Playback(please-hang-up-and-try-again)
exten => s,127,Hangup
exten => s,30,AGI(dtl_tell_balance.py|${PIN})
exten => s,31,Wait(1)
exten => s,32,Goto(s,5)
exten => t,1,Playback(hangup-try-again)
exten => t,2,Hangup
exten => i,1,Playback(invalid)
exten => i,2,Goto(s,12)
|