STP SCCP configuration
(→SCCP routing) |
(→SCCP routing) |
||
Line 326: | Line 326: | ||
Message.install(onUpdate,"sccp.update",120); | Message.install(onUpdate,"sccp.update",120); | ||
− | See also: | + | '''See also:''' |
*[[SCCP decoder]] | *[[SCCP decoder]] | ||
*[[SEP SCCP configuration]] | *[[SEP SCCP configuration]] |
Revision as of 16:10, 26 October 2017
A STP represents a Service Transfer Point in SS7 network. This means that it does not process messages, instead it transfers the messages to other SS7 nodes that need to do the processing.
Given this fact, a STP needs to be connected to multiple SS7 nodes, usually other STPs and possible one or more SEPs.
To configure a SCCP layer on a STP you need the following:
- MTP interconnections
- SCCP layer
- GTT
- Optional SCCP Management.
Contents |
Example network overview
Below is the schema of the network we are trying to configure. We'll be configuring STP2.
In the figure we have:
- two STPs,
- STP1 is a interconnect STP
- STP2 represents our interconnect STP.
- three SEPs, SEP represents an SCCP endpoint in SS7 network,
- SEP1 is our master SCCP message processor
- SEP2 is the backup for SEP1.
The message flow scenario:
- STP1 sends all SCCP messages to STP2.
- STP2 will send the SCCP messages, for HLR and VLR, to SEP1. If communication with SEP1 is lost then the messages will be sent to SEP2.
Each SS7 node is connected with a M2PA link.
The following configuration is for STP2.
MTP interconnection
The MTP stack is composed from three layers:
- Layer 3: Routing layer
- Layer 2: Transport layer
- Layer 1: Signalling layer
For each SS7 interconnection we need to specify the three MTP layers.
Layer 1
For M2PA this is specified in sigtransport.conf
[sctp:STP2-STP1] ; Transport type. We will use SCTP type=sctp ; Use the SCTP in message mode stream=false ; Local address of M2PA link. IP 100.1.1.1 Port:2080 local=100.1.1.1:2080 ; Remote address of M2PA link. IP 80.1.1.1 Port:2080 remote=80.1.1.1:2080 [sctp:STP2-SEP1] type=sctp local=100.1.1.1:2092 remote=100.1.1.5:2092 stream=false [sctp:STP2-SEP2] type=sctp local=100.1.1.1:2093 remote=100.1.1.6:2093 stream=false
Layer 2
Layers 2 and 3 are specified in ysigchan.conf
[m2pa:STP2-STP1] ; Component type. In our case M2PA type=ss7-m2pa ; Signalling layer reference in our case sctp:eSTP-lSTP1 which represents the section name defined in sigtransport.conf. sig=sctp:STP2-STP1 [m2pa:STP2-SEP1] type=ss7-m2pa sig=sctp:STP2-SEP1 [m2pa:STP2-SEP2] type=ss7-m2pa sig=sctp:STP2-SEP2
Layer 3
Layers 2 and 3 are specified in ysigchan.conf
[ls:STP2-STP1] ; Component type. In our case MTP3 type=ss7-mtp3 ; Point code type: ITU standard. netind2pctype=ITU ; Network indicator: national netindicator=national ; Local Point Code: 10 local=ITU:10 ; Adjacent Point Code: 1 adjacent=ITU:1 ; Layer 2 reference: m2pa:STP2-STP1 link=m2pa:STP2-STP1 [ls:STP2-SEP1] type=ss7-mtp3 netind2pctype=ITU netindicator=national local=ITU:10 adjacent=ITU:20 link=m2pa:STP2-SEP1 [ls:STP2-SEP1] type=ss7-mtp3 netind2pctype=ITU netindicator=national local=ITU:10 adjacent=ITU:21 link=m2pa:STP2-SEP1
All Layer 3's are hold together by SS7Router. This class actually makes the SS7 MTP routing in YATE. It is created by default but in STP case it needs additional parameters to be configured, so will will add it in ysigchan.conf
[ss7router] ; Component type type=ss7-router ; Act as a STP: yes transfer=yes
SCCP layer
SCCP
SCCP is configured in ysigchan.conf file.
[sccp] ; Component type: SCCP type=ss7-sccp ; Pointcode type: ITU pointcodetype=ITU ; Network indicator netindicator=national ; Local pointcode: 10 localpointcode=10 ; Reference to SCCP management management=sccp-mgm
GTT
[gtt] ; Component type: GTT type=ss7-gtt ; SCCP component for which this GTT should rote messages: sccp; SCCP component section name sccp=sccp
The GTT component does not make any heavy lifting, it just dispatches a sccp.route message. Anyone who knows how to route a SCCP message should process the sccp.route message and return a valid response. In this example we'll use a Javascript routing script that will be presented below.
The presence of the GTT component also indicates that the SCCP component created in this node is capable of SCCP routing.
SCCP Management
SCCP Management is used to avoid SCCP message routing to unavailable targets.
SCCP management can be made aware of the remote SCCPs nodes in SS7 network and monitor their states.
Each time it detects that the state of a remote SCCP has changed, it emits a sccp.update message to inform all concerned parties about the state change.
When a monitored remote target is unavailable SCCP management starts sending SST messages for that target to detect if the state has changed.
The SCCP management can also keep a list of remote SCCPs who are concerned about the state of local SCCP subsystems. In this way the SCCP management can inform the remote SCCPs when status of a local subsystem has changed.
[sccp-mgm] ; Type of component: SCCP ITU Management ; This section is referenced by SCCP component type=ss7-sccp-itu-mgm ; State monitoring: ; Remote point code 20 remote=20 ; Remote point code 21 remote=21 ; Remote Subsystems 6 and 7 at point code 20 remote=20:6,7 ; Remote Subsystems 6 and 7 at point code 21 remote=21:6,7
SCCP routing
This is a sample SCCP Javascript routing script.
// A SEP is defined by it's pc and the SSNs for the HLR and the VLR // At the start we'll consider that both the mainSep and the backupSep are active (1) and both their ssn(vlr and hlr) are active var mainSep; mainSep["pc"] = 1; mainSep["hlr"] = 1; mainSep["vlr"] = 1; var backupSep; backupSep["pc"] = 1; backupSep["hlr"] = 1; backupSep["vlr"] = 1; function onRoute(msg) { // The routing is done based on the gt parameter from the sccp.route message var gt = msg["gt"]; if (gt == "407520801") { // HLR if (mainSep["pc"] == 1 && mainSep["hlr"] == 1) { // if mainSep pc and hlr ssn are active then send to mainSep msg["RemotePC"] = 20; msg["gt.ssn"] = 6; msg["route"] = "ssn"; return true; } else if (backupSep["pc"] == 1 && backupSep["hlr"] == 1) { // if backupSep pc and hlr ssn are active then send to backupSep msg["RemotePC"] = 21; msg["gt.ssn"] = 6; msg["route"] = "ssn"; return true; } return false; } else if (gt == "407520802") { // VLR if (mainSep["pc"] == 1 && mainSep["vlr"] == 1) { // if mainSep pc and vlr ssn are active then send to mainSep msg["RemotePC"] = 20; msg["gt.ssn"] = 7; msg["route"] = "ssn"; return true; } else if (backupSep["pc"] == 1 && backupSep["vlr"] == 1) { // if backupSep pc and vlr ssn are active then send to backupSep msg["RemotePC"] = 21; msg["gt.ssn"] = 7; msg["route"] = "ssn"; return true; } } else { // If we were to have an interconnect STP for some GT then we would add it here // if (gt=="gt_of_external_system") { // msg["RemotePC"] = 1; // return true; // } // We could also consider that all other messages go to the interconnect STP // msg["RemotePC"] = 1; // return true; // Unknown gt return false; } } function onUpdate(msg) { // when cheking for update information we follow the PC state and the SSN states for each PC var pc = msg["pointcode"]; if (pc != 20 || pc != 21) // Received sccp.update for unknown pointcode return false; var pcstate = msg["pc-state"]; var ssn = msg["subsystem"]; var ssnState = msg["subsystem-state"]; // First check the PC state. If the PC in down then all SSNs associated to that PC are down if (pcstate != "") { if (pcstate == "allowed") { if (pc == 20) mainSep["pc"] = 1; else backupSep["pc"] = 1; } else { if (pc == 20) mainSep["pc"] = 0; else backupSep["pc"] = 0; } } if (ssn == "" || ssnState == "") return true; // Check the SSN state and set the SSN state for the appropriate SEP if (ssn == 6) { // hlr if (ssnState == "allowed") { if (pc == 20) mainSep["hlr"] = 1; else backupSep["hlr"] = 1; } else { if (pc == 20) mainSep["hlr"] = 0; else backupSep["hlr"] = 0; } return true; } if (ssn != 7) // Not VLR return; return false; if (ssnState == "allowed") { if (pc == 20) mainSep["vlr"] = 1; else backupSep["vlr"] = 1; } else { if (pc == 20) mainSep["vlr"] = 0; else backupSep["vlr"] = 0; } return true; } // install message handlers for sccp.route and sccp.update Message.install(onRoute,"sccp.route",120); Message.install(onUpdate,"sccp.update",120);
See also: