7 Coding

24.5383GPPEnabling MSGin5G ServiceProtocol specificationRelease 17TS

7.1 General

This clause contains the information elements coding for the messages used in the procedures described in the present document.

In order to identify the usage of messages, in addition to the information elements specified in 3GPP TS 23.554 [2], a "Message Type" element shall be added to each message. The possible values of "Message Type" element are listed below:

a) "REG" refers to Registration;

b) "DEREG" refers to de-registration;

c) "MSG" refers to MSGin5G message;

d) "MSGRESP" refers to message response; and

e) "IMDN" refers to MSGin5G delivery status report";

f) "SEGREC" refers to segments recovery; and

g) "SEGCONFIR" refers to message segments received confirmation.

7.2 MSGin5G UE Configuration data

7.2.1 General

This clause specified the extension of the SEAL UE configuration document as defined in 3GPP TS 24.546 [6].

7.2.2 Application unique ID

The AUID shall be set to the unique service identifier of MSGin5G service as specified in 3GPP TS 23.554 [2]

7.2.3 Structure

The MSGin5G UE configuration document structure is described in clause 7.2 of 3GPP TS 24.546 [6] with the MSGin5G specific clarifications specified in this clause.

The <on-network> element of the <seal-UE-configuration> element specified in clause 7.2 of 3GPP TS 24.546 [6]:

a) shall include a <MSGin5G-Server-address> element;

b) shall include a <MSGin5G-UE-Service-id> element; and

c) may include a <Segment-size> element.

7.2.4 XML schema

7.2.4.1 General

The MSGin5G UE configuration document is composed according the XML schema described in the clause 7.2 of 3GPP TS 24.546 [6], and extended with extensions from the XML schema defined in clause 7.2.4.2.

7.2.4.2 XML schema for MSGin5G specific extensions

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema

xmlns="urn:3gpp:ns:seal:MSGin5GUEConfig:1.0"

targetNamespace="urn:3gpp:ns:seal: MSGin5GUEConfig:1.0"

xmlns:xs="http://www.w3.org/2001/XMLSchema"

xmlns: msgin5guec="urn:3gpp:ns:seal: MSGin5GUEConfig:1.0"

elementFormDefault="qualified"

attributeFormDefault="unqualified">

<!—MSGin5G specific "on-network" child elements –>

<xs:element name="MSGin5G-Server-address" type="xs:string"/>

<xs:element name="MSGin5G-UE-Service-id" type="xs:string"/>

<xs:element name="Segment-size" type="xs:unsignedInt"/>

</xs:schema>

7.2.5 Data semantics

The <VAL-UE-id> element in <seal-UE-configuration> element is MSGin5G UE ID as specified in TS 23.554 [2].

The <VAL-Service-id> element in <seal-UE-configuration> element is MSGin5G service ID.

The <MSGin5G-Server-address> element in <on-network> element of <seal-UE-configuration> element is the address information of the initial MSGin5G Server serving the MSGin5G Client.

The <MSGin5G-UE-Service-id> element in <on-network> element of <seal-UE-configuration> element is the MSGin5G UE Service ID as specified in TS 23.554 [2].

The <Segment-size> element in <on-network> element of <seal-UE-configuration> element is the segment size used for the MSGin5G UE to do message segmentation, the payload size of every segmented message will not exceed the segment size.

7.2.6 MIME types

The MIME type for the MSGin5G UE configuration document shall use the MIME type as specified in the clause 7.2.6 of 3GPP TS 24.546 [6].

7.3 MSGin5G message structure

7.3.1 General

This clause defines the JSON schema of the body of CoAP requests realizing the MSGin5G message. The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of MSGin5G message, the properties are defined as shorten form and the relationship between the properties and IEs used in clause 6 are described in the description of the properties.

7.3.2 Configuration

7.3.2.1 MSGin5G UE Configuration structure

The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of the message used in MSGin5G service, the properties are defined as shorten form and the relationship between the properties and IEs used in clause 6.2 are described in the description of the properties, The JSON schema is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/MSGin5G_UE_Configuration_schema",

"title": "MSGin5G_UE_Configuration",

"type": "object",

"properties": {

"ueId": {

"type": "string",

"description": "Refer to MSGin5G UE ID"

},

"addInfos": {

"type": "array",

"description": "Refer to other related informations",

"items": {

"$ref": "#/$defs/AddInfo"

}

}

},

