Wehen I tried to add a new phone to CCM, on the "phone configuration" page, there is a place to add calling search space, when the phone was inserted the "directory number configuration" page shows up, there also a place for calling search space. Does they need to match? What if I do not match them? Why there are two places for calling search space, one attached to phone the other attached to directory?
1) They don't have to match.
2) If there's no special requirements, you just need to configure CSS on device. You don't have to configure it on line.
3) You configure CSS on the line only if you want to override the CSS configure on device. (i.e. if the line CSS does not match the device CSS, line CSS takes precedence).
This "two tier" model is to give you some flexibility on complex dial plans.