# How to control P-Asserted-Id value?

**URL:** <https://community.asterisk.org/t/how-to-control-p-asserted-id-value/97025>\
**Category:** Asterisk SIP\
**Created:** [May 22, 2023, 4:58pm UTC](https://community.asterisk.org/t/how-to-control-p-asserted-id-value/97025 "2023-05-22T16:58:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliv2831](https://avatars.discourse-cdn.com/v4/letter/o/3da27b/32.png) [@oliv2831](https://community.asterisk.org/u/oliv2831)\
**Post date:** [May 22, 2023, 4:58pm UTC](https://community.asterisk.org/t/how-to-control-p-asserted-id-value/97025/1 "2023-05-22T16:58:58Z")

</div>

Hello,

While working on a new Asterisk 16.28.0 setup, I’m observing Asterisk the following.

Alice is calling Bob over the PSTN.  
Alice’s phone, connected though PJSIP, has the following settings:  
send\_pai=true  
trust\_id\_inbound=true  
trust\_id\_outbound=true

When Asterisk sends a final 200 OK back to Alice’s phone, it includes a P-Asserted-Identity field valued to something like \<sip: [s@mydomain.com](mailto:s@mydomain.com)\>.  
This “s” string is then displayed on Alice’s phone screen.

1. Where does this “s” value come from ? In my testing, it seems to match the dialplan extension that called the Dial app ?
2. How can I control this value and send back a more useful value ?

Best regards

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [May 22, 2023, 5:46pm UTC](https://community.asterisk.org/t/how-to-control-p-asserted-id-value/97025/2 "2023-05-22T17:46:49Z")

</div>

Why are you working on a new system with an unsupported version of Asterisk?

[https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information](https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information)

---

<div class="post-metadata">

**Author:** ![oliv2831](https://avatars.discourse-cdn.com/v4/letter/o/3da27b/32.png) [@oliv2831](https://community.asterisk.org/u/oliv2831)\
**Post date:** [May 22, 2023, 7:08pm UTC](https://community.asterisk.org/t/how-to-control-p-asserted-id-value/97025/3 "2023-05-22T19:08:48Z")

</div>

This is the version of current debian stable 😉

---

<div class="post-metadata">

**Author:** ![oliv2831](https://avatars.discourse-cdn.com/v4/letter/o/3da27b/32.png) [@oliv2831](https://community.asterisk.org/u/oliv2831)\
**Post date:** [May 22, 2023, 7:31pm UTC](https://community.asterisk.org/t/how-to-control-p-asserted-id-value/97025/4 "2023-05-22T19:31:34Z")

</div>

Adding an I (capital i)option to Dial and preceding Dial with a CONNECTEDLINE statement made it.

```auto
same = n,Set(CONNECTEDLINE(num,i)=123456)
same = n,Dial(PJSIP/123456@trunk,,I)

```

Thanks for helping

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [June 21, 2023, 7:32pm UTC](https://community.asterisk.org/t/how-to-control-p-asserted-id-value/97025/5 "2023-06-21T19:32:12Z")

</div>

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