Hello! I have voip application based on pjsua. It works fine except that I don't know how to set up STUN settings correct. Now I connect STUN before pjsua init - cfg.stun_host = pj_str(&stunAdr); after that all works fine if clients not in the same network. But when they in the same network, they don't use NAT and therefore they don't need STUN but STUN is connected and used and clients don't hear each other. So how to set up using of STUN only when it needed? Depends on NAT present between clients of not? I'm also using this - cfg.cb.on_nat_detect = &on_nat; static void on_nat(const pj_stun_nat_detect_result *result) { if (result->status != PJ_SUCCESS) { pjsua_perror(THIS_FILE, "NAT detection failed", result->status); } else { PJ_LOG(3, (THIS_FILE, "NAT detected as %s", result->nat_type_name)); } } its work fine also, detect NAT but how to use it.. Please help!