Hi,

that’s the way I do it:

        <extension name="PAI/PPI" continue="true">
            <condition field="${sip_P-Asserted-Identity}" expression="^.+$"/>
            <condition field="${sip_P-Preferred-Identity}" expression="^$">
                <!-- if PAI present and PPI NOT present: use PPI from FROM-Header —>
<action application="export" data="sip_cid_type=none"/>
                <action application="export" data="sip_h_P-Asserted-Identity=sip:${sip_P-Asserted-Identity}@sbc;user=phone"/>
                <action application="export" data="sip_h_P-Preferred-Identity=sip:${sip_from_user}@sbc;user=phone“/>
                <!-- if both PAI and PPI present: copy to B-leg —>
<anti-action application="export" data="sip_cid_type=none"/>
                <anti-action application="export" data="sip_h_P-Asserted-Identity=sip:${sip_P-Asserted-Identity}@sbc;user=phone"/>
                <anti-action application="export" data="sip_h_P-Preferred-Identity=sip:${caller_id_number}@sbc;user=phone"/>
            </condition>
        </extension>

br
Henning



Am 07.02.2022 um 14:55 schrieb Adiseshu Channasamudhram <csadi@hotmail.com>:

Hello Freeswitch Team

Can one of you please let me know how i can copy the P-Asserted-Identity header from the incoming INVITE to the outgoing INVITE?
I did go through most of the articles but none of them helped. 

I have tried the below so far in my dialplan

 <action application="set" data="sip_h_P-Asserted-Identity=${sip_P-Asserted_Identity}"/>
 <action application="bridge" data="{sip_cid_type=pid}sofia/gateway/Mygateway/$1"/>
 <action application="bridge" data="{sip_cid_type=pid,origination_privacy=screen}sofia/internal/${destination_number}@${distributor(cust-site_p)}"/>


Thank you in advance

Regards,

Adi
_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com