"required": ["ueId"],

"$defs": {

"AddInfo": {

"type": "object",

"properties": {

"name": {

"type": "string"

},

"value": {

"type": "string"

}

},

"required": ["name", "value"]

}

}

}

7.3.3 Registration

7.3.3.1 MSGin5G UE Registration structure

The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of the message used in MSGin5G service, the properties are defined as shorten form and the relationships between the properties and elements used in clause 6.3.1.1.1 are described in the description of the properties. The JSON schema of the CoAP POST request for the MSGin5G registration is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/MSGin5G_Registration_request_schema",

"title": "MSGin5G Registration Request",

"type": "object",

"properties": {

"msgIden": {

"type": "string",

"format": "uri",

"description": "Refer to Service identifier of MSGin5G service"

},

"msgType": {

"type": "string",

"enum": [

"REG"

],

"description": "Refer to the usage of this message. The value REG refers to MSGin5G Registration"

},

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID"

},

"cliProfile": {

"type": "object",

"properties": {

"triInfo": {

"type": "object",

"properties": {

"ueId": {

"type": "string",

"format": "uri",

"description": "Refer to MSGin5G UE ID"

},

"cliPort": {

"type": "string",

"description": "Refer to MSGin5G Client Ports"

}

},

"required": [

"ueId",

"cliPort"

],

"description": "Refer to MSGin5G Client Triggering Information"

},

"comAvail": {

"type": "object",

"properties": {

"schTime": {

"type": "string",

"format": "date-time",

"description": "Refer to Scheduled Communication Time"

},

"durTime": {

"type": "string",

"format": "date-time",

"description": "Refer to Communication Duration Time"

},

"periIndi": {

"type": "boolean",

"default": false,

"description": "Refer to Periodic Communication Indicator"

},

"periInterval": {

"type": "string",

"format": "date-time",

"description": "Refer to Periodic Communication Interval"

},

"dataSize": {

"type": "string",

"description": "Refer to Data Size Indication"

},

"storeForward": {

"type": "string",

"description": "Refer to Store and Forward Option"

}

},

"description": "Refer to MSGin5G Client Communication Availability"

}

},

"description": "Refer to MSGin5G Client Profile"

}

},

"required": [

"msgIden",

"oriAddr ",

"secCred"

]

}

The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of the message used in MSGin5G service, the properties are defined as shorten form and the relationships between the properties and elements used in clause 6.3.1.2.1 are described in the description of the properties. The JSON schema of CoAP 2.01 (Created) response or CoAP 2.04 (Change) response for the MSGin5G registration is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/MSGin5G_Registration_response_schema",

"title": "MSGin5G Registration Response",

"type": "object",

"properties": {

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID"

},

"result": {

"type": "boolean",

"default": true,

"description": "Refer to Registration result. The value true refers to succcess"

}

},

"required": [

"oriAddr",

"result"

]

}

7.3.3.2 MSGin5G UE De-registration structure

The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of the message used in MSGin5G service, the properties are defined as shorten form and the relationships between the properties and elements used in clause 6.3.1.1.2 are described in the description of the properties. The JSON schema of the CoAP POST request for the MSGin5G de-registration is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/MSGin5G_Deregistration_request_schema",

"title": "MSGin5G Deregistration Request",

"type": "object",

"properties": {

"msgIden": {

"type": "string",

"format": "uri",

"description": "Refer to Service identifier of MSGin5G service"

},

"msgType": {

"type": "string",

"enum": [

"DEREG"

],

"description": "Refer to the usage of this message. The value DEREG refers to MSGin5G De-registration"

},

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID"

}

},

"required": [

"msgIden",

"oriAddr ",

"secCred"

]

}

The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of the message used in MSGin5G service, the properties are defined as shorten form and the relationships between the properties and elements used in clause 6.3.1.2.2 are described in the description of the properties. The JSON schema of CoAP 2.04 (Change) response for the MSGin5G de-registration is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/MSGin5G_ Deregistration_response_schema",

"title": "MSGin5G Deregistration Response",

"type": "object",

"properties": {

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID"

},

"result": {

"type": "boolean",

"default": true,

"description": "Refer to De-registration result. The value true refers to succcess"

}

},

"required": [

"oriAddr",

"result"

]

}

