laforge
/
openbts-osmo
Archived
1
0
Fork 0

gsm: fix for "L3 RR GPRS Suspension Request" error

Certain phones with GPRS capabilities will fail to
initiate calls with the following error. No call output
will be present in the Asterisk log.

1265648543.0255 INFO 3073350512 GSML3Message.cpp:162:parseL3: L3 recv RR GPRS Suspension Request
1265648543.0257 NOTICE 3073350512 DCCHDispatch.cpp:144:DCCHDispatcher: UnexpectedMessage

The issue and patch were discussed on the openbts-discuss
mailing list.

"David is right that openBTS does not emit any GPRS beacon,
so the behaviour is triggered from mobile station which
believe that there has been some GPRS before (i.e. in it's
old location area).

Unfortunately openBTS does not simply ignore this L3 RR
GPRS Suspension Request, instead a expected message flow
sequence (i.e. during call setup) is terminated with an
exception.

However we created a small patch against openbts-2.5.3
Lacassine to really ignore the L3 message. Feel free to
distribute it upstream to the community."

The author of the patch is >> Florian.Wolff@Siemens.com <<

According to his statement, O2 XDA Orbit and Motorola
Milestone are working fine with those changes. They had
the same problems before as with the iPhone.

Reported-by: Michael Folz <michael.folz@fh-kl.de>
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
This commit is contained in:
Florian Wolff 2011-05-31 15:33:25 -07:00 committed by Thomas Tsou
parent 3896e7499f
commit 6a8641438a
3 changed files with 45 additions and 14 deletions

View File

@ -601,14 +601,25 @@ void Control::MOCStarter(const L3CMServiceRequest* req, LogicalChannel *LCH)
// Get the Setup message.
// GSM 04.08 5.2.1.2
L3Message* msg_setup = getMessage(LCH);
const L3Setup *setup = dynamic_cast<const L3Setup*>(msg_setup);
if (!setup) {
if (msg_setup) {
LOG(WARN) << "Unexpected message " << *msg_setup;
delete msg_setup;
const L3Setup *setup = NULL;
L3Message* msg_setup = NULL;
while (msg_setup = getMessage(LCH)) {
setup = dynamic_cast<const L3Setup*>(msg_setup);
if (!setup) {
L3GPRSSuspensionRequest *r = dynamic_cast<L3GPRSSuspensionRequest*>(msg_setup);
if (!r) {
if (msg_setup) {
LOG(WARN) << "Unexpected message " << *msg_setup;
delete msg_setup;
}
throw UnexpectedMessage();
} else {
LOG(INFO) << "Ignored L3 RR GPRS Suspension Request.";
if (msg_setup) delete msg_setup;
continue;
}
}
throw UnexpectedMessage();
break;
}
LOG(INFO) << *setup;
// Pull out the L3 short transaction information now.

View File

@ -683,11 +683,21 @@ unsigned Control::resolveIMSI(bool sameLAI, L3MobileIdentity& mobID, LogicalCha
// If the IMSI's not in the table, ASK for it.
LCH->send(L3IdentityRequest(IMSIType));
// FIXME -- This request times out on T3260, 12 sec. See GSM 04.08 Table 11.2.
L3Message* msg = getMessage(LCH);
L3IdentityResponse *resp = dynamic_cast<L3IdentityResponse*>(msg);
if (!resp) {
if (msg) delete msg;
throw UnexpectedMessage();
L3Message* msg = NULL;
L3IdentityResponse *resp = NULL;
while (msg = getMessage(LCH)) {
resp = dynamic_cast<L3IdentityResponse*>(msg);
if (!resp) {
L3GPRSSuspensionRequest *r = dynamic_cast<L3GPRSSuspensionRequest*>(msg);
if (!r) {
if (msg) delete msg;
throw UnexpectedMessage();
} else {
LOG(INFO) << "Ignored GPRS Suspension Request";
}
} else {
break;
}
}
mobID = resp->mobileID();
LOG(INFO) << resp;
@ -721,8 +731,15 @@ void Control::resolveIMSI(L3MobileIdentity& mobileIdentity, LogicalChannel* LCH
L3Message* msg = getMessage(LCH);
L3IdentityResponse *resp = dynamic_cast<L3IdentityResponse*>(msg);
if (!resp) {
if (msg) delete msg;
throw UnexpectedMessage();
L3GPRSSuspensionRequest *r = dynamic_cast<L3GPRSSuspensionRequest*>(msg);
if (!r) {
if (msg) delete msg;
throw UnexpectedMessage();
} else {
LOG(INFO) << "Ignored L3 RR GPRS Suspension Request.";
if (msg) delete msg;
return;
}
}
mobileIdentity = resp->mobileID();
delete msg;

View File

@ -88,6 +88,9 @@ void DCCHDispatchRR(const L3RRMessage* req, LogicalChannel *DCCH)
AssignmentCompleteHandler(dynamic_cast<const L3AssignmentComplete*>(req),
dynamic_cast<TCHFACCHLogicalChannel*>(DCCH));
break;
case L3RRMessage::GPRSSuspensionRequest:
LOG(INFO) << "ignored RR message " << MTI << " on " << DCCH->type();
break;
default:
LOG(NOTICE) << "unhandled RR message " << MTI << " on " << DCCH->type();
throw UnsupportedMessage();