# in_calls_behaviour field

The in_calls_behaviour field in ISDN_PROTOCOL_PARMS_Q931CC determines how an incoming call is handled by the ISDN protocol stack. Refer to isdnparm.h for more details.

The bit settings in this field regarding call control actions (CC_SEND_ALERT_IN, CC_SEND_CALL_PROC_RQ, CC_DATA_ALERT_RQ, CC_VOICE_ALERT_RQ, CC_DATA_CONN_RS, and CC_VOICE_CONN_RS) must not be set when the protocol stack is started in channelized stack mode.

Each bit set by the value in this field determines a particular element of the ISDN protocol stack's behavior. The values are defined as follows:

Value | Description
--- | ---
-- | Reserved for compatibility with former auto_answer field values (ON/OFF).
CC_SEND_ALERT_IN | Determines if ACU_ALERT_IN is automatically sent after ACU_CONN_IN. If this bit is set, the stack generates an ACU_ALERT_IN after sending an ACU_CONN_IN.
CC_SEND_CALL_PROC_RQ | Determines if CALL PROCEEDING is automatically sent on incoming calls. If this bit is set, the ACU sends CALL PROCEEDING on an incoming call. Otherwise, the application must send ACU_CALL_PROC_RQ for CALL PROCEEDING. (This message is optional.)
CC_DATA_ALERT_RQ | Determines if ALERTING is automatically sent when a NOT TELEPHONY call arrives. If this bit is set, the stack sends ALERTING on a NOT TELEPHONY incoming call.
CC_VOICE_ALERT_RQ | Determines if ALERTING is automatically sent when a TELEPHONY call arrives. If this bit is set, the stack sends ALERTING on a TELEPHONY incoming call.
CC_DATA_CONN_RS | Determines if NOT TELEPHONY incoming calls are automatically answered. If this bit is set, the stack sends CONNECT on NOT TELEPHONY incoming calls.
CC_VOICE_CONN_RS | Determines if TELEPHONY incoming calls are automatically answered. If this bit is set, the stack sends CONNECT on TELEPHONY incoming calls.
CC_TRANSPARENT_OVERLAP_RCV | If this bit is set, the stack sends an ACU_CONN_IN to the application even if not all digits have arrived (for example, the sending complete IE is not present). Additional incoming digits arrive in ACU_DIGIT_IN messages. If this bit is not set, then the ACU waits for at least nb_digits_to_route digits to arrive before sending an ACU_CONN_IN message to the application. Additional digits coming in INFORMATION messages are ignored.
CC_TRUNCATE_NB | Meaningful only in buffered Overlap Receiving mode. If this bit is set, the called number is truncated to the number of digits specified by the nb_digits_to_route configuration field.
CC_CALLED_NB_ABSENT_MATCH | If this bit is set, a received incoming call with no called number will match a list with a programmed address.
CC_CALL_WAITING | If this bit is set, the stack supports the call-waiting supplementary service. When this service is active, an incoming call received with a channel ID indicating No-channel will be accepted by the stack. If this bit is not set, then the stack rejects these calls with the appropriate cause value (#34 in most cases).
CC_DISABLE_SUPPLEMENTARY_SERVICES | If this bit is set, supplementary services are disabled. Supplementary service extended data structures in the extended data area are ignored.
CC_SET_CHAN_ID | If this bit is set, the stack forces the channel ID information element to be present in the first message in response to a SETUP even if the specifications do not consider this mandatory.
CC_BEHAVIOUR_NIL | If this bit is set to 1 and all other bits in in_calls_behaviour are set to 0, no messages are automatically sent by the stack in response to an incoming call. The application must build and send all messages. If any other bits are set, this bit is ignored. The stack sends all specified messages.

If in_calls_behaviour is set to 0 or not set at all, the ISDN protocol stack behaves in one of the following ways, depending upon how the partner_equipment argument is set in the call to isdnStartProtocol:

If partner_equipment is set to: | The stack behaves as if:
--- | ---
EQUIPMENT_TE | CC_SEND_CALL_PROC_RQ is set; all other bits cleared.
EQUIPMENT_NT | CC_VOICE_ALERT_RQ and CC_DATA_ALERT_RQ are set; all other bits cleared.

When using the 4ESS variant, all three bits are set, both on the TE side and NT side.