Skip to content

SS7 Protocol Integration

Signaling System 7 (SS7) is a critical protocol suite for traditional telecommunications networks. This guide covers integration with TelcoAPI's SS7 capabilities.

Overview

SS7 Network

SS7 provides:

  • Reliable message routing
  • Call setup and teardown
  • Mobile services support
  • Network management

Protocol Layers

Message Transfer Part (MTP)

graph TD
    A[MTP3 - Network Layer] --> B[MTP2 - Link Layer]
    B --> C[MTP1 - Physical Layer]

MTP3 Configuration

const mtp3Config = {
  pointCode: '1-1-1',
  networkIndicator: 'international',
  serviceIndicator: 'sccp'
};

await client.ss7.configureMTP3(mtp3Config);

SCCP (Signaling Connection Control Part)

SCCP provides additional network layer functions:

const sccpConfig = {
  routingIndicator: 'gt', // Global Title
  globalTitle: {
    tt: 0,
    np: 1,
    nai: 4,
    address: '12345'
  }
};

await client.ss7.configureSCCP(sccpConfig);

TCAP (Transaction Capabilities Application Part)

Example TCAP transaction:

const tcapMessage = {
  dialogType: 'BEGIN',
  components: [{
    type: 'invoke',
    operationCode: 'sendAuthenticationInfo',
    parameter: {
      imsi: '123450000000001'
    }
  }]
};

const response = await client.ss7.sendTCAP(tcapMessage);

Point Code Management

Point Code Format

Format Example Description
ITU 3-8-3 International format
ANSI 245-001-001 North American format
China 7-8-7 Chinese format

Configuration Example

const pointCodeConfig = {
  localPointCode: '1-1-1',
  adjacentPointCodes: ['2-2-2', '3-3-3'],
  format: 'ITU'
};

await client.ss7.configurePointCodes(pointCodeConfig);

Message Handling

MAP Operations

// Send Authentication Info
const mapOperation = {
  opcode: 'sendAuthenticationInfo',
  params: {
    imsi: '123450000000001'
  }
};

const result = await client.ss7.map.invoke(mapOperation);

ISUP Calls

// Initial Address Message (IAM)
const iam = {
  calledNumber: '12345678',
  callingNumber: '87654321',
  circuitCode: 1
};

await client.ss7.isup.sendIAM(iam);

Error Handling

try {
  await client.ss7.sendTCAP(tcapMessage);
} catch (error) {
  if (error.code === 'SS7_NETWORK_FAILURE') {
    // Handle network failure
  } else if (error.code === 'POINT_CODE_UNREACHABLE') {
    // Handle unreachable point code
  }
}

Best Practices

  1. Message Validation

    import { validateSS7Message } from '@telcoapi/ss7';
    
    const isValid = validateSS7Message(message);
    

  2. Traffic Monitoring

    client.ss7.on('message', (msg) => {
      console.log('SS7 message:', msg);
    });
    

  3. Load Balancing

    const loadBalancerConfig = {
      mode: 'round-robin',
      pointCodes: ['1-1-1', '2-2-2']
    };
    

Security Considerations

Security

Always implement proper security measures:

  1. Message filtering
  2. Access control
  3. Encryption where applicable

Debugging

Enable debug logging:

client.ss7.setDebugLevel('debug');
client.ss7.on('debug', (info) => {
  console.log('SS7 Debug:', info);
});

Reference