<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.saruman.biz/saruwiki/index.php?action=history&amp;feed=atom&amp;title=Dialplan_theory</id>
	<title>Dialplan theory - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.saruman.biz/saruwiki/index.php?action=history&amp;feed=atom&amp;title=Dialplan_theory"/>
	<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Dialplan_theory&amp;action=history"/>
	<updated>2026-05-02T17:43:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Dialplan_theory&amp;diff=1838&amp;oldid=prev</id>
		<title>Saruman!: /* What is a dialplan? */  reworked</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Dialplan_theory&amp;diff=1838&amp;oldid=prev"/>
		<updated>2008-10-19T21:09:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;What is a dialplan?: &lt;/span&gt;  reworked&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:09, 19 October 2008&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-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;When first starting with Asterisk, you might be intimidated by the sheer complexity of the dialplan. But we find it is actually very simple - so simple that it&amp;#039;s getting difficult, as it were :-)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;When first starting with Asterisk, you might be intimidated by the sheer complexity of the dialplan. But we find it is actually very simple - so simple that it&amp;#039;s getting difficult, as it were :-)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Think of it this way: you&#039;ve got a PBX, and that can do just about one thing: handle calls. And what is a call? Two endpoints, connected together to enable communication (&#039;&#039;voice&#039;&#039; communication, we&#039;re inclined to think). So Asterisk must handle calls.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;Think of it this way: you&#039;ve got a PBX, and that can do just about one thing: handle calls. And what is a call? Two endpoints, connected together to enable communication (&#039;&#039;voice&#039;&#039; communication, we&#039;re inclined to think). So Asterisk must handle calls&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. And we must tell it how - using something that&#039;s called a &quot;dialplan&quot;. That&#039;s all there is to it, really&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;For &lt;/del&gt;any call, there&#039;s an element of &quot;dialing&quot;, where the initiating endpoint feeds information into the telephony system about who he/she wants to reach. This initiates the call, but the call is not actually set up until the other side &quot;picks up&quot; - either because the target endpoint has accepted the call, or because a PBX on the target endpoint site has picked up the phone. In the latter case, it might be necessary to feed additional info into the call, like in answering a &quot;voice menu&quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;Now, for &lt;/ins&gt;any call, there&#039;s an element of &quot;dialing&quot;, where the initiating endpoint feeds information into the telephony system about who he/she wants to reach. This initiates the call, but the call is not actually set up until the other side &quot;picks up&quot; - either because the target endpoint has accepted the call, or because a PBX on the target endpoint site has picked up the phone. In the latter case, it might be necessary to feed additional info into the call, like in answering a &quot;voice menu&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. From this element of dialing, the call handling configuration file derives its name, but it might help you to keep in mind that the dial plan is actually handling calls, not just dialing&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;So, we &lt;/del&gt;can observe that calls come in three varieties:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;We &lt;/ins&gt;can observe that calls come in three varieties:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;* incoming, where one side of the call is already totally set up to communicate. This is the case when someone &amp;quot;outside&amp;quot; your premises tries to contact someone &amp;quot;inside&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;* incoming, where one side of the call is already totally set up to communicate. This is the case when someone &amp;quot;outside&amp;quot; your premises tries to contact someone &amp;quot;inside&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;* outgoing, where the PBX must also make a connection, but the receiving party is not on a channel attached to the PBX, but &amp;quot;somewhere out there&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;* outgoing, where the PBX must also make a connection, but the receiving party is not on a channel attached to the PBX, but &amp;quot;somewhere out there&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;* passing through, where the PBX accepts an incoming connection, but then dials out to reach the intended recipient.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;* passing through, where the PBX accepts an incoming connection, but then dials out to reach the intended recipient.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;However, the more you think about these &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;two &lt;/del&gt;kinds of calls, the more you&#039;ll see that they&#039;re almost the same. The most notable difference is in who is paying for the call....&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;However, the more you think about these &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;three &lt;/ins&gt;kinds of calls, the more you&#039;ll see that they&#039;re almost the same. The most notable difference is in who is paying for the call...&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. So all of these calls go through the dial plan, and we must cater for all use cases that these calls can follow&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;So, when you have a PBX like Asterisk, you have to instruct it how to handle calls - be it incoming, outgoing or passing through. In all cases, the initiating party has or will enter information by dialing, upon which the PBX must act. The recipe for these actions is thus called a &quot;dialplan&quot;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;When we &lt;/ins&gt;create a dialplan for our Asterisk PBX, what &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;exactly &lt;/ins&gt;must we do? Not much, only to create little recipes for each perceivable call that Asterisk must handle for us. As such, creating a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dial plan &lt;/ins&gt;is much like programming - only the language that we have to program in is a bit clumsy and limited (at least with Asterisk 1.4). So we have to learn this call programming stuff - and how hard can that be?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;So when WE have to &lt;/del&gt;create a dialplan for our Asterisk PBX, what must we do? Not much, only to create little recipes for each perceivable call that Asterisk must handle for us. As such, creating a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dialplan &lt;/del&gt;is much like programming - only the language that we have to program in is a bit clumsy and limited (at least with Asterisk 1.4). So we have to learn this call programming stuff - and how hard can that be?&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;=Dialplan elements=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;=Dialplan elements=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Saruman!</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Dialplan_theory&amp;diff=1830&amp;oldid=prev</id>
		<title>Saruman!: Page started</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Dialplan_theory&amp;diff=1830&amp;oldid=prev"/>
		<updated>2008-10-17T14:17:41Z</updated>

		<summary type="html">&lt;p&gt;Page started&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=What is a dialplan?=&lt;br /&gt;
