Diameter Connection

From ss7api.null.ro
Revision as of 11:30, 12 September 2016 by Oana (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The connection used for exchange of XML formatted messages is a TCP socket. As an option TLS can be used to protect the information. In that case the information on this page applies only to the unencrypted data, the certificate check and establishment of encryption are outside the scope of this page.

Contents

Establishing the connection

A connection is established from the application to the Diameter translator. Each translator is associated with a TCP listener. Each TCP listener is associated with a certain Diameter interface. An application can establish multiple connections to the Diameter translator. Each connection is independent from the others. To establish the connection a TCP socket must be connected to the agreed listening port of the translator. Upon a successful connection XML messages exchange can start.

The XML declaration <?xml … ?> must be present in the first exchanged message. On further messages the declaration may be omitted.

All messages must have a root <m> element. The optional xmlns attribute must be "http://yate.null.ro/xml/diameter/v1" (note that the URL doesn't point to a valid location).

The closing tag </m> can be used to look up for the end of XML in the stream.

Announcing capabilities

After connection on the TCP socket, the application will announce its capabilities. Otherwise, it will not be considered a valid connection for Diameter messages and it will be ignored.

This initial XML message must have both an XML declaration and an xmlns in the root element indicating the correct version of the protocol is being spoken.

Each supported capability will be announced in a <c> element placed in the root element.

<?xml version="1.0" encoding="UTF-8" ?>
<m xmlns="http://yate.null.ro/xml/diameter/v1">
    <c>HSSMobility</c>
    <c>MMEMobility</c>
    ...
</m>

On success the translator will confirm and indicate the application is active (receives messages):

<?xml version="1.0" encoding="UTF-8" ?>
<m xmlns="http://yate.null.ro/xml/diameter/v1">
    <state>active</state>
</m>


On failure the converter may return an error text and will close the socket after that. In case of XML error or xmlns mismatch no error is returned.

<?xml version="1.0" encoding="UTF-8" ?>
<m xmlns="http://yate.null.ro/xml/tcap/v1">
    <state>inactive</state>
    <error>Unsupported: Charging</error>
</m>

For S6a interface, the capabilities are organized by the entity that can handle the requests. Capability - operations associations are:

  • HSSMobility : UpdateLocationRequest, UpdateLocationAnswer, PurgeUERequest, PurgeUEAnswer, NotifyRequest, NotifyAnswer
  • MMEMobility :CancelLocationRequest, CancelLocationAnswer, InsertSubscriberDataRequest, InsertSubscriberDataAnswer, DeleteSubscriberDataRequest, DeleteSubscriberDataAnswer, ResetRequest, ResetAnswer
  • HSSAuthentication : AuthenticationInfoRequest, AuthenticationInfoAnswer

Generating and processing Diameter messages

While in active state, the application will receive XML Diameter-specific formatted messages for handling. It can also send messages, either as an answer to a previous incoming request or to generate a new outbound request.

Preparing shutdown

When an application wishes to stop processing it should indicate to the translator to stop delivering messages for new requests/sessions. Messages for currently running requests will still be delivered.

This is done by indicating lack of all capabilities in an empty <c/> element:

<m>
   <c/>
</m>

The converter will not answer at once, instead it will continue to deliver messages for existing requests/sessions. Eventually these requests will dry up and the new state will be applied:

<m>
  <state>inactive</state>
</m>

At this point it is safe to close the socket.

Personal tools
Namespaces

Variants
Actions
MAP & CAMEL XML Interface
Diameter XML Interface
MAP and CAMEL operations
Diameter interfaces
Examples
Resources
Navigation
Toolbox