Strange issue with Kamailio+rtpengine<->Asterisk

Hello everyone.
I have a strange issue with Asterisk 13.6 behaviour.
Environment is set up as follows:
CentOS 6 everywhere
Kamailio + Sipwise Rtpengine on public IP, Asterisk (Realtime) on private IP on a Vmware virtual machine. Client registers on Kamailio and then Kamailio registes on Asterisk.
Interesting issue:
simple dialplan,
exten => 600,1,Answer()
same => n,Echo()
When I call that extension, Asterisk answers but doesn’t react to any incoming RTP.
I’ve checked SIP/SDP for a dozen of times and I see from ngrep that media is for sure coming to correct port on Asterisk server. However, rtp set debug on in Asterisk CLI doesn’t show anything.
However, if I do
exten => 600,1,Answer()
same => n,Playback(tt-wheasels)
same => n,Echo()
everything works as a charm! And same for user<->user call
exten => _1XX,1,Playback(tt-wheasels)
same => n,Dial(SIP/kamailio/${EXTEN})
works pretty nice.

To avoid that problem I’ve set rtpkeepalive=1, so when Asterisk sends a keepalive media starts flow - but (!!!) no additional signaling comes from Asterisk on rtpkeepalive! So all media settings stay same, Asterisk just starts receiving RTP only after keepalive. It doesn’t look like an rtpengine bug for me - rtpengine logs are OK.

I can provide pcap/txt sip dump if you need that, but for sure - you won’t find any clue there.
Any ideas? rtpkeepalive=1 makes 1 second silence on call establishment which may be annoying.

Hi, did you find something ?

Oh! I did find the roto cause in my setup

Firewalld was causing the issue. rtpkeepalive had to renegociate the port because of the firewall

Look like I’m getting tired hahaha