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

void Connection::connectWaiting ( service_t  desired_service,
string  faxStationID = "",
string  faxHeadline = "" 
) throw (CapiWrongState,CapiExternalError,CapiMsgError)

Accept a waiting incoming call.

Will update the saved service to the desired_service. Calls Capi::connect_resp().

desired_service to determine with which service we should connect (e.g. VOICE or FAXG3)
faxStationID my fax station ID - only needed in FAXG3 mode
faxHeadline my fax headline - only needed in FAXG3 mode, encoded in ISO8859-1
CapiWrongState Thrown if call is not in necessary state (waiting for acception or rejection)
CapiExternalError Thrown by buildBconfiguration and if method is called with an outgoing call
CapiMsgError Thrown by Capi::connect_resp(). See there.

Definition at line 224 of file connection.cpp.

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

Referenced by ConnectModule::mainLoop().

      if (debug_level >= 1) {
            debug << prefix() << "accepting with service " << desired_service <<  endl;
      if (debug_level >= 2) {
            debug << prefix() << "using faxStationID " << faxStationID << " faxHeadline " << faxHeadline <<  endl;
      if (plci_state!=P2)
            throw CapiWrongState("wrong state for connectWaiting","Connection::connectWaiting()");

      if (our_call)
            throw (CapiExternalError("can't accept an outgoing call","Connection::connectWaiting()"));

      _cstruct B1config=NULL, B2config=NULL, B3config=NULL;
      _cword B1proto,B2proto,B3proto;

      try {
            buildBconfiguration(plci & 0xff, desired_service, faxStationID, faxHeadline, B1proto, B2proto, B3proto, B1config, B2config, B3config);

            capi->connect_resp(connect_ind_msg_nr,plci,0,B1proto,B2proto,B3proto,B1config, B2config, B3config);
      } catch (...) {
            if (B1config)
                  delete[] B1config;
            if (B2config)
                  delete[] B2config;
            if (B3config)
                  delete[] B3config;
      if (B1config)
            delete[] B1config;
      if (B2config)
            delete[] B2config;
      if (B3config)
            delete[] B3config;

Generated by  Doxygen 1.6.0   Back to index