bedweather / jss7

Automatically exported from code.google.com/p/jss7
0 stars 0 forks source link

MAP enum BearerServiceCodeValue encoding wrong? #324

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. See 
org.mobicents.protocols.ss7.map.api.service.mobility.subscriberManagement.Bearer
ServiceCodeValue

What is the expected output? What do you see instead?
Should match MAP protocol specification in TS 29.002

What version of the product are you using? On what operating system?
org.mobicents.protocols.ss7.map 2.0.0.FINAL (although current head version 
looks the same).

Please provide any additional information below.

The values defined in the enum do not match those in the MAP protocol spec, 
there seems to be some attempt to manipulate the code value (using bit 
shifting), but I don't believe that after this has been done the enum 
definitions do not use the correct values.

An example:
From TS 29.002 defines Synchronous 1.2kbps as:
dataCDS-1200bps BearerServiceCode ::= '00011010'B

Put this value (0x1A) into
public static BearerServiceCodeValue getInstance(int code) {
:
code = ((code & 0x78) << 1) | (code & 0x07);

means code = 0x32

which then matches Synchronous2_4kbps(0x32) in the enum not 
Synchronous1_2kbps(0x31) as I think it should.

Other issues are that many of the values defined in TS 29.002 don't seem
to map to anything e.g. the Compound Bearer Service Groups such as 
allDataCircuitAsynchronous etc, also things like allDataCDA-Services map to 
AsynchronousGeneralBearerService where as I would have thought general-dataCDA 
would have mapped to this value?

Perhaps it would be simpler just to define the enum values to be the values 
defined in TS 29.002 without the bit shifting (as has been done with enum 
TeleserviceCodeValue)

Original issue reported on code.google.com by ataylordev on 12 Oct 2013 at 6:29