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

Method stopDTMF

SIP/SIPBase.cpp:1090–1113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1088}
1089
1090void SipRtp::stopDTMF()
1091{
1092 //false means not start
1093 /***
1094 mblk_t *m = rtp_session_create_telephone_event_packet(mSession,false);
1095 //volume 10 for some magic reason, end is true
1096 int code = rtp_session_add_telephone_event(mSession,m,get_rtp_tev_type(mDTMF),true,10,mDTMFDuration);
1097 int bytes = rtp_session_sendm_with_ts(mSession,m,mDTMFStartTime);
1098 mDTMFDuration += 160;
1099 LOG (DEBUG) << "DTMF RFC-2833 sending " << mDTMF << " " << mDTMFDuration <<sbText();
1100 // Turn it off if there's an error.
1101 if (code || bytes <= 0)
1102 ***/
1103 if (!mDTMF) {
1104 LOG(WARNING) << "stop DTMF command received after DTMF ended.";
1105 return;
1106 }
1107 mDTMFEnding = 1;
1108 if (! txDtmf()) {
1109 LOG(ERR) << "DTMF RFC-2833 failed at end" <<sbText();
1110 mDTMF = 0;
1111 }
1112
1113}
1114
1115
1116// send frame in the uplink direction.

Callers 1

machineRunStateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected