SIP Trunk

A SIP trunk is a virtual connection that delivers inbound voice calls from the public telephone network (PSTN) to an IP-based phone system over the internet.


Create a New SIP Trunk

To create an inbound SIP trunk, follow these steps:

  1. Navigate to the Voice section in the left-hand menu.

  2. Select Inbound Trunks from the submenu.

  3. Click the Create New button in the top-right corner of the screen.

  4. From the dropdown menu, select SIP Trunk.

Adding a new SIP Trunk

Fig. 1. Adding a new SIP Trunk


Quick SIP Trunk Configuration Guide

To quickly configure a SIP trunk, enter the required information below:
  1. Enter a Friendly Name - Provide a unique name to identify the trunk.

  2. Enter Your Host address - Specify the public IP address or domain name of your server.

  3. Click Create button to save and activate your configuration.

Warning

  • Checking the Assign trunk to all DIDs checkbox will override all previous trunk configurations. Perform this action only if you intend to assign all DIDs to the new trunk.

  • Click Use Recommended Values to apply the most widely supported SIP trunk settings instantly.

  • If the preferred server is set to Auto, ensure your system can accept traffic from all DIDWW SIP IPs.

Basic SIP trunk configuration example

Fig. 2. Basic SIP trunk configuration example



Advanced SIP Trunk Configuration Guide

For advanced configurations, you can customize additional SIP trunk settings. This guide explains the available options based on priority and use case.

The SIP trunk configuration is divided into the following sections:
  1. General

  2. Trunk Group Configuration

  3. Authentication

  4. Media & DTMF

  5. CNAM IN

  6. Advanced Signaling Settings

  7. STIR/SHAKEN



General Settings

General settings in SIP Trunk are required to correctly forward inbound calls to your server. These options define how calls are routed, formatted, and processed.

General Settings

Fig. 3. General Settings

Configure the following settings:

  1. Friendly name - Enter a unique name to identify the trunk.

  2. Capacity Limit - Specify the maximum number of simultaneous calls allowed for this trunk.

  3. CLI Format - Select how the Caller ID (CLI) is formatted for incoming calls:

    CLI Format Options and Descriptions

    Option

    Description

    raw

    Passes the incoming caller ID unchanged (default).

    e164

    Converts the CLI to E.164 format (Country Code + Area Code + Number).

    local

    Converts the CLI to local format (Area Code + Number).

    Note

    CLI format conversion may not work correctly for calls originating from outside the country of the DID.

  4. CLI Prefix - Prepend a custom prefix to the incoming CLI for identification or routing purposes.

  5. Username - Define the user part of the R-URI in the INVITE request.

    Tip

    Use placeholders for default setups:
    • {DID}: Inserts the called DID number (DNIS) in E.164 format.

    • {CALL_CPC}: Identifies the type of the calling party. For more details, see here.

  6. Host - Enter the public IP address or domain name of your server.

  7. Transport Protocol - Choose the protocol for SIP signaling: UDP, TCP, or TLS.

    Note

    TLS is not enabled by default. Contact sales@didww.com to enable it.

  1. Port - Specify the SIP port on your server.

    Tip

    To enable the DNS SRV failover mechanism, leave this field empty. If empty, the system attempts DNS SRV resolution first, then falls back to the A record with port 5060.

  2. Network Protocol - Specifies the IP protocol version used for communication between the SIP trunk and the endpoint. Options include:

    Network Protocol Options and Descriptions

    Option

    Description

    IPv4 only

    Use IPv4 exclusively.

    IPv6 only

    Use IPv6 exclusively.

    Any

    Use either IPv4 or IPv6, based on availability.

    Prefer IPv4 over IPv6

    Prefer IPv4 but fall back to IPv6 if unavailable.

    Prefer IPv6 over IPv4

    Prefer IPv6 but fall back to IPv4 if unavailable.

  3. Preferred server - Choose the DIDWW Point of Presence (POP) for routing:

    • US: LA, MIA, NY

    • Germany: FRA

    • Singapore: SG

    • Hong Kong: HK

    • The Netherlands: AMS

    • Auto: Automatically selects the best POP based on the call origin.

      Tip

      The Auto option is recommended for optimal performance as it dynamically routes calls through the most efficient POP.

      Warning

      • When using Auto, allow all inbound DIDWW signaling and RTP IPs on your equipment.

      • Ensure all POPs are enabled in settings. Disabling any POP may cause unnecessary routing hops.

    View Call Routing Visual Examples by Preferred Server

    The following figures illustrate how incoming calls are routed based on the selected preferred server:

    1. Preferred Server: FRA Calls from the PSTN network reach the DIDWW HK SBC and are routed to the FRA POP.

      Preferred Server: FRA

      Fig. 1. Routing example with FRA as the preferred server.

    2. Preferred Server: Auto Calls are dynamically routed from the same DIDWW SBC that received them.

      Preferred Server: Auto

      Fig. 2. Routing example with Auto as the preferred server.

  4. Resolve rURI - Replace the host part of the R-URI with its resolved IP address.

  5. Resolve DNS SRV record - Perform a DNS SRV lookup for the host in the R-URI to override port settings.



