No problem, I appreciate your help.
[code]asteriskCLI> dialplan show macro-vm
[ Context ‘macro-vm’ created by ‘pbx_config’ ]
‘a’ => 1. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
2. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}//ext)}" = “0”]?adef,1) [pbx_config]
3. Set(VMX_ADEST_EXT=${DB_RESULT}) [pbx_config]
4. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}//context)}" = “1”]?acontext) [pbx_config]
5. Set(DB_RESULT=${VMX_CONTEXT}) [pbx_config]
[acontext] 6. Set(VMX_ADEST_CONTEXT=${DB_RESULT}) [pbx_config]
7. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}//pri)}" = “1”]?apri) [pbx_config]
8. Set(DB_RESULT=${VMX_PRI}) [pbx_config]
[apri] 9. Set(VMX_ADEST_PRI=${DB_RESULT}) [pbx_config]
10. Goto(${VMX_ADEST_CONTEXT},${VMX_ADEST_EXT},${VMX_ADEST_PRI}) [pbx_config]
‘adef’ => 1. VoiceMailMain(${MEXTEN}@${VMCONTEXT}) [pbx_config]
2. GotoIf($["${RETVM}" = “RETURN”]?exit-RETURN,1) [pbx_config]
3. Hangup() [pbx_config]
‘dovm’ => 1. Noop(VMX Timeout - go to voicemail) [pbx_config]
2. VoiceMail(${MEXTEN}@${VMCONTEXT},${VMX_OPTS}${VMGAIN}) [pbx_config]
3. Goto(exit-${VMSTATUS},1) [pbx_config]
‘exit-FAILED’ => 1. Playback(im-sorry&an-error-has-occured) [pbx_config]
2. GotoIf($["${RETVM}" = “RETURN”]?exit-RETURN,1) [pbx_config]
3. Hangup() [pbx_config]
‘exit-RETURN’ => 1. Noop(Returning From Voicemail because macro) [pbx_config]
‘exit-SUCCESS’ => 1. GotoIf($["${RETVM}" = “RETURN”]?exit-RETURN,1) [pbx_config]
2. Playback(goodbye) [pbx_config]
3. Hangup() [pbx_config]
‘exit-USEREXIT’ => 1. GotoIf($["${RETVM}" = “RETURN”]?exit-RETURN,1) [pbx_config]
2. Playback(goodbye) [pbx_config]
3. Hangup() [pbx_config]
‘o’ => 1. Playback(one-moment-please) [pbx_config]
2. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/ext)}" = “0”]?doopdef) [pbx_config]
3. Set(VMX_OPDEST_EXT=${DB_RESULT}) [pbx_config]
4. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/context)}" = “1”]?opcontext) [pbx_config]
5. Set(DB_RESULT=${VMX_CONTEXT}) [pbx_config]
[opcontext] 6. Set(VMX_OPDEST_CONTEXT=${DB_RESULT}) [pbx_config]
7. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/pri)}" = “1”]?oppri) [pbx_config]
8. Set(DB_RESULT=${VMX_PRI}) [pbx_config]
[oppri] 9. Set(VMX_OPDEST_PRI=${DB_RESULT}) [pbx_config]
10. Goto(${VMX_OPDEST_CONTEXT},${VMX_OPDEST_EXT},${VMX_OPDEST_PRI}) [pbx_config]
[doopdef] 11. GotoIf($[“x${OPERATOR_XTN}”=“x”]?nooper:from-internal,${OPERATOR_XTN},1) [pbx_config]
[nooper] 12. GotoIf($[“x${FROM_DID}”=“x”]?nodid) [pbx_config]
13. Dial(Local/${FROM_DID}@from-pstn,) [pbx_config]
14. Macro(hangup,) [pbx_config]
[nodid] 15. Dial(Local/s@from-pstn,) [pbx_config]
16. Macro(hangup,) [pbx_config]
‘s’ => 1. Macro(user-callerid,SKIPTTL) [pbx_config]
2. Set(VMGAIN=${IF($[“foo${VM_GAIN}”!=“foo”]?“g(${VM_GAIN})”:"")}) [pbx_config]
3. GotoIf($[“foo${DB(${BLKVM_OVERRIDE})}” != “fooTRUE”]?vmx,1) [pbx_config]
4. Noop(CAME FROM: ${NODEST} - Blocking VM cause of key: ${DB(BLKVM_OVERRIDE)}) [pbx_config]
5. Hangup() [pbx_config]
‘s-BUSY’ => 1. Noop(BUSY voicemail) [pbx_config]
2. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
3. VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}b${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS},1) [pbx_config]
‘s-DIRECTDIAL’ => 1. Noop(DIRECTDIAL voicemail) [pbx_config]
2. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
3. VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}${VM_DDTYPE}${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS},1) [pbx_config]
‘s-NOMESSAGE’ => 1. Noop(NOMESSAGE (beeb only) voicemail) [pbx_config]
2. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
3. VoiceMail(${MEXTEN}@${VMCONTEXT},s${VM_OPTS}${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS},1) [pbx_config]
‘t’ => 1. Hangup() [pbx_config]
‘vmx’ => 1. Set(MEXTEN=${ARG1}) [pbx_config]
2. Set(MMODE=${ARG2}) [pbx_config]
3. Set(RETVM=${ARG3}) [pbx_config]
4. Set(MODE=${IF($["${MMODE}"=“BUSY”]?busy:unavail)}) [pbx_config]
5. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/timeout)}" = “0”]?chknomsg) [pbx_config]
6. Set(VM_OPTS=${DB_RESULT}) [pbx_config]
[chknomsg] 7. GotoIf($["${MMODE}"=“NOMESSAGE”]?s-${MMODE},1) [pbx_config]
8. GotoIf($["${MMODE}" != “DIRECTDIAL”]?notdirect) [pbx_config]
9. Set(MODE=${IF($["${REGEX("[b]" ${VM_DDTYPE})}" = “1”]?busy:${MODE})}) [pbx_config]
[notdirect] 10. Noop(Checking if ext ${MEXTEN} is enabled: ${DB(AMPUSER/${MEXTEN}/vmx/${MODE}/state)}) [pbx_config]
11. GotoIf($["${DB(AMPUSER/${MEXTEN}/vmx/${MODE}/state)}" != “enabled”]?s-${MMODE},1) [pbx_config]
12. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
13. GotoIf($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/temp.wav)} = 1) || (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/temp.WAV)} = 1)]?tmpgreet) [pbx_config]
14. GotoIf($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE}.wav)} = 0) && (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE}.WAV)} = 0)]?nofile) [pbx_config]
15. Set(LOOPCOUNT=0) [pbx_config]
16. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/repeat)}" = “0”]?vmxtime) [pbx_config]
17. Set(VMX_REPEAT=${DB_RESULT}) [pbx_config]
[vmxtime] 18. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timeout)}" = “0”]?vmxloops) [pbx_config]
19. Set(VMX_TIMEOUT=${DB_RESULT}) [pbx_config]
[vmxloops] 20. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loops)}" = “0”]?vmxanswer) [pbx_config]
21. Set(VMX_LOOPS=${DB_RESULT}) [pbx_config]
[vmxanswer] 22. Answer() [pbx_config]
[loopstart] 23. Read(ACTION,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE},1,skip,${VMX_REPEAT},${VMX_TIMEOUT}) [pbx_config]
24. GotoIf($["${EXISTS(${ACTION})}" = “1”]?checkopt) [pbx_config]
[noopt] 25. Noop(Timeout: going to timeout dest) [pbx_config]
26. Set(VMX_OPTS=${VMX_OPTS_TIMEOUT}) [pbx_config]
27. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/timeout)}" = “0”]?chktime) [pbx_config]
28. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[chktime] 29. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/ext)}" = “0”]?dotime) [pbx_config]
30. Set(VMX_TIMEDEST_EXT=${DB_RESULT}) [pbx_config]
31. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/context)}" = “0”]?timepri) [pbx_config]
32. Set(VMX_TIMEDEST_CONTEXT=${DB_RESULT}) [pbx_config]
[timepri] 33. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/pri)}" = “0”]?dotime) [pbx_config]
34. Set(VMX_TIMEDEST_PRI=${DB_RESULT}) [pbx_config]
[dotime] 35. Goto(${VMX_TIMEDEST_CONTEXT},${VMX_TIMEDEST_EXT},${VMX_TIMEDEST_PRI}) [pbx_config]
[checkopt] 36. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/ext)}" = “1”]?doopt) [pbx_config]
37. GotoIf($["${ACTION}" = “0”]?o,1) [pbx_config]
38. GotoIf($["${ACTION}" = “*”]?adef,1) [pbx_config]
39. Set(LOOPCOUNT=$[${LOOPCOUNT} + 1]) [pbx_config]
40. GotoIf($[${LOOPCOUNT} > ${VMX_LOOPS}]?toomany) [pbx_config]
41. Playback(pm-invalid-option&please-try-again) [pbx_config]
42. Goto(loopstart) [pbx_config]
[toomany] 43. Noop(Too Many invalid entries, got to invalid dest) [pbx_config]
44. Set(VMX_OPTS=${VMX_OPTS_LOOPS}) [pbx_config]
45. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/loops)}" = “0”]?chkloop) [pbx_config]
46. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[chkloop] 47. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/ext)}" = “0”]?doloop) [pbx_config]
48. Set(VMX_LOOPDEST_EXT=${DB_RESULT}) [pbx_config]
49. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/context)}" = “0”]?looppri) [pbx_config]
50. Set(VMX_LOOPDEST_CONTEXT=${DB_RESULT}) [pbx_config]
[looppri] 51. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/pri)}" = “0”]?doloop) [pbx_config]
52. Set(VMX_LOOPDEST_PRI=${DB_RESULT}) [pbx_config]
[doloop] 53. Goto(${VMX_LOOPDEST_CONTEXT},${VMX_LOOPDEST_EXT},${VMX_LOOPDEST_PRI}) [pbx_config]
[doopt] 54. Noop(Got a valid option: ${DB_RESULT}) [pbx_config]
55. Set(VMX_EXT=${DB_RESULT}) [pbx_config]
56. GotoIf($["${VMX_EXT}" != “dovm”]?getdest) [pbx_config]
[vmxopts] 57. Set(VMX_OPTS=${VMX_OPTS_DOVM}) [pbx_config]
58. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/dovm)}" = “0”]?vmxdovm) [pbx_config]
[vmxopts] 59. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[vmxdovm] 60. Goto(dovm,1) [pbx_config]
[getdest] 61. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/context)}" = “0”]?vmxpri) [pbx_config]
62. Set(VMX_CONTEXT=${DB_RESULT}) [pbx_config]
[vmxpri] 63. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/pri)}" = “0”]?vmxgoto) [pbx_config]
64. Set(VMX_PRI=${DB_RESULT}) [pbx_config]
[vmxgoto] 65. Goto(${VMX_CONTEXT},${VMX_EXT},${VMX_PRI}) [pbx_config]
[nofile] 66. Noop(File for mode: ${MODE} does not exist, SYSTEMSTATUS: ${SYSTEMSTATUS}, going to normal voicemail) [pbx_config]
67. Goto(s-${MMODE},1) [pbx_config]
[tmpgreet] 68. Noop(Temporary Greeting Detected, going to normal voicemail) [pbx_config]
69. Goto(s-${MMODE},1) [pbx_config]
’_s-.’ => 1. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
2. VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}u${VMGAIN}) [pbx_config]
3. Goto(exit-${VMSTATUS},1) [pbx_config]
Include => ‘macro-vm-custom’ [pbx_config]
-= 15 extensions (132 priorities) in 1 context. =-
[/code]