Asterisk replacing release codes...?

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

404 is coming from 1) but its being passed as 503 Service unavailable to
underlined IP’s are private and public IP’s of SIP server acting as SBC. -> SIP Status: 404 Not Found -> 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…