Courseware:IT Plus - SIP interface
The book gives a deeper understanding how to set up SIP interface
Introduction
Scenario description

Please upload the start configuration this lesson to your devices, afterwards click
the button on your device page to upload the startup configuration to your app services as well.Trunks Settings plugin
Set up the following DDI SIP trunk. Afterward, we will explore the advanced configuration to review what the plugin has done and examine opportunities for further optimization. To do this, well activate Expert Configuration right from the beginning.- Name and SIP:
trunk
- Number:
0 - interface/SBC:
hq.dvl-ckl2.net
This option determines on which device the SIP interface will be configured. In the following chapters, we will take a closer look at what an SBC is and explore the different design options available.Default SIP Trunk
- Country Code:
+43
- Connection type:
DDI
- International number:
+43192258541
- Lowest extension:
0
- Number mappings:
+43192258541 -> <empty>
- User:
sip92258541
- Password:
ip411
- Protocol:
UDP
- Domain:
sip.dvl-ckl2.net
- Proxy: <leave empty>
- Media Relay:
on
- Expert Mode:
on
The Expert configuration is only available when editing an existing trunk, not when creating a new one. Once enabled, the configuration of the Trunks plugin cannot be changed. If you make a typo or select an incorrect property, you must delete the entire trunk and start over.SBC functionality
The innovaphone SIP interface, available on all gateways, implements all the functions typically provided by a Session Border Controller (SBC) for SIP trunk connections. These functions include:
-
Protocol translation (SIP vs. H.323)
-
Security offloading (e.g., encrypted/unencrypted conversion)
-
Media pin-holing (NAT traversal, ICE/STUN/TURN)
-
Media anchoring (media relay)
-
Header manipulation (for SIP interoperability issues)
The SIP interface is separate from the PBX because it is embedded in the gateway layer of the device. Although in most installations the SBC and PBX run on the same device, different internet access scenarios may require the SBC to run on a separate device. We will explore these scenarios in the following chapters.
SBC in DMZ

To implement this setup, you install an innovaphone gateway platform (such as an IPVA or IP0013) in the DMZ. Signaling traffic to the SIP provider is handled by the SBC via the SIP interfaces (SIP-IFs), and RTP traffic is managed by the SBC when media relay is enabled for the SIP interface.
SBC on Router

SBC internally

This configuration is recommended when supporting a high number of concurrent SIP trunk calls with media relay is necessary. This shifts the load imposed by the media relay function away from the PBX, enabling you to safely support a greater number of extensions.
SBC internally with PBX

This is the most popular configuration because it creates small, simple setups. However, keep in mind that the media relay consumes network and CPU load. Running an SBC with media relay on the same box that runs the PBX limits the number of extensions that can be safely supported on that box.
SBC internally with PBX - SIP interface without registration

No-Nos

