Asterisk replacing release codes...?

Can asterisk replace release causes while acting as SIP server between two peers?

404 is coming from 172.17.193.21(peer 1) but its being passed as 503 Service unavailable to 1.53.8.130(Peer2)
underlined IP’s are private and public IP’s of SIP server acting as SBC.

172.17.193.21 -> 172.16.34.2 SIP Status: 404 Not Found
10.1.143.2 -> 1.53.8.130 SIP Status: 503 Service Unavailable

Asterisk doesn’t pass the messages directly through since it’s not a proxy. So a new message is generated for the other peer. However I don’t know why it would send 503 and not use 404 as it received…