Successful incoming call (common channel signaling)

This section describes the sequence of events when Blueworx Voice Response receives an incoming call destined for an application.

Figure 1. Common channel signaling process: successful incoming call
The graphic is a very simplified representation of the process described in detail in the next section. The graphic shows the phases that are explained there.

Error processing

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.

Description of flows

The flows shown in Figure 1 are as follows:

  1. A: The network signals the presence of an incoming call. The exact method depends on the signaling protocol in use.
  2. The signaling process receives this notification. The signaling process then creates an SL_CALL_SETUP_IND primitive:
    /* 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 ;
    
  3. The signaling process adds the call information to the SL_CALL_SETUP_IND primitive:
    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 ;
  4. B: The signaling process reports the incoming call to Blueworx Voice Response by sending the SL_CALL_SETUP_IND primitive:
    slRC = sl_send_indication(sl_handle , & slIndication 
  5. When the sl_send_indication() completes, the signaling process can determine the allocated call reference by examining the call reference parameter in the primitive. The channel process retrieves the called and calling numbers.
  6. The channel process starts the application state table, based on the called or the calling number.
  7. Once the application’s state table is prepared to answer the call, it issues the AnswerCall state table action.
  8. To answer a call using a common channel signaling process, the channel process creates an SL_CALL_ANSWER_REQ primitive:
    /* 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 ;
     .
     .
     .
     
  9. C: The channel process then sends the SL_CALL_ANSWER_REQ primitive to the signaling process:
    slRC = sl_send_request( sigProc, & iSequenceNumber, &slRequest ) ;
  10. The channel process then waits on a reply from the signaling process:
    /* 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 */
     
  11. The signaling process receives the SL_CALL_ANSWER_REQ primitive. This is its cue to inform the network that Blueworx Voice Response wants to accept the call. The way the signaling process implements this command is defined by the signaling protocol it implements. For example, a signaling process implementing the Telephone User Part protocol would send the Answer message.
  12. Once the network connects the call, and voice traffic may be sent and received on the channel, then the signaling process should tell the requesting channel process.
  13. D: The signaling process creates an SL_CALL_ANSWER_CNF primitive:
    • If the call is not connected successfully, the ReplyCode field indicates the error.
    • If the call is connected successfully, the ReplyCode is set to SL_REPLY_SUCCESS:
      /* 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 ;
       
  14. The signaling process then sends the SL_CALL_ANSWER_CNF primitive to the channel process:
    slRC = sl_send_confirm( sigProc, &slConfirm ) ;
  15. The channel process has been waiting for the reply to its request, by using the sl_receive_confirm() subroutine, which now completes.
  16. The channel process maps the ReplyCode to a result, which it returns to the state table. The AnswerCall action returns with a successful result.
  17. The state table can now use the channel.