dial-tele2: print "AT&F\r\n" match "ERROR" ModemError match "NO CARRIER" ModemError match "OK" NoEcho wait 5 log "Modem not ready" failure NoEcho: print "ATE0\r\n" match "OK" ModemQuery wait 5 log "Modem not ready" failure ModemQuery: print "AT+CRSM=176,12258,0,0,10\r\n" regex "[+]CRSM: .*\"(.*)\"" wait 5 log "Detected ICC (BCD): $matchedString1" match "OK" wait 5 print "AT+CRSM=176,28423,0,0,9\r\n" regex "[+]CRSM: .*\"(.*)\"" wait 5 log "Detected IMSI: $matchedString1" match "OK" wait 5 print "AT+CSQ\r\n" regex "[+]CSQ: .*$" wait 5 log "Detected $matchedString0" match "OK" wait 5 ModemInit: print "AT&D2&C1S0=0S7=60S30=0+CGDCONT=1,\"IP\",\"internet.tele2.ru\"\r\n" match "OK" DialOut match "ERROR" ModemError wait 5 ModemError: log "Modem error" failure DialOut: log "Calling, waiting 60 seconds for connect..." print "ATDT*99#\r\n" match "CONNECT" Connected match "NO CARRIER" DialError match "BUSY" DialError wait 60 log "Modem error" failure DialError: log "Cannot connect" failure Connected: log "Connected" success