There is a better way, but it may not apply to your situation. In a situation where you have the bridged appearance of someone else's phone on your desk (secretary and VP, for example), the secretary could answer the bridged appearance, and then transfer into voicemail by hitting transfer, the feature access code for transfer into voicemail, and then hangup. I think this only works with T1/QSIG integrations.
If you aren't answering on a bridged appearance, your solution is about the only way.