When first starting with Asterisk, you might be intimidated by the sheer complexity of the dialplan. But we find it is actually very simple - so simple that it&amp;#039;s getting difficult, as it were :-)&lt;br /&gt;
&lt;br /&gt;
Think of it this way: you&amp;#039;ve got a PBX, and that can do just about one thing: handle calls. And what is a call? Two endpoints, connected together to enable communication (&amp;#039;&amp;#039;voice&amp;#039;&amp;#039; communication, we&amp;#039;re inclined to think). So Asterisk must handle calls.&lt;br /&gt;
&lt;br /&gt;
For any call, there&amp;#039;s an element of &amp;quot;dialing&amp;quot;, where the initiating endpoint feeds information into the telephony system about who he/she wants to reach. This initiates the call, but the call is not actually set up until the other side &amp;quot;picks up&amp;quot; - either because the target endpoint has accepted the call, or because a PBX on the target endpoint site has picked up the phone. In the latter case, it might be necessary to feed additional info into the call, like in answering a &amp;quot;voice menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So, we can observe that calls come in three varieties:&lt;br /&gt;
* incoming, where one side of the call is already totally set up to communicate. This is the case when someone &amp;quot;outside&amp;quot; your premises tries to contact someone &amp;quot;inside&amp;quot;&lt;br /&gt;
* outgoing, where the PBX must also make a connection, but the receiving party is not on a channel attached to the PBX, but &amp;quot;somewhere out there&amp;quot;.&lt;br /&gt;
* passing through, where the PBX accepts an incoming connection, but then dials out to reach the intended recipient.&lt;br /&gt;
However, the more you think about these two kinds of calls, the more you&amp;#039;ll see that they&amp;#039;re almost the same. The most notable difference is in who is paying for the call....&lt;br /&gt;
&lt;br /&gt;
So, when you have a PBX like Asterisk, you have to instruct it how to handle calls - be it incoming, outgoing or passing through. In all cases, the initiating party has or will enter information by dialing, upon which the PBX must act. The recipe for these actions is thus called a &amp;quot;dialplan&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So when WE have to create a dialplan for our Asterisk PBX, what must we do? Not much, only to create little recipes for each perceivable call that Asterisk must handle for us. As such, creating a dialplan is much like programming - only the language that we have to program in is a bit clumsy and limited (at least with Asterisk 1.4). So we have to learn this call programming stuff - and how hard can that be?&lt;br /&gt;
&lt;br /&gt;
=Dialplan elements=&lt;br /&gt;
Any dialplan contains the following building blocks:&lt;br /&gt;
* Applications&lt;br /&gt;
* Extensions&lt;br /&gt;
* Contexts&lt;br /&gt;
&lt;br /&gt;
=Applications=&lt;br /&gt;
&lt;br /&gt;
= Extensions =&lt;br /&gt;
An extension can be one of two types: a literal or a pattern. &lt;br /&gt;
&lt;br /&gt;
A literal extension can be a number, like 123, and it can also contain the standard symbols * and # that appear on ordinary telephones, so 12#89* is a valid extension.&lt;br /&gt;
&lt;br /&gt;
A single extension can also match patterns. In the extensions.conf file, an extension name is a pattern if it starts with the underscore symbol (_). In an extension pattern, the following characters have special meanings:&lt;br /&gt;
 X          matches any digit from 0-9&lt;br /&gt;
 Z          matches any digit from 1-9&lt;br /&gt;
 N          matches any digit from 2-9&lt;br /&gt;
 [1237-9]   matches any digit or letter in the brackets&lt;br /&gt;
            (in this example, 1,2,3,7,8,9)&lt;br /&gt;
 .          wildcard, matches one or more characters&lt;br /&gt;
 !          wildcard, matches zero or more characters immediately           &lt;br /&gt;
&lt;br /&gt;
Asterisk uses some extension names for special purposes:&lt;br /&gt;
&lt;br /&gt;
    * i : Invalid&lt;br /&gt;
    * s : Start&lt;br /&gt;
    * h : Hangup&lt;br /&gt;
    * t : Timeout&lt;br /&gt;
    * T : AbsoluteTimeout&lt;br /&gt;
    * a : Asterisk extension&lt;br /&gt;
    * o : Operator&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - handling incoming calls =&lt;br /&gt;
What is a Channel?&lt;br /&gt;
A channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&amp;#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - handling outgoing calls =&lt;br /&gt;
&lt;br /&gt;
= Where to go from here=&lt;/div&gt;</summary>
		<author><name>Saruman!</name></author>
	</entry>
</feed>