Код: Выделить всё
exten => 2909,1,Answer
exten => 2909,n,Wait(1)
exten => 2909,n,Background(conf-getconfno)
exten => 2909,n,Read(digits,,4,,,8)
exten => 2909,n,NoOp(Dial conf are: ${digits})
exten => 2909,n(pinnumber),Background(conf-getpin)
exten => 2909,n,Read(digits2,,4,,,8)
exten => 2909,n,NoOp(Dial Pin are: ${digits2})
exten => 2909,n,MYSQL(Connect connid localhost *** *** meetme)
exten => 2909,n,GotoIf($["${connid}" = ""]?error,1)
exten => 2909,n,MYSQL(Query resultid ${connid} SELECT `bookId`,`pin`,`adminpin`,`adminopts`,`opts`,`recordingfilename` FROM `booking` WHERE `confno`='${digits}' ORDER BY bookId DESC LIMIT 1)
exten => 2909,n,MYSQL(Query resultid ${connid} SELECT `bookId`,`pin`, `adminpin`,`adminopts`,`opts`,`recordingfilename` FROM `booking` WHERE `confno`='${digits}' AND `starttime` < '${STRFTIME(${EPOCH},,%Y-%m$
exten => 2909,n,NoOp(Query are: ${resultid})
exten => 2909,n,MYSQL(Fetch fetchid ${resultid} bookId pin adminpin adminopts opts recordingfilename)
exten => 2909,n,NoOp(Pin are: ${pin})
exten => 2909,n,GotoIf($["${pin}" = ${digits2}]?error,1)
exten => 2909,n,meetme(${digits},xw,${digits2})
exten => 2909,n,Hangup
exten => error,1,NoOp(error!)
exten => error,n,Hangup()
В CLI если набирать dtmf после прослушивания сообщения:
-- Executing [2909@default:1] Answer("H323/ip$10.10.100.7:16685/24025", "") in new stack
-- Executing [2909@default:2] Wait("H323/ip$10.10.100.7:16685/24025", "1") in new stack
-- Executing [2909@default:3] BackGround("H323/ip$10.10.100.7:16685/24025", "conf-getconfno") in new stack
-- <H323/ip$10.10.100.7:16685/24025> Playing 'conf-getconfno.ulaw' (language 'en')
-- Executing [2909@default:4] Read("H323/ip$10.10.100.7:16685/24025", "digits,,4,,,8") in new stack
-- Accepting a maximum of 4 digits.
-- User entered '100'
-- Executing [2909@default:5] NoOp("H323/ip$10.10.100.7:16685/24025", "Dial conf are: 100") in new stack
-- Executing [2909@default:6] BackGround("H323/ip$10.10.100.7:16685/24025", "conf-getpin") in new stack
-- <H323/ip$10.10.100.7:16685/24025> Playing 'conf-getpin.ulaw' (language 'en')
-- Executing [2909@default:7] Read("H323/ip$10.10.100.7:16685/24025", "digits2,,4,,,8") in new stack
-- Accepting a maximum of 4 digits.
-- User entered '1234'
-- Executing [2909@default:8] NoOp("H323/ip$10.10.100.7:16685/24025", "Dial Pin are: 1234") in new stack
-- Executing [2909@default:9] MYSQL("H323/ip$10.10.100.7:16685/24025", "Connect connid localhost *** *** meetme") in new stack
-- Executing [2909@default:10] GotoIf("H323/ip$10.10.100.7:16685/24025", "0?error,1") in new stack
-- Executing [2909@default:11] MYSQL("H323/ip$10.10.100.7:16685/24025", "Query resultid 1 SELECT `bookId`,`pin`, `adminpin`,`adminopts`,`opts`,`recordingfilename` FROM `booking` WHERE `confno`='100' ORDER BY bookId DESC LIMIT 1") in new stack
-- Executing [2909@default:12] MYSQL("H323/ip$10.10.100.7:16685/24025", "Query resultid 1 SELECT `bookId`,`pin`, `adminpin`,`adminopts`,`opts`,`recordingfilename` FROM `booking` WHERE `confno`='100' AND `starttime` < '2012-02-28 15:26:07' AND `endtime` > '' ORDER BY bookId DESC LIMIT 1") in new stack
-- Executing [2909@default:13] NoOp("H323/ip$10.10.100.7:16685/24025", "Query are: 2") in new stack
-- Executing [2909@default:14] MYSQL("H323/ip$10.10.100.7:16685/24025", "Fetch fetchid 2 bookId pin adminpin adminopts opts recordingfilename") in new stack
-- Executing [2909@default:15] NoOp("H323/ip$10.10.100.7:16685/24025", "Pin are: 1234") in new stack
-- Executing [2909@default:16] GotoIf("H323/ip$10.10.100.7:16685/24025", "0?error,1") in new stack
-- Executing [2909@default:17] MeetMe("H323/ip$10.10.100.7:16685/24025", "100,xw,1234") in new stack