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

void Connection::rejectWaiting ( _cword  reject  )  throw (CapiWrongState, CapiMsgError, CapiExternalError)

Reject a waiting incoming call.

Only use for waiting calls - to disconnect an already connected call use disconnectCall().

Parameters:
reject reject cause, see CAPI spec ch 5.6 for details
Exceptions:
CapiWrongState Thrown if call is not in necessary state (waiting for acception or rejection)
CapiExternalError Thrown if function called with wrong parameters
CapiMsgError Thrown by Capi::connect_resp(). See there.

Definition at line 265 of file connection.cpp.

References capi, connect_ind_msg_nr, Capi::connect_resp(), debug, debug_level, our_call, P2, P5, plci, plci_state, and prefix().

Referenced by DisconnectModule::mainLoop().

{
      if (debug_level >= 1) {
            debug << prefix() << "rejecting with cause " << reject <<  endl;
      }
      if (plci_state!=P2)
            throw CapiWrongState("wrong state for reject","Connection::reject()");
      if (our_call)
            throw (CapiExternalError("can't reject an outgoing call","Connection::rejectWaiting()"));
      if (!reject)
            throw CapiExternalError("reject cause must not be zero","Connection::reject()");

      plci_state=P5;
      capi->connect_resp(connect_ind_msg_nr,plci,reject,0,0,0,NULL,NULL,NULL); // can throw CapiMsgError. Propagate
}


Generated by  Doxygen 1.6.0   Back to index