Programming
IF(STATE=2)
{
STATE=3
SEND_COMMAND
WAIT 20 'WAIT FOR DIAL TONE'
{
SEND_STRING 0,"'ERROR: NO DIAL TONE',13,10"
SEND_COMMAND DTMF_CARD,'ON HOOK'
STATE=255
}
}
(***********************************************************************)
(* IF DIAL TONE IS RECEIVED, DIAL THE NUMBER*) (***********************************************************************)
IF(STATE=3)
{
PUSH[DTMF_CARD,47](*DIAL_TONE*)
{
CANCEL_WAIT 'WAIT FOR DIAL TONE'
SEND_COMMAND DTMF_CARD,'DIAL
NUMBER HERE IN PLACE OF
STATE=4
}
}
(***********************************************************************)
(* | IF | 12 SECONDS PASS | AND | THERE IS NO BUSY | OR RINGING, SEND | *) |
(* | AN | ( ERROR MESSAGE | AND | SHUT DOWN (GO TO | "NO STATE"). | *) |
(***********************************************************************)
IF(STATE=4)
{
STATE=5
WAIT 120 'WAIT FOR RESPONSE TO DIAL'
{
SEND_STRING 0,"'ERROR: NO RESPONSE TO DIAL',13,10"
SEND_COMMAND DTMF_CARD,'ON HOOK'
STATE=255
}
}
(***********************************************************************)
(* | IF THE | DIALED | NUMBER IS | BUSY, SEND A MESSAGE INDICATING | *) | |||
(* | SUCH ( | AND GO | TO STATE 6. IF | THE | DIALED | NUMBER IS RINGING, | *) | |
(* | INDICATE SUCH AND SHUT | DOWN | (GO | TO "NO | STATE"). | *) |
(***********************************************************************)
Continued
| 20 | |
|
|
|