Asterisk voicemail with avaya cm 4

Hi people

i have my s8300/g700 cm 4 linked with an asterisk 1.8 via h323 trunk working well , so now i want to use asterisk as voicemail of my 9600 series phones.
How can i get the called party number on asterisk side to redirect the call to the voicemail?

txs in advance