summaryrefslogtreecommitdiff
path: root/package/comgt/files/dial.comgt
blob: de3327331825bb45483bc48e898e85546ecad6a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# dial given number
opengt
 set com 115200n81
 set senddelay 0.02
 waitquiet 1 0.2
 flash 0.1

:start
 print "Dialing '"+$env("NUMBER")+"'\n"
 send "ATDT"+$env("NUMBER")+"^m"

 waitfor 15 "CONNECT" "OK","ERR","ERROR"
 if % = 0 goto continue
 if % = 1 goto continue
 if % = 2 goto senderror
 if % = 3 goto senderror

 print "Timeout dialing '"+$env("NUMBER")+"'\n"
 exit 1

:senderror
 print "Error dialing '"+$env("NUMBER")+"'\n"
 exit 1

:continue
 exit 0