• Support
  • Articles
  • Resources
  • Products

Autodialer from a list of phone numbers

Moderator: boris

1 postPage 1 of 1

Envy
Newbie

Posts:
16
Joined: Mon Mar 12, 2012 11:19 am
by Envy » Wed Mar 14, 2012 12:35 pm
First of all, I didn't make this script myself, I found it under a post after searching a long time for this script.
So as you can read in the tittle, this script calls a list of numbers (ATDT) trough a serial connection with a modem. Then it writes all the failed calls in a log.

Code: Select all

  1.  
  2. connect '/C=X' ; X is the serial you use e.g. C=1
  3. filesearch 'filename' ; e.g. C:\phone.txt
  4. if result = 0 then
  5.     messagebox 'Cant open file' 'ERROR'
  6.     goto the_end
  7. endif
  8. fileopen fh 'filename' 0
  9. fileopen log 'log_filename' 0 ; e.g. C:\log.txt
  10. filereadln fh line
  11. while result = 0
  12.     sprintf "ATDT%s" line
  13.     flushrecv
  14.     sendln inputstr
  15.     wait "CONNECT" "NO CARRIER" "BUSY"  "NO DIAL TONE" "ERROR"
  16.     if result = 1 then
  17.         pause 10
  18.         send "+++"
  19.         pause 3
  20.         sendln "ATH"
  21.         waitln "OK" "ERROR" "NO CARRIER"
  22.     else
  23.         filewrite log "failed call: "
  24.         filewrite log line
  25.         ; Deal with failed call here (could make a failed call list file for retrys)
  26.     endif
  27.     filereadln fh line
  28. endwhile
  29. fileclose fh
  30. fileclose log
  31. :the_end
  32.  

1 postPage 1 of 1

Users browsing this forum: No registered users
cron