Random long pause in the middle of the call

Hi Artisans,
I have been working on Asterisk for last 2 years but I have been facing a strange problem with Asterisk 11 versions lately.

I have two versions of AGI code for my Software, one is using Dial command with M and F options another is using Dial command without these options.

But when I run the first version of the AGI code, after 20 calls (sometimes after only 6 calls) the call quality gets degraded and IVR plays with some unexpected pause(this can be in the middle of a single file or between two different get data commands)

While another version(without M and F) is working perfectly fine, never delaed.

But I am not sure if F and M is causing this weird delay so I have enabled debug log for my Asterisk box, after comparing the logs for both the versions, I found nothing except following debug messages:

Read factory 0x7f915880ba58 and write factory 0x7f915880c698 both fail to provide 160 samples

If anyone has any solution for my weird and maybe a silly mistake, please help me to understand and fix this issue.

Thanks!

Asterisk 11 EOL on 2017-10-25, I suggest upgrade because if is a bug you wont get any support from the Asterisk team

Thanks @ambiorixg12, I will move to another LTS version