This is from iax.conf
[0083]
type=friend
username=0083
regexten=0083
host=dynamic
secret=****
context=remote-context
disallow=all
allow=ulaw
jitterbuffer=no
callerid="Employee Name"<0083>
trunk=no
mailbox=0083
this is from voicemail.conf
;Employee Name
0083 => ****,Employee Name
This bit is in extensions.conf. What you dial to get into the VM portion.
;Context to check your voicemail
[apbx-voicemail]
;Dialplan for Voicemail Main Menu
exten => 8500,1,SetAccount(${CALLERIDNUM})
exten => 8500,2,SetCDRUserField(comedianmail)
exten => 8500,3,Answer
exten => 8500,4,Wait(2)
exten => 8500,5,VoicemailMain
exten => 8500,6,Hangup
;Dial from the extension - no need to enter mailbox
exten => 8600,1,SetAccount(${CALLERIDNUM})
exten => 8600,2,SetCDRUserField(comedianmail)
exten => 8600,3,Answer
exten => 8600,4,Wait(1)
exten => 8600,5,VoicemailMain,${CALLERIDNUM}
exten => 8600,6,Hangup
Here's what the Asterisk console looks like when I call the IAX extension in question and actually get to a voice prompt for leaving VM:
Connected to Asterisk 1.2.11 currently running on localhost (pid = 11927)
Verbosity is at least 15
-- PROGRESS with cause code 127 received
-- Executing NoOp("SIP/7912-090896b0", "") in new stack
-- Executing Goto("SIP/7912-090896b0", "intern-post|0083|1") in new stack
-- Goto (intern-post,0083,1)
-- Executing NoOp("SIP/7912-090896b0", "Incoming call for Remote Office at ext. 0083") in new stack
-- Executing Macro("SIP/7912-090896b0", "dial-ext|incoming|IAX2/0083|3474") in new stack
-- Executing SetCallerID("SIP/7912-090896b0", "7912") in new stack
-- Executing Set("SIP/7912-090896b0", "foo=IAX2/0083") in new stack
-- Executing Set("SIP/7912-090896b0", "foo=0083") in new stack
-- Executing SetAccount("SIP/7912-090896b0", "0083") in new stack
-- Executing SetCDRUserField("SIP/7912-090896b0", "incoming") in new stack
-- Executing Dial("SIP/7912-090896b0", "IAX2/0083|30|Ttr") in new stack
-- Called 0083
-- IAX2/0083-2 is ringing
-- IAX2/0083-2 answered SIP/7912-090896b0
-- Hungup 'IAX2/0083-2'
== Spawn extension (macro-dial-ext, s, 6) exited non-zero on 'SIP/7912-090896b0' in macro 'dial-ext'
== Spawn extension (macro-dial-ext, s, 6) exited non-zero on 'SIP/7912-090896b0'