Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Macro syntax is simple, you only need to specify the priority, and then optionally the context and extension plus any arguments you wish to use.

Code Block
Macro([[context,]exten,]priority[(arg1[,...][,name,[arg1],[argN])])

Here is an example within Asterisk dialplan.

Code Block
[somecontext]
exten = 7000,1,Verbose("We are going to run a Macro before Dialing!")
same = n,Macro(announcement,s,1)
same = n,Dial(PJSIP/ALICE)

...

Code Block
[somecontext]
exten = 7000,1,Verbose("We are going to run a Macro before Dialing!")
same = n,Macro(announcement,s,1(${EXTEN}))
same = n,Dial(PJSIP/ALICE)

...