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

void Connection::disableDTMF (  )  throw (CapiWrongState, CapiMsgError)

Disable indication for DTMF signals.

Exceptions:
CapiWrongState Thrown if Connection isn't up completely (physical & logical)
CapiMsgError Thrown by Capi::facility_req(). See there.

Definition at line 972 of file connection.cpp.

References capi, Capi::facility_req(), PACT, plci, and plci_state.

Referenced by capisuite_disable_DTMF().

{
      if (plci_state!=PACT)
            throw CapiWrongState("unable to disable DTMF because connection is not established","Connection::disableDTMF()");

      _cstruct facilityRequestParameter=new unsigned char[1+2+2+2+1+1];
      int i=0;
      facilityRequestParameter[i++]=2+2+2+1+1; // total length
      facilityRequestParameter[i++]=2; facilityRequestParameter[i++]=0;  // stop DTMF listen
      facilityRequestParameter[i++]=40; facilityRequestParameter[i++]=0;  // default value for tone-duration
      facilityRequestParameter[i++]=40; facilityRequestParameter[i++]=0;  // default value for gap-duration
      facilityRequestParameter[i++]=0; // we don't want to send DTMF now (=empty struct)
      facilityRequestParameter[i++]=0; // no DTMF Characteristics

      try {
            capi->facility_req(plci,1,facilityRequestParameter);
      }
      catch (CapiMsgError) {
            delete[] facilityRequestParameter;
            throw;
      }
      delete[] facilityRequestParameter;
}


Generated by  Doxygen 1.6.0   Back to index