> For the complete documentation index, see [llms.txt](https://docs.pascom.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pascom.net/en/reference/howto/sipheader.md).

# Change SIP Header

How to adapt the SIP Header?

{% hint style="warning" %}
PJSIP only allows SIP headers to be manipulated in so-called predial handlers. So the dialplan apps created earlier will no longer work!
{% endhint %}

## Overview

Sometimes it is necessary to adapt SIP Headers. Examples: different ringtones depending on the caller, CLIP no screening settings etc. Below you will find Examples of the types of SIP headers that can be adapted for some scenarios.

### Via the Trunk Options

The simplest method is to use the **options field** in the Trunk Account Settings. A PASCOM specific syntax makes it easier to set headers. Sip Headers set in the options always automatically beat the values set by the trunk ***(e.g. CLIP=auto)***.

**Example:** Clip no screening.

```
header/P-Asserted-Identity=<sip:09916666666@provider.des.kundens>
```

As of PASCOM 19.03. the **options field** can be used flexibly with variables. A more complex example:

```
header/P-Asserted-Identity=<sip:{{{048pee_username}}}@{{{048pee_domain}}}>
```

Variables are evaluated very late in the dialplan. So you can also e.g. put the dialed number or values from labels in a header ($(EXTEN)etc.).

### Via a Outbound Script

Of course, as you know it so far, you can use an **outbound script** to manipulate SIP headers

**Example:** Set/overwrite a header

```
Set(HASH(__SIPHEADERS,P-mein-header)=mein-wert)
```

**Example:** Remove a header

```
Set(HASH(__SIPHEADERS,Alert-info)=remove)
```

### For Endpoints

For Endpoints you still have to use a **script** or **actions**. The syntax is identical to the **outbound script**.

**Example:** Set/overwrite a header

```
Set(HASH(__SIPHEADERS,Alert-info)=<http://www.notused.de>\;info=alert-group\;x-line-id=0)
```

**Example:** Remove a header

```
Set(HASH(__SIPHEADERS,Alert-info)=remove)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pascom.net/en/reference/howto/sipheader.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
