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
[macro-ext-vm]
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?
Thanks
Andy