When an ISDN access connection failure occurs, or the X.25 virtual call is cleared prematurely, the rules of 5.8 shall apply. In addition, the following rules for determining the appropriate cause to be used shall apply in order of decreasing priority:
1) If a Q.931 clearing message or RESTART message is received by the PH during the X.25 data transfer phase, 6.4.1 applies.
2) In general, if an ISDN access connection is rejected by the destination user using Q.931 messages, the X.25 virtual call shall be cleared using a clear indication packet and cause No. 0, DTE originated with diagnostic No. 0, no additional information. Some networks may map some Q.931 causes to the corresponding X.25 causes according to Table 6-5.
3) If a condition exists that prevents the Q.931 SETUP message from being delivered at the user-network interface, the X.25 virtual call shall be cleared using a clear indication packet and a clause shall be selected appropriate to the condition. Table 6-5 shall serve asa guide to selecting an appropriate cause, i.e. the X.25 mapping of the Q.931 cause describing the interface condition shall be used.
4) If the Q.931 SETUP message is sent across the user-network interface, but no response is received prior to the second expiry of timer T303, rule No. 3 applies.
5) If the Q.931 SETUP message is sent across the user-network interface, and a response other than a call rejection is received from a user which results in the clearing of the ISDN access connection at the user-network interface, the X.25 virtual call shall be cleared using a clear indication packet containing cause No. 17, remote procedure error with diagnostic No. 64, call setup, call clearing or registration problem.
6) If an X.25 clear request packet is received from the originating user prior to the delivery of the X.25 incoming call packet to the called user (premature clearing), the PH shall send aclear confirmation packet to the calling user and the access connection shall be treated as follows:
- If the Q.931 SETUP message was associated with the Unconditional notification class of service (see 3.2.3/X.31), the access connection, when and if established, shall be cleared. The Q.931 clearing message shall contain the appropriate cause as described in Table 6-6.
- If the Q.931 SETUP message was associated with the Conditional notification class of service (see 3.2.3/X.31) and there exists at least one terminal which responds positively to the Q.931 SETUP message, then two options are allowed:
a) the access connection is cleared as described for the Unconditional class of service; or
b) the access connection is established and timer T320 is started. Upon expiry of timer T320, the access connection is cleared with cause No. 102, recovery on timer expiry and diagnostic indicating timer T320.