> 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/reference/howto/sipheader.md).

# SIP Header ändern

Wie passt man den SIP Header an?

{% hint style="warning" %}
PJSIP erlaubt das Manipulieren von SIP Headern nur noch in sogenannten Pre-Dial Handlern, somit funktionieren die früher erlernten Dialplan Apps nicht mehr!
{% endhint %}

## Überblick

Manchmal ist es notwendig, den ein oder anderen SIP Header anzupassen. Beispiele: abweichende Klingeltöne je nach Anrufer, CLIP no screening Einstellungen usw. Nachfolgend finden Sie zu einigen Szenarien Beispiele, auf welche Arten SIP Header angepasst werden können.

### Über die Trunk-Optionen

Die einfachste Methode ist die Verwendung des **Optionenfelds** in den Trunk-Account Einstellungen. Eine PASCOM spezifische Syntax erleichtert das Setzen von Headern. In den Optionen gesetzte SIP Header schlagen automatisch immer die durch den Trunk gesetzten Werte ***(z.B. CLIP=auto)***.

**Beispiel:** Clip no screening.

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

Das **Optionenfeld** ist ab PASCOM 19.03 flexibel mit Variablen nutzbar. Ein komplexeres Beispiel:

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

Variablen werden erst sehr spät im Dialplan evaluiert. Man kann also auch z.B. die gewählte Rufnummer oder Werte aus Labels in einen Header setzen ($(EXTEN)etc.).

### Über ein Outbound Skript

Natürlich kann man, wie man es bisher kennt, ein **Outbound Skript** benutzen, um SIP Header zu manipulieren.

**Beispiel:** Setzen/überschreiben eines Headers

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

**Beispiel:** entfernen eines Headers

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

### Für Endgeräte

Für Endgeräte muss man immer noch auf ein **Skript** oder **Aktionen** zurückgreifen. Die Syntax ist identisch mit dem **Outbound Skript**

**Beispiel:** Setzen/überschreiben eines Headers

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

**Beispiel:** entfernen eines Headers

```
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/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.
