When setting up a PBX, it is important to consider the call routing features you will be using, and how they tie together to make your phone system work the way you envisage. Below are a few sample dial plans, ranging from basic to complex, to provide some ideas.
Basic
Complex
Basic IVR
Medical Centre
You can find the source Visio documents attached to this article should you wish to use them as a starting point.