We are running CCM 4.x and want to control usage of IP phone, i wonder if a user logout from phone: will the incoming calls be diverted to our voice mail and so that user can check it later.
Sure this can be done :)
The decision to Forward to Voicemail comes from the Logout profile. Have a look
User Device Profile
As system administrator, you configure a user device profile for each individual user. Using the Cisco CallManager User Options window, a user can access this profile and make changes, such as adding a service. You can add, modify or delete a user device profile in Cisco CallManager Administration.
When a user logs in to a phone that is configured for Cisco CallManager Extension Mobility and the user has a user device profile configured for that phone, the user device profile replaces the existing configuration of the device.
When a user logs out, the user device profile is replaced by the logout profile.
From this good doc;
Hope this helps!