; Скрипт callback. ; proc main string szLogin = "login:" string szPW = "assword:" string szPhonePMT = "number:" ;################################## string szPhone = "Ваш номер здесь" ;################################## string szRing = "RING" string szNoConnect= "NO CARRIER" string szConnect = "CONNECT" string szPPP = "PPP" integer nLoginTimeout = 5 integer nPwdTimeout = 5 integer nPlusTimeout = 10 integer nCbTimeout = 180 integer nConnTimeout = 60 waitfor szLogin transmit $USERID, raw transmit "^M" waitfor szPhonePMT then GETNUM, szNoConnect then RECONN, szPW then PASS GETNUM: transmit szPhone, raw transmit "^M" RECONN: waitfor szLogin until nCbTimeout if !$SUCCESS then goto BREAK endif transmit $USERID, raw transmit "^M" waitfor szPW PASS: transmit $PASSWORD, raw transmit "^M" waitfor szLogin then BREAK, szPPP then PPP until 60 PPP: if !$SUCCESS then goto BREAK endif goto Done BREAK: delay 2 transmit "+++" waitfor "OK" until nPlusTimeout transmit "at&c1s0=0O^M" set screen keyboard on halt Done: delay 2 transmit "+++" waitfor "OK" until nPlusTimeout transmit "at&c1s0=0^M" waitfor "OK" until 2 transmit "ATO^M" END: endproc