# Trumpet Winsock script fragment will auto-redial (e.g., on BUSY) # assuming that $number has been initialized with the number you want to dial repeat sleep 2 # gives modem time to recover after connect failure outputecho "atdt"$number\r #dial number repeat read 90 $result # read modem response # wait for long response, ignoring normal intermediate responses until len($result) >= 4 & pos("~" + copy($result, 1, 4), "~RINGING~CARRIER~PROTOCOL") = 0 until pos("CONNECT", $result) = 1 # retry if I did not connect