<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RedHatVN Network &#124; Ho Tro Linux &#124; Support Linux &#124; Linux VN &#187; asterisk</title>
	<atom:link href="http://redhatvn.net/tag/asterisk/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Fri, 03 Sep 2010 08:03:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How To Install Asterisk For Your First PBX Solution</title>
		<link>http://redhatvn.net/how-to-install-asterisk-for-your-first-pbx-solution</link>
		<comments>http://redhatvn.net/how-to-install-asterisk-for-your-first-pbx-solution#comments</comments>
		<pubDate>Thu, 27 Aug 2009 04:29:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[asterisk]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=239</guid>
		<description><![CDATA[Asterisk is one of the best telephony solutions which is free to use. There are others such as yate that provide same type of solutions and even more custom ones. Due to the easy of implementation Asterisk has become more popular than anything else. Asterisk is very easy to use and lots of open source [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.asterisk.org/" target="_blank">Asterisk</a> is one of the best telephony solutions which is free to use. There are others such as <a href="http://yate.null.ro/pmwiki/" target="_blank">yate</a> that provide same type of solutions and even more custom ones. Due to the easy of implementation Asterisk has become more popular than anything else. Asterisk is very easy to use and lots of open source and closed source panels provide a GUI for it.</p>
<p><span id="more-239"></span></p>
<h3>Installation of asterisk server:</h3>
<h4>Pre-requites for asterisk installation:</h4>
<p>Asterisk requires a system running with kernel 2.6 and the header files must be present to compile asterisk on our system. Asterisk is written in c; we require gcc with the supporting libs such as termcap, and openssl. Asterisk add-ons require the mysql header files so please install mysql lib, mysql client and the headers to compile asterisk-addons.</p>
<h4>Download all files:</h4>
<ol>
<li><a href="http://downloads.digium.com/pub/zaptel/zaptel-1.4.12.1.tar.gz">Zaptel</a></li>
<li><a href="http://downloads.digium.com/pub/libpri/libpri-1.4.9.tar.gz">libpri</a></li>
<li><a href="http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.20.tar.gz">asterisk</a></li>
<li><a href="http://downloads.digium.com/pub/asterisk/releases/asterisk-sounds-1.2.1.tar.gz">asterisk-sounds</a></li>
<li><a href="http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.4.7.tar.gz">asterisk-addones</a></li>
</ol>
<h4>Installation of asterisk:</h4>
<p>Copy all the files to you server (I&#8217;m assuming you have copied all files to <span>/usr/src/</span>).</p>
<p>31 Steps for installing asterisk on your system:</p>
<ol>
<li>tar -xzf zaptel-1.4.12.1.tar.gz</li>
<li>tar -xzf libpri-1.4.9.tar.gz</li>
<li>tar -xzf asterisk-1.4.20.tar.gz</li>
<li>tar -xzf asterisk-sounds-1.2.1.tar.gz</li>
<li>tar -xzf asterisk-addons-1.4.7.tar.gz</li>
<li>cd zaptel-1.4.12.1</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
<li>make config</li>
<li>service zaptel start</li>
<li>cd ..</li>
<li>cd libpri-1.4.9</li>
<li>make</li>
<li>make install</li>
<li>cd ..</li>
<li>cd asterisk-1.4.20</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
<li>make samples</li>
<li>make config</li>
<li>cd ..</li>
<li>cd asterisk-sounds</li>
<li>make install</li>
<li>cd ..</li>
<li>cd asterisk-addons-1.4.7</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
<li>service asterisk start</li>
</ol>
<p>If all above comands run well then we have  installed a new asterisk server on our system.</p>
<h4>Creating first sip extension:</h4>
<p>Please add the following lines to <span>sip.conf</span> (<span>/etc/asterisk/sip.conf</span>):</p>
<blockquote><p>
[common](!) ; this is template.<br />
type=friend<br />
context=internal<br />
host=dynamic<br />
disallow=all<br />
allow=ulaw<br />
allow=alaw<br />
allow=g723<br />
allow=g729<br />
dtmfmode=rfc2833</p>
<p>[1000](common)<br />
username=1000<br />
secret=1000</p>
<p>[1001](common)<br />
username=1001<br />
secret=1001</p>
<p>[1002](common)<br />
username=1002<br />
secret=1002</p>
<p>[1003](common)<br />
username=1003<br />
secret=1003</p>
<p>[1004](common)<br />
username=1004<br />
secret=1004</p></blockquote>
<p>Above we have created 5 extensions that can be used any sip client (xlite,cisco sip phone, ATA). All users will get registered. If it does not work then check out the firwall settings. Please disable those settings until setup is completed.</p>
<h4>Creating first Dialplan:</h4>
<p>No extension can talk to each other unless we configure its dial plan.  We have to open <span>extension.conf</span> (<span>/etc/asterisk/extension.conf</span>). Add the following lines:</p>
<blockquote><p>[internal]<br />
exten=&gt; _XXXX,1,Dial(SIP/${EXTEN})</p></blockquote>
<p>Now all configured phones can talk. This makes asterisk a simple platform in PBX; not many skills are required to develop an office PBX.</p>
<h4>Creating first Sip trunk:</h4>
<p>Asterisk can make outbound and inbound calls, for outbound we require a provider to terminate our calls and to get calls routed to our system so for that we need a public IP.</p>
<p>Add following code to <span>sip.conf</span>:</p>
<blockquote><p>[trunk]<br />
type=friend<br />
context=internal<br />
host=&lt;providers IP&gt;<br />
disallow=all<br />
allow=ulaw<br />
allow=alaw<br />
allow=g723<br />
allow=g729<br />
dtmfmode=rfc2833</p></blockquote>
<p>After the update our <span>sip.conf</span> looks as follows:</p>
<blockquote><p>[common](!) ; this is template.<br />
type=friend<br />
context=internal<br />
host=dynamic<br />
disallow=all<br />
allow=ulaw<br />
allow=alaw<br />
allow=g723<br />
allow=g729<br />
dtmfmode=rfc2833</p>
<p>[1000](common)<br />
username=1000<br />
secret=1000</p>
<p>[1001](common)<br />
username=1001<br />
secret=1001</p>
<p>[1002](common)<br />
username=1002<br />
secret=1002</p>
<p>[1003](common)<br />
username=1003<br />
secret=1003</p>
<p>[1004](common)<br />
username=1004<br />
secret=1004</p>
<p>[trunk]<br />
type=friend<br />
context=internal<br />
host=&lt;providers IP&gt;<br />
disallow=all<br />
allow=ulaw<br />
allow=alaw<br />
allow=g723<br />
allow=g729<br />
dtmfmode=rfc2833</p>
<p>Now  you have to add one line to <span>extension.conf</span>:</p>
<blockquote><p>exten =&gt; _XXXXXXX.,1,Dial(SIP/trunk1/${EXTEN})</p></blockquote>
</blockquote>
<p><script type="text/javascript">// <![CDATA[
document.write('</p>
<div align="center">');
// ]]&gt;</script></p>
<p><!-- begin ad tag Rectangle B -->So our <span>extension.conf</span> looks like:</p>
<blockquote><p>[internal]<br />
exten=&gt; _XXXX,1,Dial(SIP/${EXTEN})<br />
exten =&gt; _XXXXXXX.,1,Dial(SIP/trunk1/${EXTEN})</p>
<p>With the above settings it is simple to create an IP-PBX with outbound trunk.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/how-to-install-asterisk-for-your-first-pbx-solution/feed</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->