Log in to your VoIP.ms control panel and navigate to DID Numbers -> Order DID(s)
Select the type of number wanted, local or toll free, and country it should be from. For this example we will go with a local number in the United States.
Select a state, from the left box or try your luck searching for a specific number in the right box. I will choose Illinois.
Now select a rate center. This is a legacy tie in to how phone numbers were originally assigned and the PSTN still has to maintain this. Select something in the town you want if you are worried about local people calling in without long distance charges.
Once you select a rate center, you will be presented with a list of phone numbers.
If the number has a little cell phone image after it, that number is capable of SMS is desired. You will need to select the number(s) you want, select the per minute plan, say no to the caller ID lookup, and then select a POP server near to your PBX. I have a Vultr instance in Chicago running FreePBX, so I will select the Chicago POP.
Scroll down to the Routing and select where this DID will be delivered. I like to have a sub account setup instead of using the main account just to add a little more obscurity to my SIP authentication. You can also setup fail over options here, but you have to previously configure things and that is beyond the scope of this initial setup.
Click Order DID and you are done. You will have a working phone number in about 60 seconds.
Part of the FreePBX 13 Setup Guide