this ael2 code: macro ael-std-exten-ael( ext , dev ) { Dial(${dev}/${ext},20); switch(${DIALSTATUS}) { case BUSY: NoOp( sending to voicemail b${ext} , dev is ${dev} ); VoiceMail(b${ext}); break; default: NoOp( sending to voicemail u${ext}, dev is ${dev} ); VoiceMail(u${ext}); }; catch a { NoOp( caught a ); VoiceMailMain(${ext}); return; }; }; generates this dialplan: [ Context 'macro-ael-std-exten-ael' created by 'pbx_ael' ] 'a' => 1. NoOp( caught a ) [pbx_ael] 2. VoiceMailMain(${ext}) [pbx_ael] 3. Goto(4) [pbx_ael] 4. NoOp(End of Extension a) [pbx_ael] 's' => 1. Set(ext=${ARG1}) [pbx_ael] 2. Set(dev=${ARG2}) [pbx_ael] 3. Dial(${dev}/${ext}|20) [pbx_ael] 4. Goto(sw-55-${DIALSTATUS}|1) [pbx_ael] 5. NoOp(Finish switch-ael-std-exten-ael-55) [pbx_ael] 'sw-55-BUSY' => 1. NoOp( sending to voicemail b${ext} | dev is ${dev} ) [pbx_ael] 2. VoiceMail(b${ext}) [pbx_ael] 3. Goto(s|5) [pbx_ael] '_sw-55-.' => 1. NoOp( sending to voicemail u${ext}| dev is ${dev} ) [pbx_ael] 2. VoiceMail(u${ext}) [pbx_ael] 3. Goto(s|5) [pbx_ael]