Passing original CallerID to external number in FM/FM

Just went thru this yesterday with someone else.

[macro-dialout-trunk-predial-hook]
exten => s,1,GoSub(func-set-sipheader,s,1(P-Asserted-Identity,sip:[email protected]))
exten => s,n(done),MacroExit()

You’ll want to disable the send rpid option for the trunk config in the GUI, and use the dialplan above to add it. That will add the header on all outbound calls, but if you have multiple trunks, you will want to add logic to only apply to the trunk that needs it. There is a post here to determine the trunk name of an outbound call: Custom SIP header on outgoing calls

3 Likes