Hunt-dial macro

hello,

can somebody update the macro from this site voip-info.org/wiki/view/hunt-dial+macro to work in asterisk 11.5.1
i always got this messages using it “pbx.c:4621 pbx_extension_helper: No application ‘SetGroup’ for extension (macro-hunt-dial, s, 1)”

[macro-hunt-dial]
; ${ARG1} channel
; ${ARG2} Dialed Number

exten => s,1,SetGroup(${ARG1}) ; increment GROUPCOUNT
exten => s,2,GetGroupCount()
exten => s,3,NoOp(GROUPCOUNT:${GROUPCOUNT})
exten => s,4,GotoIf($~np~["${GROUPCOUNT}"~/np~ = “1”]?5:6) ; if GROUPCOUNT = 1, then it’s free for dialing.
exten => s,5,Dial(SIP/${ARG2}@${ARG1}) ; use it to call out.
exten => s,6,NoOp(${ARG1} is inused)

thanks

[macro-hunt-dial]
; ${ARG1} channel
; ${ARG2} Dialed Number

exten => s,1,Set(GROUP()=${ARG1})
exten => s,2,NoOp(GROUPCOUNT:${GROUP_COUNT(${ARG1})})
exten => s,3,GotoIf($["${GROUP_COUNT(${ARG1})}" = “1”]?4:5) ; if GROUPCOUNT = 1, then it’s free for dialing.
exten => s,4,Dial(SIP/${ARG2}@${ARG1}) ; use it to call out.
exten => s,5,NoOp(${ARG1} is inused)

:smile:
–Satish Barot
Ahmedabad, India

hi satish,

thank’s a lot for this

regards