Course13:IT Connect - 05 Using Trunks

From innovaphone-wiki

Jump to: navigation, search

This book explains how to set up an external trunk by using the PBX Manager Plugin Trunks


The PBX Manager Plugins

So far, all relevant system configuration has been done for us by the Install. Of course, you also want to do modifications to the system configuration later on. This is what the PBX Manager is for.

You can video2.png find it in the list of all Apps and add it to your home screen (best in the Admin Tools group).

When you open the screenshot.png PBX Manager App, you will find a number of icons. Each icon is known as a PBX Manager Plugin which are used to configure a component of your PBX or your App Platform. The exact type and number of such plugins depends on the PBX firmware (all the "black & white" plugins are provided by the PBX) and the Apps you have installed (all the "coloured" plugins with an AP prefix are provided by the installed Apps). This book will only focus on the trunks plugin, while other plugins will be explained later on.

The Trunks Plugin

The Trunks PBX Manager plugin has one simple task. It should allow you to set up a trunk to connect your PBX to the PSTN. This can be achieved by configuring a FXO, BRI, PRI or SIP interface on one of your devices.

Since we have no time to waste let's get straight to work and open our screenshot.png PbxManager App.

Creating a SIP Trunk Line

By clicking on thescreenshot.png trunks icon you will gain the possbility to add a trunk to your current system. You have to give our video2.png trunk a name and a number. The external line number is usually 0 but this can vary depending on your country or your needs.

Additionally this section let's you set up any call forwardings for calls that pass through our trunk but weren't connected or the destination is the number of the trunk itself (loopack). Those call forwardings are usually used to reroute calls to a central switchboard. We will discuss how to configure a switchboard later on in the course.

For now let's screenshot.png reroute calls to Mario Rossi - 13. Afterwards you need to press OK.

As a next step we will screenshot.png select the newly created trunk and link the trunk directly to an Interface. Simply press the screenshot.png Add button and a list of devices will appear. At the moment we don't have much of a choice - so let's choose

In the next step we have to decide if we want to configure a Interface or SBC.
  • Interface
  • In this context interface means that we talk about a physical interface to create an external connection with. This might be a FXO, BRI or PRI. Since innovaphone gateways differ, not all physical interfaces are present on each device. You have to choose the correct product according to your needs.
  • SBC
  • SBC is an abbreviation for session border controller which is used to set up a SIP connection to your SIP Provider. You can either use the SBC functionality on the same device as your PBX or you can outsource it to a different device and place it in your DMZ.
The upcoming chapters will focus on the configuration of a SIP Trunk, therefore select SBC.

Afterwards you have to select the country of your SIP Provider. If you choose your desired country you will see a list of implemented SIP Profiles. The purpose of those SIP Profiles is to help you set up a SIP trunk with all necessary SIP tweaks to communicate with your provider. Unfortunately this is necessary because there is no SIP trunk standardization yet and not all providers tend to behave the same. Each SIP Profile will tailor a a specific configuration for a single SIP provider. You just have to fill out the account data and the rest is done for you.

If your SIP trunk product is not part of our firmware you have the option to select Default SIP Trunk which creates a generic SIP Trunk configuration which will work for most SIP providers.

We will talk about this feature in the upcoming chapters so please select the video2.png Default SIP Trunk.

Default SIP Trunk

The Default SIP Trunk launches an interactive menu which will guide you through the configuration of a SIP trunk if no matching SIP profile exists. The Default SIP Trunk allows you to configure the following connection types depending on the SIP trunk product you use:
  • a trunk with Multiple Subscriber Numbers (MSN) and one registration towards the provider for each MSN
  • a trunk with Multiple Subscriber Numbers (MSN) and a single registration towards the provider for all of the MSNs
  • a direct dial-in trunk (DDI), which allows you to have a range of extension numbers

Country code

The first question of the Default SIP Trunk is which country your SIP Trunk is located in. Therefore you need to enter the country code prepended by a + sign. Every country has a wikipedia.ico different country code and it is used to call a number in a different country. In other words, if you call a German number from Italy you have to dial the international prefix (00) followed by 49, the German country code, to reach the desired number.

Please use the following country code: +49

Connection type

