Asterisk voicemail server

Hi,

I am trying to figure out what is the best way to set up asterisk as a feature server. I have 2 machines in my “lab”

server 1 - everything
server 2 - voicemail only

My plan is to redirect the call at the end of the Dial application (when it times out) to the voicemail server - however, I intend to use macros to automate the provision of new users better. Right now, I cannot see a way to pass a variable between these servers as to which voicemailbox to leave the message in. The line I am using to leave the message is below. Does anyone know how to pass some information during this leg of the call which can direct it to the voicemail of the person who you initially dialled? Failing that, I assume that everything will have to be hard-coded into the dialplan which can be messy upon scaling. Does IAX offer anything like that?

exten => s,n,Dial(SIP/serverA:asterisk@192.168.2.52/b)

Robert

Could you use the callerID number and name to carry the data over?

TBH as long as the mailbox number is the same as the callerID number then you just need to use that

Ian