MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / startDTMF

Method startDTMF

SIP/SIPBase.cpp:1067–1088  ·  view source on GitHub ↗

Return true if ok, false on failure.

Source from the content-addressed store, hash-verified

1065
1066// Return true if ok, false on failure.
1067bool SipRtp::startDTMF(char key)
1068{
1069 LOG (DEBUG) << key <<sbText();
1070 if (getSipState()!=Active) return false;
1071 if (get_rtp_tev_type(key) < 0){
1072 LOG(WARNING) << "DTMF (using RFC-2833) sent invalid key, numeric value="<<(int) key;
1073 return false;
1074 }
1075 // (pat) It is ok to start a new DTMF before the old one ended.
1076 mDTMF = key;
1077 mDTMFDuration = 0;
1078 mDTMFStartTime = mTxTime;
1079 mDTMFEnding = 0;
1080
1081 if (! txDtmf()) {
1082 // Error? Turn off DTMF sending.
1083 LOG(WARNING) << "DTMF RFC-2833 failed on start." <<sbText();
1084 mDTMF = 0;
1085 return false;
1086 }
1087 return true;
1088}
1089
1090void SipRtp::stopDTMF()
1091{

Callers 1

machineRunStateMethod · 0.80

Calls 1

get_rtp_tev_typeFunction · 0.85

Tested by

no test coverage detected