Diversion Headers with pjsip - External caller being forwarded from IVR to outbound caller

Hi, we have pjsip trunks in place

Our trunk provider required a SIP header to be configured to allow anonymous outbound calls. We did this by duplicating our trunks and tagging the custom privacy id flag - Igaetz on the forums here helped get that in place.

We now have an issue where we have an IVR, when you press 1 or 2 etc… it directs to custom extensions configured to dial Local/0800******@outbound-allroutes - toll free numbers etc… and now our SIP provider has told us we need diversion headers for billing purposes.
Basically we are trying to have the IVR make an outbound call to another location and due to the caller id and billing purposes the SIP trunk’s are not allowing it.

Can you please help with the diversion header? OR let me know where I need to configure this?
I have read a few places on the Internet and is all very clear as mud!

Normally, you’d add a Add_SIP_Header (IIRC) to handle this, but those don’t work with PJ-SIP connections.

The simplest solution would be to change the connection type on the trunk to “Chan-SIP” instead of “PJ-SIP”. This way, you can add the headers you want.