static void internal_stun_resolve_cb(const pj_stun_resolve_result *result)
{
    pjsua_var.stun_status = result->status;
    if ((result->status == PJ_SUCCESS) && (pjsua_var.ua_cfg.stun_srv_cnt>0)) {
	pj_memcpy(&pjsua_var.stun_srv, &result->addr, sizeof(result->addr));
	pjsua_var.stun_srv_idx = result->index;

	/* Perform NAT type detection if not yet */
	if (pjsua_var.nat_type == PJ_STUN_NAT_TYPE_UNKNOWN &&
	    !pjsua_var.nat_in_progress &&
	    pjsua_var.ua_cfg.nat_type_in_sdp)
	{
	    pjsua_detect_nat_type();
	}
    }
    
    if (pjsua_var.ua_cfg.cb.on_stun_resolution_complete)
    	(*pjsua_var.ua_cfg.cb.on_stun_resolution_complete)(result);
}
static void internal_stun_resolve_cb(const pj_stun_resolve_result *result)
{
    pjsua_var.stun_status = result->status;
    if ((result->status == PJ_SUCCESS) && (pjsua_var.ua_cfg.stun_srv_cnt>0)) {
	pj_memcpy(&pjsua_var.stun_srv, &result->addr, sizeof(result->addr));
	pjsua_var.stun_srv_idx = result->index;

	 
	if (pjsua_var.nat_type == PJ_STUN_NAT_TYPE_UNKNOWN &&
	    !pjsua_var.nat_in_progress &&
	    pjsua_var.ua_cfg.nat_type_in_sdp)
	{
	    pjsua_detect_nat_type();
	}
    }
    
    if (pjsua_var.ua_cfg.cb.on_stun_resolution_complete)
    	(*pjsua_var.ua_cfg.cb.on_stun_resolution_complete)(result);
}