# Call collision

Call collision (also called glare) can occur when a call setup request and an incoming call occur on the same B channel at the same time. In this case, the terminal side must cancel its outgoing call and accept the incoming call.

Call collision can take place at the stack or at the network level. Call collision at the stack occurs when a SETUP message is received by the stack directly before it receives an ACU_CONN_RQ from the application. The following illustration shows the sequence of messages sent between the ACU and the application in this situation:

The ACU_CLEAR_CO message is relative to the ACU_CONN_RQ sent by the application. The return_code field in the primitive's message data is set to ACURC_INCOMING, meaning that the outgoing call is cleared due to a call collision. No answer is sent by the application in response to this ACU_CLEAR_CO message.

Call collision at the network level occurs when the stack sends a SETUP message to the trunk directly before receiving a SETUP message from the trunk. If the stack is configured as terminal equipment, it abandons its call setup attempt and receives the incoming call. The following illustration shows the sequence of messages exchanged in this situation:

If the ISDN stack is configured as network equipment, it continues with its call setup attempt, signaling the trunk to release the incoming call. The following illustration shows the sequence of messages exchanged in this situation:

In any situation, if the application sends an ACU primitive to the stack while the stack is sending an ACU_CLEAR_CO message, the ISDN stack resends an ACU_CLEAR_CO message. In this case, the application receives two ACU_CLEAR_CO primitives.