Afterwards you have to decide if you want to create a MSN or DDI trunk. If you got a DDI trunk from your provider, you should have received a subscriber number and a range of extensions. Internal extensions are reachable by adding the extension number to the end of the dialed number. If the provider gave you a MSN trunk you should have received a set of numbers which may or may not be consecutive. These numbers have to be mapped to reach internal extensions.

Let's first discuss the MSN trunk so please choose MSN as option.

MSN - single registration

Individual registration

Depending on your provider you might have to register each MSN number individually at the provider. If you got a username and password for each number you need to click Yes. If a single username and password is sufficient you need to press No.

Let's discuss a single registration scenario at first and so please click No. We will talk about a multiple registrations MSN trunk in the next chapter.

MSN - single registration

Number mappings

The next step is to create number mappings which allow you to map the external MSN number to an internal extension number. As soon as you are satisfied with the configuration of your map you need to press the checkmark icon to lock your configuration. Before pressing the OK button all maps have to be locked because all maps in editing mode will be lost otherwise. If you click the trash can icon all maps in editing mode, which weren't saved before, will be deleted. Pressing the plus icon allows you to add further maps.

Please create number maps for those MSNs like shown in video2.png this video.

MSN number
Internal extension
+4962134282351 10
+4962134282358 11
+4962134282359 12
+4962134282376 13


After configuring the maps you need to enter username and password to authenticate your SIP trunk at the provider.

Please use this credential to authenticate your trunk at our provider simulation.



As last step of the configuration we need to add IP specific Data to your configuration.
  • Disable: As long as the disable flag is active the interface won't send a Register to the provider nor will listen to an incoming SIP message.
  • Protocol: You can decide which transport protocol to use for the transmission of SIP packets. You can either use SIP over UDP, SIP over TCP or encrypted TLS transport.
  • Domain: The domain name is used to identify a network by its name. You will usually configure a subdomain of your provider.
  • Proxy: This configuration is optional because a DNS lookup of the domain will retrieve the proxy address. The Proxy is used as IP endpoint of the SIP signaling messages.
  • Media relay: By activating the media relay flag you will reroute RTP traffic through the SBC. Without the media relay flag RTP Traffic will be sent directly from endpoint(phone) to the provider and the other way round.
We prepared a provider simulation for you test. Please use this parameter to finish your configuration.

leave empty
Media Relay


To see if your registration was successful you need to reopen your trunk and check the top of the default SIP trunk menu. You will see screenshot.png a checkmark next to the IP address it registered to.

You have three possibilities to see if your trunk is actually working:
  • You can either call a test hotline which is reachable at this numbers:
00 900 12345678
  • You can simply call yourself at one of these numbers:
00 621 34282351
00 621 34282358
00 621 34282359
00 621 34282376
  • You can ask a fellow student for his number. He will be reachable through the provider simulation.

MSN - multiple registrations

If you are satisfied with your configuration let's go through the MSN - multiple registration scenario now. I'd recommend to delete your trunk and start again from scratch. I'm pretty sure you know which steps to take to get to the decision if you want an individual registration or not.

Let's now talk about the multiple registrations scenario and please click Yes.

MSN - multiple registrations

Number mappings & credentials

In the multiple registrations variant you are faced with a screenshot.png more complex menu. Next to every map you have to configure a username and password matching to this MSN. The configured credential is used to authenticate this particular number at the provider. Please be aware that you need to lock all maps by clicking the checkmark icon before you press OK. A line in editing mode will be lost otherwise.

Please use these configuration parameters to set up your multiple registrations MSN trunk.

MSN number
internal extension
SIP username
SIP password


This dialogue might look familiar because we discussed it in the previous chapter.

Again we need to configure the Domain.

leave empty
Media Relay


In this scenario we need to check if each number successfully registered at the provider. Therefore please reopen your trunk. You will see a checkmark screenshot.png next to each SIP credential. Each checkmark indicates a successful registration for this number.

Again you have three possibilities to test your trunk configuration:
  • You can call a test hotline at this number:
00 900 12345678
  • You can call yourself at one of these numbers:
00 621 34282323
00 621 34282327
00 621 34282335
00 621 34282336
  • You can ask a fellow student for his number.


International number

If you choose the DDI trunk option you are asked to insert your trunk number in international format.

Please use this number as your DDI trunk: +496213428231

Lowest extension

