Regardless of age of the examples provided prior the functionality for either the blind or supervised transfer functionality still remains the same in this case today. It’s just a matter of updating the projects themselves, but that's a different topic for a different day. The main question here should be what does your remote switch or SIP provider have support for in this case when using SIP REFER method for transfer in this case?? Do you know this answer?
Once that is known then you can use either call flow sequence needed accordingly and it should work. Your scenario described sounds like a blind transfer in this case, where you take the inbound call and tell the switch to redirect it to another phone number instead. In that case, you just need to call invokexfer API and make sure the “refer-to” field is set to that new destination string. And the remote switch will handle the rest of the work after the REFER/202 accepted exchange.
Note that there are also explanations of different scenarios in the GC IP TUG as well in chapter:
3.3 Call Transfer Scenarios When Using SIP
www.dialogic.com/.../globalcall_for_ip_hmp_v12.pdf
But overall, as stated earlier you need to determine what your switch supports and then follow that method accordingly
Jeff