Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Same as sip_pai_user_setting, but for the Contact Header.


sip_priv0_

...

all_setting

With the sip_priv0_userall_setting you can add a custom header to an outgoing INVITE. You must pass the header name and the user part, the URL will be automatically appended. For more control and more complex headers please use the sip_priv0_all_setting config option. 


Examples:

If you send an INVITE to a SIP peer configured with user123 at address 192.168.2.1, the config optionaccount username user123:

sip_priv0_userall_setting=P-CustomSpecial_Header: ${account_username}

would add a header:

P-CustomSpecial_Header: user123@192.168.2.1user123

to the outgoing Invite.

...

If this is for a ISDN->SIP call with dad 12345you send an INVITE to the SIP peer configured with account username user123 at address 192.168.2.1:

sip_priv0_userall_setting=P-Custom_Header1Header: ${dadaccount_username}@${account_domain}

would add a header:

P-Custom_Header1Header: 12345@192user123@192.168.2.1

to the outgoing Invite.

Possible values for the variables are:

...

If this is for a ISDN->SIP call with dad 12345 and oad 6789:

sip_priv0_all_setting=P-Custom_Header2: ${dad}

...

Beware, some of these variables are only available when using a certain technology, and maybe empty nonetheless.

There are additional config options named sip_priv1_all_setting to sip_priv9_user_setting, with which you can add additional custom headers.

sip_priv0_all_setting

Similar to sip_priv0_user_setting you can add a custom header to an outgoing INVITE with sip_priv0_all_setting, but gives more control, since the complete header has to be formatted.

If this setting is given, it will override any value given by sip_priv0_user_setting.

Examples:

If you send an INVITE to a SIP peer configured with user123:

sip_priv0_all_setting=P-Special_Header: ${account_username}

would add a header:

P-Special_Header: user123

to the outgoing Invite.

If you send an INVITE to the SIP peer configured with user123 at address 192.168.2.1:

sip_priv0_all_setting=P-Custom_Header: ${account_username}@${account_domain}

would add a header:

P-Custom_Header: user123@192.168.2.1

to the outgoing Invite.

If this is for a ISDN->SIP call with dad 12345 and oad 6789:

sip_priv0_all_setting=P-Custom_Header2: ${dad}@${account_username};isdn_oad=${oad}

would add a header:

P-Custom_Header2: 12345@192.168.2.1;isdn_oad=6789

On a SIP->SIP call where the first leg gets an INVITE with from display Jane Smith and a to user 900:

sip_priv0_all_setting=P-Custom_Header3: <${from_display}> ${to_user}@${account_domain}

would add following header to the outgoing Invite:

P-Custom_Header3: <Jane Smith> 900@192.168.2.2

On a SIP->SIP call where the first leg gets an INVITE with a P-Preferred-Identity Header, e.g.

P-Preferred-Identity: <sip:123@example.com>

setting the config option:

sip_priv0_all_setting=P-Custom_Identity: ${ppi_all}

would add following header to the outgoing Invite:

P-Custom_Identity: <sip:123@example.com>

The possible variables that can be used are described in sip_priv0_user_setting@${account_username};isdn_oad=${oad}

would add a header:

P-Custom_Header2: 12345@192.168.2.1;isdn_oad=6789

...

On a SIP->SIP call where the first leg gets an INVITE with from display Jane Smith and a to user 900:

sip_priv0_all_setting=P-Custom_Header3: <${from_display}> ${to_user}@${account_domain}

would add following header to the outgoing Invite:

P-Custom_Header3: <Jane Smith> 900@192.168.2.2

...

On a SIP->SIP call where the first leg gets an INVITE with a P-Preferred-Identity Header, e.g.

P-Preferred-Identity: <sip:123@example.com>

setting the config option:

sip_priv0_all_setting=P-Custom_Identity: ${ppi_all}

would add following header to the outgoing Invite:

P-Custom_Identity: <sip:123@example.com>

...


Possible values for the variables are:

  • ${new_source}
  • ${new_destination}
  • ${new_destination_auto}
  • ${dad}
  • ${oad}
  • ${oad2}$
  • ${clip}
  • ${cnip}
  • ${qsigname}
  • ${account_username}
  • ${isdn_uuname}
  • ${isdn_display}
  • ${account_base_number}
  • ${account_base_number_auto}
  • ${from_user}
  • ${from_display}
  • ${pai_all}
  • ${pai_user}
  • ${pai_display}
  • ${ppi_all}
  • ${ppi_user}
  • ${ppi_display}
  • ${rpi_all}
  • ${rpi_user}
  • ${rpi_display}
  • ${pcpi_all}
  • ${pcpi_user}
  • ${pcpi_display}
  • ${request_url_user}


Beware, some of these variables are only available when using a certain technology, and maybe empty nonetheless.

There are additional config options named sip_priv1_all_setting to sip_priv9_all_setting, with which you can add additional custom headers.

...