In the 3CX Management Console, go to the Users list and click on the record you want to assign a DDI to.
Under the 'General' tab, scroll down to 'Direct Inbound Dialing (DID)' and click 'Add a DID/DDI':
In the pop up window, select an available DDI.
The new DDI should now be assigned to the User: