Please explain this macro

hi, Im still not that familiar with macros, please explain this one, details will be appreciated. thank you.

[macro-pstn]
exten => s,1,SetGlobalVar(FOUNDME=ANSWER)
exten => s,2,Dial(${PSTN}/${ARG1},${ARG2})
exten => s,3,SetGlobalVar(FOUNDME=${DIALSTATUS})
exten => s,4,Goto(s-${DIALSTATUS},1)

[macro-pstn]
exten => s,1,SetGlobalVar(FOUNDME=ANSWER)
exten => s,2,Dial(${PSTN}/${ARG1},${ARG2})
exten => s,3,SetGlobalVar(FOUNDME=${DIALSTATUS})
exten => s,4,Goto(s-${DIALSTATUS},1)

${PSTN} = probably set to something like ‘Zap/g1’ in the global vars section.

${ARG1} would be the phone number, ${ARG2} would be the timeout. theser two variables would be passed to the macro like so:

exten => _NXXNXXXXXX,1,Macro(pstn,${EXTEN},15)

The FOUNDME and ${DIALSTATUS} vars are the Dial outcome variables - they basically indicate how the Dial completed, whether the call failed, as answered, etc.

The last priority with the Goto is pointing towards another part of the macro which you didn’t post…

This is a pretty basic outbound dialing macro, nothing special.

Ahh i see, thanks for clarifying this.

Alternatively you could type
show application Dial
on your CLI to get more information about its different aprameters