7.3.4 MSGin5G Message

7.3.4.1 JSON schema of MSGin5G message

The JSON schema of the MSGin5G message is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/MSGin5G_Message_schema",

"title": "MSGin5G Message",

"type": "object",

"properties": {

"msgIden": {

"type": "string",

"format": "uri",

"description": "Refer to Service identifier of MSGin5G service"

},

"msgType": {

"type": "string",

"enum": [

"MSG"

],

"description": "the usage of this message. The value MSG refers to MSGin5G message"

},

"appId": {

"type": "string",

"description": "Refer to Application ID"

},

"msgId": {

"type": "string",

"format": "uuid",

"description": "Refer to Message ID"

},

"isDelivStatReq": {

"type": "boolean",

"default": false,

"description": "Refer to Delivery status required"

},

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE",

"AS"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID or Originating AS Service ID"

},

"destAddr": {

"type": "object",

"properties": {

"destAddrType": {

"enum": [

"UE",

"AS",

"GROUP",

"BC",

"TOPIC

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Recipient UE Service ID or Recipient AS Service ID or Group Service ID or Broadcast Area ID or Messaging Topic"

},

"sfFlag": {

"type": "boolean",

"default": false,

"description": "Refer to Store And Forward Flag"

},

"sfParam": {

"$ref": "#/$defs/SfParams",

"description": "Refer to Store And Forward Parameters"

},

"payload": {

"type": "string",

"description": "Refer to Payload"

},

"priority": {

"type": "string",

"enum": [

"HIGH",

"MIDDLE",

"LOW"

],

"default": "MIDDLE",

"description": "Refer to Priority Type"

},

"isSegmented": {

"type": "boolean",

"default": false,

"description": "Refer to Message Is Segmented"

},

"segParams": {

"$ref": "#/$defs/SegParams"

}

},

"required": [

"msgIden ",

"msgId",

"msgType",

"oriAddr",

"destAddr"

],

"dependentRequired": {

" sfParams": [

" sfFlag"

],

" segParams": [

" isSegmented "

],

"if": {

"properties": {

"oriAddrType": {

"const": "AS"

}

}

},

"then": {

"properties": {

"destAddrType": {

"not":{

"const": "AS"

}

}

}

}

},

"$defs": {

"SfParams": {

"type": "object",

"properties": {

"expireTime": {

"type": "string",

"format": " date-time",

"description": "Refer to Message expiration time"

},

"appSpecSf": {

"type": "object",

"description": "Refer to Application Specific Store And Forward Information"

}

}

},

"SegParams": {

"type": "object",

"properties": {

"segId": {

"type": "string",

"description": "Refer to Segmentation Set Identifier"

},

"totalSegCount": {

"type": "integer",

"description": "Refer to Total Number Of Message Segments"

},

"segNumb": {

"type": "integer",

"description": "Refer to Message Segment Number"

},

"lastSegFlag": {

"type": "string",

"description": "Refer to Last Segment Flag"

},

"required": [

"segId",

"totalSegCount",

"segNumb"

]

}

}

}

}

7.3.4.2 JSON schema of MSGin5G message delivery status report

The JSON schema of the MSGin5G message delivery status report is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/MSGin5G_Message_schema",

"title": "MSGin5G message delivery status report",

"type": "object",

"properties": {

"msgIden": {

"type": "string",

"format": "uri",

"description": "Refer to Service identifier of MSGin5G service"

},

"msgType": {

"type": "string",

"enum": [

"IMDN"

],

"description": "the usage of this message. The value IMDN refers to MSGin5G message delivery status report"

},

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE",

"AS"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID or Originating AS Service ID"

},

"destAddr": {

"type": "object",

"properties": {

"destAddrType": {

"enum": [

"UE",

"AS"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Recipient UE Service ID or Recipient AS Service ID"

},

"msgId": {

"type": "string",

"format": "uuid",

"description": "Refer to Message ID"

},

"DelSta": {

"type": "string",

"enum": [

"success",

"failure"

],

"description": "Refer to Delivery Status"

},

"Cause": {

"type": "string",

"description": "Refer to Failure Cause"

}

},

"required": [

"msgIden ",

"msgType",

"msgId",

"oriAddr",

"destAddr",

"DelSta"

],

"dependentRequired": {

"Cause": [{

"DelSta": {

"const": "failure"

}

}],

"if": {

"properties": {

"oriAddrType": {

"const": "AS"

}

}

},

"then": {

"properties": {

"destAddrType": {

"not": {

"const": "AS"

}

}

}

}

}

}

7.3.4.3 JSON schema of MSGin5G message response

The JSON schema of the MSGin5G message response is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/MSGin5G_Message_schema",

"title": "MSGin5G message response",

"type": "object",

"properties": {

"msgIden": {

"type": "string",

"format": "uri",

"description": "Refer to Service identifier of MSGin5G service"

},

"msgType": {

"type": "string",

"enum": [

"MSGRESP"

],

"description": "the usage of this message. The value MSGRESP refers to MSGin5G message response"

},

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE",

"AS"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID or Originating AS Service ID"

},

"msgId": {

"type": "string",

"format": "uuid",

"description": "Refer to Message ID"

},

"DelSta": {

"type": "string",

"enum": [

"failure",

"stored for deferred delivery"

],

"description": "Refer to Delivery Status"

},

"Cause": {

"type": "string",

"description": "Refer to Failure Cause"

}

},

"required": [

"msgIden ",

"msgType",

"msgId",

"oriAddr",

"DelSta"

]

}

