Registration fail between two asterisk server using PSJIP

Hi ,
We are trying to register two asterisk server and one of our asterisk server is on aws.
and another at our datacenter let say them aws and server-2

we are trying to register aws -----register—>server2
aws asterisk showing

No response received from 'sip: xx.server2ip.xx.xx:5060' on registration attempt to 'sip:mk2@xx.server2ip.xx.xx:5060', retrying in '60'

even we can’nt see server-2 reponses on our ec2 instances.
below are our packet traces and configurations in pjsip
any suggestion are welcome.

aws packet traces:

09:56:17.980119 IP (tos 0x0, ttl 64, id 3777, offset 0, flags [DF], proto UDP (17), length 592)
    xx.aws-private-ip.xx.xx.5060 > xx.server2ip.xx.xx.5060: [bad udp cksum 0x2092 -> 0x1a7c!] SIP, length: 564
	REGISTER sip:xx.server2ip.xx.xx:5060 SIP/2.0
	Via: SIP/2.0/UDP xx.aws-ip.xx.xx:5060;rport;branch=z9hG4bKPj8091ac10-953e-4106-a814-c74afe4543f9
	From: <sip:mk2@xx.server2ip.xx.xx>;tag=c3194b0d-d3a2-4ac5-98d5-71cad8b70c2b
	To: <sip:mk2@xx.server2ip.xx.xx>
	Call-ID: 808bb9b3-4718-490a-b2b2-e6b25375fdf6
	CSeq: 41646 REGISTER
	Contact: <sip:mk2@xx.aws-ip.xx.xx:5060;line=ybafkkc>
	Expires: 3600
	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
	Max-Forwards: 70
	User-Agent: Asterisk PBX 16.1.1
	Content-Length:  0
**server2 Packet traces:**

09:56:17.516762 IP (tos 0x0, ttl 52, id 3687, offset 0, flags [DF], proto UDP (17), length 592)
    xx.aws-ip.xx.xx.5060 > xx.server2ip.xx.xx.5060: [udp sum ok] SIP, length: 564
	REGISTER sip:xx.server2ip.xx.xx:5060 SIP/2.0
	Via: SIP/2.0/UDP xx.aws-ip.xx.xx:5060;rport;branch=z9hG4bKPj8091ac10-953e-4106-a814-c74afe4543f9
	From: <sip:mk2@xx.server2ip.xx.xx>;tag=c3194b0d-d3a2-4ac5-98d5-71cad8b70c2b
	To: <sip:mk2@xx.server2ip.xx.xx>
	Call-ID: 808bb9b3-4718-490a-b2b2-e6b25375fdf6
	CSeq: 41646 REGISTER
	Contact: <sip:mk2@xx.aws-ip.xx.xx:5060;line=ybafkkc>
	Expires: 3600
	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
	Max-Forwards: 70
	User-Agent: Asterisk PBX 16.1.1
	Content-Length:  0
	
09:56:17.520001 IP (tos 0x0, ttl 64, id 27055, offset 0, flags [DF], proto UDP (17), length 590)
    xx.server2ip.xx.xx.5060 > xx.aws-ip.xx.xx.5060: [bad udp cksum 0x3ec1 -> 0x8357!] SIP, length: 562
	SIP/2.0 200 OK
	Via: SIP/2.0/UDP xx.aws-ip.xx.xx:5060;rport=5060;received=xx.aws-ip.xx.xx;branch=z9hG4bKPj8091ac10-953e-4106-a814-c74afe4543f9
	Call-ID: 808bb9b3-4718-490a-b2b2-e6b25375fdf6
	From: <sip:mk2@xx.server2ip.xx.xx>;tag=c3194b0d-d3a2-4ac5-98d5-71cad8b70c2b
	To: <sip:mk2@xx.server2ip.xx.xx>;tag=z9hG4bKPj8091ac10-953e-4106-a814-c74afe4543f9
	CSeq: 41646 REGISTER
	Date: Fri, 18 Jan 2019 09:56:17 GMT
	Contact: <sip:172.31.24.138>
	Contact: <sip:mk2@xx.aws-ip.xx.xx:5060;line=ybafkkc>;expires=3599
	Expires: 3600
	Server: Asterisk PBX 15.6.2
	Content-Length:  0
**pjsip.conf ::>aws** 

[transport-udp]
type=transport
protocol=udp    ;udp,tcp,tls,ws,wss
bind=0.0.0.0
external_media_address=xx.aws-ip.xx.xx        ; External IP address to use in RTP handling
external_signaling_address=xx.aws-ip.xx.xx
local_net=172.31.16.0/20
local_net=127.0.0.1/32

[mk2]
type = registration
transport = transport-udp
;outbound_auth = mk2
;server_uri = sip:xx.aws-ip.xx.xx:5060
;client_uri = sip:mk2@xx.aws-ip.xx.xx:5060
server_uri = sip:xx.server2ip.xx.xx:5060
client_uri = sip:mk2@xx.server2ip.xx.xx:5060
contact_user = mk2
retry_interval=60
forbidden_retry_interval=600
expiration=3600
line=yes
endpoint=mk2

[mk2]
type = aor
contact = sip:xx.server2ip.xx.xx

[mk2]
type = auth
auth_type=userpass
username = mk2
password = mk2
realm=xx.server2ip.xx.xx

[mk2]
type = endpoint
transport = transport-udp
context = internal
direct_media = no
from_domain = xx.server2ip.xx.xx
force_rport = yes
rtp_symmetric = yes
ice_support=yes
;outbound_auth = mk2
aors = mk2
disallow = all
allow = ulaw

[mk2]
type = identify
endpoint = mk2
match = xx.server2ip.xx.xx

pjsip.conf ::>server2


[transport-udp]
type=transport
protocol=udp    ;udp,tcp,tls,ws,wss
bind=0.0.0.0:5060


[mk2]
type = aor
max_contacts = 1
;contact = sip:xx.aws-ip.xx.xx
remove_existing=yes

[mk2]
type = identify
endpoint = mk2
match = xx.aws-ip.xx.xx

[mk2]
type = auth
auth_type=userpass
username = mk2
password = mk2

[mk2]
type = endpoint
transport = transport-udp
context = internal
direct_media = no
force_rport = yes
rtp_symmetric = yes
ice_support=yes
aors = mk2
disallow=all
allow=ulaw

Have you updated firewall policies to allow traffic to flow as expected?

@jcolp yes we had on server-2 and on
our ec2 we had allow the permission to all the ips.

Well, if the 200 OK is going to the correct IP address and port, and a packet capture on the EC2 where Asterisk is running does not see it… then something in between is blocking it.

@jclop yes ip is blocked you are right!!! trying to resolve it and update on it