# Passing P-Asserted-Identity from Softphone to Outbound Trunk From Header

**URL:** https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443
**Category:** VitalPBX
**Created:** [September 2, 2026, 7:02pm UTC](https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443 "2026-09-02T19:02:55Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Axio](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/axio/32/4457_2.png) [@Axio](https://forums.vitalpbx.org/u/Axio)
#### Post date: [September 2, 2026, 7:02pm UTC](https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443/1 "2026-09-02T19:02:55Z")

</div>

Hi everyone,

I am trying to configure VitalPBX so that when a softphone sends an outbound `INVITE` containing a `P-Asserted-Identity` (PAI) header, VitalPBX reads this header and uses its value as the Caller ID in the `From` header sent to our outbound PJSIP trunk.

**Current Scenario:**

· **Softphone** sends an outbound INVITE with: `P-Asserted-Identity: <sip:1234567890@domain.com>`

· **Goal:** Extract the data and use it as the `From` header user when making the outbound call over the PJSIP trunk.

**What was tested:**

1. Set extension Dynamic External CID to YES.

2. Set trunk Trust ID Inbound to YES

**Questions for the community:**

· What is the recommended practice in VitalPBX to extract an incoming softphone PAI header and pass it to the outbound trunk `From` field?

Any examples or best-practice recommendations would be greatly appreciated!

Thanks!

---

<div class="post-metadata">

### Author: ![TELECOMIN](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/telecomin/32/646_2.png) [@TELECOMIN](https://forums.vitalpbx.org/u/TELECOMIN)
#### Post date: [September 2, 2026, 8:45pm UTC](https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443/2 "2026-09-02T20:45:41Z")

</div>

Hi,

Please try by enabling Send P-Asserted-Identity under Device profile and enable Trust ID Outbound alongside Trust ID Inbound under outbound trunk.

 ![image](https://forums.vitalpbx.org/uploads/default/original/2X/8/8cba87c933b76b97b0f65afa71bb97de2847ef45.png)

---

<div class="post-metadata">

### Author: ![Axio](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/axio/32/4457_2.png) [@Axio](https://forums.vitalpbx.org/u/Axio)
#### Post date: [September 2, 2026, 11:24pm UTC](https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443/3 "2026-09-02T23:24:33Z")

</div>

Hello, thank you, but it is still not working.

Here is what the device is sending to VitalPBX:

 ![image](https://forums.vitalpbx.org/uploads/default/original/2X/2/24572d762d4966b348120e06cf109285e1f559df.png)

And here is what VitalPBX is sending to the trunk:

 ![image](https://forums.vitalpbx.org/uploads/default/original/2X/d/d4d355185fa5c3bcd78e24ae9640f9f27532f791.png)

It seems like VitalPBX is not taking the PAI into account. Has anyone managed to successfully achieve what I’m trying to do?

---

<div class="post-metadata">

### Author: ![mo10](https://forums.vitalpbx.org/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mo10](https://forums.vitalpbx.org/u/mo10)
#### Post date: [September 3, 2026, 4:10pm UTC](https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443/4 "2026-09-03T16:10:40Z")

</div>

Does this help you?

> [@CUSTOM P-Preferred-Identity](https://forums.vitalpbx.org/t/custom-p-preferred-identity/5642):
>
> I need to input the P-Preferred-Identity: sip:2132114400@uc-service.ims.oi.net.br;user=phone;AAA5XSHNBBB os sip header of outgoing call from vital extension to public sip provider. I already try to add file: root@pbx:/etc/asterisk/vitalpbx# cat extensions\_\_50-custom\_ppi.conf [custom-add-ppi-header] exten =\> \_X.,1,NoOp(Adicionando P-Preferred-Identity para ${EXTEN}) exten =\> \_X.,n,SIPAddHeader(P-Preferred-Identity: sip:2132114400@uc-service.ims.oi.net.br;user=phone;AAA5XSHNBBB) exten =\> \_X.…

---

<div class="post-metadata">

### Author: ![Axio](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/axio/32/4457_2.png) [@Axio](https://forums.vitalpbx.org/u/Axio)
#### Post date: [September 3, 2026, 4:46pm UTC](https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443/5 "2026-09-03T16:46:12Z")

</div>

Hi mo10, I did see that post, but it doesn’t really apply to my use case. It seems overcomplicated for something so many people actually need. I’m not sure if this is a bug or just designed this way.

---

<div class="post-metadata">

### Author: ![miguel](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/miguel/32/415_2.png) [@miguel](https://forums.vitalpbx.org/u/miguel)
#### Post date: [September 7, 2026, 10:49pm UTC](https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443/6 "2026-09-07T22:49:18Z")

</div>

Why the Sofphone is not sending that information in the Caller ID headers. The **Dynamic External CID** only works when the caller sends a Caller ID value that needs to be pass to the destination.

---

<div class="post-metadata">

### Author: ![Axio](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/axio/32/4457_2.png) [@Axio](https://forums.vitalpbx.org/u/Axio)
#### Post date: [September 8, 2026, 2:53pm UTC](https://forums.vitalpbx.org/t/passing-p-asserted-identity-from-softphone-to-outbound-trunk-from-header/6443/7 "2026-09-08T14:53:13Z")

</div>

Hello,

We are using a few different PBX systems, and we can’t simply map or overwrite the From header using the PAI (P-Asserted-Identity) value because it causes authentication failures on outbound INVITE packets from the PBX side.

The softphone constructs its From header using its SIP authentication credentials—which is standard behavior, as a registered SIP client’s From header must match the AOR used for authentication—rather than the caller ID/display number you wish to present.

This is precisely why rewriting the outbound From header based on the PAI makes sense: if the softphone sends a valid identity via P-Asserted-Identity alongside its technical From header, that is the value the PBX should extract and use for outbound caller ID.

Unless I’m mistaken?