7.3.5 Messaging Topic Subscription and Unsubscription

7.3.5.1 Message topic subscription structure

The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of the message used in MSGin5G service, the properties are defined as shorten form and the relationship between the properties and IEs used in clause 6.6 are described in the description of the properties, The JSON schema is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/Message_Topic_Subscription_schema",

"title": "Message_Topic_Subscription",

"type":"object",

"properties": {

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID"

},

"expireTime": {

"type": "string",

"format": "date-time",

"description": "Refer to message topic subscripition expiration time"

},

"required": ["oriAddr"]

}

}

7.3.5.2 Message topic unsubscription structure

The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of the message used in MSGin5G service, the properties are defined as shorten form and the relationship between the properties and IEs used in clause 6.6 are described in the description of the properties, The JSON schema is defined below:

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/Message_Topic_Unsubscription_schema",

"title": "Message_Topic_Unsubscription",

"type":"object",

"properties": {

"oriAddr": {

"type": "object",

"properties": {

"oriAddrType": {

"enum": [

"UE"

]

},

"addr": {

"type": "string"

}

},

"description": "Refer to Originating UE Service ID"

},

"required": ["oriAddr"]

}

}

7.3.6 Structure about message segment

The schema is based on JSON Schema Draft-07 [8]. For reducing the overhead of the message used in MSGin5G service, the properties are defined as shorten form and the relationship between the properties and IEs used in clause 6.5 are described in the description of the properties, The JSON schema is defined below.

7.3.6.1 Segments received confirmation structure

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/Segments_Received_Confirmation_schema",

"title": "Message_Received_Confirmation",

"type":"object",

"properties": {

"msgIden": {

"type": "string",

"format": "uri",

"description": "Refer to Service identifier of MSGin5G service"

},

"msgType": {

"type": "string",

"enum": [

"SEGCONFIR"

],

"description": "the usage of this message. The value SEGCONFIR refers to message segments received confirmation"

},

"segId": {

"type": "string",

"description": "Refer to Segmentation Set Identifier"

},

"result": {

"type": "boolean",

"description": "Refer to segments received result. The value true refers to succcess"

},

"required": ["msgIden","msgType","segId","result"]

}

}

7.3.6.2 Segments recovery structure

{

"$schema": "http://json-schema.org/draft-07/schema#",

"$id": "http://www.3gpp.org/MSGin5G/Segments_Recovery_schema",

"title": "Segments_Recovery",

"type":"object",

"properties": {

"msgIden": {

"type": "string",

"format": "uri",

"description": "Refer to Service identifier of MSGin5G service"

},

"msgType": {

"type": "string",

"enum": [

"SEGREC"

],

"description": "the usage of this message. The value SEGREC refers to message segment recovery"

},

"segId": {

"type": "string",

"description": "Refer to Segmentation Set Identifier"

},

"segNoList": {

"type": "string",

"description": "Refer to List of Segment range, e.g. (5-7, 10-10, 15-19)"

},

"required": ["msgIden","msgType","segId","segNoList"]

}

}

Annex A (Informative): Message formats/protocols used for Constrained UE