SIP Interface
Please open the SIP interface configured by the Trunks plugin,
assign it a meaningful name, and click OK to save your configuration.
reference article in the wiki.General Configuration
always initiated by the device unless the checkbox Without Registration is set. In this case no registration is done at all. In order for the SIP interface to know where to sent its registration attempt only an address has to be specified.- Type: Unless you are setting up a federation with another PBX, select the Provider option. This allows you to establish a connection to a remote SIP endpoint, such as a SIP provider.
- Transport: Choose the transport layer protocol: UDP, TCP, or TLS. All three support operation with or without registration, depending on whether the Without Registration checkbox is enabled.
- AOR (Address of record): This is the registration ID used by the SIP interface to register with the provider. It typically consists of a user part and a domain part (e.g., user@provider.com).
- Local Port: You can define a local source port for this interface. It's recommended to leave this field blank so that a random port is chosen. If you manually assign a specific port, this port cannot be used by another SIP interface. For example, if two SIP interfaces are configured to use port 5060, only one will work due to the port conflict.
- Local Hostname: The SIP interface compares the Domain/IP Address configured here against the domain part of the TO field and removes it if they match. This is only relevant for SIP federation scenarios.
- Proxy: By default, the destination of each SIP message is derived from the domain part of the AOR. If that domain cannot be resolved or used properly, you can manually specify the destination (Proxy) address here.
- Type is set to Provider. This is the expected behavior, as the Trunks plugin does not support the configuration of SIP federationthis must always be configured manually.
- The Protocol is set to UDP, which matches the selection we made in the Trunks plugin.
- The Without registration flag was not set. As a result, the PBX will create a registration on the IP811.
- The AOR user part is set to
sip92258541 , which corresponds to the Username field we entered in the Trunks plugin.
- The AOR domain part is set to
sip.dvl-ckl2.net , which reflects the Domain value we configured in the Trunks plugin.
STUN Server
In practice, most SIP providers implement NAT detection. This allows them to determine the correct IP address and port to send media data to, even if the received address is private. As a result, in most cases, you dont need to configure a STUN server.
However, some providers do not support NAT detection. In such cases, it may be necessary to use STUN, and possibly media relay, to establish proper communication.
If you configure a STUN Server address, the SIP interface uses the STUN protocol to discover its external IP address and port.
As shown in the picture, the SIP interface sends a STUN request to the configured STUN server. Since the device is behind a NAT router, the NAT changes the source address of this request to its own public address. The STUN server then examines the source address and informs the SIP interface of the public IP and port from which the request was received.
- The Contact header in SIP REGISTER messages.
- The connection information (c-line) in the SDP, if media relay is enabled.
If the device is behind a symmetric NAT, the external address learned via STUN is not used, as it would be ineffective. A symmetric NAT only allows responses from the exact destination to which the request was sentno other external device can reuse that NAT mapping. Authorization
| Username | leave empty |
| Password |
Media Properties
media properties are applied to fine-tune signaling and RTP traffic.- General Coder Preference: This option allows you to select your preferred codec. If you configure this codec exclusively, the provider must support it. Otherwise, the SIP endpoint will reject the offer with a 415 - Unsupported Media Type response.
- Enable T.38: Enable this option to transmit faxes digitally using the T.38 protocol. Many providers do not support T.38, so in such cases, this option should be disabled.
- Media Relay: When enabled, RTP traffic is
passed through the SIP interface. This means the provider will exchange media directly with the PBX's IP address rather than the IP address of the calling endpoint. Since many providers do not support media traffic to multiple IP addresses, you should set this dropdown to On in those cases.
- No ICE: This checkbox disables ICE (Interactive Connectivity Establishment), so no ICE candidates are sent to the remote side. ICE is a mechanism to dynamically select a suitable transport path for voice data. Since most SIP providers do not support ICE, you will generally check this option to avoid interoperability issues.
- SRTP Key Exchange: This dropdown determines the protocol used to exchange the SRTP key. You can choose between SDES and DTLS or prioritize one over the other. Selecting "No encryption" means the voice data will be sent without encryption.
this wiki page.
Enabling media relay along with an exclusive codec allows the SIP interface to enforce the codec choice, which often resolves interoperability issues with provider equipment.
As mentioned, many providers do not support T.38. As a result, please deactivate it.SIP Interop Tweaks
this wiki article.Internal Registration
only two parameters are needed for a successful internal registration.| Protocol | |
| Gatekeeper Address(primary) |
As soon as you register an interface with the PBX (except for a GWx interface), two direct routes are created between the interface and the VoIP interface used for registration. These VoIP interfaces are named R plus a short name for the interface in question, followed by the optional interface index. For example, the implicit VoIP interface for the SIP1 interface of our IP411LEFT is called RS1.| Interface Type | Shorthand | Sample |
| SIPx (SIP client) | S | RS2 |
| TELx (FXS) | AB | RAB2 |
| FXOx (FXO) | FX | RFX2 |
| BRIx (basic rate ISDN) | B | RB2 |
| PRIx (primary rate ISDN) | P | RP2 |
| TEXT | TEXT | RTXT |
| TEST (constant MoH) | TST | RTST |
| TONE (dialtone) | TON | RTON |
| HTTP (webmedia HTTP client) | WEB | RWEB |
| ECHO (test echo) | ECH | RECH |
| SIGx (virtual signalling) | SP | RSP2 |
| FAX | FAX | RFAX |
| CONF (conference) | CONF | RCNF |
| SCNF (soft-conference) | SCNF | RSCF |
Testing the SIP interface
Now call Interface maps
the interface maps already created by the Trunks plugin.
A new window will appear allowing you to configure the following:- CGPN In: inbound calling party number
- CDPN In: inbound called party number
- CGPN Out: outbound calling party number
- CDPN Out: outbound called party number
- A CGPN In map modifies the calling party number (From number) of a call coming from the provider to the gateway.
- A CDPN In modifies the called party number (To number) of a call coming from the provider to the gateway.
- A CGPN Out modifies the calling party number (From number) of a call from the gateway to the SIP provider.
- A CDPN Out map modifies the called party number (To number) of a call from the gateway to the SIP provider.
Next, we need to determine the number format used by the SIP provider, both for sending and receiving calls. Unfortunately, there is no universal standard. Most providers either use the full E.164 format (e.g., +497300912345610) or an international format with a prefix (e.g., 00497300912345610), but this can vary significantly.
This variation in behavior is why we provide tested Trunk profiles for many common providers, as mentioned earlier. It is highly recommended to use these profiles whenever possible.
In this fictional scenario, the SIP provider simulation expects to receive and send numbers in full E.164 format, with a plus sign (+) prepended.
Please open the syslog on Inbound call
CGPN-IN
Let us discuss the inbound call first. So please go ahead and call - If the call is coming from an Austrian extension, the country code is removed and instead the national prefix is added.
- If the call is an international call, the international flag is removed and exchanged with the internal prefix 00
CDPN-IN
The PBX expects to receive only the extension number of John Doe, which is 14 in our case. Therefore, we need to strip our own trunk access number.
If you have more than one interface map, the list will be evaluated from top to bottom. The first matching map will be used.
Outbound call
Please call CDPN Out
To improve the configuration we can
change the international prefix to the international flag, which is translated to a plus sign by the SIP stack.CGPN Out

