Zum Hauptinhalt springen

Trunk Custom Headers

The SIP standard leaves room for interpretation for many headers, especially when it comes to connecting to the public switched telephony network (PSTN). The PBX can send just about anything in the SIP headers when making outbound calls. This is particularly useful if the trunk provider needs special parameters/values in the SIP headers.

In order to use custom headers, "Custom Headers" must be selected from the SIP caller-ID presentation drop-down (trunk setting).

The system generally supports seveal presentation of phone numbers.

  • The global presentation of numbers starts with the +-sign, followed by the country code and the domestic number. This presentation is the most unambiguous way of presenting a phone number and is used internally by the PBX when passing phone numbers around. It is also used by many service providers, especially those that cover several countries.
  • The E.164 format is similar, but omits the +-sign.
  • The North American Number Presentation Association (NANPA) format removes the +1 from domestic numbers and uses 011 instead of the + sign. The 11-digit format uses the E.164 format for domestic numbers.
  • The rest of world (ROW) format uses 00 to replace the +-sign and uses a single 0 as prefix for domestic numbers.
tip

The list of trunk variables is long. When you select log level 9 for trunk, the log will contain all variables with their value. This makes it easier to pick the right variable when setting up custom headers.

The predefined tags are detailed below:

Template/TagMeaningExample Result
{open}This is a special tag for {{
{close}This is a special tag for }}
{replacement}Result of dial plan replacementsip:18005554600@vodia.com;user=phone
{global-uri-number}The replacement number in global form+18005554600
{local-uri-number}The replacement number in the trunk country code format8005554600
{request-uri}The replacement number in the trunk country code format inserted into the dial plan replacementsip:8005554600@vodia.com;user=phone
{domain}The tenant DNS address.pbx.company.com
{domain-display}The name of the tenantVodia Networks
{domain-param1-3}Insert a general purpose parameter for the tenant.Anything
{dom-ani}The value of the ANI field for the tenant+16173998147
{dom-ani-e164}The {dom-ani} in E.164 format16173998147
{dom-ani-nanpa}The {dom-ani} in NANPA format16173998147
{dom-ani-plus}The {dom-ani} in global format+16173998147
{dom-ani-row}The {dom-ani} in rest-of-world format0016173998147
{ani-raw}The ANI from the Trunk ANI process6173998147
{ani}The ANI in the trunk format6173998147
{ani-e164}The ANI in E.164 format16173998147
{ani-nanpa}The ANI in NANPA format6173998147
{ani-plus}The ANI in global format+16173998147
{ani-row}The ANI in ROW format0016173998147
{ani-cnam}The CNAM from the Trunk ANI processJim Test
{ext-user}The primary account name for the user that is associated with the call. If there is no user associated with the call, the username part of the other call leg is used.42
{ext-uri}The {ext-user} presented as URI for the tenantsip:42@vodia.com
{ext-display}The name for the userJim Test
{ext-param1-3}The parameter 1-3 for the user. If there is no account context available or the content for the account is empty, it will take the general purpose parameters of the tenant.Anything
{ext-epid}The endpoint ID for the user7346209648
{ext}The {ext-display} and the {ext-uri} combined"Jim Test" <sip:42@vodia.com>
{trunk-account}Value of the account field of the trunk8005559999
{trunk-password}Value of the password field of the trunk (the actual value is not shown in the log)password
{trunk-display}Value of the display field of the trunk.Vodia Networks
{trunk-user}The username setting of the trunk8005559999
{trunk-uuid}The UUID for the trunk.9f97bb42-22c8-4d8c-8b10-000413453704
{trunk-registrar}Value of trunk registrar settingvodia.com:5060
{trunk-host}Host part of the trunk registrarvodia.com
{trunk-port}Port part of the trunk registrar.5060
{trunk-outbound-proxy}Outbound proxy setting of the trunksip:10.20.14.116:5060;transport=udp
{trunk-ani}Value of the ANI field of the trunk.8005559999
{trunk-uri}The user and registrar combined8005559999@vodia.com
{trunk}The URI and the display value combined"Vodia Networks" <sip:8005559999@vodia.com:5060>
{icid-value}Trunk charging vector setting2424324
{ip-address}IP address of the system10.20.10.100
{from-trunk}This variable is true when the call originates from a trunk (trunk to trunk call); otherwise it is falsetrue
{from-extension}This variable is true when the call originates from an extension; otherwise it is falsetrue
{disa}This variable is true when the call is a DISA call (a user placing an outbound call from the cell phone menu); otherwise it is falsetrue
{clip}This variable is true when the caller-ID should be hidden, either by request from the user or because it came in anonymous from a trunk; otherwise it is falsetrue
{emergency}This variable is true when the an emergency number is being called; otherwise it is falsetrue
{in-reply-to}This variable contains the call-ID of the original call325s92318d2@192.168.4.2
{from-*} *The value of the From-header"Vodia Networks" <sip:8005559999@vodia.com>
{to-*} *The value of the To-header"Vodia Networks" <sip:8005559999@vodia.com>
{pai-*} *The P-Asserted-Identity header from the primary call."Vodia Networks" <sip:8005559999@vodia.com>
{ppi-*} *The P-Preferred-Identity header from the primary call."Vodia Networks" <sip:8005559999@vodia.com>
{rpi-*} *The Remote-Party-ID header from the primary call."Vodia Networks" <sip:8005559999@vodia.com>
{from}The {ani-cnam} and {ani} combined"Vodia Networks" <sip:8005559999@vodia.com>
{location}This variable is true when a location is available; otherwise it is falsetrue
{location-name}The name of the locationHeadquarter
{location-comment}The comment for the locationThe one in Boston
{location-street}The street of the location33 Broad St
{location-apartment}The additional information for the locationSuite 3002
{location-city}The city of the locationBoston
{location-state}The state of the locationMA
{location-zip}The ZIP-code for the location02109
{location-country}The country of the locationUSA
{location-latitude}The latitude of the location32.43534
{location-longitude}The longitude of the location-32.324325
{location-url}The URL for the locationhttps://vodia.com/location
{location-geo}The URL for the location in header format<https://vodia.com/location>
{if var value}If var is not equal to the shown value, the rendering stops{if clip true}
{fi var value}If var is not equal to the shown value, the rendering continues{fi clip true}
{ifn var value}If var is equal to the shown value, the rendering stops{ifn clip true}
{fin var value}If var is equal to the shown value, the rendering continues{fin clip true}

The P-Asserted-Identity, P-Preferred-IdentityandRemote-Party-ID` headers are taken from the primary call leg of the call. Because the PBX has no control over those headers, care should be taken when relying on the value of those headers.

Caller-ID fields

For the fields {from}, {to}, {ppi}, {pai} and {rpi} the system generates the following content (xx will be replaced with the actual field name):

Template/TagMeaningExample Result
{xx-noclip}The complete header for the call, even if CLIP is used for the call"Vodia Networks" <sip:8005554600@vodia.com>
{xx-uri}Only the URI part of the headersip:8005554600@pbx.company.com;user=phone
{xx-display}The display name of the calling extensionVodia Networks
{xx-host}The host part of the URIpbx.company.com
{xx-port}The port part of the URI5060
{xx-hostport}The host and port part of the URIpbx.company.com:5060
{xx-scheme}The scheme part of the URIsip
{xx-uri-raw}To URI before formattingsip:+18005554600@pbx.company.com;user=phone
{xx-user}User part of To URI8005554600
{xx-user-raw}User part of To URI before formatting+18005554600