Trunk Group Settings

SIP Trunk group configuration is optional and should only be used when multiple trunks need to be assigned to a single trunk group for failover or load balancing.

Trunk Group Settings

Fig. 4. Trunk Group Settings

To assign a trunk to a trunk group, configure the following settings:

Trunk Group Configuration Settings

Setting

Description

Trunk Group

Select the trunk group to assign the trunk to. If no trunk groups exist, refer to the Trunk Group Creation Guide.

Priority

Determines the order in which trunks are used for routing calls. Trunks with lower priority numbers are used first.

Weight

Distributes call traffic among trunks with the same priority. Trunks with higher weights handle a greater share of calls.

Ringing Timeout

Sets the maximum wait time (in seconds) for a call to be answered.

If the call is not answered within this period, the system disconnects the call due to a Ringing Timeout error.

Use Default Re-routing Disconnect Rules

If enabled, the system applies the DIDWW Default Rerouting Configuration.

Calls are always rerouted unless the SIP error message indicates that the destination is unreachable.

Manual Re-routing Configuration:

If Use Default Re-routing Disconnect Rules is disabled, you can manually configure re-routing disconnect codes:
  1. Select the error code.

  2. Use the Left left_arrow and right right_arrow arrow buttons to move it between the available options.



Authentication Settings

Authentication is an optional SIP Trunk setting that allows the trunk to be authenticated using digest authentication (credentials). Use this feature only if your SIP server requires authentication.

Authentication configuration window

Fig. 5. Authentication configuration window

To enable authentication, configure the following settings:

SIP Trunk Authentication Settings

Setting

Description

Enable Authorization

Enables authentication for the SIP server.

Auth User

Defines the username for authentication.

Auth Password

Defines the password for authentication.

Auth “From” User

Specifies a custom user in the From field instead of the Caller ID.

Auth “From” Domain

Specifies a custom From domain in SIP messages.



Media & DTMF Configuration

The Media & DTMF section allows you to configure codec preferences, Dual-Tone Multi-Frequency (DTMF) signaling, and real-time transport protocol (RTP) settings.

Media & DTMF configuration window

Fig. 6. Media & DTMF configuration window

You can configure the following settings:

1. Select Codecs

You can add or remove codecs between the Available Codecs and Selected Codecs lists.
  • Use the right arrow right_arrow button to move a codec from the Available Codecs list to the Selected Codecs list.

  • Use the left arrow left_arrow button to move a codec back to the Available Codecs list.

Additional Codec Management Options
  • Click “Add All” to move all available codecs to the Selected Codecs list.

  • Click “Remove All” to move all selected codecs to the Available Codecs list.

  • Prioritize codecs by moving them up or down in the Selected Codecs list (the first codec has the highest priority).

For a list of supported codecs, see Inbound SIP Trunk Supported Codecs.


2. Allowed RTP IP Addresses

Define the IP addresses that are allowed to send RTP media packets to this SIP trunk.

  • If left blank, RTP packets are accepted from any source.

  • To restrict RTP sources, enter specific IP addresses or subnets in the following format: IPv4[/mask] or IPv6[/mask].


3. DTMF Format

Define how Dual-Tone Multi-Frequency (DTMF) tones are transmitted between DIDWW and your equipment.

DTMF Format Options

Setting

Description

DTMF format (DIDWW to Customer)

Defines how DTMF signals are sent from DIDWW to the customer.

DTMF format (Customer to DIDWW)

Defines how DTMF signals are received by DIDWW.

For more details, see DTMF options.


4. RTP Settings

Configure real-time transport protocol (RTP) behavior to manage media streams.

Setting

Description

RTP Timeout

Defines the maximum time (in seconds) before a call is disconnected if no RTP packets are received. The value should be between 5 and 600 seconds.

Force Symmetric RTP

If enabled, the trunk operates in Symmetric RTP (COMEDIA) mode.

RTP Ping

If enabled, sends RTP ping packets to keep the media session active.

Symmetric RTP Ignore RTCP

If enabled, only RTP packets are considered for media path switching, and RTCP packets are ignored.


5. Media Encryption

DIDWW supports TLS for secure SIP signaling and SRTP for media encryption.

The following SRTP negotiation methods are supported:

Note

SRTP media encryption is disabled by default. To enable it, contact our sales team at sales@didww.com.



CNAM IN

SIP Trunk CNAM IN settings allow retrieving and displaying the caller’s name for U.S. phone numbers on incoming SIP trunk calls.

CNAM IN configuration window

Fig. 7. CNAM IN configuration window

Inbound CNAM Lookup

