Trunk Custom Headers

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 Remote Party/Privacy Indication drop-down (trunk setting). (You can also modify Request-URI, From, To, P-Asserted-Identity, P-Preferred-Identity, Remote-Party-ID, P-Charging-Vector and Privacy Indication as well.)

The predefined tags are detailed below:

Template/Tag Meaning Example Result
{close} This is a special tag for } }
{domain} The domain name. pbx.company.com
{domain-display} "Domain->Setting->Name of the domain" My office domain
{domain-param1-3} Insert a general purpose parameter for the domain. Anything
{ext} Extension URI with display name "John Smith" <sip:5467@pbx.company.com>
{ext-ani} Extension ANI 8001114300
{ext-ani-raw} Extension ANI as stored in the database +18001114300
{ext-display} Extension display name, first name & last name of the extension John Smith
{ext-param1-3} Insert a general purpose parameter for the account. If there is no account context available or the content for the account is empty, it will take the general purpose parameters of the domain. Anything
{ext-uri} Extension URI <sip:5467@pbx.company.com>
{global-uri-number} Request URI for the call +18005554600
{local-uri-number} Request URI formatted in the domain country code format 8005554600
{icid-value} Trunk charging vector setting 2424324
{ip-address} IP address of the system 10.20.10.100
{open} This is a special tag for { {
{pai} The P-Asserted-Identity header from the primary call. The field also contains the parsed variants like {pai-display}. "Vodia Networks" <sip:8005554600@pbx.company.com;user=phone>
{ppi} The P-Preferred-Identity header from the primary call. The field also contains the parsed variants like {ppi-display}. "Vodia Networks" <sip:8005554600@pbx.company.com;user=phone>
{replacement} Result of dial plan replacement sip:8005554600@pbx.blackbox.com;user=phone
{request-uri} The request URI for the call. sip:8005554600@pbx.blackbox.com;user=phone
{rpi} The Remote-Party-ID header from the primary call. The field also contains the parsed variants like {rpi-display}. "Vodia Networks" <sip:8005554600@pbx.company.com;user=phone>
{trunk} URI based on trunk parameters, display name, user name and registrar. "John Doe" <sip:8005559999@pbx.blackbox.com>
{trunk-account} Value of the account field of the trunk. 8005559999
{trunk-password} Value of the password field of the trunk. password
{trunk-ani} Value of the ANI field of the trunk. 8005559999
{trunk-display} Value of the display field of the trunk. "John Doe"
{trunk-host} Host part of the trunk registrar pbx.blackbox.com
{trunk-port} Port part of the trunk registrar. 5060
{trunk-outbound-proxy} Outbound proxy setting of the trunk sip:10.20.14.116:5060;transport=udp
{trunk-registrar} Value of trunk registrar setting pbx.blackbox.com
{trunk-uri} The username@registrar. 8005559999@pbx.blackbox.com
{trunk-uuid} The UUID for the trunk. 8005559999@pbx.blackbox.com
{trunk-user} The username setting of the trunk 8005559999
{ani} {ani-raw} {ani-e164} {ani-nanpa} {ani-plus} {ani-row} From ANI in raw, domain, E164, NANPA, global and ROW format resulting from the ANI calculcation. 8001114300
{ani-cnam} The CNAM associated with the ANI Peter Pan
{from-trunk}* This variable is "true" when the call originates from a trunk (trunk to trunk call); otherwise it is "false" true
{from-extension}* This variable is "true" when the call originates from an extension; otherwise it is "false" true
{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 "false" true
{disa}* This variable is "true" when the call is a DISA call (a user placing an outbound call from the cell phone menu) true
{emergency}* This variable is "true" when the an emergency number is being called; otherwise it is "false" true
{in-reply-to}* This variable contains the caller-ID of the original call 325s92318d2@192.168.4.2
{if var value}* If the variable is not equal to the shown value, the rendering stops {if clip true}
{fi var value}* If the variable is not equal to the shown value, the rendering continues {if clip true}
{ifn var value}* If the variable is equal to the shown value, the rendering stops {ifn clip true}
{fin var value}* If the variable is equal to the shown value, the rendering continues {fin clip true}

The options with the asterisk are available from version 5.0.3 onward (from-noclip from 5.0.9, disa from 5.2.6 on). {pai}, {ppi}, {rpi} are available after version 5.4.1.

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/Tag Meaning Example Result
{xx} The complete header for the call. If CLIP is used for the call, the content is "Anonymous" <sip:anonymous@anonymous.invalid>. "Vodia Networks" <sip:8005554600@pbx.company.com;user=phone>
{xx-noclip} The complete header for the call, even if CLIP is used for the call. "Vodia Networks" <sip:8005554600@pbx.company.com;user=phone>
{xx-uri} Only the URI part of the header sip:8005554600@pbx.company.com;user=phone
{xx-display} The display name of the calling extension "Vodia Networks"
{xx-host} The host part of the URI pbx.company.com
{xx-port} The port part of the URI 5060
{xx-hostport} The host and port part of the URI pbx.company.com:5060
{xx-scheme} The scheme part of the URI sip
{xx-uri-raw} To URI before formatting sip:+18005554600@pbx.company.com;user=phone
{xx-user} User part of To URI 8005554600
{xx-user-raw} User part of To URI before formatting +18005554600

The Other Option

If the trunk provider does not like the output/result of any of the tags listed above, then you can make up your own custom strings and tags to satisfy the provider's need. To do this, choose Other from the drop-down. Then a text box will appear where you can construct a custom string. This option is available for all the headers listed under Custom Headers.

Case 1: If the trunk provider does not like the From header that is constructed using default options, then you can choose the Other option and set whatever they like. Example: "My company name" <sip:{trunk-ani}@{domain};user=phone>
Case 2: If the provider does not like Privacy: id header, then you can setup something that they like.