Routing Engine Maps
Inbound route
Outbound route
Please open the syslog and then let's do another outbound call and dial No transformation is applied to the CDPN; it remains unchanged.
To explain the purpose of the TONE interface: when the caller goes off-hook and dials "0," they hear a dial tone. This behavior mimics what users expect from analog or ISDN lines. However, SIP trunks do not provide this natively, so the TONE interface is used to simulate this behavior. If overlap dialing is not performed, the system proceeds to the next map.
Calls without CDPN
Start your syslog again and call
incomplete value in the trunk object.
Please set the incomplete value to Force Enblock
MSN Trunk
So far, we have only discussed the use of a DDI trunk, which allows you to have a range of extensions. In the remainder of the book, we will explore how the Default SIP trunk is configuring MSN trunks:
-
A trunk with Multiple Subscriber Numbers (MSN), where there is one registration with the provider for each MSN
-
A trunk with Multiple Subscriber Numbers (MSN), where there is a single registration with the provider for all MSNs
MSN - single registration
select No in the Default SIP Trunk configuration. Afterwards you
can define number mappings. These mappings specify the MSN numbers provided by your SIP provider and the corresponding internal numbers they are mapped to.Routing Table
!->00431922585411. The exclamation mark means that any incoming CGPN (Calling Party Number) digits are removed and replaced with 00431922585411.In other words, any unknown extension number is mapped to the external MSN number you configured as the first map in the Trunks plugin.Interface maps
the interface maps. All CGPN-Out maps (expect the map 00-> I) will not apply, as the routing maps already handle the necessary transformations.MSN - individual registrations
select Yes as individual registration in the Default SIP trunk configuration.
add a different username and password for each MSN number. Once completed, you will have a separate SIP interface for each MSN. Keep in mind that a maximum of 16 SIP interfaces is supported.Routing Table
only the first SIP interfaces has an internal registration to the trunk object. All other SIP interfaces register with the SIP provider's SBC.
The routing table is configured so that inbound calls from each interface are routed to RS1. For outbound calls, the extension number is evaluated (verify CGPN=true), and the call is routed to the corresponding SIP interface based on the originating extension.Interface maps
The interface maps are identical to the single-registration variant. However, in this case, each interface only maps its own MSN to the corresponding internal extension.
If you're looking for hands-on practice, please continue with the next book, where we offer more practical exercises and in-depth configurations.