When enabled, this feature performs a CNAM lookup for incoming calls from U.S. phone numbers and displays the caller’s name.

  • The system queries a remote CNAM database when a call originates from the U.S..

  • Billing applies only if the lookup is successful.

  • The retrieved CNAM name is included in the From header as the Display Name.

Warning

If a Trunk Group is used and any of its trunks have the CNAM IN feature enabled:

  • A CNAM lookup will be performed for all incoming calls.

  • A successful lookup will be billed additionally per call.

  • The retrieved CNAM value will be displayed only for trunks with CNAM IN enabled.

CNAM in the SIP From Header

The following examples show how CNAM appears in the From header:

  • CNAM IN not enabled: "12899230448" <sip:12899230448@46.19.213.14>;tag=24-6917EC3D-6453984E000C1C1E-5EA5B700

  • CNAM IN enabled and lookup successful: "KRIS TOTAL" <sip:15203981500@46.19.213.14>;tag=24-7EB42886-645381060002B85A-5EB5C700

  • CNAM IN enabled but lookup failed: "Unavailable" <sip:15203981500@46.19.213.14>;tag=24-7EB42886-645381060002B85A-5EB5C700

The CNAM value is also displayed in the Source Name field in inbound call logs.



Advanced Signaling Settings

The Advanced Signaling Settings section allows you to configure SIP session management, transaction timeouts, and failover behavior. These optional settings help maintain call stability, prevent unnecessary call drops, and optimize failover handling in case of network failures.

Advanced Signaling Settings

Fig. 8. Advanced Signaling Settings

1. Session Timers

Session Timers ensure that SIP sessions remain active by periodically exchanging messages. If a session remains idle for too long and the other endpoint is unresponsive, the dialog is automatically terminated. For more details, refer to RFC 4028.

Setting

Description

SST Enabled

Activates SIP Session Timers. Ensures that SIP dialogs remain active by sending periodic keep-alive messages.

This feature requires support from both endpoints and is standardized by the IETF.

SST Accept 501

Prevents call drops when receiving a SIP 501 response for non-critical messages.

SST MIN Timer

Sets the minimum session timer value (default: 600 seconds).

SST MAX Timer

Sets the maximum session timer value (default: 900 seconds).

SST Session Expires

Defines the Session-Expires header value (must be within the MIN and MAX Timer range).

SST Refresh Method

Specifies the SIP method for session updates: INVITE, UPDATE, UPDATE (Fallback to INVITE).

2. Timeout and Failover Settings

These settings control SIP transaction timeouts and rerouting behavior.

Setting

Description

SIP Timer-B

Defines the timeout for an INVITE transaction (default: 8000 ms). For more details, see RFC 3261 Section 17.1.1.2.

DNS SRV Failover Timer

Specifies the timeout per gateway when using DNS SRV-based failover (default: 2000 ms).

Max Transfers

Sets the maximum number of REFER requests allowed per call (default: 0).

Max 30x Redirects

Defines the maximum number of 301/302 SIP Redirect responses that will be followed (default: 0).



STIR/SHAKEN

The STIR/SHAKEN framework helps prevent caller ID spoofing by verifying the authenticity of the calling number. This section allows you to configure caller ID attestation headers.

STIR/SHAKEN Settings

Fig. 9. STIR/SHAKEN Settings

Transit Identity Headers

Defines whether STIR/SHAKEN headers should be included in SIP INVITE messages. The following options are available:

Option

Description

Do not send Identity header

No additional STIR/SHAKEN headers are included.

Transit Identity header

Includes the standard Transit Identity Header in SIP INVITE messages.

Add PAI, P-Attestation-Indicator, P-Origination-ID

Adds these attestation and identity headers to the SIP INVITE request.

Transit Identity header + Add PAI, P-Attestation-Indicator, P-Origination-ID

Includes both Transit Identity Header and additional attestation headers in the SIP INVITE request.

Add P-Stir-Verstat, P-Attestation-Indicator, P-Origination-ID

Adds verification status and attestation headers to the SIP INVITE request.

This option is supported by default and does not require enabling Identity Header Transit.

Note

The Transit Identity Header is not enabled by default. To enable it for your DIDWW account or from the originating side, contact our sales team at sales@didww.com.



Additional Information

General SIP Information

Learn more about DIDWW inbound signaling, RTP IPs, supported codecs, DTMF transport methods, and encryption.

General SIP information
Assign Trunks to DID Numbers

Learn how to configure DID numbers with trunks and trunk groups for routing inbound calls.

Assign Voice Trunk
Create a Trunk Group

Discover how to create and configure a trunk group for failover and load balancing.

Trunk Groups
STIR/SHAKEN

Understand STIR/SHAKEN, how it works, and the available handling modes for the Voice IN service.

STIR/SHAKEN
CPC Usage

Explore the Calling Party Category (CPC), its functionality, and usage examples in SIP URIs.

CPC Usage