External Media channel doesn't pick up packets in case incoming stream has a pause

Hi, I am using externalMedia channel to send the stream to a python code. I am able to rightly setup the channel and exchange media with the python code.
But incase the python code finishes playing first file and then plays the second file after some pause, the asterisk chan_rtp doesn’t catch the packets after the pause.
I feel as if in case the incoming stream breaks the asterisk chan_rtp gets closed, is this the default behaviour? Is there anyway to avoid this?

I don’t believe that’s any default behavior, and it doesn’t even really know what a pause is. Have you examined the RTP traffic itself to make sure that it is correct?

No, didn’t examine RTP in detail since I am able to get the audio in both directions unless the remote end stops streaming and then restarts.
I was able to reproduce the same behaviour when I use ffmpeg to induce stream into asterisk external media port, the audio is audible at the other end when I begin ffmpeg stream the first time and once the ffmpeg finishes streaming the file, the next time I start it on the same call, there is no audio.

Will take a deeper look into RTP in fact will share those in case that helps.

Do note that you need to send from the same IP address and port each time, or else the RTP traffic will be dropped as a security precaution.

Yes, So I identified that the source port is being changed each time the stream stops and restarts. I understand that Asterisk Locks the RTP source IP and Port for security purposes is there a way to disable the RTP security through configuration to allow the stream?

On an individual basis no. It can only be disabled globally in rtp.conf

Thanks @jcolp then I guess the only option is to disable the strictrtp in rtp.conf.