Logger.getInstance().logDebug(pdu.toString(), null, getGatewayId());
InboundMessage msg;
String memLocation = getATHandler().getStorageLocations().substring((ml * 2), (ml * 2) + 2);
if (pdu.isBinary())
{
msg = new InboundBinaryMessage((SmsDeliveryPdu) pdu, memIndex, memLocation);
if (Service.getInstance().getKeyManager().getKey(msg.getOriginator()) != null) msg = new InboundEncryptedMessage((SmsDeliveryPdu) pdu, memIndex, memLocation);
}
else
{
msg = new InboundMessage((SmsDeliveryPdu) pdu, memIndex, memLocation);