⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 media-gateway-control-v1.asn

📁 OTP是开放电信平台的简称
💻 ASN
📖 第 1 页 / 共 2 页
字号:
-- This ASN.1 spec has been extracted from the Megaco/H.248 spec-- http://www.ietf.org/internet-drafts/draft-ietf-megaco-merged-01.txt---- o Removed stuff named nonStandard-- o Major enhancements of the indentation has been performed.---- Hakan Mattsson <hakan@cslab.ericsson.se>---- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ---- ANNEX A: BINARY ENCODING OF THE PROTOCOL (NORMATIVE) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ----     -- This Annex specifies the syntax of messages using the notation -- defined in ASN.1 [ITU-T Recommendation X.680 (1997): Information -- Technology - Abstract Syntax Notation One (ASN.1) - Specification of -- basic notation.]. Messages shall be encoded for transmission by -- applying the basic encoding rules specified in [ITU-T Recommendation -- X.690(1994) Information Technology - ASN.1  Encoding Rules: -- Specification of Basic Encoding Rules (BER)].  --     -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ---- A.1 Coding of wildcards -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ----     -- The use of wildcards ALL and CHOOSE is allowed in the protocol.  -- This allows a MGC to partially specify Termination IDs and let the -- MG choose from the values that conform to the partial specification.  -- Termination IDs may encode a hierarchy of names.  This hierarchy is -- provisioned. For instance, a TerminationID may consist of a trunk -- group, a trunk within the group and a circuit.  Wildcarding must be -- possible at all levels.  The following paragraphs explain how this -- is achieved. --  -- The ASN.1 description uses octet strings of up to 8 octets in length -- for Termination IDs.  This means that Termination IDs consist of at -- most 64 bits.  A fully specified Termination ID may be preceded by a -- sequence of wildcarding fields.  A wildcarding field is one octet in -- length.  Bit 7 (the most significant bit) of this octet specifies -- what type of wildcarding is invoked:  if the bit value equals 1, -- then the ALL wildcard is used; if the bit value if 0, then the -- CHOOSE wildcard is used.  Bit 6 of the wildcarding field specifies -- whether the wildcarding pertains to one level in the hierarchical -- naming scheme (bit value 0) or to the level of the hierarchy -- specified in the wildcarding field plus all lower levels (bit value -- 1).  Bits 0 through 5 of the wildcarding field specify the bit -- position in the Termination ID at which the starts. --  -- We illustrate this scheme with some examples.  In these examples, -- the most significant bit in a string of bits appears on the left -- hand side. --  -- Assume that Termination IDs are three octets long and that each -- octet represents a level in a hierarchical naming scheme.  A valid -- Termination ID is --      00000001 00011110 01010101. --  -- Addressing ALL names with prefix 00000001 00011110 is done as -- follows: --      wildcarding field: 10000111 --      Termination ID: 00000001 00011110 xxxxxxxx. --  -- The values of the bits labeled "x" is irrelevant and shall be -- ignored by the receiver. -- -- Indicating to the receiver that is must choose a name with 00011110 -- as the second octet is done as follows: --      wildcarding fields: 00010111 followed by 00000111 --      Termination ID: xxxxxxxx 00011110 xxxxxxxx. --  -- The first wildcard field indicates a CHOOSE wildcard for the level -- in the naming hierarchy starting at bit 23, the highest level in our -- assumed naming scheme.  The second wildcard field indicates a CHOOSE -- wildcard for the level in the naming hierarchy starting at bit 7, -- the lowest level in our assumed naming scheme. --  -- Finally, a CHOOSE-wildcarded name with the highest level of the name -- equal to 00000001 is specified as follows: --      wildcard field: 01001111 --      Termination ID: 0000001 xxxxxxxx xxxxxxxx . --  -- Bit value 1 at bit position 6 of the first octet of the wildcard -- field indicates that the wildcarding pertains to the specified level -- in the naming hierarchy and all lower levels. --  -- Context IDs may also be wildcarded.  In the case of Context IDs, -- however, specifying partial names is not allowed.  Context ID 0x0  -- SHALL be used to indicate the NULL Context, Context ID 0xFFFFFFFE -- SHALL be used to indicate a CHOOSE wildcard, and Context ID -- 0xFFFFFFFF SHALL be used to indicate an ALL wildcard. --  -- TerminationID 0xFFFFFFFFFFFFFFFF SHALL be used to indicate the ROOT -- Termination. --     -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ---- Digit maps and path names -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ----  -- From a syntactic viewpoint, digit maps are strings with syntactic -- restrictions imposed upon them.  The syntax of valid digit maps is -- specified in ABNF [RFC 2234].  The syntax for digit maps presented -- in this section is for illustrative purposes only. The definition of -- digitMap in Annex B takes precedence in the case of differences -- between the two. --  -- digitMap = (digitString / LWSP "(" LWSP digitStringList LWSP ")" -- LWSP) -- digitStringList = digitString *( LWSP "/" LWSP digitString ) -- digitString = 1*(digitStringElement) -- digitStringElement = digitPosition [DOT] -- digitPosition = digitMapLetter / digitMapRange -- digitMapRange = ("x" / LWSP "[" LWSP digitLetter LWSP "]" LWSP) -- digitLetter = *((DIGIT "-" DIGIT) /digitMapLetter) -- digitMapLetter = DIGIT               ;digits 0-9 --         / %x41-4B / %x61-6B             ;a-k and A-K --         / "L"   / "S"                   ;Inter-event timers --                                         ;(long, short) --         / "Z"                           ;Long duration event -- DOT = %x2E ; "." -- LWSP = *(WSP / COMMENT / EOL) -- WSP = SP / HTAB -- COMMENT = ";" *(SafeChar / RestChar / WSP) EOL -- EOL = (CR [LF]) / LF -- SP = %x20 -- HTAB = %x09 -- CR = %x0D -- LF = %x0A -- SafeChar = DIGIT / ALPHA / "+" / "-" / "&" / "!" / "_" / "/" / --  "'" / "?" / "@" / "^" / "`" / "~" / "*" / "$" / "\" / -- "(" / ")" / "%" / "." -- RestChar = ";" / "[" / "]" / "{" / "}" / ":" / "," / "#" / --                 "<" / ">" / "=" / %x22 -- DIGIT = %x30-39                      ; digits 0 through 9 -- ALPHA = %x41-5A / %x61-7A    ; A-Z, a-z -- A path name is also a string with syntactic restrictions imposed -- upon it.  The ABNF production defining it is copied from Annex B. --  -- PathName = NAME *(["/"] ["*"] ["@"] (ALPHA / DIGIT)) ["*"] -- NAME = ALPHA *63(ALPHA / DIGIT / "_" )---- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ---- A.2 ASN.1 syntax specification -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ----     -- This section contains the ASN.1 specification of the H.248 protocol -- syntax. --  -- NOTE - In case a transport mechanism is used that employs -- application level framing, the definition of Transaction below -- changes.  Refer to the annex defining the transport mechanism for -- the definition that applies in that case. --  -- NOTE - The ASN.1 specification below contains a clause defining -- TerminationIDList as a sequence of TerminationIDs.  The length of -- this sequence SHALL be one, except possibly when used in -- contextAuditResult. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- MEDIA-GATEWAY-CONTROL-v1DEFINITIONS AUTOMATIC TAGS ::= BEGIN  MegacoMessage ::= SEQUENCE {      authHeader                 AuthenticationHeader OPTIONAL,      mess                       Message } AuthenticationHeader ::= SEQUENCE {      secParmIndex               SecurityParmIndex,      seqNum                     SequenceNum,      ad                         AuthData }  SecurityParmIndex ::= OCTET STRING(SIZE(4))  SequenceNum       ::= OCTET STRING(SIZE(4))  AuthData          ::= OCTET STRING (SIZE (12..32))  Message ::= SEQUENCE {        version         INTEGER(0..99),         -- The version of the protocol defined here is equal to 1.              mId             MId,    -- Name/address of message originator              messageBody             CHOICE              {                      messageError    ErrorDescriptor,                      transactions    SEQUENCE OF Transaction              },         ... }  MId ::= CHOICE {         ip4Address              IP4Address,         ip6Address              IP6Address,         domainName              DomainName,         deviceName              PathName,         mtpAddress              OCTET STRING(SIZE(2..4)),         -- Addressing structure of mtpAddress:         --        15                0         --        |  PC        | NI |         --           14 bits    2 bits       ... }  DomainName ::= SEQUENCE {         name                    IA5String,         -- The name starts with an alphanumeric digit followed by a         -- sequence of alphanumeric digits, hyphens and dots.  No two         -- dots shall occur consecutively.         portNumber              INTEGER(0..65535) OPTIONAL } IP4Address ::= SEQUENCE {         address                 OCTET STRING (SIZE(4)),         portNumber              INTEGER(0..65535) OPTIONAL }  IP6Address ::= SEQUENCE {         address                 OCTET STRING (SIZE(16)),         portNumber              INTEGER(0..65535) OPTIONAL }  PathName ::= IA5String(SIZE (1..64)) -- See section A.3  Transaction ::= CHOICE {         transactionRequest      TransactionRequest,         transactionPending      TransactionPending,         transactionReply        TransactionReply,         transactionResponseAck  TransactionResponseAck,              -- use of response acks is dependent on underlying transport         ... }  TransactionId ::= INTEGER(0..4294967295)  -- 32 bit unsigned integer  TransactionRequest ::= SEQUENCE {         transactionId           TransactionId,         actions                 SEQUENCE OF ActionRequest,         ... }  TransactionPending ::= SEQUENCE {         transactionId           TransactionId,         ... }  TransactionReply ::= SEQUENCE {         transactionId           TransactionId,         immAckRequired          NULL OPTIONAL,        transactionResult       CHOICE         {               transactionError   ErrorDescriptor,              actionReplies      SEQUENCE OF ActionReply         },         ... } TransactionResponseAck ::= SEQUENCE OF TransactionAckTransactionAck ::= SEQUENCE {         firstAck                TransactionId,         lastAck                 TransactionId OPTIONAL }  ErrorDescriptor ::= SEQUENCE {         errorCode               ErrorCode,         errorText               ErrorText OPTIONAL }  ErrorCode ::= INTEGER(0..65535) -- See section 13 for IANA considerations w.r.t. error codes  ErrorText ::= IA5String  ContextID ::= INTEGER(0..4294967295)  -- Context NULL Value:    0 -- Context CHOOSE Value: 4294967294 (0xFFFFFFFE)  -- Context ALL Value:    4294967295 (0xFFFFFFFF)   ActionRequest ::= SEQUENCE {         contextId               ContextID,         contextRequest          ContextRequest OPTIONAL,         contextAttrAuditReq     ContextAttrAuditRequest OPTIONAL,         commandRequests         SEQUENCE OF CommandRequest }  ActionReply ::= SEQUENCE {         contextId               ContextID,         errorDescriptor         ErrorDescriptor OPTIONAL,         contextReply            ContextRequest OPTIONAL,         commandReply            SEQUENCE OF CommandReply }  ContextRequest ::= SEQUENCE {         priority                INTEGER(0..15) OPTIONAL,         emergency               BOOLEAN OPTIONAL,         topologyReq             SEQUENCE OF TopologyRequest OPTIONAL,         ... } ContextAttrAuditRequest ::= SEQUENCE {         topology                NULL OPTIONAL,         emergency               NULL OPTIONAL,         priority                NULL OPTIONAL,         ... }  CommandRequest ::= SEQUENCE {         command                 Command,         optional                NULL OPTIONAL,         wildcardReturn          NULL OPTIONAL,         ... }  Command ::= CHOICE {         addReq                  AmmRequest,         moveReq                 AmmRequest,         modReq                  AmmRequest,         -- Add, Move, Modify requests have the same parameters         subtractReq             SubtractRequest,         auditCapRequest         AuditRequest,         auditValueRequest       AuditRequest,         notifyReq               NotifyRequest,         serviceChangeReq        ServiceChangeRequest,         ... }  CommandReply ::= CHOICE {         addReply                AmmsReply,         moveReply               AmmsReply,         modReply                AmmsReply,         subtractReply           AmmsReply,         -- Add, Move, Modify, Subtract replies have the same parameters         auditCapReply           AuditReply,         auditValueReply         AuditReply,         notifyReply             NotifyReply,         serviceChangeReply      ServiceChangeReply,         ... } TopologyRequest ::= SEQUENCE {         terminationFrom         TerminationID,         terminationTo           TerminationID,         topologyDirection       ENUMERATED         {                 bothway(0),                 isolate(1),                 oneway(2)         } }  AmmRequest ::= SEQUENCE {         terminationID           TerminationIDList,         descriptors             SEQUENCE OF     AmmDescriptor,         -- At most one descriptor of each type (see AmmDescriptor)         -- allowed in the sequence.         ... }  AmmDescriptor ::= CHOICE {         mediaDescriptor         MediaDescriptor,         modemDescriptor         ModemDescriptor,         muxDescriptor           MuxDescriptor,         eventsDescriptor        EventsDescriptor,         eventBufferDescriptor   EventBufferDescriptor,         signalsDescriptor       SignalsDescriptor,         digitMapDescriptor      DigitMapDescriptor,         auditDescriptor         AuditDescriptor, ... }  AmmsReply ::= SEQUENCE {         terminationID           TerminationIDList,         terminationAudit        TerminationAudit OPTIONAL,         ... }  SubtractRequest ::= SEQUENCE {         terminationID           TerminationIDList,         auditDescriptor         AuditDescriptor OPTIONAL,         ... } AuditRequest ::= SEQUENCE {         terminationID           TerminationID,         auditDescriptor         AuditDescriptor,         ... }  AuditReply ::= CHOICE {         contextAuditResult      TerminationIDList,         error                   ErrorDescriptor,        auditResult             AuditResult,         ... }  AuditResult ::= SEQUENCE { 	terminationID           TerminationID,        terminationAuditResult  TerminationAudit }  TerminationAudit ::= SEQUENCE OF AuditReturnParameter  AuditReturnParameter ::= CHOICE {         errorDescriptor          ErrorDescriptor,         mediaDescriptor          MediaDescriptor,         modemDescriptor          ModemDescriptor,         muxDescriptor            MuxDescriptor,         eventsDescriptor         EventsDescriptor,         eventBufferDescriptor    EventBufferDescriptor,         signalsDescriptor        SignalsDescriptor,         digitMapDescriptor       DigitMapDescriptor,         observedEventsDescriptor ObservedEventsDescriptor,         statisticsDescriptor     StatisticsDescriptor,         packagesDescriptor       PackagesDescriptor,         emptyDescriptors         AuditDescriptor,         ... }  AuditDescriptor ::= SEQUENCE {         auditToken              BIT STRING         {                 muxToken(0),                modemToken(1),                mediaToken(2),                 eventsToken(3),                signalsToken(4),                 digitMapToken(5),                statsToken(6),                 observedEventsToken(7),                 packagesToken(8),                eventBufferToken(9)         } OPTIONAL,         ... }  NotifyRequest ::= SEQUENCE {         terminationID            TerminationIDList,         observedEventsDescriptor ObservedEventsDescriptor,         errorDescriptor          ErrorDescriptor OPTIONAL,         ... }  NotifyReply ::= SEQUENCE {         terminationID           TerminationIDList,         errorDescriptor         ErrorDescriptor OPTIONAL,         ... }  ObservedEventsDescriptor ::= SEQUENCE {         requestId               RequestID,         observedEventLst        SEQUENCE OF ObservedEvent }  ObservedEvent ::= SEQUENCE {         eventName               EventName, 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -