<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.td-er.nl/index.php?action=history&amp;feed=atom&amp;title=Dialplan_Basics</id>
	<title>Dialplan Basics - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.td-er.nl/index.php?action=history&amp;feed=atom&amp;title=Dialplan_Basics"/>
	<link rel="alternate" type="text/html" href="https://wiki.td-er.nl/index.php?title=Dialplan_Basics&amp;action=history"/>
	<updated>2026-04-29T18:46:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.td-er.nl/index.php?title=Dialplan_Basics&amp;diff=1873&amp;oldid=prev</id>
		<title>Gijs at 18:58, 11 February 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.td-er.nl/index.php?title=Dialplan_Basics&amp;diff=1873&amp;oldid=prev"/>
		<updated>2007-02-11T18:58:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:58, 11 February 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this example, the extension name is &amp;lt;tt&amp;gt;123&amp;lt;/tt&amp;gt;, the priority is &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt;, and the application is &amp;lt;tt&amp;gt;Answer( )&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this example, the extension name is &amp;lt;tt&amp;gt;123&amp;lt;/tt&amp;gt;, the priority is &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt;, and the application is &amp;lt;tt&amp;gt;Answer( )&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The name of the extension can also match a pattern. In order to do so, the pattern must start with an &amp;quot;_&amp;quot;. See [[Pattern-matching syntax]] for details on the syntax.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gijs</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.td-er.nl/index.php?title=Dialplan_Basics&amp;diff=1872&amp;oldid=prev</id>
		<title>Gijs at 18:55, 11 February 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.td-er.nl/index.php?title=Dialplan_Basics&amp;diff=1872&amp;oldid=prev"/>
		<updated>2007-02-11T18:55:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This subject is dealt with in chapter 5 of the book Asterisk; The Future of Telephony.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Asterisk dialplan is specified in the configuration file named extensions.conf.&lt;br /&gt;
&lt;br /&gt;
The dialplan is made up of four main parts: contexts, extensions, priorities, and&lt;br /&gt;
applications.&lt;br /&gt;
&lt;br /&gt;
A complete extension is composed of three components:&lt;br /&gt;
* The name (or number) of the extension&lt;br /&gt;
* The priority (each extension can include multiple steps; the step number is called the “priority”)&lt;br /&gt;
* The application (or command) that performs some action on the call&lt;br /&gt;
These three components are separated by commas, like this:&lt;br /&gt;
 exten =&amp;gt; name,priority,application( )&lt;br /&gt;
Here’s a simple example of what a real extension might look like:&lt;br /&gt;
 exten =&amp;gt; 123,1,Answer( )&lt;br /&gt;
In this example, the extension name is &amp;lt;tt&amp;gt;123&amp;lt;/tt&amp;gt;, the priority is &amp;lt;tt&amp;gt;1&amp;lt;/tt&amp;gt;, and the application is &amp;lt;tt&amp;gt;Answer( )&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Priorities ==&lt;br /&gt;
&lt;br /&gt;
Each extension can have multiple steps, called &amp;#039;&amp;#039;priorities&amp;#039;&amp;#039;. Each priority is numbered&lt;br /&gt;
sequentially, starting with 1. (Actually, there is one exception to this rule, as discussed&lt;br /&gt;
in the sidebar “Unnumbered Priorities.”) Each priority executes one specific&lt;br /&gt;
application. As an example, the following extension would answer the phone (in priority&lt;br /&gt;
number 1), and then hang it up (in priority number 2):&lt;br /&gt;
 exten =&amp;gt; 123,1,Answer( )&lt;br /&gt;
 exten =&amp;gt; 123,2,Hangup( )&lt;br /&gt;
&lt;br /&gt;
Since Asterisk really wants priorities start to at 1 and numbered consecutively, it will be annoying when it stops at the point where a number is skipped.&lt;br /&gt;
To overcome this annoyance, Asterisk 1.2 introduced &amp;#039;&amp;#039;unnumbered priorities&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
These are called the n priority, which stands for &amp;quot;next&amp;quot;.&lt;br /&gt;
Each time Asterisk encounters a priority named&lt;br /&gt;
n, it takes the number of the previous priority and adds 1. This makes it easier to make&lt;br /&gt;
changes to your dialplan, as you don’t have to keep renumbering all your steps. For&lt;br /&gt;
example, your dialplan might look something like this:&lt;br /&gt;
 exten =&amp;gt; 123,1,Answer( )&lt;br /&gt;
 exten =&amp;gt; 123,n,do something&lt;br /&gt;
 exten =&amp;gt; 123,n,do something else&lt;br /&gt;
 exten =&amp;gt; 123,n,do one last thing&lt;br /&gt;
 exten =&amp;gt; 123,n,Hangup( )&lt;br /&gt;
