As I understand, when enabling callforward to external number, the From user will be replaced with caller number. But for some reason, I need to set the From header to tenant's DID (OnPremLineURI). Can I do this from Phone System itself, and what command should I learn?
My setup is direct routing. I dont think I can go with set-cscallinglineidentity, since it can only work with Calling Plan. I've read the its howto back then when I was trying to set global callerid for a whole tenants in a realm. I thought about the SBC manipulation too. Just wondering perhaps it can be manupulated from phone system since it is theoretically a PBX.
After tried many things, I managed to make it work as I wanted. By utilizing command New-CsCallingLineIdentity, I created Anonymous substitution, and then Grant-CsOnlineUser it to a user. Last, I enabled ForwardPAI on PSTN gateway. This way the forwarded call will be forced back to User's DDI instead original caller's number.
I have to make it so, since outbound call in my network is filtered by callerid and ip address pair. So when outbound's callerid is a foreign number (unknown to my network), it will be considered as illegal call.
Thanks for pointing me out to CsCallingLineIdentity in the first place.