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

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

called when we get DISCONNECT_IND from CAPI

This method will also send a response to Capi and call CallInterface::callDisconnectedPhysical().

Parameters:
message the received DISCONNECT_IND message
Exceptions:
CapiError Thrown when an invalid message is received
CapiWrongState Thrown when the message is received unexpected (i.e. in a wrong ncci_state or plci_state)
CapiMsgError Thrown by Capi::disconnect_resp()

Definition at line 508 of file connection.cpp.

References call_if, CallInterface::callDisconnectedPhysical(), capi, disconnect_cause, Capi::disconnect_resp(), N0, ncci_state, P0, P1, P2, P3, P4, P5, PACT, plci, plci_state, and Capi::unregisterConnection().

{
      if (ncci_state!=N0 || (plci_state!=P1 && plci_state!=P2 && plci_state!=P3 && plci_state!=P4 && plci_state!=P5 && plci_state!=PACT)) {
            throw CapiWrongState("DISCONNECT_IND received in wrong state","Connection::disconnect_ind()");
      } else {
            if (plci!=DISCONNECT_IND_PLCI(&message))
                  throw CapiError("DISCONNECT_IND received with wrong PLCI","Connection::disconnect_ind()");

            disconnect_cause=DISCONNECT_IND_REASON(&message);

            plci_state=P0;
            capi->disconnect_resp(message.Messagenumber,plci);
            capi->unregisterConnection(plci);

            if (call_if)
                  call_if->callDisconnectedPhysical();
      }
}


Generated by  Doxygen 1.6.0   Back to index