It is useful to allow the signaling interface primitives to be examined either as a whole (for example, SL_CALL_TERMINATE_IND), or by looking at the generic name (for example, SL_CALL_ANSWER) and specific name (for example, SL_TAG_REQUEST).
typedef union { SL_PRIMITIVE_ID id ; struct { ushort_t generic ; ushort_t specific ; } name; } SL_PRIMITIVE_TYPE, *PSL_PRIMITIVE_TYPE ;
When a signaling process receives a request primitive that it does not recognize, it should create a corresponding confirm primitive with the ReplyCode field set to SL_REPLY_NOT_IMPLEMENTED. The signaling process should return the confirm primitive to Blueworx Voice Response and take no further action on the request. This is to allow for new primitives to be added to the signaling interface, without affecting the operation of existing signaling processes. The signaling process must support the primitives defined as mandatory in Signaling interface primitives.
The following code fragment may prove useful. In the example below the sizetLength and ReplyCode fields are set using the call_setup_confirmvariant of the SL_CONFIRM_PARMS_ST union. It does not matter which variant of the union is used, since the ReplyCode field is always in the same place in the structure.
SL_REQUEST_ST Request; SL_CONFIRM_ST Confirm; switch( Request.id ) { case ... : ... default: /* A signaling interface primitive that this signaling process */ /* does not recognize. */ Confirm.id = SLID_CONFIRM_ST ; Confirm.iseq_no = Request.iseq_no ; Confirm.pidCHP = Request.pidCHP ; Confirm.Command.name.generic = Request.Command.name.generic ; Confirm.Command.name.specific = SL_TAG_CONFIRM ; Confirm.Parms.call_setup_confirm_st.sizetLength = sizeof(struct _call_setup_confirm_st) ; Confirm.Parms.call_setup_confirm_st.ReplyCode = SL_REPLY_NOT_IMPLEMENTED ; } slRC = sl_send_confirm( slHandle , & Confirm ) ;