Advanced SIP Trunk Settings

This topic describes the advanced settings on a SIP trunk for reference.

Note: The advanced SIP trunk settings require professional knowledge of SIP protocol. Incorrect configurations may cause calling issues. It is recommended to leave the default settings provided on the SIP trunk page. However, for a few fields, you need to change them to suit your situation.

Advanced settings

Codec Settings
Setting Description
Codecs Select the codecs to be offered in the SDP during call establishment to match your ITSP's supported codecs for optimal call quality and bandwidth usage.
Note: The priority follows the order in which codecs are listed.
Supported codecs:
  • G.711 μ-law
  • G.711 A-law
  • G729A
  • G722
  • opus
Intelligent Codec Negotiation Determines whether the system dynamically adjusts codec priority among the trunk's configured codecs during call establishment.

When enabled, the system prioritizes codecs already used by the caller during call setup, as long as they are supported by the trunk.

Note: This applies to both inbound and outbound calls, helping minimize transcoding and improve call quality and performance.
Outbound Caller ID
Setting Description
Outbound Caller ID Number Format Defines the number format of the outbound caller ID for outbound calls placed through this trunk.
Note: This setting applies to Caller IDs selected from the DID pool only. Caller IDs entered manually are sent as configured without modification.
  • E.164 (with +): Standard international format, including the "+" prefix.
  • E.164 (without +): International format, excluding the "+" prefix.
  • National: Local number format without country code.
VoIP Settings
Setting Description
Qualify If enabled, the system periodically sends SIP OPTIONS packets to verify if the trunk is online.
Enable SRTP Enable or disable SRTP (encrypted RTP) for the trunk.
Enable RTP Keep-alive Decide whether to send RTP Comfort Noise (CN) frames during a call to keep NAT and firewall holes open for RTP traffic.

When enabled, the system will send a CN frame to penetrate the firewall if no RTP packet has been transmitted on the trunk for one second, ensuring the transmission of RTP traffic.

Note: This setting is for Register Trunk and Peer Trunk only.
DTMF Mode Set the default mode for sending DTMF tones.
  • RFC4733 (RFC2833): DTMF will be carried in the RTP stream in different RTP packets than the audio signal.

    If selected, you can set the value of the DTMF fmtp attribute in the DTMF fmtp field.

  • Info: DTMF will be carried in the SIP Info messages.
  • Inband: DTMF will be carried in the audio signal.
  • Auto: The system automatically detects whether the device supports RFC4733 (RFC2833). If it does, DTMF tones are sent using RFC4733; otherwise, Inband mode is used instead.
SIP Authentication Error Code Specify the SIP error code returned by the ITSP to indicate an authentication error.
Note:
  • This setting is available only for Register Trunk.
  • You can enter up to 10 error codes; Use ; to separate multiple error codes.
Authentication Registration Attempts Set the number of registration attempts for the system after receiving the SIP Authentication Error Code from the ITSP.
Note:
  • This setting is available only for Register Trunk.
  • The registration attempts defined here include the initial attempt without authentication information.
Global Registration Retry Interval (s) Set the global interval time (in seconds) for retrying registration after receiving any SIP error code (non-200 status code) from ITSP.
Note: This setting is available only for Register Trunk.
Concurrent Call Limits
Configure the maximum number of concurrent calls allowed on this trunk to manage call capacity and prevent resource exhaustion. When a new call arrives, the system checks the corresponding call type limit and the Total Limit. A call is rejected if either limit is reached.
Setting Description
Inbound Limit Set the maximum number of concurrent inbound calls on this trunk.
Outbound Limit Set the maximum number of concurrent outbound calls on this trunk.
Total Limit Set the maximum total concurrent calls (inbound and outbound combined) on this trunk.
SIP Registration Security
Restrict which SIP endpoints can register to the trunk to enhance registration security.
Note: This setting is available only for Account Trunk.
Setting Description
SIP User Agent Registration Authorization Set whether to restrict trunk registration based on user agent.
When enabled, click Add to add the permitted User Agents. Only SIP endpoints that present a configured User Agent are allowed to register to this trunk.
Note: A maximum of 5 User Agents are supported.
Enable IP Restriction Set whether to restrict trunk registration based on IP addresses.
When enabled, click Add to add permitted IP address or IP ranges. Only SIP endpoints from the configured IP addresses or IP ranges can register to this trunk.
Note: You can add up to 5 IP rules.
STIR/SHAKEN
Note: STIR/SHAKEN is an industry-standard framework designed to prevent Caller ID spoofing. For more information about the feature and settings, see STIR/SHAKEN Overview.
Setting Description
STIR/SHAKEN Mode STIR/SHAKEN operation mode for calls routed through the trunk.
  • Disable: Disable the STIR/SHAKEN feature on this trunk.
  • Outbound Signing: The system digitally signs all outbound calls routed through the trunk, excluding emergency and anonymous calls.
  • Inbound Verification: The system verifies all inbound calls routed through the trunk, and rejects calls based on the rejection criteria globally configured for shared trunks.
  • Signing & Verification: The system both signs outbound calls and verifies inbound calls routed through the trunk.
