MYVOIPAPP

Trunk miniSIPServer

1. Description

Some companies have several branches arround the world. It is necessary for us to deploy several miniSIPServer in these branches and establish a unified inner VoIP network. The simplest way to do that is connecting all these miniSIPServer nodes with each other. Please refer to following figure.

original network topology for branches

If there is only one or two branches, the network could be simple. But if more and more branches are merged into the network, it will be difficult to configure and mantain the whole system. In this scenario, each branch or miniSIPServer node has to know the details of all other branches or miniSIPServer nodes. It is dangeous and unstable. If one of the miniSIPServer node is changed, all others have to be changed together.

In this document, we suggest following network topology.

trunk miniSIPServer network topology for branches

In this network, an independent miniSIPServer is used to bridge all miniSIPServer in different branches. We name this logical miniSIPServer as "trunk miniSIPServer" or T-MSS. The miniSIPServer in branch is named as "local miniSIPServer" or L-MSS.

Each L-MSS node only cares about the connection with T-MSS node. It is unnecessary for L-MSS to know the details of other L-MSS. When users in one branch wants to call other users in other branches, their calls will be routed to trunk miniSIPServer directly. Trunk miniSIPServer will be responsible for checking and routing the calls to the right branches or L-MSS nodes.

We configure SIP trunk to build this network. If you are not familiar with SIP trunk, please refer to "SIP trunk document".

By the way, we suggest different number ranges for different branches. For example, all SIP numbers in branch Hong Kong are in 1xxx format, such as 1000, 1001 and so on. All SIP numbers in branch London are in 4xxx format, such as 4000, 4001 and so on. Please DO NOT mix numbers in branches, it will confuse users and hard for trunk miniSIPServer to analyze the calls to get final routing to target branches.

We will show basic configuration in all these miniSIPServer nodes. Here are some parameters assumed in the network.

Node Location IP address Number format
T-MSS - 9.9.9.9 -
MSS1 Hong Kong 1.1.1.1 1xxx
MSS2 Tokyo 2.2.2.2 2xxx
MSS3 New York 3.3.3.3 3xxx
MSS4 London 4.4.4.4 4xxx
2. T-MSS configuration

T-MSS has two jobs:

  • Setup SIP trunk with each L-MSS.
  • Analyze numbers to route calls to L-MSS rightly.
2.1 Setup SIP trunks

Please pay attention to a special point. In our scenario, each L-MSS cannot connect with other L-MSS, that means media streams cannot be processed between L-MSSes. All media streams between L-MSSes should be relayed by T-MSS.

Relay media stream configuration

Please click menu "Data / SIP trunk" to configure SIP trunks.

SIP trunk ID Description Server address Relay media stream
1 to Hong Kong 1.1.1.1 yes
2 to Tokyo 2.2.2.2 yes
3 to New York 3.3.3.3 yes
4 to London 4.4.4.4 yes
2.2 Analyze called number

It depends on "dial plan" feature of miniSIPServer to analyze calls and get their routing. If you are not familiar with this feature, please refer to "dial plan" document.

Please click menu "Dial plan / Analyze called number" to configure following records.

Dial plan Called number prefix Description Route type SIP trunk ID
default 1 to Hong Kong SIP trunk 1
default 2 to Tokyo SIP trunk 2
default 3 to New York SIP trunk 3
default 4 to London SIP trunk 4

For example, if T-MSS receives a call whose called number has prefix "1", it will be routed to SIP trunk and the SIP trunk ID is 1. In above configuration, we can see SIP trunk ID 1 is assigned to the SIP trunk to Hong kong branch, so the call will be routed to L-MSS in Hong Kong. Such L-MSS will find the final user.

3. L-MSS configuration

Each L-MSS has two jobs:

  • Setup SIP trunk with T-MSS
  • Route non-local calls to T-MSS
3.1 Data / SIP trunk

All L-MSS nodes should have this record to connect to T-MSS.

SIP trunk ID Description Server address Relay media stream
1 to T-MSS 9.9.9.9 no
3.2 Dial plan / Analyze called number

As we said, if calls are not local calls, they should be routed to T-MSS directly.

L-MSS Dial plan Called number prefix Description Route type SIP trunk ID
Hong Kong default 1 Local user
default 2 to T-MSS SIP trunk 1
default 3 to T-MSS SIP trunk 1
default 4 to T-MSS SIP trunk 1
Tokyo default 1 to T-MSS SIP trunk 1
default 2 Local user
default 3 to T-MSS SIP trunk 1
default 4 to T-MSS SIP trunk 1
New York default 1 to T-MSS SIP trunk 1
default 2 to T-MSS SIP trunk 1
default 3 Local user
default 4 to T-MSS SIP trunk 1
London default 1 to T-MSS SIP trunk 1
default 2 to T-MSS SIP trunk 1
default 3 to T-MSS SIP trunk 1
default 4 Local user