I need to write a script that logs into a group of pbx sites using the connection directory, opens a capture file capture some data, and close the capture file for each entry. So far I have managed to get the script to perform correctly for the 1st site, but on the 2nd entry the site is dialled but the commands are not transmitted.
I am new to aspect and would appreciate any help anyone could give. Here is what I have so far:
proc main
dial DATA GROUP "group name" CONNECTALL ; Dial entry.
while $DIALING ; Yield processing time while dialing.
yield
endwhile
when $CARRIER TRUE ; See if we're connected.
capture on
waitfor "?"
transmit "osl 111111111^m"
waitfor "?"
transmit "lct^m" ; get switch data.
waitfor "?"
hangup ; Hang up the phone line.
capture off
endwhen
endproc
I am new to aspect and would appreciate any help anyone could give. Here is what I have so far:
proc main
dial DATA GROUP "group name" CONNECTALL ; Dial entry.
while $DIALING ; Yield processing time while dialing.
yield
endwhile
when $CARRIER TRUE ; See if we're connected.
capture on
waitfor "?"
transmit "osl 111111111^m"
waitfor "?"
transmit "lct^m" ; get switch data.
waitfor "?"
hangup ; Hang up the phone line.
capture off
endwhen
endproc