DIAMETER-S Messages
Introduction
The DiameterApp uses DIAMETER-S-… messages to communicate with other applications (such as the LogicApp) to handle inbound Diameter requests received from an external Diameter Client.
The following LuaApp plugins from the core n2svcd module handle messages
from DiameterApp.
DiameterLuaService(handles out-of-the-blue inbound Diameter requests within LogicApp)DiameterLuaAgent(handles registered inbound Diameter requests within LogicApp)
The internal DIAMETER-S-… messages are:
DIAMETER-S-REQUESTDIAMETER-S-RESPONSEDIAMETER-S-REGISTERDIAMETER-S-REGISTEREDDIAMETER-S-DEREGISTER
Note that this page uses the term “on-the-wire” to refer to the sending or receiving of Diameter content by the DiameterApp. This term is also inclusive of the case where the message is sent by local loopback and does not physically transit a Network Interface Controller (NIC).
DIAMETER-S-REQUEST
The DIAMETER-S-REQUEST message is sent by DiameterApp to the application that is configured
for handling of inbound Diameter requests.
Refer to the DiameterApp Configuration documentation for more information on setting default parameters.
The attributes of the DIAMETER-S-REQUEST message are:
| Attribute | Type | Description |
|---|---|---|
diameter
|
Object | Container for the parameters of the Diameter request that we have received. |
bytes
|
Object | [Required] The raw on-the-wire Diameter request bytes. |
connection
|
String | Container for connection information. |
remote_ip
|
String | The remote dot-notation IP address from which the Diameter request was received. |
remote_port
|
Integer | The remote TCP or UDP port from which the Diameter request was received. |
name
|
String |
The name of the Diameter command, e.g. Credit-Control if known.
|
code
|
Integer | [Required] The numeric code for the command. |
application_id
|
Integer | The received Application-ID from the request header. |
avps
|
Array of Object | [Required] Array of AVPs. |
AVP Parameters
AVP parameters are as for Diameter outbound request operations.
DIAMETER-S-RESPONSE
The DIAMETER-S-RESPONSE message is sent back to the DiameterApp by the handling application
when it is ready to send a Diameter Response to the original received Diameter Request.
The attributes of the DIAMETER-S-RESPONSE message are:
| Field | Type | Description |
|---|---|---|
success
|
0/1
|
[Required] Indicates if the request handling was successful or not. |
error
|
String |
Indicates the reason why the request handling failed. Present and applicable only if success == 0.
|
diameter
|
Object |
Container for the Diameter response parameters we are to send. Present only if success == 1.
|
avps
|
Array of Object | Array of AVP fields as for a request. |
The other attributes of the Diameter response are automatically determined by the DiameterApp.
DIAMETER-S-REGISTER
The DIAMETER-S-REGISTER message is sent by DiameterLuaAgent to the DiameterApp
to register ownership of a session for the purpose of handing inbound Requests. Any inbound
Requests received for that session will be sent to the registering LogicApp, associated with
the context of the owning LuaInstance.
The registration has a limited lifetime. The DiameterApp does not send an explicit notification
if the registration expires. The LogicApp is expected to maintain its own independent timer
for the lifetime of the registration.
When the LuaInstance finishes, it should send a DIAMETER-S-DEREGISTER request (see below),
to notify the DiameterApp to remove the session registration.
The attributes of the DIAMETER-S-REGISTER message are:
| Attribute | Type | Description |
|---|---|---|
lifetime
|
1 - 86410
|
Maximum number of seconds for which the registration should be maintained. After this time, the registration will be discarded if not renewed. (Default = 3610 or other value set by DiameterApp)
|
diameter
|
Object | [Required] Container for Diameter protocol sub-elements. |
session_id
|
String | [Required] The Session-ID for which the registration will be made. |
If the session ID is already registered to this instance, then the registration will be refreshed, i.e. the registration lifetime will be reset from now.
If the session ID is already registered to another LuaInstance, then DiameterApp will
generate a warning message and will transfer the registration to this new Lua script
execution context.
DIAMETER-S-REGISTERED
The DIAMETER-S-REGISTERED message is sent by DiameterApp to the DiameterLuaAgent
to confirm ownership of a session. The lifetime is confirmed back. The calling script now
knows that it is safe to perform actions which may cause messages to arrive on the session.
The attributes of the DIAMETER-S-REGISTERED message are:
| Attribute | Type | Description |
|---|---|---|
lifetime
|
1 - 3610
|
[Required] The actual number of seconds assigned to the lifetime of the registration. This may be less than the requested registration lifetime. |
diameter
|
Object | [Required] Container for Diameter protocol sub-elements. |
session_id
|
String | [Required] The Session-ID for which the registration will be made. |
If the session ID is already registered to this instance, then the registration will be refreshed, i.e. the registration lifetime will be reset from now.
If the session ID is already registered to another LuaInstance, then DiameterApp will
generate a warning message and will transfer the registration to this new Lua script
execution context.
DIAMETER-S-DEREGISTER
The DIAMETER-S-DEREGISTER message is sent by DiameterLuaAgent to the DiameterApp
to remove ownership of a session for the purpose of handing inbound Requests.
If the session ID is not registered, then the DiameterApp will generate a warning message.
There is no returned confirmation message for a Diameter deregistration.
The attributes of the DIAMETER-S-DEREGISTER message are:
| Attribute | Type | Description |
|---|---|---|
diameter
|
Object | [Required] Container for Diameter protocol sub-elements. |
session_id
|
String | [Required] The Session-ID for which the registration will be cancelled. |