Adding P-Asserted Identity on outbound calls


Where would I add the P-Asserted identity for making outbound trunk calls?

I want to insert the following code, but if I add it into extensions_custom.conf it stops the extension’s CID from overriding the Trunk CID

SipAddHeader(P-Asserted-Identity: “1234567890” sip:[email protected]${SYSTEMNAME})

It looks like I have to run this line after the CIDs are worked out - does anyone know where I should insert it??

How are you doing it that ultimately doesn’t work? In your extensions_custom.conf what happens if you try:

exten => s,1,NoOp(Adding P-Asserted-Identity)
exten => s,n,SipAddHeader(P-Asserted-Identity: “1234567890” )
exten => s,n(done),MacroExit()

Im adding into [from-internal-custom]
but it looks like that prevents the normal CID processing.

I’ll try putting your suggestion in extensions_override_freepbx.conf

looks like that worked!
Adding the code into the predial-hook rather than just from-internal-custom context has done the trick!


Glad to help.

I got information from my provider that looks like:

exten=> _.,1,SipAddHeader(P-Preferred-Identity: sip:${CALLERID(num)}
exten=> _.,n,Dial(SIP/${EXTEN}@username,60)
exten=> _.,n,Hangup

but this is for Asterisk. I tried to merge this info with the one above but get no success. How to do it step by step to make a successful call with a personal CID?
Until now I get always an error

Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 21