This section describes the sequence of events when Blueworx Voice Response receives an incoming call destined for an application.
Blueworx Voice Response provides error processing to ensure that a call is never left connected in the event of failure. This table shows what Blueworx Voice Response does when a channel process failure occurs at different stages during an incoming call:
Phase |
Error Processing |
---|---|
A, B |
None. |
C |
Send the SL_CALL_ABORT_REQ primitive to the signaling process. |
D |
Play the technical difficulties message to the caller. This message is a prerecorded message included with Blueworx Voice Response, which says “We are experiencing technical difficulties. Please hang up and try again later”. Send the SL_CALL_ABORT_REQ primitive to the signaling process. |
The flows shown in Figure 1 are as follows:
/* Local variables */ SL_HANDLE slHandle ; SL_INDICATION_ST slIndication ; SL_RET_CODE slRC ; int current_called_no ; int current_calling_no ; int current_call_type ; int current_call_origin ; int current_call_info_user1 ; int current_call_info_user2 ; . . . /* Build an SL_CALL_SETUP_IND */ slIndication.id = SLID_INDICATION_ST ; slIndication.iseq = 0 ; slIndication.pidCHP = -1 ; slIndication.Command.id = SL_CALL_SETUP_IND ; slIndication.Parms.call_setup_indication_st.sizetLength = sizeof( slIndication.Parms.call_setup_indication_st ) ; slIndication.Parms.call_setup_indication_st.slCallReference = SL_CALL_REF_NULL ; slIndication.Parms.call_setup_indication_st.iChannelNo = allocated_channel ; slIndication.Parms.call_setup_indication_st.iVpackNo = allocated_vpack ;
slIndication.Parms.call_setup_indication_st.slCallData.called_no = current_called_no; slIndication.Parms.call_setup_indication_st.slCallData.calling_no= current_calling_no; slIndication.Parms.call_setup_indication_st.slCallData.call_type = current_call_type; slIndication.Parms.call_setup_indication_st.slCallData.call_origin= current_call_origin; slIndication.Parms.call_setup_indication_st.slCallData.call_info_user1 = current_call_info_user1 ; slIndication.Parms.call_setup_indication_st.slCallData.call_info_user2 = current_call_info_user2 ;
slRC = sl_send_indication(sl_handle , & slIndication
/* Local variables */ SL_PROC_TYPE sigProc = SL_PROC_USR1 ; int iSequenceNumber ; SL_CONFIRM_ST slConfirm ; SL_REQUEST_ST slRequest ; SL_RET_CODE slRC ; . . . /* Build an SL_CALL_ANSWER_REQ primitive */ slRequest.id = SLID_REQUEST_ST ; slRequest.iseq_no = 0 ; /*will be allocated by sl_send_request*/ slRequest.pidCHP = getpid() ; slRequest.Command.id = SL_CALL_ANSWER_REQ ; slRequest.Parms.call_answer_request_st.sizetLength = sizeof( slRequest.Parms.call_answer_request_st ) ; slRequest.Parms.call_answer_request_st.slCallReference = call_ref_for_this_call; slRequest.Parms.call_answer_request_st.iChannelNo = channel_for_this_call ; slRequest.Parms.call_answer_request_st.iVpack = vpack_for_this_call ; . . .
slRC = sl_send_request( sigProc, & iSequenceNumber, &slRequest ) ;
/* Wait for the reply from the signaling process */ slRC = sl_receive_confirm( sigProc, iSequenceNumber , timeout, &slConfirm ) ; if (slConfirm.Parms.call_answer_confirm_st.ReplyCode != SL_REPLY_SUCCESS) { /* Call was unsuccessful */ . . . } else { /* Call was successful */ . . . } /* end if */
/* local variables */ SL_PROC_TYPE sigProc = SL_PROC_USR1 ; int iSequenceNumber ; SL_REQUEST_ST slRequest ; /* the original SL_CALL_SETUP_REQ */ SL_CONFIRM_ST slConfirm ; SL_RET_CODE slRC ; . . . /* Build an SL_CALL_ANSWER_CNF primitive */ slConfirm.id = SLID_CONFIRM_ST ; slConfirm.iseq_no = slRequest.iseq_no ; slConfirm.pidCHP = slRequest.pidCHP ; slConfirm.Command.id = SL_CALL_ANSWER_CNF ; slConfirm.Parms.call_answer_confirm_st.sizetLength = sizeof( slConfirm.Parms.call_answer_confirm_st ) ; slConfirm.Parms.call_answer_confirm_st.ReplyCode = SL_REPLY_SUCCESS ; slConfirm.Parms.call_answer_confirm_st.slCallReference = slRequest.Parms.call_answer_request_st.slCallReference ; slConfirm.Parms.call_answer_confirm_st.iChannelNo = slRequest.Parms.call_answer_request_st.iChannelNo ; slConfirm.Parms.call_answer_confirm_st.iVpack = slRequest.Parms.call_answer_request_st.iVpackNo ;
slRC = sl_send_confirm( sigProc, &slConfirm ) ;