Fixes #499 in public. If our ACK was missed, the switch would resend an OK and we didn't respond to it. We do now.

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3237 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
Kurtis Heimerl
2012-02-25 21:46:49 +00:00
parent ec026dfe2e
commit 7244fa7271
2 changed files with 17 additions and 8 deletions

View File

@@ -915,8 +915,6 @@ void Control::MOCController(TransactionEntry *transaction, GSM::TCHFACCHLogicalC
transaction->MOCInitRTP();
transaction->MOCSendACK();
// FIXME -- We need to watch for a repeated OK in case the ACK got lost.
// Get the Connect Acknowledge message.
while (transaction->GSMState()!=GSM::Active) {
LOG(DEBUG) << "MOC Q.931 state=" << transaction->GSMState();

View File

@@ -696,14 +696,25 @@ SIPState SIPEngine::MTDCheckBYE()
osip_message_t * msg = gSIPInterface.read(mCallID);
if ((msg->sip_method!=NULL) && (strcmp(msg->sip_method,"BYE")==0)) {
LOG(DEBUG) << "found msg="<<msg->sip_method;
saveBYE(msg,false);
mState = MTDClearing;
if (msg->sip_method) {
if (strcmp(msg->sip_method,"BYE")==0) {
LOG(DEBUG) << "found msg="<<msg->sip_method;
saveBYE(msg,false);
mState = MTDClearing;
}
//repeated ACK, send OK
//pretty sure this never happens, but someone else left a fixme before... -kurtis
if (strcmp(msg->sip_method,"ACK")==0) {
LOG(DEBUG) << "Not responding to repeated ACK. FIXME";
}
}
// FIXME -- Check for repeated ACK and send OK if needed.
// FIXME -- Check for repeated OK and send ACK if needed.
//repeated OK, send ack
//MOC because that's the only time we ACK
if (msg->status_code==200){
LOG(DEBUG) << "Repeated OK, resending ACK";
MOCSendACK();
}
osip_message_free(msg);
return mState;