Voltage violations are the main problem faced in distribution networks (DN) with a higher penetration of inverter-based generations (IBG). Active and reactive power control from smart inverters (SI) can mitigate such voltage violations. Optimal power flow (OPF)-based control provides more accurate operating set points for the coordinated operation of SIs. Therefore, this paper presents a three-phase OPF-based control on SI-enriched unbalanced distribution networks. To consider the unbalanced nature of the DN, the first three-phase modeling of the DN is developed using the current injection model (CIM), as it converges faster even for a heavily loaded network and can be modelled using real-time data. Later, the optimal active and reactive power set points for smart inverters are obtained by solving a quasi-dynamic optimization problem. The uniqueness of the proposed method is that it regulates the voltage at the affected nodes by obtaining the optimal set points of active and reactive power for the smart inverter. The OPF is implemented with a mathematical CIM in Pyomo and solved using the Knitro solver. The proposed method is compared with the standalone sensitivity-based Volt-Var Control (VVC), Volt-Watt Control (VWC), and combined VVC and VWC methods. In this paper, photovoltaics (PV) are considered as IBG. The effectiveness of the proposed method is verified in a European low-voltage and CIGRE medium-voltage distribution network with 100 % penetration of IBG. The analysis shows that the OPF-based control optimizes active and reactive power set points with less network loss and can maintain voltage violations with less reactive power support.