Cmd Macro deprecated in Asterisk 1.6

The UPGRADE.txt file talks about Macro() is now deprecated. Ok I can understand that and it says to us Gosub() instead. Here is a Macro I use a lot in my extensions.conf file

exten => s,1,Ringing
exten => s,n(nxdial),Dial(${ARG1},20,j)
exten => s,n,Voicemail(${ARG2},su)
exten => s,n,Hangup
exten => s,nxdial+101,NoOp(${ARG3} — ${ARG1})
exten => s,n,GotoIf($["${ARG3}" = “”]?201:200)
exten => s,200(nd),Dial(${ARG3},20)
exten => s,201(vm),Voicemail(${ARG2},su)
exten => s,n,Hangup
exten => s,n,return

To call it I use
exten => 0,1,Macro(ext-vm,sip/11&sip/22,33)

I pass in the Macro name, the SIP phones to call and the Voicemail box to default to. It may be just the long day, but for the life of me, I’m not seeing an easy way to use Gosub command in its place. Gosub I can not pass in parms, do I have to set global variables? Or is there an easier way?


You can pass in parameters. See extensions.conf.samples for examples.

Found my answer, the voip-info wiki was not updated


core show application Gosub