In contrast to a trunk with multiple subscriber numbers (MSNs) where (usually up to 10) random subscriber numbers are associated with the trunk, all extensions of a direct dial in (DDI) trunk share the same prefix. e.g. 621342823xx. This is known as a full two-digit number block. That is, the trunk owns the full number block from 0 to 99. If your provider assigns you the 6213428231x number block, you've got a full single-digit number block. Number blocks are a limited resource, so larger number blocks are usually more expensive and often you need to demonstrate a real need to have one assigned to you.

However, you may also get a partial number block assigned. In this case, still all the numbers associated with the trunk share the same prefix (e.g. 621342823). The difference is that not all of the numbers in the block are yours. For example, you could have assigned 62134282370 to 62134282399 only and another customer may have assigned 62134282340 to 62134282369.

In our sample trunk, you will have a full number block, so the Lowest extension is 0.

Number mappings

If you are lucky, your trunk has a full number block and it's size matches the size of the internal extensions you use. For example, in our little PBX, we use extension 10 to 13 and we could use all the other extensions up to 99, so we have a full two-digit internal number block for the extensions.

However, in Germany the PSTN has a number length of 11 digits. Our DDI subscriber number (6213428231) therefore leaves one digit for the extension. So we need to map the external one-digit extensions to the internal 2-digit extensions and vice-versa.

So whenever
  • the size of the internal and external number block does not match
  • the trunk has a partial number block only
we need to create maps between internal and external extensions.

As you see, an initial map has been created already:

+496213428231 ->

This will map map all external numbers to just the digits that follow your trunk's subscriber number (hence the right side is empty). This single map is good, if your external number block matches your internal extensions.

Perhaps this already sparks your imagination because this would allow you some fancy configuration. You could create a map like this:

+4962134282319 -> 23

This map exchanges the extension number 9 to 23.
But you can also map a whole number block. Each extension number starting with 5 can be mapped to a number starting with 8.

+4962134282315 -> 8

However, in our scenario, although we have a full number block externally, we need to map it from a one-digit external to a two-digit internal number block.

We could for example map

+4962134282310 -> 10
+4962134282311 -> 11
+4962134282312 -> 12
+4962134282313 -> 13

This allows us to explicitly map each extension individually. However, in this case, we could also simply match

+496213428231 -> 1

This map would map our DDI's subscriber number (+496213428231) to a 1 and any extra digit would be appended to that (for example, +4962134282313 would be mapped to 13).

By chance, our subscriber number ends with the first digit of the internal range we intend to map to (1). So the map can even be simplified as

+49621342823 ->

In many countries, it is a habit to have extension 0 connect to a switch-board. We also want to configure this and therefore, we do not want to map the external extension -0 to the internal extension -10. Instead, we shift all the extensions by one so that -0 is free again for the switch-board:

+4962134282310 -> 0
+4962134282311 -> 10
+4962134282312 -> 11
+4962134282313 -> 12
+4962134282314 -> 13

Don't forget to save the map by pressing the check-mark icon before you press OK because maps in editing mode won't be saved.

(Further Hints) Some countries (including Germany and Austria) have open numbering plans. That is, numbers can vary in length. In such networks, you might be able to dial longer numbers than your numbering block allows for. If you look at innovaphone's subscriber number (+49 7031 73009) and taking in to account that Germany has a number length of 11 digits, we should have room for a 2-digit number block. In fact however, we can dial much longer numbers so that we are using a 3-digit number block. However, this is unreliable and some of our extensions can not be reached when they are called from abroad for example.


Again we need to authenticate the trunk at the provider. Therefore we need to enter a username and password.

Please use this credentials to authenticate your SIP trunk at our provider simulation.



The last step of the configuration is identical to the MSN trunk.

You have to add IP specific Data to your configuration.

leave empty
Media Relay


In case you are curious if your configuration worked or not, I would recommend to check if your trunk is registered at the provider. The successful registration is indicated by screenshot.png a checkmark in the top of the SIP default trunk menu.

Again you have three possibilities to see if your trunk is actually working.
  • You can either call a test hotline:
00 900 12345678
  • You can call yourself. Simply dial the following number from Jean Dupont:
00 621 3428231 -1
  • You can ask a fellow student for his number. He will be reachable through our provider simulation. Don't forget to add the extension number of the desired destination to the dialed number.
Personal tools