Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement checkIMEI MAP Message #76

Closed
GoogleCodeExporter opened this issue Jun 17, 2015 · 10 comments
Closed

Implement checkIMEI MAP Message #76

GoogleCodeExporter opened this issue Jun 17, 2015 · 10 comments

Comments

@GoogleCodeExporter
Copy link

Implement checkIMEI MAP message (Application Context Name : 
equipmentMngtContext) from International mobile equipment identities management 
services under Mobility Head

Original issue reported on code.google.com by amit.bha...@gmail.com on 6 Jun 2012 at 10:29

@GoogleCodeExporter
Copy link
Author

Hi guys, I did my first patch to implement this message. I know that there is a 
lot of things to do, but I would like that you guys give me a feedback about 
the development. 
Attached is the patch.
Thanks.

Original comment by normande...@gmail.com on 12 Jul 2012 at 11:27

Attachments:

@GoogleCodeExporter
Copy link
Author

The update is more or less good but needs further work.
I made little update to this patch and commited it into a master branch. Please 
synchronize with the git repository.
Not all implemented yet.


1. Let's add to the begin of all new files this note:
/*
 * TeleStax, Open Source Cloud Communications  Copyright 2012.
 * and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

2. I added interfaces for UESBIIu, UESBIIuA and UESBIIuB primitives. They 
should be implemented.

3. Let's instead of something like:
throw new MAPParsingComponentException("IOException when decoding 
CheckImeiRequest: " + e.getMessage(), e,
        MAPParsingComponentExceptionReason.MistypedParameter);
use:
throw new MAPParsingComponentException("IOException when decoding " + 
_PrimitiveName + ": " + e.getMessage(), e,
        MAPParsingComponentExceptionReason.MistypedParameter);

4. I have replaced:
            int tag = ansIS.readTag(); // Is this correct?
            int len = ansIS.readLength(); // Is this correct?
            this.imei = new IMEIImpl(); 
            ((IMEIImpl)this.imei).decodeData(ansIS, len);
with:
            this.imei = new IMEIImpl(); 
            ((IMEIImpl)this.imei).decodeData(ansIS, length);

5. I have replaced:
if (tag != Tag.SEQUENCE || ais.getTagClass() != Tag.CLASS_UNIVERSAL || 
!ais.isTagPrimitive()) {
with
if (tag != Tag.SEQUENCE || ais.getTagClass() != Tag.CLASS_UNIVERSAL || 
ais.isTagPrimitive()) {

6. CheckImeiRequestImpl._decode(): "case 2" code I have moved into "default" 
section because it is OPTIONAL

7. CheckImeiRequestImpl._decode():
I have implemented it as it should be.

8. Let's implement toString() method for all primitive classes

9. Pay attention that Request and Response has different implementations for 
MAP version 2 and 3.
You can see as a good example this one: 
mobility.authentication.SendAuthenticationInfoRequest

10. when you implement CheckImeiResponseImpl._decode() do not use "case 0:", 
"case 1:" because all parameters are optional.
See for example _decode() from callhandling.SendRoutingInformationResponse

11. RequestedEquipmentInfoImpl._decode()
//TODO: I should understand what this mean
if (length == 0 || length > 4)
    throw new MAPParsingComponentException("Error decoding RequestedEquipmentInfoImpl: the RequestedEquipmentInfoImpl field must contain from 1 or 4 octets. Contains: " + length,
            MAPParsingComponentExceptionReason.MistypedParameter);
This means checking the length of encoded BitString in bytes. For example if 
BitString can contain from 2 to 8 bits - it means 1 byte.
Each BitString contains one extra byte that contains info about how many bits 
int thae last byte is valuable.
So in this case the length of BitString data is 1+1 = 2 bytes and the checking 
must be:
if (length == 2 || length > 2)

12. CheckImeiRequestTest: is the data for this trace correct? I guess it is not 
and first two bytes must be absent.
If this is a live WireShark trace, can you please give me an example

Original comment by serg.vet...@gmail.com on 13 Jul 2012 at 5:26

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Issue 8 has been merged into this issue.

Original comment by amit.bha...@gmail.com on 7 Aug 2012 at 12:46

@GoogleCodeExporter
Copy link
Author

This issue was updated by revision f9127e1ad569.

For now is implemented just MAP version 2

On branch checkImei-branch
Changes to be committed:

    modified:   map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/service/mobility/MAPDialogMobility.java
    modified:   map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/service/mobility/imei/CheckImeiRequest.java
    modified:   map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/service/mobility/imei/CheckImeiResponse.java
    modified:   map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/service/mobility/imei/EquipmentStatus.java
    modified:   map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/service/mobility/imei/RequestedEquipmentInfo.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/MAPDialogMobilityImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/MAPServiceMobilityImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiRequestImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiResponseImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/RequestedEquipmentInfoImpl.java
    modified:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiRequestTest.java
    new file:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiResponseTest.java

Original comment by serg.vet...@gmail.com on 9 Aug 2012 at 7:50

@GoogleCodeExporter
Copy link
Author

This issue was updated by revision 7dc03bd0fd88.


On branch checkImei
Changes to be committed:

    modified:   map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/service/mobility/MAPDialogMobility.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/MAPDialogMobilityImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/MAPServiceMobilityImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiRequestImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiResponseImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/RequestedEquipmentInfoImpl.java
    new file:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuAImpl.java
    new file:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuBImpl.java
    new file:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuImpl.java
    modified:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiResponseTest.java

Original comment by serg.vet...@gmail.com on 21 Aug 2012 at 5:50

@GoogleCodeExporter
Copy link
Author

This issue was updated by revision b8b795ab0a28.


On branch checkImei
Changes to be committed:

    modified:   map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/service/mobility/MAPDialogMobility.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/MAPDialogMobilityImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/RequestedEquipmentInfoImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuAImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuBImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuImpl.java

Original comment by serg.vet...@gmail.com on 21 Aug 2012 at 5:50

@GoogleCodeExporter
Copy link
Author

This issue was updated by revision f1736363ec9f.


On branch master
Changes to be committed:

    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiResponseImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuAImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuBImpl.java
    modified:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiRequestTest.java
    modified:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiResponseTest.java
    new file:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/RequestedEquipmentInfoTest.java
    new file:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/UESBIIuTest.java

Original comment by serg.vet...@gmail.com on 21 Aug 2012 at 5:50

@GoogleCodeExporter
Copy link
Author

This issue was updated by revision 7c3c6dcc8253.


On branch checkImei
Changes to be committed:

    modified:   map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/MAPParameterFactory.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/MAPParameterFactoryImpl.java
    modified:   map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiResponseImpl.java
    modified:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/functional/Client.java
    modified:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/functional/MAPFunctionalTest.java
    modified:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiRequestTest.java
    modified:   map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/service/mobility/imei/CheckImeiResponseTest.java

Original comment by normande...@gmail.com on 22 Aug 2012 at 9:59

@GoogleCodeExporter
Copy link
Author

CheckIMEI operation has been generally implemented.

The only thing has not been implemened yet is:
Huawei extantions for IMSI carrying


Original comment by serg.vet...@gmail.com on 28 Aug 2012 at 10:20

@GoogleCodeExporter
Copy link
Author

base/standard IMEI message is implemented

Original comment by normande...@gmail.com on 28 Aug 2012 at 12:31

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant