Trunk Settings
From Pbxnsip Wiki
Contents |
Name and Type
After you have created a trunk, you may change the name and the type. The name must consist of alphanumeric characters and may contain spaces. The trunk type can be selected by a selection box.
General Parameters
The "Display Name", the "Account" and the "Domain" are used to construct the address that the PBX registers. The account must be a valid SIP account identifier and the display name is used for display purposes. For example, the display name could be "Test Account", the account "test-account" and the registrar "test.com". Then the PBX would register "Test Account" <sip:test-account@test.com>.
The "Username" and the "Password" are used for authentication purposes. Some registrars use a different username for authentication; therefore the PBX includes this field as well. The password needs to be entered twice, so that accidental wrong entries can be detected.
The "Outbound Proxy" defines where requests of this trunk will be sent. If this setting is set, it will always send requests to this other address. Otherwise, the dial plan replacement field will determine where the request is being sent. However, in most cases it is better to use the outbound proxy field to make things clear.
The outbound proxy field follows the definitions of RFC 3263 ("Locating SIP Servers"). In a nutshell, you may use the DNS name for a SIP server. If you put a colon with the port number behind the name, you use only DNS A resolution. Otherwise, the PBX will try DNS NAPTR and DNS SRV first.
The "CO-Lines" and "Dialog Permissions" settings are discussed separately in CO Lines.
If the "Codec Preference" setting is set, the PBX will use a different codec preference on this trunk. Valid codecs are "0" (G.711 u-law), "8" (G.711 a-law), "18" (G.729), "2" (G.726) and "3" (GSM). You may list the preferred codecs. The PBX will try to negotiate the first codec. If you specify only one codec, you might end up with transcoding of the speech.
Some internet service providers still require that you present a public IP address when you want to use their service. Although this way of registering and using a SIP service is quite problematic, the PBX offers a setting that uses an external STUN server to allocate a public IP address.
You can use the "STUN Server" setting in the following ways to resolve an address:
- If you just provide a DNS name, the PBX will try to locate a DNS SRV record for the STUN server. Only if that record does not exist, it will use a DNS A record
- If you explicitly specify the port number behind the DNS name for the STUN server, the PBX will only perform a DNS A lookup for the STUN server address.
- If you just provide an IP address, it will use that IP address. If you don't provide a port number, the PBX will use the default STUN port number (3478).
We recommend not to use this feature and consider a different ITSP if they do not support registrations from behind NAT.
If you specify a "Keep-Alive" time, the PBX will resend the STUN requests after the provided keep-alive time. If you use the keep-alive time setting without a STUN server, the PBX will ignore the registration time from the registrar and re-register after the provided time. This is sometime necessary when providers don't use proper solutions for keeping bindings alive.
The setting "Strict RTP Routing" is necessary, because the IETF allows that RTP traffic send ports may be different from RTP receiving ports. Because this is extremely NAT-unfriendly, today most implementations use the same port number for sending and receiving RTP. However, some gateways still insist on strict IETF compatibility. In this case you need to turn this setting on.
If your registrar does not support UUID (RFC 4122), it usually ignores this unknown additional information. However, some SIP implementations are not able to deal with UUID. In this case, they will report a "Bad Request" to indicate that they were not able to process the request. We added the option "Avoid RFC4122 (UUID)" to explicitly suppress the UUID in REGISTER requests. The UUID is used to indicate that a registration replaces another registration; this is useful to avoid double registration after a restart of the system.
The setting "Accept redirect" is necessary if your trunk should respect redirect codes. By default, this introduces significant security risks, because the PBX cannot determine if these redirects introduce additional costs (redirection to expensive numbers). Therefore, you should turn this flag on only if you are sure that your service provider does not abuse this feature.
Outbound Settings
If you have a block of caller-ID for outbound calls, you may just put a number in front of the extension number ("Prefix"). This is typically the case in European installations. For example, if you put a "0049228123456" in this setting, calling from extension "123" will result in the caller-ID "0049228123456123".
You may decide if this trunk should be visible also in other domains. If you turn the setting "Visible in all dial plans" on, this will be the case.
The setting "Explicit Remote-Party-ID" and "Privacy Indication" are discussed in Outbound Calls on Trunk.
When the trunk receives an error code, it may send the call back to the dial plan and continue the matching process. The PBX continues the dial plan with the next higher priority, entries with a lower or same priority are not used. This is useful when this trunk is just a "trial" to place the call, for example when several PSTN gateways are available for terminating the call and one gateway does not accept any more calls. Another example is when you first try to route the call via a peer-to-peer call using ENUM or other location methods and only if such resolution does not result in a connection fall back to a PSTN call. The setting allows three behaviors:
- Never failover. That is the default behavior. In this case, the caller will receive the error code as the result of the call attempt.
- On all error codes. In this case, all error codes will trigger the failover process. Note that also call redirect will be treated as a error code, as the redirection destination can easily be abused to route calls though expensive routes.
- Only 5xx error codes. This will trigger failover only when a 5xx or 6xx class error code is being received. PSTN gateways typically return 5xx class error codes when all channels are in use, and using this mode you can switch to the next PSTN gateway only in this case, while a caller busy will not trigger the failover.
The Is Secure flag is available in the professional version and is used to indicate that outbound calls on this trunk can be treated as secure calls. For example, when the trunk goes to a local PSTN gateway you might decide to treat this call as a secure call. In the professional version, incoming calls with the sips scheme ask the PBX to ensure that the call should be kept secure end-to-end.
Inbound Settings
The setting "Extension" is discussed in the section Inbound Calls on Trunk.
The "Ringback" feature was introduced to deal with network operators that are obviously not able to deal with early media. Using the 180 Message simplifies the signaling in forking calls scenarios, however, it means additional delay when the called party picks the handset up and the first samples on the conversion may not be transported. We strongly recommend leaving the flag to the Media state, which is default and ask the operator to fix their problems with early media.




