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

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

Enable indication for DTMF signals.

Normally you get no indication when the CAPI recognizes a DTMF signal. With enableDTMF() you enable these indications. DTMF signals will be saved locally and signalled by CallInterface::gotDTMF(). You can read the saved DTMF signales with getDTMF().

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

Definition at line 946 of file connection.cpp.

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

Referenced by capisuite_enable_DTMF().

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

      _cstruct facilityRequestParameter=new unsigned char[1+2+2+2+1+3];
      int i=0;
      facilityRequestParameter[i++]=2+2+2+1+3; // total length
      facilityRequestParameter[i++]=1; facilityRequestParameter[i++]=0;  // start 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++]=2; // now let's start substruct DTMF Characteristics (length)
      facilityRequestParameter[i++]=0; facilityRequestParameter[i++]=0;  // default value for DTMF Selectivity

      try {
      catch  (CapiMsgError) {
            delete[] facilityRequestParameter;
      delete[] facilityRequestParameter;

Generated by  Doxygen 1.6.0   Back to index