Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added notes on priority matching, relevant to a recent comment by Russell Stuart

...

Code Block
langjavascript
exten => 6123,1,NoOp()
exten => 6123,n,Verbose("Do something!")
exten => 6123,n,Verbose("Do something different!")
Note

Every time an extension and priority is executed Asterisk searches for the next best match in priority sequence.

Consider the dialplan below.

Code Block
exten => 1234,1,Verbose("Valid Number")
exten => 4567,1,Verbose("Another Valid Number")
exten => _.!,1,Verbose("Catch all for invalid numbers")
exten => _.!,n,Verbose("Surprise - executed for all numbers!")

It may not be immediately intuitive, but the "_.!" extension with the "n" priority will be executed after any of the preceding lines are executed.

Application calls

You'll notice that each priority is calling a dialplan application (such as NoOp, or Verbose in the example above). That is how we tell Asterisk to "do something" with the channel that is executing dialplan. See the Applications section for more detail.

...