Connection

From ss7api.null.ro
Revision as of 15:19, 23 August 2013 by Monica (Talk | contribs)

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 in this document applies only to the unencrypted data, the certificate check and establishment of encryption are outside the scope of this document.

Contents

Establishing the connection

A connection is established from the application to the TCAP converter. An application may connect to multiple converters but each connection is independent from the others. To establish the connection a TCP socket must be connected to the agreed listening port of the converter. 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/tcap/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 1

Once the application has connected it must announce its capabilities. Until then it will be ignored by the converter.

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/tcap/v1">
    <c>LocationManagement</c>
    <c>Charging</c>
    ...
</m>

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

<?xml version="1.0" encoding="UTF-8" ?>
<m xmlns="http://yate.null.ro/xml/tcap/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>

Generating and processing converted TCAP messages

While in active state the application will receive XML 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 converter to stop delivering messages for new transactions. Messages for currently running transactions 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 transactions. Eventually these transactions 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.

References

  • 1 ETSI TS 100 974 V7.15.0 (2004-03) p41
Personal tools
Namespaces

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