End point vpn delay problem

hello guys, i have a big problem , i make a sipml5 conection with a system works so good , i made a click2 call and use sipml5 api , the call is on air in 3 seconds cus i´d used a stuns servers , but the problem is when the user agent or end point is connect to a vpn , with another system , the call has a 40 seconds of delay , i dont know how manage this issue cus i test everything , with nat but nothing works.

You’d need to identify where exactly the slowdown is occurring. If the call isn’t even getting to Asterisk yet, then it’s client side so it may be the ICE candidate gathering process taking a long period of time.