Logo Search packages:      
Sourcecode: capisuite version File versions  Download package

void Connection::connect_active_ind ( _cmsg &  message  )  throw (CapiWrongState, CapiMsgError) [protected]

Called when we get CONNECT_ACTIVE_IND from CAPI.

This method will also send a response to Capi and initiate a B3 connection if necessary.

Parameters:
message the received CONNECT_ACTIVE_IND message
Exceptions:
CapiWrongState Thrown when the message is received unexpected (i.e. in a wrong plci_state)
CapiMsgError Thrown by Capi::connect_b3_req

Definition at line 363 of file connection.cpp.

References capi, Capi::connect_active_resp(), Capi::connect_b3_req(), error, N0, N01, ncci_state, P1, P4, PACT, plci, plci_state, and prefix().

{
      if (plci_state!=P4 && plci_state!=P1) {
            throw CapiWrongState("CONNECT_ACTIVE_IND received in wrong state","Connection::connect_active_ind()");
      } else {
            try {
                  capi->connect_active_resp(message.Messagenumber,plci);
            }
            catch (CapiMsgError e) {
                  error << prefix() << "WARNING: error detected when trying to send connect_active_resp. Message was:" << e << endl;
            }

            if (plci_state==P1) { // this is an outgoing call, so we have to initiate B3 connection
                  ncci_state=N01;
                  try {
                        capi->connect_b3_req(plci);
                  }
                  catch (CapiMsgError) {
                        plci_state=PACT;
                        ncci_state=N0;
                        throw;  // this is critical, so propagate
                  }
            }
            plci_state=PACT;
      }
}


Generated by  Doxygen 1.6.0   Back to index