opensubscriber
   Find in this group all groups
 
Unknown more information…

a : asn1@asn1.org 14 November 2009 • 12:06AM -0500

[Asn1] Can't understand asn BER decoding
by Angus Comber

REPLY TO AUTHOR
 
REPLY TO GROUP



Hello



I hope this is the correct newsgroup for this type of question.



The following encoding is a CSTA1 MakeCall request (from a log file).

  To the switch:
aPDU-rose : invoke : {
  invokeID 76,
  operationValue local : 10,
  argument {
    callingDevice dialingNumber : "2108",
    calledDirectoryNumber deviceIdentifier : deviceIdentifier :
dialingNumber : "2102",
    extensions {
      privateData {
        {
          manufacturer { 1 3 12 0 999 1 9999 61 },
          data rolmServicePrivateDataType : {
            autoAnswerIndicator attempt
          }
        }
      }
    }
  }
}

16:40:15.597 DataToSwitch 48 bytes
0000-000f 00 2e a1 2c 02 01 4c 02 01 0a 30 24 80 04 32 31
|...,..L...0$..21|
0010-001f 30 38 62 06 80 04 32 31 30 32 7e 14 a1 12 7d 10
|08b...2102~...}.|
0020-002f 06 09 2b 0c 00 87 67 01 ce 0f 3d a1 03 81 01 01
|..+...g...=.....|

The first two bytes can be ignored - they are just the packet length -
not asn.1 - just included for convenience.

My decoding attempt so far appears below:

I am struggling with 2c - I believe it should be invokeid but can't work
out why it is 2c?

ROSE spec:
OPERATION ::= CLASS
{
    &ArgumentType            OPTIONAL,
    &argumentTypeOptional    BOOLEAN OPTIONAL,
    &returnResult            BOOLEAN DEFAULT TRUE,
    &ResultType                OPTIONAL,
    &resultTypeOptional        BOOLEAN OPTIONAL,
    &Errors                    ERROR OPTIONAL,
    &Linked                    OPERATION OPTIONAL,
    &synchronous            BOOLEAN DEFAULT FALSE,
    &idempotent                BOOLEAN DEFAULT FALSE,
    &alwaysReturns            BOOLEAN DEFAULT TRUE,
    &InvokePriority            Priority OPTIONAL,
    &ResultPriority            Priority OPTIONAL,
    &operationCode            Code UNIQUE OPTIONAL
}
WITH SYNTAX
{
    [ARGUMENT                &ArgumentType    [OPTIONAL
&argumentTypeOptional]]
    [RETURN RESULT            &returnResult]
    [RESULT                    &ResultType        [OPTIONAL
&resultTypeOptional]]
    [ERRORS                    &Errors]
    [LINKED                    &Linked]
    [SYNCHRONOUS            &synchronous]
    [IDEMPOTENT                &idempotent]
    [ALWAYS RESPONDS        &alwaysReturns]
    [INVOKE PRIORITY        &InvokePriority]
    [RESULT PRIORITY        &ResultPriority]
    [CODE                    &operationCode]
}


It is CSTA I encoding.  Relevant bits I think are:
CSTA-msg ::= CHOICE
{
        aPDU-acse        ACSE-apdu,
        aPDU-rose        RoseAPDU
}


RoseAPDU ::= CHOICE
{
        invoke          [1] IMPLICIT InvokePDU,
        retResult       [2] IMPLICIT ReturnResultPDU,
        retError        [3] IMPLICIT ReturnErrorPDU,
        reject          [4] IMPLICIT RejectPDU
}

-- APDU types

InvokePDU      ::= SEQUENCE
{
        invokeID        InvokeIDType,
        linkedID        [0] IMPLICIT InvokeIDType     OPTIONAL,
        operationValue  OPERATION.&operationCode ({CSTA1Operations}),
        argument        OPERATION.&ArgumentType ({CSTA1Operations}
{@operationValue} )
}


InvokeIDType            ::= INTEGER (0..65535)

Using BER.

Can someone please explain to me how we get 2c?

a1 - context specific, constructed, 1 - CSTA-msg either 0 for ACSE or 1
for ROSE
2c - constructed, tag 12 - invokeid tag? operationCode is item 12 in
OPERATION ::= CLASS (zero based)?
02 - INTEGER
01 - length 1 byte
4c - 76 - invokeid
02 - INTEGER
01 - length 1 byte
0a - 10 - MakeCall
30 - SEQUENCE?
24 - 36 bytes length (to end of msg)
80 - Indefinite length - ie series of TLV's follow.
04 - length 4 bytes
32 - '2'
31 - '1'
30 - '0'
38 - '8'
62 - ??
06 - ??
80 - Indefinite length - ie series of TLV's follow.
04 - length 4 bytes
32 - '2'
31 - '1'
30 - '0'
32 - '2'
7e - APPLICATION
14 - length 20 bytes - rest of msg
a1 -
12 -
7d -
10 -
06 -
09 -
2b -
0c -
00 -
87 -
67 -
01 -
ce -
0f -
3d -
a1 -
03 -
81 -
01 -
01 -



-------------------------------------------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain confidential and proprietary information of Alcatel-Lucent and/or its affiliated entities. Access by the intended recipient only is authorized. Any liability arising from any party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately, destroy the original transmission and its attachments and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and any attachments belongs to Alcatel-Lucent and/or its affiliated entities.


Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.