The fpbx sub for adding headers
GoSub(func-set-sipheader,s,1(<headername>,<headervalue)
so you want to modify your dialplan above to use gosubif with this format. Also note that you CANNOT use _X. in from-internal-custom to hook all calls like you’re doing, you must use the dialplan hooks that exist for this purpose. See Hooking for fun and income