PJSIP channelstats shows "not valid" for a few minutes

Hi, I have problem with some calls, after call has finished it steel stay at “PJSIP channelstats shows” output as “not valid” channel.

Because of this have a jammed call on FOP2 pannel, and this channel does’n get any calls from it’s queue.
It happens 2-3 times for a day (~10000calls ).

As I understand “not valid” state tell us that channel is at the completion stage, so I thought it has to disappear quickly in the normal case.

What can be a problem?

This message means that the session is in the process of being torn down, issue could be how long this message last before the session be torn down

hi, thanks for your reply, this is exactly the problem what I am asking for. What can be a reason why the call stays at that condition for a long time? Do you have any suggestions?