Upstream Verification Result Handling When enabled, the system will solely rely on the verification result provided by the ITSP without performing its own independent verification.
Verification Status Parameter in PAI Header The parameter name in the P-Asserted-Identity (PAI) header where the ITSP includes the signature verification results of inbound calls.
Header Field for SHAKEN Attestation Level The parameter name defined by the ITSP to convey the SHAKEN attestation level of inbound calls.
Enable Call Filtering When enabled, the system will use the verification results provided by the ITSP and reject calls based on the rejection criteria configured on this trunk.
Drop Calls by Verification Status The verification statuses that will trigger call rejection.

Inbound Caller ID Reformatting

When an inbound call is received through this trunk, the incoming caller ID may be in a format that is difficult for users to redial directly. For example, the number may include a country code or prefix that is not needed for local dialing.

You can reformat the caller ID by specifying a pattern to match, then stripping unwanted digits and adding a prefix as needed. The reformatting takes effect before the call is delivered to the called party. Once reformatted, the modified caller ID becomes the standard caller ID and is used for all subsequent inbound route matching.

Setting Description
Patterns Specify the pattern to match against inbound caller IDs. Caller IDs that match the pattern will be reformatted.
Note: Only numbers, characters -, +, *, #, (, ), [, ], and wildcards X, Z, N, ., ! are allowed.
Strip Specify how many digits will be stripped from the beginning of the inbound caller ID.
Note: The valid value is 1 - 16.
Prepend Specify the digits that will be prepended to the inbound caller ID.
Note:
  • Supports digits and characters +, *, #.
  • If both Strip and Prepend are configured, the system will first strip the leading digits then add the prepend digits to the inbound caller ID.

SIP headers settings

The following settings are included on the SIP Headers tab.

Inbound Parameters
For inbound calls, you can specify which SIP headers the system retrieves the Caller ID and DID from.
Setting Description
Get Caller ID From Select the SIP header from which the system retrieves the caller ID.
Note: If the specified header is not present in the SIP message, retrieves the value from the From header instead.
  • From (default)
  • Contact
  • Remote-Party-ID
  • P-Asserted-Identity
  • P-Preferred-Identity
Get DID From Select the SIP header from which the system retrieves the DID (the number the caller dialed).
Note: If the specified header is not present, retrieves the value from the Invite header instead.
  • To
  • Invite (default)
  • Diversion
  • Remote-Party-ID
  • P-Asserted-Identity
  • P-Preferred-Identity
  • P-Called-Party-ID
Outbound Parameters

For outbound calls, you can define the parameters included in the following SIP INVITE headers:

Setting Description
From User Part Define the caller ID (user part of the SIP From header) to be used for outbound calls.

For more information about the available option, see Options of outbound parameters.