&lt;br /&gt;
Version 1.2 also allows you to assign text labels to priorities. To assign a text label to&lt;br /&gt;
a priority, simply add the label inside parentheses after the priority, like this:&lt;br /&gt;
 exten =&amp;gt; 123,n(label),do something&lt;br /&gt;
This gives the possibility to jump between different priorities based on dialplan logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The s Extension ==&lt;br /&gt;
When calls enter a context without a specific destination extension (for&lt;br /&gt;
example, a ringing FXO line), they are handled automatically by the &amp;#039;&amp;#039;s&amp;#039;&amp;#039; extension.&lt;br /&gt;
(The s stands for “start,” as most calls start in the s extension.)&lt;br /&gt;
&lt;br /&gt;
We will be performing&lt;br /&gt;
three actions on the call (answer it, play a sound file, and hang it up), so we need to&lt;br /&gt;
create an extension called s with three priorities. We’ll place the three priorities&lt;br /&gt;
inside &amp;lt;tt&amp;gt;[incoming]&amp;lt;/tt&amp;gt;, as all incoming calls should start in this context:&lt;br /&gt;
 [incoming]&lt;br /&gt;
 exten =&amp;gt; s,1,Answer( )&lt;br /&gt;
 exten =&amp;gt; s,2,Playback(hello-world)&lt;br /&gt;
 exten =&amp;gt; s,3,Hangup( )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Background( ) and Goto( ) Applications ==&lt;br /&gt;
When users call into the following dialplan, they will hear a greeting saying, “Please enter the number you wish to call.” If they press 1, they will hear the number one, and if they press 2, they will hear the&lt;br /&gt;
number two. The dialplan will repeat the greeting after playing back the number:&lt;br /&gt;
 [incoming]&lt;br /&gt;
 exten =&amp;gt; s,1,Answer( )&lt;br /&gt;
 exten =&amp;gt; s,2,Background(enter-ext-of-person)&lt;br /&gt;
 exten =&amp;gt; 1,1,Playback(digits/1)&lt;br /&gt;
 exten =&amp;gt; 1,2,Goto(incoming,s,1)&lt;br /&gt;
 exten =&amp;gt; 2,1,Playback(digits/2)&lt;br /&gt;
 exten =&amp;gt; 2,2,Goto(incoming,s,1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Handling Invalid Entries and Timeouts ==&lt;br /&gt;
Using the &amp;#039;&amp;#039;i&amp;#039;&amp;#039; and &amp;#039;&amp;#039;t&amp;#039;&amp;#039; extensions makes our dialplan a little more robust and userfriendly.&lt;br /&gt;
* i is the extension for invalid entry&amp;#039;s (e.g. pressing a &amp;quot;3&amp;quot;)&lt;br /&gt;
* t is the extension to handle situations when the caller doesn’t give input in time (the default timeout is 10 seconds).&lt;br /&gt;
 [incoming]&lt;br /&gt;
 exten =&amp;gt; s,1,Answer( )&lt;br /&gt;
 exten =&amp;gt; s,2,Background(enter-ext-of-person)&lt;br /&gt;
 exten =&amp;gt; 1,1,Playback(digits/1)&lt;br /&gt;
 exten =&amp;gt; 1,2,Goto(incoming,s,1)&lt;br /&gt;
 exten =&amp;gt; 2,1,Playback(digits/2)&lt;br /&gt;
 exten =&amp;gt; 2,2,Goto(incoming,s,1)&lt;br /&gt;
 exten =&amp;gt; i,1,Playback(pbx-invalid)&lt;br /&gt;
 exten =&amp;gt; i,2,Goto(incoming,s,1)&lt;br /&gt;
 exten =&amp;gt; t,1,Playback(vm-goodbye)&lt;br /&gt;
 exten =&amp;gt; t,2,Hangup( )&lt;/div&gt;</summary>
		<author><name>Gijs</name></author>
		
	</entry>
</feed>