Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-SS7 Roadmap-Fix

New issue 335 by [email protected]: returnLastResult sendRoutingInfoForSM V3 mwd-Set issue + bugfix
https://code.google.com/p/jss7/issues/detail?id=335

Version: 2.0.0.FINAL

When receiving a sendRoutingInfoForSM V3 from the network and returning the response I've noticed that parameter 0x02 was returned which caused some SMSCs to not send the forwardSM, since they consider the response to be invalid:

Transaction Capabilities Application Part
    end
        Destination Transaction ID
            dtid: 0617ab1f
        components: 1 item
            Component: returnResultLast (2)
                returnResultLast
                    invokeID: 0
                    resultretres
                        opCode: localValue (0)
                            localValue: 45
                        CONSTRUCTOR
                            CONSTRUCTOR Tag
                            Tag: 0x00
                            Length: 24
                            Parameter (0x04)
                                Tag: 0x04
                                Length: 8
                            Data: 72
                            CONSTRUCTOR
                                CONSTRUCTOR Tag
                                Tag: 0x02
                                Length: 9
                                Parameter (0x01)
                                    Tag: 0x01
                                    Length: 7
                                Data: 91
                            Parameter (0x02)
                                Tag: 0x02
                                Length: 1
                            Data: 00

This 0x02 is the mwd-Set parameter and is not valid for V3:

V1:
RoutingInfoForSM-Res::= SEQUENCE {
        imsi                    IMSI,
        locationInfoWithLMSI            [0] LocationInfoWithLMSI,
        mwd-Set         [2] BOOLEAN     OPTIONAL,
        ...}

V3:
RoutingInfoForSM-Res ::= SEQUENCE {
        imsi                    IMSI,
        locationInfoWithLMSI    [0] LocationInfoWithLMSI,
        extensionContainer      [4] ExtensionContainer  OPTIONAL,
        ...}

Diving into the code I found the following piece of code:

SendRoutingInfoForSMResponseImpl.java#237

237        if (this.mwdSet != null)
238            try {
239 asnOs.writeBoolean(Tag.CLASS_CONTEXT_SPECIFIC, _TAG_mwdSet, this.mwdSet);
240            } catch (IOException e) {
241 throw new MAPException("IOException when encoding " + _PrimitiveName + ": " + e.getMessage(), e);
242            } catch (AsnException e) {
243 throw new MAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e);
244            }

Since there are no encapsulating parentheses (i.e. { } ) on the if-statement it will always write the mdw-Set parameter regardless whether this.mwdSet is null or not, simply adding parentheses will fix this bug:

237        if (this.mwdSet != null) {
238            try {
239 asnOs.writeBoolean(Tag.CLASS_CONTEXT_SPECIFIC, _TAG_mwdSet, this.mwdSet);
240            } catch (IOException e) {
241 throw new MAPException("IOException when encoding " + _PrimitiveName + ": " + e.getMessage(), e);
242            } catch (AsnException e) {
243 throw new MAPException("AsnException when encoding " + _PrimitiveName + ": " + e.getMessage(), e);
244            }
245       }

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "mobicents-all-issues-changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to