I assume:
UA => OpenSIPS => Freeswitch => VoIP provider
172.31.0.169:5060 - OpenSIPS172.31.22.124:5060 - Freeswitch178.*.*.12:5060 - VoIP provider
It is external sip IP. 172.31.0.16 - it is IP in amazon local network; 52.*.*.177==sip0.MY_SIP_DOMAIN.com - it is public IP and domain of opensips.As you can see BYE is strange too... Bye should be sent back to OpenSIPS, but not to 52.*.*.177:5060.