# Custom header if from user equals something (condition)

**URL:** <https://forums.vitalpbx.org/t/custom-header-if-from-user-equals-something-condition/3218>\
**Category:** VitalPBX\
**Created:** [September 13, 2023, 2:46pm UTC](https://forums.vitalpbx.org/t/custom-header-if-from-user-equals-something-condition/3218 "2023-09-13T14:46:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeventh](https://forums.vitalpbx.org/letter_avatar_proxy/v4/letter/z/59ef9b/32.png) [@zeventh](https://forums.vitalpbx.org/u/zeventh)\
**Post date:** [September 13, 2023, 2:46pm UTC](https://forums.vitalpbx.org/t/custom-header-if-from-user-equals-something-condition/3218/1 "2023-09-13T14:46:15Z")

</div>

Hi,

I’m trying to add a custom header during outbound call on trunk that should only apply on a specific from user. I know that I can add a custom header on the trunk, but that custom header affects all outbound calls on that trunk.

What I would like to do is something like below, but I don’t know if I edit the dialplan that it will be overwritten på VitalPBX during apply changes?

```auto
same => n,ExecIf($["${CALLERID(name)}"="reception"]?Set(PJSIP_HEADER(add,Something)=somevalue))

```

Another problem is that if I’m in chan\_sip I can’t use PJSIP\_HEADER command and if I’m in chan\_pjsip I can’t get CALLERID(name) variable…

The phones are using SIP and the trunk is using PJSIP.

I’m bashing my head here 🤕

---

<div class="post-metadata">

**Author:** ![system](https://forums.vitalpbx.org/uploads/default/original/1X/672b458a1d454755270c2c16adc5316b641c3c6a.png) [@system](https://forums.vitalpbx.org/u/system)\
**Post date:** [October 13, 2023, 2:46pm UTC](https://forums.vitalpbx.org/t/custom-header-if-from-user-equals-something-condition/3218/2 "2023-10-13T14:46:24Z")

</div>

Closed on October 13, 2023, 2:46pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