From Display Name Part Define the caller ID name (display name part of the SIP From header) to be used for outbound calls.
  • Default: Use the caller ID name associated with the actual outbound caller ID.
  • User Outbound Caller ID Name: The caller ID name associated with the user's outbound caller ID configured in the tenant user settings.
  • Default Outbound Caller ID Name: The caller ID name associated with the default outbound caller ID configured for the trunk on the associated tenant.
  • User Caller ID Name: The caller ID name of a user within the tenant, composed of the user's first name and last name.
  • Originator Caller ID Name: The caller ID name of the original caller in the case that the call is transferred.
    Note: If the original caller is an external number, the system inherits the incoming caller ID name. If no incoming name is available, no caller ID name is sent.
From Host Part Define the domain or IP address (host part of the SIP From header) to be used for outbound calls.
Note: This setting is available only for Peer Trunk.
  • Default: Use the domain or IP address configured in the Domain field when creating the peer trunk.
  • Custom: Use a custom domain or IP address. If selected, you can enter the custom value in the Custom field next to the From Host Part setting.
To Host Part Define the domain or IP address (host part of the SIP To header) to be used for outbound calls.
Note: This setting is available only for Peer Trunk.
  • Default: Use the domain or IP address configured in the Domain field when creating the peer trunk.
  • Custom: Use a custom domain or IP address. If selected, you can enter the custom value in the Custom field next to the From Host Part setting.
Diversion Define the parameters included in the corresponding SIP INVITE headers as needed.

For more information about the available options, see Options of outbound parameters.

Remote-Party-ID
P-Asserted-Identity
P-Preferred-Identity
P-Asserted-Identity URI Format Specify the format of the P-Asserted-Identity URI used to assert and verify the caller's identity.
Note: This parameter is available only when P-Asserted-Identity is set to a value other than None.
  • SIP URI (sip:): Use the SIP URI format, e.g., sip:john@example.com.
  • TEL URI (tel:): Use the TEL URI format, e.g., tel:+15012345678.
Options of outbound parameters
Option Description
Default
  • For the Diversion outbound parameter, the system uses the original call destination number (DID number) as the parameter value when the call diversion occurs.
  • For other outbound parameters, the system selects a parameter by the following priority from top to bottom:
    • Outbound Route Outbound Caller ID
    • User Outbound Caller ID
    • Default Outbound Caller ID
    • Trunk Username (for Register Trunk only)
    • User Caller ID
    • Originator Caller ID
None Do not send the parameter in the SIP INVITE packet.
Outbound Route Outbound Caller ID The outbound caller ID configured on the outbound route within the tenant that uses this trunk (Path: Call Control > Outbound Route > > Outbound Caller ID in the tenant).
User Outbound Caller ID The outbound caller ID configured for a user within the tenant that uses this trunk (Path: Users > Users > > General > Outbound Caller ID > User Outbound Caller ID in the tenant).
Default Outbound Caller ID The default outbound caller ID configured for the trunk on the associated tenant (Path: Tenant > > Assign DIDs > Default Outbound Caller ID in the platform).
Trunk Username The username configured in the trunk (for Register Trunk only).
User Caller ID The caller ID (extension number) of a user within the tenant that uses this trunk (Path: Users > Users > > General > Register Information > Caller ID in the tenant).
Originator Caller ID The Caller ID of the call originator (the first caller in the case that the call is transferred).
  • If the call originator is an external number, the external number will be taken.
  • If the call originator is an internal user in the tenant, the priority order will be User Outbound Caller ID > Outbound Route Outbound Caller ID > Default Outbound Caller ID > User Caller ID.
Custom SIP Headers

Custom SIP headers allow you to define non-standard SIP headers for outbound calls. These headers are defined at the trunk level, and you can specify the value for each header when assigning the trunk to a tenant.

When the tenant makes an outbound call through this trunk, the headers and their corresponding values are added to the SIP INVITE request. This is useful when your ITSP or destination device requires additional information, such as tenant identification or other operational data.

Setting Description
Header Name Specify the name of the custom SIP header.
Note:
  • Supports to add up to 5 custom SIP headers for each trunk.
  • Standard SIP headers will be ignored even if configured.
Other Settings
Setting Description
Maxptime Select the value of the maxptime used when the system sends the INVITE packet.
Note: If you select Default, the system will send a corresponding maxptime value according to the codec that is used for the outbound call.