Programming
IF(STATE=5)
{
PUSH[DTMF_CARD,34] (*OUTGOING_BUSY*)
{
CANCEL_WAIT 'WAIT FOR RESPONSE TO DIAL'
SEND_COMMAND DTMF_CARD,'ON HOOK' (*NUMBER IS
BUSY SO HANG UP*)
SEND_STRING 0,"'DIALED NUMBER IS BUSY',13,10"
STATE=6
}
PUSH[DTMF_CARD,35] (*OUTGOING_RING*)
{
CANCEL_WAIT 'WAIT FOR RESPONSE TO DIAL'
SEND_STRING 0,"'REMOTE PHONE RINGING',13,10"
BUSY_COUNT=0
STATE=255
}
}
(***********************************************************************)
(* | IF THE DIALED NUMBER | WAS BUSY, INCREMENT THE |
| *) | |
(* | "BUSY_COUNT".IF | THIS | IS NOT THE 7TH RETRY, WAIT 5. | *) | |
(* | SECONDS AND TRY | AGAIN ELSE, SHUT DOWN (GO TO | "NO | *) | |
(* | STATE"). |
|
|
| *) |
(***********************************************************************)
IF(STATE=6)
{
BUSY_COUNT = BUSY_COUNT+1
STATE=255
IF(BUSY_COUNT<7)
{
WAIT(50)
STATE=2
}
ELSE
{
SEND_STRING 0,"'MAXIMUM RETRIES HAS BEEN REACHED',13,10"
BUSY_COUNT=0
}
}
(**********************************************************************)
(* | END OF PROGRAM | *) |
(* | DO NOT PUT ANY CODE BELOW THIS COMMENT | *) |
(**********************************************************************)
21 |
| |
|
|
|